update the value of raised alarms when pushing notifications on the dashboard; fixes #942
Costa Tsaousis (ktsaou) committed
Sep 14, 2016 at 01:10 UTC
608a8bdb1928b94ebc0512463b3b760502d8d1ee
2 files changed
+9
-2
web/dashboard.js
+8
-1
@@ -5606,9 +5606,16 @@
5606
return;
5607
}
5608
5609
+ var value = entry.value;
5610
+ if(NETDATA.alarms.current !== null) {
5611
+ var t = NETDATA.alarms.current.alarms[entry.chart + '.' + entry.name];
5612
+ if(typeof t !== 'undefined' && entry.status == t.status)
5613
+ value = t.value;
5614
+ }
5615
+
5616
var name = entry.name.replace(/_/g, ' ');
5617
var status = entry.status.toLowerCase();
5611
- var title = name + ' = ' + ((entry.value === null)?'NaN':Math.floor(entry.value)).toString() + ' ' + entry.units;
5618
+ var title = name + ' = ' + ((value === null)?'NaN':Math.floor(value)).toString() + ' ' + entry.units;
5619
var tag = entry.alarm_id;
5620
var icon = 'images/seo-performance-128.png';
5621
var interaction = false;
web/index.html
+1
-1
@@ -613,7 +613,7 @@
613
</script>
614
615
<!-- load the dashboard manager - it will do the rest -->
616
- <script type="text/javascript" src="dashboard.js?v47"></script>
616
+ <script type="text/javascript" src="dashboard.js?v48"></script>
617
</head>
618
<body data-spy="scroll" data-target="#sidebar">
619
<div id="loadOverlay" class="loadOverlay" style="background-color: #888; color: #888;">