From 1183dbb99c2dad4927b8f75d7afe3f202941dca0 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Sat, 14 Nov 2026 13:29:58 -0500 Subject: [PATCH] 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. --- .../service-detail/AttachmentsCard.jsx | 2 +- .../components/service-detail/OverviewTab.jsx | 56 ++++++------------- .../components/service-detail/PoolerCard.jsx | 2 +- .../components/service-detail/SlotsCard.jsx | 2 +- frontend/src/i18n/locales/ar.json | 2 - frontend/src/i18n/locales/bn.json | 2 - frontend/src/i18n/locales/de.json | 2 - frontend/src/i18n/locales/en.json | 7 ++- frontend/src/i18n/locales/es.json | 2 - frontend/src/i18n/locales/fr.json | 2 - frontend/src/i18n/locales/id.json | 2 - frontend/src/i18n/locales/it.json | 2 - frontend/src/i18n/locales/ko.json | 2 - frontend/src/i18n/locales/pl.json | 2 - frontend/src/i18n/locales/pt.json | 2 - frontend/src/i18n/locales/ru.json | 2 - frontend/src/i18n/locales/th.json | 2 - frontend/src/i18n/locales/tr.json | 2 - frontend/src/i18n/locales/vi.json | 2 - frontend/src/i18n/locales/zh-Hans.json | 2 - frontend/src/i18n/locales/zh-Hant.json | 2 - .../src/styles/pages/_service-detail.scss | 5 ++ 22 files changed, 31 insertions(+), 75 deletions(-) diff --git a/frontend/src/components/service-detail/AttachmentsCard.jsx b/frontend/src/components/service-detail/AttachmentsCard.jsx index ed7051c9..398f98a1 100644 --- a/frontend/src/components/service-detail/AttachmentsCard.jsx +++ b/frontend/src/components/service-detail/AttachmentsCard.jsx @@ -157,7 +157,7 @@ export default function AttachmentsCard({ app }) { const open = kinds.filter((k) => !attachedKinds.has(k)); return ( -
+

{t('app.attachments.title', 'Attached services')}

{open.length > 0 && ( diff --git a/frontend/src/components/service-detail/OverviewTab.jsx b/frontend/src/components/service-detail/OverviewTab.jsx index 02f0cbae..e055aba7 100644 --- a/frontend/src/components/service-detail/OverviewTab.jsx +++ b/frontend/src/components/service-detail/OverviewTab.jsx @@ -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 (
- {/* KPI Strip */} - - } - value={app.isRunning ? 'Live' : 'Stopped'} - label={t('common.labels.status', 'Status')} - /> - } - value={deployments.length} - label={t('app.overviewTab.totalDeploys', 'Total deploys')} - /> - } - value={successfulDeploys.length} - label={t('app.overviewTab.successful', 'Successful')} - /> - } - value={failedDeploys.length} - label={t('common.state.failed', 'Failed')} - /> - -
{/* Service Info Card */}
@@ -335,22 +307,30 @@ const OverviewTab = ({ app, deployConfig }) => { {/* Bottleneck hints from the traffic above */} - {/* Cache / storage / queue this app uses */} - + {/* Short operational cards sit two-up instead of one full-width + row each; a lone or trailing odd card takes the whole row. */} +
+ {/* Cache / storage / queue this app uses */} + - {/* PgBouncer beside an installed PostgreSQL */} - + {/* PgBouncer beside an installed PostgreSQL */} + - {/* A/B slot deploys: live release, warm standby, switch back */} - + {/* A/B slot deploys: live release, warm standby, switch back */} + +
{/* Recent Deployments */}

{t('app.overviewTab.recentDeployments', 'Recent deployments')}

- {deployments.length > 3 && ( + {deployments.length > 0 && ( - {deployments.length} total + {t('app.overviewTab.deploySummary', '{{total}} total · {{successful}} successful · {{failed}} failed', { + total: deployments.length, + successful: successfulDeploys.length, + failed: failedDeploys.length, + })} )}
diff --git a/frontend/src/components/service-detail/PoolerCard.jsx b/frontend/src/components/service-detail/PoolerCard.jsx index 48365613..300f1116 100644 --- a/frontend/src/components/service-detail/PoolerCard.jsx +++ b/frontend/src/components/service-detail/PoolerCard.jsx @@ -46,7 +46,7 @@ export default function PoolerCard({ app }) { } return ( -
+

{t('app.pooler.title', 'Connection pooling')}

+

{t('app.slots.title', 'Slot deploys')}

diff --git a/frontend/src/i18n/locales/ar.json b/frontend/src/i18n/locales/ar.json index 4ef7d33c..4dafa187 100644 --- a/frontend/src/i18n/locales/ar.json +++ b/frontend/src/i18n/locales/ar.json @@ -4290,9 +4290,7 @@ "securityPosture": "الموقف الأمني", "serviceInfo": "معلومات الخدمة", "startToViewMetrics": "شغّل الخدمة لعرض المقاييس.", - "successful": "ناجح", "thisMonth": "هذا الشهر", - "totalDeploys": "إجمالي عمليات النشر", "workers": "العمال" }, "packagesTab": { diff --git a/frontend/src/i18n/locales/bn.json b/frontend/src/i18n/locales/bn.json index f78e8750..37123ea9 100644 --- a/frontend/src/i18n/locales/bn.json +++ b/frontend/src/i18n/locales/bn.json @@ -4290,9 +4290,7 @@ "securityPosture": "নিরাপত্তা ভঙ্গি", "serviceInfo": "পরিষেবা তথ্য", "startToViewMetrics": "মেট্রিক দেখতে পরিষেবাটি চালু করুন।", - "successful": "সফল", "thisMonth": "এই মাসে", - "totalDeploys": "মোট স্থাপনা", "workers": "ওয়ার্কার" }, "packagesTab": { diff --git a/frontend/src/i18n/locales/de.json b/frontend/src/i18n/locales/de.json index d6b1b934..3f447879 100644 --- a/frontend/src/i18n/locales/de.json +++ b/frontend/src/i18n/locales/de.json @@ -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": { diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index adb3d63d..01865912 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -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", diff --git a/frontend/src/i18n/locales/es.json b/frontend/src/i18n/locales/es.json index 5ee0411c..e18271e6 100644 --- a/frontend/src/i18n/locales/es.json +++ b/frontend/src/i18n/locales/es.json @@ -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": { diff --git a/frontend/src/i18n/locales/fr.json b/frontend/src/i18n/locales/fr.json index f51ac774..20c9a802 100644 --- a/frontend/src/i18n/locales/fr.json +++ b/frontend/src/i18n/locales/fr.json @@ -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": { diff --git a/frontend/src/i18n/locales/id.json b/frontend/src/i18n/locales/id.json index 9924b9f7..9f3b49a7 100644 --- a/frontend/src/i18n/locales/id.json +++ b/frontend/src/i18n/locales/id.json @@ -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": { diff --git a/frontend/src/i18n/locales/it.json b/frontend/src/i18n/locales/it.json index 3f5560c9..d160e4ba 100644 --- a/frontend/src/i18n/locales/it.json +++ b/frontend/src/i18n/locales/it.json @@ -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": { diff --git a/frontend/src/i18n/locales/ko.json b/frontend/src/i18n/locales/ko.json index a96d1494..a43ba1b0 100644 --- a/frontend/src/i18n/locales/ko.json +++ b/frontend/src/i18n/locales/ko.json @@ -4290,9 +4290,7 @@ "securityPosture": "보안 태세", "serviceInfo": "서비스 정보", "startToViewMetrics": "메트릭을 보려면 서비스를 시작하세요.", - "successful": "성공", "thisMonth": "이번 달", - "totalDeploys": "총 배포", "workers": "워커" }, "packagesTab": { diff --git a/frontend/src/i18n/locales/pl.json b/frontend/src/i18n/locales/pl.json index 5e3b8e3f..6334d872 100644 --- a/frontend/src/i18n/locales/pl.json +++ b/frontend/src/i18n/locales/pl.json @@ -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": { diff --git a/frontend/src/i18n/locales/pt.json b/frontend/src/i18n/locales/pt.json index b855edc3..07f55f45 100644 --- a/frontend/src/i18n/locales/pt.json +++ b/frontend/src/i18n/locales/pt.json @@ -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": { diff --git a/frontend/src/i18n/locales/ru.json b/frontend/src/i18n/locales/ru.json index c3f767dc..5d17f9c0 100644 --- a/frontend/src/i18n/locales/ru.json +++ b/frontend/src/i18n/locales/ru.json @@ -4290,9 +4290,7 @@ "securityPosture": "Положение безопасности", "serviceInfo": "Информация о сервисе", "startToViewMetrics": "Запустите сервис, чтобы увидеть метрики.", - "successful": "Успешный", "thisMonth": "в этом месяце", - "totalDeploys": "Всего развертываний", "workers": "Рабочие процессы" }, "packagesTab": { diff --git a/frontend/src/i18n/locales/th.json b/frontend/src/i18n/locales/th.json index 3d16e102..a2550730 100644 --- a/frontend/src/i18n/locales/th.json +++ b/frontend/src/i18n/locales/th.json @@ -4290,9 +4290,7 @@ "securityPosture": "ท่าทางการรักษาความปลอดภัย", "serviceInfo": "ข้อมูลการบริการ", "startToViewMetrics": "เริ่มบริการเพื่อดูเมตริก", - "successful": "ประสบความสำเร็จ", "thisMonth": "เดือนนี้", - "totalDeploys": "การปรับใช้ทั้งหมด", "workers": "เวิร์กเกอร์" }, "packagesTab": { diff --git a/frontend/src/i18n/locales/tr.json b/frontend/src/i18n/locales/tr.json index 63d0b837..0a018a06 100644 --- a/frontend/src/i18n/locales/tr.json +++ b/frontend/src/i18n/locales/tr.json @@ -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": { diff --git a/frontend/src/i18n/locales/vi.json b/frontend/src/i18n/locales/vi.json index f4ac45a7..08283584 100644 --- a/frontend/src/i18n/locales/vi.json +++ b/frontend/src/i18n/locales/vi.json @@ -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": { diff --git a/frontend/src/i18n/locales/zh-Hans.json b/frontend/src/i18n/locales/zh-Hans.json index 312b764e..af8755f4 100644 --- a/frontend/src/i18n/locales/zh-Hans.json +++ b/frontend/src/i18n/locales/zh-Hans.json @@ -4290,9 +4290,7 @@ "securityPosture": "安全态势", "serviceInfo": "服务信息", "startToViewMetrics": "启动服务以查看指标。", - "successful": "成功的", "thisMonth": "本月", - "totalDeploys": "部署总数", "workers": "工作进程" }, "packagesTab": { diff --git a/frontend/src/i18n/locales/zh-Hant.json b/frontend/src/i18n/locales/zh-Hant.json index 2a4761e5..ad575c97 100644 --- a/frontend/src/i18n/locales/zh-Hant.json +++ b/frontend/src/i18n/locales/zh-Hant.json @@ -4290,9 +4290,7 @@ "securityPosture": "安全態勢", "serviceInfo": "服務資訊", "startToViewMetrics": "啟動服務以檢視指標。", - "successful": "成功", "thisMonth": "本月", - "totalDeploys": "部署總數", "workers": "工作程序" }, "packagesTab": { diff --git a/frontend/src/styles/pages/_service-detail.scss b/frontend/src/styles/pages/_service-detail.scss index b72aacc7..6e339900 100644 --- a/frontend/src/styles/pages/_service-detail.scss +++ b/frontend/src/styles/pages/_service-detail.scss @@ -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 {