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.
Python astracloudflarecontrol-panelcyberpaneldnsfablehosting-control-panelhosting-panelkimi-k3server-managementserverkitubuntu-web-panelwebserver
Normalize service detail page with WordPress layout and add Domain & SSL
Juan Denis9b7f69e6544f
diff --git a/frontend/src/components/service-detail/SettingsTab.jsx b/frontend/src/components/service-detail/SettingsTab.jsxindex 83b0dbb1..e57d8a7e 100644--- a/frontend/src/components/service-detail/SettingsTab.jsx+++ b/frontend/src/components/service-detail/SettingsTab.jsx@@ -1,11 +1,22 @@-import React, { useState } from 'react';-import { useNavigate, useParams } from 'react-router-dom';-import { SlidersHorizontal, GitBranch, AlertTriangle } from 'lucide-react';+import React, { useEffect, useState } from 'react';+import { useNavigate, useParams, Link } from 'react-router-dom';+import {+ SlidersHorizontal,+ GitBranch,+ AlertTriangle,+ Globe,+ Lock,+ Shield,+ CircleCheck,+ CircleX,+} from 'lucide-react';import api from '../../services/api';import { useToast } from '../../contexts/ToastContext';import { DangerZone } from '../DangerZone';import RepoConnectForm from '../git/RepoConnectForm';import { Button } from '@/components/ui/button';+import { Input } from '@/components/ui/input';+import { Label } from '@/components/ui/label';import { Select, SelectTrigger, SelectContent, SelectItem, SelectValue } from '@/components/ui/select';// Grouped left sub-nav for the service Settings tab — mirrors the WordPress@@ -13,14 +24,22 @@ import { Select, SelectTrigger, SelectContent, SelectItem, SelectValue } from '@// the existing setting panels on the right. Groups give it structure (and room// to grow) instead of one long flat stack.const SVC_SETTINGS_GROUPS = [- { label: 'General', items: [{ id: 'environment', label: 'Environment', icon: SlidersHorizontal }] },+ {+ label: 'General',+ items: [+ // Renamed from plain "Environment" to avoid clashing with the+ // top-level "Env Vars" tab that edits runtime environment variables.+ { id: 'environment', label: 'Environment Type', icon: SlidersHorizontal },+ { id: 'domain', label: 'Domain & SSL', icon: Shield },+ ],+ },{ label: 'Connections', items: [{ id: 'repository', label: 'Repository', icon: GitBranch }] },{ label: 'Advanced', items: [{ id: 'danger', label: 'Danger Zone', icon: AlertTriangle }] },];const SVC_SETTINGS_ITEMS = SVC_SETTINGS_GROUPS.flatMap((g) => g.items);-const SettingsTab = ({ app, deployConfig, onUpdate }) => {+const SettingsTab = ({ app, deployConfig, domains, primaryDomain, onUpdate }) => {const navigate = useNavigate();const toast = useToast();// Section lives in the URL (/services/:id/settings/:section) so it's@@ -153,7 +172,7 @@ const SettingsTab = ({ app, deployConfig, onUpdate }) => {{/* Environment Configuration */}{section === 'environment' && (<div className="svc-settings__section">- <h3 className="svc-settings__section-title">Environment</h3>+ <h3 className="svc-settings__section-title">Environment Type</h3><div className="card settings-section"><div className="settings-row"><div className="settings-label">@@ -161,7 +180,7 @@ const SettingsTab = ({ app, deployConfig, onUpdate }) => {<span className="settings-hint">{app.has_linked_app? 'This app is linked. Unlink to change environment type.'- : 'Set how this application is used in your workflow.'}+ : 'Set how this application is used in your workflow (production, staging, development, or standalone).'}</span></div><div className="settings-control">@@ -213,6 +232,19 @@ const SettingsTab = ({ app, deployConfig, onUpdate }) => {</div>)}+ {/* Domain & SSL — same information architecture as WordPress Settings → SSL. */}+ {section === 'domain' && (+ <div className="svc-settings__section">+ <h3 className="svc-settings__section-title">Domain & SSL</h3>+ <DomainSslPanel+ app={app}+ domains={domains}+ primaryDomain={primaryDomain}+ onUpdate={onUpdate}+ />+ </div>+ )}+{/* Repository — the same shared RepoConnectForm the WordPress Gitsettings use (provider picker + URL fallback, connected summarywith Disconnect), wired to the service deployment API. */}@@ -252,4 +284,233 @@ const SettingsTab = ({ app, deployConfig, onUpdate }) => {);};+// Domain + SSL panel for services. Mirrors the WordPress SiteSSLPanel UX:+// show current primary domain, SSL health, attach a new domain, and request a+// certificate from Let's Encrypt.+const DomainSslPanel = ({ app, domains, primaryDomain, onUpdate }) => {+ const toast = useToast();+ const [health, setHealth] = useState(null);+ const [checking, setChecking] = useState(false);+ const [issuing, setIssuing] = useState(false);+ const [domainInput, setDomainInput] = useState('');+ const [attaching, setAttaching] = useState(false);+ const [serverkitDomains, setServerkitDomains] = useState([]);+ const [contextLoading, setContextLoading] = useState(true);+ const [email, setEmail] = useState(() => localStorage.getItem('serverkit_ssl_email') || '');++ const isPublicDomain = !!primaryDomain+ && !/^(localhost|127\.|10\.|192\.168\.|172\.(1[6-9]|2\d|3[01])\.)/.test(primaryDomain)+ && primaryDomain.includes('.');++ useEffect(() => {+ if (!primaryDomain) { setChecking(false); setHealth(null); return; }+ let cancelled = false;+ (async () => {+ setChecking(true);+ try {+ const res = await api.getSSLHealth(primaryDomain);+ if (!cancelled) setHealth(res);+ } catch (err) {+ if (!cancelled) setHealth({ valid: false, error: err.message });+ } finally {+ if (!cancelled) setChecking(false);+ }+ })();+ return () => { cancelled = true; };+ }, [primaryDomain]);++ useEffect(() => {+ let cancelled = false;+ (async () => {+ setContextLoading(true);+ try {+ const domainsRes = await api.getDomains().then(d => d.domains || []).catch(() => []);+ if (!cancelled) setServerkitDomains(domainsRes);+ } finally {+ if (!cancelled) setContextLoading(false);+ }+ })();+ return () => { cancelled = true; };+ }, []);++ async function handleAttachDomain(e) {+ e?.preventDefault();+ const name = domainInput.trim();+ if (!name) { toast.error('Enter a domain name'); return; }+ if (!/^[a-z0-9.-]+\.[a-z]{2,}$/i.test(name)) { toast.error('Enter a valid domain name'); return; }++ setAttaching(true);+ try {+ const res = await api.createDomain({+ name,+ application_id: app.id,+ is_primary: domains.length === 0,+ ssl_enabled: false,+ });+ toast.success(res.message || 'Domain attached');+ setDomainInput('');+ onUpdate();+ } catch (err) {+ toast.error(err.message || 'Failed to attach domain');+ } finally {+ setAttaching(false);+ }+ }++ async function handleEnableSSL() {+ if (!primaryDomain) { toast.error('No primary domain configured'); return; }+ if (!email.trim() || !email.includes('@')) { toast.error('Enter a valid email for certificate expiry notices'); return; }+ localStorage.setItem('serverkit_ssl_email', email.trim());+ setIssuing(true);+ toast.info(`Requesting certificate for ${primaryDomain}...`, { duration: 4000 });+ try {+ const res = await api.obtainCertificate({+ domains: [primaryDomain],+ email,+ use_nginx: true,+ });+ if (res.success) {+ toast.success(res.message || 'Certificate issued');+ // Mark the domain as SSL-enabled in ServerKit.+ const primary = domains.find(d => d.is_primary) || domains[0];+ if (primary?.id) {+ await api.updateDomain(primary.id, { ssl_enabled: true, ssl_auto_renew: true }).catch(() => {});+ }+ const updated = await api.getSSLHealth(primaryDomain);+ setHealth(updated);+ onUpdate();+ } else {+ toast.error(res.error || 'Certificate request failed');+ }+ } catch (err) {+ toast.error(err.message || 'Certificate request failed');+ } finally {+ setIssuing(false);+ }+ }++ const issued = health?.valid;+ const attachValid = /^[a-z0-9.-]+\.[a-z]{2,}$/i.test(domainInput.trim());++ const CheckItem = ({ ok, label }) => (+ <div className="ssl-check-item">+ {ok ? <CircleCheck size={14} className="ssl-check-icon ssl-check-icon--ok" /> : <CircleX size={14} className="ssl-check-icon ssl-check-icon--missing" />}+ <span className={ok ? 'ssl-check-label ssl-check-label--ok' : 'ssl-check-label'}>{label}</span>+ </div>+ );++ return (+ <div className="card settings-section svc-domain-panel">+ <div className="app-info-grid">+ <div className="app-info-item">+ <span className="app-info-label">Primary Domain</span>+ <span className="app-info-value mono">{primaryDomain || 'None configured'}</span>+ </div>+ <div className="app-info-item">+ <span className="app-info-label">SSL Status</span>+ <span className="app-info-value">+ {!primaryDomain ? '—' : checking ? 'Checking…' : issued ? 'Active' : 'Not Secured'}+ </span>+ </div>+ {issued && health.expires_at && (+ <div className="app-info-item">+ <span className="app-info-label">Expires</span>+ <span className="app-info-value">+ {new Date(health.expires_at).toLocaleDateString()}+ {typeof health.days_remaining === 'number' ? ` (${health.days_remaining}d)` : ''}+ </span>+ </div>+ )}+ {issued && health.issuer && (+ <div className="app-info-item">+ <span className="app-info-label">Issuer</span>+ <span className="app-info-value">{health.issuer}</span>+ </div>+ )}+ </div>++ {!primaryDomain ? (+ <div className="ssl-guide">+ <p className="hint">No domain is attached to this service yet. Add one to expose it on a public URL and enable HTTPS.</p>+ <form className="ssl-inline-attach" onSubmit={handleAttachDomain}>+ {contextLoading ? (+ <p className="hint">Loading available domains…</p>+ ) : (+ <div className="ssl-context">+ <div className="ssl-context-links">+ <Link to="/domains">Manage domains</Link>+ </div>+ </div>+ )}+ <div className="form-group">+ <Label>Domain</Label>+ <Input+ type="text"+ value={domainInput}+ onChange={(e) => setDomainInput(e.target.value)}+ placeholder="example.com"+ disabled={attaching}+ list="svc-existing-domains"+ />+ <datalist id="svc-existing-domains">+ {serverkitDomains+ .filter(d => !domains.some(ad => ad.name === d.name))+ .map(d => (+ <option key={d.id} value={d.name}>+ {d.ssl_enabled ? 'SSL enabled' : 'No SSL'}+ </option>+ ))}+ </datalist>+ <span className="form-hint">Pick an existing ServerKit domain or type one you control, without http://</span>+ </div>+ <div className="app-detail-actions">+ <Button type="submit" disabled={!attachValid || attaching}>+ <Globe size={14} />+ {attaching ? 'Attaching…' : 'Attach Domain'}+ </Button>+ </div>+ </form>+ </div>+ ) : !isPublicDomain ? (+ <div className="ssl-guide">+ <p className="hint">SSL requires a public domain pointed at this server. This site is on <code>{primaryDomain}</code>, so a certificate cannot be issued here.</p>+ <div className="ssl-checklist">+ <CheckItem ok={false} label="Public domain mapped to this service" />+ </div>+ </div>+ ) : (+ <div className="ssl-guide">+ {issued ? (+ <p className="hint">This service is secured with a valid SSL certificate. You can re-issue it if needed.</p>+ ) : (+ <>+ <p className="hint">Enter the email Let's Encrypt should use for expiry notices, then request a free certificate.</p>+ <div className="ssl-checklist">+ <CheckItem ok label={`Domain ${primaryDomain} configured`} />+ </div>+ <div className="form-group">+ <Label>Admin Email</Label>+ <Input+ type="email"+ value={email}+ onChange={(e) => setEmail(e.target.value)}+ placeholder="[email protected]"+ disabled={issuing}+ />+ <span className="form-hint">Used for certificate expiry reminders from Let's Encrypt.</span>+ </div>+ </>+ )}+ <div className="app-detail-actions">+ <Button onClick={handleEnableSSL} disabled={issuing || (!issued && (!email.trim() || !email.includes('@')))}>+ {issued ? <Shield size={14} /> : <Lock size={14} />}+ {issuing ? 'Requesting...' : issued ? 'Re-issue Certificate' : 'Enable SSL'}+ </Button>+ </div>+ </div>+ )}+ </div>+ );+};+export default SettingsTab;diff --git a/frontend/src/pages/ServiceDetail.jsx b/frontend/src/pages/ServiceDetail.jsxindex 351c4292..4a2afd2c 100644--- a/frontend/src/pages/ServiceDetail.jsx+++ b/frontend/src/pages/ServiceDetail.jsx@@ -35,7 +35,9 @@ const TAB_LABELS = {overview: 'Overview',events: 'Events',logs: 'Logs',- environment: 'Environment',+ // 'Environment Variables' instead of 'Environment' so it isn't confused+ // with Settings → Environment Type (deployment environment).+ environment: 'Env Vars',shell: 'Shell',metrics: 'Metrics',packages: 'Packages',@@ -228,6 +230,8 @@ const ServiceDetail = () => {const isGitBased = service.source !== 'manual' && service.source !== 'upload';const isUpload = service.source === 'upload';const isManual = service.source === 'manual';+ const domains = service.domains || [];+ const primaryDomain = (domains.find(d => d.is_primary) || domains[0])?.name || '';return (<div className="app-detail-page app-detail-page--wide svc-detail">@@ -380,15 +384,15 @@ const ServiceDetail = () => {{service.port && <span>Port {service.port}</span>}{service.port && <span className="separator">·</span>}<span>Created {new Date(service.created_at).toLocaleDateString()}</span>- {service.domain && (+ {primaryDomain && (<><span className="separator">·</span><a- href={`https://${service.domain}`}+ href={`https://${primaryDomain}`}target="_blank"rel="noopener noreferrer">- {service.domain}+ {primaryDomain}</a></>)}@@ -526,6 +530,8 @@ const ServiceDetail = () => {<SettingsTabapp={service}deployConfig={deployConfig}+ domains={domains}+ primaryDomain={primaryDomain}onUpdate={reload}/>)}diff --git a/frontend/src/pages/Services.jsx b/frontend/src/pages/Services.jsxindex 6a324176..4526f845 100644--- a/frontend/src/pages/Services.jsx+++ b/frontend/src/pages/Services.jsx@@ -1,26 +1,16 @@import React, { useState, useEffect, useMemo } from 'react';import { useNavigate, Link } from 'react-router-dom';-import { Layers, Plus, Activity, Square, Clock, Play, RotateCw, GitBranch, Github, FolderOpen, FileArchive } from 'lucide-react';+import { Layers, Plus, Square, Play, RotateCw, GitBranch, Github, FolderOpen, FileArchive, Search } from 'lucide-react';import api from '../services/api';import { useToast } from '../contexts/ToastContext';import { getServiceType, getStatusConfig, formatRelativeTime } from '../utils/serviceTypes';import EmptyState from '../components/EmptyState';-import { MetricCard, Pill, SegControl } from '@/components/ds';+import { Pill, SegControl, ServiceTile } from '@/components/ds';import { useTopbarActions } from '@/hooks/useTopbarActions';import { Button } from '@/components/ui/button';-import { Input } from '@/components/ui/input';import { Checkbox } from '@/components/ui/checkbox';-const SERVICE_TYPE_OPTIONS = ['all', 'docker', 'flask', 'django', 'php', 'static', 'wordpress'];const STATUS_PILL = { running: 'green', stopped: 'gray', deploying: 'amber', building: 'amber', failed: 'red' };-const SORT_OPTIONS = [- { value: 'name-asc', label: 'Name A-Z' },- { value: 'name-desc', label: 'Name Z-A' },- { value: 'status', label: 'Status' },- { value: 'type', label: 'Type' },- { value: 'recent', label: 'Recently deployed' },- { value: 'created', label: 'Recently created' },-];const Services = () => {const navigate = useNavigate();@@ -28,9 +18,7 @@ const Services = () => {const [apps, setApps] = useState([]);const [loading, setLoading] = useState(true);const [searchTerm, setSearchTerm] = useState('');- const [typeFilter, setTypeFilter] = useState('all');const [statusFilter, setStatusFilter] = useState('all');- const [sortBy, setSortBy] = useState('status');const [actionLoading, setActionLoading] = useState(null);const [selectedIds, setSelectedIds] = useState(new Set());const [bulkLoading, setBulkLoading] = useState(false);@@ -86,62 +74,29 @@ const Services = () => {}}- function toggleSelectAll() {- if (selectedIds.size === filteredApps.length) {- setSelectedIds(new Set());- } else {- setSelectedIds(new Set(filteredApps.map(a => a.id)));- }- }-const filteredApps = useMemo(() => {- let result = apps.filter(app => {- if (searchTerm && !app.name.toLowerCase().includes(searchTerm.toLowerCase())) return false;- if (typeFilter !== 'all' && app.app_type !== typeFilter) return false;- if (statusFilter !== 'all' && (statusFilter === 'running' ? app.status !== 'running' : app.status === 'running')) return false;- return true;- });-- result.sort((a, b) => {- switch (sortBy) {- case 'name-asc': return a.name.localeCompare(b.name);- case 'name-desc': return b.name.localeCompare(a.name);- case 'status': {- const order = { running: 0, deploying: 1, building: 2, stopped: 3, failed: 4 };- return (order[a.status] ?? 5) - (order[b.status] ?? 5);- }- case 'type': return (a.app_type || '').localeCompare(b.app_type || '');- case 'recent': return new Date(b.last_deploy_at || 0) - new Date(a.last_deploy_at || 0);- case 'created': return new Date(b.created_at || 0) - new Date(a.created_at || 0);- default: return 0;- }- });-- return result;- }, [apps, searchTerm, typeFilter, statusFilter, sortBy]);-- const stats = useMemo(() => {- const running = apps.filter(a => a.status === 'running').length;- const stopped = apps.filter(a => a.status !== 'running').length;- const types = {};- apps.forEach(a => { types[a.app_type] = (types[a.app_type] || 0) + 1; });- const topType = Object.entries(types).sort((a, b) => b[1] - a[1])[0];- const recentDeploy = apps- .filter(a => a.last_deploy_at)- .sort((a, b) => new Date(b.last_deploy_at) - new Date(a.last_deploy_at))[0];+ const q = searchTerm.trim().toLowerCase();+ return apps+ .filter(app => {+ if (statusFilter !== 'all' && (statusFilter === 'running' ? app.status !== 'running' : app.status === 'running')) return false;+ if (q && !app.name.toLowerCase().includes(q)) return false;+ return true;+ })+ .sort((a, b) => {+ const order = { running: 0, deploying: 1, building: 2, stopped: 3, failed: 4 };+ return (order[a.status] ?? 5) - (order[b.status] ?? 5) || a.name.localeCompare(b.name);+ });+ }, [apps, searchTerm, statusFilter]);- return { total: apps.length, running, stopped, topType, recentDeploy };- }, [apps]);+ const runningCount = useMemo(() => apps.filter(a => a.status === 'running').length, [apps]);useTopbarActions(() =>- <>- <Button size="sm" asChild>- <Link to="/services/new">- <Plus size={16} />- New Service- </Link>- </Button>- </>,+ <Button size="sm" asChild>+ <Link to="/services/new">+ <Plus size={16} />+ New Service+ </Link>+ </Button>,[]);@@ -151,287 +106,214 @@ const Services = () => {return (<div className="sk-tabgroup__inner services-page">- {/* Summary */}- {apps.length > 0 && (- <div className="svc-kpis">- <MetricCard tone="green" icon={<Activity size={16} />} value={stats.running} label="Running" />- <MetricCard tone="amber" icon={<Square size={16} />} value={stats.stopped} label="Stopped" />- <MetricCard tone="accent" icon={<Layers size={16} />} value={stats.total} label="Total">- {stats.topType && (- <div className="sk-kpi__sub"><span>{stats.topType[1]} {stats.topType[0]}</span></div>- )}- </MetricCard>- <MetricCard- tone="cyan"- icon={<Clock size={16} />}- value={stats.recentDeploy ? formatRelativeTime(stats.recentDeploy.last_deploy_at) : 'N/A'}- label="Last Deploy"- >- {stats.recentDeploy?.name && (- <div className="sk-kpi__sub"><span>{stats.recentDeploy.name}</span></div>- )}- </MetricCard>- </div>- )}-- {/* Filters + Sort */}- <div className="services-page__filters">- <div className="services-page__search">- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">- <circle cx="11" cy="11" r="8"/>- <line x1="21" y1="21" x2="16.65" y2="16.65"/>- </svg>- <Input- type="text"- placeholder="Search services..."- value={searchTerm}- onChange={(e) => setSearchTerm(e.target.value)}- />- </div>- <select- value={typeFilter}- onChange={(e) => setTypeFilter(e.target.value)}- className="services-page__filter-select"- >- {SERVICE_TYPE_OPTIONS.map(opt => (- <option key={opt} value={opt}>- {opt === 'all' ? 'All Types' : getServiceType(opt).label}- </option>- ))}- </select>- <SegControl- value={statusFilter}- onChange={setStatusFilter}- options={[- { value: 'all', label: 'All' },- { value: 'running', label: 'Running' },- { value: 'stopped', label: 'Stopped' },- ]}- />- <select- value={sortBy}- onChange={(e) => setSortBy(e.target.value)}- className="services-page__filter-select"- >- {SORT_OPTIONS.map(opt => (- <option key={opt.value} value={opt.value}>{opt.label}</option>- ))}- </select>- </div>-- {/* Bulk Actions Bar */}- {selectedIds.size > 0 && (- <div className="services-page__bulk-bar">- <span>{selectedIds.size} selected</span>- <div className="services-page__bulk-actions">- <Button variant="outline" size="sm" onClick={() => handleBulkAction('restart')} disabled={bulkLoading}>- Restart All- </Button>- <Button variant="outline" size="sm" onClick={() => handleBulkAction('stop')} disabled={bulkLoading}>- Stop All- </Button>- <Button variant="outline" size="sm" onClick={() => handleBulkAction('start')} disabled={bulkLoading}>- Start All- </Button>- <Button variant="ghost" size="sm" onClick={() => setSelectedIds(new Set())}>- Clear- </Button>- </div>- </div>- )}-- {filteredApps.length === 0 ? (+ {apps.length === 0 ? (<EmptyStatesize="lg"icon={Layers}title="No services found"- description={searchTerm || typeFilter !== 'all' || statusFilter !== 'all'- ? 'Try adjusting your filters'- : 'Connect a repository or install a template to get started'}- action={!searchTerm && typeFilter === 'all' && statusFilter === 'all' && (+ description="Connect a repository or install a template to get started"+ action={<Button asChild><Link to="/services/new">Create Service</Link></Button>- )}+ }/>) : (- <div className="services-page__tablecard">- <table className="sk-dtable services-page__table">- <thead>- <tr>- <th className="services-page__ck">- <Checkbox- checked={selectedIds.size === filteredApps.length && filteredApps.length > 0}- onCheckedChange={toggleSelectAll}- className="services-page__checkbox"- aria-label="Select all services"- />- </th>- <th>Service</th>- <th>Source</th>- <th>Domain</th>- <th>Status</th>- <th>Last Deploy</th>- <th className="services-page__th-actions">Actions</th>- </tr>- </thead>- <tbody>- {filteredApps.map(app => {- const typeInfo = getServiceType(app.app_type);- const statusInfo = getStatusConfig(app.status);- const isRunning = app.status === 'running';- const isGithub = (app.deploy_repo_url || '').includes('github.com');+ <div className="wp-list">+ {/* Toolbar — same layout as the WordPress list page: status tabs on the left, search on the right. */}+ <div className="wp-list__toolbar">+ <SegControl+ value={statusFilter}+ onChange={setStatusFilter}+ options={[+ { value: 'all', label: 'All', count: apps.length },+ { value: 'running', label: 'Running', count: runningCount },+ { value: 'stopped', label: 'Stopped', count: apps.length - runningCount },+ ]}+ />+ <div className="wp-list__search">+ <Search size={15} aria-hidden="true" />+ <input+ type="text"+ value={searchTerm}+ onChange={e => setSearchTerm(e.target.value)}+ placeholder="Search services…"+ aria-label="Search services"+ />+ </div>+ </div>- return (- <tr- key={app.id}- className={`is-clickable ${selectedIds.has(app.id) ? 'is-selected' : ''}`}- onClick={() => {- if (app.app_type === 'wordpress') {- navigate(`/wordpress/${app.id}`);- } else {- navigate(`/services/${app.id}`);- }- }}- >- <td className="services-page__ck" onClick={(e) => e.stopPropagation()}>+ {/* Bulk Actions Bar */}+ {selectedIds.size > 0 && (+ <div className="wp-list__bulkbar">+ <span className="wp-list__bulkcount">{selectedIds.size} selected</span>+ <div className="wp-list__bulkactions">+ <Button variant="outline" size="sm" onClick={() => handleBulkAction('restart')} disabled={bulkLoading}>+ Restart All+ </Button>+ <Button variant="outline" size="sm" onClick={() => handleBulkAction('stop')} disabled={bulkLoading}>+ Stop All+ </Button>+ <Button variant="outline" size="sm" onClick={() => handleBulkAction('start')} disabled={bulkLoading}>+ Start All+ </Button>+ <Button variant="ghost" size="sm" onClick={() => setSelectedIds(new Set())}>+ Clear+ </Button>+ </div>+ </div>+ )}++ {filteredApps.length === 0 ? (+ <EmptyState+ icon={Layers}+ title="No services found"+ description="Try adjusting your search or filter"+ />+ ) : (+ <div className="wp-list__card">+ <table className="sk-dtable">+ <thead>+ <tr>+ <th className="wp-list__ck"><Checkbox- checked={selectedIds.has(app.id)}+ checked={filteredApps.length > 0 && filteredApps.every(a => selectedIds.has(a.id))}onCheckedChange={(checked) => {- setSelectedIds(prev => {- const next = new Set(prev);- if (checked) next.add(app.id);- else next.delete(app.id);- return next;- });+ setSelectedIds(checked ? new Set(filteredApps.map(a => a.id)) : new Set());}}- className="services-page__checkbox"- aria-label={`Select ${app.name}`}+ aria-label="Select all services"/>- </td>- <td>- <div className="sk-cell-name">- <div- className="services-page__type-icon"- style={{ backgroundColor: typeInfo.bgColor, color: typeInfo.color }}- >- <ServiceTypeIcon type={app.app_type} />- </div>- <div>- <div>{app.name}</div>- <div className="sk-cell-sub">{typeInfo.label}</div>- </div>- </div>- </td>- <td>- {app.deploy_repo_url ? (- <span className="services-page__src-badge" title={app.deploy_repo_url}>- {isGithub ? <Github size={12} /> : <GitBranch size={12} />}- {extractRepoName(app.deploy_repo_url)}- </span>- ) : app.source === 'manual' ? (- <span className="services-page__src-badge services-page__src-badge--manual" title={app.root_path || ''}>- <FolderOpen size={12} />- Local- </span>- ) : app.source === 'upload' ? (- <span className="services-page__src-badge services-page__src-badge--upload" title={app.upload_path || ''}>- <FileArchive size={12} />- Upload v{app.version || 1}- </span>- ) : (- <span className="services-page__nil">—</span>- )}- </td>- <td className="sk-cell-mono">{app.domain || <span className="services-page__nil">—</span>}</td>- <td><Pill kind={STATUS_PILL[app.status] || 'gray'}>{statusInfo.label}</Pill></td>- <td className="sk-cell-mono">- {app.last_deploy_at ? formatRelativeTime(app.last_deploy_at) : <span className="services-page__nil">—</span>}- </td>- <td onClick={(e) => e.stopPropagation()}>- <div className="services-page__actions">- {isRunning ? (- <>- <Button- variant="ghost"- size="sm"- onClick={(e) => handleAction(e, app.id, 'restart')}- disabled={actionLoading === `${app.id}-restart`}- title="Restart"- >- <RotateCw size={14} />- </Button>- <Button- variant="ghost"- size="sm"- onClick={(e) => handleAction(e, app.id, 'stop')}- disabled={actionLoading === `${app.id}-stop`}- title="Stop"- >- <Square size={14} />- </Button>- </>- ) : (- <Button- variant="ghost"- size="sm"- onClick={(e) => handleAction(e, app.id, 'start')}- disabled={actionLoading === `${app.id}-start`}- title="Start"- >- <Play size={14} />- </Button>- )}- </div>- </td>+ </th>+ <th>Service</th>+ <th>Source</th>+ <th>Domain</th>+ <th>Status</th>+ <th>Last Deploy</th>+ <th style={{ width: 70 }} /></tr>- );- })}- </tbody>- </table>+ </thead>+ <tbody>+ {filteredApps.map(app => {+ const typeInfo = getServiceType(app.app_type);+ const statusInfo = getStatusConfig(app.status);+ const isRunning = app.status === 'running';+ const isGithub = (app.deploy_repo_url || '').includes('github.com');+ const primaryDomain = (app.domains?.find(d => d.is_primary) || app.domains?.[0])?.name || '';++ return (+ <tr+ key={app.id}+ className={`is-clickable ${selectedIds.has(app.id) ? 'is-selected' : ''}`}+ onClick={() => {+ if (app.app_type === 'wordpress') {+ navigate(`/wordpress/${app.id}`);+ } else {+ navigate(`/services/${app.id}`);+ }+ }}+ >+ <td className="wp-list__ck" onClick={(e) => e.stopPropagation()}>+ <Checkbox+ checked={selectedIds.has(app.id)}+ onCheckedChange={(checked) => {+ setSelectedIds(prev => {+ const next = new Set(prev);+ if (checked) next.add(app.id);+ else next.delete(app.id);+ return next;+ });+ }}+ aria-label={`Select ${app.name}`}+ />+ </td>+ <td>+ <div className="sk-cell-name">+ <ServiceTile+ name={app.name}+ size={30}+ className="wp-list__tile"+ aria-hidden="true"+ />+ <span>+ <div>{app.name}</div>+ <div className="sk-cell-sub">{typeInfo.label}</div>+ </span>+ </div>+ </td>+ <td>+ {app.deploy_repo_url ? (+ <span className="services-page__src-badge" title={app.deploy_repo_url}>+ {isGithub ? <Github size={12} /> : <GitBranch size={12} />}+ {extractRepoName(app.deploy_repo_url)}+ </span>+ ) : app.source === 'manual' ? (+ <span className="services-page__src-badge services-page__src-badge--manual" title={app.root_path || ''}>+ <FolderOpen size={12} />+ Local+ </span>+ ) : app.source === 'upload' ? (+ <span className="services-page__src-badge services-page__src-badge--upload" title={app.upload_path || ''}>+ <FileArchive size={12} />+ Upload v{app.version || 1}+ </span>+ ) : (+ <span className="wp-list__dash">—</span>+ )}+ </td>+ <td className="sk-cell-mono">{primaryDomain || <span className="wp-list__dash">—</span>}</td>+ <td><Pill kind={STATUS_PILL[app.status] || 'gray'}>{statusInfo.label}</Pill></td>+ <td className="sk-cell-mono">+ {app.last_deploy_at ? formatRelativeTime(app.last_deploy_at) : <span className="wp-list__dash">—</span>}+ </td>+ <td onClick={(e) => e.stopPropagation()}>+ <div className="services-page__actions">+ {isRunning ? (+ <>+ <Button+ variant="ghost"+ size="sm"+ onClick={(e) => handleAction(e, app.id, 'restart')}+ disabled={actionLoading === `${app.id}-restart`}+ title="Restart"+ >+ <RotateCw size={14} />+ </Button>+ <Button+ variant="ghost"+ size="sm"+ onClick={(e) => handleAction(e, app.id, 'stop')}+ disabled={actionLoading === `${app.id}-stop`}+ title="Stop"+ >+ <Square size={14} />+ </Button>+ </>+ ) : (+ <Button+ variant="ghost"+ size="sm"+ onClick={(e) => handleAction(e, app.id, 'start')}+ disabled={actionLoading === `${app.id}-start`}+ title="Start"+ >+ <Play size={14} />+ </Button>+ )}+ </div>+ </td>+ </tr>+ );+ })}+ </tbody>+ </table>+ </div>+ )}</div>)}</div>);};-function ServiceTypeIcon({ type }) {- switch (type) {- case 'docker':- return (- <svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor">- <path d="M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.186m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288z"/>- </svg>- );- case 'flask':- case 'django':- return (- <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">- <path d="M12 2L2 7l10 5 10-5-10-5z"/>- <path d="M2 17l10 5 10-5"/>- <path d="M2 12l10 5 10-5"/>- </svg>- );- case 'php':- return <span className="text-xs font-bold">PHP</span>;- case 'static':- return (- <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">- <path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"/>- <polyline points="13 2 13 9 20 9"/>- </svg>- );- case 'wordpress':- return (- <svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor">- <path d="M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2z"/>- </svg>- );- default:- return <span className="text-xs font-bold">{type?.charAt(0).toUpperCase()}</span>;- }-}-function extractRepoName(url) {if (!url) return '';try {diff --git a/frontend/src/pages/WordPressDetail.jsx b/frontend/src/pages/WordPressDetail.jsxindex 1232614c..36d0c1e7 100644--- a/frontend/src/pages/WordPressDetail.jsx+++ b/frontend/src/pages/WordPressDetail.jsx@@ -1,6 +1,6 @@import React, { useState, useEffect } from 'react';import { useParams, useNavigate, Link } from 'react-router-dom';-import { ExternalLink, Settings, RefreshCw, Plus, Database, GitBranch, Package, Palette, Archive, Trash2, Replace, ShieldCheck, FolderOpen, FileText, Lock, Copy, Zap, Activity, Globe, BarChart3, FileBarChart, Printer, Download, ChevronDown, Check, AlertTriangle, HardDrive } from 'lucide-react';+import { ExternalLink, Settings, RefreshCw, Plus, Database, GitBranch, Package, Palette, Archive, Trash2, Replace, ShieldCheck, FolderOpen, FileText, Lock, Copy, Zap, Activity, Globe, BarChart3, FileBarChart, Printer, Download, ChevronDown, Check, AlertTriangle, HardDrive, LayoutDashboard, Layers, Shield, ShieldAlert, CircleCheck, CircleX } from 'lucide-react';import { ResponsiveContainer, AreaChart, Area, XAxis, YAxis, CartesianGrid, Tooltip } from 'recharts';import useTabParam from '../hooks/useTabParam';import wordpressApi from '../services/wordpress';@@ -142,6 +142,25 @@ const EnvSwitcher = ({ options, onSelect }) => {);};+// Header alert that nags the operator to secure the site when the primary+// URL is not HTTPS. Clicking it jumps to SSL settings so the user can enable+// HTTPS in one click (or see why it can't be issued yet, e.g. localhost).+const SSLAlert = ({ site }) => {+ const isHttps = (site.url || '').startsWith('https://');++ if (!site.url || isHttps) return null;++ return (+ <Link+ to={`/wordpress/${site.id}/settings/ssl`}+ className="sk-pill sk-pill--amber"+ >+ <span className="sk-pill__dot" />+ Not Secured+ </Link>+ );+};+const WordPressDetail = () => {const { id } = useParams();const navigate = useNavigate();@@ -157,6 +176,7 @@ const WordPressDetail = () => {const [cloning, setCloning] = useState(false);const [cloneName, setCloneName] = useState('');const [clonedCreds, setClonedCreds] = useState(null);+ const [gitStatus, setGitStatus] = useState(null);useEffect(() => {// Show the skeleton again when navigating between environment site ids@@ -165,6 +185,15 @@ const WordPressDetail = () => {loadSite();}, [id]);+ useEffect(() => {+ // Load Git connection summary so we can surface a repo pill in the header,+ // matching the Service detail page's "Connect a repository" affordance.+ if (!id) return;+ wordpressApi.getGitStatus(id)+ .then(setGitStatus)+ .catch(() => setGitStatus(null));+ }, [id]);+async function loadSite() {try {const data = await wordpressApi.getSite(id);@@ -365,6 +394,7 @@ const WordPressDetail = () => {{envOptions && envOptions.length > 1 && (<EnvSwitcher options={envOptions} onSelect={(envId) => navigate(`/wordpress/${envId}`)} />)}+ <SSLAlert site={site} /></h1><div className="app-detail-subtitle"><span>WordPress {site.wp_version || '—'}</span>@@ -390,19 +420,46 @@ const WordPressDetail = () => {</div></div>+ {/* Repo Connection Pill — same prominent affordance as the service detail page. */}+ <div className="wp-detail__repo-bar">+ {gitStatus?.connected ? (+ <div+ className="wp-detail__repo-pill"+ onClick={() => navigate(`/wordpress/${id}/settings/git`)}+ title="Repository connected — open Git settings"+ >+ <GitBranch size={14} />+ <span className="wp-detail__repo-url">{extractRepoDisplay(gitStatus.repo_url)}</span>+ <span className="wp-detail__repo-arrow">→</span>+ <span className="wp-detail__repo-branch">{gitStatus.branch || 'main'}</span>+ {gitStatus.auto_deploy && (+ <span className="wp-detail__auto-deploy-badge">Auto</span>+ )}+ </div>+ ) : (+ <button+ className="wp-detail__connect-repo"+ onClick={() => navigate(`/wordpress/${id}/settings/git`)}+ >+ <GitBranch size={14} />+ Connect a repository+ </button>+ )}+ </div>+{/* Tabs */}<div className="app-detail-tabs"><divclassName={`app-detail-tab ${activeTab === 'overview' ? 'active' : ''}`}onClick={() => setActiveTab('overview')}>- Overview+ <LayoutDashboard size={14} /> Overview</div><divclassName={`app-detail-tab ${activeTab === 'environments' ? 'active' : ''}`}onClick={() => setActiveTab('environments')}>- Environments+ <Layers size={14} /> Env</div><divclassName={`app-detail-tab ${activeTab === 'database' ? 'active' : ''}`}@@ -422,12 +479,6 @@ const WordPressDetail = () => {><Palette size={14} /> Themes</div>- <div- className={`app-detail-tab ${activeTab === 'backups' ? 'active' : ''}`}- onClick={() => setActiveTab('backups')}- >- <Archive size={14} /> Backups- </div><divclassName={`app-detail-tab ${activeTab === 'uptime' ? 'active' : ''}`}onClick={() => setActiveTab('uptime')}@@ -1757,12 +1808,6 @@ const ReportView = ({ report, onPrint, onDownload, onDelete }) => {// Overview Tabconst OverviewTab = ({ site, onUpdate }) => {const toast = useToast();- const navigate = useNavigate();- const { confirm, confirmState, handleConfirm, handleCancel } = useConfirm();- const [wpInfo, setWpInfo] = useState(null);- const [updatingCore, setUpdatingCore] = useState(false);- const [archiving, setArchiving] = useState(false);- const [showDeleteModal, setShowDeleteModal] = useState(false);const [creatingSnapshot, setCreatingSnapshot] = useState(false);const [showEnvModal, setShowEnvModal] = useState(false);const [syncingAll, setSyncingAll] = useState(false);@@ -1776,15 +1821,6 @@ const OverviewTab = ({ site, onUpdate }) => {const [analytics, setAnalytics] = useState(null);const [uptime, setUptime] = useState(null);- // Live WP-CLI info (core version + update availability) — best-effort.- useEffect(() => {- let active = true;- wordpressApi.getWordPressInfo(site.id)- .then(data => { if (active) setWpInfo(data.info || data); })- .catch(() => { /* info is best-effort; the badge just won't show */ });- return () => { active = false; };- }, [site.id]);-// Overview KPI + traffic data: uptime (status page) + analytics (access log).// Both can be slow or unconfigured, so treat as best-effort (null → "—").useEffect(() => {@@ -1801,26 +1837,6 @@ const OverviewTab = ({ site, onUpdate }) => {return () => { cancelled = true; };}, [site.id]);- async function handleUpdateCore() {- setUpdatingCore(true);- toast.info('Updating WordPress core...', { duration: 4000 });- try {- const res = await wordpressApi.updateCore(site.id);- if (res.success === false) {- toast.error(res.error || 'Core update failed');- return;- }- toast.success(res.message || 'WordPress core updated');- const fresh = await wordpressApi.getWordPressInfo(site.id);- setWpInfo(fresh.info || fresh);- onUpdate?.();- } catch (err) {- toast.error(err.message || 'Core update failed');- } finally {- setUpdatingCore(false);- }- }-async function handleQuickSnapshot() {setCreatingSnapshot(true);toast.info('Creating snapshot...', { duration: 2000 });@@ -1952,53 +1968,6 @@ const OverviewTab = ({ site, onUpdate }) => {}}- async function handleArchive() {- const ok = await confirm({- title: 'Archive Site',- message: `Stop and archive "${site.name}"? Containers are stopped but all files and the database are kept. You can unarchive it later.`,- confirmText: 'Archive',- variant: 'warning',- });- if (!ok) return;- setArchiving(true);- toast.info('Archiving site...', { duration: 3000 });- try {- await wordpressApi.archiveSite(site.id);- toast.success('Site archived');- onUpdate?.();- } catch (err) {- toast.error(err.message || 'Failed to archive site');- } finally {- setArchiving(false);- }- }-- async function handleUnarchive() {- setArchiving(true);- toast.info('Unarchiving site...', { duration: 3000 });- try {- await wordpressApi.unarchiveSite(site.id);- toast.success('Site unarchived');- onUpdate?.();- } catch (err) {- toast.error(err.message || 'Failed to unarchive site');- } finally {- setArchiving(false);- }- }-- async function handleDelete(createBackup) {- toast.info(createBackup ? 'Creating final backup and deleting site...' : 'Deleting site...', { duration: 5000 });- try {- await wordpressApi.deleteSite(site.id, { createBackup });- toast.success('Site deleted');- setShowDeleteModal(false);- navigate('/wordpress');- } catch (err) {- toast.error(err.message || 'Failed to delete site');- }- }-async function handleSearchReplace(data) {// data = { search, replace, dry_run }toast.info(data.dry_run ? 'Running search-replace preview...' : 'Running search-replace...', { duration: 3000 });@@ -2023,10 +1992,6 @@ const OverviewTab = ({ site, onUpdate }) => {return `${n}`;};const [diskVal, diskUnit] = (site.disk_usage_human || '').split(' ');- const primaryDomain =- (site.application?.domains?.find((d) => d.is_primary) || site.application?.domains?.[0])?.name- || (site.url ? site.url.replace(/^https?:\/\//, '').replace(/\/$/, '') : '—');- const isHttps = (site.url || '').startsWith('https://');const trafficSeries = analytics?.series || [];const fmtTrafficTick = (iso) => new Date(iso).toLocaleDateString([], { month: 'short', day: 'numeric' });@@ -2066,146 +2031,6 @@ const OverviewTab = ({ site, onUpdate }) => {</div><div className="wp-overview-main">- <div className="app-panel">- <div className="app-panel-header">Site information</div>- <div className="app-panel-body">- <div className="app-info-grid">- <div className="app-info-item">- <span className="app-info-label">Primary domain</span>- <span className="app-info-value mono">{primaryDomain}</span>- </div>- <div className="app-info-item">- <span className="app-info-label">WordPress</span>- <span className="app-info-value">- {wpInfo?.version || site.wp_version || 'Unknown'}- {wpInfo?.update_available && (- <>- <span className="wp-update-badge">- Update available{wpInfo.latest_version ? `: ${wpInfo.latest_version}` : ''}- </span>- <Button variant="outline" size="sm" onClick={handleUpdateCore} disabled={updatingCore}>- {updatingCore ? 'Updating...' : 'Update'}- </Button>- </>- )}- </span>- </div>- <div className="app-info-item">- <span className="app-info-label">PHP</span>- <span className="app-info-value">{site.application?.php_version || '—'}</span>- </div>- <div className="app-info-item">- <span className="app-info-label">SSL</span>- <span className="app-info-value">{isHttps ? 'Enabled' : 'Not configured'}</span>- </div>- <div className="app-info-item">- <span className="app-info-label">Multisite</span>- <span className="app-info-value">{site.multisite ? 'Yes' : 'No'}</span>- </div>- <div className="app-info-item">- <span className="app-info-label">Admin user</span>- <span className="app-info-value">{site.admin_user || '-'}</span>- </div>- <div className="app-info-item full-width">- <span className="app-info-label">Admin email</span>- <span className="app-info-value">{site.admin_email || '-'}</span>- </div>- {site.created_at && (- <div className="app-info-item">- <span className="app-info-label">Created</span>- <span className="app-info-value">{new Date(site.created_at).toLocaleDateString()}</span>- </div>- )}- </div>- </div>- </div>-- <div className="app-panel wp-traffic-panel">- <div className="app-panel-header">- Traffic- <span className="wp-panel-sub">Last 7 days · unique visits</span>- </div>- <div className="app-panel-body">- {trafficSeries.length > 0 ? (- <ResponsiveContainer width="100%" height={250}>- <AreaChart data={trafficSeries} margin={{ top: 8, right: 8, left: 0, bottom: 0 }}>- <defs>- <linearGradient id="wpOvVisits" x1="0" y1="0" x2="0" y2="1">- <stop offset="5%" stopColor="#6d7cff" stopOpacity={0.35} />- <stop offset="95%" stopColor="#6d7cff" stopOpacity={0} />- </linearGradient>- </defs>- <CartesianGrid strokeDasharray="3 3" stroke="#888" strokeOpacity={0.15} />- <XAxis dataKey="hour" tickFormatter={fmtTrafficTick} tick={{ fontSize: 11, fill: '#888' }} minTickGap={28} axisLine={false} tickLine={false} />- <YAxis allowDecimals={false} tickFormatter={(v) => (v >= 1000 ? `${(v / 1000).toFixed(0)}k` : `${v}`)} tick={{ fontSize: 11, fill: '#888' }} width={34} axisLine={false} tickLine={false} />- <Tooltip labelFormatter={fmtTrafficTick} />- <Area type="monotone" dataKey="requests" name="Visits" stroke="#8b93ff" fill="url(#wpOvVisits)" strokeWidth={2} />- </AreaChart>- </ResponsiveContainer>- ) : (- <p className="hint">No traffic recorded for this period yet — it's parsed from the site's access log.</p>- )}- </div>- </div>- </div>-- <div className="app-panel wp-activity-panel">- <div className="app-panel-header">Recent activity</div>- <div className="app-panel-body">- <ActivityFeed projectId={site.id} limit={6} />- </div>- </div>-- <div className="app-overview-grid">- <div className="app-overview-left">-- {/* Database Configuration, Site Health & Git Integration moved off the- Overview — that data lives in the Database / Uptime / Git tabs, and the- Overview now leads with KPIs + Site info + Traffic + Recent activity. */}-- <SiteSSLPanel site={site} />-- <div className="app-panel">- <div className="app-panel-header">Danger Zone</div>- <div className="app-panel-body">- {site.status === 'archived' ? (- <DangerZone- title="Unarchive Site"- description="Restart this site's containers and bring it back online."- action={(- <Button variant="outline" onClick={handleUnarchive} disabled={archiving}>- <Archive size={16} />- {archiving ? 'Unarchiving...' : 'Unarchive'}- </Button>- )}- />- ) : (- <DangerZone- title="Archive Site"- description="Stop the containers but keep all files and the database. Reversible."- action={(- <Button variant="outline" onClick={handleArchive} disabled={archiving}>- <Archive size={16} />- {archiving ? 'Archiving...' : 'Archive'}- </Button>- )}- />- )}- <DangerZone- title="Delete Site"- description="Permanently remove this site, all environments, files and databases. A final backup is taken by default."- action={(- <Button variant="destructive" onClick={() => setShowDeleteModal(true)}>- <Trash2 size={16} />- Delete Site- </Button>- )}- />- </div>- </div>- </div>-- <div className="app-overview-right"><div className="app-panel"><div className="app-panel-header">Quick Actions</div><div className="app-panel-body">@@ -2307,6 +2132,41 @@ const OverviewTab = ({ site, onUpdate }) => {</div></div></div>++ <div className="app-panel wp-traffic-panel">+ <div className="app-panel-header">+ Traffic+ <span className="wp-panel-sub">Last 7 days · unique visits</span>+ </div>+ <div className="app-panel-body">+ {trafficSeries.length > 0 ? (+ <ResponsiveContainer width="100%" height={250}>+ <AreaChart data={trafficSeries} margin={{ top: 8, right: 8, left: 0, bottom: 0 }}>+ <defs>+ <linearGradient id="wpOvVisits" x1="0" y1="0" x2="0" y2="1">+ <stop offset="5%" stopColor="#6d7cff" stopOpacity={0.35} />+ <stop offset="95%" stopColor="#6d7cff" stopOpacity={0} />+ </linearGradient>+ </defs>+ <CartesianGrid strokeDasharray="3 3" stroke="#888" strokeOpacity={0.15} />+ <XAxis dataKey="hour" tickFormatter={fmtTrafficTick} tick={{ fontSize: 11, fill: '#888' }} minTickGap={28} axisLine={false} tickLine={false} />+ <YAxis allowDecimals={false} tickFormatter={(v) => (v >= 1000 ? `${(v / 1000).toFixed(0)}k` : `${v}`)} tick={{ fontSize: 11, fill: '#888' }} width={34} axisLine={false} tickLine={false} />+ <Tooltip labelFormatter={fmtTrafficTick} />+ <Area type="monotone" dataKey="requests" name="Visits" stroke="#8b93ff" fill="url(#wpOvVisits)" strokeWidth={2} />+ </AreaChart>+ </ResponsiveContainer>+ ) : (+ <p className="hint">No traffic recorded for this period yet — it's parsed from the site's access log.</p>+ )}+ </div>+ </div>+ </div>++ <div className="app-panel wp-activity-panel">+ <div className="app-panel-header">Recent activity</div>+ <div className="app-panel-body">+ <ActivityFeed projectId={site.id} limit={6} />+ </div></div>{showEnvModal && (() => {@@ -2330,32 +2190,13 @@ const OverviewTab = ({ site, onUpdate }) => {onSubmit={handleSearchReplace}/>)}-- {showDeleteModal && (- <DeleteSiteModal- siteName={site.name}- onClose={() => setShowDeleteModal(false)}- onConfirm={handleDelete}- />- )}-- <ConfirmDialog- isOpen={confirmState.isOpen}- title={confirmState.title}- message={confirmState.message}- confirmText={confirmState.confirmText}- cancelText={confirmState.cancelText}- variant={confirmState.variant}- onConfirm={handleConfirm}- onCancel={handleCancel}- />- </div></div>);};-// SSL Certificate panel — live status + issuance for the site's primary domain-const SiteSSLPanel = ({ site }) => {+// SSL Certificate panel — guided one-click SSL that walks the user through the+// prerequisites (public domain, DNS, admin email) and then issues the cert.+const SiteSSLPanel = ({ site, onUpdate }) => {const toast = useToast();const domains = site.application?.domains || [];const primaryDomain = (domains.find(d => d.is_primary) || domains[0])?.name || null;@@ -2363,10 +2204,22 @@ const SiteSSLPanel = ({ site }) => {const isPublicDomain = !!primaryDomain&& !/^(localhost|127\.|10\.|192\.168\.|172\.(1[6-9]|2\d|3[01])\.)/.test(primaryDomain)&& primaryDomain.includes('.');+ const hasAdminEmail = !!site.admin_email;const [health, setHealth] = useState(null);const [checking, setChecking] = useState(true);const [issuing, setIssuing] = useState(false);+ // Inline domain attach state (replaces the modal for the SSL flow).+ const [attachDomain, setAttachDomain] = useState('');+ const [attaching, setAttaching] = useState(false);+ const [attachResult, setAttachResult] = useState(null);++ // Connected DNS providers + ServerKit domains so the SSL panel feels linked+ // to the rest of the app.+ const [dnsProviders, setDnsProviders] = useState([]);+ const [serverkitDomains, setServerkitDomains] = useState([]);+ const [contextLoading, setContextLoading] = useState(true);+useEffect(() => {if (!primaryDomain) { setChecking(false); return; }let cancelled = false;@@ -2384,6 +2237,26 @@ const SiteSSLPanel = ({ site }) => {return () => { cancelled = true; };}, [primaryDomain]);+ useEffect(() => {+ let cancelled = false;+ (async () => {+ setContextLoading(true);+ try {+ const [providersRes, domainsRes] = await Promise.all([+ api.getEmailDNSProviders().then(d => d.providers || []).catch(() => []),+ api.getDomains().then(d => d.domains || []).catch(() => []),+ ]);+ if (!cancelled) {+ setDnsProviders(providersRes);+ setServerkitDomains(domainsRes);+ }+ } finally {+ if (!cancelled) setContextLoading(false);+ }+ })();+ return () => { cancelled = true; };+ }, [site.id]);+async function handleEnableSSL() {if (!primaryDomain || !site.admin_email) return;setIssuing(true);@@ -2404,7 +2277,41 @@ const SiteSSLPanel = ({ site }) => {}}+ async function handleAttachDomain(e) {+ e?.preventDefault();+ const domain = attachDomain.trim();+ if (!domain || attaching) return;+ setAttaching(true);+ toast.info('Attaching domain — creating DNS and moving the site…', { duration: 5000 });+ try {+ const res = await wordpressApi.attachDomain(site.id, { domain, issueSsl: true });+ if (res.success) {+ setAttachResult(res);+ if (res.dns?.created) toast.success(`DNS A record created via ${res.dns.provider}`);+ else toast.warning('Domain attached — add the DNS record shown to finish.', { duration: 7000 });+ onUpdate?.();+ } else {+ toast.error(res.error || 'Failed to attach domain');+ }+ } catch (err) {+ toast.error(err.message || 'Failed to attach domain');+ } finally {+ setAttaching(false);+ }+ }+const issued = health?.valid;+ const attachValid = /^[a-z0-9.-]+\.[a-z]{2,}$/i.test(attachDomain.trim());++ const CheckItem = ({ ok, label }) => (+ <div className="ssl-check-item">+ {ok ? <CircleCheck size={14} className="ssl-check-icon ssl-check-icon--ok" /> : <CircleX size={14} className="ssl-check-icon ssl-check-icon--missing" />}+ <span className={ok ? 'ssl-check-label ssl-check-label--ok' : 'ssl-check-label'}>{label}</span>+ </div>+ );++ const rec = attachResult?.dns?.record;+return (<div className="app-panel"><div className="app-panel-header"><Lock size={16} /> SSL Certificate</div>@@ -2438,14 +2345,119 @@ const SiteSSLPanel = ({ site }) => {</div>)}</div>+{!isPublicDomain ? (- <p className="hint">SSL requires a public domain pointed at this server. This site is on <code>{primaryDomain || 'localhost'}</code>, so a certificate cannot be issued here. Map a public domain to the site first.</p>- ) : !site.admin_email ? (- <p className="hint">Set an admin email on the site before requesting a certificate.</p>+ <div className="ssl-guide">+ <p className="hint">SSL requires a public domain pointed at this server. This site is on <code>{primaryDomain || 'localhost'}</code>, so a certificate cannot be issued here.</p>+ <div className="ssl-checklist">+ <CheckItem ok={false} label="Public domain mapped to this site" />+ <CheckItem ok={hasAdminEmail} label="Admin email set for certificate expiry notices" />+ </div>++ {!attachResult ? (+ <form className="ssl-inline-attach" onSubmit={handleAttachDomain}>+ {contextLoading ? (+ <p className="hint">Loading domain connections…</p>+ ) : (+ <div className="ssl-context">+ {dnsProviders.length > 0 ? (+ <div className="ssl-provider-status ssl-provider-status--ok">+ <CircleCheck size={14} />+ DNS auto-managed via {dnsProviders.map(p => p.name || p.provider).join(', ')}+ </div>+ ) : (+ <div className="ssl-provider-status ssl-provider-status--missing">+ <CircleX size={14} />+ No DNS provider connected — add Cloudflare/Route53/etc. for automatic records, or add the DNS record manually after attaching.+ </div>+ )}+ <div className="ssl-context-links">+ <Link to="/settings/connections">DNS connections</Link>+ <span>·</span>+ <Link to="/domains">Manage domains</Link>+ </div>+ </div>+ )}++ <div className="form-group">+ <Label>Domain</Label>+ <Input+ type="text"+ value={attachDomain}+ onChange={(e) => setAttachDomain(e.target.value)}+ placeholder="example.com"+ disabled={attaching}+ list="ssl-existing-domains"+ />+ <datalist id="ssl-existing-domains">+ {serverkitDomains+ .filter(d => !domains.some(ad => ad.name === d.name))+ .map(d => (+ <option key={d.id} value={d.name}>+ {d.ssl_enabled ? 'SSL enabled' : 'No SSL'}+ </option>+ ))}+ </datalist>+ <span className="form-hint">Pick an existing ServerKit domain or type one you control, without http://</span>+ </div>+ <div className="app-detail-actions">+ <Button type="submit" disabled={!attachValid || attaching}>+ <Globe size={14} />+ {attaching ? 'Attaching…' : 'Attach Domain & Enable SSL'}+ </Button>+ </div>+ </form>+ ) : (+ <div className="ssl-attach-result">+ <div className="ssl-attach-result__success">+ <CircleCheck size={16} />+ Site is now at <code>{attachResult.url}</code>+ </div>+ {attachResult.dns?.created ? (+ <p className="hint">DNS A record created automatically via {attachResult.dns.provider}{attachResult.dns.zone ? ` (zone ${attachResult.dns.zone})` : ''}.</p>+ ) : (+ <div className="ssl-attach-result__manual">+ <strong>Add this DNS record to finish:</strong>+ {rec?.value ? (+ <code className="ssl-attach-result__record">{rec.type} {rec.name} → {rec.value}</code>+ ) : (+ <p className="hint">{attachResult.dns?.message}</p>+ )}+ </div>+ )}+ {attachResult.warning && <p className="hint">{attachResult.warning}</p>}+ </div>+ )}+ </div>+ ) : !hasAdminEmail ? (+ <div className="ssl-guide">+ <p className="hint">A public domain is configured, but an admin email is required before requesting a certificate.</p>+ <div className="ssl-checklist">+ <CheckItem ok label={`Domain ${primaryDomain} configured`} />+ <CheckItem ok={false} label="Admin email set" />+ </div>+ <p className="hint">Update the site's admin email in Settings → General, then return here to enable SSL.</p>+ </div>) : (- <Button onClick={handleEnableSSL} disabled={issuing} className="ssl-action-btn">- <Lock size={14} /> {issuing ? 'Requesting...' : issued ? 'Re-issue Certificate' : 'Enable SSL'}- </Button>+ <div className="ssl-guide">+ {issued ? (+ <p className="hint">This site is secured with a valid SSL certificate. You can re-issue it if needed.</p>+ ) : (+ <>+ <p className="hint">Everything is ready. One click will request a free certificate from Let's Encrypt and configure the server.</p>+ <div className="ssl-checklist">+ <CheckItem ok label={`Domain ${primaryDomain} configured`} />+ <CheckItem ok label="Admin email set" />+ </div>+ </>+ )}+ <div className="app-detail-actions">+ <Button onClick={handleEnableSSL} disabled={issuing}>+ {issued ? <Shield size={14} /> : <Lock size={14} />}+ {issuing ? 'Requesting...' : issued ? 'Re-issue Certificate' : 'Enable SSL'}+ </Button>+ </div>+ </div>)}</div></div>@@ -3749,6 +3761,128 @@ const GeneralSettings = ({ onAddDomain, onChangeUrl, onClone }) => (</div>);+// Danger Zone settings — destructive site-level actions moved out of the+// Overview tab into Settings so the daily dashboard isn't dominated by them.+const DangerZoneSettings = ({ site, onUpdate }) => {+ const toast = useToast();+ const navigate = useNavigate();+ const { confirm, confirmState, handleConfirm, handleCancel } = useConfirm();+ const [archiving, setArchiving] = useState(false);+ const [showDeleteModal, setShowDeleteModal] = useState(false);++ async function handleArchive() {+ const ok = await confirm({+ title: 'Archive Site',+ message: `Stop and archive "${site.name}"? Containers are stopped but all files and the database are kept. You can unarchive it later.`,+ confirmText: 'Archive',+ variant: 'warning',+ });+ if (!ok) return;+ setArchiving(true);+ toast.info('Archiving site...', { duration: 3000 });+ try {+ await wordpressApi.archiveSite(site.id);+ toast.success('Site archived');+ onUpdate?.();+ } catch (err) {+ toast.error(err.message || 'Failed to archive site');+ } finally {+ setArchiving(false);+ }+ }++ async function handleUnarchive() {+ setArchiving(true);+ toast.info('Unarchiving site...', { duration: 3000 });+ try {+ await wordpressApi.unarchiveSite(site.id);+ toast.success('Site unarchived');+ onUpdate?.();+ } catch (err) {+ toast.error(err.message || 'Failed to unarchive site');+ } finally {+ setArchiving(false);+ }+ }++ async function handleDelete(createBackup) {+ toast.info(createBackup ? 'Creating final backup and deleting site...' : 'Deleting site...', { duration: 5000 });+ try {+ await wordpressApi.deleteSite(site.id, { createBackup });+ toast.success('Site deleted');+ setShowDeleteModal(false);+ navigate('/wordpress');+ } catch (err) {+ toast.error(err.message || 'Failed to delete site');+ }+ }++ return (+ <>+ {confirmState.isOpen && (+ <ConfirmDialog+ isOpen={confirmState.isOpen}+ title={confirmState.title}+ message={confirmState.message}+ confirmText={confirmState.confirmText}+ variant={confirmState.variant}+ onConfirm={handleConfirm}+ onCancel={handleCancel}+ />+ )}+ {showDeleteModal && (+ <DeleteSiteModal+ siteName={site.name}+ onClose={() => setShowDeleteModal(false)}+ onConfirm={handleDelete}+ />+ )}+ <div className="app-overview-grid">+ <div className="app-overview-left">+ <div className="app-panel danger-zone-panel">+ <div className="app-panel-header">Danger Zone</div>+ <div className="app-panel-body danger-zone-body">+ {site.status === 'archived' ? (+ <DangerZone+ title="Unarchive Site"+ description="Restart this site's containers and bring it back online."+ action={(+ <Button variant="outline" onClick={handleUnarchive} disabled={archiving}>+ <Archive size={16} />+ {archiving ? 'Unarchiving...' : 'Unarchive'}+ </Button>+ )}+ />+ ) : (+ <DangerZone+ title="Archive Site"+ description="Stop the containers but keep all files and the database. Reversible."+ action={(+ <Button variant="outline" onClick={handleArchive} disabled={archiving}>+ <Archive size={16} />+ {archiving ? 'Archiving...' : 'Archive'}+ </Button>+ )}+ />+ )}+ <DangerZone+ title="Delete Site"+ description="Permanently remove this site, all environments, files and databases. A final backup is taken by default."+ action={(+ <Button variant="destructive" onClick={() => setShowDeleteModal(true)}>+ <Trash2 size={16} />+ Delete Site+ </Button>+ )}+ />+ </div>+ </div>+ </div>+ </div>+ </>+ );+};+// Grouped left nav for the Settings tab. Each item just re-renders the existing// per-feature component (passed a single `ctx`), so behavior is unchanged — only// the home moves here to keep the top tab strip short. Groups give the nav@@ -3761,16 +3895,23 @@ const WP_SETTINGS_GROUPS = [{ id: 'php', label: 'PHP', icon: Settings, render: (ctx) => <PhpTab siteId={ctx.siteId} /> },{ id: 'updates', label: 'Updates', icon: RefreshCw, render: (ctx) => <UpdatesTab siteId={ctx.siteId} /> },] },+ { label: 'Data', items: [+ { id: 'backups', label: 'Backups', icon: Archive, render: (ctx) => <BackupsTab siteId={ctx.siteId} /> },+ ] },{ label: 'Connections', items: [{ id: 'git', label: 'Git', icon: GitBranch, render: (ctx) => <GitTab siteId={ctx.siteId} site={ctx.site} onUpdate={ctx.onUpdate} /> },] },{ label: 'Security', items: [{ id: 'security', label: 'Security', icon: Lock, render: (ctx) => <SecurityTab siteId={ctx.siteId} /> },+ { id: 'ssl', label: 'SSL', icon: Shield, render: (ctx) => <SiteSSLPanel site={ctx.site} onUpdate={ctx.onUpdate} /> },{ id: 'vulnerabilities', label: 'Vulnerabilities', icon: ShieldCheck, render: (ctx) => <VulnerabilitiesTab siteId={ctx.siteId} /> },] },{ label: 'Reports', items: [{ id: 'reports', label: 'Reports', icon: FileBarChart, render: (ctx) => <ReportsTab siteId={ctx.siteId} /> },] },+ { label: 'Danger Zone', items: [+ { id: 'danger-zone', label: 'Danger Zone', icon: ShieldAlert, render: (ctx) => <DangerZoneSettings site={ctx.site} onUpdate={ctx.onUpdate} /> },+ ] },];const WP_SETTINGS_ITEMS = WP_SETTINGS_GROUPS.flatMap((g) => g.items);@@ -3811,4 +3952,15 @@ const SettingsTab = ({ siteId, site, onUpdate, onAddDomain, onChangeUrl, onClone);};+function extractRepoDisplay(url) {+ if (!url) return '';+ try {+ const cleaned = url.replace(/\.git$/, '').replace(/^https?:\/\/[^@]+@/, 'https://');+ const parts = cleaned.split(/[/:]/).filter(Boolean);+ return parts.slice(-2).join('/');+ } catch {+ return url;+ }+}+export default WordPressDetail;diff --git a/frontend/src/styles/pages/_service-detail.scss b/frontend/src/styles/pages/_service-detail.scssindex 1a8659ed..7adb2cdc 100644--- a/frontend/src/styles/pages/_service-detail.scss+++ b/frontend/src/styles/pages/_service-detail.scss@@ -818,6 +818,78 @@ h3.svc-eyebrow {min-width: auto !important;}+// ============================================+// DOMAIN & SSL PANEL (service settings)+// Mirrors the WordPress SiteSSLPanel layout so both detail pages feel the same.+// ============================================+.svc-domain-panel {+ .ssl-guide {+ display: flex;+ flex-direction: column;+ gap: $space-3;+ margin-top: $space-3;+ }++ .ssl-checklist {+ display: flex;+ flex-direction: column;+ gap: $space-2;+ padding: $space-3;+ background: var(--surface-2);+ border: 1px solid var(--border-soft);+ border-radius: var(--radius);+ }++ .ssl-check-item {+ display: flex;+ align-items: center;+ gap: $space-2;+ font-size: $font-size-sm;+ color: var(--text-dim);+ }++ .ssl-check-icon {+ flex-shrink: 0;++ &--ok { color: var(--green); }+ &--missing { color: var(--amber); }+ }++ .ssl-check-label {+ &--ok { color: var(--text); }+ }++ .ssl-inline-attach {+ display: flex;+ flex-direction: column;+ gap: $space-3;+ margin-top: $space-3;+ padding-top: $space-3;+ border-top: 1px solid var(--border-soft);+ }++ .ssl-context {+ display: flex;+ flex-direction: column;+ gap: $space-2;+ }++ .ssl-context-links {+ display: flex;+ align-items: center;+ gap: $space-2;+ font-size: $font-size-xs;+ color: var(--text-faint);++ a {+ color: var(--accent-bright);+ text-decoration: none;++ &:hover { text-decoration: underline; }+ }+ }+}+// ============================================// OVERVIEW TAB// ============================================diff --git a/frontend/src/styles/pages/_services.scss b/frontend/src/styles/pages/_services.scssindex 96dd02bf..fdaaa8f5 100644--- a/frontend/src/styles/pages/_services.scss+++ b/frontend/src/styles/pages/_services.scss@@ -1,134 +1,11 @@// ============================================// SERVICES LIST PAGE+// Shares the WordPress list layout (.wp-list) for a consistent list UX.+// Only service-specific cell bits live here (source badge, row actions).// ============================================.services-page {- &__header {- display: flex;- justify-content: space-between;- align-items: flex-start;- margin-bottom: $space-6;-- h1 {- font-size: $font-size-2xl;- font-weight: $font-weight-bold;- color: $text-primary;- margin: 0;- }- }-- &__subtitle {- color: $text-tertiary;- font-size: $font-size-sm;- margin-top: $space-1;- }-- &__filters {- display: flex;- gap: $space-3;- margin-bottom: $space-5;- }-- &__search {- flex: 1;- display: flex;- align-items: center;- gap: $space-2;- background: $bg-card;- border: 1px solid $border-default;- border-radius: $radius-lg;- padding: 0 $space-3;- transition: border-color $transition-fast;-- &:focus-within {- border-color: $accent-primary;- }-- svg {- color: $text-tertiary;- flex-shrink: 0;- }-- input {- flex: 1;- background: none;- border: none;- padding: $space-2 0;- color: $text-primary;- font-size: $font-size-sm;- outline: none;-- &::placeholder {- color: $text-tertiary;- }- }- }-- &__filter-select {- background: $bg-card;- border: 1px solid $border-default;- border-radius: $radius-lg;- padding: $space-2 $space-3;- color: $text-secondary;- font-size: $font-size-sm;- outline: none;- cursor: pointer;- min-width: 120px;-- &:focus {- border-color: $accent-primary;- }- }-- // Redesign KPI strip (replaces the StatStrip)- .svc-kpis {- display: grid;- grid-template-columns: repeat(4, 1fr);- gap: $space-4;- margin-bottom: $space-4;-- @media (max-width: $breakpoint-lg) { grid-template-columns: repeat(2, 1fr); }- @media (max-width: $breakpoint-sm) { grid-template-columns: 1fr; }- }-- // dense list (demo .dtable) — surface card around an .sk-dtable- &__tablecard {- background: var(--surface);- border: 1px solid var(--border-soft);- border-radius: var(--radius);- overflow: hidden;- }-- &__table {- td { white-space: nowrap; }-- // checkbox gutter- .services-page__ck {- width: 36px;- padding-right: 0;- }-- .services-page__th-actions { text-align: right; }-- @media (max-width: $breakpoint-md) {- // drop Source + Domain + Last Deploy on narrow screens- th:nth-child(3), td:nth-child(3),- th:nth-child(4), td:nth-child(4),- th:nth-child(6), td:nth-child(6) { display: none; }- }- }-- &__type-icon {- width: 30px;- height: 30px;- border-radius: 9px;- display: flex;- align-items: center;- justify-content: center;- flex-shrink: 0;- }-- // source badge (demo .src-badge): repo provider icon + owner/name+ // Source badge (repo / manual / upload) used inside the shared .sk-dtable.&__src-badge {display: inline-flex;align-items: center;@@ -160,62 +37,12 @@}}- &__nil { color: var(--text-ghost); }-+ // Row-level action buttons (start / stop / restart).&__actions {display: flex;gap: $space-1;justify-content: flex-end;}-- &__empty {- text-align: center;- padding: $space-16 $space-8;-- h3 {- color: $text-primary;- margin: $space-4 0 $space-2;- }-- p {- color: $text-tertiary;- margin-bottom: $space-5;- }- }-- &__empty-icon {- color: $text-tertiary;- opacity: 0.5;- }-- // Checkbox- &__checkbox {- width: 16px;- height: 16px;- accent-color: var(--accent-primary, $accent-primary);- cursor: pointer;- flex-shrink: 0;- }-- // Bulk Actions Bar- &__bulk-bar {- display: flex;- justify-content: space-between;- align-items: center;- padding: $space-3 $space-5;- background: var(--accent-glow, fade($accent-primary-raw, 8%));- border: 1px solid var(--accent-primary, $accent-primary);- border-radius: $radius-lg;- margin-bottom: $space-4;- font-size: $font-size-sm;- font-weight: $font-weight-medium;- color: $text-primary;- }-- &__bulk-actions {- display: flex;- gap: $space-2;- }}@keyframes pulse-dot {diff --git a/frontend/src/styles/pages/_wordpress.scss b/frontend/src/styles/pages/_wordpress.scssindex fe493c6e..5e641848 100644--- a/frontend/src/styles/pages/_wordpress.scss+++ b/frontend/src/styles/pages/_wordpress.scss@@ -768,8 +768,9 @@font-size: 21px;font-weight: $font-weight-semibold;letter-spacing: -0.02em;- gap: 11px;+ gap: 14px;flex-wrap: wrap;+ align-items: center;}.app-detail-subtitle {@@ -796,6 +797,83 @@}}+ // ---- Repo connection pill (mirrors service detail page) ----+ .wp-detail__repo-bar {+ display: flex;+ margin-top: -#{$space-2}; // tuck it up under the identity header a bit+ }++ .wp-detail__repo-pill {+ display: inline-flex;+ align-items: center;+ gap: $space-2;+ padding: 6px $space-3;+ background: var(--surface);+ border: 1px solid var(--border);+ border-radius: $radius-full;+ font-family: var(--mono);+ font-size: $font-size-sm;+ color: var(--text-dim);+ cursor: pointer;+ transition: border-color $transition-fast, background $transition-fast;++ svg { color: var(--text-faint); }++ &:hover {+ border-color: var(--accent-dim);+ background: var(--surface-2);+ }+ }++ .wp-detail__repo-url {+ font-size: $font-size-sm;+ color: $text-primary;+ }++ .wp-detail__repo-arrow {+ color: var(--text-ghost);+ }++ .wp-detail__repo-branch {+ font-size: $font-size-sm;+ color: var(--accent-bright);+ font-weight: $font-weight-medium;+ }++ .wp-detail__auto-deploy-badge {+ font-family: var(--mono);+ font-size: 10px;+ font-weight: $font-weight-semibold;+ letter-spacing: 0.05em;+ text-transform: uppercase;+ padding: 1px 6px;+ background: var(--green-bg);+ color: var(--green);+ border-radius: $radius-sm;+ }++ .wp-detail__connect-repo {+ display: inline-flex;+ align-items: center;+ gap: $space-2;+ padding: 6px $space-3;+ background: none;+ border: 1px dashed var(--border-strong);+ border-radius: $radius-full;+ font-size: $font-size-sm;+ color: var(--text-faint);+ cursor: pointer;+ transition: all $transition-fast;++ svg { color: var(--text-faint); }++ &:hover {+ border-color: var(--accent-dim);+ color: var(--accent-bright);+ background: var(--accent-bg-soft);+ }+ }+// ---- Tab strip (14 flat tabs — accent underline, ids untouched) ----.app-detail-tabs {gap: 2px;@@ -902,6 +980,144 @@}}+ // Danger Zone panel — stack the rows with a gap so Archive and Delete don't+ // sit flush against each other.+ .danger-zone-body {+ display: flex;+ flex-direction: column;+ gap: $space-3;++ .danger-zone {+ margin-top: 0;+ }+ }++ // SSL guided flow — checklist + primary action.+ .ssl-guide {+ display: flex;+ flex-direction: column;+ gap: $space-3;+ margin-top: $space-3;+ }++ .ssl-checklist {+ display: flex;+ flex-direction: column;+ gap: $space-2;+ padding: $space-3;+ background: var(--surface-2);+ border: 1px solid var(--border-soft);+ border-radius: var(--radius);+ }++ .ssl-check-item {+ display: flex;+ align-items: center;+ gap: $space-2;+ font-size: $font-size-sm;+ color: var(--text-dim);+ }++ .ssl-check-icon {+ flex-shrink: 0;++ &--ok { color: var(--green); }+ &--missing { color: var(--amber); }+ }++ .ssl-check-label {+ &--ok { color: var(--text); }+ }++ // Inline domain attach inside the SSL panel — no modal needed.+ .ssl-inline-attach {+ display: flex;+ flex-direction: column;+ gap: $space-3;+ margin-top: $space-3;+ padding-top: $space-3;+ border-top: 1px solid var(--border-soft);+ }++ .ssl-context {+ display: flex;+ flex-direction: column;+ gap: $space-2;+ }++ .ssl-provider-status {+ display: inline-flex;+ align-items: center;+ gap: $space-2;+ font-size: $font-size-sm;++ &--ok {+ color: var(--green);++ svg { color: var(--green); }+ }++ &--missing {+ color: var(--amber);++ svg { color: var(--amber); }+ }+ }++ .ssl-context-links {+ display: flex;+ align-items: center;+ gap: $space-2;+ font-size: $font-size-xs;+ color: var(--text-faint);++ a {+ color: var(--accent-bright);+ text-decoration: none;++ &:hover { text-decoration: underline; }+ }+ }++ .ssl-attach-result {+ display: flex;+ flex-direction: column;+ gap: $space-3;+ margin-top: $space-3;+ padding: $space-3;+ background: var(--surface-2);+ border: 1px solid var(--border-soft);+ border-radius: var(--radius);++ &__success {+ display: flex;+ align-items: center;+ gap: $space-2;+ font-size: $font-size-sm;+ color: var(--green);++ svg { color: var(--green); }+ }++ &__manual {+ display: flex;+ flex-direction: column;+ gap: $space-2;+ font-size: $font-size-sm;+ }++ &__record {+ display: block;+ padding: $space-2 $space-3;+ background: var(--surface);+ border: 1px solid var(--border-soft);+ border-radius: var(--radius);+ font-family: var(--mono);+ font-size: $font-size-xs;+ color: var(--text);+ }+ }+// ---- Info grids → k/v spec rows (.sk-info-row look, CSS-only) ----.app-info-grid {display: flex;