Subversion Repositories ALCASAR

Rev

Rev 2800 | Rev 3037 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

































































































































































































Rev 2800 Rev 2976
Line 24... Line 24...
24
/*global $, jQuery */
24
/*global $, jQuery */
25
 
25
 
26
"use strict";
26
"use strict";
27
 
27
 
28
var langxml = [], filesystemTable, current_language = "", plugin_liste = [], blocks = [], langarr = [],
28
var langxml = [], filesystemTable, current_language = "", plugin_liste = [], blocks = [], langarr = [],
29
     showCPUListExpanded, showCPUInfoExpanded, showNetworkInfosExpanded, showMemoryInfosExpanded, showNetworkActiveSpeed, showCPULoadCompact, oldnetwork = [];
29
     showCPUListExpanded, showCPUInfoExpanded, showNetworkInfosExpanded, showMemoryInfosExpanded, showNetworkActiveSpeed, showCPULoadCompact, showTotals, increaseWidth, oldnetwork = [];
30
 
30
 
31
/**
31
/**
32
 * Fix PNG loading on IE6 or below
32
 * Fix PNG loading on IE6 or below
33
 */
33
 */
34
function PNGload(png) {
34
function PNGload(png) {
Line 55... Line 55...
55
            expires = "; expires=" + date.toGMTString();
55
            expires = "; expires=" + date.toGMTString();
56
        }
56
        }
57
    } else {
57
    } else {
58
        expires = "";
58
        expires = "";
59
    }
59
    }
60
    document.cookie = name + "=" + value + expires + "; path=/";
60
    document.cookie = name + "=" + value + expires + "; path=/; samesite=strict";
61
}
61
}
62
 
62
 
63
/**
63
/**
64
 * read a value out of a cookie and return the value<br><br>
64
 * read a value out of a cookie and return the value<br><br>
65
 * inspired by <a href="http://www.quirksmode.org/js/cookies.html">http://www.quirksmode.org/js/cookies.html</a>
65
 * inspired by <a href="http://www.quirksmode.org/js/cookies.html">http://www.quirksmode.org/js/cookies.html</a>
Line 110... Line 110...
110
/**
110
/**
111
 * activates a given style and disables the old one in the document
111
 * activates a given style and disables the old one in the document
112
 * @param {String} template template that should be activated
112
 * @param {String} template template that should be activated
113
 */
113
 */
114
function switchStyle(template) {
114
function switchStyle(template) {
-
 
115
    if (increaseWidth > 0) {
115
    $('link[rel*=style][title]').each(function getTitle(i) {
116
        $('link[rel*=style][title]').each(function getTitle(i) {
-
 
117
            if (this.getAttribute('title') === 'PSI_Template') {
-
 
118
                this.setAttribute('href', './templates/css.php?name=' + template + '&increase=' + increaseWidth);
-
 
119
            }
-
 
120
        });
-
 
121
    } else {
-
 
122
        $('link[rel*=style][title]').each(function getTitle(i) {
116
        if (this.getAttribute('title') === 'PSI_Template') {
123
            if (this.getAttribute('title') === 'PSI_Template') {
117
            this.setAttribute('href', './templates/' + template + ".css");
124
                this.setAttribute('href', './templates/' + template + ".css");  
-
 
125
            }
118
        }
126
        });
119
    });
127
    }
120
}
128
}
121
 
129
 
122
/**
130
/**
123
 * load the given translation an translate the entire page<br><br>retrieving the translation is done through a
131
 * load the given translation an translate the entire page<br><br>retrieving the translation is done through a
124
 * ajax call
132
 * ajax call
Line 279... Line 287...
279
    html += "                <th class=\"right\">" + genlang(35) + "</th>\n";
287
    html += "                <th class=\"right\">" + genlang(35) + "</th>\n";
280
    html += "                <th class=\"right\">" + genlang(36) + "</th>\n";
288
    html += "                <th class=\"right\">" + genlang(36) + "</th>\n";
281
    html += "                <th class=\"right\">" + genlang(37) + "</th>\n";
289
    html += "                <th class=\"right\">" + genlang(37) + "</th>\n";
282
    html += "              </tr>\n";
290
    html += "              </tr>\n";
283
    html += "            </thead>\n";
291
    html += "            </thead>\n";
-
 
292
    if (showTotals) {
284
    html += "            <tfoot>\n";
293
        html += "            <tfoot>\n";
285
    html += "              <tr style=\"font-weight : bold\">\n";
294
        html += "              <tr style=\"font-weight : bold\">\n";
286
    html += "                <td>&nbsp;</td>\n";
295
        html += "                <td>&nbsp;</td>\n";
287
    html += "                <td>&nbsp;</td>\n";
296
        html += "                <td>&nbsp;</td>\n";
288
    html += "                <td>" + genlang(38) + "</td>\n";
297
        html += "                <td>" + genlang(38) + "</td>\n";
289
    html += "                <td id=\"s_fs_total\"></td>\n";
298
        html += "                <td id=\"s_fs_total\"></td>\n";
290
    html += "                <td class=\"right\"><span id=\"s_fs_tfree\"></span></td>\n";
299
        html += "                <td class=\"right\"><span id=\"s_fs_tfree\"></span></td>\n";
291
    html += "                <td class=\"right\"><span id=\"s_fs_tused\"></span></td>\n";
300
        html += "                <td class=\"right\"><span id=\"s_fs_tused\"></span></td>\n";
292
    html += "                <td class=\"right\"><span id=\"s_fs_tsize\"></span></td>\n";
301
        html += "                <td class=\"right\"><span id=\"s_fs_tsize\"></span></td>\n";
293
    html += "              </tr>\n";
302
        html += "              </tr>\n";
294
    html += "            </tfoot>\n";
303
        html += "            </tfoot>\n";
-
 
304
    }
295
    html += "            <tbody>\n";
305
    html += "            <tbody>\n";
296
    html += "            </tbody>\n";
306
    html += "            </tbody>\n";
297
    html += "          </table>\n";
307
    html += "          </table>\n";
298
    html += "        </div>\n";
308
    html += "        </div>\n";
299
 
309
 
Line 401... Line 411...
401
< 1000)) {        }
411
< 1000)) {        }
402
< 1000)) {    }
412
< 1000)) {    }
403
< 1000)) {}
413
< 1000)) {}
404
< 1000)) {
414
< 1000)) {
405
< 1000)) {/**
415
< 1000)) {/**
-
 
416
< 1000)) { * format a given MT/s value to a better readable statement with the right suffix
-
 
417
< 1000)) { * @param {Number} mtps mtps value that should be formatted
-
 
418
< 1000)) { * @return {String} html string with no breaking spaces and translation statements
-
 
419
< 1000)) { */
-
 
420
< 1000)) {function formatMTps(mtps) {
-
 
421
< 1000)) {    if ((mtps >= 0) && (mtps < 1000)) {
-
 
422
< 1000)) {        return mtps.toString() + "&nbsp;" + genlang(131);
-
 
423
< 1000)) {    } else {
-
 
424
< 1000)) {        if (mtps >= 1000) {
-
 
425
< 1000)) {            return round(mtps / 1000, 2) + " " + genlang(132);
-
 
426
< 1000)) {        } else {
-
 
427
< 1000)) {            return "";
-
 
428
< 1000)) {        }
-
 
429
< 1000)) {    }
-
 
430
< 1000)) {}
-
 
431
< 1000)) {
-
 
432
< 1000)) {/**
406
< 1000)) { * format the byte values into a user friendly value with the corespondenting unit expression<br>support is included
433
< 1000)) { * format the byte values into a user friendly value with the corespondenting unit expression<br>support is included
407
< 1000)) { * for binary and decimal output<br>user can specify a constant format for all byte outputs or the output is formated
434
< 1000)) { * for binary and decimal output<br>user can specify a constant format for all byte outputs or the output is formated
408
< 1000)) { * automatically so that every value can be read in a user friendly way
435
< 1000)) { * automatically so that every value can be read in a user friendly way
409
< 1000)) { * @param {Number} bytes value that should be converted in the corespondenting format, which is specified in the phpsysinfo.ini
436
< 1000)) { * @param {Number} bytes value that should be converted in the corespondenting format, which is specified in the phpsysinfo.ini
410
< 1000)) { * @param {jQuery} xml phpSysInfo-XML
437
< 1000)) { * @param {jQuery} xml phpSysInfo-XML
Line 684... Line 711...
684
< 1000)) {        }
711
< 1000)) {
}
685
< 1000)) {        if ($(this).attr("ProcessesOther") !== undefined) {
712
< 1000)) {
if ($(this).attr("ProcessesOther") !== undefined) {
686
< 1000)) {            pother = parseInt($(this).attr("ProcessesOther"), 10);
713
< 1000)) {
pother = parseInt($(this).attr("ProcessesOther"), 10);
687
< 1000)) {        }
714
< 1000)) {
}
688
< 1000)) {
715
< 1000)) {
689
< 1000)) {        document.title = "Système information: " + hostname + " (" + ip + ")";
716
< 1000)) {
document.title = "System information: " + hostname + " (" + ip + ")";
690
< 1000)) {        $("#s_hostname_title").html(hostname);
717
< 1000)) {
$("#s_hostname_title").html(hostname);
691
< 1000)) {        $("#s_ip_title").html(ip);
718
< 1000)) {
$("#s_ip_title").html(ip);
692
< 1000)) {        $("#s_hostname").html(hostname);
719
< 1000)) {
$("#s_hostname").html(hostname);
693
< 1000)) {        $("#s_ip").html(ip);
720
< 1000)) {
$("#s_ip").html(ip);
694
< 1000)) {        $("#s_kernel").html(kernel);
721
< 1000)) {
$("#s_kernel").html(kernel);
Line 835... Line 862...
835
< 1000)) {
* @param {Array} tree array that holds the positions for treetable plugin
862
< 1000)) {
* @param {Number} rootposition position of the parent element
837
< 1000)) {
*/
864
< 1000)) {
function fillHWDevice(xml, type, tree, rootposition) {
839
< 1000)) {
var devicecount = 0, html = "";
866
< 1000)) {
$("Hardware " + type + ((type=="MEM")?" Chip":" Device"), xml).each(function getHWDevice(deviceId) {
841
< 1000)) {
var name = "", count = 0, capacity = 0, manufacturer = "", product = "", serial = "", devcoreposition = 0;
868
< 1000)) {
843
< 1000)) {
devicecount++;
870
< 1000)) {
name = $(this).attr("Name");
845
< 1000)) {
capacity = parseInt($(this).attr("Capacity"), 10);
872
< 1000)) {
manufacturer = $(this).attr("Manufacturer");
847
< 1000)) {
product = $(this).attr("Product");
874
< 1000)) {
speed = parseInt($(this).attr("Speed"), 10);
-
 
876
< 1000)) {
serial = $(this).attr("Serial");
849
< 1000)) {
count = parseInt($(this).attr("Count"), 10);
878
< 1000)) {
if (!isNaN(count) && count > 1) {
851
< 1000)) {
name = "(" + count + "x) " + name;
880
< 1000)) {
}
Line 862... Line 891...
862
< 1000)) {
}
891
< 1000)) {
if (product !== undefined) {
864
< 1000)) {
html += "<tr><td style=\"width:68%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(123) + ":</span></div></td><td>" + product + "</td></tr>\n";
893
< 1000)) {
tree.push(devcoreposition);
866
< 1000)) {
}
895
< 1000)) {
if (!isNaN(speed)) {
-
 
897
< 1000)) {
tree.push(devcoreposition);
-
 
899
< 1000)) {
if (!isNaN(voltage)) {
-
 
901
< 1000)) {
tree.push(devcoreposition);
-
 
903
< 1000)) {
if (serial !== undefined) {
868
< 1000)) {
html += "<tr><td style=\"width:68%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(124) + ":</span></div></td><td>" + serial + "</td></tr>\n";
905
< 1000)) {
tree.push(devcoreposition);
870
< 1000)) {
}
907
< 1000)) {
});
Line 876... Line 913...
876
< 1000)) {
return html;
913
< 1000)) {
}
878
< 1000)) {
915
< 1000)) {
function countHWDevice(xml, type) {
880
< 1000)) {
var devicecount = 0;
917
< 1000)) {
$("Hardware " + type + ((type=="MEM")?" Chip":" Device"), xml).each(function getHWDevice(deviceId) {
882
< 1000)) {
devicecount++;
919
< 1000)) {
});
884
< 1000)) {
return devicecount;
921
< 1000)) {
}
886
< 1000)) {
923
< 1000)) {
if (countCpu(xml)) {
914
< 1000)) {
html += " <tr><td colspan=\"2\"><div class=\"treediv\"><span class=\"treespanbold\">" + genlang(11) + "</span></div></td></tr>\n";
951
< 1000)) {
html += fillCpu(xml, tree, tree.push(0), closed);
916
< 1000)) {
}
953
< 1000)) {
918
< 1000)) {
var typelist = {PCI:17,IDE:18,SCSI:19,NVMe:126,USB:20,TB:117,I2C:118};
955
< 1000)) {
for (var dev_type in typelist) {
920
< 1000)) {
if (countHWDevice(xml, dev_type)) {
957
< 1000)) {
html += " <tr><td colspan=\"2\"><div class=\"treediv\"><span class=\"treespanbold\">" + genlang(typelist[dev_type]) + "</span></div></td></tr>\n";
922
< 1000)) {
index = tree.push(0);
959
< 1000)) {
closed.push(index);
Line 964... Line 1001...
964
< 1000)) {
html0 += "<h2>" + genlang(21) + "</h2>\n";
1001
< 1000)) {
966
< 1000)) {
html1 += " <thead>\n";
1003
< 1000)) {
html1 += " <tr>\n";
968
< 1000)) {
html1 += " <th>" + genlang(22) + "</th>\n";
1005
< 1000)) {
html1 += " <th class=\"right\" style=\"width:17.7%;\">" + genlang(23) + "</th>\n";
970
< 1000)) {
html1 += " <th class=\"right\" style=\"width:50px;\">" + genlang(24) + "</th>\n";
1007
< 1000)) {
html1 += " <th class=\"right\" style=\"width:17.7%;\">" + genlang(25) + "</th>\n";
972
< 1000)) {
html1 += " </tr>\n";
1009
< 1000)) {
html1 += " </thead>\n";
974
< 1000)) {
1011
< 1000)) {
if (showNetworkActiveSpeed) {
976
< 1000)) {
$("Generation", xml).each(function getTimestamp(id) {
1013
< 1000)) {
html += "<h2>" + genlang(27) + "</h2>\n";
1081
< 1000)) {

html += "<div style=\"overflow-x:auto;\">\n";
1118
< 1000)) {
html += " <table id=\"MemoryTree\" class=\"tablemain\">\n";
1083
< 1000)) {

html += " <thead>\n";
1120
< 1000)) {
html += " <tr>\n";
1085
< 1000)) {

html += " <th style=\"width:200px;\">" + genlang(34) + "</th>\n";
1122
< 1000)) {
html += " <th style=\"width:33.3%;\">" + genlang(33) + "</th>\n";
1087
< 1000)) {

html += " <th class=\"right\" style=\"width:100px;\">" + genlang(125) + "</th>\n";
1124
< 1000)) {
html += " <th class=\"right\" style=\"width:14.2%;\">" + genlang(36) + "</th>\n";
1089
< 1000)) {

html += " <th class=\"right\" style=\"width:100px;\">" + genlang(37) + "</th>\n";
1126
< 1000)) {
html += " </tr>\n";
1091
< 1000)) {

html += " </thead>\n";
1128
< 1000)) {
html += " <tbody class=\"tree\">\n";
1093
< 1000)) {


1130
< 1000)) {
$("Memory", xml).each(function getMemory(id) {
1095
< 1000)) {

var free = 0, total = 0, used = 0, percent = 0, memoryindex = 0;
1132
< 1000)) {
free = parseInt($(this).attr("Free"), 10);
1097
< 1000)) {

used = parseInt($(this).attr("Used"), 10);
1134
< 1000)) {
total = parseInt($(this).attr("Total"), 10);
1099
< 1000)) {

percent = parseInt($(this).attr("Percent"), 10);
1136
< 1000)) {
html += "<tr><td><div class=\"treediv\"><span class=\"treespan\">" + genlang(28) + "</span></div></td><td>" + createBar(percent) + "</td><td class=\"right\">" + formatBytes(free, xml) + "</td><td class=\"right\">" + formatBytes(used, xml) + "</td><td class=\"right\">" + formatBytes(total, xml) + "</td></tr>";
1101
< 1000)) {

memoryindex = tree.push(0);
1138
< 1000)) {
1103
< 1000)) {

$("Memory Details", xml).each(function getMemorydetails(id) {
1140
< 1000)) {
var app = 0, appp = 0, buff = 0, buffp = 0, cached = 0, cachedp = 0;
1105
< 1000)) {

app = parseInt($(this).attr("App"), 10);
1142
< 1000)) {
buff = parseInt($(this).attr("Buffers"), 10);
1108
< 1000)) {

buffp = parseInt($(this).attr("BuffersPercent"), 10);
1145
< 1000)) {
cached = parseInt($(this).attr("Cached"), 10);
1110
< 1000)) {

cachedp = parseInt($(this).attr("CachedPercent"), 10);
1147
< 1000)) {
if (!isNaN(app)) {
1112
< 1000)) {

html += "<tr><td style=\"width:184px;\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(64) + "</span></div></td><td style=\"width:285px;\">" + createBar(appp) + "</td><td class=\"right\" style=\"width:100px;\">&nbsp;</td><td class=\"right\" style=\"width:100px\">" + formatBytes(app, xml) + "</td><td class=\"right\" style=\"width:100px;\">&nbsp;</td></tr>";
1149
< 1000)) {
tree.push(memoryindex);
1114
< 1000)) {

}
1151
< 1000)) {
if (!isNaN(cached)) {
1116
< 1000)) {

html += "<tr><td style=\"width:184px;\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(66) + "</span></div></td><td style=\"width:285px;\">" + createBar(cachedp) + "</td><td class=\"right\" style=\"width:100px;\">&nbsp;</td><td class=\"right\" style=\"width:100px;\">" + formatBytes(cached, xml) + "</td><td class=\"right\" style=\"width:100px;\">&nbsp;</td></tr>";
1153
< 1000)) {
tree.push(memoryindex);
1118
< 1000)) {

}
1155
< 1000)) {
if (!isNaN(buff)) {
1120
< 1000)) {

html += "<tr><td style=\"width:184px;\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(65) + "</span></div></td><td style=\"width:285px\">" + createBar(buffp) + "</td><td class=\"rigth\" style=\"width:100px;\">&nbsp;</td><td class=\"right\" style=\"width:100px;\">" + formatBytes(buff, xml) + "</td><td class=\"right\" style=\"width:100px;\">&nbsp;</td></tr>";
1157
< 1000)) {
tree.push(memoryindex);
1122
< 1000)) {

}
1159
< 1000)) {
if (!isNaN(app) || !isNaN(buff) || !isNaN(cached)) {
1124
< 1000)) {

if (!showMemoryInfosExpanded) {
1161
< 1000)) {
closed.push(memoryindex);
Line 1131... Line 1168...
1131
< 1000)) {

var free = 0, total = 0, used = 0, percent = 0, swapindex = 0;
1168
< 1000)) {
free = parseInt($(this).attr("Free"), 10);
1133
< 1000)) {

used = parseInt($(this).attr("Used"), 10);
1170
< 1000)) {
total = parseInt($(this).attr("Total"), 10);
1135
< 1000)) {

percent = parseInt($(this).attr("Percent"), 10);
1172
< 1000)) {
html += "<tr><td><div class=\"treediv\"><span class=\"treespan\">" + genlang(29) + "</span></div></td><td>" + createBar(percent) + "</td><td class=\"right\">" + formatBytes(free, xml) + "</td><td class=\"right\">" + formatBytes(used, xml) + "</td><td class=\"right\">" + formatBytes(total, xml) + "</td></tr>";
1137
< 1000)) {

swapindex = tree.push(0);
1174
< 1000)) {
1139
< 1000)) {

$("Memory Swap Mount", xml).each(function getDevices(id) {
1176
< 1000)) {
var free = 0, total = 0, used = 0, percent = 0, mpoint = "", mpid = 0;
1141
< 1000)) {

if (!showMemoryInfosExpanded) {
1178
< 1000)) {
1151
< 1000)) {

if (mpoint === undefined) {
1188
< 1000)) {
mpoint = mpid;
1153
< 1000)) {

}
1190
< 1000)) {
1155
< 1000)) {

html += "<tr><td style=\"width:184px;\"><div class=\"treediv\"><span class=\"treespan\">" + mpoint + "</span></div></td><td style=\"width:285px;\">" + createBar(percent) + "</td><td class=\"right\" style=\"width:100px\">" + formatBytes(free, xml) + "</td><td class=\"right\" style=\"width:100px;\">" + formatBytes(used, xml) + "</td><td class=\"right\" style=\"width:100px;\">" + formatBytes(total, xml) + "</td></tr>";
1192
< 1000)) {
tree.push(swapindex);
1157
< 1000)) {

});
1194
< 1000)) {
});
1159
< 1000)) {


1196
< 1000)) {
html += " </tbody>\n";
Line 1222... Line 1259...
1222
< 1000)) {

}
1259
< 1000)) {
if (!isNaN(inodes)) {
1224
< 1000)) {

inodes_text = "<span style=\"font-style:italic\">&nbsp;(" + inodes.toString() + "%)</span>";
1261
< 1000)) {
}
1226
< 1000)) {


1263
< 1000)) {
if (!isNaN(ignore) && (ignore > 0) && showTotals) {
1228
< 1000)) {

if (ignore >= 2) {
1265
< 1000)) {
if ((ignore == 3) && !isNaN(threshold) && (percent >= threshold)) {
1230
< 1000)) {

filesystemTable.fnAddData(["<span style=\"display:none;\">" + mpoint + "</span>" + mpoint, "<span style=\"display:none;\">" + type + "</span>" + type, "<span style=\"display:none;\">" + name + "</span>" + name + options_text, "<span style=\"display:none;\">" + percent.toString() + "</span>" + createBar(percent, "barwarn") + inodes_text, "<span style=\"display:none;\">" + free.toString() + "</span><i>(" + formatBytes(free, xml) + ")</i>", "<span style=\"display:none;\">" + used.toString() + "</span><i>(" + formatBytes(used, xml) + ")</i>", "<span style=\"display:none;\">" + size.toString() + "</span><i>(" + formatBytes(size, xml) + ")</i>"]);
1267
< 1000)) {
} else {
1232
< 1000)) {

filesystemTable.fnAddData(["<span style=\"display:none;\">" + mpoint + "</span>" + mpoint, "<span style=\"display:none;\">" + type + "</span>" + type, "<span style=\"display:none;\">" + name + "</span>" + name + options_text, "<span style=\"display:none;\">" + percent.toString() + "</span>" + createBar(percent) + inodes_text, "<span style=\"display:none;\">" + free.toString() + "</span><i>(" + formatBytes(free, xml) + ")</i>", "<span style=\"display:none;\">" + used.toString() + "</span><i>(" + formatBytes(used, xml) + ")</i>", "<span style=\"display:none;\">" + size.toString() + "</span><i>(" + formatBytes(size, xml) + ")</i>"]);
1269
< 1000)) {
}
1234
< 1000)) {

} else {
1271
< 1000)) {
} else {
1238
< 1000)) {

filesystemTable.fnAddData(["<span style=\"display:none;\">" + mpoint + "</span>" + mpoint, "<span style=\"display:none;\">" + type + "</span>" + type, "<span style=\"display:none;\">" + name + "</span>" + name + options_text, "<span style=\"display:none;\">" + percent.toString() + "</span>" + createBar(percent) + inodes_text, "<span style=\"display:none;\">" + free.toString() + "</span><i>(" + formatBytes(free, xml) + ")</i>", "<span style=\"display:none;\">" + used.toString() + "</span>" + formatBytes(used, xml), "<span style=\"display:none;\">" + size.toString() + "</span><i>(" + formatBytes(size, xml) + ")</i>"]);
1275
< 1000)) {
}
1240
< 1000)) {

}
1277
< 1000)) {
} else {
1242
< 1000)) {

if (!isNaN(threshold) && (percent >= threshold)) {
1279
< 1000)) {
filesystemTable.fnAddData(["<span style=\"display:none;\">" + mpoint + "</span>" + mpoint, "<span style=\"display:none;\">" + type + "</span>" + type, "<span style=\"display:none;\">" + name + "</span>" + name + options_text, "<span style=\"display:none;\">" + percent.toString() + "</span>" + createBar(percent, "barwarn") + inodes_text, "<span style=\"display:none;\">" + free.toString() + "</span>" + formatBytes(free, xml), "<span style=\"display:none;\">" + used.toString() + "</span>" + formatBytes(used, xml), "<span style=\"display:none;\">" + size.toString() + "</span>" + formatBytes(size, xml)]);
1244
< 1000)) {

} else {
1281
< 1000)) {
filesystemTable.fnAddData(["<span style=\"display:none;\">" + mpoint + "</span>" + mpoint, "<span style=\"display:none;\">" + type + "</span>" + type, "<span style=\"display:none;\">" + name + "</span>" + name + options_text, "<span style=\"display:none;\">" + percent.toString() + "</span>" + createBar(percent) + inodes_text, "<span style=\"display:none;\">" + free.toString() + "</span>" + formatBytes(free, xml), "<span style=\"display:none;\">" + used.toString() + "</span>" + formatBytes(used, xml), "<span style=\"display:none;\">" + size.toString() + "</span>" + formatBytes(size, xml)]);
1246
< 1000)) {

}
1283
< 1000)) {
}
-
 
1285
< 1000)) {
if (!isNaN(ignore) && (ignore > 0)) {
1249
< 1000)) {

if (ignore == 1) {
1287
< 1000)) {
total_used += used;
-
 
1289
< 1000)) {
total_used += used;
-
 
1291
< 1000)) {
}
-
 
1293
< 1000)) {
total_used += used;
-
 
1295
< 1000)) {
total_size += size;
1252
< 1000)) {

}
1297
< 1000)) {
total_usage = (total_size != 0) ? round(100 - (total_free / total_size) * 100, 2) : 0;
1257
< 1000)) {

}
1299
< 1000)) {
});
1260
< 1000)) {


1301
< 1000)) {
if (showTotals) {
1261
< 1000)) {

if (!isNaN(threshold) && (total_usage >= threshold)) {
1303
< 1000)) {
$("#s_fs_total").html(createBar(total_usage, "barwarn"));
1263
< 1000)) {

} else {
1305
< 1000)) {
$("#s_fs_total").html(createBar(total_usage));
-
 
1307
< 1000)) {
$("#s_fs_tfree").html(formatBytes(total_free, xml));
-
 
1309
< 1000)) {
$("#s_fs_tsize").html(formatBytes(total_size, xml));
1265
< 1000)) {

}
1311
< 1000)) {
}
1270
< 1000)) {


1313
< 1000)) {
/**
1272
< 1000)) {

* (re)fill the temperature block with the values from the given xml<br><br>
1315
< 1000)) {
* build the block content for the temperature block, this includes normal temperature information in the XML
Line 1282... Line 1325...
1282
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) { }
1325
< 1000)) {

1326
< 1000)) {

1327
< 1000)) {

1328
< 1000)) {

1329
< 1000)) {

1330
< 1000)) {

1331
< 1000)) {

1332
< 1000)) {

-
 
1291
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) { if (isFinite(limit))
-
 
1292
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) { _limit = formatTemp(limit, xml);
-
 
1293
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) { event = $(this).attr("Event");
1333
< 1000)) {

1334
< 1000)) {
gfx/attention.gif\" alt=\"!\" title=\""+event+"\"/>";
1335
< 1000)) {
limit = parseFloat($(this).attr("Max"));
-
 
1337
< 1000)) {
_limit = formatTemp(limit, xml);
1296
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) { $("#temperatureTable tbody").append("<tr><td>" + label + "</td>
" + formatTemp(value, xml) + "td><td class=\"right\">" + _limit + "</td></tr>");
1339
< 1000)) {
values = true;
1340
< 1000)) {
});
1341
< 1000)) {
if (values) {
1342
< 1000)) {
$("#temperature").show();
1343
< 1000)) {
}
1359
< 1000)) {
1360
< 1000)) {
var values = false;
1361
< 1000)) {
$("#voltageTable tbody").empty();
1362
< 1000)) {
$("MBInfo Voltage Item", xml).each(function getVoltages(id) {
1363
< 1000)) {
var label = "", value = 0, max = 0, min = 0, _min = "", _max = "", event = "";
1364
< 1000)) {
label = $(this).attr("Label");
1365
< 1000)) {
value = parseFloat($(this).attr("Value"));
1366
< 1000)) {
event = $(this).attr("Event");
-
 
1368
< 1000)) {
label += " <img style=\"vertical-align: middle; width:16px;\" src=\"./gfx/attention.gif\" alt=\"!\" title=\""+event+"\"/>";
1324
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
max = parseFloat($(this).attr("Max"));
1370
< 1000)) {
if (isFinite(max))
1371
< 1000)) {
_max = round(max, 2) + "&nbsp;" + genlang(62);
1372
< 1000)) {
min = parseFloat($(this).attr("Min"));
1373
< 1000)) {
if (isFinite(min))
1374
< 1000)) {
_min = round(min, 2) + "&nbsp;" + genlang(62);
1375
< 1000)) {
event = $(this).attr("Event");
-
 
1331
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
if (event !== undefined)
-
 
1332
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
label += " <img style=\"vertical-align: middle; width:16px;\" src=\"./gfx/attention.gif\" alt=\"!\" title=\""+event+"\"/>";
-
 
1333
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
$("#voltageTable tbody").append("<tr><td>" + label + "</td><td class=\"right\">" + round(value, 2) + "&nbsp;" + genlang(62) + "</td><td class=\"right\">" + _min + "</td><td class=\"right\">" + _max + "</td></tr>");
1376
< 1000)) {
values = true;
1377
< 1000)) {
});
1378
< 1000)) {
if (values) {
1379
< 1000)) {
$("#voltage").show();
1380
< 1000)) {
}
1396
< 1000)) {
1397
< 1000)) {
var values = false;
1398
< 1000)) {
$("#fansTable tbody").empty();
1399
< 1000)) {
$("MBInfo Fans Item", xml).each(function getFans(id) {
1400
< 1000)) {
var label = "", value = 0, min = 0, _min = "", event = "";
1401
< 1000)) {
label = $(this).attr("Label");
1402
< 1000)) {
value = parseFloat($(this).attr("Value"));
1403
< 1000)) {
min = parseFloat($(this).attr("Min"));
-
 
1362
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
if (isFinite(min))
-
 
1363
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
_min = round(min,0) + "&nbsp;" + genlang(63);
-
 
1364
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
event = $(this).attr("Event");
1404
< 1000)) {
if (event !== undefined)
1405
< 1000)) {
label += " <img style=\"vertical-align: middle; width:16px;\" src=\"./gfx/attention.gif\" alt=\"!\" title=\""+event+"\"/>";
1406
< 1000)) {
min = parseFloat($(this).attr("Min"));
-
 
1408
< 1000)) {
if (unit === "%") {
-
 
1410
< 1000)) {
_min = round(min,0) + "%";
-
 
1412
< 1000)) {
} else {
-
 
1414
< 1000)) {
_min = round(min,0) + "&nbsp;" + genlang(63);
1367
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
$("#fansTable tbody").append("<tr><td>" + label + "</td><td class=\"right\">" + round(value,0) + "&nbsp;" + genlang(63) + "</td><td class=\"right\">" + _min + "</td></tr>");
1416
< 1000)) {
}
1368
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
values = true;
1418
< 1000)) {
});
1419
< 1000)) {
if (values) {
1420
< 1000)) {
$("#fans").show();
1421
< 1000)) {
} else {
1422
< 1000)) {
}
1437
< 1000)) {
1438
< 1000)) {
var values = false;
1439
< 1000)) {
$("#powerTable tbody").empty();
1440
< 1000)) {
$("MBInfo Power Item", xml).each(function getPowers(id) {
1441
< 1000)) {
var label = "", value = "", limit = 0, _limit = "", event = "";
1442
< 1000)) {
label = $(this).attr("Label");
1443
< 1000)) {
value = $(this).attr("Value");
1444
< 1000)) {
limit = parseFloat($(this).attr("Max"));
-
 
1396
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
if (isFinite(limit))
-
 
1397
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
_limit = round(limit, 2) + "&nbsp;" + genlang(103);
-
 
1398
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
event = $(this).attr("Event");
1445
< 1000)) {
if (event !== undefined)
1446
< 1000)) {
label += " <img style=\"vertical-align: middle; width:16px;\" src=\"./gfx/attention.gif\" alt=\"!\" title=\""+event+"\"/>";
1447
< 1000)) {
limit = parseFloat($(this).attr("Max"));
-
 
1449
< 1000)) {
_limit = round(limit, 2) + "&nbsp;" + genlang(103);
1401
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
$("#powerTable tbody").append("<tr><td>" + label + "</td><td class=\"right\">" + round(value, 2) + "&nbsp;" + genlang(103) + "</td><td class=\"right\">" + _limit + "</td></tr>");
1451
< 1000)) {
values = true;
1452
< 1000)) {
});
1453
< 1000)) {
if (values) {
1454
< 1000)) {
$("#power").show();
1455
< 1000)) {
}
1471
< 1000)) {
1472
< 1000)) {
var values = false;
1473
< 1000)) {
$("#currentTable tbody").empty();
1474
< 1000)) {
$("MBInfo Current Item", xml).each(function getCurrents(id) {
1475
< 1000)) {
var label = "", value = "", min = 0, max = 0, _min = "", _max = "", event = "";
1476
< 1000)) {
label = $(this).attr("Label");
1477
< 1000)) {
value = $(this).attr("Value");
1478
< 1000)) {
-
 
-
 
1479
< 1000)) {
if (event !== undefined)
-
 
1481
< 1000)) {
max = parseFloat($(this).attr("Max"));
1482
< 1000)) {
if (isFinite(max))
1483
< 1000)) {
_max = round(max, 2) + "&nbsp;" + genlang(106);
1484
< 1000)) {
min = parseFloat($(this).attr("Min"));
1485
< 1000)) {
if (isFinite(min))
1486
< 1000)) {
_min = round(min, 2) + "&nbsp;" + genlang(106);
1487
< 1000)) {
-
 
1437
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
event = $(this).attr("Event");
-
 
1438
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
if (event !== undefined)
-
 
1439
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
label += " <img style=\"vertical-align: middle; width:16px;\" src=\"./gfx/attention.gif\" alt=\"!\" title=\""+event+"\"/>";
-
 
1440
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
$("#currentTable tbody").append("<tr><td>" + label + "</td><td class=\"right\">" + round(value, 2) + "&nbsp;" + genlang(106) + "</td><td class=\"right\">" + _min + "</td><td class=\"right\">" + _max + "</td></tr>");
1488
< 1000)) {
values = true;
1489
< 1000)) {
});
1490
< 1000)) {
if (values) {
1491
< 1000)) {
$("#current").show();
1492
< 1000)) {
}
1508
< 1000)) {
1509
< 1000)) {
var values = false;
1510
< 1000)) {
$("#otherTable tbody").empty();
1511
< 1000)) {
$("MBInfo Other Item", xml).each(function getOthers(id) {
1512
< 1000)) {
var label = "", value = "", event = "";
1513
< 1000)) {
label = $(this).attr("Label");
1514
< 1000)) {
value = $(this).attr("Value");
1515
< 1000)) {
-
 
1469
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
event = $(this).attr("Event");
1516
< 1000)) {
if (event !== undefined)
1517
< 1000)) {
label += " <img style=\"vertical-align: middle; width:16px;\" src=\"./gfx/attention.gif\" alt=\"!\" title=\""+event+"\"/>";
1518
< 1000)) {
unit = $(this).attr("Unit");
-
 
1520
< 1000)) {
$("#otherTable tbody").append("<tr><td>" + label + "</td><td>" + createBar(round(value,0)) + "</td></tr>");
-
 
1522
< 1000)) {
$("#otherTable tbody").append("<tr><td>" + label + "</td><td class=\"right\">" + value + "</td></tr>");
1523
< 1000)) {
}
1473
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
values = true;
1525
< 1000)) {
});
1526
< 1000)) {
if (values) {
1527
< 1000)) {
$("#other").show();
1528
< 1000)) {
} else {
1529
< 1000)) {
} else {
1576
< 1000)) {
html += "<tr><td colspan=\"2\"><div class=\"treediv\"><span class=\"treespanbold\">" + name + "</span></div></td></tr>\n";
1577
< 1000)) {
}
1578
< 1000)) {
index = tree.push(0);
1579
< 1000)) {
if (model !== undefined) {
1580
< 1000)) {
html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(70) + "</span></div></td><td>" + model + "</td></tr>\n";
1581
< 1000)) {
tree.push(index);
1582
< 1000)) {
}
1583
< 1000)) {
if (start_time !== undefined) {
1584
< 1000)) {
html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(72) + "</span></div></td><td>" + start_time + "</td></tr>\n";
1585
< 1000)) {
tree.push(index);
1586
< 1000)) {
}
1587
< 1000)) {
if (upsstatus !== undefined) {
1588
< 1000)) {
html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(73) + "</span></div></td><td>" + upsstatus + "</td></tr>\n";
1589
< 1000)) {
tree.push(index);
1590
< 1000)) {
}
1591
< 1000)) {
if (temperature !== undefined) {
1592
< 1000)) {
html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(84) + "</span></div></td><td>" + temperature + "</td></tr>\n";
1593
< 1000)) {
tree.push(index);
1594
< 1000)) {
}
1595
< 1000)) {
if (outages_count !== undefined) {
1596
< 1000)) {
html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(74) + "</span></div></td><td>" + outages_count + "</td></tr>\n";
1597
< 1000)) {
tree.push(index);
1598
< 1000)) {
}
1599
< 1000)) {
if (last_outage !== undefined) {
1600
< 1000)) {
html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(75) + "</span></div></td><td>" + last_outage + "</td></tr>\n";
1601
< 1000)) {
tree.push(index);
1602
< 1000)) {
}
1603
< 1000)) {
if (last_outage_finish !== undefined) {
1604
< 1000)) {
html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(76) + "</span></div></td><td>" + last_outage_finish + "</td></tr>\n";
1605
< 1000)) {
tree.push(index);
1606
< 1000)) {
}
1607
< 1000)) {
if (line_voltage !== undefined) {
1608
< 1000)) {
html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(77) + "</span></div></td><td>" + line_voltage + "&nbsp;" + genlang(82) + "</td></tr>\n";
1609
< 1000)) {
tree.push(index);
1610
< 1000)) {
}
1611
< 1000)) {
if (line_frequency !== undefined) {
1612
< 1000)) {
html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(108) + "</span></div></td><td>" + line_frequency + "&nbsp;" + genlang(109) + "</td></tr>\n";
1613
< 1000)) {
tree.push(index);
1614
< 1000)) {
}
1615
< 1000)) {
if (!isNaN(load_percent)) {
1616
< 1000)) {
html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(78) + "</span></div></td><td>" + createBar(load_percent) + "</td></tr>\n";
1617
< 1000)) {
tree.push(index);
1618
< 1000)) {
}
1619
< 1000)) {
if (battery_date !== undefined) {
1620
< 1000)) {
html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(104) + "</span></div></td><td>" + battery_date + "</td></tr>\n";
1621
< 1000)) {
tree.push(index);
1622
< 1000)) {
}
1623
< 1000)) {
if (battery_voltage !== undefined) {
1624
< 1000)) {
html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(79) + "</span></div></td><td>" + battery_voltage + "&nbsp;" + genlang(82) + "</td></tr>\n";
1625
< 1000)) {
tree.push(index);
1626
< 1000)) {
}
1627
< 1000)) {
if (!isNaN(battery_charge_percent)) {
1628
< 1000)) {
html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(80) + "</span></div></td><td>" + createBar(battery_charge_percent) + "</td></tr>\n";
1629
< 1000)) {
tree.push(index);
1630
< 1000)) {
}
1631
< 1000)) {
if (time_left_minutes !== undefined) {
1632
< 1000)) {
html += "<tr><td style=\"width:160px\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(81) + "</span></div></td><td>" + time_left_minutes + "&nbsp;" + genlang(83) + "</td></tr>\n";
1633
< 1000)) {
tree.push(index);
1634
< 1000)) {
}
1635
< 1000)) {
values=true;
1636
< 1000)) {
});
1637
< 1000)) {
html += " </tbody>\n";
1638
< 1000)) {
showCPUListExpanded = $("#showCPUListExpanded").val().toString()==="true";
1741
< 1000)) {
showCPUInfoExpanded = $("#showCPUInfoExpanded").val().toString()==="true";
1742
< 1000)) {
showNetworkInfosExpanded = $("#showNetworkInfosExpanded").val().toString()==="true";
1743
< 1000)) {
showMemoryInfosExpanded = $("#showMemoryInfosExpanded").val().toString()==="true";
1744
< 1000)) {
showCPULoadCompact = $("#showCPULoadCompact").val().toString()==="true";
1745
< 1000)) {
showTotals = $("#hideTotals").val().toString()!=="true";
-
 
1747
< 1000)) {
if (isNaN(increaseWidth) || (increaseWidth<=0)) increaseWidth = 0;
1694
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
switch ($("#showNetworkActiveSpeed").val().toString()) {
1749
< 1000)) {
case "bps": showNetworkActiveSpeed = 2;
1750
< 1000)) {
break;
1751
< 1000)) {
case "true": showNetworkActiveSpeed = 1;
1752
< 1000)) {
break;
1753
< 1000)) {
if (reload) {
1967
< 1000)) {
reloadpic = "<img id=\"Reload_" + plugin + "Table\" src=\"./gfx/reload.gif\" alt=\"reload\" title=\"reload\" style=\"vertical-align:middle;float:right;cursor:pointer;border:0px;width:16px\" />&nbsp;";
1968
< 1000)) {
}
1969
< 1000)) {
block += "<div id=\"panel_" + plugin + "\" style=\"display:none;\">\n";
1970
< 1000)) {
block += "<div id=\"Plugin_" + plugin + "\" class=\"plugin\" style=\"display:none;\">\n";
1971
< 1000)) {
block += "<h2>" + reloadpic + genlang(translationid, plugin) + "</h2>\n";
1972
< 1000)) {
block += "<span class=\"Hostname_" + plugin + "\"></span></h2>\n";
1918
< 1000)) {

<= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {< 0))) {
block += "</div>\n";
1974
< 1000)) {
block += "</div>\n";
1975
< 1000)) {
return block;
1976
< 1000)) {
}
1977
< 1000)) {
1978
< 1000)) {