]> arthur.barton.de Git - netdata.git/blobdiff - web/index.html
Remove needless comments
[netdata.git] / web / index.html
index 040bd1483b6799c7d28a3aeb5858b0cbe39ed761..55a605aa786767155de45bc8051e2125b1d3c9dc 100644 (file)
 
                     // find a name for this device from fireqos info
                     // we strip '_(in|out)' or '(in|out)_'
-                    if(typeof options.submenu_names[chart.family] === 'undefined' || options.submenu_names[chart.family] === chart.family) {
+                    if(chart.context === 'tc.qos' && (typeof options.submenu_names[chart.family] === 'undefined' || options.submenu_names[chart.family] === chart.family)) {
                         var n = chart.name.split('.')[1];
                         if(n.endsWith('_in'))
                             options.submenu_names[chart.family] = n.slice(0, n.lastIndexOf('_in'));
                             options.submenu_names[chart.family] = n.slice(3, n.length);
                         else if(n.startsWith('out_'))
                             options.submenu_names[chart.family] = n.slice(4, n.length);
+                        else
+                            options.submenu_names[chart.family] = n;
                     }
 
                     // increase the priority of IFB devices
 
                 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 role_href = ((has_alarm === true)?('<br/>&nbsp;<br/>role: <b>' + alarm.recipient + '</b><br/>&nbsp;<br/><b><i class="fa fa-line-chart" aria-hidden="true"></i></b><small>&nbsp;&nbsp;<a href="#" onClick="NETDATA.alarms.scrollToChart(\'' + alarm.chart + '\'); $(\'#alarmsModal\').modal(\'hide\'); return false;">jump to chart</a></small>'):('&nbsp;'));
     </div>
 </body>
 </html>
-<script type="text/javascript" src="dashboard.js?v20170118-11"></script>
+<script type="text/javascript" src="dashboard.js?v20170127-1"></script>