// --------------------------------------------------------------------
// check options that should be processed before loading netdata.js
+ var localStorageTested = -1;
+ function localStorageTest() {
+ if(localStorageTested !== -1)
+ return localStorageTested;
+
+ if(typeof Storage !== "undefined" && typeof localStorage === 'object') {
+ var test = 'test';
+ try {
+ localStorage.setItem(test, test);
+ localStorage.removeItem(test);
+ localStorageTested = true;
+ }
+ catch (e) {
+ localStorageTested = false;
+ }
+ }
+ else
+ localStorageTested = false;
+
+ return localStorageTested;
+ }
+
function loadLocalStorage(name) {
var ret = null;
try {
- if(typeof Storage !== "undefined" && typeof localStorage === 'object')
+ if(localStorageTest() === true)
ret = localStorage.getItem(name);
}
catch(error) {
function saveLocalStorage(name, value) {
// console.log('saving: ' + name.toString() + ' = ' + value.toString());
try {
- if(typeof Storage !== "undefined" && typeof localStorage === 'object') {
+ if(localStorageTest() === true) {
localStorage.setItem(name, value.toString());
return true;
}
// 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
</div>
</body>
</html>
-<script type="text/javascript" src="dashboard.js?v20170127-1"></script>
+<script type="text/javascript" src="dashboard.js?v20170204-3"></script>