MCPcopy Create free account
hub / github.com/Tong89/smartNode / utilizationRows

Function utilizationRows

frontend/tests/app.unit.test.js:63–71  ·  view source on GitHub ↗

* Build utilization row array from resource_status.summary. * Mirrors app.js `computed.utilizationRows`.

(resourceStatus)

Source from the content-addressed store, hash-verified

61 * Mirrors app.js `computed.utilizationRows`.
62 */
63function utilizationRows(resourceStatus) {
64 const summary = (resourceStatus || {}).summary || {};
65 return [
66 { key: 'satellites', label: '卫星资源', value: Number(summary.satellites_utilization || 0) },
67 { key: 'ground', label: '地面站资源', value: Number(summary.ground_stations_utilization || 0) },
68 { key: 'geo', label: '中继资源', value: Number(summary.geo_relays_utilization || 0) },
69 { key: 'overall', label: '综合占用', value: Number(summary.overall_utilization || 0) },
70 ];
71}
72
73/**
74 * Filter and sort requests: exclude background tasks, sort descending by id.

Callers 1

app.unit.test.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected