Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

Redesign dashboard layout and improve database tab UX

Juan Denisbd788cbbf638
diff --git a/frontend/dist/index.html b/frontend/dist/index.html
index 15412e89..4fc4e5e1 100644
--- a/frontend/dist/index.html
+++ b/frontend/dist/index.html
@@ -6,8 +6,8 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>React Dashboard Template</title>
- <script type="module" crossorigin src="/assets/index-D2kW3a5a.js"></script>
- <link rel="stylesheet" crossorigin href="/assets/index-B1Vn4ZuG.css">
+ <script type="module" crossorigin src="/assets/index-CF9Rh04R.js"></script>
+ <link rel="stylesheet" crossorigin href="/assets/index-DK1JjzI7.css">
</head>
<body>
diff --git a/frontend/src/pages/Dashboard.jsx b/frontend/src/pages/Dashboard.jsx
index c3f88d0a..8b729b8b 100644
--- a/frontend/src/pages/Dashboard.jsx
+++ b/frontend/src/pages/Dashboard.jsx
@@ -4,11 +4,10 @@ import {
Cpu, MemoryStick, HardDrive, Server,
Plus, RefreshCw, Activity, Layers,
Database, Globe, Container, Code,
- ArrowRight
+ ArrowRight, Clock, CheckCircle
} from 'lucide-react';
import api from '../services/api';
import { useMetrics } from '../hooks/useMetrics';
-import UptimeGraph from '../components/UptimeGraph';
const Dashboard = () => {
const navigate = useNavigate();
@@ -16,6 +15,7 @@ const Dashboard = () => {
const [apps, setApps] = useState([]);
const [services, setServices] = useState([]);
const [dbStatus, setDbStatus] = useState(null);
+ const [uptime, setUptime] = useState(null);
const [loading, setLoading] = useState(true);
useEffect(() => {
@@ -24,14 +24,16 @@ const Dashboard = () => {
async function loadData() {
try {
- const [appsData, servicesData, dbData] = await Promise.all([
+ const [appsData, servicesData, dbData, uptimeData] = await Promise.all([
api.getApps(),
api.getServicesStatus().catch(() => ({ services: [] })),
- api.getDatabasesStatus().catch(() => null)
+ api.getDatabasesStatus().catch(() => null),
+ api.getCurrentUptime().catch(() => null)
]);
setApps(appsData.apps || []);
setServices(servicesData.services || []);
setDbStatus(dbData);
+ setUptime(uptimeData);
} catch (err) {
console.error('Failed to load data:', err);
} finally {
@@ -74,17 +76,19 @@ const Dashboard = () => {
const runningApps = apps.filter(a => a.status === 'running').length;
const runningServices = services.filter(s => s.status === 'running').length;
+ const uptimeFormatted = uptime?.uptime_formatted || { days: 0, hours: 0, minutes: 0, seconds: 0 };
+
if (loading && metricsLoading) {
return <div className="loading">Loading dashboard...</div>;
}
return (
- <div>
+ <div className="dashboard-page">
<header className="top-bar">
<div>
<h1>Dashboard</h1>
<div className="subtitle">
- Overview of your server status and applications
+ Server overview
{connected && <span className="live-indicator"> Live</span>}
</div>
</div>
@@ -95,29 +99,54 @@ const Dashboard = () => {
</button>
<button className="btn btn-primary" onClick={() => navigate('/apps')}>
<Plus size={16} />
- New Application
+ New App
</button>
</div>
</header>
- {/* Uptime Graph */}
- <UptimeGraph />
+ {/* Server Status Bar */}
+ <div className="server-status-bar">
+ <div className="status-bar-left">
+ <div className="server-status-indicator">
+ <CheckCircle size={18} className="status-icon-ok" />
+ <span className="status-text">Operational</span>
+ </div>
+ {uptime && (
+ <div className="uptime-inline">
+ <Clock size={14} />
+ <span>
+ {uptimeFormatted.days}d {String(uptimeFormatted.hours).padStart(2, '0')}h {String(uptimeFormatted.minutes).padStart(2, '0')}m
+ </span>
+ </div>
+ )}
+ </div>
+ <div className="status-bar-right">
+ <div className="status-bar-stat">
+ <span className="stat-label">Apps</span>
+ <span className="stat-value">{runningApps}/{apps.length}</span>
+ </div>
+ <div className="status-bar-stat">
+ <span className="stat-label">Services</span>
+ <span className="stat-value">{runningServices}/{services.length}</span>
+ </div>
+ </div>
+ </div>
{/* System Metrics */}
{metrics && (
- <div className="system-metrics">
+ <div className="metrics-grid">
<div className="metric-card">
<div className="metric-header">
- <h4>CPU Usage</h4>
- <Cpu size={18} className="metric-icon" />
+ <Cpu size={16} className="metric-icon" />
+ <span>CPU</span>
</div>
- <div className="metric-main">
- <span className="metric-value">{metrics.cpu?.percent || 0}</span>
- <span className="metric-unit">%</span>
+ <div className="metric-value-row">
+ <span className="metric-value">{metrics.cpu?.percent || 0}%</span>
+ <span className="metric-detail">{metrics.cpu?.cores} cores</span>
</div>
- <div className="progress-bar">
+ <div className="metric-bar">
<div
- className="progress-fill"
+ className="metric-bar-fill"
style={{
width: `${metrics.cpu?.percent || 0}%`,
background: (metrics.cpu?.percent || 0) > 80 ? 'var(--danger)' :
@@ -125,214 +154,194 @@ const Dashboard = () => {
}}
/>
</div>
- <div className="metric-sub">{metrics.cpu?.cores} cores @ {metrics.cpu?.frequency_mhz} MHz</div>
</div>
<div className="metric-card">
<div className="metric-header">
- <h4>Memory</h4>
- <MemoryStick size={18} className="metric-icon" />
+ <MemoryStick size={16} className="metric-icon" />
+ <span>Memory</span>
</div>
- <div className="metric-main">
- <span className="metric-value">{metrics.memory?.ram?.percent || 0}</span>
- <span className="metric-unit">%</span>
+ <div className="metric-value-row">
+ <span className="metric-value">{metrics.memory?.ram?.percent || 0}%</span>
+ <span className="metric-detail">{metrics.memory?.ram?.used_human} / {metrics.memory?.ram?.total_human}</span>
</div>
- <div className="progress-bar">
+ <div className="metric-bar">
<div
- className="progress-fill"
+ className="metric-bar-fill"
style={{
width: `${metrics.memory?.ram?.percent || 0}%`,
- background: 'var(--accent-primary)'
+ background: (metrics.memory?.ram?.percent || 0) > 90 ? 'var(--danger)' : 'var(--accent-primary)'
}}
/>
</div>
- <div className="metric-sub">
- {metrics.memory?.ram?.used_human} / {metrics.memory?.ram?.total_human}
- </div>
</div>
<div className="metric-card">
<div className="metric-header">
- <h4>Disk Space</h4>
- <HardDrive size={18} className="metric-icon" />
+ <HardDrive size={16} className="metric-icon" />
+ <span>Disk</span>
</div>
- <div className="metric-main">
- <span className="metric-value">{metrics.disk?.partitions?.[0]?.percent || 0}</span>
- <span className="metric-unit">%</span>
+ <div className="metric-value-row">
+ <span className="metric-value">{metrics.disk?.partitions?.[0]?.percent || 0}%</span>
+ <span className="metric-detail">{metrics.disk?.partitions?.[0]?.used_human} / {metrics.disk?.partitions?.[0]?.total_human}</span>
</div>
- <div className="progress-bar">
+ <div className="metric-bar">
<div
- className="progress-fill"
+ className="metric-bar-fill"
style={{
width: `${metrics.disk?.partitions?.[0]?.percent || 0}%`,
background: (metrics.disk?.partitions?.[0]?.percent || 0) > 90 ? 'var(--danger)' : 'var(--accent-primary)'
}}
/>
</div>
- <div className="metric-sub">
- {metrics.disk?.partitions?.[0]?.used_human} / {metrics.disk?.partitions?.[0]?.total_human}
- </div>
</div>
<div className="metric-card">
<div className="metric-header">
- <h4>Network I/O</h4>
- <Activity size={18} className="metric-icon" />
+ <Activity size={16} className="metric-icon" />
+ <span>Network</span>
</div>
- <div className="metric-main">
- <span className="metric-value" style={{ fontSize: '18px' }}>
- {metrics.network?.io?.bytes_sent_human || '0B'}
- </span>
- <span className="metric-unit">sent</span>
+ <div className="metric-value-row">
+ <span className="metric-value">{metrics.network?.io?.bytes_sent_human || '0B'}</span>
+ <span className="metric-detail">sent</span>
</div>
- <div className="metric-sub">
- Received: {metrics.network?.io?.bytes_recv_human || '0B'}
+ <div className="metric-sub-value">
+ Recv: {metrics.network?.io?.bytes_recv_human || '0B'}
</div>
</div>
</div>
)}
- {/* Quick Actions */}
- <h2 className="section-title">Quick Actions</h2>
- <div className="quick-actions">
- <div className="quick-action-card" onClick={() => navigate('/apps')}>
- <div className="action-icon">
- <Layers size={24} />
- </div>
- <h4>Applications</h4>
- <p>{runningApps} of {apps.length} running</p>
- </div>
- <div className="quick-action-card" onClick={() => navigate('/docker')}>
- <div className="action-icon">
- <Container size={24} />
- </div>
- <h4>Docker</h4>
- <p>Manage containers</p>
- </div>
- <div className="quick-action-card" onClick={() => navigate('/databases')}>
- <div className="action-icon">
- <Database size={24} />
- </div>
- <h4>Databases</h4>
- <p>MySQL & PostgreSQL</p>
- </div>
- <div className="quick-action-card" onClick={() => navigate('/domains')}>
- <div className="action-icon">
- <Globe size={24} />
- </div>
- <h4>Domains</h4>
- <p>Manage sites</p>
- </div>
- </div>
-
- {/* Services Status */}
- {services.length > 0 && (
- <>
- <h2 className="section-title">Services</h2>
- <div className="services-grid">
- {services.map(service => (
- <div key={service.name} className="service-item">
- <span className={`service-dot ${service.status === 'running' ? 'running' : 'stopped'}`} />
- <span className="service-name">{service.name}</span>
- <span className="service-status">{service.status}</span>
+ {/* Two Column Layout */}
+ <div className="dashboard-columns">
+ {/* Left Column - Services & Databases */}
+ <div className="dashboard-column">
+ {/* Services */}
+ {services.length > 0 && (
+ <div className="dashboard-card">
+ <div className="card-title">
+ <Server size={16} />
+ Services
</div>
- ))}
- </div>
- </>
- )}
-
- {/* Database Status */}
- {dbStatus && (
- <>
- <h2 className="section-title" style={{ marginTop: '32px' }}>Database Servers</h2>
- <div className="db-status">
- <div className="db-status-item">
- <div className="status-icon mysql">M</div>
- <div className="status-info">
- <h3>MySQL / MariaDB</h3>
- <span className={dbStatus.mysql?.running ? 'running' : 'stopped'}>
- {dbStatus.mysql?.running ? 'Running' : 'Stopped'}
- {dbStatus.mysql?.version && ` - ${dbStatus.mysql.version}`}
- </span>
+ <div className="services-list">
+ {services.map(service => (
+ <div key={service.name} className="service-row">
+ <span className={`status-dot ${service.status === 'running' ? 'running' : 'stopped'}`} />
+ <span className="service-name">{service.name}</span>
+ <span className={`service-status ${service.status}`}>{service.status}</span>
+ </div>
+ ))}
</div>
</div>
- <div className="db-status-item">
- <div className="status-icon postgresql">P</div>
- <div className="status-info">
- <h3>PostgreSQL</h3>
- <span className={dbStatus.postgresql?.running ? 'running' : 'stopped'}>
- {dbStatus.postgresql?.running ? 'Running' : 'Stopped'}
- {dbStatus.postgresql?.version && ` - ${dbStatus.postgresql.version}`}
- </span>
+ )}
+
+ {/* Database Status */}
+ {dbStatus && (
+ <div className="dashboard-card">
+ <div className="card-title">
+ <Database size={16} />
+ Databases
+ </div>
+ <div className="db-list">
+ <div className="db-row">
+ <div className="db-icon mysql">M</div>
+ <span className="db-name">MySQL</span>
+ <span className={`db-status ${dbStatus.mysql?.running ? 'running' : 'stopped'}`}>
+ {dbStatus.mysql?.running ? 'Running' : 'Stopped'}
+ </span>
+ </div>
+ <div className="db-row">
+ <div className="db-icon postgres">P</div>
+ <span className="db-name">PostgreSQL</span>
+ <span className={`db-status ${dbStatus.postgresql?.running ? 'running' : 'stopped'}`}>
+ {dbStatus.postgresql?.running ? 'Running' : 'Stopped'}
+ </span>
+ </div>
</div>
</div>
+ )}
+
+ {/* Quick Actions */}
+ <div className="dashboard-card">
+ <div className="card-title">Quick Actions</div>
+ <div className="quick-links">
+ <button className="quick-link" onClick={() => navigate('/apps')}>
+ <Layers size={16} />
+ Applications
+ </button>
+ <button className="quick-link" onClick={() => navigate('/docker')}>
+ <Container size={16} />
+ Docker
+ </button>
+ <button className="quick-link" onClick={() => navigate('/databases')}>
+ <Database size={16} />
+ Databases
+ </button>
+ <button className="quick-link" onClick={() => navigate('/domains')}>
+ <Globe size={16} />
+ Domains
+ </button>
+ </div>
</div>
- </>
- )}
+ </div>
- {/* Active Projects */}
- <div className="section-header" style={{ marginTop: '32px' }}>
- <h2 className="section-title" style={{ marginBottom: 0 }}>Active Projects</h2>
- <button className="btn btn-secondary btn-sm" onClick={() => navigate('/apps')}>
- View All <ArrowRight size={14} />
- </button>
- </div>
+ {/* Right Column - Applications */}
+ <div className="dashboard-column dashboard-column-wide">
+ <div className="dashboard-card">
+ <div className="card-title-row">
+ <div className="card-title">
+ <Layers size={16} />
+ Applications
+ </div>
+ <button className="btn btn-sm btn-link" onClick={() => navigate('/apps')}>
+ View All <ArrowRight size={14} />
+ </button>
+ </div>
- {apps.length === 0 ? (
- <div className="empty-state">
- <Layers size={48} />
- <h3>No applications yet</h3>
- <p>Create your first application to get started.</p>
- <button className="btn btn-primary" onClick={() => navigate('/apps')}>
- <Plus size={16} />
- Create Application
- </button>
- </div>
- ) : (
- <div className="dashboard-grid">
- {apps.slice(0, 6).map(app => (
- <div key={app.id} className="card" onClick={() => navigate(`/apps/${app.id}`)}>
- <div className="card-header">
- <div className="app-icon" style={{ background: getStackColor(app.app_type) }}>
- {getStackIcon(app.app_type)}
- </div>
- <div className={`status-badge ${getStatusClass(app.status)}`}>
- <div className="status-dot" />
- {app.status.charAt(0).toUpperCase() + app.status.slice(1)}
- </div>
+ {apps.length === 0 ? (
+ <div className="empty-apps">
+ <Layers size={32} className="empty-icon" />
+ <p>No applications yet</p>
+ <button className="btn btn-primary btn-sm" onClick={() => navigate('/apps')}>
+ <Plus size={14} />
+ Create App
+ </button>
</div>
- <h3>{app.name}</h3>
- {app.domains && app.domains[0] && (
- <a
- href={`https://${app.domains[0].name}`}
- className="card-link"
- target="_blank"
- rel="noopener noreferrer"
- onClick={e => e.stopPropagation()}
- >
- {app.domains[0].name}
- </a>
- )}
- <div className="metric-row">
- <div className="metric-item">
- <span>Stack</span>
- <span className="metric-value" style={{ color: getStackColor(app.app_type) }}>
- {app.app_type.toUpperCase()}
- {app.php_version && ` / PHP ${app.php_version}`}
- {app.python_version && ` / Py ${app.python_version}`}
- </span>
+ ) : (
+ <div className="apps-table">
+ <div className="apps-table-header">
+ <span>Name</span>
+ <span>Type</span>
+ <span>Status</span>
+ <span>Domain</span>
</div>
- {app.port && (
- <div className="metric-item">
- <span>Port</span>
- <span className="metric-value">{app.port}</span>
+ {apps.slice(0, 8).map(app => (
+ <div
+ key={app.id}
+ className="apps-table-row"
+ onClick={() => navigate(`/apps/${app.id}`)}
+ >
+ <span className="app-name">
+ <div className="app-icon-small" style={{ background: getStackColor(app.app_type) }}>
+ {getStackIcon(app.app_type)}
+ </div>
+ {app.name}
+ </span>
+ <span className="app-type">{app.app_type}</span>
+ <span className={`app-status ${getStatusClass(app.status)}`}>
+ <span className="status-dot" />
+ {app.status}
+ </span>
+ <span className="app-domain">
+ {app.domains?.[0]?.name || '-'}
+ </span>
</div>
- )}
+ ))}
</div>
- </div>
- ))}
+ )}
+ </div>
</div>
- )}
+ </div>
</div>
);
};
diff --git a/frontend/src/pages/Databases.jsx b/frontend/src/pages/Databases.jsx
index 7306589f..1338886a 100644
--- a/frontend/src/pages/Databases.jsx
+++ b/frontend/src/pages/Databases.jsx
@@ -57,14 +57,12 @@ const Databases = () => {
<button
className={`tab ${activeTab === 'mysql' ? 'active' : ''}`}
onClick={() => setActiveTab('mysql')}
- disabled={!status?.mysql?.installed}
>
MySQL / MariaDB
</button>
<button
className={`tab ${activeTab === 'postgresql' ? 'active' : ''}`}
onClick={() => setActiveTab('postgresql')}
- disabled={!status?.postgresql?.installed}
>
PostgreSQL
</button>
@@ -165,6 +163,15 @@ const MySQLTab = ({ status }) => {
}
}
+ if (!status?.installed) {
+ return (
+ <div className="empty-state">
+ <h3>MySQL is not installed</h3>
+ <p>Install MySQL or MariaDB on your server to manage databases.</p>
+ </div>
+ );
+ }
+
if (!status?.running) {
return (
<div className="empty-state">
@@ -407,6 +414,15 @@ const PostgreSQLTab = ({ status }) => {
}
}
+ if (!status?.installed) {
+ return (
+ <div className="empty-state">
+ <h3>PostgreSQL is not installed</h3>
+ <p>Install PostgreSQL on your server to manage databases.</p>
+ </div>
+ );
+ }
+
if (!status?.running) {
return (
<div className="empty-state">
diff --git a/frontend/src/styles/pages/_dashboard.less b/frontend/src/styles/pages/_dashboard.less
index 59f15f07..55b6dbbe 100644
--- a/frontend/src/styles/pages/_dashboard.less
+++ b/frontend/src/styles/pages/_dashboard.less
@@ -1,13 +1,87 @@
// ============================================
-// DASHBOARD PAGE
+// DASHBOARD PAGE - Clean Layout
// ============================================
-// Dashboard-specific stat cards
-.dashboard-stats {
+.dashboard-page {
+ display: flex;
+ flex-direction: column;
+ gap: @space-5;
+}
+
+// Server Status Bar
+.server-status-bar {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: @space-3 @space-5;
+ background: @bg-card;
+ border: 1px solid @border-subtle;
+ border-radius: @radius-lg;
+}
+
+.status-bar-left {
+ display: flex;
+ align-items: center;
+ gap: @space-6;
+}
+
+.server-status-indicator {
+ display: flex;
+ align-items: center;
+ gap: @space-2;
+
+ .status-icon-ok {
+ color: @success;
+ }
+
+ .status-text {
+ font-weight: @font-weight-semibold;
+ color: @text-primary;
+ }
+}
+
+.uptime-inline {
+ display: flex;
+ align-items: center;
+ gap: @space-2;
+ color: @text-secondary;
+ font-size: @font-size-sm;
+ padding-left: @space-6;
+ border-left: 1px solid @border-subtle;
+
+ svg {
+ color: @text-tertiary;
+ }
+}
+
+.status-bar-right {
+ display: flex;
+ align-items: center;
+ gap: @space-6;
+}
+
+.status-bar-stat {
+ display: flex;
+ align-items: center;
+ gap: @space-2;
+
+ .stat-label {
+ font-size: @font-size-sm;
+ color: @text-tertiary;
+ }
+
+ .stat-value {
+ font-size: @font-size-sm;
+ font-weight: @font-weight-semibold;
+ color: @text-primary;
+ }
+}
+
+// Metrics Grid - Compact
+.metrics-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
- gap: @space-6;
- margin-bottom: @space-8;
+ gap: @space-4;
@media (max-width: @breakpoint-xl) {
grid-template-columns: repeat(2, 1fr);
@@ -18,178 +92,454 @@
}
}
-// System metrics cards (enhanced)
-.system-metrics {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
- gap: @space-6;
- margin-bottom: @space-8;
-}
-
.metric-card {
- .card-base();
- padding: @space-5;
+ background: @bg-card;
+ border: 1px solid @border-subtle;
+ border-radius: @radius-lg;
+ padding: @space-4;
.metric-header {
- .flex-between();
- margin-bottom: @space-4;
+ display: flex;
+ align-items: center;
+ gap: @space-2;
+ margin-bottom: @space-3;
- h4 {
- font-size: @font-size-sm;
+ .metric-icon {
color: @text-tertiary;
- text-transform: uppercase;
- font-weight: @font-weight-semibold;
}
- .metric-icon {
+ span {
+ font-size: @font-size-sm;
color: @text-tertiary;
+ font-weight: @font-weight-medium;
}
}
- .metric-main {
- .flex-start();
- gap: @space-3;
- margin-bottom: @space-3;
+ .metric-value-row {
+ display: flex;
+ align-items: baseline;
+ justify-content: space-between;
+ margin-bottom: @space-2;
.metric-value {
- font-size: @font-size-2xl + 4;
+ font-size: @font-size-xl;
font-weight: @font-weight-bold;
color: @text-primary;
- line-height: 1;
}
- .metric-unit {
- font-size: @font-size-base;
+ .metric-detail {
+ font-size: @font-size-xs;
color: @text-tertiary;
- align-self: flex-end;
- margin-bottom: @space-1;
}
}
- .metric-sub {
- font-size: @font-size-sm;
- color: @text-secondary;
+ .metric-bar {
+ height: 4px;
+ background: @bg-hover;
+ border-radius: @radius-full;
+ overflow: hidden;
+
+ .metric-bar-fill {
+ height: 100%;
+ border-radius: @radius-full;
+ transition: width 0.3s ease;
+ }
+ }
+
+ .metric-sub-value {
+ font-size: @font-size-xs;
+ color: @text-tertiary;
+ margin-top: @space-2;
}
}
-// Quick actions grid
-.quick-actions {
+// Two Column Layout
+.dashboard-columns {
display: grid;
- grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
+ grid-template-columns: 320px 1fr;
+ gap: @space-5;
+
+ @media (max-width: @breakpoint-lg) {
+ grid-template-columns: 1fr;
+ }
+}
+
+.dashboard-column {
+ display: flex;
+ flex-direction: column;
gap: @space-4;
- margin-bottom: @space-8;
}
-.quick-action-card {
- .card-interactive();
- padding: @space-5;
- text-align: center;
+.dashboard-column-wide {
+ min-width: 0;
+}
- .action-icon {
- .icon-box(48px);
- background: @accent-glow;
- color: @accent-primary;
- margin: 0 auto @space-4;
- border-radius: @radius-xl;
- }
+// Dashboard Cards
+.dashboard-card {
+ background: @bg-card;
+ border: 1px solid @border-subtle;
+ border-radius: @radius-lg;
+ padding: @space-4;
- h4 {
- font-size: @font-size-base;
+ .card-title {
+ display: flex;
+ align-items: center;
+ gap: @space-2;
+ font-size: @font-size-sm;
font-weight: @font-weight-semibold;
- margin-bottom: @space-1;
+ color: @text-primary;
+ margin-bottom: @space-3;
+
+ svg {
+ color: @text-tertiary;
+ }
}
- p {
+ .card-title-row {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: @space-3;
+
+ .card-title {
+ margin-bottom: 0;
+ }
+ }
+}
+
+// Services List
+.services-list {
+ display: flex;
+ flex-direction: column;
+ gap: @space-2;
+}
+
+.service-row {
+ display: flex;
+ align-items: center;
+ gap: @space-3;
+ padding: @space-2 0;
+
+ &:not(:last-child) {
+ border-bottom: 1px solid @border-subtle;
+ }
+
+ .status-dot {
+ width: 8px;
+ height: 8px;
+ border-radius: 50%;
+ background: @text-tertiary;
+ flex-shrink: 0;
+
+ &.running {
+ background: @success;
+ }
+
+ &.stopped {
+ background: @danger;
+ }
+ }
+
+ .service-name {
+ flex: 1;
font-size: @font-size-sm;
+ color: @text-primary;
+ }
+
+ .service-status {
+ font-size: @font-size-xs;
color: @text-tertiary;
+ text-transform: capitalize;
+
+ &.running {
+ color: @success;
+ }
+
+ &.stopped {
+ color: @danger;
+ }
}
}
-// Recent activity
-.activity-list {
- .flex-column-gap(@space-3);
+// Database List
+.db-list {
+ display: flex;
+ flex-direction: column;
+ gap: @space-2;
}
-.activity-item {
- .flex-start();
- gap: @space-4;
- padding: @space-3 0;
- border-bottom: 1px solid @border-subtle;
+.db-row {
+ display: flex;
+ align-items: center;
+ gap: @space-3;
+ padding: @space-2 0;
+
+ &:not(:last-child) {
+ border-bottom: 1px solid @border-subtle;
+ }
+
+ .db-icon {
+ width: 24px;
+ height: 24px;
+ border-radius: @radius-sm;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: @font-size-xs;
+ font-weight: @font-weight-bold;
+ color: white;
+ flex-shrink: 0;
- &:last-child {
- border-bottom: none;
+ &.mysql {
+ background: #00758f;
+ }
+
+ &.postgres {
+ background: #336791;
+ }
+ }
+
+ .db-name {
+ flex: 1;
+ font-size: @font-size-sm;
+ color: @text-primary;
+ }
+
+ .db-status {
+ font-size: @font-size-xs;
+ color: @text-tertiary;
+
+ &.running {
+ color: @success;
+ }
+
+ &.stopped {
+ color: @danger;
+ }
}
}
-.activity-icon {
- .icon-box(36px);
- background: @bg-hover;
- border-radius: @radius-lg;
+// Quick Links
+.quick-links {
+ display: flex;
+ flex-direction: column;
+ gap: @space-2;
+}
+
+.quick-link {
+ display: flex;
+ align-items: center;
+ gap: @space-3;
+ padding: @space-2 @space-3;
+ background: transparent;
+ border: none;
+ border-radius: @radius-md;
color: @text-secondary;
- flex-shrink: 0;
+ font-size: @font-size-sm;
+ cursor: pointer;
+ transition: all @transition-fast;
+ text-align: left;
- &.success {
- background: @success-bg;
- color: @success;
+ svg {
+ color: @text-tertiary;
+ flex-shrink: 0;
}
- &.warning {
- background: @warning-bg;
- color: @warning;
- }
+ &:hover {
+ background: @bg-hover;
+ color: @text-primary;
- &.error {
- background: @danger-bg;
- color: @danger;
+ svg {
+ color: @accent-primary;
+ }
}
}
-.activity-content {
- flex: 1;
- min-width: 0;
+// Applications Table
+.apps-table {
+ display: flex;
+ flex-direction: column;
+}
- p {
- font-size: @font-size-sm + 1;
+.apps-table-header {
+ display: grid;
+ grid-template-columns: 2fr 1fr 1fr 1.5fr;
+ gap: @space-4;
+ padding: @space-2 @space-3;
+ font-size: @font-size-xs;
+ color: @text-tertiary;
+ text-transform: uppercase;
+ letter-spacing: 0.5px;
+ border-bottom: 1px solid @border-subtle;
+}
+
+.apps-table-row {
+ display: grid;
+ grid-template-columns: 2fr 1fr 1fr 1.5fr;
+ gap: @space-4;
+ padding: @space-3;
+ align-items: center;
+ cursor: pointer;
+ border-radius: @radius-md;
+ transition: background @transition-fast;
+
+ &:hover {
+ background: @bg-hover;
+ }
+
+ .app-name {
+ display: flex;
+ align-items: center;
+ gap: @space-3;
+ font-size: @font-size-sm;
+ font-weight: @font-weight-medium;
color: @text-primary;
- margin-bottom: @space-1;
}
- span {
+ .app-icon-small {
+ width: 28px;
+ height: 28px;
+ border-radius: @radius-md;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-shrink: 0;
+
+ svg {
+ width: 14px;
+ height: 14px;
+ color: white;
+ }
+ }
+
+ .app-type {
font-size: @font-size-sm;
- color: @text-tertiary;
+ color: @text-secondary;
+ text-transform: capitalize;
}
-}
-// Server uptime display
-.uptime-display {
- .flex-start();
- gap: @space-6;
- padding: @space-5;
- background: @bg-card;
- border: 1px solid @border-subtle;
- border-radius: @radius-xl;
- margin-bottom: @space-6;
+ .app-status {
+ display: flex;
+ align-items: center;
+ gap: @space-2;
+ font-size: @font-size-sm;
+ text-transform: capitalize;
+
+ .status-dot {
+ width: 6px;
+ height: 6px;
+ border-radius: 50%;
+ background: @text-tertiary;
+ }
+
+ &.status-active {
+ color: @success;
+
+ .status-dot {
+ background: @success;
+ }
+ }
+
+ &.status-stopped {
+ color: @danger;
+
+ .status-dot {
+ background: @danger;
+ }
+ }
+
+ &.status-error {
+ color: @danger;
+
+ .status-dot {
+ background: @danger;
+ }
+ }
+
+ &.status-warning {
+ color: @warning;
+
+ .status-dot {
+ background: @warning;
+ }
+ }
+ }
+
+ .app-domain {
+ font-size: @font-size-sm;
+ color: @text-tertiary;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
}
-.uptime-item {
+// Empty Apps State
+.empty-apps {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: @space-8;
text-align: center;
- .uptime-value {
- font-size: @font-size-2xl;
- font-weight: @font-weight-bold;
- color: @text-primary;
+ .empty-icon {
+ color: @text-tertiary;
+ margin-bottom: @space-3;
}
- .uptime-label {
- font-size: @font-size-xs;
- color: @text-tertiary;
- text-transform: uppercase;
- letter-spacing: 0.5px;
+ p {
+ color: @text-secondary;
+ font-size: @font-size-sm;
+ margin-bottom: @space-4;
}
}
-.uptime-separator {
- color: @text-tertiary;
- font-size: @font-size-2xl;
- font-weight: @font-weight-bold;
+// Button link variant
+.btn-link {
+ background: transparent;
+ border: none;
+ color: @text-secondary;
+ font-size: @font-size-sm;
+ display: flex;
+ align-items: center;
+ gap: @space-1;
+ cursor: pointer;
+ padding: @space-1 @space-2;
+ border-radius: @radius-sm;
+
+ &:hover {
+ color: @accent-primary;
+ background: @accent-glow;
+ }
+}
+
+// Responsive adjustments
+@media (max-width: @breakpoint-md) {
+ .server-status-bar {
+ flex-direction: column;
+ gap: @space-3;
+ align-items: flex-start;
+ }
+
+ .status-bar-left {
+ flex-direction: column;
+ align-items: flex-start;
+ gap: @space-2;
+ }
+
+ .uptime-inline {
+ padding-left: 0;
+ border-left: none;
+ }
+
+ .apps-table-header,
+ .apps-table-row {
+ grid-template-columns: 1fr 1fr;
+
+ span:nth-child(3),
+ span:nth-child(4) {
+ display: none;
+ }
+ }
}