@cryptotaxi247 / netdata-1 / commits / b5401e140

allow overwriting subset of icons

Costa Tsaousis (ktsaou) committed Apr 27, 2018 at 00:51 UTC b5401e1405bc572890c544d5e9c5ca7061f14b67
1 file changed +6 -2
web/dashboard.js
+6 -2
@@ -356,8 +356,12 @@ var NETDATA = window.NETDATA || {};
356 noData: '<i class="fas fa-exclamation-triangle"></i>'
357 };
358
359 - if(typeof netdataIcons === 'object')
360 - NETDATA.icons = netdataIcons;
359 + if(typeof netdataIcons === 'object') {
360 + for(var icon in NETDATA.icons) {
361 + if(NETDATA.icons.hasOwnProperty(icon) && typeof(netdataIcons[icon]) === 'string')
362 + NETDATA.icons[icon] = netdataIcons[icon];
363 + }
364 + }
365
366 if(typeof netdataSnapshotData === 'undefined')
367 netdataSnapshotData = null;