]> arthur.barton.de Git - netdata.git/blobdiff - web/dashboard.js
show hostname on alarm notifications
[netdata.git] / web / dashboard.js
index a659ee74b0ae65c24317548731c64b9b94c4a5c2..22a06d31008be86e63f4f7ea7c58758625706cca 100644 (file)
@@ -15,8 +15,8 @@
 // var netdataNoRegistry = true;        // Don't update the registry for this access
 // var netdataRegistryCallback = null;  // Callback function that will be invoked with one param,
 //                                         the URLs from the registry
-// var netdataShowHelp = true;          // enable/disable help
-// var netdataShowAlarms = true;        // enable/disable help
+// var netdataShowHelp = false;         // enable/disable help (default enabled)
+// var netdataShowAlarms = true;        // enable/disable alarms checks and notifications (default disabled)
 //
 // You can also set the default netdata server, using the following.
 // When this variable is not set, we assume the page is hosted on your
@@ -50,6 +50,8 @@
     // global namespace
     var NETDATA = window.NETDATA || {};
 
+    NETDATA.hostname = 'localhost';
+
     // ----------------------------------------------------------------------------------------------------------------
     // Detect the netdata server
 
                 }
                 else NETDATA.error(406, host + '/api/v1/charts');
 
+                NETDATA.hostname = data.hostname;
+
                 if(typeof callback === 'function')
                     callback(data);
             })
 
             var name = entry.name.replace(/_/g, ' ');
             var title = name + ' = ' + ((entry.value === null)?'NaN':Math.floor(entry.value)).toString() + ' ' + entry.units;
-            var body = entry.info + ' of ' + entry.chart + ' (' + entry.family + ')';
+            var body = NETDATA.hostname + ' - ' + entry.chart + ' (' + entry.family + ') - ' + entry.status.toLowerCase() + ': ' + entry.info;
             var tag = entry.alarm_id;
             var icon = 'images/seo-performance-128.png';
             var interaction = false;