mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-02-03 21:29:08 +01:00
859 lines
26 KiB
HTML
859 lines
26 KiB
HTML
{% extends "baseTemplate/index.html" %}
|
|
{% load i18n %}
|
|
{% block title %}{% trans "Create Container" %} - {{ image }}:{{ tag }}{% endblock %}
|
|
{% block content %}
|
|
|
|
{% load static %}
|
|
{% get_current_language as LANGUAGE_CODE %}
|
|
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
|
|
|
<style>
|
|
.modern-container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding: 2rem;
|
|
}
|
|
|
|
.page-header {
|
|
text-align: center;
|
|
margin-bottom: 3rem;
|
|
padding: 3rem 0;
|
|
background: linear-gradient(135deg, #f8f9ff 0%, #f0f1ff 100%);
|
|
border-radius: 20px;
|
|
animation: fadeInDown 0.5s ease-out;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.page-header::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: -50%;
|
|
right: -50%;
|
|
width: 200%;
|
|
height: 200%;
|
|
background: radial-gradient(circle at 70% 30%, rgba(91, 95, 207, 0.15) 0%, transparent 50%);
|
|
animation: rotate 30s linear infinite;
|
|
}
|
|
|
|
.header-content {
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.page-title {
|
|
font-size: 2.5rem;
|
|
font-weight: 700;
|
|
color: #1e293b;
|
|
margin-bottom: 1rem;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.docker-icon {
|
|
width: 60px;
|
|
height: 60px;
|
|
background: white;
|
|
border-radius: 12px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
.image-info {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 0.5rem;
|
|
margin-top: 1rem;
|
|
font-size: 1.125rem;
|
|
color: #64748b;
|
|
}
|
|
|
|
.image-badge {
|
|
background: #e0e7ff;
|
|
color: #5b5fcf;
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 8px;
|
|
font-weight: 600;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.progress-indicator {
|
|
display: flex;
|
|
justify-content: center;
|
|
margin: 2rem 0;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.progress-step {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
position: relative;
|
|
}
|
|
|
|
.progress-step::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 20px;
|
|
left: 60px;
|
|
width: 100%;
|
|
height: 2px;
|
|
background: #e8e9ff;
|
|
}
|
|
|
|
.progress-step:last-child::after {
|
|
display: none;
|
|
}
|
|
|
|
.step-icon {
|
|
width: 40px;
|
|
height: 40px;
|
|
background: #e8e9ff;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: #64748b;
|
|
font-size: 1rem;
|
|
position: relative;
|
|
z-index: 1;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.progress-step.active .step-icon {
|
|
background: #5b5fcf;
|
|
color: white;
|
|
box-shadow: 0 0 0 4px rgba(91, 95, 207, 0.2);
|
|
}
|
|
|
|
.progress-step.completed .step-icon {
|
|
background: #10b981;
|
|
color: white;
|
|
}
|
|
|
|
.step-label {
|
|
margin-top: 0.5rem;
|
|
font-size: 0.875rem;
|
|
color: #64748b;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.progress-step.active .step-label {
|
|
color: #5b5fcf;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.form-container {
|
|
background: white;
|
|
border-radius: 16px;
|
|
box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 10px 40px rgba(0,0,0,0.08);
|
|
border: 1px solid #e8e9ff;
|
|
overflow: hidden;
|
|
animation: fadeInUp 0.5s ease-out;
|
|
}
|
|
|
|
.form-section {
|
|
padding: 2rem;
|
|
border-bottom: 1px solid #e8e9ff;
|
|
}
|
|
|
|
.form-section:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.section-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.section-icon {
|
|
width: 40px;
|
|
height: 40px;
|
|
background: #e0e7ff;
|
|
border-radius: 10px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: #5b5fcf;
|
|
}
|
|
|
|
.section-title {
|
|
font-size: 1.125rem;
|
|
font-weight: 600;
|
|
color: #1e293b;
|
|
margin: 0;
|
|
}
|
|
|
|
.section-subtitle {
|
|
font-size: 0.875rem;
|
|
color: #64748b;
|
|
margin-top: 0.25rem;
|
|
}
|
|
|
|
.form-row {
|
|
display: grid;
|
|
grid-template-columns: 1fr 2fr;
|
|
gap: 1rem;
|
|
align-items: center;
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.form-label {
|
|
font-weight: 500;
|
|
color: #1e293b;
|
|
font-size: 0.875rem;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.required-star {
|
|
color: #ef4444;
|
|
}
|
|
|
|
.form-control {
|
|
width: 100%;
|
|
padding: 0.75rem 1rem;
|
|
border: 1px solid #e8e9ff;
|
|
border-radius: 8px;
|
|
font-size: 0.875rem;
|
|
transition: all 0.3s ease;
|
|
background: #fff;
|
|
}
|
|
|
|
.form-control:focus {
|
|
outline: none;
|
|
border-color: #5b5fcf;
|
|
box-shadow: 0 0 0 3px rgba(91, 95, 207, 0.1);
|
|
}
|
|
|
|
.form-control:disabled {
|
|
background: #f8f9ff;
|
|
cursor: not-allowed;
|
|
color: #64748b;
|
|
}
|
|
|
|
.input-group {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.input-addon {
|
|
font-size: 0.875rem;
|
|
color: #64748b;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.port-mapping {
|
|
display: grid;
|
|
grid-template-columns: 1fr auto 1fr;
|
|
gap: 1rem;
|
|
align-items: center;
|
|
margin-bottom: 1rem;
|
|
padding: 1rem;
|
|
background: #f8f9ff;
|
|
border-radius: 8px;
|
|
border: 1px solid #e8e9ff;
|
|
}
|
|
|
|
.port-arrow {
|
|
color: #5b5fcf;
|
|
font-size: 1.25rem;
|
|
}
|
|
|
|
.port-label {
|
|
font-size: 0.75rem;
|
|
color: #64748b;
|
|
margin-bottom: 0.25rem;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.dynamic-section {
|
|
background: #f8f9ff;
|
|
border-radius: 12px;
|
|
padding: 1.5rem;
|
|
margin-top: 1.5rem;
|
|
}
|
|
|
|
.dynamic-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.dynamic-title {
|
|
font-size: 0.875rem;
|
|
font-weight: 600;
|
|
color: #1e293b;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.dynamic-item {
|
|
display: grid;
|
|
grid-template-columns: 1fr 2fr auto;
|
|
gap: 1rem;
|
|
align-items: center;
|
|
margin-bottom: 1rem;
|
|
padding: 1rem;
|
|
background: white;
|
|
border-radius: 8px;
|
|
border: 1px solid #e8e9ff;
|
|
}
|
|
|
|
.btn {
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 8px;
|
|
font-weight: 500;
|
|
font-size: 0.875rem;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
border: none;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: #5b5fcf;
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: #4547a9;
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 12px rgba(91, 95, 207, 0.3);
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: white;
|
|
color: #5b5fcf;
|
|
border: 1px solid #e8e9ff;
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: #f8f9ff;
|
|
border-color: #5b5fcf;
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.btn-danger {
|
|
background: #fee2e2;
|
|
color: #ef4444;
|
|
border: 1px solid #fecaca;
|
|
}
|
|
|
|
.btn-danger:hover {
|
|
background: #fecaca;
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.btn-success {
|
|
background: #d1fae5;
|
|
color: #065f46;
|
|
border: 1px solid #a7f3d0;
|
|
}
|
|
|
|
.btn-success:hover {
|
|
background: #a7f3d0;
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.btn-lg {
|
|
padding: 1rem 2rem;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.action-buttons {
|
|
display: flex;
|
|
gap: 1rem;
|
|
margin-top: 2rem;
|
|
padding: 2rem;
|
|
background: #f8f9ff;
|
|
border-top: 1px solid #e8e9ff;
|
|
}
|
|
|
|
.status-message {
|
|
text-align: center;
|
|
padding: 2rem;
|
|
animation: fadeIn 0.5s ease-out;
|
|
}
|
|
|
|
.status-icon {
|
|
width: 60px;
|
|
height: 60px;
|
|
margin: 0 auto 1rem;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.status-success {
|
|
background: #d1fae5;
|
|
color: #065f46;
|
|
}
|
|
|
|
.status-error {
|
|
background: #fee2e2;
|
|
color: #991b1b;
|
|
}
|
|
|
|
.status-title {
|
|
font-size: 1.25rem;
|
|
font-weight: 600;
|
|
color: #1e293b;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.status-text {
|
|
color: #64748b;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.loading-spinner {
|
|
width: 40px;
|
|
height: 40px;
|
|
border: 4px solid #e8e9ff;
|
|
border-top-color: #5b5fcf;
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.tooltip {
|
|
position: relative;
|
|
cursor: help;
|
|
}
|
|
|
|
.tooltip-icon {
|
|
color: #64748b;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.tooltip:hover .tooltip-content {
|
|
display: block;
|
|
}
|
|
|
|
.tooltip-content {
|
|
display: none;
|
|
position: absolute;
|
|
bottom: 100%;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
background: #1e293b;
|
|
color: white;
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 6px;
|
|
font-size: 0.75rem;
|
|
white-space: nowrap;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.tooltip-content::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 100%;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
border: 5px solid transparent;
|
|
border-top-color: #1e293b;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
@keyframes rotate {
|
|
from { transform: rotate(0deg); }
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
@keyframes fadeInDown {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(-20px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
@keyframes fadeInUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(20px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; }
|
|
to { opacity: 1; }
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.form-row {
|
|
grid-template-columns: 1fr;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.form-label {
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.port-mapping {
|
|
grid-template-columns: 1fr;
|
|
text-align: center;
|
|
}
|
|
|
|
.dynamic-item {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.action-buttons {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.progress-indicator {
|
|
display: none;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<div class="modern-container" ng-controller="runContainer">
|
|
<div class="page-header">
|
|
<div class="header-content">
|
|
<h1 class="page-title">
|
|
<div class="docker-icon">
|
|
<i class="fab fa-docker" style="color: #5b5fcf; font-size: 1.75rem;"></i>
|
|
</div>
|
|
{% trans "Create New Container" %}
|
|
</h1>
|
|
<div class="image-info">
|
|
<span>{% trans "From image:" %}</span>
|
|
<span class="image-badge">
|
|
<i class="fas fa-cube"></i>
|
|
{{ image }}:{{ tag }}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Progress Indicator -->
|
|
<div class="progress-indicator" ng-hide="installationProgress">
|
|
<div class="progress-step active">
|
|
<div class="step-icon">
|
|
<i class="fas fa-cog"></i>
|
|
</div>
|
|
<span class="step-label">{% trans "Configure" %}</span>
|
|
</div>
|
|
<div class="progress-step">
|
|
<div class="step-icon">
|
|
<i class="fas fa-rocket"></i>
|
|
</div>
|
|
<span class="step-label">{% trans "Deploy" %}</span>
|
|
</div>
|
|
<div class="progress-step">
|
|
<div class="step-icon">
|
|
<i class="fas fa-check"></i>
|
|
</div>
|
|
<span class="step-label">{% trans "Complete" %}</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Main Form Container -->
|
|
<div class="form-container" ng-hide="installationDetailsForm">
|
|
<form name="dockerInstallForm" novalidate>
|
|
|
|
<!-- Basic Configuration Section -->
|
|
<div class="form-section">
|
|
<div class="section-header">
|
|
<div class="section-icon">
|
|
<i class="fas fa-info-circle"></i>
|
|
</div>
|
|
<div>
|
|
<h2 class="section-title">{% trans "Basic Configuration" %}</h2>
|
|
<p class="section-subtitle">{% trans "Set the container name and resource limits" %}</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<label class="form-label">
|
|
{% trans "Container Name" %}
|
|
<span class="required-star">*</span>
|
|
<div class="tooltip">
|
|
<i class="fas fa-question-circle tooltip-icon"></i>
|
|
<div class="tooltip-content">
|
|
{% trans "A unique name for your container" %}
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<input type="text" class="form-control" ng-model="name" ng-init="name='{{ name }}'"
|
|
placeholder="{% trans 'e.g., my-nginx-server' %}" name="containerName" required>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<label class="form-label">
|
|
{% trans "Owner" %}
|
|
<span class="required-star">*</span>
|
|
</label>
|
|
<select class="form-control" ng-model="dockerOwner" name="dockerOwner" required>
|
|
<option value="" disabled>{% trans "Select owner..." %}</option>
|
|
{% for owner in ownerList %}
|
|
<option value="{{ owner }}">{{ owner }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<label class="form-label">
|
|
{% trans "Memory Limit" %}
|
|
<span class="required-star">*</span>
|
|
<div class="tooltip">
|
|
<i class="fas fa-question-circle tooltip-icon"></i>
|
|
<div class="tooltip-content">
|
|
{% trans "Maximum memory this container can use" %}
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<div class="input-group">
|
|
<input type="number" class="form-control" ng-model="memory"
|
|
placeholder="512" min="128" name="memory" required>
|
|
<span class="input-addon">MB</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<label class="form-label">{% trans "Image" %}</label>
|
|
<input type="text" class="form-control" ng-model="image" ng-init="image='{{ image }}'" disabled>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<label class="form-label">{% trans "Tag" %}</label>
|
|
<input type="text" class="form-control" ng-model="tag" ng-init="tag='{{ tag }}'" disabled>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Port Configuration Section -->
|
|
{% if portConfig %}
|
|
<div class="form-section">
|
|
<div class="section-header">
|
|
<div class="section-icon">
|
|
<i class="fas fa-network-wired"></i>
|
|
</div>
|
|
<div>
|
|
<h2 class="section-title">{% trans "Port Mapping" %}</h2>
|
|
<p class="section-subtitle">{% trans "Map container ports to host ports for external access" %}</p>
|
|
</div>
|
|
</div>
|
|
|
|
{% for port, protocol in portConfig.items %}
|
|
<div class="port-mapping">
|
|
<div>
|
|
<div class="port-label">{% trans "Container Port" %}</div>
|
|
<div class="input-group">
|
|
<input type="text" class="form-control" value="{{ port }}" disabled>
|
|
<span class="input-addon">{{ protocol|upper }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="port-arrow">
|
|
<i class="fas fa-arrow-right"></i>
|
|
</div>
|
|
<div>
|
|
<div class="port-label">{% trans "Host Port" %}</div>
|
|
<input type="number" class="form-control" ng-model="eport['{{ port }}']"
|
|
placeholder="{% trans 'e.g., 8080' %}" name="port_{{ port }}" required>
|
|
</div>
|
|
</div>
|
|
<span ng-init="iport[{{ port }}]={{ port }}; portType['{{ port }}']='{{ protocol }}'"></span>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<!-- Environment Variables Section -->
|
|
<div class="form-section">
|
|
<div class="section-header">
|
|
<div class="section-icon">
|
|
<i class="fas fa-list"></i>
|
|
</div>
|
|
<div>
|
|
<h2 class="section-title">{% trans "Environment Variables" %}</h2>
|
|
<p class="section-subtitle">{% trans "Configure environment variables for your container" %}</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="dynamic-section">
|
|
<div class="dynamic-header">
|
|
<span class="dynamic-title">{% trans "Environment Variables" %}</span>
|
|
<button type="button" class="btn btn-secondary" ng-click="addEnvField()">
|
|
<i class="fas fa-plus"></i>
|
|
{% trans "Add Variable" %}
|
|
</button>
|
|
</div>
|
|
|
|
<span ng-init="envList = {}"></span>
|
|
{% for env, value in envList.items %}
|
|
<span ng-init="envList[{{ forloop.counter0 }}] = {'name':'{{ env }}', 'value':'{{ value }}'}"></span>
|
|
{% endfor %}
|
|
|
|
<div ng-repeat="env in envList track by $index" class="dynamic-item">
|
|
<input type="text" class="form-control" ng-model="envList[$index].name"
|
|
placeholder="{% trans 'Variable name' %}">
|
|
<input type="text" class="form-control" ng-model="envList[$index].value"
|
|
placeholder="{% trans 'Value' %}">
|
|
<button type="button" class="btn btn-danger" ng-click="removeEnvField($index)"
|
|
ng-show="Object.keys(envList).length > 0">
|
|
<i class="fas fa-trash"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div ng-show="Object.keys(envList).length === 0" style="text-align: center; padding: 2rem; color: #64748b;">
|
|
<i class="fas fa-info-circle" style="margin-right: 0.5rem;"></i>
|
|
{% trans "No environment variables configured. Click 'Add Variable' to add one." %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Volume Mapping Section -->
|
|
<div class="form-section">
|
|
<div class="section-header">
|
|
<div class="section-icon">
|
|
<i class="fas fa-hdd"></i>
|
|
</div>
|
|
<div>
|
|
<h2 class="section-title">{% trans "Volume Mapping" %}</h2>
|
|
<p class="section-subtitle">{% trans "Mount host directories or volumes into the container" %}</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="dynamic-section">
|
|
<div class="dynamic-header">
|
|
<span class="dynamic-title">{% trans "Volume Mappings" %}</span>
|
|
<button type="button" class="btn btn-secondary" ng-click="addVolField()">
|
|
<i class="fas fa-plus"></i>
|
|
{% trans "Add Volume" %}
|
|
</button>
|
|
</div>
|
|
|
|
<div ng-repeat="volume in volList track by $index" class="dynamic-item">
|
|
<input type="text" class="form-control" ng-model="volList[$index].src"
|
|
placeholder="{% trans 'Host path (e.g., /var/data)' %}">
|
|
<input type="text" class="form-control" ng-model="volList[$index].dest"
|
|
placeholder="{% trans 'Container path (e.g., /data)' %}">
|
|
<button type="button" class="btn btn-danger" ng-click="removeVolField()"
|
|
ng-show="$last && volListNumber > 0">
|
|
<i class="fas fa-trash"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div ng-show="volListNumber === 0" style="text-align: center; padding: 2rem; color: #64748b;">
|
|
<i class="fas fa-info-circle" style="margin-right: 0.5rem;"></i>
|
|
{% trans "No volumes configured. Click 'Add Volume' to mount directories." %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Action Buttons -->
|
|
<div class="action-buttons">
|
|
{% verbatim %}
|
|
<button type="button" class="btn btn-primary btn-lg" ng-click="createContainer()"
|
|
ng-disabled="!formIsValid || containerCreationLoading">
|
|
<i class="fas fa-rocket"></i>
|
|
{% endverbatim %}
|
|
{% trans "Create Container" %}
|
|
{% verbatim %}
|
|
</button>
|
|
{% endverbatim %}
|
|
<a href="{% url 'containerImage' %}" class="btn btn-secondary btn-lg">
|
|
<i class="fas fa-arrow-left"></i>
|
|
{% trans "Cancel" %}
|
|
</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- Progress/Status Section -->
|
|
<div class="form-container" ng-hide="installationProgress">
|
|
<div class="status-message">
|
|
<!-- Loading State -->
|
|
<div ng-show="containerCreationLoading">
|
|
<div class="loading-spinner"></div>
|
|
<h2 class="status-title" style="margin-top: 1.5rem;">{$ currentStatus $}</h2>
|
|
<p class="status-text">{% trans "Please wait while we create your container..." %}</p>
|
|
</div>
|
|
|
|
<!-- Success State -->
|
|
<div ng-hide="success">
|
|
<div class="status-icon status-success">
|
|
<i class="fas fa-check"></i>
|
|
</div>
|
|
<h2 class="status-title">{% trans "Container Created Successfully!" %}</h2>
|
|
<p class="status-text">{% trans "Your container has been created and is ready to use." %}</p>
|
|
<p class="status-text" style="margin-top: 1rem;">
|
|
<i class="fas fa-spinner fa-spin"></i>
|
|
{% trans "Redirecting to container management..." %}
|
|
</p>
|
|
</div>
|
|
|
|
<!-- Error State -->
|
|
<div ng-hide="errorMessageBox">
|
|
<div class="status-icon status-error">
|
|
<i class="fas fa-exclamation-triangle"></i>
|
|
</div>
|
|
<h2 class="status-title">{% trans "Creation Failed" %}</h2>
|
|
<p class="status-text" style="color: #991b1b; margin-top: 1rem;">
|
|
<strong>{% trans "Error:" %}</strong> {$ errorMessage $}
|
|
</p>
|
|
<button type="button" class="btn btn-primary" ng-click="goBack()"
|
|
ng-disabled="goBackDisable" style="margin-top: 1.5rem;">
|
|
<i class="fas fa-arrow-left"></i>
|
|
{% trans "Go Back" %}
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Connection Error -->
|
|
<div ng-hide="couldNotConnect">
|
|
<div class="status-icon status-error">
|
|
<i class="fas fa-wifi"></i>
|
|
</div>
|
|
<h2 class="status-title">{% trans "Connection Error" %}</h2>
|
|
<p class="status-text">{% trans "Could not connect to server. Please refresh this page and try again." %}</p>
|
|
<button type="button" class="btn btn-primary" onclick="location.reload()" style="margin-top: 1.5rem;">
|
|
<i class="fas fa-sync"></i>
|
|
{% trans "Refresh Page" %}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
{% block footer_scripts %}
|
|
<script src="{% static 'dockerManager/dockerManager.js' %}"></script>
|
|
<script>
|
|
// Initialize tooltips and other interactive elements
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
// Add any additional initialization code here
|
|
});
|
|
</script>
|
|
{% endblock %} |