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.

feat(ui): migrate Monitoring + Marketplace groups to the top-bar layout

Juan Denis7cc27cb82f40
diff --git a/docs/REDESIGN_MAP.md b/docs/REDESIGN_MAP.md
index ab76122c..6a0ab5f6 100644
--- a/docs/REDESIGN_MAP.md
+++ b/docs/REDESIGN_MAP.md
@@ -119,7 +119,7 @@ Effort: S/M/L/XL. Nature: **Restyle** (look only) · **+IA** (layout/tab/route r
| 6 | **Database Explorer** | M | Restyle | `pages/Databases.jsx`, `databases/ConsoleTab.jsx`, `SourceTree.jsx`, `ResultsGrid.jsx`, `pages/_databases.scss` | syntax-highlight/gutter editor wrapper | optional "Export as SQL" dump | **✅ pass 1 done** — page already matched the target shell (token-aligned in Phase 0); added engine status-dot glow, green result count, `UTF-8` + `● Connected` status-bar segments. Deferred: syntax-highlight editor + gutter, `+` new-tab pill, ctx-menu Browse-rows/Export-SQL, semantic cell tints. |
| 7 | **File Manager** | M | Restyle+IA | `pages/FileManager.jsx`, `file-manager/FolderTree.jsx`, `PreviewDrawer.jsx`, `ContextMenu.jsx`, `pages/_file-manager.scss` | `file-manager/highlight.js` | cloud/S3 sources = **out of scope** | **✅ top-bar migrated** — shared `FILE_TABS` (Files/FTP Server); `PageTopbar` on both pages (FileManager top bar above its fullscreen browser; FTP header swapped, conditional actions kept); **sidebar sub-menu removed**. **Follow-up:** restyle the FileManager body (storage-sources tree, syntax-highlight preview) + FTP body. |
| 8 | **Domains** | L | Restyle+IA+BE | `pages/Domains.jsx`, `pages/_domains.scss` | DomainDrawer (SSL/registration/DNSSEC/NS + inline DNS records) | registrar, registration-expiry, DNSSEC, nameservers, registration auto-renew, status (WHOIS) | **✅ migrated (first top-bar page)** — built shared **`PageTopbar`** ds primitive; Domains now uses the demo's top-bar layout with routed sub-nav (Domains/DNS Zones/SSL) replacing the **removed sidebar sub-menu**; KPI strip + segmented filter + `.sk-dtable` + detail **Drawer**. Omitted unbacked columns (registrar/DNSSEC/nameservers — no WHOIS backend). **Trio complete:** DNSZones + SSLCertificates pages now render the same `PageTopbar` (shared `DOMAIN_TABS`), so the Domains/DNS/SSL tab group persists across all three. DNS/SSL page *bodies* are not yet fully restyled (their lists/forms still old-look) — a later pass. |
-| 9 | **Monitoring** | **XL** | Restyle+IA+BE | `pages/Monitoring.jsx`, `pages/_monitoring.scss` | `services/api/monitoring.js`, monitors/status/incidents subviews | synthetic monitors (HTTP/Ping/Port/Keyword); **status pages + incidents already have backend** — wire in; request-volume/p50-p95 per-app likely gap |
+| 9 | **Monitoring** | **XL** | Restyle+IA+BE | `pages/Monitoring.jsx`, `pages/_monitoring.scss` | `services/api/monitoring.js`, monitors/status/incidents subviews | synthetic monitors (HTTP/Ping/Port/Keyword); **status pages + incidents already have backend** — wire in; request-volume/p50-p95 per-app likely gap | **✅ top-bar migrated** — shared `MONITOR_TABS` (Monitoring/Status Pages); `PageTopbar` on both pages; **sidebar sub-menu removed** (Refresh + Start/Stop and Create-Page actions preserved). Body restyle (KPI/charts/monitors/incidents) still pending. |
| 10 | **Backups** | **XL** | Restyle+IA+BE | `pages/Backups.jsx`, `pages/_backups.scss` | RestoreDrawer, Heatmap | activity timeseries, GFS retention, multi-destination storage, selective/clone restore, per-snapshot duration/progress |
| 11 | **Git** | L | Restyle+IA+BE | `pages/Git.jsx`, `pages/_git.scss`, `services/api/files.js` | RepoDeployDrawer | provider OAuth connect/disconnect + provider list; Gitea storage/users/runners metrics |
| 12 | **Terminal / Logs** | L | Restyle+IA | `pages/Terminal.jsx`, `pages/_terminal.scss` | console/TargetRail, TerminalPane, LogsPane (delegate to existing consoles) | unified targets endpoint; live streaming for non-file targets |
@@ -127,7 +127,7 @@ Effort: S/M/L/XL. Nature: **Restyle** (look only) · **+IA** (layout/tab/route r
| 14 | **Cron Jobs** | L | Restyle+IA+BE | `pages/CronJobs.jsx`, `pages/_cron.scss`, `services/api/system.js` | CronDrawer | run history, next-run, success-rate, job target metadata |
| 15 | **Security (suite)** | L | Restyle+IA+BE | `pages/Security.jsx`, all `components/security/*Tab.jsx`, `pages/_security.scss`, `services/api/security.js` | ScoreGauge usage | geo-blocking, policy toggles, scan schedules, security sessions, pending-update list, integrity verify/revert. **fail2ban + SSH-keys already exist** (minor missing fields) |
| 16 | **Workspaces (list + detail)** | L | Restyle+IA+BE | `pages/Workspaces.jsx`, `pages/_workspaces.scss`, `services/api/servers.js` | **`pages/WorkspaceDetail.jsx`** + `/workspaces/:id` route | **plan/billing**, aggregated CPU/Mem/Storage usage, service/site counts, member `last_active` |
-| 17 | **Marketplace** | M | Restyle+IA | `pages/Marketplace.jsx`, `pages/_marketplace.scss` | — | 3rd-party integration connect (OAuth) + "core" flag | **✅ pass 1 done** — SCSS-only: hero/section kickers → mono eyebrow, card hover shadow → token, category filter active → accent chip (cards already had hover-lift + tinted tiles). PRESERVED tabs + plugin-install-from-source + side panel (no regression). Deferred: single-scroll IA + 3rd-party integrations (needs OAuth backend). |
+| 17 | **Marketplace** | M | Restyle+IA | `pages/Marketplace.jsx`, `pages/_marketplace.scss` | — | 3rd-party integration connect (OAuth) + "core" flag | **✅ pass 1 done** — SCSS-only: hero/section kickers → mono eyebrow, card hover shadow → token, category filter active → accent chip (cards already had hover-lift + tinted tiles). PRESERVED tabs + plugin-install-from-source + side panel (no regression). **Also top-bar migrated:** shared `MARKET_TABS` (Marketplace/Downloads); `PageTopbar` replaced the hero; **sidebar sub-menu removed** (Import ZIP action kept). Deferred: single-scroll IA + 3rd-party integrations (needs OAuth backend). |
| 18 | **Email Server** | L | Restyle+IA+BE | `pages/Email.jsx`, `pages/_email.scss`, `services/api/system.js` | KPI/gauge/reputation-ring | mail-volume timeseries, reputation/RBL, structured activity feed, real mailbox storage, per-item retry |
| 19 | **Workflow Builder** | M | Restyle+IA | `pages/WorkflowBuilder.jsx`, `pages/_workflow.scss` | wf-rail / wf-head regions (reuse ReactFlow nodes) | workflow-level active/paused flag (likely) |
| 20 | **Settings** | L | Restyle | `pages/Settings.jsx` (IA already matches!), all `components/settings/*Tab.jsx`, `pages/_settings.scss` | — | **active-session list + revoke** (JWT JTI registry) — only real gap | **✅ pass 1 done** — nav group labels → mono eyebrow, toggles → gradient-on (reskins all 17 tabs), theme-preview swatches repainted to new palette. Deferred: per-tab `.dtable`/Active-Sessions. |
diff --git a/frontend/src/components/marketplace/marketTabs.jsx b/frontend/src/components/marketplace/marketTabs.jsx
new file mode 100644
index 00000000..e5bd789a
--- /dev/null
+++ b/frontend/src/components/marketplace/marketTabs.jsx
@@ -0,0 +1,9 @@
+import { Puzzle, Download } from 'lucide-react';
+
+// Shared sub-nav for the Marketplace page group (Marketplace / Downloads).
+// Rendered in each page's <PageTopbar tabs={MARKET_TABS}> — the demo's top-bar
+// layout replaces the old sidebar sub-menu (see docs/REDESIGN_MAP.md §6 dec. 3).
+export const MARKET_TABS = [
+ { to: '/marketplace', label: 'Marketplace', end: true, icon: <Puzzle size={15} /> },
+ { to: '/downloads', label: 'Downloads', icon: <Download size={15} /> },
+];
diff --git a/frontend/src/components/monitoring/monitorTabs.jsx b/frontend/src/components/monitoring/monitorTabs.jsx
new file mode 100644
index 00000000..82f5a5ca
--- /dev/null
+++ b/frontend/src/components/monitoring/monitorTabs.jsx
@@ -0,0 +1,9 @@
+import { Activity, Globe } from 'lucide-react';
+
+// Shared sub-nav for the Monitoring page group (Monitoring / Status Pages).
+// Rendered in each page's <PageTopbar tabs={MONITOR_TABS}> — the demo's top-bar
+// layout replaces the old sidebar sub-menu (see docs/REDESIGN_MAP.md §6 dec. 3).
+export const MONITOR_TABS = [
+ { to: '/monitoring', label: 'Monitoring', end: true, icon: <Activity size={15} /> },
+ { to: '/status-pages', label: 'Status Pages', icon: <Globe size={15} /> },
+];
diff --git a/frontend/src/components/sidebarItems.js b/frontend/src/components/sidebarItems.js
index c90cbef7..48bf870f 100644
--- a/frontend/src/components/sidebarItems.js
+++ b/frontend/src/components/sidebarItems.js
@@ -103,14 +103,14 @@ export const SIDEBAR_ITEMS = [
icon: '<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/>'
},
{
+ // Redesign: Monitoring uses the top-bar layout (REDESIGN_MAP §6 dec. 3).
+ // Status Pages now lives in the page's top bar (PageTopbar MONITOR_TABS),
+ // not as a sidebar sub-item. Route /status-pages is unchanged.
id: 'monitoring',
label: 'Monitoring',
route: '/monitoring',
category: 'operations',
- icon: '<path d="M22 12h-4l-3 9L9 3l-3 9H2"/>',
- subItems: [
- { id: 'status-pages', label: 'Status Pages', route: '/status-pages', icon: '<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/>' }
- ]
+ icon: '<path d="M22 12h-4l-3 9L9 3l-3 9H2"/>'
},
{
id: 'backups',
@@ -155,14 +155,14 @@ export const SIDEBAR_ITEMS = [
icon: '<path d="M4 17l6-6-6-6M12 19h8"/>'
},
{
+ // Redesign: Marketplace uses the top-bar layout (REDESIGN_MAP §6 dec. 3).
+ // Downloads now lives in the page's top bar (PageTopbar MARKET_TABS), not
+ // as a sidebar sub-item. Route /downloads is unchanged.
id: 'marketplace',
label: 'Marketplace',
route: '/marketplace',
category: 'system',
- icon: '<circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"/>',
- subItems: [
- { id: 'downloads', label: 'Downloads', route: '/downloads', icon: '<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/>' }
- ]
+ icon: '<circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"/>'
}
];
diff --git a/frontend/src/pages/Downloads.jsx b/frontend/src/pages/Downloads.jsx
index 22da2c18..5a2ada7b 100644
--- a/frontend/src/pages/Downloads.jsx
+++ b/frontend/src/pages/Downloads.jsx
@@ -1,6 +1,9 @@
import React, { useState, useEffect } from 'react';
+import { Download } from 'lucide-react';
import api from '../services/api';
import { Button } from '@/components/ui/button';
+import { PageTopbar } from '@/components/ds';
+import { MARKET_TABS } from '../components/marketplace/marketTabs';
// Platform icons as SVG components
const LinuxIcon = () => (
@@ -140,9 +143,7 @@ function Downloads() {
if (loading) {
return (
<div className="page-container downloads-page">
- <div className="page-header">
- <h1>Downloads</h1>
- </div>
+ <PageTopbar icon={<Download size={18} />} title="Downloads" tabs={MARKET_TABS} />
<div className="loading-container">
<div className="loading-spinner"></div>
<p>Loading version information...</p>
@@ -153,18 +154,19 @@ function Downloads() {
return (
<div className="page-container downloads-page">
- <div className="page-header">
- <div className="page-header-content">
- <h1>ServerKit Agent Downloads</h1>
- <p className="page-subtitle">
- Download and install the ServerKit Agent on your servers to enable remote management.
- </p>
- </div>
- <Button variant="outline" onClick={fetchVersionInfo}>
- <RefreshIcon />
- Refresh
- </Button>
- </div>
+ <PageTopbar
+ icon={<Download size={18} />}
+ title="Downloads"
+ tabs={MARKET_TABS}
+ actions={(
+ <>
+ <Button size="sm" variant="outline" onClick={fetchVersionInfo}>
+ <RefreshIcon />
+ Refresh
+ </Button>
+ </>
+ )}
+ />
{error && (
<div className="alert alert-error">
diff --git a/frontend/src/pages/Marketplace.jsx b/frontend/src/pages/Marketplace.jsx
index a1269069..a50f7fa0 100644
--- a/frontend/src/pages/Marketplace.jsx
+++ b/frontend/src/pages/Marketplace.jsx
@@ -13,6 +13,7 @@ import {
PackageCheck,
Plug,
PlugZap,
+ Puzzle,
Search,
ServerCog,
ShieldCheck,
@@ -29,6 +30,8 @@ import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Badge } from '@/components/ui/badge';
import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs';
+import { PageTopbar } from '@/components/ds';
+import { MARKET_TABS } from '../components/marketplace/marketTabs';
const CATEGORIES = ['ai', 'monitoring', 'security', 'deployment', 'integration', 'ui', 'utility'];
@@ -281,26 +284,19 @@ const Marketplace = () => {
return (
<div className="page-container marketplace-page">
- <section className="marketplace-hero">
- <div className="marketplace-hero__content">
- <div className="marketplace-eyebrow">
- <Sparkles aria-hidden="true" />
- Extension control plane
- </div>
- <div className="page-header-content">
- <h1>Marketplace</h1>
- <p className="page-description">
- One catalog for local registry mappings, published packages, and runtime plugins.
- </p>
- </div>
- </div>
- <div className="marketplace-hero__actions">
- <Button variant="outline" onClick={openZipInstaller}>
- <UploadCloud aria-hidden="true" />
- Import ZIP
- </Button>
- </div>
- </section>
+ <PageTopbar
+ icon={<Puzzle size={18} />}
+ title="Marketplace"
+ tabs={MARKET_TABS}
+ actions={(
+ <>
+ <Button variant="outline" size="sm" onClick={openZipInstaller}>
+ <UploadCloud aria-hidden="true" />
+ Import ZIP
+ </Button>
+ </>
+ )}
+ />
<StatStrip ariaLabel="Marketplace summary">
<Stat label="Catalog" value={availableCount} />
diff --git a/frontend/src/pages/Monitoring.jsx b/frontend/src/pages/Monitoring.jsx
index f7c5095a..6e5c188b 100644
--- a/frontend/src/pages/Monitoring.jsx
+++ b/frontend/src/pages/Monitoring.jsx
@@ -11,6 +11,8 @@ import { Label } from '@/components/ui/label';
import { Badge } from '@/components/ui/badge';
import { Switch } from '@/components/ui/switch';
import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs';
+import { PageTopbar } from '@/components/ds';
+import { MONITOR_TABS } from '../components/monitoring/monitorTabs';
import {
Activity,
Bell,
@@ -273,34 +275,36 @@ const Monitoring = () => {
return (
<div className="page-container monitoring-page">
- <div className="page-header">
- <div>
- <h1>Monitoring & Alerts</h1>
- <p className="page-subtitle">System resource alerts and delivery</p>
- </div>
- <div className="page-actions">
- <Button variant="outline" onClick={loadData}>
- <RefreshCw size={16} />
- Refresh
- </Button>
- <Button
- variant={status?.enabled ? 'destructive' : 'default'}
- onClick={handleToggleMonitoring}
- >
- {status?.enabled ? (
- <>
- <Activity size={16} />
- Stop Monitoring
- </>
- ) : (
- <>
- <PlayCircle size={16} />
- Start Monitoring
- </>
- )}
- </Button>
- </div>
- </div>
+ <PageTopbar
+ icon={<Activity size={18} />}
+ title="Monitoring"
+ tabs={MONITOR_TABS}
+ actions={(
+ <>
+ <Button size="sm" variant="outline" onClick={loadData}>
+ <RefreshCw size={16} />
+ Refresh
+ </Button>
+ <Button
+ size="sm"
+ variant={status?.enabled ? 'destructive' : 'default'}
+ onClick={handleToggleMonitoring}
+ >
+ {status?.enabled ? (
+ <>
+ <Activity size={16} />
+ Stop Monitoring
+ </>
+ ) : (
+ <>
+ <PlayCircle size={16} />
+ Start Monitoring
+ </>
+ )}
+ </Button>
+ </>
+ )}
+ />
{error && (
<div className="alert alert-danger">
diff --git a/frontend/src/pages/StatusPages.jsx b/frontend/src/pages/StatusPages.jsx
index f8a5a14a..f81e197b 100644
--- a/frontend/src/pages/StatusPages.jsx
+++ b/frontend/src/pages/StatusPages.jsx
@@ -10,12 +10,15 @@ import { Input } from '@/components/ui/input';
import { Textarea } from '@/components/ui/textarea';
import { Badge } from '@/components/ui/badge';
import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs';
+import { PageTopbar } from '@/components/ds';
+import { MONITOR_TABS } from '../components/monitoring/monitorTabs';
import {
Activity,
AlertTriangle,
CheckCircle2,
Copy,
ExternalLink,
+ Globe,
Globe2,
PlayCircle,
Plus,
@@ -305,24 +308,25 @@ const StatusPages = () => {
return (
<div className="page-container status-pages-page">
- <div className="page-header">
- <div className="page-header-content">
- <h1>Status Pages</h1>
- <p className="page-description">{pages.length} page{pages.length !== 1 ? 's' : ''}</p>
- </div>
- <div className="page-header-actions">
- <Button variant="outline" onClick={loadPages}>
- <RefreshCw size={16} />
- Refresh
- </Button>
- {isAdmin && (
- <Button onClick={() => setShowCreatePage(true)}>
- <Plus size={16} />
- Create Page
+ <PageTopbar
+ icon={<Globe size={18} />}
+ title="Status Pages"
+ tabs={MONITOR_TABS}
+ actions={(
+ <>
+ <Button size="sm" variant="outline" onClick={loadPages}>
+ <RefreshCw size={16} />
+ Refresh
</Button>
- )}
- </div>
- </div>
+ {isAdmin && (
+ <Button size="sm" onClick={() => setShowCreatePage(true)}>
+ <Plus size={16} />
+ Create Page
+ </Button>
+ )}
+ </>
+ )}
+ />
<div className="status-layout">
<aside className="status-pages-list" aria-label="Status pages">