]> arthur.barton.de Git - netdata.git/commitdiff
do not show the same HTML5 notification again - save the last id shown in browser...
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sun, 25 Sep 2016 21:19:39 +0000 (00:19 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sun, 25 Sep 2016 21:19:39 +0000 (00:19 +0300)
web/dashboard.js

index 8f759a07293b7347f8bbf07416fe633b4e9fa537..f54c38727c92e699b15121f4819739eb72982110 100644 (file)
                 }
 
                 NETDATA.alarms.last_notification_id = data[0].unique_id;
+                NETDATA.localStorageSet('last_notification_id', NETDATA.alarms.last_notification_id, null);
                 // console.log('last notification id = ' + NETDATA.alarms.last_notification_id);
             })
         },
             while(host.slice(-1) === '/')
                 host = host.substring(0, host.length - 1);
             NETDATA.alarms.server = host;
-            
+
+            NETDATA.alarms.last_notification_id = NETDATA.localStorageGet('last_notification_id', NETDATA.alarms.last_notification_id, null);
+
             if(NETDATA.alarms.onclick === null)
                 NETDATA.alarms.onclick = NETDATA.alarms.scrollToAlarm;