Cache endpoint health as a ranked rollup
Fleet ranked endpoints by raw critical-event counts, so a machine with a noisy but harmless event log outranked one with a mapped drive down or a blocking service stopped. Volume is not severity, and the aggregation ran across the whole fleet on every page load. Rank operational blockers above degraded conditions above event noise, and cache the verdict per asset so Fleet reads a row instead of recomputing 48h of history. Transitions are written only when a verdict changes, capped at 50 rows per asset. Absence of a policy binding must never suppress a verdict: drives and events are not policy-gated, and services fall back to a built-in default impact when no mapping applies. Event 1001 drops to informational because the WER bucket pairs with 1000 and double-counted every crash. Parallelize the Fleet first-paint loaders that were awaiting serially.
This commit is contained in:
@@ -276,23 +276,26 @@ onMounted(() => {
|
||||
async function loadFilterOptions() {
|
||||
// listAll, not list: perpage is clamped to 100 server-side, so a long type or
|
||||
// location list would silently lose its tail in a dropdown.
|
||||
try {
|
||||
computertypes.value = await computersApi.types.listAll()
|
||||
} catch (error) {
|
||||
computertypes.value = []
|
||||
}
|
||||
try {
|
||||
locations.value = await locationsApi.listAll()
|
||||
} catch (error) {
|
||||
locations.value = []
|
||||
}
|
||||
// Issued together: neither list feeds the other, so awaiting them in sequence
|
||||
// only added a round trip to first paint. Each keeps its own fallback so one
|
||||
// failing dropdown does not empty the other.
|
||||
const [types, places] = await Promise.all([
|
||||
computersApi.types.listAll().catch(() => []),
|
||||
locationsApi.listAll().catch(() => [])
|
||||
])
|
||||
computertypes.value = types
|
||||
locations.value = places
|
||||
}
|
||||
|
||||
async function loadSummary() {
|
||||
try {
|
||||
const response = await endpointsApi.dashboardSummary()
|
||||
// Issued together: the stability call does not depend on the summary, so
|
||||
// sequencing them just stacked the slower request behind the faster one.
|
||||
const [response, stability] = await Promise.all([
|
||||
endpointsApi.dashboardSummary(),
|
||||
endpointsApi.dashboardStability()
|
||||
])
|
||||
summary.value = response.data.data || null
|
||||
const stability = await endpointsApi.dashboardStability()
|
||||
criticalcount.value = (stability.data.data || []).length
|
||||
} catch (error) {
|
||||
// The strip is a convenience, not the page. If it fails the table still
|
||||
|
||||
Reference in New Issue
Block a user