X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=web%2Findex.html;h=ea51cc13245e9364b687d4e99b14b6dd9798c9a2;hb=8463363f54890f3afca01f43119a30516834c8e4;hp=6159655c22f4846d35a417688140a0e28d08bcc9;hpb=3cc732db48c767a9176a950dddcf42b50a01ccc9;p=netdata.git
diff --git a/web/index.html b/web/index.html
index 6159655c..ea51cc13 100644
--- a/web/index.html
+++ b/web/index.html
@@ -1562,18 +1562,30 @@
function alarm_to_html(alarm, full) {
var chart = options.data.charts[alarm.chart];
+ if(typeof(chart) === 'undefined') {
+ // this means the charts loaded are incomplete
+ // probably netdata was restarted and more charts
+ // are now available.
+ return '';
+ }
+
var has_alarm = ((typeof alarm.warn !== 'undefined' || typeof alarm.crit !== 'undefined')?true:false);
- var html = '
' + alarm.chart + '
' + alarm.info + '' + role_href + ' | '
+ ''
+ ((typeof alarm.warn !== 'undefined')?('warning when | ' + alarm.warn + ' | '):'')
+ ((typeof alarm.crit !== 'undefined')?('critical when | ' + alarm.crit + ' | '):'');
if(full === true) {
- html += ((typeof alarm.lookup_after !== 'undefined')?('db lookup | ' + alarm_lookup_explain(alarm, chart) + ' | '):'')
+ var units = chart.units;
+ if(units === '%') units = '%';
+
+ html += ((typeof alarm.lookup_after !== 'undefined')?('db lookup | ' + alarm_lookup_explain(alarm, chart) + ' | '):'')
+ ((typeof alarm.calc !== 'undefined')?('calculation | ' + alarm.calc + ' | '):'')
- + ((chart.green !== null)?('green threshold | ' + chart.green + ' ' + chart.units + ' | '):'')
- + ((chart.red !== null)?('red threshold | ' + chart.red + ' ' + chart.units + ' | '):'');
+ + ((chart.green !== null)?('green threshold | ' + chart.green + ' ' + units + ' | '):'')
+ + ((chart.red !== null)?('red threshold | ' + chart.red + ' ' + units + ' | '):'');
}
var delay = '';
@@ -1850,6 +1862,23 @@
switchable: false,
sortable: true
},
+ {
+ field: 'value_string',
+ title: 'Friendly Value',
+ titleTooltip: 'The value of the alarm, that triggered this event',
+ align: 'right',
+ valign: 'middle',
+ sortable: true
+ },
+ {
+ field: 'old_value_string',
+ title: 'Friendly Old Value',
+ titleTooltip: 'The value of the alarm, just before this event',
+ align: 'right',
+ valign: 'middle',
+ visible: false,
+ sortable: true
+ },
{
field: 'old_value',
title: 'Old Value',
@@ -1871,6 +1900,7 @@
},
align: 'right',
valign: 'middle',
+ visible: false,
sortable: true
},
{
@@ -1879,6 +1909,7 @@
titleTooltip: 'The units of the value of the alarm',
align: 'left',
valign: 'middle',
+ visible: false,
sortable: true
},
{
@@ -2630,7 +2661,7 @@
});
NETDATA.requiredJs.push({
- url: NETDATA.serverDefault + 'dashboard_info.js?v20161226-1',
+ url: NETDATA.serverDefault + 'dashboard_info.js?v20170115-1',
async: false,
isAlreadyLoaded: function() { return false; }
});
@@ -2753,7 +2784,7 @@
|