fix(dashboard): trim health view noise
This commit is contained in:
@@ -701,15 +701,13 @@ function HealthPanel({
|
|||||||
).length;
|
).length;
|
||||||
const healthLevel: HealthLevel =
|
const healthLevel: HealthLevel =
|
||||||
down > 0 ? 'down' : stale > 0 || ciFailures > 0 ? 'stale' : 'ok';
|
down > 0 ? 'down' : stale > 0 || ciFailures > 0 ? 'stale' : 'ok';
|
||||||
|
const affectedServices = serviceLevels.filter((item) => item.level !== 'ok');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="health-board">
|
<div className="health-board">
|
||||||
<section className={`health-overview health-${healthLevel}`}>
|
<section className={`health-overview health-${healthLevel}`}>
|
||||||
<div>
|
|
||||||
<span className="eyebrow">{t.health.system}</span>
|
<span className="eyebrow">{t.health.system}</span>
|
||||||
<strong>{t.health.levels[healthLevel]}</strong>
|
<strong>{t.health.levels[healthLevel]}</strong>
|
||||||
</div>
|
|
||||||
<p>{t.health.summary}</p>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section className="health-signals" aria-label={t.health.signals}>
|
<section className="health-signals" aria-label={t.health.signals}>
|
||||||
@@ -745,14 +743,17 @@ function HealthPanel({
|
|||||||
|
|
||||||
{services.length === 0 ? (
|
{services.length === 0 ? (
|
||||||
<EmptyState>{t.service.empty}</EmptyState>
|
<EmptyState>{t.service.empty}</EmptyState>
|
||||||
) : (
|
) : affectedServices.length === 0 ? null : (
|
||||||
|
<details className="health-service-details">
|
||||||
|
<summary>
|
||||||
|
{t.health.affectedServices}
|
||||||
|
<strong>{affectedServices.length}</strong>
|
||||||
|
</summary>
|
||||||
<div className="health-service-list">
|
<div className="health-service-list">
|
||||||
{serviceLevels.map(({ service, level, age }) => (
|
{affectedServices.map(({ service, level, age }) => (
|
||||||
<article className="health-service" key={service.serviceId}>
|
<article className="health-service" key={service.serviceId}>
|
||||||
<div>
|
<div>
|
||||||
<span className="eyebrow">{service.agentType}</span>
|
<strong>{service.assistantName || service.serviceId}</strong>
|
||||||
<strong>{service.assistantName}</strong>
|
|
||||||
<small>{service.serviceId}</small>
|
|
||||||
</div>
|
</div>
|
||||||
<span className={`pill pill-${level}`}>
|
<span className={`pill pill-${level}`}>
|
||||||
{t.health.levels[level]}
|
{t.health.levels[level]}
|
||||||
@@ -771,6 +772,7 @@ function HealthPanel({
|
|||||||
</article>
|
</article>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
</details>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -65,13 +65,13 @@ export interface Messages {
|
|||||||
};
|
};
|
||||||
health: {
|
health: {
|
||||||
system: string;
|
system: string;
|
||||||
summary: string;
|
|
||||||
signals: string;
|
signals: string;
|
||||||
services: string;
|
services: string;
|
||||||
fresh: string;
|
fresh: string;
|
||||||
stale: string;
|
stale: string;
|
||||||
queue: string;
|
queue: string;
|
||||||
ciFailures: string;
|
ciFailures: string;
|
||||||
|
affectedServices: string;
|
||||||
levels: {
|
levels: {
|
||||||
ok: string;
|
ok: string;
|
||||||
stale: string;
|
stale: string;
|
||||||
@@ -259,13 +259,13 @@ export const messages = {
|
|||||||
},
|
},
|
||||||
health: {
|
health: {
|
||||||
system: '시스템',
|
system: '시스템',
|
||||||
summary: '헬스는 heartbeat, 큐, CI 실패를 합산합니다.',
|
|
||||||
signals: '헬스 신호',
|
signals: '헬스 신호',
|
||||||
services: '서비스',
|
services: '서비스',
|
||||||
fresh: '정상 heartbeat',
|
fresh: '정상',
|
||||||
stale: '지연',
|
stale: '지연',
|
||||||
queue: '큐',
|
queue: '큐',
|
||||||
ciFailures: 'CI 실패',
|
ciFailures: 'CI 실패',
|
||||||
|
affectedServices: '이상 서비스',
|
||||||
levels: {
|
levels: {
|
||||||
ok: '정상',
|
ok: '정상',
|
||||||
stale: '주의',
|
stale: '주의',
|
||||||
@@ -437,13 +437,13 @@ export const messages = {
|
|||||||
},
|
},
|
||||||
health: {
|
health: {
|
||||||
system: 'System',
|
system: 'System',
|
||||||
summary: 'Health combines heartbeat, queue, and CI failures.',
|
|
||||||
signals: 'Health signals',
|
signals: 'Health signals',
|
||||||
services: 'Services',
|
services: 'Services',
|
||||||
fresh: 'fresh heartbeat',
|
fresh: 'Fresh',
|
||||||
stale: 'stale',
|
stale: 'stale',
|
||||||
queue: 'Queue',
|
queue: 'Queue',
|
||||||
ciFailures: 'CI failures',
|
ciFailures: 'CI failures',
|
||||||
|
affectedServices: 'Affected services',
|
||||||
levels: {
|
levels: {
|
||||||
ok: 'OK',
|
ok: 'OK',
|
||||||
stale: 'Watch',
|
stale: 'Watch',
|
||||||
@@ -615,13 +615,13 @@ export const messages = {
|
|||||||
},
|
},
|
||||||
health: {
|
health: {
|
||||||
system: '系统',
|
system: '系统',
|
||||||
summary: '健康状态汇总心跳、队列和 CI 失败。',
|
|
||||||
signals: '健康信号',
|
signals: '健康信号',
|
||||||
services: '服务',
|
services: '服务',
|
||||||
fresh: '心跳正常',
|
fresh: '心跳正常',
|
||||||
stale: '延迟',
|
stale: '延迟',
|
||||||
queue: '队列',
|
queue: '队列',
|
||||||
ciFailures: 'CI 失败',
|
ciFailures: 'CI 失败',
|
||||||
|
affectedServices: '异常服务',
|
||||||
levels: {
|
levels: {
|
||||||
ok: '正常',
|
ok: '正常',
|
||||||
stale: '关注',
|
stale: '关注',
|
||||||
@@ -793,13 +793,13 @@ export const messages = {
|
|||||||
},
|
},
|
||||||
health: {
|
health: {
|
||||||
system: 'システム',
|
system: 'システム',
|
||||||
summary: '状態はハートビート、キュー、CI失敗を集計します。',
|
|
||||||
signals: '状態シグナル',
|
signals: '状態シグナル',
|
||||||
services: 'サービス',
|
services: 'サービス',
|
||||||
fresh: '正常ハートビート',
|
fresh: '正常',
|
||||||
stale: '遅延',
|
stale: '遅延',
|
||||||
queue: 'キュー',
|
queue: 'キュー',
|
||||||
ciFailures: 'CI失敗',
|
ciFailures: 'CI失敗',
|
||||||
|
affectedServices: '異常サービス',
|
||||||
levels: {
|
levels: {
|
||||||
ok: '正常',
|
ok: '正常',
|
||||||
stale: '注意',
|
stale: '注意',
|
||||||
|
|||||||
@@ -813,7 +813,8 @@ progress::-moz-progress-bar {
|
|||||||
.health-signals div,
|
.health-signals div,
|
||||||
.health-overview,
|
.health-overview,
|
||||||
.inbox-card,
|
.inbox-card,
|
||||||
.health-service {
|
.health-service,
|
||||||
|
.health-service-details {
|
||||||
border: 1px solid rgba(43, 55, 38, 0.1);
|
border: 1px solid rgba(43, 55, 38, 0.1);
|
||||||
border-radius: 18px;
|
border-radius: 18px;
|
||||||
background: rgba(255, 250, 240, 0.64);
|
background: rgba(255, 250, 240, 0.64);
|
||||||
@@ -954,23 +955,17 @@ progress::-moz-progress-bar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.health-overview {
|
.health-overview {
|
||||||
display: grid;
|
display: flex;
|
||||||
grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
|
gap: 10px;
|
||||||
gap: 14px;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 16px;
|
justify-content: space-between;
|
||||||
|
padding: 11px 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.health-overview strong {
|
.health-overview strong {
|
||||||
display: block;
|
display: block;
|
||||||
margin-top: 4px;
|
font-size: clamp(20px, 2vw, 28px);
|
||||||
font-size: clamp(24px, 3vw, 40px);
|
letter-spacing: -0.04em;
|
||||||
letter-spacing: -0.05em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.health-overview p {
|
|
||||||
margin: 0;
|
|
||||||
color: var(--muted);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.health-down {
|
.health-down {
|
||||||
@@ -986,6 +981,30 @@ progress::-moz-progress-bar {
|
|||||||
gap: 8px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.health-service-details {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.health-service-details summary {
|
||||||
|
display: flex;
|
||||||
|
min-height: 34px;
|
||||||
|
cursor: pointer;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
color: var(--bg-ink);
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 900;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.health-service-details summary::-webkit-details-marker {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.health-service-details[open] summary {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
.health-service {
|
.health-service {
|
||||||
grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 0.9fr) minmax(
|
grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 0.9fr) minmax(
|
||||||
64px,
|
64px,
|
||||||
|
|||||||
Reference in New Issue
Block a user