chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:08:39 +08:00
commit a0df89c693
5252 changed files with 523444 additions and 0 deletions
@@ -0,0 +1,20 @@
const statusMap = {
1: 'ok',
2: 'error',
3: 'acknowledged',
};
export class EdgeStackStatusController {
$onChanges({ stackStatus }) {
if (!stackStatus || !stackStatus.currentValue) {
return;
}
const aggregateStatus = { ok: 0, error: 0, acknowledged: 0 };
for (let endpointId in stackStatus.currentValue) {
const endpoint = stackStatus.currentValue[endpointId];
const endpointStatusKey = statusMap[endpoint.Type];
aggregateStatus[endpointStatusKey]++;
}
this.status = aggregateStatus;
}
}