فهرست منبع

fix(l2): make alarm and offline node fills uniformly red

Use the fill colour for the thin node border too, so alarm/offline nodes have no visible red frame; only latency >5 ms keeps the 6 px red frame.
clm0081 2 روز پیش
والد
کامیت
f1309222d6
2فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 4 4
      web-modules/WecomCenter/assets/l2topology/app.js
  2. 1 1
      web-modules/WecomCenter/views/topology.view.php

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

@@ -1265,8 +1265,8 @@
       // 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.
-      if (n.alarms && n.alarms.length) { cls.push('alarm'); bg = '#E45959'; bd = '#B03A3A'; }
-      if (n.offline || n.oper === 'down') { cls.push('offline'); bg = '#C0392B'; bd = '#7B241C'; }
+      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'; }
       if (n.latency_ms != null) {
         if (+n.latency_ms > LATB) cls.push('lat-bad');
         else if (+n.latency_ms > LATW) cls.push('lat-warn');
@@ -1437,12 +1437,12 @@
       if (n.alarms && n.alarms.length) {
         cls.push('alarm');
         bg = '#E45959';
-        bd = '#B03A3A';
+        bd = '#E45959';
       }
       if (n.offline || n.oper === 'down') {
         cls.push('offline');
         bg = '#C0392B';
-        bd = '#7B241C';
+        bd = '#C0392B';
       }
       if (n.latency_ms != null) {
         if (+n.latency_ms > LATB) cls.push('lat-bad');

+ 1 - 1
web-modules/WecomCenter/views/topology.view.php

@@ -107,7 +107,7 @@ window.L2_META = {
 };
 </script>
 <script src="<?php echo $base; ?>cytoscape.min.js"></script>
-<script src="<?php echo $base; ?>app.js?v=202611051900"></script>
+<script src="<?php echo $base; ?>app.js?v=202611051905"></script>
 <script>
 (function(){
   var tabs = document.querySelectorAll('.side-tab');