587 lines
12 KiB
CSS
587 lines
12 KiB
CSS
/* ===========================================
|
|
PROXMOX MANAGER - DASHBOARD STYLES
|
|
VM Cards, Metrics, and Dashboard Components
|
|
=========================================== */
|
|
|
|
/* ===========================================
|
|
VM GRID LAYOUT
|
|
=========================================== */
|
|
|
|
.vm-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
|
|
gap: var(--space-lg);
|
|
margin-top: var(--space-lg);
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.vm-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
/* ===========================================
|
|
VM CARDS
|
|
=========================================== */
|
|
|
|
.vm-card {
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border-default);
|
|
border-radius: var(--radius-lg);
|
|
padding: var(--space-lg);
|
|
transition: all var(--transition-normal);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.vm-card::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 4px;
|
|
height: 100%;
|
|
background: var(--border-default);
|
|
transition: background var(--transition-fast);
|
|
}
|
|
|
|
.vm-card:hover {
|
|
border-color: var(--border-muted);
|
|
box-shadow: var(--shadow-md);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.vm-card.status-running::before {
|
|
background: var(--accent-green);
|
|
}
|
|
|
|
.vm-card.status-stopped::before {
|
|
background: var(--accent-red);
|
|
}
|
|
|
|
.vm-card.status-unknown::before {
|
|
background: var(--text-tertiary);
|
|
}
|
|
|
|
/* VM Header */
|
|
.vm-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
margin-bottom: var(--space-md);
|
|
}
|
|
|
|
.vm-title {
|
|
font-size: 1.125rem;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
margin-bottom: var(--space-xs);
|
|
}
|
|
|
|
.vm-id {
|
|
font-size: 0.8rem;
|
|
color: var(--text-secondary);
|
|
font-family: var(--font-mono);
|
|
}
|
|
|
|
.vm-notes {
|
|
color: var(--text-secondary);
|
|
font-size: 0.85rem;
|
|
margin-bottom: var(--space-md);
|
|
padding: var(--space-sm);
|
|
background: var(--bg-tertiary);
|
|
border-radius: var(--radius-sm);
|
|
border-left: 2px solid var(--accent-purple);
|
|
}
|
|
|
|
/* ===========================================
|
|
METRICS BOXES
|
|
=========================================== */
|
|
|
|
.metrics-realtime {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: var(--space-sm);
|
|
margin: var(--space-md) 0;
|
|
}
|
|
|
|
.metric-box {
|
|
background: var(--bg-tertiary);
|
|
border: 1px solid var(--border-default);
|
|
border-radius: var(--radius-md);
|
|
padding: var(--space-md);
|
|
text-align: center;
|
|
position: relative;
|
|
overflow: hidden;
|
|
min-height: 100px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
}
|
|
|
|
.metric-box.cpu {
|
|
background: linear-gradient(135deg, rgba(88, 166, 255, 0.15) 0%, rgba(88, 166, 255, 0.05) 100%);
|
|
border-color: rgba(88, 166, 255, 0.3);
|
|
}
|
|
|
|
.metric-box.memory {
|
|
background: linear-gradient(135deg, rgba(163, 113, 247, 0.15) 0%, rgba(163, 113, 247, 0.05) 100%);
|
|
border-color: rgba(163, 113, 247, 0.3);
|
|
}
|
|
|
|
.metric-box.disk {
|
|
background: linear-gradient(135deg, rgba(63, 185, 80, 0.15) 0%, rgba(63, 185, 80, 0.05) 100%);
|
|
border-color: rgba(63, 185, 80, 0.3);
|
|
}
|
|
|
|
.metric-label {
|
|
font-size: 0.75rem;
|
|
color: var(--text-secondary);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
margin-bottom: var(--space-xs);
|
|
}
|
|
|
|
.metric-value {
|
|
font-size: 1.75rem;
|
|
font-weight: 700;
|
|
color: var(--text-primary);
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.metric-box.cpu .metric-value {
|
|
color: var(--accent-blue);
|
|
}
|
|
|
|
.metric-box.memory .metric-value {
|
|
color: var(--accent-purple);
|
|
}
|
|
|
|
.metric-box.disk .metric-value {
|
|
color: var(--accent-green);
|
|
}
|
|
|
|
.metric-subvalue {
|
|
font-size: 0.75rem;
|
|
color: var(--text-secondary);
|
|
margin-top: var(--space-xs);
|
|
}
|
|
|
|
.metric-box canvas {
|
|
max-height: 35px !important;
|
|
margin-top: var(--space-sm);
|
|
}
|
|
|
|
/* Metric animation on update */
|
|
.metric-box.updating {
|
|
animation: metricPulse 0.3s ease;
|
|
}
|
|
|
|
@keyframes metricPulse {
|
|
0% { transform: scale(1); }
|
|
50% { transform: scale(1.02); }
|
|
100% { transform: scale(1); }
|
|
}
|
|
|
|
/* ===========================================
|
|
VM STATS
|
|
=========================================== */
|
|
|
|
.vm-stats {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: var(--space-sm);
|
|
margin: var(--space-md) 0;
|
|
}
|
|
|
|
.stat-item {
|
|
background: var(--bg-tertiary);
|
|
padding: var(--space-sm) var(--space-md);
|
|
border-radius: var(--radius-sm);
|
|
border: 1px solid var(--border-muted);
|
|
}
|
|
|
|
.stat-label {
|
|
font-size: 0.75rem;
|
|
color: var(--text-tertiary);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.3px;
|
|
}
|
|
|
|
.stat-value {
|
|
font-size: 0.95rem;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
margin-top: var(--space-xs);
|
|
}
|
|
|
|
/* ===========================================
|
|
VM ACTIONS
|
|
=========================================== */
|
|
|
|
.vm-actions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: var(--space-sm);
|
|
margin-top: var(--space-md);
|
|
padding-top: var(--space-md);
|
|
border-top: 1px solid var(--border-muted);
|
|
}
|
|
|
|
.vm-actions .btn {
|
|
flex: 1 1 auto;
|
|
min-width: 100px;
|
|
}
|
|
|
|
.vm-actions .btn-icon {
|
|
min-width: auto;
|
|
padding: var(--space-sm);
|
|
}
|
|
|
|
/* Action button states */
|
|
.vm-actions .btn.loading {
|
|
pointer-events: none;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.vm-actions .btn.loading::after {
|
|
content: '';
|
|
width: 14px;
|
|
height: 14px;
|
|
border: 2px solid transparent;
|
|
border-top-color: currentColor;
|
|
border-radius: 50%;
|
|
animation: spin 0.8s linear infinite;
|
|
margin-left: var(--space-sm);
|
|
}
|
|
|
|
/* ===========================================
|
|
HISTORICAL CHARTS
|
|
=========================================== */
|
|
|
|
.metrics-historical {
|
|
margin-top: var(--space-md);
|
|
padding-top: var(--space-md);
|
|
border-top: 1px solid var(--border-muted);
|
|
}
|
|
|
|
.chart-controls {
|
|
display: flex;
|
|
gap: var(--space-xs);
|
|
margin-bottom: var(--space-md);
|
|
}
|
|
|
|
.chart-btn {
|
|
padding: var(--space-xs) var(--space-sm);
|
|
background: var(--bg-tertiary);
|
|
border: 1px solid var(--border-default);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text-secondary);
|
|
font-size: 0.75rem;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
.chart-btn:hover {
|
|
background: var(--bg-hover);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.chart-btn.active {
|
|
background: var(--accent-blue);
|
|
border-color: var(--accent-blue);
|
|
color: #ffffff;
|
|
}
|
|
|
|
.chart-container {
|
|
height: 150px;
|
|
position: relative;
|
|
}
|
|
|
|
/* ===========================================
|
|
BACKUP & SNAPSHOT LISTS
|
|
=========================================== */
|
|
|
|
.backup-list,
|
|
.snapshot-list {
|
|
margin-top: var(--space-md);
|
|
max-height: 300px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.backup-item,
|
|
.snapshot-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: var(--space-md);
|
|
background: var(--bg-tertiary);
|
|
border: 1px solid var(--border-muted);
|
|
border-radius: var(--radius-md);
|
|
margin-bottom: var(--space-sm);
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
.backup-item:hover,
|
|
.snapshot-item:hover {
|
|
border-color: var(--border-default);
|
|
background: var(--bg-hover);
|
|
}
|
|
|
|
.backup-info,
|
|
.snapshot-info {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.backup-name,
|
|
.snapshot-name {
|
|
font-weight: 500;
|
|
color: var(--text-primary);
|
|
font-size: 0.9rem;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.backup-date,
|
|
.snapshot-date {
|
|
font-size: 0.8rem;
|
|
color: var(--text-secondary);
|
|
margin-top: var(--space-xs);
|
|
}
|
|
|
|
.backup-size {
|
|
font-size: 0.85rem;
|
|
color: var(--accent-blue);
|
|
font-weight: 600;
|
|
margin-right: var(--space-md);
|
|
}
|
|
|
|
/* ===========================================
|
|
EMPTY STATE
|
|
=========================================== */
|
|
|
|
.no-vms {
|
|
text-align: center;
|
|
padding: var(--space-2xl);
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.no-vms-icon {
|
|
font-size: 4rem;
|
|
margin-bottom: var(--space-md);
|
|
opacity: 0.5;
|
|
}
|
|
|
|
.no-vms h2 {
|
|
color: var(--text-primary);
|
|
margin-bottom: var(--space-sm);
|
|
}
|
|
|
|
.no-vms p {
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
/* ===========================================
|
|
DASHBOARD HEADER
|
|
=========================================== */
|
|
|
|
.dashboard-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: var(--space-lg);
|
|
}
|
|
|
|
.dashboard-header h1 {
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.dashboard-header .subtitle {
|
|
color: var(--text-secondary);
|
|
font-size: 0.9rem;
|
|
margin-top: var(--space-xs);
|
|
}
|
|
|
|
/* ===========================================
|
|
OVERVIEW STATS GRID
|
|
=========================================== */
|
|
|
|
.stats-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: var(--space-md);
|
|
margin-bottom: var(--space-xl);
|
|
}
|
|
|
|
.stat-card {
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border-default);
|
|
border-radius: var(--radius-lg);
|
|
padding: var(--space-lg);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-md);
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
.stat-card:hover {
|
|
border-color: var(--border-muted);
|
|
transform: translateY(-2px);
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
.stat-card .stat-icon {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: var(--radius-md);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 1.5rem;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.stat-card.stat-total .stat-icon {
|
|
background: rgba(88, 166, 255, 0.15);
|
|
}
|
|
|
|
.stat-card.stat-running .stat-icon {
|
|
background: rgba(63, 185, 80, 0.15);
|
|
}
|
|
|
|
.stat-card.stat-stopped .stat-icon {
|
|
background: rgba(248, 81, 73, 0.15);
|
|
}
|
|
|
|
.stat-card.stat-cpu .stat-icon {
|
|
background: rgba(163, 113, 247, 0.15);
|
|
}
|
|
|
|
.stat-card .stat-content {
|
|
flex: 1;
|
|
}
|
|
|
|
.stat-card .stat-value {
|
|
font-size: 1.75rem;
|
|
font-weight: 700;
|
|
color: var(--text-primary);
|
|
line-height: 1;
|
|
}
|
|
|
|
.stat-card .stat-label {
|
|
font-size: 0.85rem;
|
|
color: var(--text-secondary);
|
|
margin-top: var(--space-xs);
|
|
}
|
|
|
|
/* ===========================================
|
|
VM OVERVIEW LIST
|
|
=========================================== */
|
|
|
|
.vm-overview-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.vm-overview-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: var(--space-md);
|
|
background: var(--bg-tertiary);
|
|
border: 1px solid var(--border-muted);
|
|
border-radius: var(--radius-md);
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
.vm-overview-item:hover {
|
|
background: var(--bg-hover);
|
|
border-color: var(--border-default);
|
|
}
|
|
|
|
.vm-overview-info {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-md);
|
|
}
|
|
|
|
.vm-overview-name {
|
|
font-weight: 500;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.vm-overview-id {
|
|
font-size: 0.8rem;
|
|
color: var(--text-secondary);
|
|
font-family: var(--font-mono);
|
|
}
|
|
|
|
.vm-overview-metrics {
|
|
display: flex;
|
|
gap: var(--space-lg);
|
|
align-items: center;
|
|
}
|
|
|
|
.vm-overview-metric {
|
|
text-align: right;
|
|
}
|
|
|
|
.vm-overview-metric-value {
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.vm-overview-metric-label {
|
|
font-size: 0.75rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.vm-overview-actions {
|
|
display: flex;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
/* ===========================================
|
|
RESPONSIVE ADJUSTMENTS
|
|
=========================================== */
|
|
|
|
@media (max-width: 768px) {
|
|
.metrics-realtime {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.vm-actions {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.vm-actions .btn {
|
|
width: 100%;
|
|
}
|
|
|
|
.stats-grid {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
|
|
.vm-overview-metrics {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.stats-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.dashboard-header {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: var(--space-md);
|
|
}
|
|
}
|