Compress the service overview

The KPI strip spent a full row on a status the header already shows
and three deploy counters that are usually zero. The counts move into
the Recent deployments header, and the short operational cards
(attached services, pooling, slot deploys) sit two-up instead of one
full-width row each.
This commit is contained in:
Juan Denis committed 2026-11-14 13:29:58 -05:00
1 parent 4baeec5141
commit 1183dbb99c
22 files changed
+31 -75

No files matched your search

@@ -157,7 +157,7 @@ export default function AttachmentsCard({ app }) {
const open = kinds.filter((k) => !attachedKinds.has(k));
return (
<div className="overview-tab__card overview-tab__card--full attachments">
<div className="overview-tab__card attachments">
<div className="overview-tab__card-header-row">
<h3 className="overview-tab__card-title">{t('app.attachments.title', 'Attached services')}</h3>
{open.length > 0 && (
@@ -1,6 +1,6 @@
import { useCallback, useState, useEffect } from 'react';
import { Link } from 'react-router-dom';
import { Activity, Rocket, CheckCircle2, XCircle, Globe, Database, ShieldCheck, ExternalLink } from 'lucide-react';
import { Globe, Database, ShieldCheck, ExternalLink } from 'lucide-react';
import { servicePortUrl } from '@/utils/serviceUrl';
import api from '../../services/api';
import { useDeployments } from '../../hooks/useDeployments';
@@ -14,7 +14,7 @@ import AttachmentsCard from './AttachmentsCard';
import PoolerCard from './PoolerCard';
import SlotsCard from './SlotsCard';
import HintsCard from './HintsCard';
import { KpiBand, MetricCard, Pill, Gauge, EnvTag, statusKind } from '@/components/ds';
import { Pill, Gauge, EnvTag, statusKind } from '@/components/ds';
import { usePolling } from '@/hooks/usePolling';
import { useTranslation } from 'react-i18next';
import { normalizeContainerStats, resolveAppContainerId } from '@/utils/containerMetrics';
@@ -114,34 +114,6 @@ const OverviewTab = ({ app, deployConfig }) => {
return (
<div className="overview-tab">
{/* KPI Strip */}
<KpiBand>
<MetricCard
tone={app.isRunning ? 'green' : 'amber'}
icon={<Activity size={16} />}
value={app.isRunning ? 'Live' : 'Stopped'}
label={t('common.labels.status', 'Status')}
/>
<MetricCard
tone="accent"
icon={<Rocket size={16} />}
value={deployments.length}
label={t('app.overviewTab.totalDeploys', 'Total deploys')}
/>
<MetricCard
tone="green"
icon={<CheckCircle2 size={16} />}
value={successfulDeploys.length}
label={t('app.overviewTab.successful', 'Successful')}
/>
<MetricCard
tone="red"
icon={<XCircle size={16} />}
value={failedDeploys.length}
label={t('common.state.failed', 'Failed')}
/>
</KpiBand>
<div className="overview-tab__grid">
{/* Service Info Card */}
<div className="overview-tab__card">
@@ -335,22 +307,30 @@ const OverviewTab = ({ app, deployConfig }) => {
{/* Bottleneck hints from the traffic above */}
<HintsCard app={app} />
{/* Cache / storage / queue this app uses */}
<AttachmentsCard app={app} />
{/* Short operational cards sit two-up instead of one full-width
row each; a lone or trailing odd card takes the whole row. */}
<div className="overview-tab__grid overview-tab__grid--fill">
{/* Cache / storage / queue this app uses */}
<AttachmentsCard app={app} />
{/* PgBouncer beside an installed PostgreSQL */}
<PoolerCard app={app} />
{/* PgBouncer beside an installed PostgreSQL */}
<PoolerCard app={app} />
{/* A/B slot deploys: live release, warm standby, switch back */}
<SlotsCard app={app} />
{/* A/B slot deploys: live release, warm standby, switch back */}
<SlotsCard app={app} />
</div>
{/* Recent Deployments */}
<div className="overview-tab__card overview-tab__card--full">
<div className="overview-tab__card-header-row">
<h3 className="overview-tab__card-title">{t('app.overviewTab.recentDeployments', 'Recent deployments')}</h3>
{deployments.length > 3 && (
{deployments.length > 0 && (
<span className="overview-tab__see-all">
{deployments.length} total
{t('app.overviewTab.deploySummary', '{{total}} total · {{successful}} successful · {{failed}} failed', {
total: deployments.length,
successful: successfulDeploys.length,
failed: failedDeploys.length,
})}
</span>
)}
</div>
@@ -46,7 +46,7 @@ export default function PoolerCard({ app }) {
}
return (
<div className="overview-tab__card overview-tab__card--full pooler">
<div className="overview-tab__card pooler">
<div className="overview-tab__card-header-row">
<h3 className="overview-tab__card-title">{t('app.pooler.title', 'Connection pooling')}</h3>
<Switch
@@ -100,7 +100,7 @@ export default function SlotsCard({ app }) {
}
return (
<div className="overview-tab__card overview-tab__card--full slots-card">
<div className="overview-tab__card slots-card">
<div className="overview-tab__card-header-row">
<h3 className="overview-tab__card-title">{t('app.slots.title', 'Slot deploys')}</h3>
<Pill kind={state.enabled ? 'green' : 'gray'}>
-2
View File
@@ -4290,9 +4290,7 @@
"securityPosture": "الموقف الأمني",
"serviceInfo": "معلومات الخدمة",
"startToViewMetrics": "شغّل الخدمة لعرض المقاييس.",
"successful": "ناجح",
"thisMonth": "هذا الشهر",
"totalDeploys": "إجمالي عمليات النشر",
"workers": "العمال"
},
"packagesTab": {
-2
View File
@@ -4290,9 +4290,7 @@
"securityPosture": "নিরাপত্তা ভঙ্গি",
"serviceInfo": "পরিষেবা তথ্য",
"startToViewMetrics": "মেট্রিক দেখতে পরিষেবাটি চালু করুন।",
"successful": "সফল",
"thisMonth": "এই মাসে",
"totalDeploys": "মোট স্থাপনা",
"workers": "ওয়ার্কার"
},
"packagesTab": {
-2
View File
@@ -4290,9 +4290,7 @@
"securityPosture": "Sicherheitslage",
"serviceInfo": "Service-Info",
"startToViewMetrics": "Starten Sie den Dienst, um Metriken anzuzeigen.",
"successful": "Erfolgreich",
"thisMonth": "diesen Monat",
"totalDeploys": "Gesamtzahl der Bereitstellungen",
"workers": "Worker"
},
"packagesTab": {
+5 -2
View File
@@ -4385,6 +4385,7 @@
"checksNeedAttention_one": "1 check needs attention.",
"checksNeedAttention_other": "{{count}} checks need attention.",
"computing": "Computing…",
"deploySummary": "{{total}} total · {{successful}} successful · {{failed}} failed",
"deploymentNumber": "Deployment #{{number}}",
"deployments": "Deployments",
"enableAlerts": "Enable alerts",
@@ -4420,9 +4421,7 @@
"securityPosture": "Security posture",
"serviceInfo": "Service info",
"startToViewMetrics": "Start the service to view metrics.",
"successful": "Successful",
"thisMonth": "this month",
"totalDeploys": "Total deploys",
"workers": "Workers"
},
"packagesTab": {
@@ -5534,6 +5533,7 @@
"alerts": "Alerts",
"areYouSureYouWantTo": "Remove this server? This can't be undone.",
"backToServers": "Back to servers",
"connect": "Connect",
"copyServerId": "Copy server ID",
"cron": "Cron",
"errorLoadingServer": "Couldn't load the server.",
@@ -5541,11 +5541,14 @@
"failedToPingServer": "Couldn't ping the server.",
"failedToRemoveServer": "Couldn't remove the server.",
"failedToResolveAlert": "Couldn't resolve the alert.",
"generateConnectionString": "Generate connection string",
"lastSeen": "last seen",
"limitedMode": "Limited mode",
"loadingServerDetails": "Loading server details",
"metrics": "Metrics",
"moreActions": "More actions",
"noEndpointConfigured": "No endpoint configured",
"openTerminal": "Terminal",
"packages": "Packages",
"pendingPairing": "Pending pairing",
"ping": "Ping",
-2
View File
@@ -4291,9 +4291,7 @@
"securityPosture": "Postura de seguridad",
"serviceInfo": "Información del servicio",
"startToViewMetrics": "Inicia el servicio para ver las métricas.",
"successful": "Exitosos",
"thisMonth": "este mes",
"totalDeploys": "Despliegues totales",
"workers": "Workers"
},
"packagesTab": {
-2
View File
@@ -4290,9 +4290,7 @@
"securityPosture": "Posture de sécurité",
"serviceInfo": "Informations sur les services",
"startToViewMetrics": "Démarrez le service pour voir les métriques.",
"successful": "Réussi",
"thisMonth": "ce mois-ci",
"totalDeploys": "Total des déploiements",
"workers": "Workers"
},
"packagesTab": {
-2
View File
@@ -4290,9 +4290,7 @@
"securityPosture": "Postur keamanan",
"serviceInfo": "Informasi Layanan",
"startToViewMetrics": "Mulai layanan untuk melihat metrik.",
"successful": "Berhasil",
"thisMonth": "bulan ini",
"totalDeploys": "Total Penerapan",
"workers": "Pekerja"
},
"packagesTab": {
-2
View File
@@ -4290,9 +4290,7 @@
"securityPosture": "Atteggiamento di sicurezza",
"serviceInfo": "Informazioni sul servizio",
"startToViewMetrics": "Avvia il servizio per vedere le metriche.",
"successful": "Riuscito",
"thisMonth": "questo mese",
"totalDeploys": "Distribuzioni totali",
"workers": "Worker"
},
"packagesTab": {
-2
View File
@@ -4290,9 +4290,7 @@
"securityPosture": "보안 태세",
"serviceInfo": "서비스 정보",
"startToViewMetrics": "메트릭을 보려면 서비스를 시작하세요.",
"successful": "성공",
"thisMonth": "이번 달",
"totalDeploys": "총 배포",
"workers": "워커"
},
"packagesTab": {
-2
View File
@@ -4290,9 +4290,7 @@
"securityPosture": "Postawa bezpieczeństwa",
"serviceInfo": "Informacje o usłudze",
"startToViewMetrics": "Uruchom usługę, aby zobaczyć metryki.",
"successful": "Udany",
"thisMonth": "w tym miesiącu",
"totalDeploys": "Łączna liczba wdrożeń",
"workers": "Procesy robocze"
},
"packagesTab": {
-2
View File
@@ -4290,9 +4290,7 @@
"securityPosture": "Postura de segurança",
"serviceInfo": "Informações de serviço",
"startToViewMetrics": "Inicie o serviço para ver as métricas.",
"successful": "Bem sucedido",
"thisMonth": "este mês",
"totalDeploys": "Total de implantações",
"workers": "Workers"
},
"packagesTab": {
-2
View File
@@ -4290,9 +4290,7 @@
"securityPosture": "Положение безопасности",
"serviceInfo": "Информация о сервисе",
"startToViewMetrics": "Запустите сервис, чтобы увидеть метрики.",
"successful": "Успешный",
"thisMonth": "в этом месяце",
"totalDeploys": "Всего развертываний",
"workers": "Рабочие процессы"
},
"packagesTab": {
-2
View File
@@ -4290,9 +4290,7 @@
"securityPosture": "ท่าทางการรักษาความปลอดภัย",
"serviceInfo": "ข้อมูลการบริการ",
"startToViewMetrics": "เริ่มบริการเพื่อดูเมตริก",
"successful": "ประสบความสำเร็จ",
"thisMonth": "เดือนนี้",
"totalDeploys": "การปรับใช้ทั้งหมด",
"workers": "เวิร์กเกอร์"
},
"packagesTab": {
-2
View File
@@ -4290,9 +4290,7 @@
"securityPosture": "Güvenlik duruşu",
"serviceInfo": "Servis Bilgisi",
"startToViewMetrics": "Metrikleri görmek için hizmeti başlatın.",
"successful": "Başarılı",
"thisMonth": "bu ay",
"totalDeploys": "Toplam Dağıtımlar",
"workers": "İşçiler"
},
"packagesTab": {
-2
View File
@@ -4290,9 +4290,7 @@
"securityPosture": "Tư thế an ninh",
"serviceInfo": "Thông tin dịch vụ",
"startToViewMetrics": "Khởi động dịch vụ để xem số liệu.",
"successful": "Thành công",
"thisMonth": "tháng này",
"totalDeploys": "Tổng số lần triển khai",
"workers": "Worker"
},
"packagesTab": {
-2
View File
@@ -4290,9 +4290,7 @@
"securityPosture": "安全态势",
"serviceInfo": "服务信息",
"startToViewMetrics": "启动服务以查看指标。",
"successful": "成功的",
"thisMonth": "本月",
"totalDeploys": "部署总数",
"workers": "工作进程"
},
"packagesTab": {
-2
View File
@@ -4290,9 +4290,7 @@
"securityPosture": "安全態勢",
"serviceInfo": "服務資訊",
"startToViewMetrics": "啟動服務以檢視指標。",
"successful": "成功",
"thisMonth": "本月",
"totalDeploys": "部署總數",
"workers": "工作程序"
},
"packagesTab": {
@@ -746,6 +746,11 @@ h3.svc-eyebrow {
@media (max-width: $breakpoint-md) {
grid-template-columns: 1fr;
}
// Cards that may or may not render: a lone card, or the odd one at
// the end, takes the whole row instead of leaving a hole beside it.
&--fill > :last-child:nth-child(odd) { grid-column: 1 / -1; }
&--fill:empty { display: none; }
}
&__card {