Bladeren bron

chore(l2): align default latency legend with 1ms threshold

clm0081 2 dagen geleden
bovenliggende
commit
25b1d5e0a8

+ 2 - 2
web-modules/WecomCenter/assets/l2topology/app.js

@@ -1346,8 +1346,8 @@ if (!colors['2500']) colors['2500'] = '#17C3B2';
       var bg = p.role === 'core' ? TIER_BG.core : (p.role === 'main' ? '#2E75B6' : (p.role === 'dist' ? TIER_BG.dist : TIER_BG.access));
       var bd = bg;
       // Alarm and offline are node-level states: fill the whole node red.
-      // Only latency > LATB is allowed to draw a red frame; 3-5 ms uses an
-      // orange frame.  Alarm must never be represented by a red border alone.
+      // Only latency > LATB is allowed to draw a red frame; LATW..LATB uses
+      // an orange frame.  Alarm must never be represented by a red border alone.
       if (n.alarms && n.alarms.length) { cls.push('alarm'); bg = '#E45959'; bd = '#E45959'; }
       if (n.offline || n.oper === 'down') { cls.push('offline'); bg = '#C0392B'; bd = '#C0392B'; }
       // Alarm/offline already owns the whole fill; do not put a latency frame

+ 1 - 1
web-modules/WecomCenter/assets/l2topology/config.json

@@ -22,7 +22,7 @@
     "unknown": "#E74C3C",
     "down": "#C0392B"
   },
-  "latency_warn": 3.0,
+  "latency_warn": 1.0,
   "latency_bad": 5.0,
   "group_rules": [
     {"match": "contains", "pattern": "DataCenter", "label": "DataCenter", "big": true},

+ 1 - 1
web-modules/WecomCenter/lib/L2Store.php

@@ -59,7 +59,7 @@ class L2Store {
 				'down'    => '#C0392B'  // 中断  红色
 			],
 			// Latency thresholds (ms) applied to switch nodes (host->switch ping)
-			'latency_warn'      => 3.0,
+			'latency_warn'      => 1.0,
 			'latency_bad'       => 5.0,
 			// Grouping rules: first matching rule wins, else "Other".
 			// match = contains | regex ; label may contain $1..$9 backrefs.