feat: node_discovered indicator in graph
This commit is contained in:
@@ -623,13 +623,15 @@ class TopologyViewModel extends ViewModel {
|
||||
window.wsClient.on('nodeDiscovery', (data) => {
|
||||
logger.debug('TopologyViewModel: Received WebSocket node discovery event:', data);
|
||||
|
||||
// Node discovery events are logged but no action needed
|
||||
// The subsequent clusterUpdate event will provide the updated member list
|
||||
// and update the topology through the websocket data flow
|
||||
if (data.action === 'discovered') {
|
||||
logger.debug('TopologyViewModel: Node discovered, waiting for clusterUpdate event');
|
||||
} else if (data.action === 'stale') {
|
||||
logger.debug('TopologyViewModel: Node became stale, waiting for clusterUpdate event');
|
||||
// Trigger animation for 'discovered' or 'active' actions (node is alive)
|
||||
// Skip animation for 'stale' or 'inactive' actions
|
||||
if (data.action === 'discovered' || data.action === 'active') {
|
||||
// Emit discovery animation event
|
||||
this.set('discoveryEvent', {
|
||||
nodeIp: data.nodeIp,
|
||||
timestamp: data.timestamp || new Date().toISOString(),
|
||||
action: data.action
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user