diff --git a/web/frontend/src/status/dashdetails/HealthDash.svelte b/web/frontend/src/status/dashdetails/HealthDash.svelte index 11f1ef31..b4063309 100644 --- a/web/frontend/src/status/dashdetails/HealthDash.svelte +++ b/web/frontend/src/status/dashdetails/HealthDash.svelte @@ -32,15 +32,6 @@ /* Const Init */ const client = getContextClient(); - const stateOptions = [ - "all", - "allocated", - "idle", - "down", - "mixed", - "reserved", - "unknown", - ]; const healthOptions = [ "all", "full", @@ -52,12 +43,10 @@ let pieWidth = $state(0); let querySorting = $state({ field: "startTime", type: "col", order: "DESC" }) let tableHostFilter = $state(""); - let tableStateFilter = $state(stateOptions[0]); let tableHealthFilter = $state(healthOptions[0]); let healthTableSorting = $state( { - schedulerState: { dir: "down", active: true }, - healthState: { dir: "down", active: false }, + healthState: { dir: "up", active: true }, hostname: { dir: "down", active: false }, } ); @@ -79,9 +68,7 @@ hostname cluster subCluster - schedulerState healthState - metaData healthData } } @@ -102,7 +89,7 @@ let healthTableData = $derived.by(() => { if ($statusQuery?.data) { return [...$statusQuery.data.nodes.items].sort((n1, n2) => { - return n1['schedulerState'].localeCompare(n2['schedulerState']) + return n1['healthState'].localeCompare(n2['healthState']) }); } else { return []; @@ -114,21 +101,12 @@ if (tableHostFilter != "") { pendingTableData = pendingTableData.filter((e) => e.hostname.includes(tableHostFilter)) } - if (tableStateFilter != "all") { - pendingTableData = pendingTableData.filter((e) => e.schedulerState.includes(tableStateFilter)) - } if (tableHealthFilter != "all") { pendingTableData = pendingTableData.filter((e) => e.healthState.includes(tableHealthFilter)) } return pendingTableData }); - const refinedStateData = $derived.by(() => { - return $statusQuery?.data?.nodeStates. - filter((e) => ['allocated', 'reserved', 'idle', 'mixed','down', 'unknown'].includes(e.state)). - sort((a, b) => b.count - a.count) - }); - const refinedHealthData = $derived.by(() => { return $statusQuery?.data?.nodeStates. filter((e) => ['full', 'partial', 'failed'].includes(e.state)). @@ -296,7 +274,7 @@ - sortBy('hostname')}> + sortBy('hostname')}> Hosts ({filteredTableData.length}) - - sortBy('schedulerState')}> - Scheduler State - - sortBy('healthState')}> + sortBy('healthState')}> Health State - - {#each stateOptions as so} - - {/each} - - - - - - - - - + {#each healthOptions as ho} {/each} - - - - - {#each filteredTableData as host (host.hostname)} {host.hostname} - {host.schedulerState} {host.healthState} - + {#each Object.keys(host.healthData) as hkey}

{hkey}: {host.healthData[hkey]}

{/each} - - {#each Object.keys(host.metaData) as mkey} -

- {mkey}: {host.metaData[mkey]} -

- {/each} - {/each}