mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-19 23:06:49 +00:00
feat(fleet): aggregate labels across nodes and allow remote edits (#710)
Labels settings are now visible on remote nodes (scope: node, no longer hidden on remote context). The LabelsSection already routes through the active-node proxy, so edits land on whichever node the operator is viewing. Fleet overview's label filter previously fetched only the control-plane node's labels and assignments, so remote stacks could never match the filter. Rewrote aggregation to fan out /labels and /labels/assignments to every online node via fetchForNode + Promise.allSettled with a 5s timeout per request. The palette dedupes by (name, color) so identical labels on multiple nodes collapse into one entry while same-name + different-color stay distinct. The assignment map is nested by nodeId to avoid cross-node stack-name collisions. Keyed the label refetch effect on a stable online-node id signature rather than the nodes array reference, so the existing 30s overview poll (and 5s fast-poll during updates) does not cascade into repeated fleet-wide label fetches.
This commit is contained in:
@@ -158,11 +158,10 @@ export const SETTINGS_ITEMS: readonly SettingsItemMeta[] = [
|
||||
id: 'labels',
|
||||
group: 'advanced',
|
||||
label: 'Labels',
|
||||
description: 'Shared labels for stacks, containers, and nodes.',
|
||||
description: 'Per-node labels for stacks and containers.',
|
||||
keywords: ['labels', 'tags', 'palette', 'organisation'],
|
||||
tier: 'skipper',
|
||||
scope: 'global',
|
||||
hiddenOnRemote: true,
|
||||
scope: 'node',
|
||||
},
|
||||
{
|
||||
id: 'security',
|
||||
|
||||
Reference in New Issue
Block a user