@cryptotaxi247 / netdata-1 / commits / 942a95bce

show hostname on alarm notifications

Costa Tsaousis (ktsaou) committed Sep 5, 2016 at 23:08 UTC 942a95bce791372e37f2152e46b183daf0bc1e40
8 files changed +15 -11
web/dashboard.html
+1 -1
@@ -655,4 +655,4 @@ So, to avoid flashing the charts, we destroy and re-create the charts on each up
655 <!-- <script> netdataServer = "http://box:19999"; </script> -->
656
657 <!-- load the dashboard manager - it will do the rest -->
658 - <script type="text/javascript" src="dashboard.js?v44"></script>
658 + <script type="text/javascript" src="dashboard.js?v45"></script>
web/dashboard.js
+7 -3
@@ -15,8 +15,8 @@
15 // var netdataNoRegistry = true; // Don't update the registry for this access
16 // var netdataRegistryCallback = null; // Callback function that will be invoked with one param,
17 // the URLs from the registry
18 -// var netdataShowHelp = true; // enable/disable help
19 -// var netdataShowAlarms = true; // enable/disable help
18 +// var netdataShowHelp = false; // enable/disable help (default enabled)
19 +// var netdataShowAlarms = true; // enable/disable alarms checks and notifications (default disabled)
20 //
21 // You can also set the default netdata server, using the following.
22 // When this variable is not set, we assume the page is hosted on your
@@ -50,6 +50,8 @@
50 // global namespace
51 var NETDATA = window.NETDATA || {};
52
53 + NETDATA.hostname = 'localhost';
54 +
55 // ----------------------------------------------------------------------------------------------------------------
56 // Detect the netdata server
57
@@ -621,6 +623,8 @@
623 }
624 else NETDATA.error(406, host + '/api/v1/charts');
625
626 + NETDATA.hostname = data.hostname;
627 +
628 if(typeof callback === 'function')
629 callback(data);
630 })
@@ -5595,7 +5599,7 @@
5599
5600 var name = entry.name.replace(/_/g, ' ');
5601 var title = name + ' = ' + ((entry.value === null)?'NaN':Math.floor(entry.value)).toString() + ' ' + entry.units;
5598 - var body = entry.info + ' of ' + entry.chart + ' (' + entry.family + ')';
5602 + var body = NETDATA.hostname + ' - ' + entry.chart + ' (' + entry.family + ') - ' + entry.status.toLowerCase() + ': ' + entry.info;
5603 var tag = entry.alarm_id;
5604 var icon = 'images/seo-performance-128.png';
5605 var interaction = false;
web/demo.html
+1 -1
@@ -20,7 +20,7 @@
20 <meta property="og:title" content="netdata - real-time performance monitoring, done right!"/>
21 <meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
22
23 - <script type="text/javascript" src="dashboard.js?v44"></script>
23 + <script type="text/javascript" src="dashboard.js?v45"></script>
24 </head>
25 <body>
26
web/demo2.html
+1 -1
@@ -21,7 +21,7 @@
21 <meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
22
23 <script>var netdataTheme = 'slate';</script>
24 - <script type="text/javascript" src="http://my-netdata.io/dashboard.js?v44"></script>
24 + <script type="text/javascript" src="http://my-netdata.io/dashboard.js?v45"></script>
25 </head>
26 <body>
27
web/demosites.html
+1 -1
@@ -51,7 +51,7 @@
51 and that you have chown it to be owned by netdata:netdata
52 -->
53 <!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
54 - <script type="text/javascript" src="dashboard.js?v44"></script>
54 + <script type="text/javascript" src="dashboard.js?v45"></script>
55
56 <script>
57 // --- OPTIONS FOR THE CHARTS --
web/index.html
+2 -2
@@ -389,7 +389,7 @@
389
390 <!-- check which theme to use -->
391 <script type="text/javascript">
392 - var netdataShowNotifications = true;
392 + // enable alarms checking and notifications
393 var netdataShowAlarms = true;
394
395 // --------------------------------------------------------------------
@@ -587,7 +587,7 @@
587 </script>
588
589 <!-- load the dashboard manager - it will do the rest -->
590 - <script type="text/javascript" src="dashboard.js?v44"></script>
590 + <script type="text/javascript" src="dashboard.js?v45"></script>
591 </head>
592 <body data-spy="scroll" data-target="#sidebar">
593 <div id="loadOverlay" class="loadOverlay" style="background-color: #888; color: #888;">
web/registry.html
+1 -1
@@ -134,7 +134,7 @@
134 and that you have chown it to be owned by netdata:netdata
135 -->
136 <!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
137 - <script type="text/javascript" src="dashboard.js?v44"></script>
137 + <script type="text/javascript" src="dashboard.js?v45"></script>
138
139 <script>
140 // Set options for TV operation
web/tv.html
+1 -1
@@ -49,7 +49,7 @@
49 and that you have chown it to be owned by netdata:netdata
50 -->
51 <!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
52 - <script type="text/javascript" src="dashboard.js?v44"></script>
52 + <script type="text/javascript" src="dashboard.js?v45"></script>
53
54 <script>
55 // Set options for TV operation