This commit is contained in:
+4
-3
@@ -932,11 +932,12 @@ function isRuntimeResourceHealthy(resource: DashboardRuntimeResource) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isIgnoredRuntimeResource(resource: DashboardRuntimeResource) {
|
function isIgnoredRuntimeResource(resource: DashboardRuntimeResource) {
|
||||||
|
if (!['Pod', 'Deployment', 'StatefulSet', 'DaemonSet'].includes(resource.kind)) return true;
|
||||||
|
|
||||||
const normalizedName = resource.name.toLowerCase();
|
const normalizedName = resource.name.toLowerCase();
|
||||||
const normalizedStatus = resource.status.toLowerCase();
|
const normalizedStatus = resource.status.toLowerCase();
|
||||||
if (resource.kind === 'Pod' && normalizedStatus === 'completed') return true;
|
if (resource.kind === 'Pod' && normalizedStatus === 'completed') return true;
|
||||||
if (resource.kind === 'Job' && ['completed', 'succeeded', 'success'].includes(normalizedStatus)) return true;
|
if (resource.kind === 'Pod' && normalizedName.includes('migration') && ['completed', 'succeeded', 'success'].includes(normalizedStatus)) {
|
||||||
if ((resource.kind === 'Pod' || resource.kind === 'Job') && normalizedName.includes('migration') && ['completed', 'succeeded', 'success'].includes(normalizedStatus)) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -1011,7 +1012,7 @@ function MetricCards({
|
|||||||
label: '런타임 정상률',
|
label: '런타임 정상률',
|
||||||
value: loading || runtimeRate === null ? '-' : `${runtimeRate}%`,
|
value: loading || runtimeRate === null ? '-' : `${runtimeRate}%`,
|
||||||
delta: countedRuntimeResources.length ? `${healthyRuntimeCount}/${countedRuntimeResources.length}` : '리소스 없음',
|
delta: countedRuntimeResources.length ? `${healthyRuntimeCount}/${countedRuntimeResources.length}` : '리소스 없음',
|
||||||
hint: '완료된 Job/마이그레이션 제외',
|
hint: 'Pod/Deployment/StatefulSet 기준',
|
||||||
tone: runtimeRate !== null && runtimeRate < 80 ? 'red' as const : 'green' as const
|
tone: runtimeRate !== null && runtimeRate < 80 ? 'red' as const : 'green' as const
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user