2788 |
rexy |
1 |
var langxml = [], langarr = [], current_language = "", plugins = [], blocks = [], plugin_liste = [],
|
|
|
2 |
showCPUListExpanded, showCPUInfoExpanded, showNetworkInfosExpanded, showNetworkActiveSpeed, showCPULoadCompact, oldnetwork = [], refrTimer;
|
|
|
3 |
|
|
|
4 |
/**
|
|
|
5 |
* generate a cookie, if not exist, and add an entry to it<br><br>
|
|
|
6 |
* inspired by <a href="http://www.quirksmode.org/js/cookies.html">http://www.quirksmode.org/js/cookies.html</a>
|
|
|
7 |
* @param {String} name name that holds the value
|
|
|
8 |
* @param {String} value value that needs to be stored
|
|
|
9 |
* @param {Number} days how many days the entry should be valid in the cookie
|
|
|
10 |
*/
|
|
|
11 |
function createCookie(name, value, days) {
|
|
|
12 |
var date = new Date(), expires = "";
|
|
|
13 |
if (days) {
|
|
|
14 |
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
|
|
15 |
if (typeof(date.toUTCString)==="function") {
|
|
|
16 |
expires = "; expires=" + date.toUTCString();
|
|
|
17 |
} else {
|
|
|
18 |
//deprecated
|
|
|
19 |
expires = "; expires=" + date.toGMTString();
|
|
|
20 |
}
|
|
|
21 |
} else {
|
|
|
22 |
expires = "";
|
|
|
23 |
}
|
|
|
24 |
document.cookie = name + "=" + value + expires + "; path=/";
|
|
|
25 |
}
|
|
|
26 |
|
|
|
27 |
/**
|
|
|
28 |
* read a value out of a cookie and return the value<br><br>
|
|
|
29 |
* inspired by <a href="http://www.quirksmode.org/js/cookies.html">http://www.quirksmode.org/js/cookies.html</a>
|
|
|
30 |
* @param {String} name name of the value that should be retrieved
|
|
|
31 |
* @return {String}
|
|
|
32 |
*/
|
|
|
33 |
function readCookie(name) {
|
|
|
34 |
var nameEQ = "", ca = [], c = '';
|
|
|
35 |
nameEQ = name + "=";
|
|
|
36 |
ca = document.cookie.split(';');
|
|
|
37 |
for (var i = 0; i < ca.length; i++) {
|
|
|
38 |
c = ca[i];
|
|
|
39 |
while (c.charAt(0) === ' ') {
|
|
|
40 |
c = c.substring(1, c.length);
|
|
|
41 |
}
|
|
|
42 |
if (!c.indexOf(nameEQ)) {
|
|
|
43 |
return c.substring(nameEQ.length, c.length);
|
|
|
44 |
}
|
|
|
45 |
}
|
|
|
46 |
return null;
|
|
|
47 |
}
|
|
|
48 |
|
|
|
49 |
/**
|
|
|
50 |
* activates a given style and disables the old one in the document
|
|
|
51 |
* @param {String} template template that should be activated
|
|
|
52 |
*/
|
|
|
53 |
function switchStyle(template) {
|
|
|
54 |
$("#PSI_Template")[0].setAttribute('href', 'templates/' + template + "_bootstrap.css");
|
|
|
55 |
}
|
|
|
56 |
|
|
|
57 |
/**
|
|
|
58 |
* load the given translation an translate the entire page<br><br>retrieving the translation is done through a
|
|
|
59 |
* ajax call
|
|
|
60 |
* @private
|
|
|
61 |
* @param {String} plugin if plugin is given, the plugin translation file will be read instead of the main translation file
|
|
|
62 |
* @param {String} langarrId internal plugin name
|
|
|
63 |
* @return {jQuery} translation jQuery-Object
|
|
|
64 |
*/
|
|
|
65 |
function getLanguage(plugin, langarrId) {
|
|
|
66 |
var getLangUrl = "";
|
|
|
67 |
if (current_language) {
|
|
|
68 |
getLangUrl = 'language/language.php?lang=' + current_language;
|
|
|
69 |
if (plugin) {
|
|
|
70 |
getLangUrl += "&plugin=" + plugin;
|
|
|
71 |
}
|
|
|
72 |
} else {
|
|
|
73 |
getLangUrl = 'language/language.php';
|
|
|
74 |
if (plugin) {
|
|
|
75 |
getLangUrl += "?plugin=" + plugin;
|
|
|
76 |
}
|
|
|
77 |
}
|
|
|
78 |
$.ajax({
|
|
|
79 |
url: getLangUrl,
|
|
|
80 |
type: 'GET',
|
|
|
81 |
dataType: 'xml',
|
|
|
82 |
timeout: 100000,
|
|
|
83 |
error: function error() {
|
|
|
84 |
$("#errors").append("<li><b>Error loading language</b> - " + getLangUrl + "</li><br>");
|
|
|
85 |
$("#errorbutton").attr('data-toggle', 'modal');
|
|
|
86 |
$("#errorbutton").css('cursor', 'pointer');
|
|
|
87 |
$("#errorbutton").css("visibility", "visible");
|
|
|
88 |
},
|
|
|
89 |
success: function buildblocks(xml) {
|
|
|
90 |
var idexp;
|
|
|
91 |
langxml[langarrId] = xml;
|
|
|
92 |
if (langarr[langarrId] === undefined) {
|
|
|
93 |
langarr.push(langarrId);
|
|
|
94 |
langarr[langarrId] = [];
|
|
|
95 |
}
|
|
|
96 |
$("expression", langxml[langarrId]).each(function langstore(id) {
|
|
|
97 |
idexp = $("expression", xml).get(id);
|
|
|
98 |
langarr[langarrId][this.getAttribute('id')] = $("exp", idexp).text().toString().replace(/\//g, "/<wbr>");
|
|
|
99 |
});
|
|
|
100 |
changeSpanLanguage(plugin);
|
|
|
101 |
}
|
|
|
102 |
});
|
|
|
103 |
}
|
|
|
104 |
|
|
|
105 |
/**
|
|
|
106 |
* generate a span tag
|
|
|
107 |
* @param {Number} id translation id in the xml file
|
|
|
108 |
* @param {String} [plugin] name of the plugin for which the tag should be generated
|
|
|
109 |
* @return {String} string which contains generated span tag for translation string
|
|
|
110 |
*/
|
|
|
111 |
function genlang(id, plugin) {
|
|
|
112 |
var html = "", idString = "", plugname = "",
|
|
|
113 |
langarrId = current_language + "_";
|
|
|
114 |
|
|
|
115 |
if (plugin === undefined) {
|
|
|
116 |
plugname = "";
|
|
|
117 |
langarrId += "phpSysInfo";
|
|
|
118 |
} else {
|
|
|
119 |
plugname = plugin.toLowerCase();
|
|
|
120 |
langarrId += plugname;
|
|
|
121 |
}
|
|
|
122 |
|
|
|
123 |
if (id < 100) {
|
|
|
124 |
if (id < 10) {
|
|
|
125 |
idString = "00" + id.toString();
|
|
|
126 |
} else {
|
|
|
127 |
idString = "0" + id.toString();
|
|
|
128 |
}
|
|
|
129 |
} else {
|
|
|
130 |
idString = id.toString();
|
|
|
131 |
}
|
|
|
132 |
if (plugin) {
|
|
|
133 |
idString = "plugin_" + plugname + "_" + idString;
|
|
|
134 |
}
|
|
|
135 |
|
|
|
136 |
html += "<span class=\"lang_" + idString + "\">";
|
|
|
137 |
|
|
|
138 |
if ((langxml[langarrId] !== undefined) && (langarr[langarrId] !== undefined)) {
|
|
|
139 |
html += langarr[langarrId][idString];
|
|
|
140 |
}
|
|
|
141 |
|
|
|
142 |
html += "</span>";
|
|
|
143 |
|
|
|
144 |
return html;
|
|
|
145 |
}
|
|
|
146 |
|
|
|
147 |
/**
|
|
|
148 |
* translates all expressions based on the translation xml file<br>
|
|
|
149 |
* translation expressions must be in the format <span class="lang_???"></span>, where ??? is
|
|
|
150 |
* the number of the translated expression in the xml file<br><br>if a translated expression is not found in the xml
|
|
|
151 |
* file nothing would be translated, so the initial value which is inside the span tag is displayed
|
|
|
152 |
* @param {String} [plugin] name of the plugin
|
|
|
153 |
*/
|
|
|
154 |
function changeLanguage(plugin) {
|
|
|
155 |
var langarrId = current_language + "_";
|
|
|
156 |
|
|
|
157 |
if (plugin === undefined) {
|
|
|
158 |
langarrId += "phpSysInfo";
|
|
|
159 |
} else {
|
|
|
160 |
langarrId += plugin;
|
|
|
161 |
}
|
|
|
162 |
|
|
|
163 |
if (langxml[langarrId] !== undefined) {
|
|
|
164 |
changeSpanLanguage(plugin);
|
|
|
165 |
} else {
|
|
|
166 |
langxml.push(langarrId);
|
|
|
167 |
getLanguage(plugin, langarrId);
|
|
|
168 |
}
|
|
|
169 |
}
|
|
|
170 |
|
|
|
171 |
function changeSpanLanguage(plugin) {
|
|
|
172 |
var langId = "", langStr = "", langarrId = current_language + "_";
|
|
|
173 |
|
|
|
174 |
if (plugin === undefined) {
|
|
|
175 |
langarrId += "phpSysInfo";
|
|
|
176 |
$('span[class*=lang_]').each(function translate(i) {
|
|
|
177 |
langId = this.className.substring(5);
|
|
|
178 |
if (langId.indexOf('plugin_') !== 0) { //does not begin with plugin_
|
|
|
179 |
langStr = langarr[langarrId][langId];
|
|
|
180 |
if (langStr !== undefined) {
|
|
|
181 |
if (langStr.length > 0) {
|
|
|
182 |
this.innerHTML = langStr;
|
|
|
183 |
}
|
|
|
184 |
}
|
|
|
185 |
}
|
|
|
186 |
});
|
|
|
187 |
$("#select").css( "display", "table-cell" ); //show if any language loaded
|
|
|
188 |
$("#output").show();
|
|
|
189 |
} else {
|
|
|
190 |
langarrId += plugin;
|
|
|
191 |
$('span[class*=lang_plugin_'+plugin.toLowerCase()+'_]').each(function translate(i) {
|
|
|
192 |
langId = this.className.substring(5);
|
|
|
193 |
langStr = langarr[langarrId][langId];
|
|
|
194 |
if (langStr !== undefined) {
|
|
|
195 |
if (langStr.length > 0) {
|
|
|
196 |
this.innerHTML = langStr;
|
|
|
197 |
}
|
|
|
198 |
}
|
|
|
199 |
});
|
|
|
200 |
$('#panel_'+plugin.toLowerCase()).show(); //show plugin if any language loaded
|
|
|
201 |
}
|
|
|
202 |
}
|
|
|
203 |
|
|
|
204 |
function reload(initiate) {
|
|
|
205 |
$("#errorbutton").css("visibility", "hidden");
|
|
|
206 |
$("#errorbutton").css('cursor', 'default');
|
|
|
207 |
$("#errorbutton").attr('data-toggle', '');
|
|
|
208 |
$("#errors").empty();
|
|
|
209 |
$.ajax({
|
|
|
210 |
dataType: "json",
|
|
|
211 |
url: "xml.php?json",
|
|
|
212 |
error: function(jqXHR, status, thrownError) {
|
|
|
213 |
if ((status === "parsererror") && (typeof(xmlDoc = $.parseXML(jqXHR.responseText)) === "object")) {
|
|
|
214 |
var errs = 0;
|
|
|
215 |
try {
|
|
|
216 |
$(xmlDoc).find("Error").each(function() {
|
|
|
217 |
$("#errors").append("<li><b>"+$(this)[0].attributes.Function.nodeValue+"</b> - "+$(this)[0].attributes.Message.nodeValue.replace(/\n/g, "<br>")+"</li><br>");
|
|
|
218 |
errs++;
|
|
|
219 |
});
|
|
|
220 |
}
|
|
|
221 |
catch (err) {
|
|
|
222 |
}
|
|
|
223 |
if (errs > 0) {
|
|
|
224 |
$("#errorbutton").attr('data-toggle', 'modal');
|
|
|
225 |
$("#errorbutton").css('cursor', 'pointer');
|
|
|
226 |
$("#errorbutton").css("visibility", "visible");
|
|
|
227 |
}
|
|
|
228 |
}
|
|
|
229 |
},
|
|
|
230 |
success: function (data) {
|
|
|
231 |
// console.log(data);
|
|
|
232 |
// data_dbg = data;
|
|
|
233 |
if ((typeof(initiate) === 'boolean') && (data.Options !== undefined) && (data.Options["@attributes"] !== undefined) && ((refrtime = data.Options["@attributes"].refresh) !== undefined) && (refrtime !== "0")) {
|
|
|
234 |
if ((initiate === false) && (typeof(refrTimer) === 'number')) {
|
|
|
235 |
clearInterval(refrTimer);
|
|
|
236 |
}
|
|
|
237 |
refrTimer = setInterval(reload, refrtime);
|
|
|
238 |
}
|
|
|
239 |
renderErrors(data);
|
|
|
240 |
renderVitals(data);
|
|
|
241 |
renderHardware(data);
|
|
|
242 |
renderMemory(data);
|
|
|
243 |
renderFilesystem(data);
|
|
|
244 |
renderNetwork(data);
|
|
|
245 |
renderVoltage(data);
|
|
|
246 |
renderTemperature(data);
|
|
|
247 |
renderFans(data);
|
|
|
248 |
renderPower(data);
|
|
|
249 |
renderCurrent(data);
|
|
|
250 |
renderOther(data);
|
|
|
251 |
renderUPS(data);
|
|
|
252 |
changeLanguage();
|
|
|
253 |
}
|
|
|
254 |
});
|
|
|
255 |
|
|
|
256 |
for (var i = 0; i < plugins.length; i++) {
|
|
|
257 |
plugin_request(plugins[i]);
|
|
|
258 |
if ($("#reload_"+plugins[i]).length > 0) {
|
|
|
259 |
$("#reload_"+plugins[i]).attr("title", "reload");
|
|
|
260 |
}
|
|
|
261 |
|
|
|
262 |
}
|
|
|
263 |
|
|
|
264 |
if ((typeof(initiate) === 'boolean') && (initiate === true)) {
|
|
|
265 |
for (var j = 0; j < plugins.length; j++) {
|
|
|
266 |
if ($("#reload_"+plugins[j]).length > 0) {
|
|
|
267 |
$("#reload_"+plugins[j]).click(clickfunction());
|
|
|
268 |
}
|
|
|
269 |
}
|
|
|
270 |
}
|
|
|
271 |
}
|
|
|
272 |
|
|
|
273 |
function clickfunction(){
|
|
|
274 |
return function(){
|
|
|
275 |
plugin_request(this.id.substring(7)); //cut "reload_" from name
|
|
|
276 |
$(this).attr("title", datetime());
|
|
|
277 |
};
|
|
|
278 |
}
|
|
|
279 |
|
|
|
280 |
/**
|
|
|
281 |
* load the plugin json via ajax
|
|
|
282 |
*/
|
|
|
283 |
function plugin_request(pluginname) {
|
|
|
284 |
|
|
|
285 |
$.ajax({
|
|
|
286 |
dataType: "json",
|
|
|
287 |
url: "xml.php?plugin=" + pluginname + "&json",
|
|
|
288 |
pluginname: pluginname,
|
|
|
289 |
success: function (data) {
|
|
|
290 |
try {
|
|
|
291 |
// dynamic call
|
|
|
292 |
window['renderPlugin_' + this.pluginname](data);
|
|
|
293 |
changeLanguage(this.pluginname);
|
|
|
294 |
plugin_liste.pushIfNotExist(this.pluginname);
|
|
|
295 |
}
|
|
|
296 |
catch (err) {
|
|
|
297 |
}
|
|
|
298 |
renderErrors(data);
|
|
|
299 |
}
|
|
|
300 |
});
|
|
|
301 |
}
|
|
|
302 |
|
|
|
303 |
|
|
|
304 |
$(document).ready(function () {
|
|
|
305 |
var old_template = null, cookie_template = null, cookie_language = null, plugtmp = "", blocktmp = "", ua = null, useragent = navigator.userAgent;
|
|
|
306 |
|
|
|
307 |
if ($("#hideBootstrapLoader").val().toString()!=="true") {
|
|
|
308 |
$(document).ajaxStart(function () {
|
|
|
309 |
$("#loader").css("visibility", "visible");
|
|
|
310 |
});
|
|
|
311 |
$(document).ajaxStop(function () {
|
|
|
312 |
$("#loader").css("visibility", "hidden");
|
|
|
313 |
});
|
|
|
314 |
}
|
|
|
315 |
|
|
|
316 |
if (((ua=useragent.match(/Safari\/(\d+)\.[\d\.]+$/)) !== null) && (ua[1]<=534)) {
|
|
|
317 |
$("#PSI_CSS_Fix")[0].setAttribute('href', 'templates/vendor/bootstrap-safari5.css');
|
|
|
318 |
} else if ((ua=useragent.match(/Firefox\/(\d+)\.[\d\.]+$/)) !== null) {
|
|
|
319 |
if (ua[1]<=15) {
|
|
|
320 |
$("#PSI_CSS_Fix")[0].setAttribute('href', 'templates/vendor/bootstrap-firefox15.css');
|
|
|
321 |
} else if (ua[1]<=20) {
|
|
|
322 |
$("#PSI_CSS_Fix")[0].setAttribute('href', 'templates/vendor/bootstrap-firefox20.css');
|
|
|
323 |
} else if (ua[1]<=27) {
|
|
|
324 |
$("#PSI_CSS_Fix")[0].setAttribute('href', 'templates/vendor/bootstrap-firefox27.css');
|
|
|
325 |
} else if (ua[1]==28) {
|
|
|
326 |
$("#PSI_CSS_Fix")[0].setAttribute('href', 'templates/vendor/bootstrap-firefox28.css');
|
|
|
327 |
}
|
|
|
328 |
}
|
|
|
329 |
|
|
|
330 |
$(window).resize();
|
|
|
331 |
|
|
|
332 |
sorttable.init();
|
|
|
333 |
|
|
|
334 |
showCPUListExpanded = $("#showCPUListExpanded").val().toString()==="true";
|
|
|
335 |
showCPUInfoExpanded = $("#showCPUInfoExpanded").val().toString()==="true";
|
|
|
336 |
showNetworkInfosExpanded = $("#showNetworkInfosExpanded").val().toString()==="true";
|
|
|
337 |
showCPULoadCompact = $("#showCPULoadCompact").val().toString()==="true";
|
|
|
338 |
switch ($("#showNetworkActiveSpeed").val().toString()) {
|
|
|
339 |
case "bps": showNetworkActiveSpeed = 2;
|
|
|
340 |
break;
|
|
|
341 |
case "true": showNetworkActiveSpeed = 1;
|
|
|
342 |
break;
|
|
|
343 |
default: showNetworkActiveSpeed = 0;
|
|
|
344 |
}
|
|
|
345 |
|
|
|
346 |
blocktmp = $("#blocks").val().toString();
|
|
|
347 |
if (blocktmp.length >0 ){
|
|
|
348 |
if (blocktmp === "true") {
|
|
|
349 |
blocks[0] = "true";
|
|
|
350 |
} else {
|
|
|
351 |
blocks = blocktmp.split(',');
|
|
|
352 |
var j = 0;
|
|
|
353 |
for (var i = 0; i < blocks.length; i++) {
|
|
|
354 |
if ($("#block_"+blocks[i]).length > 0) {
|
|
|
355 |
$("#output").children().eq(j).before($("#block_"+blocks[i]));
|
|
|
356 |
j++;
|
|
|
357 |
}
|
|
|
358 |
}
|
|
|
359 |
}
|
|
|
360 |
}
|
|
|
361 |
|
|
|
362 |
plugtmp = $("#plugins").val().toString();
|
|
|
363 |
if (plugtmp.length >0 ){
|
|
|
364 |
plugins = plugtmp.split(',');
|
|
|
365 |
}
|
|
|
366 |
|
|
|
367 |
|
|
|
368 |
if ($("#language option").length < 2) {
|
|
|
369 |
current_language = $("#language").val().toString();
|
|
|
370 |
/* not visible any objects
|
|
|
371 |
changeLanguage();
|
|
|
372 |
*/
|
|
|
373 |
/* plugin_liste not initialized yet
|
|
|
374 |
for (var i = 0; i < plugin_liste.length; i++) {
|
|
|
375 |
changeLanguage(plugin_liste[i]);
|
|
|
376 |
}
|
|
|
377 |
*/
|
|
|
378 |
} else {
|
|
|
379 |
cookie_language = readCookie("psi_language");
|
|
|
380 |
if (cookie_language !== null) {
|
|
|
381 |
current_language = cookie_language;
|
|
|
382 |
$("#language").val(current_language);
|
|
|
383 |
} else {
|
|
|
384 |
current_language = $("#language").val().toString();
|
|
|
385 |
}
|
|
|
386 |
/* not visible any objects
|
|
|
387 |
changeLanguage();
|
|
|
388 |
*/
|
|
|
389 |
/* plugin_liste not initialized yet
|
|
|
390 |
for (var i = 0; i < plugin_liste.length; i++) {
|
|
|
391 |
changeLanguage(plugin_liste[i]);
|
|
|
392 |
}
|
|
|
393 |
*/
|
|
|
394 |
$("#langblock").css( "display", "inline-block" );
|
|
|
395 |
|
|
|
396 |
$("#language").change(function changeLang() {
|
|
|
397 |
current_language = $("#language").val().toString();
|
|
|
398 |
createCookie('psi_language', current_language, 365);
|
|
|
399 |
changeLanguage();
|
|
|
400 |
for (var i = 0; i < plugin_liste.length; i++) {
|
|
|
401 |
changeLanguage(plugin_liste[i]);
|
|
|
402 |
}
|
|
|
403 |
return false;
|
|
|
404 |
});
|
|
|
405 |
}
|
|
|
406 |
if ($("#template option").length < 2) {
|
|
|
407 |
switchStyle($("#template").val().toString());
|
|
|
408 |
} else {
|
|
|
409 |
cookie_template = readCookie("psi_bootstrap_template");
|
|
|
410 |
if (cookie_template !== null) {
|
|
|
411 |
old_template = $("#template").val();
|
|
|
412 |
$("#template").val(cookie_template);
|
|
|
413 |
if ($("#template").val() === null) {
|
|
|
414 |
$("#template").val(old_template);
|
|
|
415 |
}
|
|
|
416 |
}
|
|
|
417 |
switchStyle($("#template").val().toString());
|
|
|
418 |
|
|
|
419 |
$("#tempblock").css( "display", "inline-block" );
|
|
|
420 |
|
|
|
421 |
$("#template").change(function changeTemplate() {
|
|
|
422 |
switchStyle($("#template").val().toString());
|
|
|
423 |
createCookie('psi_bootstrap_template', $("#template").val().toString(), 365);
|
|
|
424 |
return false;
|
|
|
425 |
});
|
|
|
426 |
}
|
|
|
427 |
|
|
|
428 |
reload(true);
|
|
|
429 |
|
|
|
430 |
$(".logo").click(function () {
|
|
|
431 |
reload(false);
|
|
|
432 |
});
|
|
|
433 |
});
|
|
|
434 |
|
|
|
435 |
Array.prototype.push_attrs=function(element) {
|
|
|
436 |
for (var i = 0; i < element.length ; i++) {
|
|
|
437 |
this.push(element[i]["@attributes"]);
|
|
|
438 |
}
|
|
|
439 |
return i;
|
|
|
440 |
};
|
|
|
441 |
|
|
|
442 |
function full_addr(ip_string) {
|
|
|
443 |
var wrongvalue = false;
|
|
|
444 |
ip_string = $.trim(ip_string).toLowerCase();
|
|
|
445 |
// ipv4 notation
|
|
|
446 |
if (ip_string.match(/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$)/)) {
|
|
|
447 |
ip_string ='::ffff:' + ip_string;
|
|
|
448 |
}
|
|
|
449 |
// replace ipv4 address if any
|
|
|
450 |
var ipv4 = ip_string.match(/(.*:)([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$)/);
|
|
|
451 |
if (ipv4) {
|
|
|
452 |
ip_string = ipv4[1];
|
|
|
453 |
ipv4 = ipv4[2].match(/[0-9]+/g);
|
|
|
454 |
for (var i = 0;i < 4;i ++) {
|
|
|
455 |
var byte = parseInt(ipv4[i],10);
|
|
|
456 |
if (byte<256) {
|
|
|
457 |
ipv4[i] = ("0" + byte.toString(16)).substr(-2);
|
|
|
458 |
} else {
|
|
|
459 |
wrongvalue = true;
|
|
|
460 |
break;
|
|
|
461 |
}
|
|
|
462 |
}
|
|
|
463 |
if (wrongvalue) {
|
|
|
464 |
ip_string = '';
|
|
|
465 |
} else {
|
|
|
466 |
ip_string += ipv4[0] + ipv4[1] + ':' + ipv4[2] + ipv4[3];
|
|
|
467 |
}
|
|
|
468 |
}
|
|
|
469 |
|
|
|
470 |
if (ip_string === '') {
|
|
|
471 |
return '';
|
|
|
472 |
}
|
|
|
473 |
// take care of leading and trailing ::
|
|
|
474 |
ip_string = ip_string.replace(/^:|:$/g, '');
|
|
|
475 |
|
|
|
476 |
var ipv6 = ip_string.split(':');
|
|
|
477 |
|
|
|
478 |
for (var li = 0; li < ipv6.length; li ++) {
|
|
|
479 |
var hex = ipv6[li];
|
|
|
480 |
if (hex !== "") {
|
|
|
481 |
if (!hex.match(/^[0-9a-f]{1,4}$/)) {
|
|
|
482 |
wrongvalue = true;
|
|
|
483 |
break;
|
|
|
484 |
}
|
|
|
485 |
// normalize leading zeros
|
|
|
486 |
ipv6[li] = ("0000" + hex).substr(-4);
|
|
|
487 |
}
|
|
|
488 |
else {
|
|
|
489 |
// normalize grouped zeros ::
|
|
|
490 |
hex = [];
|
|
|
491 |
for (var j = ipv6.length; j <= 8; j ++) {
|
|
|
492 |
hex.push('0000');
|
|
|
493 |
}
|
|
|
494 |
ipv6[li] = hex.join(':');
|
|
|
495 |
}
|
|
|
496 |
}
|
|
|
497 |
if (!wrongvalue) {
|
|
|
498 |
var out = ipv6.join(':');
|
|
|
499 |
if (out.length == 39) {
|
|
|
500 |
return out;
|
|
|
501 |
} else {
|
|
|
502 |
return '';
|
|
|
503 |
}
|
|
|
504 |
} else {
|
|
|
505 |
return '';
|
|
|
506 |
}
|
|
|
507 |
}
|
|
|
508 |
|
|
|
509 |
sorttable.sort_ip=function(a,b) {
|
|
|
510 |
var x = full_addr(a[0]);
|
|
|
511 |
var y = full_addr(b[0]);
|
|
|
512 |
if ((x === '') || (y === '')) {
|
|
|
513 |
x = a[0];
|
|
|
514 |
y = b[0];
|
|
|
515 |
}
|
|
|
516 |
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
|
|
|
517 |
};
|
|
|
518 |
|
|
|
519 |
function items(data) {
|
|
|
520 |
if (data !== undefined) {
|
|
|
521 |
if ((data.length > 0) && (data[0] !== undefined) && (data[0]["@attributes"] !== undefined)) {
|
|
|
522 |
return data;
|
|
|
523 |
} else if (data["@attributes"] !== undefined ) {
|
|
|
524 |
return [data];
|
|
|
525 |
} else {
|
|
|
526 |
return [];
|
|
|
527 |
}
|
|
|
528 |
} else {
|
|
|
529 |
return [];
|
|
|
530 |
}
|
|
|
531 |
}
|
|
|
532 |
|
|
|
533 |
function renderVitals(data) {
|
|
|
534 |
var hostname = "", ip = "";
|
|
|
535 |
|
|
|
536 |
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('vitals', blocks) < 0))) {
|
|
|
537 |
$("#block_vitals").remove();
|
|
|
538 |
if ((data.Vitals !== undefined) && (data.Vitals["@attributes"] !== undefined) && ((hostname = data.Vitals["@attributes"].Hostname) !== undefined) && ((ip = data.Vitals["@attributes"].IPAddr) !== undefined)) {
|
|
|
539 |
document.title = "System information: " + hostname + " (" + ip + ")";
|
|
|
540 |
}
|
|
|
541 |
return;
|
|
|
542 |
}
|
|
|
543 |
|
|
|
544 |
var directives = {
|
|
|
545 |
Uptime: {
|
|
|
546 |
html: function () {
|
|
|
547 |
return formatUptime(this.Uptime);
|
|
|
548 |
}
|
|
|
549 |
},
|
|
|
550 |
LastBoot: {
|
|
|
551 |
text: function () {
|
|
|
552 |
var lastboot;
|
|
|
553 |
var timestamp = 0;
|
|
|
554 |
var datetimeFormat;
|
|
|
555 |
if ((data.Generation !== undefined) && (data.Generation["@attributes"] !== undefined) && (data.Generation["@attributes"].timestamp !== undefined) ) {
|
|
|
556 |
timestamp = parseInt(data.Generation["@attributes"].timestamp)*1000; //server time
|
|
|
557 |
if (isNaN(timestamp)) timestamp = Number(new Date()); //client time
|
|
|
558 |
} else {
|
|
|
559 |
timestamp = Number(new Date()); //client time
|
|
|
560 |
}
|
|
|
561 |
lastboot = new Date(timestamp - (parseInt(this.Uptime)*1000));
|
|
|
562 |
if (((datetimeFormat = data.Options["@attributes"].datetimeFormat) !== undefined) && (datetimeFormat.toLowerCase() === "locale")) {
|
|
|
563 |
return lastboot.toLocaleString();
|
|
|
564 |
} else {
|
|
|
565 |
if (typeof(lastboot.toUTCString) === "function") {
|
|
|
566 |
return lastboot.toUTCString();
|
|
|
567 |
} else {
|
|
|
568 |
//deprecated
|
|
|
569 |
return lastboot.toGMTString();
|
|
|
570 |
}
|
|
|
571 |
}
|
|
|
572 |
}
|
|
|
573 |
},
|
|
|
574 |
Distro: {
|
|
|
575 |
html: function () {
|
|
|
576 |
return '<table class="borderless table-hover table-nopadding" style="width:100%;"><tr><td style="padding-right:4px!important;width:32px;"><img src="gfx/images/' + this.Distroicon + '" alt="" style="width:32px;height:32px;" /></td><td style="vertical-align:middle;">' + this.Distro + '</td></tr></table>';
|
|
|
577 |
}
|
|
|
578 |
},
|
|
|
579 |
OS: {
|
|
|
580 |
html: function () {
|
|
|
581 |
return '<table class="borderless table-hover table-nopadding" style="width:100%;"><tr><td style="padding-right:4px!important;width:32px;"><img src="gfx/images/' + this.OS + '.png" alt="" style="width:32px;height:32px;" /></td><td style="vertical-align:middle;">' + this.OS + '</td></tr></table>';
|
|
|
582 |
}
|
|
|
583 |
},
|
|
|
584 |
LoadAvg: {
|
|
|
585 |
html: function () {
|
|
|
586 |
if (this.CPULoad !== undefined) {
|
|
|
587 |
return '<table class="borderless table-hover table-nopadding" style="width:100%;"><tr><td style="padding-right:4px!important;width:50%;">'+this.LoadAvg + '</td><td><div class="progress">' +
|
|
|
588 |
'<div class="progress-bar progress-bar-info" style="width:' + round(this.CPULoad,0) + '%;"></div>' +
|
|
|
589 |
'</div><div class="percent">' + round(this.CPULoad,0) + '%</div></td></tr></table>';
|
|
|
590 |
} else {
|
|
|
591 |
return this.LoadAvg;
|
|
|
592 |
}
|
|
|
593 |
}
|
|
|
594 |
},
|
|
|
595 |
Processes: {
|
|
|
596 |
html: function () {
|
|
|
597 |
var processes = "", p111 = 0, p112 = 0, p113 = 0, p114 = 0, p115 = 0, p116 = 0;
|
|
|
598 |
var not_first = false;
|
|
|
599 |
processes = parseInt(this.Processes);
|
|
|
600 |
if (this.ProcessesRunning !== undefined) {
|
|
|
601 |
p111 = parseInt(this.ProcessesRunning);
|
|
|
602 |
}
|
|
|
603 |
if (this.ProcessesSleeping !== undefined) {
|
|
|
604 |
p112 = parseInt(this.ProcessesSleeping);
|
|
|
605 |
}
|
|
|
606 |
if (this.ProcessesStopped !== undefined) {
|
|
|
607 |
p113 = parseInt(this.ProcessesStopped);
|
|
|
608 |
}
|
|
|
609 |
if (this.ProcessesZombie !== undefined) {
|
|
|
610 |
p114 = parseInt(this.ProcessesZombie);
|
|
|
611 |
}
|
|
|
612 |
if (this.ProcessesWaiting !== undefined) {
|
|
|
613 |
p115 = parseInt(this.ProcessesWaiting);
|
|
|
614 |
}
|
|
|
615 |
if (this.ProcessesOther !== undefined) {
|
|
|
616 |
p116 = parseInt(this.ProcessesOther);
|
|
|
617 |
}
|
|
|
618 |
if (p111 || p112 || p113 || p114 || p115 || p116) {
|
|
|
619 |
processes += " (";
|
|
|
620 |
for (var proc_type in {111:0,112:1,113:2,114:3,115:4,116:5}) {
|
|
|
621 |
if (eval("p" + proc_type)) {
|
|
|
622 |
if (not_first) {
|
|
|
623 |
processes += ", ";
|
|
|
624 |
}
|
|
|
625 |
processes += eval("p" + proc_type) + String.fromCharCode(160) + genlang(proc_type);
|
|
|
626 |
not_first = true;
|
|
|
627 |
}
|
|
|
628 |
}
|
|
|
629 |
processes += ")";
|
|
|
630 |
}
|
|
|
631 |
return processes;
|
|
|
632 |
}
|
|
|
633 |
}
|
|
|
634 |
};
|
|
|
635 |
|
|
|
636 |
if (data.Vitals["@attributes"].SysLang === undefined) {
|
|
|
637 |
$("#tr_SysLang").hide();
|
|
|
638 |
}
|
|
|
639 |
if (data.Vitals["@attributes"].CodePage === undefined) {
|
|
|
640 |
$("#tr_CodePage").hide();
|
|
|
641 |
}
|
|
|
642 |
if (data.Vitals["@attributes"].Processes === undefined) {
|
|
|
643 |
$("#tr_Processes").hide();
|
|
|
644 |
}
|
|
|
645 |
$('#vitals').render(data.Vitals["@attributes"], directives);
|
|
|
646 |
|
|
|
647 |
if ((data.Vitals !== undefined) && (data.Vitals["@attributes"] !== undefined) && ((hostname = data.Vitals["@attributes"].Hostname) !== undefined) && ((ip = data.Vitals["@attributes"].IPAddr) !== undefined)) {
|
|
|
648 |
document.title = "System information: " + hostname + " (" + ip + ")";
|
|
|
649 |
}
|
|
|
650 |
|
|
|
651 |
$("#block_vitals").show();
|
|
|
652 |
}
|
|
|
653 |
|
|
|
654 |
function renderHardware(data) {
|
|
|
655 |
var hw_type, datas, proc_param, i;
|
|
|
656 |
|
|
|
657 |
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('hardware', blocks) < 0))) {
|
|
|
658 |
$("#block_hardware").remove();
|
|
|
659 |
return;
|
|
|
660 |
}
|
|
|
661 |
|
|
|
662 |
var directives = {
|
|
|
663 |
Model: {
|
|
|
664 |
text: function () {
|
|
|
665 |
return this.Model;
|
|
|
666 |
}
|
|
|
667 |
},
|
|
|
668 |
CpuSpeed: {
|
|
|
669 |
html: function () {
|
|
|
670 |
return formatHertz(this.CpuSpeed);
|
|
|
671 |
}
|
|
|
672 |
},
|
|
|
673 |
CpuSpeedMax: {
|
|
|
674 |
html: function () {
|
|
|
675 |
return formatHertz(this.CpuSpeedMax);
|
|
|
676 |
}
|
|
|
677 |
},
|
|
|
678 |
CpuSpeedMin: {
|
|
|
679 |
html: function () {
|
|
|
680 |
return formatHertz(this.CpuSpeedMin);
|
|
|
681 |
}
|
|
|
682 |
},
|
|
|
683 |
Cache: {
|
|
|
684 |
html: function () {
|
|
|
685 |
return formatBytes(this.Cache, data.Options["@attributes"].byteFormat);
|
|
|
686 |
}
|
|
|
687 |
},
|
|
|
688 |
BusSpeed: {
|
|
|
689 |
html: function () {
|
|
|
690 |
return formatHertz(this.BusSpeed);
|
|
|
691 |
}
|
|
|
692 |
},
|
|
|
693 |
Cputemp: {
|
|
|
694 |
html: function () {
|
|
|
695 |
return formatTemp(this.Cputemp, data.Options["@attributes"].tempFormat);
|
|
|
696 |
}
|
|
|
697 |
},
|
|
|
698 |
Bogomips: {
|
|
|
699 |
text: function () {
|
|
|
700 |
return parseInt(this.Bogomips);
|
|
|
701 |
}
|
|
|
702 |
},
|
|
|
703 |
Load: {
|
|
|
704 |
html: function () {
|
|
|
705 |
return '<div class="progress">' +
|
|
|
706 |
'<div class="progress-bar progress-bar-info" style="width:' + round(this.Load,0) + '%;"></div>' +
|
|
|
707 |
'</div><div class="percent">' + round(this.Load,0) + '%</div>';
|
|
|
708 |
}
|
|
|
709 |
}
|
|
|
710 |
};
|
|
|
711 |
|
|
|
712 |
var hw_directives = {
|
|
|
713 |
hwName: {
|
|
|
714 |
html: function() {
|
|
|
715 |
return this.Name;
|
|
|
716 |
}
|
|
|
717 |
},
|
|
|
718 |
hwCount: {
|
|
|
719 |
text: function() {
|
|
|
720 |
if ((this.Count !== undefined) && !isNaN(this.Count) && (parseInt(this.Count)>1)) {
|
|
|
721 |
return parseInt(this.Count);
|
|
|
722 |
} else {
|
|
|
723 |
return "";
|
|
|
724 |
}
|
|
|
725 |
}
|
|
|
726 |
}
|
|
|
727 |
};
|
|
|
728 |
|
|
|
729 |
var dev_directives = {
|
|
|
730 |
Capacity: {
|
|
|
731 |
html: function () {
|
|
|
732 |
return formatBytes(this.Capacity, data.Options["@attributes"].byteFormat);
|
|
|
733 |
}
|
|
|
734 |
}
|
|
|
735 |
};
|
|
|
736 |
|
|
|
737 |
var html="";
|
|
|
738 |
|
|
|
739 |
if ((data.Hardware["@attributes"] !== undefined) && (data.Hardware["@attributes"].Name !== undefined)) {
|
|
|
740 |
html+="<tr id=\"hardware-Machine\">";
|
|
|
741 |
html+="<th style=\"width:8%;\">"+genlang(107)+"</th>"; //Machine
|
|
|
742 |
html+="<td colspan=\"2\"><span data-bind=\"Name\"></span></td>";
|
|
|
743 |
html+="</tr>";
|
|
|
744 |
}
|
|
|
745 |
|
|
|
746 |
var paramlist = {CpuSpeed:13,CpuSpeedMax:100,CpuSpeedMin:101,Cache:15,Virt:94,BusSpeed:14,Bogomips:16,Cputemp:51,Manufacturer:122,Load:9};
|
|
|
747 |
try {
|
|
|
748 |
datas = items(data.Hardware.CPU.CpuCore);
|
|
|
749 |
for (i = 0; i < datas.length; i++) {
|
|
|
750 |
if (i === 0) {
|
|
|
751 |
html+="<tr id=\"hardware-CPU\" class=\"treegrid-CPU\">";
|
|
|
752 |
html+="<th>CPU</th>";
|
|
|
753 |
html+="<td><span class=\"treegrid-span\">" + genlang(119) + ":</span></td>"; //Number of processors
|
|
|
754 |
html+="<td class=\"rightCell\"><span id=\"CPUCount\"></span></td>";
|
|
|
755 |
html+="</tr>";
|
|
|
756 |
}
|
|
|
757 |
html+="<tr id=\"hardware-CPU-" + i +"\" class=\"treegrid-CPU-" + i +" treegrid-parent-CPU\">";
|
|
|
758 |
html+="<th></th>";
|
|
|
759 |
if (showCPULoadCompact && (datas[i]["@attributes"].Load !== undefined)) {
|
|
|
760 |
html+="<td><span class=\"treegrid-span\" data-bind=\"Model\"></span></td>";
|
|
|
761 |
html+="<td style=\"width:15%;\" class=\"rightCell\"><span data-bind=\"Load\"></span></td>";
|
|
|
762 |
} else {
|
|
|
763 |
html+="<td colspan=\"2\"><span class=\"treegrid-span\" data-bind=\"Model\"></span></td>";
|
|
|
764 |
}
|
|
|
765 |
html+="</tr>";
|
|
|
766 |
for (proc_param in paramlist) {
|
|
|
767 |
if (((proc_param !== 'Load') || !showCPULoadCompact) && (datas[i]["@attributes"][proc_param] !== undefined)) {
|
|
|
768 |
html+="<tr id=\"hardware-CPU-" + i + "-" + proc_param + "\" class=\"treegrid-parent-CPU-" + i +"\">";
|
|
|
769 |
html+="<th></th>";
|
|
|
770 |
html+="<td><span class=\"treegrid-span\">" + genlang(paramlist[proc_param]) + "<span></td>";
|
|
|
771 |
html+="<td class=\"rightCell\"><span data-bind=\"" + proc_param + "\"></span></td>";
|
|
|
772 |
html+="</tr>";
|
|
|
773 |
}
|
|
|
774 |
}
|
|
|
775 |
|
|
|
776 |
}
|
|
|
777 |
}
|
|
|
778 |
catch (err) {
|
|
|
779 |
$("#hardware-CPU").hide();
|
|
|
780 |
}
|
|
|
781 |
|
|
|
782 |
var devparamlist = {Capacity:43,Manufacturer:122,Product:123,Serial:124};
|
|
|
783 |
for (hw_type in {PCI:0,IDE:1,SCSI:2,NVMe:3,USB:4,TB:5,I2C:6}) {
|
|
|
784 |
try {
|
|
|
785 |
datas = items(data.Hardware[hw_type].Device);
|
|
|
786 |
for (i = 0; i < datas.length; i++) {
|
|
|
787 |
if (i === 0) {
|
|
|
788 |
html+="<tr id=\"hardware-" + hw_type + "\" class=\"treegrid-" + hw_type + "\">";
|
|
|
789 |
html+="<th>" + hw_type + "</th>";
|
|
|
790 |
html+="<td><span class=\"treegrid-span\">" + genlang('120') + ":</span></td>"; //Number of devices
|
|
|
791 |
html+="<td class=\"rightCell\"><span id=\"" + hw_type + "Count\"></span></td>";
|
|
|
792 |
html+="</tr>";
|
|
|
793 |
}
|
|
|
794 |
html+="<tr id=\"hardware-" + hw_type + "-" + i +"\" class=\"treegrid-" + hw_type + "-" + i +" treegrid-parent-" + hw_type + "\">";
|
|
|
795 |
html+="<th></th>";
|
|
|
796 |
html+="<td><span class=\"treegrid-span\" data-bind=\"hwName\"></span></td>";
|
|
|
797 |
html+="<td class=\"rightCell\"><span data-bind=\"hwCount\"></span></td>";
|
|
|
798 |
html+="</tr>";
|
|
|
799 |
for (proc_param in devparamlist) {
|
|
|
800 |
if (datas[i]["@attributes"][proc_param] !== undefined) {
|
|
|
801 |
html+="<tr id=\"hardware-" + hw_type +"-" + i + "-" + proc_param + "\" class=\"treegrid-parent-" + hw_type +"-" + i +"\">";
|
|
|
802 |
html+="<th></th>";
|
|
|
803 |
html+="<td><span class=\"treegrid-span\">" + genlang(devparamlist[proc_param]) + "<span></td>";
|
|
|
804 |
html+="<td class=\"rightCell\"><span data-bind=\"" + proc_param + "\"></span></td>";
|
|
|
805 |
html+="</tr>";
|
|
|
806 |
}
|
|
|
807 |
}
|
|
|
808 |
}
|
|
|
809 |
}
|
|
|
810 |
catch (err) {
|
|
|
811 |
$("#hardware-data"+hw_type).hide();
|
|
|
812 |
}
|
|
|
813 |
}
|
|
|
814 |
$("#hardware-data").empty().append(html);
|
|
|
815 |
|
|
|
816 |
|
|
|
817 |
if ((data.Hardware["@attributes"] !== undefined) && (data.Hardware["@attributes"].Name !== undefined)) {
|
|
|
818 |
$('#hardware-Machine').render(data.Hardware["@attributes"]);
|
|
|
819 |
}
|
|
|
820 |
|
|
|
821 |
try {
|
|
|
822 |
datas = items(data.Hardware.CPU.CpuCore);
|
|
|
823 |
for (i = 0; i < datas.length; i++) {
|
|
|
824 |
$('#hardware-CPU-'+ i).render(datas[i]["@attributes"], directives);
|
|
|
825 |
for (proc_param in paramlist) {
|
|
|
826 |
if (((proc_param !== 'Load') || !showCPULoadCompact) && (datas[i]["@attributes"][proc_param] !== undefined)) {
|
|
|
827 |
$('#hardware-CPU-'+ i +'-'+proc_param).render(datas[i]["@attributes"], directives);
|
|
|
828 |
}
|
|
|
829 |
}
|
|
|
830 |
}
|
|
|
831 |
if (i > 0) {
|
|
|
832 |
$("#CPUCount").html(i);
|
|
|
833 |
}
|
|
|
834 |
}
|
|
|
835 |
catch (err) {
|
|
|
836 |
$("#hardware-CPU").hide();
|
|
|
837 |
}
|
|
|
838 |
|
|
|
839 |
var licz;
|
|
|
840 |
for (hw_type in {PCI:0,IDE:1,SCSI:2,NVMe:3,USB:4,TB:5,I2C:6}) {
|
|
|
841 |
try {
|
|
|
842 |
licz = 0;
|
|
|
843 |
datas = items(data.Hardware[hw_type].Device);
|
|
|
844 |
for (i = 0; i < datas.length; i++) {
|
|
|
845 |
$('#hardware-'+hw_type+'-'+ i).render(datas[i]["@attributes"], hw_directives);
|
|
|
846 |
if ((datas[i]["@attributes"].Count !== undefined) && !isNaN(datas[i]["@attributes"].Count) && (parseInt(datas[i]["@attributes"].Count)>1)) {
|
|
|
847 |
licz += parseInt(datas[i]["@attributes"].Count);
|
|
|
848 |
} else {
|
|
|
849 |
licz++;
|
|
|
850 |
}
|
|
|
851 |
for (proc_param in devparamlist) {
|
|
|
852 |
if ((datas[i]["@attributes"][proc_param] !== undefined)) {
|
|
|
853 |
$('#hardware-'+hw_type+'-'+ i +'-'+proc_param).render(datas[i]["@attributes"], dev_directives);
|
|
|
854 |
}
|
|
|
855 |
}
|
|
|
856 |
}
|
|
|
857 |
if (i > 0) {
|
|
|
858 |
$("#" + hw_type + "Count").html(licz);
|
|
|
859 |
}
|
|
|
860 |
}
|
|
|
861 |
catch (err) {
|
|
|
862 |
$("#hardware-"+hw_type).hide();
|
|
|
863 |
}
|
|
|
864 |
}
|
|
|
865 |
$('#hardware').treegrid({
|
|
|
866 |
initialState: 'collapsed',
|
|
|
867 |
expanderExpandedClass: 'normalicon normalicon-down',
|
|
|
868 |
expanderCollapsedClass: 'normalicon normalicon-right'
|
|
|
869 |
});
|
|
|
870 |
if (showCPUListExpanded) {
|
|
|
871 |
try {
|
|
|
872 |
$('#hardware-CPU').treegrid('expand');
|
|
|
873 |
}
|
|
|
874 |
catch (err) {
|
|
|
875 |
}
|
|
|
876 |
}
|
|
|
877 |
if (showCPUInfoExpanded && showCPUListExpanded) {
|
|
|
878 |
try {
|
|
|
879 |
datas = items(data.Hardware.CPU.CpuCore);
|
|
|
880 |
for (i = 0; i < datas.length; i++) {
|
|
|
881 |
$('#hardware-CPU-'+i).treegrid('expand');
|
|
|
882 |
}
|
|
|
883 |
}
|
|
|
884 |
catch (err) {
|
|
|
885 |
}
|
|
|
886 |
}
|
|
|
887 |
$("#block_hardware").show();
|
|
|
888 |
}
|
|
|
889 |
|
|
|
890 |
function renderMemory(data) {
|
|
|
891 |
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('memory', blocks) < 0))) {
|
|
|
892 |
$("#block_memory").remove();
|
|
|
893 |
return;
|
|
|
894 |
}
|
|
|
895 |
|
|
|
896 |
var directives = {
|
|
|
897 |
Total: {
|
|
|
898 |
html: function () {
|
|
|
899 |
return formatBytes(this["@attributes"].Total, data.Options["@attributes"].byteFormat);
|
|
|
900 |
}
|
|
|
901 |
},
|
|
|
902 |
Free: {
|
|
|
903 |
html: function () {
|
|
|
904 |
return formatBytes(this["@attributes"].Free, data.Options["@attributes"].byteFormat);
|
|
|
905 |
}
|
|
|
906 |
},
|
|
|
907 |
Used: {
|
|
|
908 |
html: function () {
|
|
|
909 |
return formatBytes(this["@attributes"].Used, data.Options["@attributes"].byteFormat);
|
|
|
910 |
}
|
|
|
911 |
},
|
|
|
912 |
Usage: {
|
|
|
913 |
html: function () {
|
|
|
914 |
if ((this.Details === undefined) || (this.Details["@attributes"] === undefined)) {
|
|
|
915 |
return '<div class="progress">' +
|
|
|
916 |
'<div class="progress-bar progress-bar-info" style="width:' + this["@attributes"].Percent + '%;"></div>' +
|
|
|
917 |
'</div><div class="percent">' + this["@attributes"].Percent + '%</div>';
|
|
|
918 |
} else {
|
|
|
919 |
var rest = parseInt(this["@attributes"].Percent);
|
|
|
920 |
var html = '<div class="progress">';
|
|
|
921 |
if ((this.Details["@attributes"].AppPercent !== undefined) && (this.Details["@attributes"].AppPercent > 0)) {
|
|
|
922 |
html += '<div class="progress-bar progress-bar-info" style="width:' + this.Details["@attributes"].AppPercent + '%;"></div>';
|
|
|
923 |
rest -= parseInt(this.Details["@attributes"].AppPercent);
|
|
|
924 |
}
|
|
|
925 |
if ((this.Details["@attributes"].CachedPercent !== undefined) && (this.Details["@attributes"].CachedPercent > 0)) {
|
|
|
926 |
html += '<div class="progress-bar progress-bar-warning" style="width:' + this.Details["@attributes"].CachedPercent + '%;"></div>';
|
|
|
927 |
rest -= parseInt(this.Details["@attributes"].CachedPercent);
|
|
|
928 |
}
|
|
|
929 |
if ((this.Details["@attributes"].BuffersPercent !== undefined) && (this.Details["@attributes"].BuffersPercent > 0)) {
|
|
|
930 |
html += '<div class="progress-bar progress-bar-danger" style="width:' + this.Details["@attributes"].BuffersPercent + '%;"></div>';
|
|
|
931 |
rest -= parseInt(this.Details["@attributes"].BuffersPercent);
|
|
|
932 |
}
|
|
|
933 |
if (rest > 0) {
|
|
|
934 |
html += '<div class="progress-bar progress-bar-success" style="width:' + rest + '%;"></div>';
|
|
|
935 |
}
|
|
|
936 |
html += '</div>';
|
|
|
937 |
html += '<div class="percent">' + 'Total: ' + this["@attributes"].Percent + '% ' + '<i>(';
|
|
|
938 |
var not_first = false;
|
|
|
939 |
if (this.Details["@attributes"].AppPercent !== undefined) {
|
|
|
940 |
html += genlang(64) + ': '+ this.Details["@attributes"].AppPercent + '%'; //Kernel + apps
|
|
|
941 |
not_first = true;
|
|
|
942 |
}
|
|
|
943 |
if (this.Details["@attributes"].CachedPercent !== undefined) {
|
|
|
944 |
if (not_first) html += ' - ';
|
|
|
945 |
html += genlang(66) + ': ' + this.Details["@attributes"].CachedPercent + '%'; //Cache
|
|
|
946 |
not_first = true;
|
|
|
947 |
}
|
|
|
948 |
if (this.Details["@attributes"].BuffersPercent !== undefined) {
|
|
|
949 |
if (not_first) html += ' - ';
|
|
|
950 |
html += genlang(65) + ': ' + this.Details["@attributes"].BuffersPercent + '%'; //Buffers
|
|
|
951 |
}
|
|
|
952 |
html += ')</i></div>';
|
|
|
953 |
return html;
|
|
|
954 |
}
|
|
|
955 |
}
|
|
|
956 |
},
|
|
|
957 |
Type: {
|
|
|
958 |
html: function () {
|
|
|
959 |
return genlang(28); //Physical Memory
|
|
|
960 |
}
|
|
|
961 |
}
|
|
|
962 |
};
|
|
|
963 |
|
|
|
964 |
var directive_swap = {
|
|
|
965 |
Total: {
|
|
|
966 |
html: function () {
|
|
|
967 |
return formatBytes(this.Total, data.Options["@attributes"].byteFormat);
|
|
|
968 |
}
|
|
|
969 |
},
|
|
|
970 |
Free: {
|
|
|
971 |
html: function () {
|
|
|
972 |
return formatBytes(this.Free, data.Options["@attributes"].byteFormat);
|
|
|
973 |
}
|
|
|
974 |
},
|
|
|
975 |
Used: {
|
|
|
976 |
html: function () {
|
|
|
977 |
return formatBytes(this.Used, data.Options["@attributes"].byteFormat);
|
|
|
978 |
}
|
|
|
979 |
},
|
|
|
980 |
Usage: {
|
|
|
981 |
html: function () {
|
|
|
982 |
return '<div class="progress">' +
|
|
|
983 |
'<div class="progress-bar progress-bar-info" style="width:' + this.Percent + '%;"></div>' +
|
|
|
984 |
'</div><div class="percent">' + this.Percent + '%</div>';
|
|
|
985 |
}
|
|
|
986 |
},
|
|
|
987 |
Name: {
|
|
|
988 |
html: function () {
|
|
|
989 |
return this.Name + '<br>' + ((this.MountPoint !== undefined) ? this.MountPoint : this.MountPointID);
|
|
|
990 |
}
|
|
|
991 |
}
|
|
|
992 |
};
|
|
|
993 |
|
|
|
994 |
var data_memory = [];
|
|
|
995 |
if (data.Memory.Swap !== undefined) {
|
|
|
996 |
var datas = items(data.Memory.Swap.Mount);
|
|
|
997 |
data_memory.push_attrs(datas);
|
|
|
998 |
$('#swap-data').render(data_memory, directive_swap);
|
|
|
999 |
$('#swap-data').show();
|
|
|
1000 |
} else {
|
|
|
1001 |
$('#swap-data').hide();
|
|
|
1002 |
}
|
|
|
1003 |
$('#memory-data').render(data.Memory, directives);
|
|
|
1004 |
$("#block_memory").show();
|
|
|
1005 |
}
|
|
|
1006 |
|
|
|
1007 |
function renderFilesystem(data) {
|
|
|
1008 |
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('filesystem', blocks) < 0))) {
|
|
|
1009 |
$("#block_filesystem").remove();
|
|
|
1010 |
return;
|
|
|
1011 |
}
|
|
|
1012 |
|
|
|
1013 |
var directives = {
|
|
|
1014 |
Total: {
|
|
|
1015 |
html: function () {
|
|
|
1016 |
if ((this.Ignore !== undefined) && (this.Ignore > 0)) {
|
|
|
1017 |
return formatBytes(this.Total, data.Options["@attributes"].byteFormat, true);
|
|
|
1018 |
} else {
|
|
|
1019 |
return formatBytes(this.Total, data.Options["@attributes"].byteFormat);
|
|
|
1020 |
}
|
|
|
1021 |
}
|
|
|
1022 |
},
|
|
|
1023 |
Free: {
|
|
|
1024 |
html: function () {
|
|
|
1025 |
if ((this.Ignore !== undefined) && (this.Ignore > 0)) {
|
|
|
1026 |
return formatBytes(this.Free, data.Options["@attributes"].byteFormat, true);
|
|
|
1027 |
} else {
|
|
|
1028 |
return formatBytes(this.Free, data.Options["@attributes"].byteFormat);
|
|
|
1029 |
}
|
|
|
1030 |
}
|
|
|
1031 |
},
|
|
|
1032 |
Used: {
|
|
|
1033 |
html: function () {
|
|
|
1034 |
if ((this.Ignore !== undefined) && (this.Ignore >= 2)) {
|
|
|
1035 |
return formatBytes(this.Used, data.Options["@attributes"].byteFormat, true);
|
|
|
1036 |
} else {
|
|
|
1037 |
return formatBytes(this.Used, data.Options["@attributes"].byteFormat);
|
|
|
1038 |
}
|
|
|
1039 |
}
|
|
|
1040 |
},
|
|
|
1041 |
MountPoint: {
|
|
|
1042 |
text: function () {
|
|
|
1043 |
return ((this.MountPoint !== undefined) ? this.MountPoint : this.MountPointID);
|
|
|
1044 |
}
|
|
|
1045 |
},
|
|
|
1046 |
Name: {
|
|
|
1047 |
html: function () {
|
|
|
1048 |
return this.Name.replace(/;/g, ";<wbr>") + ((this.MountOptions !== undefined) ? '<br><i>(' + this.MountOptions + ')</i>' : '');
|
|
|
1049 |
}
|
|
|
1050 |
},
|
|
|
1051 |
Percent: {
|
|
|
1052 |
html: function () {
|
|
|
1053 |
return '<div class="progress">' + '<div class="' +
|
|
|
1054 |
( ( ((this.Ignore == undefined) || (this.Ignore < 3)) && ((data.Options["@attributes"].threshold !== undefined) &&
|
|
|
1055 |
(parseInt(this.Percent) >= parseInt(data.Options["@attributes"].threshold))) ) ? 'progress-bar progress-bar-danger' : 'progress-bar progress-bar-info' ) +
|
|
|
1056 |
'" style="width:' + this.Percent + '% ;"></div>' +
|
|
|
1057 |
'</div>' + '<div class="percent">' + this.Percent + '% ' + ((this.Inodes !== undefined) ? '<i>(' + this.Inodes + '%)</i>' : '') + '</div>';
|
|
|
1058 |
}
|
|
|
1059 |
}
|
|
|
1060 |
};
|
|
|
1061 |
|
|
|
1062 |
try {
|
|
|
1063 |
var fs_data = [];
|
|
|
1064 |
var datas = items(data.FileSystem.Mount);
|
|
|
1065 |
var total = {Total:0,Free:0,Used:0};
|
|
|
1066 |
for (var i = 0; i < datas.length; i++) {
|
|
|
1067 |
fs_data.push(datas[i]["@attributes"]);
|
|
|
1068 |
if ((datas[i]["@attributes"].Ignore !== undefined) && (datas[i]["@attributes"].Ignore > 0)) {
|
|
|
1069 |
if (datas[i]["@attributes"].Ignore == 1) {
|
|
|
1070 |
total.Total += parseInt(datas[i]["@attributes"].Used);
|
|
|
1071 |
total.Used += parseInt(datas[i]["@attributes"].Used);
|
|
|
1072 |
}
|
|
|
1073 |
} else {
|
|
|
1074 |
total.Total += parseInt(datas[i]["@attributes"].Total);
|
|
|
1075 |
total.Free += parseInt(datas[i]["@attributes"].Free);
|
|
|
1076 |
total.Used += parseInt(datas[i]["@attributes"].Used);
|
|
|
1077 |
}
|
|
|
1078 |
total.Percent = (total.Total !== 0) ? round((total.Used / total.Total) * 100, 2) : 0;
|
|
|
1079 |
}
|
|
|
1080 |
if (i > 0) {
|
|
|
1081 |
$('#filesystem-data').render(fs_data, directives);
|
|
|
1082 |
$('#filesystem-foot').render(total, directives);
|
|
|
1083 |
$('#filesystem_MountPoint').removeClass("sorttable_sorted"); //reset sort order
|
|
|
1084 |
// sorttable.innerSortFunction.apply(document.getElementById('filesystem_MountPoint'), []);
|
|
|
1085 |
sorttable.innerSortFunction.apply($('#filesystem_MountPoint')[0], []);
|
|
|
1086 |
$("#block_filesystem").show();
|
|
|
1087 |
} else {
|
|
|
1088 |
$("#block_filesystem").hide();
|
|
|
1089 |
}
|
|
|
1090 |
}
|
|
|
1091 |
catch (err) {
|
|
|
1092 |
$("#block_filesystem").hide();
|
|
|
1093 |
}
|
|
|
1094 |
}
|
|
|
1095 |
|
|
|
1096 |
function renderNetwork(data) {
|
|
|
1097 |
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {>=>
|
|
|
1098 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { $("#block_network").remove();>=>
|
|
|
1099 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { return;>=>
|
|
|
1100 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { }>=>
|
|
|
1101 |
|
|
|
1102 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { var directives = {>=>
|
|
|
1103 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { RxBytes: {>=>
|
|
|
1104 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { html: function () {>=>
|
|
|
1105 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { var htmladd = '';>=>
|
|
|
1106 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { if (showNetworkActiveSpeed && ($.inArray(this.Name, oldnetwork) >= 0)) {>=>
|
|
|
1107 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { var diff, difftime;>=>
|
|
|
1108 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { if (((diff = this.RxBytes - oldnetwork[this.Name].RxBytes) > 0) && ((difftime = data.Generation["@attributes"].timestamp - oldnetwork[this.Name].timestamp) > 0)) {>=>
|
|
|
1109 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { if (showNetworkActiveSpeed == 2) {>=>
|
|
|
1110 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { htmladd =" ("+formatBPS(round(8*diff/difftime, 2))+")</i>";>=>
|
|
|
1111 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { } else {>=>
|
|
|
1112 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { htmladd ="<br><i>("+formatBytes(round(diff/difftime, 2), data.Options["@attributes"].byteFormat)+"/s)</i>";>=>
|
|
|
1113 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { }>=>
|
|
|
1114 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { }>=>
|
|
|
1115 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { }>=>
|
|
|
1116 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { return formatBytes(this.RxBytes, data.Options["@attributes"].byteFormat) + htmladd;>=>
|
|
|
1117 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { }>=>
|
|
|
1118 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { },>=>
|
|
|
1119 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { TxBytes: {>=>
|
|
|
1120 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { html: function () {>=>
|
|
|
1121 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { var htmladd = '';>=>
|
|
|
1122 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { if (showNetworkActiveSpeed && ($.inArray(this.Name, oldnetwork) >= 0)) {>=>
|
|
|
1123 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { var diff, difftime;>=>
|
|
|
1124 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { if (((diff = this.TxBytes - oldnetwork[this.Name].TxBytes) > 0) && ((difftime = data.Generation["@attributes"].timestamp - oldnetwork[this.Name].timestamp) > 0)) {>=>
|
|
|
1125 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { if (showNetworkActiveSpeed == 2) {>=>
|
|
|
1126 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) { htmladd =" ("+formatBPS(round(8*diff/difftime, 2))+")</i>";>=>
|
|
|
1127 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
} else {>=>
|
|
|
1128 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
htmladd ="<br><i>("+formatBytes(round(diff/difftime, 2), data.Options["@attributes"].byteFormat)+"/s)</i>";>=>
|
|
|
1129 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1130 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1131 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1132 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return formatBytes(this.TxBytes, data.Options["@attributes"].byteFormat) + htmladd;>=>
|
|
|
1133 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1134 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
},>=>
|
|
|
1135 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
Drops: {>=>
|
|
|
1136 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html: function () {>=>
|
|
|
1137 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return this.Err + "/<wbr>" + this.Drops;>=>
|
|
|
1138 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1139 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1140 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
};>=>
|
|
|
1141 |
|
|
|
1142 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var html = "";>=>
|
|
|
1143 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var preoldnetwork = [];>=>
|
|
|
1144 |
|
|
|
1145 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
try {>=>
|
|
|
1146 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var datas = items(data.Network.NetDevice);>=>
|
|
|
1147 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
for (var i = 0; i < datas.length; i++) {>=>
|
|
|
1148 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html+="<tr id=\"network-" + i +"\" class=\"treegrid-network-" + i + "\">";>=>
|
|
|
1149 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html+="<td><span class=\"treegrid-spanbold\" data-bind=\"Name\"></span></td>";>=>
|
|
|
1150 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html+="<td class=\"rightCell\"><span data-bind=\"RxBytes\"></span></td>";>=>
|
|
|
1151 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html+="<td class=\"rightCell\"><span data-bind=\"TxBytes\"></span></td>";>=>
|
|
|
1152 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html+="<td class=\"rightCell\"><span data-bind=\"Drops\"></span></td>";>=>
|
|
|
1153 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html+="</tr>";>=>
|
|
|
1154 |
|
|
|
1155 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var info = datas[i]["@attributes"].Info;>=>
|
|
|
1156 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if ( (info !== undefined) && (info !== "") ) {>=>
|
|
|
1157 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var infos = info.replace(/:/g, "<wbr>:").split(";"); /* split long addresses */>=>
|
|
|
1158 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
for (var j = 0; j < infos.length; j++){>=>
|
|
|
1159 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html +="<tr class=\"treegrid-parent-network-" + i + "\"><td colspan=\"4\"><span class=\"treegrid-span\">" + infos[j] + "</span></td></tr>";>=>
|
|
|
1160 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1161 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1162 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1163 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#network-data").empty().append(html);>=>
|
|
|
1164 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (i > 0) {>=>
|
|
|
1165 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
for (var k = 0; k < datas.length; k++) {>=>
|
|
|
1166 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$('#network-' + k).render(datas[k]["@attributes"], directives);>=>
|
|
|
1167 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (showNetworkActiveSpeed) {>=>
|
|
|
1168 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
preoldnetwork.pushIfNotExist(datas[k]["@attributes"].Name);>=>
|
|
|
1169 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
preoldnetwork[datas[k]["@attributes"].Name] = {timestamp:data.Generation["@attributes"].timestamp, RxBytes:datas[k]["@attributes"].RxBytes, TxBytes:datas[k]["@attributes"].TxBytes};>=>
|
|
|
1170 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1171 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1172 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$('#network').treegrid({>=>
|
|
|
1173 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
initialState: showNetworkInfosExpanded?'expanded':'collapsed',>=>
|
|
|
1174 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
expanderExpandedClass: 'normalicon normalicon-down',>=>
|
|
|
1175 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
expanderCollapsedClass: 'normalicon normalicon-right'>=>
|
|
|
1176 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
});>=>
|
|
|
1177 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_network").show();>=>
|
|
|
1178 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
} else {>=>
|
|
|
1179 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_network").hide();>=>
|
|
|
1180 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1181 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1182 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
catch (err) {>=>
|
|
|
1183 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_network").hide();>=>
|
|
|
1184 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1185 |
|
|
|
1186 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (showNetworkActiveSpeed) {>=>
|
|
|
1187 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
while (oldnetwork.length > 0) {>=>
|
|
|
1188 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
delete oldnetwork[oldnetwork.length-1]; //remove last object>=>
|
|
|
1189 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
oldnetwork.pop(); //remove last object reference from array>=>
|
|
|
1190 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1191 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
oldnetwork = preoldnetwork;>=>
|
|
|
1192 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1193 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1194 |
|
|
|
1195 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
function renderVoltage(data) {>=>
|
|
|
1196 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('voltage', blocks) < 0))) {>=>
|
|
|
1197 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_voltage").remove();>=>
|
|
|
1198 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return;>=>
|
|
|
1199 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1200 |
|
|
|
1201 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var directives = {>=>
|
|
|
1202 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
Value: {>=>
|
|
|
1203 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
text: function () {>=>
|
|
|
1204 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return round(this.Value,2) + String.fromCharCode(160) + "V";>=>
|
|
|
1205 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1206 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
},>=>
|
|
|
1207 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
Min: {>=>
|
|
|
1208 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
text: function () {>=>
|
|
|
1209 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (this.Min !== undefined)>=>
|
|
|
1210 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return round(this.Min,2) + String.fromCharCode(160) + "V";>=>
|
|
|
1211 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1212 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
},>=>
|
|
|
1213 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
Max: {>=>
|
|
|
1214 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
text: function () {>=>
|
|
|
1215 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (this.Max !== undefined)>=>
|
|
|
1216 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return round(this.Max,2) + String.fromCharCode(160) + "V";>=>
|
|
|
1217 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1218 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
},>=>
|
|
|
1219 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
Label: {>=>
|
|
|
1220 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html: function () {>=>
|
|
|
1221 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (this.Event === undefined)>=>
|
|
|
1222 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return this.Label;>=>
|
|
|
1223 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
else>=>
|
|
|
1224 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return this.Label + " <img style=\"vertical-align:middle;width:20px;\" src=\"./gfx/attention.gif\" alt=\"!\" title=\"" + this.Event + "\"/>";>=>
|
|
|
1225 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1226 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1227 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
};>=>
|
|
|
1228 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
try {>=>
|
|
|
1229 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var voltage_data = [];>=>
|
|
|
1230 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var datas = items(data.MBInfo.Voltage.Item);>=>
|
|
|
1231 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (voltage_data.push_attrs(datas) > 0) {>=>
|
|
|
1232 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$('#voltage-data').render(voltage_data, directives);>=>
|
|
|
1233 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_voltage").show();>=>
|
|
|
1234 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
} else {>=>
|
|
|
1235 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_voltage").hide();>=>
|
|
|
1236 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1237 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1238 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
catch (err) {>=>
|
|
|
1239 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_voltage").hide();>=>
|
|
|
1240 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1241 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1242 |
|
|
|
1243 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
function renderTemperature(data) {>=>
|
|
|
1244 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {>=>
|
|
|
1245 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_temperature").remove();>=>
|
|
|
1246 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return;>=>
|
|
|
1247 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1248 |
|
|
|
1249 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var directives = {>=>
|
|
|
1250 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
Value: {>=>
|
|
|
1251 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html: function () {>=>
|
|
|
1252 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return formatTemp(this.Value, data.Options["@attributes"].tempFormat);>=>
|
|
|
1253 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1254 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
},>=>
|
|
|
1255 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
Max: {>=>
|
|
|
1256 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html: function () {>=>
|
|
|
1257 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (this.Max !== undefined)>=>
|
|
|
1258 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return formatTemp(this.Max, data.Options["@attributes"].tempFormat);>=>
|
|
|
1259 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1260 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
},>=>
|
|
|
1261 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
Label: {>=>
|
|
|
1262 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html: function () {>=>
|
|
|
1263 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (this.Event === undefined)>=>
|
|
|
1264 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return this.Label;>=>
|
|
|
1265 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
else>=>
|
|
|
1266 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return this.Label + " <img style=\"vertical-align:middle;width:20px;\" src=\"./gfx/attention.gif\" alt=\"!\" title=\"" + this.Event + "\"/>";>=>
|
|
|
1267 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1268 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1269 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
};>=>
|
|
|
1270 |
|
|
|
1271 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
try {>=>
|
|
|
1272 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var temperature_data = [];>=>
|
|
|
1273 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var datas = items(data.MBInfo.Temperature.Item);>=>
|
|
|
1274 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (temperature_data.push_attrs(datas) > 0) {>=>
|
|
|
1275 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$('#temperature-data').render(temperature_data, directives);>=>
|
|
|
1276 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_temperature").show();>=>
|
|
|
1277 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
} else {>=>
|
|
|
1278 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_temperature").hide();>=>
|
|
|
1279 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1280 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1281 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
catch (err) {>=>
|
|
|
1282 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_temperature").hide();>=>
|
|
|
1283 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1284 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1285 |
|
|
|
1286 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
function renderFans(data) {>=>
|
|
|
1287 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('fans', blocks) < 0))) {>=>
|
|
|
1288 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_fans").remove();>=>
|
|
|
1289 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return;>=>
|
|
|
1290 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1291 |
|
|
|
1292 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var directives = {>=>
|
|
|
1293 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
Value: {>=>
|
|
|
1294 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html: function () {>=>
|
|
|
1295 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return round(this.Value,0) + String.fromCharCode(160) + genlang(63); //RPM>=>
|
|
|
1296 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1297 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
},>=>
|
|
|
1298 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
Min: {>=>
|
|
|
1299 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html: function () {>=>
|
|
|
1300 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (this.Min !== undefined)>=>
|
|
|
1301 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return round(this.Min,0) + String.fromCharCode(160) + genlang(63); //RPM>=>
|
|
|
1302 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1303 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
},>=>
|
|
|
1304 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
Label: {>=>
|
|
|
1305 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html: function () {>=>
|
|
|
1306 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (this.Event === undefined)>=>
|
|
|
1307 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return this.Label;>=>
|
|
|
1308 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
else>=>
|
|
|
1309 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return this.Label + " <img style=\"vertical-align:middle;width:20px;\" src=\"./gfx/attention.gif\" alt=\"!\" title=\"" + this.Event + "\"/>";>=>
|
|
|
1310 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1311 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1312 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
};>=>
|
|
|
1313 |
|
|
|
1314 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
try {>=>
|
|
|
1315 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var fans_data = [];>=>
|
|
|
1316 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var datas = items(data.MBInfo.Fans.Item);>=>
|
|
|
1317 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (fans_data.push_attrs(datas) > 0) {>=>
|
|
|
1318 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$('#fans-data').render(fans_data, directives);>=>
|
|
|
1319 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_fans").show();>=>
|
|
|
1320 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
} else {>=>
|
|
|
1321 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_fans").hide();>=>
|
|
|
1322 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1323 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1324 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
catch (err) {>=>
|
|
|
1325 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_fans").hide();>=>
|
|
|
1326 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1327 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1328 |
|
|
|
1329 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
function renderPower(data) {>=>
|
|
|
1330 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('power', blocks) < 0))) {>=>
|
|
|
1331 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_power").remove();>=>
|
|
|
1332 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return;>=>
|
|
|
1333 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1334 |
|
|
|
1335 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var directives = {>=>
|
|
|
1336 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
Value: {>=>
|
|
|
1337 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
text: function () {>=>
|
|
|
1338 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return round(this.Value,2) + String.fromCharCode(160) + "W";>=>
|
|
|
1339 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1340 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
},>=>
|
|
|
1341 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
Max: {>=>
|
|
|
1342 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
text: function () {>=>
|
|
|
1343 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (this.Max !== undefined)>=>
|
|
|
1344 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return round(this.Max,2) + String.fromCharCode(160) + "W";>=>
|
|
|
1345 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1346 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
},>=>
|
|
|
1347 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
Label: {>=>
|
|
|
1348 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html: function () {>=>
|
|
|
1349 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (this.Event === undefined)>=>
|
|
|
1350 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return this.Label;>=>
|
|
|
1351 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
else>=>
|
|
|
1352 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return this.Label + " <img style=\"vertical-align:middle;width:20px;\" src=\"./gfx/attention.gif\" alt=\"!\" title=\"" + this.Event + "\"/>";>=>
|
|
|
1353 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1354 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1355 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
};>=>
|
|
|
1356 |
|
|
|
1357 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
try {>=>
|
|
|
1358 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var power_data = [];>=>
|
|
|
1359 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var datas = items(data.MBInfo.Power.Item);>=>
|
|
|
1360 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (power_data.push_attrs(datas) > 0) {>=>
|
|
|
1361 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$('#power-data').render(power_data, directives);>=>
|
|
|
1362 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_power").show();>=>
|
|
|
1363 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
} else {>=>
|
|
|
1364 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_power").hide();>=>
|
|
|
1365 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1366 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1367 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
catch (err) {>=>
|
|
|
1368 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_power").hide();>=>
|
|
|
1369 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1370 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1371 |
|
|
|
1372 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
function renderCurrent(data) {>=>
|
|
|
1373 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('current', blocks) < 0))) {>=>
|
|
|
1374 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_current").remove();>=>
|
|
|
1375 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return;>=>
|
|
|
1376 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1377 |
|
|
|
1378 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var directives = {>=>
|
|
|
1379 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
Value: {>=>
|
|
|
1380 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
text: function () {>=>
|
|
|
1381 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return round(this.Value,2) + String.fromCharCode(160) + "A";>=>
|
|
|
1382 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1383 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
},>=>
|
|
|
1384 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
Min: {>=>
|
|
|
1385 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
text: function () {>=>
|
|
|
1386 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (this.Min !== undefined)>=>
|
|
|
1387 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return round(this.Min,2) + String.fromCharCode(160) + "A";>=>
|
|
|
1388 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1389 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
},>=>
|
|
|
1390 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
Max: {>=>
|
|
|
1391 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
text: function () {>=>
|
|
|
1392 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (this.Max !== undefined)>=>
|
|
|
1393 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return round(this.Max,2) + String.fromCharCode(160) + "A";>=>
|
|
|
1394 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1395 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
},>=>
|
|
|
1396 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
Label: {>=>
|
|
|
1397 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html: function () {>=>
|
|
|
1398 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (this.Event === undefined)>=>
|
|
|
1399 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return this.Label;>=>
|
|
|
1400 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
else>=>
|
|
|
1401 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return this.Label + " <img style=\"vertical-align:middle;width:20px;\" src=\"./gfx/attention.gif\" alt=\"!\" title=\"" + this.Event + "\"/>";>=>
|
|
|
1402 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1403 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1404 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
};>=>
|
|
|
1405 |
|
|
|
1406 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
try {>=>
|
|
|
1407 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var current_data = [];>=>
|
|
|
1408 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var datas = items(data.MBInfo.Current.Item);>=>
|
|
|
1409 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (current_data.push_attrs(datas) > 0) {>=>
|
|
|
1410 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$('#current-data').render(current_data, directives);>=>
|
|
|
1411 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_current").show();>=>
|
|
|
1412 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
} else {>=>
|
|
|
1413 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_current").hide();>=>
|
|
|
1414 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1415 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1416 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
catch (err) {>=>
|
|
|
1417 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_current").hide();>=>
|
|
|
1418 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1419 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1420 |
|
|
|
1421 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
function renderOther(data) {>=>
|
|
|
1422 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('other', blocks) < 0))) {>=>
|
|
|
1423 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_other").remove();>=>
|
|
|
1424 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return;>=>
|
|
|
1425 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1426 |
|
|
|
1427 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var directives = {>=>
|
|
|
1428 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
Label: {>=>
|
|
|
1429 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html: function () {>=>
|
|
|
1430 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (this.Event === undefined)>=>
|
|
|
1431 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return this.Label;>=>
|
|
|
1432 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
else>=>
|
|
|
1433 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return this.Label + " <img style=\"vertical-align:middle;width:20px;\" src=\"./gfx/attention.gif\" alt=\"!\" title=\"" + this.Event + "\"/>";>=>
|
|
|
1434 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1435 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1436 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
};>=>
|
|
|
1437 |
|
|
|
1438 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
try {>=>
|
|
|
1439 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var other_data = [];>=>
|
|
|
1440 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var datas = items(data.MBInfo.Other.Item);>=>
|
|
|
1441 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (other_data.push_attrs(datas) > 0) {>=>
|
|
|
1442 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$('#other-data').render(other_data, directives);>=>
|
|
|
1443 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_other").show();>=>
|
|
|
1444 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
} else {>=>
|
|
|
1445 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_other").hide();>=>
|
|
|
1446 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1447 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1448 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
catch (err) {>=>
|
|
|
1449 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_other").hide();>=>
|
|
|
1450 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1451 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1452 |
|
|
|
1453 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
function renderUPS(data) {>=>
|
|
|
1454 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('ups', blocks) < 0))) {>=>
|
|
|
1455 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_ups").remove();>=>
|
|
|
1456 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return;>=>
|
|
|
1457 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1458 |
|
|
|
1459 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var i, datas, proc_param;>=>
|
|
|
1460 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var directives = {>=>
|
|
|
1461 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
Name: {>=>
|
|
|
1462 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
text: function () {>=>
|
|
|
1463 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return this.Name + ((this.Mode !== undefined) ? " (" + this.Mode + ")" : "");>=>
|
|
|
1464 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1465 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
},>=>
|
|
|
1466 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
LineVoltage: {>=>
|
|
|
1467 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html: function () {>=>
|
|
|
1468 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return this.LineVoltage + String.fromCharCode(160) + genlang(82); //V>=>
|
|
|
1469 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1470 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
},>=>
|
|
|
1471 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
LineFrequency: {>=>
|
|
|
1472 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html: function () {>=>
|
|
|
1473 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return this.LineFrequency + String.fromCharCode(160) + genlang(109); //Hz>=>
|
|
|
1474 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1475 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
},>=>
|
|
|
1476 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
BatteryVoltage: {>=>
|
|
|
1477 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html: function () {>=>
|
|
|
1478 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return this.BatteryVoltage + String.fromCharCode(160) + genlang(82); //V>=>
|
|
|
1479 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1480 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
},>=>
|
|
|
1481 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
TimeLeftMinutes: {>=>
|
|
|
1482 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html: function () {>=>
|
|
|
1483 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return this.TimeLeftMinutes + String.fromCharCode(160) + genlang(83); //minutes>=>
|
|
|
1484 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1485 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
},>=>
|
|
|
1486 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
LoadPercent: {>=>
|
|
|
1487 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html: function () {>=>
|
|
|
1488 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return '<div class="progress">' +>=>
|
|
|
1489 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
'<div class="progress-bar progress-bar-info" style="width:' + round(this.LoadPercent,0) + '%;"></div>' +>=>
|
|
|
1490 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
'</div><div class="percent">' + round(this.LoadPercent,0) + '%</div>';>=>
|
|
|
1491 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1492 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
},>=>
|
|
|
1493 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
BatteryChargePercent: {>=>
|
|
|
1494 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html: function () {>=>
|
|
|
1495 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return '<div class="progress">' +>=>
|
|
|
1496 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
'<div class="progress-bar progress-bar-info" style="width:' + round(this.BatteryChargePercent,0) + '%;"></div>' +>=>
|
|
|
1497 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
'</div><div class="percent">' + round(this.BatteryChargePercent,0) + '%</div>';>=>
|
|
|
1498 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1499 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1500 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
};>=>
|
|
|
1501 |
|
|
|
1502 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if ((data.UPSInfo !== undefined) && (items(data.UPSInfo.UPS).length > 0)) {>=>
|
|
|
1503 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var html="";>=>
|
|
|
1504 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var paramlist = {Model:70,StartTime:72,Status:73,Temperature:84,OutagesCount:74,LastOutage:75,LastOutageFinish:76,LineVoltage:77,LineFrequency:108,LoadPercent:78,BatteryDate:104,BatteryVoltage:79,BatteryChargePercent:80,TimeLeftMinutes:81};>=>
|
|
|
1505 |
|
|
|
1506 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
try {>=>
|
|
|
1507 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
datas = items(data.UPSInfo.UPS);>=>
|
|
|
1508 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
for (i = 0; i < datas.length; i++) {>=>
|
|
|
1509 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html+="<tr id=\"ups-" + i +"\" class=\"treegrid-UPS-" + i+ "\">";>=>
|
|
|
1510 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html+="<td colspan=\"2\"><span class=\"treegrid-spanbold\" data-bind=\"Name\"></span></td>";>=>
|
|
|
1511 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html+="</tr>";>=>
|
|
|
1512 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
for (proc_param in paramlist) {>=>
|
|
|
1513 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (datas[i]["@attributes"][proc_param] !== undefined) {>=>
|
|
|
1514 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html+="<tr id=\"ups-" + i + "-" + proc_param + "\" class=\"treegrid-parent-UPS-" + i +"\">";>=>
|
|
|
1515 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html+="<td style=\"width:60%;\"><span class=\"treegrid-spanbold\">" + genlang(paramlist[proc_param]) + "</span></td>";>=>
|
|
|
1516 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html+="<td class=\"rightCell\"><span data-bind=\"" + proc_param + "\"></span></td>";>=>
|
|
|
1517 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html+="</tr>";>=>
|
|
|
1518 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1519 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1520 |
|
|
|
1521 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1522 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1523 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
catch (err) {>=>
|
|
|
1524 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1525 |
|
|
|
1526 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if ((data.UPSInfo["@attributes"] !== undefined) && (data.UPSInfo["@attributes"].ApcupsdCgiLinks === "1")) {>=>
|
|
|
1527 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html+="<tr>";>=>
|
|
|
1528 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html+="<td colspan=\"2\">(<a title='details' href='/cgi-bin/apcupsd/multimon.cgi' target='apcupsdcgi'>"+genlang(99)+"</a>)</td>";>=>
|
|
|
1529 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
html+="</tr>";>=>
|
|
|
1530 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1531 |
|
|
|
1532 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#ups-data").empty().append(html);>=>
|
|
|
1533 |
|
|
|
1534 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
try {>=>
|
|
|
1535 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
datas = items(data.UPSInfo.UPS);>=>
|
|
|
1536 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
for (i = 0; i < datas.length; i++) {>=>
|
|
|
1537 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$('#ups-'+ i).render(datas[i]["@attributes"], directives);>=>
|
|
|
1538 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
for (proc_param in paramlist) {>=>
|
|
|
1539 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (datas[i]["@attributes"][proc_param] !== undefined) {>=>
|
|
|
1540 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$('#ups-'+ i +'-'+proc_param).render(datas[i]["@attributes"], directives);>=>
|
|
|
1541 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1542 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1543 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1544 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1545 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
catch (err) {>=>
|
|
|
1546 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1547 |
|
|
|
1548 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$('#ups').treegrid({>=>
|
|
|
1549 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
initialState: 'expanded',>=>
|
|
|
1550 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
expanderExpandedClass: 'normalicon normalicon-down',>=>
|
|
|
1551 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
expanderCollapsedClass: 'normalicon normalicon-right'>=>
|
|
|
1552 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
});>=>
|
|
|
1553 |
|
|
|
1554 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_ups").show();>=>
|
|
|
1555 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
} else {>=>
|
|
|
1556 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#block_ups").hide();>=>
|
|
|
1557 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1558 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1559 |
|
|
|
1560 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
function renderErrors(data) {>=>
|
|
|
1561 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
try {>=>
|
|
|
1562 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var datas = items(data.Errors.Error);>=>
|
|
|
1563 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
for (var i = 0; i < datas.length; i++) {>=>
|
|
|
1564 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#errors").append("<li><b>"+datas[i]["@attributes"].Function+"</b> - "+datas[i]["@attributes"].Message.replace(/\n/g, "<br>")+"</li><br>");>=>
|
|
|
1565 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1566 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (i > 0) {>=>
|
|
|
1567 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#errorbutton").attr('data-toggle', 'modal');>=>
|
|
|
1568 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#errorbutton").css('cursor', 'pointer');>=>
|
|
|
1569 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#errorbutton").css("visibility", "visible");>=>
|
|
|
1570 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1571 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1572 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
catch (err) {>=>
|
|
|
1573 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#errorbutton").css("visibility", "hidden");>=>
|
|
|
1574 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#errorbutton").css('cursor', 'default');>=>
|
|
|
1575 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
$("#errorbutton").attr('data-toggle', '');>=>
|
|
|
1576 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1577 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1578 |
|
|
|
1579 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
/**>=>
|
|
|
1580 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
* format seconds to a better readable statement with days, hours and minutes>=>
|
|
|
1581 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
* @param {Number} sec seconds that should be formatted>=>
|
|
|
1582 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
* @return {String} html string with no breaking spaces and translation statemen>=>
|
|
|
1583 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
*/>=>
|
|
|
1584 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
function formatUptime(sec) {>=>
|
|
|
1585 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var txt = "", intMin = 0, intHours = 0, intDays = 0;>=>
|
|
|
1586 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
intMin = sec / 60;>=>
|
|
|
1587 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
intHours = intMin / 60;>=>
|
|
|
1588 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
intDays = Math.floor(intHours / 24);>=>
|
|
|
1589 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
intHours = Math.floor(intHours - (intDays * 24));>=>
|
|
|
1590 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
intMin = Math.floor(intMin - (intDays * 60 * 24) - (intHours * 60));>=>
|
|
|
1591 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (intDays) {>=>
|
|
|
1592 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
txt += intDays.toString() + String.fromCharCode(160) + genlang(48) + String.fromCharCode(160); //days>=>
|
|
|
1593 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1594 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (intHours) {>=>
|
|
|
1595 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
txt += intHours.toString() + String.fromCharCode(160) + genlang(49) + String.fromCharCode(160); //hours>=>
|
|
|
1596 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1597 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return txt + intMin.toString() + String.fromCharCode(160) + genlang(50); //Minutes>=>
|
|
|
1598 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1599 |
|
|
|
1600 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
/**>=>
|
|
|
1601 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
* format a celcius temperature to fahrenheit and also append the right suffix>=>
|
|
|
1602 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
* @param {String} degreeC temperature in celvius>=>
|
|
|
1603 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
* @param {jQuery} xml phpSysInfo-XML>=>
|
|
|
1604 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
* @return {String} html string with no breaking spaces and translation statements>=>
|
|
|
1605 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
*/>=>
|
|
|
1606 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
function formatTemp(degreeC, tempFormat) {>=>
|
|
|
1607 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
var degree = 0;>=>
|
|
|
1608 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (tempFormat === undefined) {>=>
|
|
|
1609 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
tempFormat = "c";>=>
|
|
|
1610 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1611 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
degree = parseFloat(degreeC);>=>
|
|
|
1612 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if (isNaN(degreeC)) {>=>
|
|
|
1613 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return "---";>=>
|
|
|
1614 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
} else {>=>
|
|
|
1615 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
switch (tempFormat.toLowerCase()) {>=>
|
|
|
1616 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
case "f":>=>
|
|
|
1617 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return round((((9 * degree) / 5) + 32), 1) + String.fromCharCode(160) + genlang(61);>=>
|
|
|
1618 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
case "c":>=>
|
|
|
1619 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return round(degree, 1) + String.fromCharCode(160) + genlang(60);>=>
|
|
|
1620 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
case "c-f":>=>
|
|
|
1621 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return round(degree, 1) + String.fromCharCode(160) + genlang(60) + "<br><i>(" + round((((9 * degree) / 5) + 32), 1) + String.fromCharCode(160) + genlang(61) + ")i>";>=>
|
|
|
1622 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
case "f-c":>=>
|
|
|
1623 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
return round((((9 * degree) / 5) + 32), 1) + String.fromCharCode(160) + genlang(61) + "<br><i>(" + round(degree, 1) + String.fromCharCode(160) + genlang(60) + ")</i>";>=>
|
|
|
1624 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1625 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1626 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
}>=>
|
|
|
1627 |
|
|
|
1628 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
/**>=>
|
|
|
1629 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
* format a given MHz value to a better readable statement with the right suffix>=>
|
|
|
1630 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
* @param {Number} mhertz mhertz value that should be formatted>=>
|
|
|
1631 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
* @return {String} html string with no breaking spaces and translation statements>=>
|
|
|
1632 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
*/>=>
|
|
|
1633 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
function formatHertz(mhertz) {>=>
|
|
|
1634 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
if ((mhertz >= 0) && (mhertz < 1000)) {>>=>
|
|
|
1635 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { return mhertz.toString() + String.fromCharCode(160) + genlang(92);>>=>
|
|
|
1636 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { } else {>>=>
|
|
|
1637 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (mhertz >= 1000) {>>=>
|
|
|
1638 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { return round(mhertz / 1000, 2) + String.fromCharCode(160) + genlang(93);>>=>
|
|
|
1639 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { } else {>>=>
|
|
|
1640 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { return "";>>=>
|
|
|
1641 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1642 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1643 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) {}>>=>
|
|
|
1644 |
|
|
|
1645 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) {/**>>=>
|
|
|
1646 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { * format the byte values into a user friendly value with the corespondenting unit expression<br>support is included>>=>
|
|
|
1647 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { * for binary and decimal output<br>user can specify a constant format for all byte outputs or the output is formated>>=>
|
|
|
1648 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { * automatically so that every value can be read in a user friendly way>>=>
|
|
|
1649 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { * @param {Number} bytes value that should be converted in the corespondenting format, which is specified in the phpsysinfo.ini>>=>
|
|
|
1650 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { * @param {jQuery} xml phpSysInfo-XML>>=>
|
|
|
1651 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { * @param {parenths} if true then add parentheses>>=>
|
|
|
1652 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { * @return {String} string of the converted bytes with the translated unit expression>>=>
|
|
|
1653 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { */>>=>
|
|
|
1654 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) {function formatBytes(bytes, byteFormat, parenths) {>>=>
|
|
|
1655 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { var show = "";>>=>
|
|
|
1656 |
|
|
|
1657 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (byteFormat === undefined) {>>=>
|
|
|
1658 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { byteFormat = "auto_binary";>>=>
|
|
|
1659 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1660 |
|
|
|
1661 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { switch (byteFormat.toLowerCase()) {>>=>
|
|
|
1662 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { case "pib":>>=>
|
|
|
1663 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bytes / Math.pow(1024, 5), 2);>>=>
|
|
|
1664 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(90);>>=>
|
|
|
1665 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { break;>>=>
|
|
|
1666 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { case "tib":>>=>
|
|
|
1667 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bytes / Math.pow(1024, 4), 2);>>=>
|
|
|
1668 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(86);>>=>
|
|
|
1669 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { break;>>=>
|
|
|
1670 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { case "gib":>>=>
|
|
|
1671 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bytes / Math.pow(1024, 3), 2);>>=>
|
|
|
1672 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(87);>>=>
|
|
|
1673 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { break;>>=>
|
|
|
1674 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { case "mib":>>=>
|
|
|
1675 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bytes / Math.pow(1024, 2), 2);>>=>
|
|
|
1676 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(88);>>=>
|
|
|
1677 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { break;>>=>
|
|
|
1678 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { case "kib":>>=>
|
|
|
1679 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bytes / Math.pow(1024, 1), 2);>>=>
|
|
|
1680 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(89);>>=>
|
|
|
1681 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { break;>>=>
|
|
|
1682 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { case "pb":>>=>
|
|
|
1683 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bytes / Math.pow(1000, 5), 2);>>=>
|
|
|
1684 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(91);>>=>
|
|
|
1685 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { break;>>=>
|
|
|
1686 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { case "tb":>>=>
|
|
|
1687 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bytes / Math.pow(1000, 4), 2);>>=>
|
|
|
1688 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(85);>>=>
|
|
|
1689 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { break;>>=>
|
|
|
1690 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { case "gb":>>=>
|
|
|
1691 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bytes / Math.pow(1000, 3), 2);>>=>
|
|
|
1692 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(41);>>=>
|
|
|
1693 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { break;>>=>
|
|
|
1694 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { case "mb":>>=>
|
|
|
1695 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bytes / Math.pow(1000, 2), 2);>>=>
|
|
|
1696 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(40);>>=>
|
|
|
1697 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { break;>>=>
|
|
|
1698 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { case "kb":>>=>
|
|
|
1699 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bytes / Math.pow(1000, 1), 2);>>=>
|
|
|
1700 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(39);>>=>
|
|
|
1701 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { break;>>=>
|
|
|
1702 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { case "b":>>=>
|
|
|
1703 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += bytes;>>=>
|
|
|
1704 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(96);>>=>
|
|
|
1705 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { break;>>=>
|
|
|
1706 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { case "auto_decimal":>>=>
|
|
|
1707 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (bytes > Math.pow(1000, 5)) {>>=>
|
|
|
1708 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bytes / Math.pow(1000, 5), 2);>>=>
|
|
|
1709 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(91);>>=>
|
|
|
1710 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { } else {>>=>
|
|
|
1711 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (bytes > Math.pow(1000, 4)) {>>=>
|
|
|
1712 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bytes / Math.pow(1000, 4), 2);>>=>
|
|
|
1713 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(85);>>=>
|
|
|
1714 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { } else {>>=>
|
|
|
1715 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (bytes > Math.pow(1000, 3)) {>>=>
|
|
|
1716 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bytes / Math.pow(1000, 3), 2);>>=>
|
|
|
1717 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(41);>>=>
|
|
|
1718 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { } else {>>=>
|
|
|
1719 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (bytes > Math.pow(1000, 2)) {>>=>
|
|
|
1720 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bytes / Math.pow(1000, 2), 2);>>=>
|
|
|
1721 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(40);>>=>
|
|
|
1722 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { } else {>>=>
|
|
|
1723 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (bytes > Math.pow(1000, 1)) {>>=>
|
|
|
1724 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bytes / Math.pow(1000, 1), 2);>>=>
|
|
|
1725 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(39);>>=>
|
|
|
1726 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { } else {>>=>
|
|
|
1727 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += bytes;>>=>
|
|
|
1728 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(96);>>=>
|
|
|
1729 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1730 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1731 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1732 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1733 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1734 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { break;>>=>
|
|
|
1735 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { default:>>=>
|
|
|
1736 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (bytes > Math.pow(1024, 5)) {>>=>
|
|
|
1737 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bytes / Math.pow(1024, 5), 2);>>=>
|
|
|
1738 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(90);>>=>
|
|
|
1739 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { } else {>>=>
|
|
|
1740 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (bytes > Math.pow(1024, 4)) {>>=>
|
|
|
1741 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bytes / Math.pow(1024, 4), 2);>>=>
|
|
|
1742 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(86);>>=>
|
|
|
1743 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { } else {>>=>
|
|
|
1744 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (bytes > Math.pow(1024, 3)) {>>=>
|
|
|
1745 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bytes / Math.pow(1024, 3), 2);>>=>
|
|
|
1746 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(87);>>=>
|
|
|
1747 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { } else {>>=>
|
|
|
1748 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (bytes > Math.pow(1024, 2)) {>>=>
|
|
|
1749 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bytes / Math.pow(1024, 2), 2);>>=>
|
|
|
1750 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(88);>>=>
|
|
|
1751 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { } else {>>=>
|
|
|
1752 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (bytes > Math.pow(1024, 1)) {>>=>
|
|
|
1753 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bytes / Math.pow(1024, 1), 2);>>=>
|
|
|
1754 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(89);>>=>
|
|
|
1755 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { } else {>>=>
|
|
|
1756 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += bytes;>>=>
|
|
|
1757 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + genlang(96);>>=>
|
|
|
1758 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1759 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1760 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1761 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1762 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1763 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1764 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (parenths === true) {>>=>
|
|
|
1765 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show = "<i>(" + show + ")</i>";>>=>
|
|
|
1766 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1767 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { return "<span style='display:none'>" + round(bytes,0) + ".</span>" + show; //span for sorting>>=>
|
|
|
1768 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) {}>>=>
|
|
|
1769 |
|
|
|
1770 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) {function formatBPS(bps) {>>=>
|
|
|
1771 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { var show = "";>>=>
|
|
|
1772 |
|
|
|
1773 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (bps > Math.pow(1000, 5)) {>>=>
|
|
|
1774 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bps / Math.pow(1000, 5), 2);>>=>
|
|
|
1775 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + 'Pb/s';>>=>
|
|
|
1776 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { } else {>>=>
|
|
|
1777 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (bps > Math.pow(1000, 4)) {>>=>
|
|
|
1778 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bps / Math.pow(1000, 4), 2);>>=>
|
|
|
1779 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + 'Tb/s';>>=>
|
|
|
1780 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { } else {>>=>
|
|
|
1781 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (bps > Math.pow(1000, 3)) {>>=>
|
|
|
1782 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bps / Math.pow(1000, 3), 2);>>=>
|
|
|
1783 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + 'Gb/s';>>=>
|
|
|
1784 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { } else {>>=>
|
|
|
1785 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (bps > Math.pow(1000, 2)) {>>=>
|
|
|
1786 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bps / Math.pow(1000, 2), 2);>>=>
|
|
|
1787 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + 'Mb/s';>>=>
|
|
|
1788 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { } else {>>=>
|
|
|
1789 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (bps > Math.pow(1000, 1)) {>>=>
|
|
|
1790 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += round(bps / Math.pow(1000, 1), 2);>>=>
|
|
|
1791 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + 'Kb/s';>>=>
|
|
|
1792 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { } else {>>=>
|
|
|
1793 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += bps;>>=>
|
|
|
1794 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { show += String.fromCharCode(160) + 'b/s';>>=>
|
|
|
1795 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1796 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1797 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1798 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1799 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1800 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { return show;>>=>
|
|
|
1801 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) {}>>=>
|
|
|
1802 |
|
|
|
1803 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) {Array.prototype.pushIfNotExist = function(val) {>>=>
|
|
|
1804 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (typeof(val) == 'undefined' || val === '') {>>=>
|
|
|
1805 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { return;>>=>
|
|
|
1806 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1807 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { val = $.trim(val);>>=>
|
|
|
1808 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if ($.inArray(val, this) == -1) {>>=>
|
|
|
1809 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { this.push(val);>>=>
|
|
|
1810 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1811 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) {};>>=>
|
|
|
1812 |
|
|
|
1813 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) {/**>>=>
|
|
|
1814 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { * generate a formatted datetime string of the current datetime>>=>
|
|
|
1815 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { * @return {String} formatted datetime string>>=>
|
|
|
1816 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { */>>=>
|
|
|
1817 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) {function datetime() {>>=>
|
|
|
1818 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { var date, day = 0, month = 0, year = 0, hour = 0, minute = 0, days = "", months = "", years = "", hours = "", minutes = "";>>=>
|
|
|
1819 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { date = new Date();>>=>
|
|
|
1820 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { day = date.getDate();>>=>
|
|
|
1821 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { month = date.getMonth() + 1;>>=>
|
|
|
1822 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { year = date.getFullYear();>>=>
|
|
|
1823 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { hour = date.getHours();>>=>
|
|
|
1824 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { minute = date.getMinutes();>>=>
|
|
|
1825 |
|
|
|
1826 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { // format values smaller that 10 with a leading 0>>=>
|
|
|
1827 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { days = (day < 10) ? "0" + day.toString() : day.toString();>>=>
|
|
|
1828 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { months = (month < 10) ? "0" + month.toString() : month.toString();>>=>
|
|
|
1829 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { years = (year < 1000) ? year.toString() : year.toString();>>=>
|
|
|
1830 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { minutes = (minute < 10) ? "0" + minute.toString() : minute.toString();>>=>
|
|
|
1831 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { hours = (hour < 10) ? "0" + hour.toString() : hour.toString();>>=>
|
|
|
1832 |
|
|
|
1833 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { return days + "." + months + "." + years + " - " + hours + ":" + minutes;>>=>
|
|
|
1834 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) {}>>=>
|
|
|
1835 |
|
|
|
1836 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) {/**>>=>
|
|
|
1837 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { * round a given value to the specified precision, difference to Math.round() is that there>>=>
|
|
|
1838 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { * will be appended Zeros to the end if the precision is not reached (0.1 gets rounded to 0.100 when precision is set to 3)>>=>
|
|
|
1839 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { * @param {Number} x value to round>>=>
|
|
|
1840 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { * @param {Number} n precision>>=>
|
|
|
1841 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { * @return {String}>>=>
|
|
|
1842 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { */>>=>
|
|
|
1843 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) {function round(x, n) {>>=>
|
|
|
1844 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { var e = 0, k = "";>>=>
|
|
|
1845 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (n < 0 || n > 14) {>>=>
|
|
|
1846 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { return 0;>>=>
|
|
|
1847 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1848 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (n === 0) {>>=>
|
|
|
1849 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { return Math.round(x);>>=>
|
|
|
1850 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { } else {>>=>
|
|
|
1851 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { e = Math.pow(10, n);>>=>
|
|
|
1852 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { k = (Math.round(x * e) / e).toString();>>=>
|
|
|
1853 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { if (k.indexOf('.') === -1) {>>=>
|
|
|
1854 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { k += '.';>>=>
|
|
|
1855 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1856 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { k += e.toString().substring(1);>>=>
|
|
|
1857 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { return k.substring(0, k.indexOf('.') + n + 1);>>=>
|
|
|
1858 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) { }>>=>
|
|
|
1859 |
<= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {< 0))) {
< 1000)) {}>>=>
|