mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-21 02:33:32 +00:00
fix: set proper connectionHealth for mock cluster nodes
Mock cluster nodes now correctly show degraded state (yellow) when some nodes are offline. This properly demonstrates the degraded cluster functionality for issue #379.
This commit is contained in:
@@ -189,6 +189,9 @@ func generateNodes(config MockConfig) []models.Node {
|
||||
node.Memory.Used = 0
|
||||
node.Memory.Usage = 0
|
||||
node.ConnectionHealth = "offline"
|
||||
} else {
|
||||
// For cluster nodes, since one is offline, the cluster is degraded
|
||||
node.ConnectionHealth = "degraded"
|
||||
}
|
||||
|
||||
nodes = append(nodes, node)
|
||||
@@ -209,6 +212,7 @@ func generateNodes(config MockConfig) []models.Node {
|
||||
node.Instance = nodeName // Standalone - instance matches name
|
||||
node.IsClusterMember = false
|
||||
node.ClusterName = "" // Empty for standalone
|
||||
node.ConnectionHealth = "healthy" // Standalone nodes are healthy if online
|
||||
nodes = append(nodes, node)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user