Subversion Repositories ALCASAR

Rev

Rev 3100 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log



































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Rev 3100 Rev 3179
1
/***************************************************************************
1
/***************************************************************************
2
 *   Copyright (C) 2008 by phpSysInfo - A PHP System Information Script    *
2
 *   Copyright (C) 2008 by phpSysInfo - A PHP System Information Script    *
3
 *   http://phpsysinfo.sourceforge.net/                                    *
3
 *   http://phpsysinfo.sourceforge.net/                                    *
4
 *                                                                         *
4
 *                                                                         *
5
 *   This program is free software; you can redistribute it and/or modify  *
5
 *   This program is free software; you can redistribute it and/or modify  *
6
 *   it under the terms of the GNU General Public License as published by  *
6
 *   it under the terms of the GNU General Public License as published by  *
7
 *   the Free Software Foundation; either version 2 of the License, or     *
7
 *   the Free Software Foundation; either version 2 of the License, or     *
8
 *   (at your option) any later version.                                   *
8
 *   (at your option) any later version.                                   *
9
 *                                                                         *
9
 *                                                                         *
10
 *   This program is distributed in the hope that it will be useful,       *
10
 *   This program is distributed in the hope that it will be useful,       *
11
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13
 *   GNU General Public License for more details.                          *
13
 *   GNU General Public License for more details.                          *
14
 *                                                                         *
14
 *                                                                         *
15
 *   You should have received a copy of the GNU General Public License     *
15
 *   You should have received a copy of the GNU General Public License     *
16
 *   along with this program; if not, write to the                         *
16
 *   along with this program; if not, write to the                         *
17
 *   Free Software Foundation, Inc.,                                       *
17
 *   Free Software Foundation, Inc.,                                       *
18
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
18
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19
 ***************************************************************************/
19
 ***************************************************************************/
20
//
20
//
21
// $Id: phpsysinfo.js 699 2012-09-15 11:57:13Z namiltd $
21
// $Id: phpsysinfo.js 699 2012-09-15 11:57:13Z namiltd $
22
//
22
//
23
 
23
 
24
/*global $, jQuery */
24
/*global $, jQuery */
25
 
25
 
26
"use strict";
26
"use strict";
27
 
27
 
28
var langxml = [], filesystemTable, current_language = "", plugin_liste = [], blocks = [], langarr = [],
28
var langxml = [], filesystemTable, current_language = "", plugin_liste = [], blocks = [], langarr = [],
29
     showCPUListExpanded, showCPUInfoExpanded, showNetworkInfosExpanded, showMemoryInfosExpanded, showNetworkActiveSpeed, showCPULoadCompact, showTotals, increaseWidth, oldnetwork = [];
29
     showCPUListExpanded, showCPUInfoExpanded, showNetworkInfosExpanded, showMemoryInfosExpanded, showNetworkActiveSpeed, showCPULoadCompact, showTotals, increaseWidth, oldnetwork = [];
30
 
30
 
31
/**
31
/**
-
 
32
 * Fix potential XSS vulnerability in jQuery
-
 
33
 */
-
 
34
jQuery.htmlPrefilter = function( html ) {
-
 
35
	return html;
-
 
36
};
-
 
37
 
-
 
38
/**
32
 * Fix PNG loading on IE6 or below
39
 * Fix PNG loading on IE6 or below
33
 */
40
 */
34
function PNGload(png) {
41
function PNGload(png) {
35
    if (typeof(png.ifixpng)==='function') { //IE6 PNG fix
42
    if (typeof(png.ifixpng)==='function') { //IE6 PNG fix
36
        png.ifixpng('./gfx/blank.gif');
43
        png.ifixpng('./gfx/blank.gif');
37
    }
44
    }
38
}
45
}
39
 
46
 
40
/**
47
/**
41
 * generate a cookie, if not exist, and add an entry to it<br><br>
48
 * generate a cookie, if not exist, and add an entry to it<br><br>
42
 * inspired by <a href="http://www.quirksmode.org/js/cookies.html">http://www.quirksmode.org/js/cookies.html</a>
49
 * inspired by <a href="http://www.quirksmode.org/js/cookies.html">http://www.quirksmode.org/js/cookies.html</a>
43
 * @param {String} name name that holds the value
50
 * @param {String} name name that holds the value
44
 * @param {String} value value that needs to be stored
51
 * @param {String} value value that needs to be stored
45
 * @param {Number} days how many days the entry should be valid in the cookie
52
 * @param {Number} days how many days the entry should be valid in the cookie
46
 */
53
 */
47
function createCookie(name, value, days) {
54
function createCookie(name, value, days) {
48
    var date = new Date(), expires = "";
55
    var date = new Date(), expires = "";
49
    if (days) {
56
    if (days) {
50
        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
57
        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
51
        if (typeof(date.toUTCString)==="function") {
58
        if (typeof(date.toUTCString)==="function") {
52
            expires = "; expires=" + date.toUTCString();
59
            expires = "; expires=" + date.toUTCString();
53
        } else {
60
        } else {
54
            //deprecated
61
            //deprecated
55
            expires = "; expires=" + date.toGMTString();
62
            expires = "; expires=" + date.toGMTString();
56
        }
63
        }
57
    } else {
64
    } else {
58
        expires = "";
65
        expires = "";
59
    }
66
    }
60
    document.cookie = name + "=" + value + expires + "; path=/; samesite=strict";
67
    document.cookie = name + "=" + value + expires + "; path=/; samesite=strict";
61
}
68
}
62
 
69
 
63
/**
70
/**
64
 * read a value out of a cookie and return the value<br><br>
71
 * read a value out of a cookie and return the value<br><br>
65
 * inspired by <a href="http://www.quirksmode.org/js/cookies.html">http://www.quirksmode.org/js/cookies.html</a>
72
 * inspired by <a href="http://www.quirksmode.org/js/cookies.html">http://www.quirksmode.org/js/cookies.html</a>
66
 * @param {String} name name of the value that should be retrieved
73
 * @param {String} name name of the value that should be retrieved
67
 * @return {String}
74
 * @return {String}
68
 */
75
 */
69
function readCookie(name) {
76
function readCookie(name) {
70
    var nameEQ = "", ca = [], c = '', i = 0;
77
    var nameEQ = "", ca = [], c = '', i = 0;
71
    nameEQ = name + "=";
78
    nameEQ = name + "=";
72
    ca = document.cookie.split(';');
79
    ca = document.cookie.split(';');
73
    for (i = 0; i < ca.length; i++) {
80
    for (i = 0; i < ca.length; i++) {
74
        c = ca[i];
81
        c = ca[i];
75
        while (c.charAt(0) === ' ') {
82
        while (c.charAt(0) === ' ') {
76
            c = c.substring(1, c.length);
83
            c = c.substring(1, c.length);
77
        }
84
        }
78
        if (!c.indexOf(nameEQ)) {
85
        if (!c.indexOf(nameEQ)) {
79
            return c.substring(nameEQ.length, c.length);
86
            return c.substring(nameEQ.length, c.length);
80
        }
87
        }
81
    }
88
    }
82
    return null;
89
    return null;
83
}
90
}
84
 
91
 
85
/**
92
/**
86
 * round a given value to the specified precision, difference to Math.round() is that there
93
 * round a given value to the specified precision, difference to Math.round() is that there
87
 * 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)
94
 * 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)
88
 * @param {Number} x value to round
95
 * @param {Number} x value to round
89
 * @param {Number} n precision
96
 * @param {Number} n precision
90
 * @return {String}
97
 * @return {String}
91
 */
98
 */
92
function round(x, n) {
99
function round(x, n) {
93
    var e = 0, k = "";
100
    var e = 0, k = "";
94
    if (n < 0 || n > 14) {
101
    if (n < 0 || n > 14) {
95
        return 0;
102
        return 0;
96
    }
103
    }
97
    if (n === 0) {
104
    if (n === 0) {
98
        return Math.round(x);
105
        return Math.round(x);
99
    } else {
106
    } else {
100
        e = Math.pow(10, n);
107
        e = Math.pow(10, n);
101
        k = (Math.round(x * e) / e).toString();
108
        k = (Math.round(x * e) / e).toString();
102
        if (k.indexOf('.') === -1) {
109
        if (k.indexOf('.') === -1) {
103
            k += '.';
110
            k += '.';
104
        }
111
        }
105
        k += e.toString().substring(1);
112
        k += e.toString().substring(1);
106
        return k.substring(0, k.indexOf('.') + n + 1);
113
        return k.substring(0, k.indexOf('.') + n + 1);
107
    }
114
    }
108
}
115
}
109
 
116
 
110
/**
117
/**
111
 * activates a given style and disables the old one in the document
118
 * activates a given style and disables the old one in the document
112
 * @param {String} template template that should be activated
119
 * @param {String} template template that should be activated
113
 */
120
 */
114
function switchStyle(template) {
121
function switchStyle(template) {
115
    if (increaseWidth > 0) {
122
    if (increaseWidth > 0) {
116
        $('link[rel*=style][title]').each(function getTitle(i) {
123
        $('link[rel*=style][title]').each(function getTitle(i) {
117
            if (this.getAttribute('title') === 'PSI_Template') {
124
            if (this.getAttribute('title') === 'PSI_Template') {
118
                this.setAttribute('href', './templates/css.php?name=' + template + '&increase=' + increaseWidth);
125
                this.setAttribute('href', './templates/css.php?name=' + template + '&increase=' + increaseWidth);
119
            }
126
            }
120
        });
127
        });
121
    } else {
128
    } else {
122
        $('link[rel*=style][title]').each(function getTitle(i) {
129
        $('link[rel*=style][title]').each(function getTitle(i) {
123
            if (this.getAttribute('title') === 'PSI_Template') {
130
            if (this.getAttribute('title') === 'PSI_Template') {
124
                this.setAttribute('href', './templates/' + template + ".css");  
131
                this.setAttribute('href', './templates/' + template + ".css");
125
            }
132
            }
126
        });
133
        });
127
    }
134
    }
128
}
135
}
129
 
136
 
130
/**
137
/**
131
 * load the given translation an translate the entire page<br><br>retrieving the translation is done through a
138
 * load the given translation an translate the entire page<br><br>retrieving the translation is done through a
132
 * ajax call
139
 * ajax call
133
 * @private
140
 * @private
134
 * @param {String} plugin if plugin is given, the plugin translation file will be read instead of the main translation file
141
 * @param {String} plugin if plugin is given, the plugin translation file will be read instead of the main translation file
135
 * @param {String} langarrId internal plugin name
142
 * @param {String} langarrId internal plugin name
136
 * @return {jQuery} translation jQuery-Object
143
 * @return {jQuery} translation jQuery-Object
137
 */
144
 */
138
function getLanguage(plugin, langarrId) {
145
function getLanguage(plugin, langarrId) {
139
    var getLangUrl = "";
146
    var getLangUrl = "";
140
    if (current_language) {
147
    if (current_language) {
141
        getLangUrl = 'language/language.php?lang=' + current_language;
148
        getLangUrl = 'language/language.php?lang=' + current_language;
142
        if (plugin) {
149
        if (plugin) {
143
            getLangUrl += "&plugin=" + plugin;
150
            getLangUrl += "&plugin=" + plugin;
144
        }
151
        }
145
    } else {
152
    } else {
146
        getLangUrl = 'language/language.php';
153
        getLangUrl = 'language/language.php';
147
        if (plugin) {
154
        if (plugin) {
148
            getLangUrl += "?plugin=" + plugin;
155
            getLangUrl += "?plugin=" + plugin;
149
        }
156
        }
150
    }
157
    }
151
    $.ajax({
158
    $.ajax({
152
        url: getLangUrl,
159
        url: getLangUrl,
153
        type: 'GET',
160
        type: 'GET',
154
        dataType: 'xml',
161
        dataType: 'xml',
155
        timeout: 100000,
162
        timeout: 100000,
156
        error: function error() {
163
        error: function error() {
157
            $.jGrowl("Error loading language - " + getLangUrl);
164
            $.jGrowl("Error loading language - " + getLangUrl);
158
        },
165
        },
159
        success: function buildblocks(xml) {
166
        success: function buildblocks(xml) {
160
            var idexp;
167
            var idexp;
161
            langxml[langarrId] = xml;
168
            langxml[langarrId] = xml;
162
            if (langarr[langarrId] === undefined) {
169
            if (langarr[langarrId] === undefined) {
163
                langarr.push(langarrId);
170
                langarr.push(langarrId);
164
                langarr[langarrId] = [];
171
                langarr[langarrId] = [];
165
            }
172
            }
166
            $("expression", langxml[langarrId]).each(function langstore(id) {
173
            $("expression", langxml[langarrId]).each(function langstore(id) {
167
                idexp = $("expression", xml).get(id);
174
                idexp = $("expression", xml).get(id);
168
                langarr[langarrId][this.getAttribute('id')] = $("exp", idexp).text().toString().replace(/\//g, "/<wbr>");
175
                langarr[langarrId][this.getAttribute('id')] = $("exp", idexp).text().toString().replace(/\//g, "/<wbr>");
169
            });
176
            });
170
            changeSpanLanguage(plugin);
177
            changeSpanLanguage(plugin);
171
        }
178
        }
172
    });
179
    });
173
}
180
}
174
 
181
 
175
/**
182
/**
176
 * generate a span tag
183
 * generate a span tag
177
 * @param {Number} id translation id in the xml file
184
 * @param {Number} id translation id in the xml file
178
 * @param {String} [plugin] name of the plugin for which the tag should be generated
185
 * @param {String} [plugin] name of the plugin for which the tag should be generated
179
 * @param {String} [defaultvalue] default value
186
 * @param {String} [defaultvalue] default value
180
 * @return {String} string which contains generated span tag for translation string
187
 * @return {String} string which contains generated span tag for translation string
181
 */
188
 */
182
function genlang(id, plugin, defaultvalue) {
189
function genlang(id, plugin, defaultvalue) {
183
    var html = "", idString = "", plugname = "",
190
    var html = "", idString = "", plugname = "",
184
        langarrId = current_language + "_";
191
        langarrId = current_language + "_";
185
 
192
 
186
    if (plugin === undefined) {
193
    if (plugin === undefined) {
187
        plugname = "";
194
        plugname = "";
188
        langarrId += "phpSysInfo";
195
        langarrId += "phpSysInfo";
189
    } else {
196
    } else {
190
        plugname = plugin.toLowerCase();
197
        plugname = plugin.toLowerCase();
191
        langarrId += plugname;
198
        langarrId += plugname;
192
    }
199
    }
193
    if (id < 100) {
200
    if (id < 100) {
194
        if (id < 10) {
201
        if (id < 10) {
195
            idString = "00" + id.toString();
202
            idString = "00" + id.toString();
196
        } else {
203
        } else {
197
            idString = "0" + id.toString();
204
            idString = "0" + id.toString();
198
        }
205
        }
199
    } else {
206
    } else {
200
        idString = id.toString();
207
        idString = id.toString();
201
    }
208
    }
202
    if (plugin) {
209
    if (plugin) {
203
        idString = "plugin_" + plugname + "_" + idString;
210
        idString = "plugin_" + plugname + "_" + idString;
204
    }
211
    }
205
 
212
 
206
    html += "<span class=\"lang_" + idString + "\">";
213
    html += "<span class=\"lang_" + idString + "\">";
207
 
214
 
208
    if ((langxml[langarrId] !== undefined) && (langarr[langarrId] !== undefined)) {
215
    if ((langxml[langarrId] !== undefined) && (langarr[langarrId] !== undefined)) {
209
        html += langarr[langarrId][idString];
216
        html += langarr[langarrId][idString];
210
    } else if (defaultvalue !== undefined) {
217
    } else if (defaultvalue !== undefined) {
211
        html += defaultvalue;
218
        html += defaultvalue;
212
    }
219
    }
213
 
220
 
214
    html += "</span>";
221
    html += "</span>";
215
 
222
 
216
    return html;
223
    return html;
217
}
224
}
218
 
225
 
219
/**
226
/**
220
 * translates all expressions based on the translation xml file<br>
227
 * translates all expressions based on the translation xml file<br>
221
 * translation expressions must be in the format &lt;span class="lang_???"&gt;&lt;/span&gt;, where ??? is
228
 * translation expressions must be in the format &lt;span class="lang_???"&gt;&lt;/span&gt;, where ??? is
222
 * the number of the translated expression in the xml file<br><br>if a translated expression is not found in the xml
229
 * the number of the translated expression in the xml file<br><br>if a translated expression is not found in the xml
223
 * file nothing would be translated, so the initial value which is inside the span tag is displayed
230
 * file nothing would be translated, so the initial value which is inside the span tag is displayed
224
 * @param {String} [plugin] name of the plugin
231
 * @param {String} [plugin] name of the plugin
225
 */
232
 */
226
function changeLanguage(plugin) {
233
function changeLanguage(plugin) {
227
    var langarrId = current_language + "_";
234
    var langarrId = current_language + "_";
228
 
235
 
229
    if (plugin === undefined) {
236
    if (plugin === undefined) {
230
        langarrId += "phpSysInfo";
237
        langarrId += "phpSysInfo";
231
    } else {
238
    } else {
232
        langarrId += plugin;
239
        langarrId += plugin;
233
    }
240
    }
234
 
241
 
235
    if (langxml[langarrId] !== undefined) {
242
    if (langxml[langarrId] !== undefined) {
236
        changeSpanLanguage(plugin);
243
        changeSpanLanguage(plugin);
237
    } else {
244
    } else {
238
        langxml.push(langarrId);
245
        langxml.push(langarrId);
239
        getLanguage(plugin, langarrId);
246
        getLanguage(plugin, langarrId);
240
    }
247
    }
241
}
248
}
242
 
249
 
243
function changeSpanLanguage(plugin) {
250
function changeSpanLanguage(plugin) {
244
    var langId = "", langStr = "", langarrId = current_language + "_";
251
    var langId = "", langStr = "", langarrId = current_language + "_";
245
 
252
 
246
    if (plugin === undefined) {
253
    if (plugin === undefined) {
247
        langarrId += "phpSysInfo";
254
        langarrId += "phpSysInfo";
248
        $('span[class*=lang_]').each(function translate(i) {
255
        $('span[class*=lang_]').each(function translate(i) {
249
            langId = this.className.substring(5);
256
            langId = this.className.substring(5);
250
            if (langId.indexOf('plugin_') !== 0) { //does not begin with plugin_
257
            if (langId.indexOf('plugin_') !== 0) { //does not begin with plugin_
251
                langStr = langarr[langarrId][langId];
258
                langStr = langarr[langarrId][langId];
252
                if (langStr !== undefined) {
259
                if (langStr !== undefined) {
253
                    if (langStr.length > 0) {
260
                    if (langStr.length > 0) {
254
                        this.innerHTML = langStr;
261
                        this.innerHTML = langStr;
255
                    }
262
                    }
256
                }
263
                }
257
            }
264
            }
258
        });
265
        });
259
        $("#loader").hide();
266
        $("#loader").hide();
260
        $("#output").fadeIn("slow"); //show if any language loaded
267
        $("#output").fadeIn("slow"); //show if any language loaded
261
    } else {
268
    } else {
262
        langarrId += plugin;
269
        langarrId += plugin;
263
        $('span[class*=lang_plugin_'+plugin.toLowerCase()+'_]').each(function translate(i) {
270
        $('span[class*=lang_plugin_'+plugin.toLowerCase()+'_]').each(function translate(i) {
264
            langId = this.className.substring(5);
271
            langId = this.className.substring(5);
265
            langStr = langarr[langarrId][langId];
272
            langStr = langarr[langarrId][langId];
266
            if (langStr !== undefined) {
273
            if (langStr !== undefined) {
267
                if (langStr.length > 0) {
274
                if (langStr.length > 0) {
268
                    this.innerHTML = langStr;
275
                    this.innerHTML = langStr;
269
                }
276
                }
270
            }
277
            }
271
        });
278
        });
272
        $('#panel_'+plugin).show(); //show plugin if any language loaded
279
        $('#panel_'+plugin).show(); //show plugin if any language loaded
273
    }
280
    }
274
}
281
}
275
 
282
 
276
/**
283
/**
277
 * generate the filesystemTable and activate the dataTables plugin on it
284
 * generate the filesystemTable and activate the dataTables plugin on it
278
 */
285
 */
279
function filesystemtable() {
286
function filesystemtable() {
280
    var html = "";
287
    var html = "";
281
    html += "<h2>" + genlang(30) + "</h2>\n";
288
    html += "<h2>" + genlang(30) + "</h2>\n";
282
    html += "        <div style=\"overflow-x:auto;\">\n";
289
    html += "        <div style=\"overflow-x:auto;\">\n";
283
    html += "          <table id=\"filesystemTable\" style=\"border-collapse:collapse;\">\n";
290
    html += "          <table id=\"filesystemTable\" style=\"border-collapse:collapse;\">\n";
284
    html += "            <thead>\n";
291
    html += "            <thead>\n";
285
    html += "              <tr>\n";
292
    html += "              <tr>\n";
286
    html += "                <th>" + genlang(31) + "</th>\n";
293
    html += "                <th>" + genlang(31) + "</th>\n";
287
    html += "                <th>" + genlang(34) + "</th>\n";
294
    html += "                <th>" + genlang(34) + "</th>\n";
288
    html += "                <th>" + genlang(32) + "</th>\n";
295
    html += "                <th>" + genlang(32) + "</th>\n";
289
    html += "                <th>" + genlang(33) + "</th>\n";
296
    html += "                <th>" + genlang(33) + "</th>\n";
290
    html += "                <th class=\"right\">" + genlang(35) + "</th>\n";
297
    html += "                <th class=\"right\">" + genlang(35) + "</th>\n";
291
    html += "                <th class=\"right\">" + genlang(36) + "</th>\n";
298
    html += "                <th class=\"right\">" + genlang(36) + "</th>\n";
292
    html += "                <th class=\"right\">" + genlang(37) + "</th>\n";
299
    html += "                <th class=\"right\">" + genlang(37) + "</th>\n";
293
    html += "              </tr>\n";
300
    html += "              </tr>\n";
294
    html += "            </thead>\n";
301
    html += "            </thead>\n";
295
    if (showTotals) {
302
    if (showTotals) {
296
        html += "            <tfoot>\n";
303
        html += "            <tfoot>\n";
297
        html += "              <tr style=\"font-weight : bold\">\n";
304
        html += "              <tr style=\"font-weight : bold\">\n";
298
        html += "                <td>&nbsp;</td>\n";
305
        html += "                <td>&nbsp;</td>\n";
299
        html += "                <td>&nbsp;</td>\n";
306
        html += "                <td>&nbsp;</td>\n";
300
        html += "                <td>" + genlang(38) + "</td>\n";
307
        html += "                <td>" + genlang(38) + "</td>\n";
301
        html += "                <td id=\"s_fs_total\"></td>\n";
308
        html += "                <td id=\"s_fs_total\"></td>\n";
302
        html += "                <td class=\"right\"><span id=\"s_fs_tfree\"></span></td>\n";
309
        html += "                <td class=\"right\"><span id=\"s_fs_tfree\"></span></td>\n";
303
        html += "                <td class=\"right\"><span id=\"s_fs_tused\"></span></td>\n";
310
        html += "                <td class=\"right\"><span id=\"s_fs_tused\"></span></td>\n";
304
        html += "                <td class=\"right\"><span id=\"s_fs_tsize\"></span></td>\n";
311
        html += "                <td class=\"right\"><span id=\"s_fs_tsize\"></span></td>\n";
305
        html += "              </tr>\n";
312
        html += "              </tr>\n";
306
        html += "            </tfoot>\n";
313
        html += "            </tfoot>\n";
307
    }
314
    }
308
    html += "            <tbody>\n";
315
    html += "            <tbody>\n";
309
    html += "            </tbody>\n";
316
    html += "            </tbody>\n";
310
    html += "          </table>\n";
317
    html += "          </table>\n";
311
    html += "        </div>\n";
318
    html += "        </div>\n";
312
 
319
 
313
    $("#filesystem").append(html);
320
    $("#filesystem").append(html);
314
 
321
 
315
    filesystemTable = $("#filesystemTable").dataTable({
322
    filesystemTable = $("#filesystemTable").dataTable({
316
        "bPaginate": false,
323
        "bPaginate": false,
317
        "bLengthChange": false,
324
        "bLengthChange": false,
318
        "bFilter": false,
325
        "bFilter": false,
319
        "bSort": true,
326
        "bSort": true,
320
        "bInfo": false,
327
        "bInfo": false,
321
        "bProcessing": true,
328
        "bProcessing": true,
322
        "bAutoWidth": false,
329
        "bAutoWidth": false,
323
        "bStateSave": true,
330
        "bStateSave": true,
324
        "aoColumns": [{
331
        "aoColumns": [{
325
            "sType": 'span-string',
332
            "sType": 'span-string',
326
            "sWidth": "100px"
333
            "sWidth": "100px"
327
        }, {
334
        }, {
328
            "sType": 'span-string',
335
            "sType": 'span-string',
329
            "sWidth": "50px"
336
            "sWidth": "50px"
330
        }, {
337
        }, {
331
            "sType": 'span-string',
338
            "sType": 'span-string',
332
            "sWidth": "200px"
339
            "sWidth": "200px"
333
        }, {
340
        }, {
334
            "sType": 'span-number'
341
            "sType": 'span-number'
335
        }, {
342
        }, {
336
            "sType": 'span-number',
343
            "sType": 'span-number',
337
            "sWidth": "80px",
344
            "sWidth": "80px",
338
            "sClass": "right"
345
            "sClass": "right"
339
        }, {
346
        }, {
340
            "sType": 'span-number',
347
            "sType": 'span-number',
341
            "sWidth": "80px",
348
            "sWidth": "80px",
342
            "sClass": "right"
349
            "sClass": "right"
343
        }, {
350
        }, {
344
            "sType": 'span-number',
351
            "sType": 'span-number',
345
            "sWidth": "80px",
352
            "sWidth": "80px",
346
            "sClass": "right"
353
            "sClass": "right"
347
        }]
354
        }]
348
    });
355
    });
349
}
356
}
350
 
357
 
351
/**
358
/**
352
 * fill all errors from the xml in the error div element in the document and show the error icon
359
 * fill all errors from the xml in the error div element in the document and show the error icon
353
 * @param {jQuery} xml phpSysInfo-XML
360
 * @param {jQuery} xml phpSysInfo-XML
354
 */
361
 */
355
function populateErrors(xml) {
362
function populateErrors(xml) {
356
    var values = false;
363
    var values = false;
357
    $("Errors Error", xml).each(function getError(id) {
364
    $("Errors Error", xml).each(function getError(id) {
358
//        $("#errorlist").append("<b>" + $(this).attr("Function") + "</b><br><br><pre>" + $(this).text() + "</pre><hr>");
365
//        $("#errorlist").append("<b>" + $(this).attr("Function") + "</b><br><br><pre>" + $(this).text() + "</pre><hr>");
359
        $("#errorlist").append("<b>" + $(this).attr("Function") + "</b><br><br><pre>" + $(this).attr("Message") + "</pre><hr>");
366
        $("#errorlist").append("<b>" + $(this).attr("Function") + "</b><br><br><pre>" + $(this).attr("Message") + "</pre><hr>");
360
        values = true;
367
        values = true;
361
    });
368
    });
362
    if (values) {
369
    if (values) {
363
        $("#warn").css("display", "inline");
370
        $("#warn").css("display", "inline");
364
        $("#loadwarn").css("display", "inline");
371
        $("#loadwarn").css("display", "inline");
365
    }
372
    }
366
}
373
}
367
 
374
 
368
/**
375
/**
369
 * show the page
376
 * show the page
370
 * @param {jQuery} xml phpSysInfo-XML
377
 * @param {jQuery} xml phpSysInfo-XML
371
 */
378
 */
372
function displayPage(xml) {
379
function displayPage(xml) {
373
    var versioni = "";
380
    var versioni = "";
374
//    $("#loader").hide();
381
//    $("#loader").hide();
375
//    $("#output").fadeIn("slow");
382
//    $("#output").fadeIn("slow");
376
    versioni = $("Generation", xml).attr("version").toString();
383
    versioni = $("Generation", xml).attr("version").toString();
377
    $("#version").html(versioni);
384
    $("#version").html(versioni);
378
}
385
}
379
 
386
 
380
/**
387
/**
381
 * format seconds to a better readable statement with days, hours and minutes
388
 * format seconds to a better readable statement with days, hours and minutes
382
 * @param {Number} sec seconds that should be formatted
389
 * @param {Number} sec seconds that should be formatted
383
 * @return {String} html string with no breaking spaces and translation statements
390
 * @return {String} html string with no breaking spaces and translation statements
384
 */
391
 */
385
function formatUptime(sec) {
392
function formatUptime(sec) {
386
    var txt = "", intMin = 0, intHours = 0, intDays = 0;
393
    var txt = "", intMin = 0, intHours = 0, intDays = 0;
387
    intMin = sec / 60;
394
    intMin = sec / 60;
388
    intHours = intMin / 60;
395
    intHours = intMin / 60;
389
    intDays = Math.floor(intHours / 24);
396
    intDays = Math.floor(intHours / 24);
390
    intHours = Math.floor(intHours - (intDays * 24));
397
    intHours = Math.floor(intHours - (intDays * 24));
391
    intMin = Math.floor(intMin - (intDays * 60 * 24) - (intHours * 60));
398
    intMin = Math.floor(intMin - (intDays * 60 * 24) - (intHours * 60));
392
    if (intDays) {
399
    if (intDays) {
393
        txt += intDays.toString() + " " + genlang(48) + " ";
400
        txt += intDays.toString() + " " + genlang(48) + " ";
394
    }
401
    }
395
    if (intHours) {
402
    if (intHours) {
396
        txt += intHours.toString() + " " + genlang(49) + " ";
403
        txt += intHours.toString() + " " + genlang(49) + " ";
397
    }
404
    }
398
    return txt + intMin.toString() + " " + genlang(50);
405
    return txt + intMin.toString() + " " + genlang(50);
399
}
406
}
400
 
407
 
401
/**
408
/**
402
 * format a given MHz value to a better readable statement with the right suffix
409
 * format a given MHz value to a better readable statement with the right suffix
403
 * @param {Number} mhertz mhertz value that should be formatted
410
 * @param {Number} mhertz mhertz value that should be formatted
404
 * @return {String} html string with no breaking spaces and translation statements
411
 * @return {String} html string with no breaking spaces and translation statements
405
 */
412
 */
406
function formatHertz(mhertz) {
413
function formatHertz(mhertz) {
407
    if ((mhertz >= 0) && (mhertz < 1000)) {
414
    if ((mhertz >= 0) && (mhertz < 1000)) {
408
< 1000)) {        return mhertz.toString() + " " + genlang(92);
415
< 1000)) {        return mhertz.toString() + " " + genlang(92);
409
< 1000)) {    } else {
416
< 1000)) {    } else {
410
< 1000)) {        if (mhertz >= 1000) {
417
< 1000)) {        if (mhertz >= 1000) {
411
< 1000)) {            return round(mhertz / 1000, 2) + "&nbsp;" + genlang(93);
418
< 1000)) {            return round(mhertz / 1000, 2) + "&nbsp;" + genlang(93);
412
< 1000)) {        } else {
419
< 1000)) {        } else {
413
< 1000)) {            return "";
420
< 1000)) {            return "";
414
< 1000)) {        }
421
< 1000)) {        }
415
< 1000)) {    }
422
< 1000)) {    }
416
< 1000)) {}
423
< 1000)) {}
417
< 1000)) {
424
< 1000)) {
418
< 1000)) {/**
425
< 1000)) {/**
419
< 1000)) { * format a given MT/s value to a better readable statement with the right suffix
426
< 1000)) { * format a given MT/s value to a better readable statement with the right suffix
420
< 1000)) { * @param {Number} mtps mtps value that should be formatted
427
< 1000)) { * @param {Number} mtps mtps value that should be formatted
421
< 1000)) { * @return {String} html string with no breaking spaces and translation statements
428
< 1000)) { * @return {String} html string with no breaking spaces and translation statements
422
< 1000)) { */
429
< 1000)) { */
423
< 1000)) {function formatMTps(mtps) {
430
< 1000)) {function formatMTps(mtps) {
424
< 1000)) {    if ((mtps >= 0) && (mtps < 1000)) {
431
< 1000)) {    if ((mtps >= 0) && (mtps < 1000)) {
425
< 1000)) {        return mtps.toString() + "&nbsp;" + genlang(131);
432
< 1000)) {        return mtps.toString() + "&nbsp;" + genlang(131);
426
< 1000)) {    } else {
433
< 1000)) {    } else {
427
< 1000)) {        if (mtps >= 1000) {
434
< 1000)) {        if (mtps >= 1000) {
428
< 1000)) {            return round(mtps / 1000, 2) + " " + genlang(132);
435
< 1000)) {            return round(mtps / 1000, 2) + " " + genlang(132);
429
< 1000)) {        } else {
436
< 1000)) {        } else {
430
< 1000)) {            return "";
437
< 1000)) {            return "";
431
< 1000)) {        }
438
< 1000)) {        }
432
< 1000)) {    }
439
< 1000)) {    }
433
< 1000)) {}
440
< 1000)) {}
434
< 1000)) {
441
< 1000)) {
435
< 1000)) {/**
442
< 1000)) {/**
436
< 1000)) { * format the byte values into a user friendly value with the corespondenting unit expression<br>support is included
443
< 1000)) { * format the byte values into a user friendly value with the corespondenting unit expression<br>support is included
437
< 1000)) { * for binary and decimal output<br>user can specify a constant format for all byte outputs or the output is formated
444
< 1000)) { * for binary and decimal output<br>user can specify a constant format for all byte outputs or the output is formated
438
< 1000)) { * automatically so that every value can be read in a user friendly way
445
< 1000)) { * automatically so that every value can be read in a user friendly way
439
< 1000)) { * @param {Number} bytes value that should be converted in the corespondenting format, which is specified in the phpsysinfo.ini
446
< 1000)) { * @param {Number} bytes value that should be converted in the corespondenting format, which is specified in the phpsysinfo.ini
440
< 1000)) { * @param {jQuery} xml phpSysInfo-XML
447
< 1000)) { * @param {jQuery} xml phpSysInfo-XML
441
< 1000)) { * @return {String} string of the converted bytes with the translated unit expression
448
< 1000)) { * @return {String} string of the converted bytes with the translated unit expression
442
< 1000)) { */
449
< 1000)) { */
443
< 1000)) {function formatBytes(bytes, xml) {
450
< 1000)) {function formatBytes(bytes, xml) {
444
< 1000)) {    var byteFormat = "", show = "";
451
< 1000)) {    var byteFormat = "", show = "";
445
< 1000)) {
452
< 1000)) {
446
< 1000)) {    $("Options", xml).each(function getByteFormat(id) {
453
< 1000)) {    $("Options", xml).each(function getByteFormat(id) {
447
< 1000)) {        byteFormat = $(this).attr("byteFormat");
454
< 1000)) {        byteFormat = $(this).attr("byteFormat");
448
< 1000)) {    });
455
< 1000)) {    });
449
< 1000)) {
456
< 1000)) {
450
< 1000)) {    switch (byteFormat.toLowerCase()) {
457
< 1000)) {    switch (byteFormat.toLowerCase()) {
451
< 1000)) {    case "pib":
458
< 1000)) {    case "pib":
452
< 1000)) {        show += round(bytes / Math.pow(1024, 5), 2);
459
< 1000)) {        show += round(bytes / Math.pow(1024, 5), 2);
453
< 1000)) {        show += "&nbsp;" + genlang(90);
460
< 1000)) {        show += "&nbsp;" + genlang(90);
454
< 1000)) {        break;
461
< 1000)) {        break;
455
< 1000)) {    case "tib":
462
< 1000)) {    case "tib":
456
< 1000)) {        show += round(bytes / Math.pow(1024, 4), 2);
463
< 1000)) {        show += round(bytes / Math.pow(1024, 4), 2);
457
< 1000)) {        show += " " + genlang(86);
464
< 1000)) {        show += " " + genlang(86);
458
< 1000)) {        break;
465
< 1000)) {        break;
459
< 1000)) {    case "gib":
466
< 1000)) {    case "gib":
460
< 1000)) {        show += round(bytes / Math.pow(1024, 3), 2);
467
< 1000)) {        show += round(bytes / Math.pow(1024, 3), 2);
461
< 1000)) {        show += "&nbsp;" + genlang(87);
468
< 1000)) {        show += "&nbsp;" + genlang(87);
462
< 1000)) {        break;
469
< 1000)) {        break;
463
< 1000)) {    case "mib":
470
< 1000)) {    case "mib":
464
< 1000)) {        show += round(bytes / Math.pow(1024, 2), 2);
471
< 1000)) {        show += round(bytes / Math.pow(1024, 2), 2);
465
< 1000)) {        show += " " + genlang(88);
472
< 1000)) {        show += " " + genlang(88);
466
< 1000)) {        break;
473
< 1000)) {        break;
467
< 1000)) {    case "kib":
474
< 1000)) {    case "kib":
468
< 1000)) {        show += round(bytes / Math.pow(1024, 1), 2);
475
< 1000)) {        show += round(bytes / Math.pow(1024, 1), 2);
469
< 1000)) {        show += "&nbsp;" + genlang(89);
476
< 1000)) {        show += "&nbsp;" + genlang(89);
470
< 1000)) {        break;
477
< 1000)) {        break;
471
< 1000)) {    case "pb":
478
< 1000)) {    case "pb":
472
< 1000)) {        show += round(bytes / Math.pow(1000, 5), 2);
479
< 1000)) {        show += round(bytes / Math.pow(1000, 5), 2);
473
< 1000)) {        show += " " + genlang(91);
480
< 1000)) {        show += " " + genlang(91);
474
< 1000)) {        break;
481
< 1000)) {        break;
475
< 1000)) {    case "tb":
482
< 1000)) {    case "tb":
476
< 1000)) {        show += round(bytes / Math.pow(1000, 4), 2);
483
< 1000)) {        show += round(bytes / Math.pow(1000, 4), 2);
477
< 1000)) {        show += "&nbsp;" + genlang(85);
484
< 1000)) {        show += "&nbsp;" + genlang(85);
478
< 1000)) {        break;
485
< 1000)) {        break;
479
< 1000)) {    case "gb":
486
< 1000)) {    case "gb":
480
< 1000)) {        show += round(bytes / Math.pow(1000, 3), 2);
487
< 1000)) {        show += round(bytes / Math.pow(1000, 3), 2);
481
< 1000)) {        show += " " + genlang(41);
488
< 1000)) {        show += " " + genlang(41);
482
< 1000)) {        break;
489
< 1000)) {        break;
483
< 1000)) {    case "mb":
490
< 1000)) {    case "mb":
484
< 1000)) {        show += round(bytes / Math.pow(1000, 2), 2);
491
< 1000)) {        show += round(bytes / Math.pow(1000, 2), 2);
485
< 1000)) {        show += "&nbsp;" + genlang(40);
492
< 1000)) {        show += "&nbsp;" + genlang(40);
486
< 1000)) {        break;
493
< 1000)) {        break;
487
< 1000)) {    case "kb":
494
< 1000)) {    case "kb":
488
< 1000)) {        show += round(bytes / Math.pow(1000, 1), 2);
495
< 1000)) {        show += round(bytes / Math.pow(1000, 1), 2);
489
< 1000)) {        show += " " + genlang(39);
496
< 1000)) {        show += " " + genlang(39);
490
< 1000)) {        break;
497
< 1000)) {        break;
491
< 1000)) {    case "b":
498
< 1000)) {    case "b":
492
< 1000)) {        show += bytes;
499
< 1000)) {        show += bytes;
493
< 1000)) {        show += " " + genlang(96);
500
< 1000)) {        show += " " + genlang(96);
494
< 1000)) {        break;
501
< 1000)) {        break;
495
< 1000)) {    case "auto_decimal":
502
< 1000)) {    case "auto_decimal":
496
< 1000)) {        if (bytes > Math.pow(1000, 5)) {
503
< 1000)) {        if (bytes > Math.pow(1000, 5)) {
497
< 1000)) {            show += round(bytes / Math.pow(1000, 5), 2);
504
< 1000)) {            show += round(bytes / Math.pow(1000, 5), 2);
498
< 1000)) {            show += "&nbsp;" + genlang(91);
505
< 1000)) {            show += "&nbsp;" + genlang(91);
499
< 1000)) {        } else {
506
< 1000)) {        } else {
500
< 1000)) {            if (bytes > Math.pow(1000, 4)) {
507
< 1000)) {            if (bytes > Math.pow(1000, 4)) {
501
< 1000)) {                show += round(bytes / Math.pow(1000, 4), 2);
508
< 1000)) {                show += round(bytes / Math.pow(1000, 4), 2);
502
< 1000)) {                show += " " + genlang(85);
509
< 1000)) {                show += " " + genlang(85);
503
< 1000)) {            } else {
510
< 1000)) {            } else {
504
< 1000)) {                if (bytes > Math.pow(1000, 3)) {
511
< 1000)) {                if (bytes > Math.pow(1000, 3)) {
505
< 1000)) {                    show += round(bytes / Math.pow(1000, 3), 2);
512
< 1000)) {                    show += round(bytes / Math.pow(1000, 3), 2);
506
< 1000)) {                    show += "&nbsp;" + genlang(41);
513
< 1000)) {                    show += "&nbsp;" + genlang(41);
507
< 1000)) {                } else {
514
< 1000)) {                } else {
508
< 1000)) {                    if (bytes > Math.pow(1000, 2)) {
515
< 1000)) {                    if (bytes > Math.pow(1000, 2)) {
509
< 1000)) {                        show += round(bytes / Math.pow(1000, 2), 2);
516
< 1000)) {                        show += round(bytes / Math.pow(1000, 2), 2);
510
< 1000)) {                        show += " " + genlang(40);
517
< 1000)) {                        show += " " + genlang(40);
511
< 1000)) {                    } else {
518
< 1000)) {                    } else {
512
< 1000)) {                        if (bytes > Math.pow(1000, 1)) {
519
< 1000)) {                        if (bytes > Math.pow(1000, 1)) {
513
< 1000)) {                            show += round(bytes / Math.pow(1000, 1), 2);
520
< 1000)) {                            show += round(bytes / Math.pow(1000, 1), 2);
514
< 1000)) {                            show += "&nbsp;" + genlang(39);
521
< 1000)) {                            show += "&nbsp;" + genlang(39);
515
< 1000)) {                        } else {
522
< 1000)) {                        } else {
516
< 1000)) {                                show += bytes;
523
< 1000)) {                                show += bytes;
517
< 1000)) {                                show += "&nbsp;" + genlang(96);
524
< 1000)) {                                show += "&nbsp;" + genlang(96);
518
< 1000)) {                        }
525
< 1000)) {                        }
519
< 1000)) {                    }
526
< 1000)) {                    }
520
< 1000)) {                }
527
< 1000)) {                }
521
< 1000)) {            }
528
< 1000)) {            }
522
< 1000)) {        }
529
< 1000)) {        }
523
< 1000)) {        break;
530
< 1000)) {        break;
524
< 1000)) {    default:
531
< 1000)) {    default:
525
< 1000)) {        if (bytes > Math.pow(1024, 5)) {
532
< 1000)) {        if (bytes > Math.pow(1024, 5)) {
526
< 1000)) {            show += round(bytes / Math.pow(1024, 5), 2);
533
< 1000)) {            show += round(bytes / Math.pow(1024, 5), 2);
527
< 1000)) {            show += " " + genlang(90);
534
< 1000)) {            show += " " + genlang(90);
528
< 1000)) {        } else {
535
< 1000)) {        } else {
529
< 1000)) {            if (bytes > Math.pow(1024, 4)) {
536
< 1000)) {            if (bytes > Math.pow(1024, 4)) {
530
< 1000)) {                show += round(bytes / Math.pow(1024, 4), 2);
537
< 1000)) {                show += round(bytes / Math.pow(1024, 4), 2);
531
< 1000)) {                show += "&nbsp;" + genlang(86);
538
< 1000)) {                show += "&nbsp;" + genlang(86);
532
< 1000)) {            } else {
539
< 1000)) {            } else {
533
< 1000)) {                if (bytes > Math.pow(1024, 3)) {
540
< 1000)) {                if (bytes > Math.pow(1024, 3)) {
534
< 1000)) {                    show += round(bytes / Math.pow(1024, 3), 2);
541
< 1000)) {                    show += round(bytes / Math.pow(1024, 3), 2);
535
< 1000)) {                    show += " " + genlang(87);
542
< 1000)) {                    show += " " + genlang(87);
536
< 1000)) {                } else {
543
< 1000)) {                } else {
537
< 1000)) {                    if (bytes > Math.pow(1024, 2)) {
544
< 1000)) {                    if (bytes > Math.pow(1024, 2)) {
538
< 1000)) {                        show += round(bytes / Math.pow(1024, 2), 2);
545
< 1000)) {                        show += round(bytes / Math.pow(1024, 2), 2);
539
< 1000)) {                        show += "&nbsp;" + genlang(88);
546
< 1000)) {                        show += "&nbsp;" + genlang(88);
540
< 1000)) {                    } else {
547
< 1000)) {                    } else {
541
< 1000)) {                        if (bytes > Math.pow(1024, 1)) {
548
< 1000)) {                        if (bytes > Math.pow(1024, 1)) {
542
< 1000)) {                            show += round(bytes / Math.pow(1024, 1), 2);
549
< 1000)) {                            show += round(bytes / Math.pow(1024, 1), 2);
543
< 1000)) {                            show += " " + genlang(89);
550
< 1000)) {                            show += " " + genlang(89);
544
< 1000)) {                        } else {
551
< 1000)) {                        } else {
545
< 1000)) {                            show += bytes;
552
< 1000)) {                            show += bytes;
546
< 1000)) {                            show += " " + genlang(96);
553
< 1000)) {                            show += " " + genlang(96);
547
< 1000)) {                        }
554
< 1000)) {                        }
548
< 1000)) {                    }
555
< 1000)) {                    }
549
< 1000)) {                }
556
< 1000)) {                }
550
< 1000)) {            }
557
< 1000)) {            }
551
< 1000)) {        }
558
< 1000)) {        }
552
< 1000)) {    }
559
< 1000)) {    }
553
< 1000)) {    return show;
560
< 1000)) {    return show;
554
< 1000)) {}
561
< 1000)) {}
555
< 1000)) {
562
< 1000)) {
556
< 1000)) {function formatBPS(bps) {
563
< 1000)) {function formatBPS(bps) {
557
< 1000)) {    var show = "";
564
< 1000)) {    var show = "";
558
< 1000)) {
565
< 1000)) {
559
< 1000)) {    if (bps > Math.pow(1000, 5)) {
566
< 1000)) {    if (bps > Math.pow(1000, 5)) {
560
< 1000)) {        show += round(bps / Math.pow(1000, 5), 2);
567
< 1000)) {        show += round(bps / Math.pow(1000, 5), 2);
561
< 1000)) {        show += String.fromCharCode(160) + 'Pb/s';
568
< 1000)) {        show += String.fromCharCode(160) + 'Pb/s';
562
< 1000)) {    } else {
569
< 1000)) {    } else {
563
< 1000)) {        if (bps > Math.pow(1000, 4)) {
570
< 1000)) {        if (bps > Math.pow(1000, 4)) {
564
< 1000)) {            show += round(bps / Math.pow(1000, 4), 2);
571
< 1000)) {            show += round(bps / Math.pow(1000, 4), 2);
565
< 1000)) {            show += String.fromCharCode(160) + 'Tb/s';
572
< 1000)) {            show += String.fromCharCode(160) + 'Tb/s';
566
< 1000)) {        } else {
573
< 1000)) {        } else {
567
< 1000)) {            if (bps > Math.pow(1000, 3)) {
574
< 1000)) {            if (bps > Math.pow(1000, 3)) {
568
< 1000)) {                show += round(bps / Math.pow(1000, 3), 2);
575
< 1000)) {                show += round(bps / Math.pow(1000, 3), 2);
569
< 1000)) {                show += String.fromCharCode(160) + 'Gb/s';
576
< 1000)) {                show += String.fromCharCode(160) + 'Gb/s';
570
< 1000)) {            } else {
577
< 1000)) {            } else {
571
< 1000)) {                if (bps > Math.pow(1000, 2)) {
578
< 1000)) {                if (bps > Math.pow(1000, 2)) {
572
< 1000)) {                    show += round(bps / Math.pow(1000, 2), 2);
579
< 1000)) {                    show += round(bps / Math.pow(1000, 2), 2);
573
< 1000)) {                    show += String.fromCharCode(160) + 'Mb/s';
580
< 1000)) {                    show += String.fromCharCode(160) + 'Mb/s';
574
< 1000)) {                } else {
581
< 1000)) {                } else {
575
< 1000)) {                    if (bps > Math.pow(1000, 1)) {
582
< 1000)) {                    if (bps > Math.pow(1000, 1)) {
576
< 1000)) {                        show += round(bps / Math.pow(1000, 1), 2);
583
< 1000)) {                        show += round(bps / Math.pow(1000, 1), 2);
577
< 1000)) {                        show += String.fromCharCode(160) + 'Kb/s';
584
< 1000)) {                        show += String.fromCharCode(160) + 'Kb/s';
578
< 1000)) {                    } else {
585
< 1000)) {                    } else {
579
< 1000)) {                            show += bps;
586
< 1000)) {                            show += bps;
580
< 1000)) {                            show += String.fromCharCode(160) + 'b/s';
587
< 1000)) {                            show += String.fromCharCode(160) + 'b/s';
581
< 1000)) {                    }
588
< 1000)) {                    }
582
< 1000)) {                }
589
< 1000)) {                }
583
< 1000)) {            }
590
< 1000)) {            }
584
< 1000)) {        }
591
< 1000)) {        }
585
< 1000)) {    }
592
< 1000)) {    }
586
< 1000)) {    return show;
593
< 1000)) {    return show;
587
< 1000)) {}
594
< 1000)) {}
588
< 1000)) {
595
< 1000)) {
589
< 1000)) {/**
596
< 1000)) {/**
590
< 1000)) { * format a celcius temperature to fahrenheit and also append the right suffix
597
< 1000)) { * format a celcius temperature to fahrenheit and also append the right suffix
591
< 1000)) { * @param {String} degreeC temperature in celvius
598
< 1000)) { * @param {String} degreeC temperature in celvius
592
< 1000)) { * @param {jQuery} xml phpSysInfo-XML
599
< 1000)) { * @param {jQuery} xml phpSysInfo-XML
593
< 1000)) { * @return {String} html string with no breaking spaces and translation statements
600
< 1000)) { * @return {String} html string with no breaking spaces and translation statements
594
< 1000)) { */
601
< 1000)) { */
595
< 1000)) {function formatTemp(degreeC, xml) {
602
< 1000)) {function formatTemp(degreeC, xml) {
596
< 1000)) {    var tempFormat = "", degree = 0;
603
< 1000)) {    var tempFormat = "", degree = 0;
597
< 1000)) {
604
< 1000)) {
598
< 1000)) {    $("Options", xml).each(function getOptions(id) {
605
< 1000)) {    $("Options", xml).each(function getOptions(id) {
599
< 1000)) {        tempFormat = $(this).attr("tempFormat").toString().toLowerCase();
606
< 1000)) {        tempFormat = $(this).attr("tempFormat").toString().toLowerCase();
600
< 1000)) {    });
607
< 1000)) {    });
601
< 1000)) {
608
< 1000)) {
602
< 1000)) {    degree = parseFloat(degreeC);
609
< 1000)) {    degree = parseFloat(degreeC);
603
< 1000)) {    if (!isFinite(degreeC)) {
610
< 1000)) {    if (!isFinite(degreeC)) {
604
< 1000)) {        return "---";
611
< 1000)) {        return "---";
605
< 1000)) {    } else {
612
< 1000)) {    } else {
606
< 1000)) {        switch (tempFormat) {
613
< 1000)) {        switch (tempFormat) {
607
< 1000)) {        case "f":
614
< 1000)) {        case "f":
608
< 1000)) {            return round((((9 * degree) / 5) + 32), 1) + "&nbsp;" + genlang(61);
615
< 1000)) {            return round((((9 * degree) / 5) + 32), 1) + "&nbsp;" + genlang(61);
609
< 1000)) {        case "c":
616
< 1000)) {        case "c":
610
< 1000)) {            return round(degree, 1) + "&nbsp;" + genlang(60);
617
< 1000)) {            return round(degree, 1) + "&nbsp;" + genlang(60);
611
< 1000)) {        case "c-f":
618
< 1000)) {        case "c-f":
612
< 1000)) {            return round(degree, 1) + "&nbsp;" + genlang(60) + "<br><i>(" + round((((9 * degree) / 5) + 32), 1) + " " + genlang(61) + ")i>";
619
< 1000)) {            return round(degree, 1) + "&nbsp;" + genlang(60) + "<br><i>(" + round((((9 * degree) / 5) + 32), 1) + " " + genlang(61) + ")i>";
613
< 1000)) {        case "f-c":
620
< 1000)) {        case "f-c":
614
< 1000)) {            return round((((9 * degree) / 5) + 32), 1) + "&nbsp;" + genlang(61) + "<br><i>(" + round(degree, 1) + "&nbsp;" + genlang(60) + ")</i>";
621
< 1000)) {            return round((((9 * degree) / 5) + 32), 1) + "&nbsp;" + genlang(61) + "<br><i>(" + round(degree, 1) + "&nbsp;" + genlang(60) + ")</i>";
615
< 1000)) {        }
622
< 1000)) {        }
616
< 1000)) {    }
623
< 1000)) {    }
617
< 1000)) {}
624
< 1000)) {}
618
< 1000)) {
625
< 1000)) {
619
< 1000)) {/**
626
< 1000)) {/**
620
< 1000)) { * create a visual HTML bar from a given size, the layout of that bar can be costumized through the bar css-class
627
< 1000)) { * create a visual HTML bar from a given size, the layout of that bar can be costumized through the bar css-class
621
< 1000)) { * @param {Number} size barclass
628
< 1000)) { * @param {Number} size barclass
622
< 1000)) { * @return {String} HTML string which contains the full layout of the bar
629
< 1000)) { * @return {String} HTML string which contains the full layout of the bar
623
< 1000)) { */
630
< 1000)) { */
624
< 1000)) {function createBar(size, barclass) {
631
< 1000)) {function createBar(size, barclass, sizeused) {
-
 
632
< 1000)) {    var percsize = 0, percsizeused = 0;
625
< 1000)) {    if (barclass === undefined) {
633
< 1000)) {    if (barclass === undefined) {
626
< 1000)) {        barclass = "bar";
634
< 1000)) {        barclass = "bar";
627
< 1000)) {    }
635
< 1000)) {    }
-
 
636
< 1000)) {    percsize = Math.max(Math.min(Math.ceil(size), 100), 0);
-
 
637
< 1000)) {    if (sizeused === undefined) {
-
 
638
< 1000)) {        percsizeused = percsize;
-
 
639
< 1000)) {    } else {
-
 
640
< 1000)) {        percsizeused = Math.max(Math.min(Math.ceil(sizeused), size), 0);
-
 
641
< 1000)) {    }
-
 
642
< 1000)) {    if (percsizeused == percsize) {
628
< 1000)) {    return "
 div>&nbsp;" + size + "%";
643
< 1000)) {        return "
 div>&nbsp;" + size + "%";
-
 
644
< 1000)) {
} else {
-
 
645
< 1000)) {
return "<div class=\"" + barclass + "\" style=\"float:left; width: " + percsizeused + "px;\">&nbsp;</div><div class=\"barrest\" style=\"float:left; width: " + (percsize-percsizeused) + "px;\">&nbsp;</div>&nbsp;" + size + "%";
-
 
646
< 1000)) {
}
629
< 1000)) {
}
647
< 1000)) {
}
630
< 1000)) {
648
< 1000)) {
631
< 1000)) {
/**
649
< 1000)) {
/**
632
< 1000)) {
* (re)fill the vitals block with the values from the given xml
650
< 1000)) {
* (re)fill the vitals block with the values from the given xml
633
< 1000)) {
* @param {jQuery} xml phpSysInfo-XML
651
< 1000)) {
* @param {jQuery} xml phpSysInfo-XML
634
< 1000)) {
*/
652
< 1000)) {
*/
635
< 1000)) {
function refreshVitals(xml) {
653
< 1000)) {
function refreshVitals(xml) {
636
< 1000)) {
var hostname = "", ip = "", stripid = 0;
654
< 1000)) {
var hostname = "", ip = "", stripid = 0;
637
< 1000)) {
655
< 1000)) {
638
< 1000)) {
function setAndStrip(id, value) {
656
< 1000)) {
function setAndStrip(id, value) {
639
< 1000)) {
if (value !== "") {
657
< 1000)) {
if (value !== "") {
640
< 1000)) {
$(id).html(value);
658
< 1000)) {
$(id).html(value);
641
< 1000)) {
if (stripid%2 === 1) {
659
< 1000)) {
if (stripid%2 === 1) {
642
< 1000)) {
$(id).closest('tr').addClass('even');
660
< 1000)) {
$(id).closest('tr').addClass('even');
643
< 1000)) {
} else {
661
< 1000)) {
} else {
644
< 1000)) {
$(id).closest('tr').removeClass('even');
662
< 1000)) {
$(id).closest('tr').removeClass('even');
645
< 1000)) {
}
663
< 1000)) {
}
646
< 1000)) {
$(id).closest('tr').css("display", "");
664
< 1000)) {
$(id).closest('tr').css("display", "");
647
< 1000)) {
stripid++;
665
< 1000)) {
stripid++;
648
< 1000)) {
} else {
666
< 1000)) {
} else {
649
< 1000)) {
$(id).closest('tr').css("display", "none");
667
< 1000)) {
$(id).closest('tr').css("display", "none");
650
< 1000)) {
}
668
< 1000)) {
}
651
< 1000)) {
}
669
< 1000)) {
}
652
< 1000)) {
670
< 1000)) {
653
< 1000)) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('vitals', blocks) < 0))) {
671
< 1000)) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('vitals', blocks) < 0))) {
654
< 1000)) {
$("#vitals").remove();
672
< 1000)) {
$("#vitals").remove();
655
< 1000)) {
$("Vitals", xml).each(function getVitals(id) {
673
< 1000)) {
$("Vitals", xml).each(function getVitals(id) {
656
< 1000)) {
hostname = $(this).attr("Hostname");
674
< 1000)) {
hostname = $(this).attr("Hostname");
657
< 1000)) {
ip = $(this).attr("IPAddr");
675
< 1000)) {
ip = $(this).attr("IPAddr");
658
< 1000)) {
document.title = "System information: " + hostname + " (" + ip + ")";
676
< 1000)) {
document.title = "System information: " + hostname + " (" + ip + ")";
659
< 1000)) {
$("#s_hostname_title").html(hostname);
677
< 1000)) {
$("#s_hostname_title").html(hostname);
660
< 1000)) {
$("#s_ip_title").html(ip);
678
< 1000)) {
$("#s_ip_title").html(ip);
661
< 1000)) {
});
679
< 1000)) {
});
662
< 1000)) {
return;
680
< 1000)) {
return;
663
< 1000)) {
}
681
< 1000)) {
}
664
< 1000)) {
682
< 1000)) {
665
< 1000)) {
var kernel = "", distro = "", icon = "", uptime = "", users = 0, loadavg = "", os = "";
683
< 1000)) {
var kernel = "", distro = "", icon = "", uptime = "", users = 0, loadavg = "", os = "";
666
< 1000)) {
var processes = 0, prunning = 0, psleeping = 0, pstopped = 0, pzombie = 0, pwaiting = 0, pother = 0;
684
< 1000)) {
var processes = 0, psarray = [0,0,0,0,0,0];
667
< 1000)) {
var syslang = "", codepage = "";
685
< 1000)) {
var syslang = "", codepage = "";
668
< 1000)) {
var lastboot = 0;
686
< 1000)) {
var lastboot = 0;
669
< 1000)) {
var timestamp = parseInt($("Generation", xml).attr("timestamp"), 10)*1000; //server time
687
< 1000)) {
var timestamp = parseInt($("Generation", xml).attr("timestamp"), 10)*1000; //server time
670
< 1000)) {
var not_first = false;
688
< 1000)) {
var not_first = false;
671
< 1000)) {
var datetimeFormat = "";
689
< 1000)) {
var datetimeFormat = "";
672
< 1000)) {
if (isNaN(timestamp)) timestamp = Number(new Date()); //client time
690
< 1000)) {
if (isNaN(timestamp)) timestamp = Number(new Date()); //client time
673
< 1000)) {
691
< 1000)) {
674
< 1000)) {
$("Options", xml).each(function getDatetimeFormat(id) {
692
< 1000)) {
$("Options", xml).each(function getDatetimeFormat(id) {
675
< 1000)) {
datetimeFormat = $(this).attr("datetimeFormat");
693
< 1000)) {
datetimeFormat = $(this).attr("datetimeFormat");
676
< 1000)) {
});
694
< 1000)) {
});
677
< 1000)) {
695
< 1000)) {
678
< 1000)) {
$("Vitals", xml).each(function getVitals(id) {
696
< 1000)) {
$("Vitals", xml).each(function getVitals(id) {
679
< 1000)) {
hostname = $(this).attr("Hostname");
697
< 1000)) {
hostname = $(this).attr("Hostname");
680
< 1000)) {
ip = $(this).attr("IPAddr");
698
< 1000)) {
ip = $(this).attr("IPAddr");
681
< 1000)) {
kernel = $(this).attr("Kernel");
699
< 1000)) {
kernel = $(this).attr("Kernel");
682
< 1000)) {
distro = $(this).attr("Distro");
700
< 1000)) {
distro = $(this).attr("Distro");
683
< 1000)) {
icon = $(this).attr("Distroicon");
701
< 1000)) {
icon = $(this).attr("Distroicon");
684
< 1000)) {
os = $(this).attr("OS");
702
< 1000)) {
os = $(this).attr("OS");
685
< 1000)) {
uptime = formatUptime(parseInt($(this).attr("Uptime"), 10));
703
< 1000)) {
uptime = formatUptime(parseInt($(this).attr("Uptime"), 10));
686
< 1000)) {
lastboot = new Date(timestamp - (parseInt($(this).attr("Uptime"), 10)*1000));
704
< 1000)) {
lastboot = new Date(timestamp - (parseInt($(this).attr("Uptime"), 10)*1000));
687
< 1000)) {
users = parseInt($(this).attr("Users"), 10);
705
< 1000)) {
users = parseInt($(this).attr("Users"), 10);
688
< 1000)) {
loadavg = $(this).attr("LoadAvg");
706
< 1000)) {
loadavg = $(this).attr("LoadAvg");
689
< 1000)) {
if ($(this).attr("CPULoad") !== undefined) {
707
< 1000)) {
if ($(this).attr("CPULoad") !== undefined) {
690
< 1000)) {
loadavg = loadavg + "<br>" + createBar(parseInt($(this).attr("CPULoad"), 10));
708
< 1000)) {
loadavg = loadavg + "<br>" + createBar(parseInt($(this).attr("CPULoad"), 10));
691
< 1000)) {
}
709
< 1000)) {
}
692
< 1000)) {
if ($(this).attr("SysLang") !== undefined) {
710
< 1000)) {
if ($(this).attr("SysLang") !== undefined) {
693
< 1000)) {
syslang = $(this).attr("SysLang");
711
< 1000)) {
syslang = $(this).attr("SysLang");
694
< 1000)) {
}
712
< 1000)) {
}
695
< 1000)) {
713
< 1000)) {
696
< 1000)) {
if ($(this).attr("CodePage") !== undefined) {
714
< 1000)) {
if ($(this).attr("CodePage") !== undefined) {
697
< 1000)) {
codepage = $(this).attr("CodePage");
715
< 1000)) {
codepage = $(this).attr("CodePage");
698
< 1000)) {
}
716
< 1000)) {
}
699
< 1000)) {
717
< 1000)) {
700
< 1000)) {
//processes
718
< 1000)) {
//processes
701
< 1000)) {
if ($(this).attr("Processes") !== undefined) {
719
< 1000)) {
if ($(this).attr("Processes") !== undefined) {
702
< 1000)) {
processes = parseInt($(this).attr("Processes"), 10);
720
< 1000)) {
processes = parseInt($(this).attr("Processes"), 10);
703
< 1000)) {
}
721
< 1000)) {
}
704
< 1000)) {
if ($(this).attr("ProcessesRunning") !== undefined) {
722
< 1000)) {
if ($(this).attr("ProcessesRunning") !== undefined) {
705
< 1000)) {
prunning = parseInt($(this).attr("ProcessesRunning"), 10);
723
< 1000)) {
psarray[0] = parseInt($(this).attr("ProcessesRunning"), 10);
706
< 1000)) {
}
724
< 1000)) {
}
707
< 1000)) {
if ($(this).attr("ProcessesSleeping") !== undefined) {
725
< 1000)) {
if ($(this).attr("ProcessesSleeping") !== undefined) {
708
< 1000)) {
psleeping = parseInt($(this).attr("ProcessesSleeping"), 10);
726
< 1000)) {
psarray[1] = parseInt($(this).attr("ProcessesSleeping"), 10);
709
< 1000)) {
}
727
< 1000)) {
}
710
< 1000)) {
if ($(this).attr("ProcessesStopped") !== undefined) {
728
< 1000)) {
if ($(this).attr("ProcessesStopped") !== undefined) {
711
< 1000)) {
pstopped = parseInt($(this).attr("ProcessesStopped"), 10);
729
< 1000)) {
psarray[2] = parseInt($(this).attr("ProcessesStopped"), 10);
712
< 1000)) {
}
730
< 1000)) {
}
713
< 1000)) {
if ($(this).attr("ProcessesZombie") !== undefined) {
731
< 1000)) {
if ($(this).attr("ProcessesZombie") !== undefined) {
714
< 1000)) {
pzombie = parseInt($(this).attr("ProcessesZombie"), 10);
732
< 1000)) {
psarray[3] = parseInt($(this).attr("ProcessesZombie"), 10);
715
< 1000)) {
}
733
< 1000)) {
}
716
< 1000)) {
if ($(this).attr("ProcessesWaiting") !== undefined) {
734
< 1000)) {
if ($(this).attr("ProcessesWaiting") !== undefined) {
717
< 1000)) {
pwaiting = parseInt($(this).attr("ProcessesWaiting"), 10);
735
< 1000)) {
psarray[4] = parseInt($(this).attr("ProcessesWaiting"), 10);
718
< 1000)) {
}
736
< 1000)) {
}
719
< 1000)) {
if ($(this).attr("ProcessesOther") !== undefined) {
737
< 1000)) {
if ($(this).attr("ProcessesOther") !== undefined) {
720
< 1000)) {
pother = parseInt($(this).attr("ProcessesOther"), 10);
738
< 1000)) {
psarray[5] = parseInt($(this).attr("ProcessesOther"), 10);
721
< 1000)) {
}
739
< 1000)) {
}
722
< 1000)) {
740
< 1000)) {
723
< 1000)) {
document.title = "System information: " + hostname + " (" + ip + ")";
741
< 1000)) {
document.title = "System information: " + hostname + " (" + ip + ")";
724
< 1000)) {
$("#s_hostname_title").html(hostname);
742
< 1000)) {
$("#s_hostname_title").html(hostname);
725
< 1000)) {
$("#s_ip_title").html(ip);
743
< 1000)) {
$("#s_ip_title").html(ip);
726
< 1000)) {
setAndStrip("#s_hostname", hostname);
744
< 1000)) {
setAndStrip("#s_hostname", hostname);
727
< 1000)) {
setAndStrip("#s_ip", ip);
745
< 1000)) {
setAndStrip("#s_ip", ip);
728
< 1000)) {
setAndStrip("#s_kernel", kernel);
746
< 1000)) {
setAndStrip("#s_kernel", kernel);
729
< 1000)) {
setAndStrip("#s_distro", "<img src='./gfx/images/" + icon + "' alt='Icon' title='' style='width:16px;height:16px;vertical-align:middle;' onload='PNGload($(this));' /> " + distro); //onload IE6 PNG fix
747
< 1000)) {
setAndStrip("#s_distro", "<img src='./gfx/images/" + icon + "' alt='Icon' title='" + icon + "' style='width:16px;height:16px;vertical-align:middle;' onload='PNGload($(this));' />&nbsp;" + distro); //onload IE6 PNG fix
730
< 1000)) {
setAndStrip("#s_os", "</FONT></B>OSIcon<B><FONT COLOR="#BC8F8F">
748
< 1000)) {
setAndStrip("#s_os", "<img src='./gfx/images/" + os + ".png' alt='OSIcon' title='" + os + ".png' style='width:16px;height:16px;vertical-align:middle;' onload='PNGload($(this));' />&nbsp;" + os); //onload IE6 PNG fix
731
< 1000)) {
if ((datetimeFormat !== undefined) && (datetimeFormat.toLowerCase() === "locale")) {
750
< 1000)) {
if ((datetimeFormat !== undefined) && (datetimeFormat.toLowerCase() === "locale")) {
733
< 1000)) {
} else {
752
< 1000)) {
} else {
735
< 1000)) {
setAndStrip("#s_lastboot", lastboot.toUTCString());
754
< 1000)) {
setAndStrip("#s_lastboot", lastboot.toUTCString());
737
< 1000)) {
//deprecated
756
< 1000)) {
//deprecated
739
< 1000)) {
}
758
< 1000)) {
}
741
< 1000)) {
setAndStrip("#s_users", users);
760
< 1000)) {
setAndStrip("#s_users", users);
743
< 1000)) {
setAndStrip("#s_syslang", syslang);
762
< 1000)) {
setAndStrip("#s_syslang", syslang);
745
< 1000)) {
setAndStrip("#s_processes", processes);
764
< 1000)) {
setAndStrip("#s_processes", processes);
747
< 1000)) {
$("#s_processes").append(" (");
766
< 1000)) {
$("#s_processes").append(" (");
749
< 1000)) {
for (var proc_type in typelist) {
768
< 1000)) {
for (var proc_type in idlist) {
751
< 1000)) {
if (not_first) {
770
< 1000)) {
if (not_first) {
753
< 1000)) {
}
772
< 1000)) {
}
755
< 1000)) {
not_first = true;
774
< 1000)) {
not_first = true;
757
< 1000)) {
}
776
< 1000)) {
}
759
< 1000)) {
}
778
< 1000)) {
}
761
< 1000)) {
}
780
< 1000)) {
}
763
< 1000)) {
782
< 1000)) {
765
< 1000)) {
* build the cpu information as table rows
784
< 1000)) {
* build the cpu information as table rows
767
< 1000)) {
* @param {Array} tree array that holds the positions for treetable plugin
786
< 1000)) {
* @param {Array} tree array that holds the positions for treetable plugin
769
< 1000)) {
* @param {Array} collapsed array that holds all collapsed elements hwne opening page
788
< 1000)) {
* @param {Array} collapsed array that holds all collapsed elements hwne opening page
771
< 1000)) {
function fillCpu(xml, tree, rootposition, collapsed) {
790
< 1000)) {
function fillCpu(xml, tree, rootposition, collapsed) {
773
< 1000)) {
$("Hardware CPU CpuCore", xml).each(function getCpuCore(cpuCoreId) {
792
< 1000)) {
$("Hardware CPU CpuCore", xml).each(function getCpuCore(cpuCoreId) {
775
< 1000)) {
cpucount++;
794
< 1000)) {
cpucount++;
777
< 1000)) {
voltage = parseFloat($(this).attr("Voltage"));
796
< 1000)) {
voltage = parseFloat($(this).attr("Voltage"));
779
< 1000)) {
speedmax = parseInt($(this).attr("CpuSpeedMax"), 10);
798
< 1000)) {
speedmax = parseInt($(this).attr("CpuSpeedMax"), 10);
781
< 1000)) {
cache = parseInt($(this).attr("Cache"), 10);
800
< 1000)) {
cache = parseInt($(this).attr("Cache"), 10);
783
< 1000)) {
bus = parseInt($(this).attr("BusSpeed"), 10);
802
< 1000)) {
bus = parseInt($(this).attr("BusSpeed"), 10);
785
< 1000)) {
bogo = parseInt($(this).attr("Bogomips"), 10);
804
< 1000)) {
bogo = parseInt($(this).attr("Bogomips"), 10);
787
< 1000)) {
load = parseInt($(this).attr("Load"), 10);
806
< 1000)) {
load = parseInt($(this).attr("Load"), 10);
789
< 1000)) {
if (!showCPUListExpanded) {
808
< 1000)) {
if (!showCPUListExpanded) {
791
< 1000)) {
}
810
< 1000)) {
}
793
< 1000)) {
html += "<tr><td style=\"width:68%\"><div class=\"treediv\"><span class=\"treespan\">" + model + "</span></div></td><td>" + createBar(load) + "</td></tr>\n";
812
< 1000)) {
html += "<tr><td style=\"width:68%\"><div class=\"treediv\"><span class=\"treespan\">" + model + "</span></div></td><td>" + createBar(load) + "</td></tr>\n";
795
< 1000)) {
html += "<tr><td colspan=\"2\"><div class=\"treediv\"><span class=\"treespan\">" + model + "</span></div></td></tr>\n";
814
< 1000)) {
html += "<tr><td colspan=\"2\"><div class=\"treediv\"><span class=\"treespan\">" + model + "</span></div></td></tr>\n";
797
< 1000)) {
cpucoreposition = tree.push(rootposition);
816
< 1000)) {
cpucoreposition = tree.push(rootposition);
799
< 1000)) {
collapsed.push(cpucoreposition);
818
< 1000)) {
collapsed.push(cpucoreposition);
801
< 1000)) {
if (!isNaN(speed)) {
820
< 1000)) {
if (!isNaN(speed)) {
803
< 1000)) {
tree.push(cpucoreposition);
822
< 1000)) {
tree.push(cpucoreposition);
805
< 1000)) {
if (!isNaN(speedmax)) {
824
< 1000)) {
if (!isNaN(speedmax)) {
807
< 1000)) {
tree.push(cpucoreposition);
826
< 1000)) {
tree.push(cpucoreposition);
809
< 1000)) {
if (!isNaN(speedmin)) {
828
< 1000)) {
if (!isNaN(speedmin)) {
811
< 1000)) {
tree.push(cpucoreposition);
830
< 1000)) {
tree.push(cpucoreposition);
813
< 1000)) {
if (!isNaN(cache)) {
832
< 1000)) {
if (!isNaN(cache)) {
815
< 1000)) {
tree.push(cpucoreposition);
834
< 1000)) {
tree.push(cpucoreposition);
817
< 1000)) {
if (virt !== undefined) {
836
< 1000)) {
if (virt !== undefined) {
819
< 1000)) {
tree.push(cpucoreposition);
838
< 1000)) {
tree.push(cpucoreposition);
821
< 1000)) {
if (!isNaN(bus)) {
840
< 1000)) {
if (!isNaN(bus)) {
823
< 1000)) {
tree.push(cpucoreposition);
842
< 1000)) {
tree.push(cpucoreposition);
825
< 1000)) {
if (isFinite(voltage)) {
844
< 1000)) {
if (isFinite(voltage)) {
827
< 1000)) {
tree.push(cpucoreposition);
846
< 1000)) {
tree.push(cpucoreposition);
829
< 1000)) {
if (!isNaN(bogo)) {
848
< 1000)) {
if (!isNaN(bogo)) {
831
< 1000)) {
tree.push(cpucoreposition);
850
< 1000)) {
tree.push(cpucoreposition);
833
< 1000)) {
/*
852
< 1000)) {
/*
835
< 1000)) {
html += "<tr><td style=\"width:68%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(51) + ":</span></div></td><td>" + formatTemp(temp, xml) + "</td></tr>\n";
854
< 1000)) {
html += "<tr><td style=\"width:68%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(51) + ":</span></div></td><td>" + formatTemp(temp, xml) + "</td></tr>\n";
837
< 1000)) {
}
856
< 1000)) {
}
839
< 1000)) {
if (manufacturer !== undefined) {
858
< 1000)) {
if (manufacturer !== undefined) {
841
< 1000)) {
tree.push(cpucoreposition);
860
< 1000)) {
tree.push(cpucoreposition);
843
< 1000)) {
if (!isNaN(load) && !showCPULoadCompact) {
862
< 1000)) {
if (!isNaN(load) && !showCPULoadCompact) {
845
< 1000)) {
tree.push(cpucoreposition);
864
< 1000)) {
tree.push(cpucoreposition);
847
< 1000)) {
});
866
< 1000)) {
});
849
< 1000)) {
html += "<tr><td colspan=\"2\">" + genlang(42) + "</td></tr>\n";
868
< 1000)) {
html += "<tr><td colspan=\"2\">" + genlang(42) + "</td></tr>\n";
851
< 1000)) {
}
870
< 1000)) {
}
853
< 1000)) {
}
872
< 1000)) {
}
855
< 1000)) {
function countCpu(xml) {
874
< 1000)) {
function countCpu(xml) {
857
< 1000)) {
$("Hardware CPU CpuCore", xml).each(function getCpuCore(cpuCoreId) {
876
< 1000)) {
$("Hardware CPU CpuCore", xml).each(function getCpuCore(cpuCoreId) {
859
< 1000)) {
});
878
< 1000)) {
});
861
< 1000)) {
}
880
< 1000)) {
}
863
< 1000)) {
/**
882
< 1000)) {
/**
865
< 1000)) {
* @param {jQuery} xml phpSysInfo-XML
884
< 1000)) {
* @param {jQuery} xml phpSysInfo-XML
867
< 1000)) {
* @param {Array} tree array that holds the positions for treetable plugin
886
< 1000)) {
* @param {Array} tree array that holds the positions for treetable plugin
869
< 1000)) {
*/
888
< 1000)) {
*/
871
< 1000)) {
var devicecount = 0, html = "";
890
< 1000)) {
var devicecount = 0, html = "";
873
< 1000)) {
var name = "", count = 0, capacity = 0, manufacturer = "", product = "", serial = "", speed = 0, voltage = 0, devcoreposition = 0;
892
< 1000)) {
var name = "", count = 0, capacity = 0, manufacturer = "", product = "", serial = "", speed = 0, voltage = 0, devcoreposition = 0;
875
< 1000)) {
devicecount++;
894
< 1000)) {
devicecount++;
877
< 1000)) {
capacity = parseInt($(this).attr("Capacity"), 10);
896
< 1000)) {
capacity = parseInt($(this).attr("Capacity"), 10);
879
< 1000)) {
product = $(this).attr("Product");
898
< 1000)) {
product = $(this).attr("Product");
881
< 1000)) {
voltage = parseFloat($(this).attr("Voltage"));
900
< 1000)) {
voltage = parseFloat($(this).attr("Voltage"));
883
< 1000)) {
count = parseInt($(this).attr("Count"), 10);
902
< 1000)) {
count = parseInt($(this).attr("Count"), 10);
885
< 1000)) {
name = "(" + count + "x) " + name;
904
< 1000)) {
name = "(" + count + "x) " + name;
887
< 1000)) {
html += "<tr><td colspan=\"2\"><div class=\"treediv\"><span class=\"treespan\">" + name + "</span></div></td></tr>\n";
906
< 1000)) {
html += "<tr><td colspan=\"2\"><div class=\"treediv\"><span class=\"treespan\">" + name + "</span></div></td></tr>\n";
889
< 1000)) {
if (!isNaN(capacity)) {
908
< 1000)) {
if (!isNaN(capacity)) {
891
< 1000)) {
tree.push(devcoreposition);
910
< 1000)) {
tree.push(devcoreposition);
893
< 1000)) {
if (manufacturer!== undefined) {
912
< 1000)) {
if (manufacturer!== undefined) {
895
< 1000)) {
tree.push(devcoreposition);
914
< 1000)) {
tree.push(devcoreposition);
897
< 1000)) {
if (product !== undefined) {
916
< 1000)) {
if (product !== undefined) {
899
< 1000)) {
tree.push(devcoreposition);
918
< 1000)) {
tree.push(devcoreposition);
901
< 1000)) {
if (!isNaN(speed)) {
920
< 1000)) {
if (!isNaN(speed)) {
903
< 1000)) {
tree.push(devcoreposition);
922
< 1000)) {
tree.push(devcoreposition);
905
< 1000)) {
if (isFinite(voltage)) {
924
< 1000)) {
if (isFinite(voltage)) {
907
< 1000)) {
tree.push(devcoreposition);
926
< 1000)) {
tree.push(devcoreposition);
909
< 1000)) {
if (serial !== undefined) {
928
< 1000)) {
if (serial !== undefined) {
911
< 1000)) {
tree.push(devcoreposition);
930
< 1000)) {
tree.push(devcoreposition);
913
< 1000)) {
});
932
< 1000)) {
});
915
< 1000)) {
html += "<tr><td colspan=\"2\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(42) + "</span></div></td></tr>\n";
934
< 1000)) {
html += "<tr><td colspan=\"2\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(42) + "</span></div></td></tr>\n";
917
< 1000)) {
}
936
< 1000)) {
}
919
< 1000)) {
}
938
< 1000)) {
}
921
< 1000)) {
function countHWDevice(xml, type) {
940
< 1000)) {
function countHWDevice(xml, type) {
923
< 1000)) {
$("Hardware " + type + ((type=="MEM")?" Chip":" Device"), xml).each(function getHWDevice(deviceId) {
942
< 1000)) {
$("Hardware " + type + ((type=="MEM")?" Chip":" Device"), xml).each(function getHWDevice(deviceId) {
925
< 1000)) {
});
944
< 1000)) {
});
927
< 1000)) {
}
946
< 1000)) {
}
929
< 1000)) {
/**
948
< 1000)) {
/**
931
< 1000)) {
* @param {jQuery} xml phpSysInfo-XML
950
< 1000)) {
* @param {jQuery} xml phpSysInfo-XML
933
< 1000)) {
function refreshHardware(xml) {
952
< 1000)) {
function refreshHardware(xml) {
935
< 1000)) {
hardware', blocks) < 0))) {
953
< 1000)) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('hardware', blocks) < 0))) {
936
< 1000)) {
return;
955
< 1000)) {
return;
938
< 1000)) {
957
< 1000)) {
940
< 1000)) {
$("#hardware").empty();
959
< 1000)) {
$("#hardware").empty();
942
< 1000)) {
html += " <div style=\"overflow-x:auto;\">\n";
961
< 1000)) {
html += " <div style=\"overflow-x:auto;\">\n";
944
< 1000)) {
html += " <tbody class=\"tree\">\n";
963
< 1000)) {
html += " <tbody class=\"tree\">\n";
946
< 1000)) {
$("Hardware", xml).each(function getMachine(id) {
965
< 1000)) {
$("Hardware", xml).each(function getMachine(id) {
948
< 1000)) {
});
967
< 1000)) {
});
950
< 1000)) {
virtualizer = $(this).attr("Virtualizer");
969
< 1000)) {
virtualizer = $(this).attr("Virtualizer");
952
< 1000)) {
971
< 1000)) {
954
< 1000)) {
html += " <tr><td colspan=\"2\"><div class=\"treediv\"><span class=\"treespanbold\">" + genlang(107) + "</span></div></td></tr>\n";
973
< 1000)) {
html += " <tr><td colspan=\"2\"><div class=\"treediv\"><span class=\"treespanbold\">" + genlang(107) + "</span></div></td></tr>\n";
956
< 1000)) {
tree.push(tree.push(0));
975
< 1000)) {
tree.push(tree.push(0));
958
< 1000)) {
977
< 1000)) {
960
< 1000)) {
html += " <tr><td colspan=\"2\"><div class=\"treediv\"><span class=\"treespanbold\">" + genlang(134) + "</span></div></td></tr>\n";
979
< 1000)) {
html += " <tr><td colspan=\"2\"><div class=\"treediv\"><span class=\"treespanbold\">" + genlang(134) + "</span></div></td></tr>\n";
962
< 1000)) {
tree.push(tree.push(0));
981
< 1000)) {
tree.push(tree.push(0));
964
< 1000)) {
if (countCpu(xml)) {
983
< 1000)) {
if (countCpu(xml)) {
966
< 1000)) {
html += fillCpu(xml, tree, tree.push(0), closed);
985
< 1000)) {
html += fillCpu(xml, tree, tree.push(0), closed);
968
< 1000)) {
987
< 1000)) {
970
< 1000)) {
for (var dev_type in typelist) {
989
< 1000)) {
for (var dev_type in typelist) {
972
< 1000)) {
html += " <tr><td colspan=\"2\"><div class=\"treediv\"><span class=\"treespanbold\">" + genlang(typelist[dev_type]) + "</span></div></td></tr>\n";
991
< 1000)) {
html += " <tr><td colspan=\"2\"><div class=\"treediv\"><span class=\"treespanbold\">" + genlang(typelist[dev_type]) + "</span></div></td></tr>\n";
974
< 1000)) {
closed.push(index);
993
< 1000)) {
closed.push(index);
976
< 1000)) {
}
995
< 1000)) {
}
978
< 1000)) {
997
< 1000)) {
980
< 1000)) {
html += " </table>\n";
999
< 1000)) {
html += " </table>\n";
982
< 1000)) {
$("#hardware").append(html);
1001
< 1000)) {
$("#hardware").append(html);
984
< 1000)) {
$("#HardwareTree").jqTreeTable(tree, {
1003
< 1000)) {
$("#HardwareTree").jqTreeTable(tree, {
986
< 1000)) {
shutImg: "./gfx/treeTable/tv-expandable.gif",
1005
< 1000)) {
shutImg: "./gfx/treeTable/tv-expandable.gif",
988
< 1000)) {
lastOpenImg: "./gfx/treeTable/tv-collapsable-last.gif",
1007
< 1000)) {
lastOpenImg: "./gfx/treeTable/tv-collapsable-last.gif",
990
< 1000)) {
lastLeafImg: "./gfx/treeTable/tv-item-last.gif",
1009
< 1000)) {
lastLeafImg: "./gfx/treeTable/tv-item-last.gif",
992
< 1000)) {
blankImg: "./gfx/treeTable/blank.gif",
1011
< 1000)) {
blankImg: "./gfx/treeTable/blank.gif",
994
< 1000)) {
column: 0,
1013
< 1000)) {
column: 0,
996
< 1000)) {
highlight: false,
1015
< 1000)) {
highlight: false,
998
< 1000)) {
});
1017
< 1000)) {
});
1000
< 1000)) {
1019
< 1000)) {
1002
< 1000)) {
*(re)fill the network block with the values from the given xml
1021
< 1000)) {
*(re)fill the network block with the values from the given xml
1004
< 1000)) {
*/
1023
< 1000)) {
*/
1006
< 1000)) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {
1025
< 1000)) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {
1008
< 1000)) {
return;
1027
< 1000)) {
return;
1010
< 1000)) {
1029
< 1000)) {
1012
< 1000)) {
1031
< 1000)) {
1014
< 1000)) {
1033
< 1000)) {
1016
< 1000)) {
1035
< 1000)) {
1018
< 1000)) {
html1 += " <tr>\n";
1037
< 1000)) {
html1 += " <tr>\n";
1020
< 1000)) {
html1 += " <th class=\"right\" style=\"width:17.7%;\">" + genlang(23) + "</th>\n";
1039
< 1000)) {
html1 += " <th class=\"right\" style=\"width:17.7%;\">" + genlang(23) + "</th>\n";
1022
< 1000)) {
html1 += " <th class=\"right\" style=\"width:17.7%;\">" + genlang(25) + "</th>\n";
1041
< 1000)) {
html1 += " <th class=\"right\" style=\"width:17.7%;\">" + genlang(25) + "</th>\n";
1024
< 1000)) {
html1 += " </thead>\n";
1043
< 1000)) {
html1 += " </thead>\n";
1026
< 1000)) {
if (showNetworkActiveSpeed) {
1045
< 1000)) {
if (showNetworkActiveSpeed) {
1028
< 1000)) {
timestamp = $(this).attr("timestamp");
1047
< 1000)) {
timestamp = $(this).attr("timestamp");
1030
< 1000)) {
}
1049
< 1000)) {
}
1032
< 1000)) {
$("Network NetDevice", xml).each(function getDevice(id) {
1051
< 1000)) {
$("Network NetDevice", xml).each(function getDevice(id) {
1034
< 1000)) {
', htmltx = '', rxr = 0, txr = 0;
1052
< 1000)) {
var name = "", rx = 0, tx = 0, er = 0, dr = 0, info = "", bridge = "", networkindex = 0, htmlrx = '', htmltx = '', rxr = 0, txr = 0;
1035
< 1000)) {
rx = parseInt($(this).attr("RxBytes"), 10);
1055
< 1000)) {
rx = parseInt($(this).attr("RxBytes"), 10);
1037
< 1000)) {
er = parseInt($(this).attr("Err"), 10);
1057
< 1000)) {
er = parseInt($(this).attr("Err"), 10);
1039
< 1000)) {
rxr = parseInt($(this).attr("RxRate"), 10);
1059
< 1000)) {
rxr = parseInt($(this).attr("RxRate"), 10);
1041
< 1000)) {
1061
< 1000)) {
1043
< 1000)) {
if ((rx == 0) && !isNaN(rxr)) {
1063
< 1000)) {
if ((rx == 0) && !isNaN(rxr)) {
1045
< 1000)) {
htmlrx ="<br><i>("+formatBPS(round(rxr, 2))+")</i>";
1065
< 1000)) {
htmlrx ="<br><i>("+formatBPS(round(rxr, 2))+")</i>";
1047
< 1000)) {
htmlrx ="<br><i>("+formatBytes(round(rxr, 2), xml)+"/s)</i>";
1067
< 1000)) {
htmlrx ="<br><i>("+formatBytes(round(rxr, 2), xml)+"/s)</i>";
1049
< 1000)) {
} else if ($.inArray(name, oldnetwork) >= 0) {
1069
< 1000)) {
} else if ($.inArray(name, oldnetwork) >= 0) {
1051
< 1000)) {
if (((diff = rx - oldnetwork[name].rx) > 0) && ((difftime = timestamp - oldnetwork[name].timestamp) > 0)) {
1071
< 1000)) {
if (((diff = rx - oldnetwork[name].rx) > 0) && ((difftime = timestamp - oldnetwork[name].timestamp) > 0)) {
1053
< 1000)) {
htmlrx ="<br><i>("+formatBPS(round(8*diff/difftime, 2))+")</i>";
1073
< 1000)) {
htmlrx ="<br><i>("+formatBPS(round(8*diff/difftime, 2))+")i>";
1055
< 1000)) {
htmlrx ="<br><i>("+formatBytes(round(diff/difftime, 2), xml)+"/s)</i>";
1075
< 1000)) {
htmlrx ="<br><i>("+formatBytes(round(diff/difftime, 2), xml)+"/s)i>";
1057
< 1000)) {
}
1077
< 1000)) {
}
1059
< 1000)) {
if ((tx == 0) && !isNaN(txr)) {
1079
< 1000)) {
if ((tx == 0) && !isNaN(txr)) {
1061
< 1000)) {
htmltx ="<br><i>("+formatBPS(round(txr, 2))+")</i>";
1081
< 1000)) {
htmltx ="<br><i>("+formatBPS(round(txr, 2))+")</i>";
1063
< 1000)) {
htmltx ="<br><i>("+formatBytes(round(txr, 2), xml)+"/s)</i>";
1083
< 1000)) {
htmltx ="
("+formatBytes(round(txr, 2), xml)+"/
s)</i>";
1065
< 1000)) {
} else if ($.inArray(name, oldnetwork) >= 0) {
1085
< 1000)) {

} else if ($.inArray(name, oldnetwork) >= 0) {
1067
< 1000)) {
if (showNetworkActiveSpeed == 2) {
1087
< 1000)) {

if (showNetworkActiveSpeed == 2) {
1069
< 1000)) {
} else {
1089
< 1000)) {


} else {

1071
< 1000)) {
}
1091
< 1000)) {


}

1073
< 1000)) {
}
1093
< 1000)) {


}

1075
< 1000)) {
1095
< 1000)) {




-
 
1096
< 1000)) {


if ( (bridge !== undefined) && (bridge !== "") ) {

1077
< 1000)) {
1099
< 1000)) {


html +="<tr><td><div class=\"treediv\"><span class=\"treespan\">" + name + "</span></div></td><td class=\"right\">" + formatBytes(rx, xml) + htmlrx + "</td><td class=\"right\">" + formatBytes(tx, xml) + htmltx +"</td><td class=\"right\">" + er.toString() + "/<wbr>" + dr.toString() + "</td></tr>";
-
 
1100
< 1000)) {


}
1079
< 1000)) {
1102
< 1000)) {


1081
< 1000)) {
preoldnetwork.pushIfNotExist(name);
1104
< 1000)) {


preoldnetwork.pushIfNotExist(name);
1083
< 1000)) {
}
1106
< 1000)) {


}
1085
< 1000)) {
info = $(this).attr("Info");
1108
< 1000)) {


info = $(this).attr("Info");
1087
< 1000)) {
var i = 0, infos = info.replace(/:/g, "<wbr>:").split(";"); /* split long addresses */
1110
< 1000)) {


var i = 0, infos = info.replace(/:/g, "<wbr>:").split(";"); /* split long addresses */
1089
< 1000)) {
for(i = 0; i < infos.length; i++){
1112
< 1000)) {


for(i = 0; i < infos.length; i++){
1091
< 1000)) {
tree.push(networkindex);
1114
< 1000)) {


tree.push(networkindex);
1093
< 1000)) {
if (!showNetworkInfosExpanded) {
1116
< 1000)) {


if (!showNetworkInfosExpanded) {
1095
< 1000)) {
}
1118
< 1000)) {


}
1097
< 1000)) {
});
1120
< 1000)) {


});
1099
< 1000)) {
html += " </table>\n";
1122
< 1000)) {


html += " </table>\n";
1101
< 1000)) {
html0 += "<div style=\"overflow-x:auto;\">\n";
1124
< 1000)) {


html0 += "<div style=\"overflow-x:auto;\">\n";
1103
< 1000)) {
html0 += " <table id=\"NetworkTree\" class=\"tablemain\">\n";
1126
< 1000)) {


html0 += " <table id=\"NetworkTree\" class=\"tablemain\">\n";
1105
< 1000)) {
} else {
1128
< 1000)) {


} else {
1107
< 1000)) {
html1 += " <tbody class=\"tbody_network\">\n";
1130
< 1000)) {


html1 += " <tbody class=\"tbody_network\">\n";
1109
< 1000)) {
$("#network").append(html0+html1+html);
1132
< 1000)) {


$("#network").append(html0+html1+html);
1111
< 1000)) {
if (isinfo) $("#NetworkTree").jqTreeTable(tree, {
1134
< 1000)) {


if (isinfo) $("#NetworkTree").jqTreeTable(tree, {
1113
< 1000)) {
shutImg: "./gfx/treeTable/tv-expandable.gif",
1136
< 1000)) {


shutImg: "./gfx/treeTable/tv-expandable.gif",
1115
< 1000)) {
lastOpenImg: "./gfx/treeTable/tv-collapsable-last.gif",
1138
< 1000)) {


lastOpenImg: "./gfx/treeTable/tv-collapsable-last.gif",
1117
< 1000)) {
lastLeafImg: "./gfx/treeTable/tv-item-last.gif",
1140
< 1000)) {


lastLeafImg: "./gfx/treeTable/tv-item-last.gif",
1119
< 1000)) {
blankImg: "./gfx/treeTable/blank.gif",
1142
< 1000)) {


blankImg: "./gfx/treeTable/blank.gif",
1121
< 1000)) {
column: 0,
1144
< 1000)) {


column: 0,
1123
< 1000)) {
highlight: false,
1146
< 1000)) {


highlight: false,
1125
< 1000)) {
});
1148
< 1000)) {


});
1127
< 1000)) {
if (showNetworkActiveSpeed) {
1150
< 1000)) {


if (showNetworkActiveSpeed) {
1129
< 1000)) {
delete oldnetwork[oldnetwork.length-1]; //remove last object
1152
< 1000)) {


delete oldnetwork[oldnetwork.length-1]; //remove last object
1131
< 1000)) {
}
1154
< 1000)) {


}
1133
< 1000)) {
}
1156
< 1000)) {


}
1135
< 1000)) {
1158
< 1000)) {


1137
< 1000)) {
* (re)fill the memory block with the values from the given xml
1160
< 1000)) {


* (re)fill the memory block with the values from the given xml
1139
< 1000)) {
*/
1162
< 1000)) {


*/
1141
< 1000)) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('memory', blocks) < 0))) {
1164
< 1000)) {


if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('memory', blocks) < 0))) {
1143
< 1000)) {
return;
1166
< 1000)) {


return;
1145
< 1000)) {
1168
< 1000)) {


1147
< 1000)) {
1170
< 1000)) {


1149
< 1000)) {
html += "<h2>" + genlang(27) + "</h2>\n";
1172
< 1000)) {


html += "<h2>" + genlang(27) + "</h2>\n";
1151
< 1000)) {
html += " <table id=\"MemoryTree\" class=\"tablemain\">\n";
1174
< 1000)) {


html += " <table id=\"MemoryTree\" class=\"tablemain\">\n";
1153
< 1000)) {
html += " <tr>\n";
1176
< 1000)) {


html += " <tr>\n";
1155
< 1000)) {
html += " <th style=\"width:33.3%;\">" + genlang(33) + "</th>\n";
1178
< 1000)) {


html += " <th style=\"width:33.3%;\">" + genlang(33) + "</th>\n";
1157
< 1000)) {
html += " <th class=\"right\" style=\"width:14.2%;\">" + genlang(36) + "</th>\n";
1180
< 1000)) {


html += " <th class=\"right\" style=\"width:14.2%;\">" + genlang(36) + "</th>\n";
1159
< 1000)) {
html += " </tr>\n";
1182
< 1000)) {


html += " </tr>\n";
1161
< 1000)) {
html += " <tbody class=\"tree\">\n";
1184
< 1000)) {


html += " <tbody class=\"tree\">\n";
1163
< 1000)) {
$("Memory", xml).each(function getMemory(id) {
1186
< 1000)) {


$("Memory", xml).each(function getMemory(id) {
1165
< 1000)) {
free = parseInt($(this).attr("Free"), 10);
1188
< 1000)) {


free = parseInt($(this).attr("Free"), 10);
1167
< 1000)) {
total = parseInt($(this).attr("Total"), 10);
1190
< 1000)) {


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


html += "<tr><td><div class=\"treediv\"><span class=\"treespan\">" + genlang(28) + "</span></div></td><td>" + createBar(percent) + "</td><td class=\"right\">" + formatBytes(free, xml) + "</td><td class=\"right\">" + formatBytes(used, xml) + "</td><td class=\"right\">" + formatBytes(total, xml) + "</td></tr>";
1171
< 1000)) {
1194
< 1000)) {


1173
< 1000)) {
var app = 0, appp = 0, buff = 0, buffp = 0, cached = 0, cachedp = 0;
1196
< 1000)) {


var app = 0, appp = 0, buff = 0, buffp = 0, cached = 0, cachedp = 0;
1175
< 1000)) {
appp = parseInt($(this).attr("AppPercent"), 10);
1198
< 1000)) {


appp = parseInt($(this).attr("AppPercent"), 10);
1177
< 1000)) {
buffp = parseInt($(this).attr("BuffersPercent"), 10);
1200
< 1000)) {


buffp = parseInt($(this).attr("BuffersPercent"), 10);
1179
< 1000)) {
cachedp = parseInt($(this).attr("CachedPercent"), 10);
1202
< 1000)) {


cachedp = parseInt($(this).attr("CachedPercent"), 10);
1181
< 1000)) {
html += "<tr><td><div class=\"treediv\"><span class=\"treespan\">" + genlang(64) + "</span></div></td><td>" + createBar(appp) + "</td><td class=\"right\">&nbsp;</td><td class=\"right\">" + formatBytes(app, xml) + "</td><td class=\"right\">&nbsp;</td></tr>";
1204
< 1000)) {


html += "<tr><td><div class=\"treediv\"><span class=\"treespan\">" + genlang(64) + "</span></div></td><td>" + createBar(appp) + "</td><td class=\"right\">&nbsp;</td><td class=\"right\">" + formatBytes(app, xml) + "</td><td class=\"right\">&nbsp;</td></tr>";
1183
< 1000)) {
}
1206
< 1000)) {


}
1185
< 1000)) {
html += "<tr><td><div class=\"treediv\"><span class=\"treespan\">" + genlang(66) + "</span></div></td><td>" + createBar(cachedp) + "</td><td class=\"right\">&nbsp;</td><td class=\"right\">" + formatBytes(cached, xml) + "</td><td class=\"right\">&nbsp;</td></tr>";
1208
< 1000)) {


html += "<tr><td><div class=\"treediv\"><span class=\"treespan\">" + genlang(66) + "</span></div></td><td>" + createBar(cachedp) + "</td><td class=\"right\">&nbsp;</td><td class=\"right\">" + formatBytes(cached, xml) + "</td><td class=\"right\">&nbsp;</td></tr>";
1187
< 1000)) {
}
1210
< 1000)) {


}
1189
< 1000)) {
html += "<tr><td><div class=\"treediv\"><span class=\"treespan\">" + genlang(65) + "</span></div></td><td>" + createBar(buffp) + "</td><td class=\"rigth\">&nbsp;</td><td class=\"right\">" + formatBytes(buff, xml) + "</td><td class=\"right\">&nbsp;</td></tr>";
1212
< 1000)) {


html += "<tr><td><div class=\"treediv\"><span class=\"treespan\">" + genlang(65) + "</span></div></td><td>" + createBar(buffp) + "</td><td class=\"rigth\">&nbsp;</td><td class=\"right\">" + formatBytes(buff, xml) + "</td><td class=\"right\">&nbsp;</td></tr>";
1191
< 1000)) {
}
1214
< 1000)) {


}
1193
< 1000)) {
if (!showMemoryInfosExpanded) {
1216
< 1000)) {


if (!showMemoryInfosExpanded) {
1195
< 1000)) {
}
1218
< 1000)) {


}
1197
< 1000)) {
});
1220
< 1000)) {


});
1199
< 1000)) {
$("Memory Swap", xml).each(function getSwap(id) {
1222
< 1000)) {


$("Memory Swap", xml).each(function getSwap(id) {
1201
< 1000)) {
free = parseInt($(this).attr("Free"), 10);
1224
< 1000)) {


free = parseInt($(this).attr("Free"), 10);
1203
< 1000)) {
total = parseInt($(this).attr("Total"), 10);
1226
< 1000)) {


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


html += "<tr><td><div class=\"treediv\"><span class=\"treespan\">" + genlang(29) + "</span></div></td><td>" + createBar(percent) + "</td><td class=\"right\">" + formatBytes(free, xml) + "</td><td class=\"right\">" + formatBytes(used, xml) + "</td><td class=\"right\">" + formatBytes(total, xml) + "</td></tr>";
1207
< 1000)) {
1230
< 1000)) {


1209
< 1000)) {
var free = 0, total = 0, used = 0, percent = 0, mpoint = "", mpid = 0;
1232
< 1000)) {


var free = 0, total = 0, used = 0, percent = 0, mpoint = "", mpid = 0;
1211
< 1000)) {
closed.push(swapindex);
1234
< 1000)) {


closed.push(swapindex);
1213
< 1000)) {
free = parseInt($(this).attr("Free"), 10);
1236
< 1000)) {


free = parseInt($(this).attr("Free"), 10);
1215
< 1000)) {
total = parseInt($(this).attr("Total"), 10);
1238
< 1000)) {


total = parseInt($(this).attr("Total"), 10);
1217
< 1000)) {
mpid = parseInt($(this).attr("MountPointID"), 10);
1240
< 1000)) {


mpid = parseInt($(this).attr("MountPointID"), 10);
1219
< 1000)) {
1242
< 1000)) {


1221
< 1000)) {
mpoint = mpid;
1244
< 1000)) {


mpoint = mpid;
1223
< 1000)) {
1246
< 1000)) {


1225
< 1000)) {
tree.push(swapindex);
1248
< 1000)) {


tree.push(swapindex);
1227
< 1000)) {
});
1250
< 1000)) {


});
1229
< 1000)) {
html += " </tbody>\n";
1252
< 1000)) {


html += " </tbody>\n";
1231
< 1000)) {
html += "</div>\n";
1254
< 1000)) {


html += "</div>\n";
1233
< 1000)) {
1256
< 1000)) {


1235
< 1000)) {
openImg: "./gfx/treeTable/tv-collapsable.gif",
1258
< 1000)) {


openImg: "./gfx/treeTable/tv-collapsable.gif",
1237
< 1000)) {
leafImg: "./gfx/treeTable/tv-item.gif",
1260
< 1000)) {


leafImg: "./gfx/treeTable/tv-item.gif",
1239
< 1000)) {
lastShutImg: "./gfx/treeTable/tv-expandable-last.gif",
1262
< 1000)) {


lastShutImg: "./gfx/treeTable/tv-expandable-last.gif",
1241
< 1000)) {
vertLineImg: "./gfx/treeTable/vertline.gif",
1264
< 1000)) {


vertLineImg: "./gfx/treeTable/vertline.gif",
1243
< 1000)) {
collapse: closed,
1266
< 1000)) {


collapse: closed,
1245
< 1000)) {
striped: true,
1268
< 1000)) {


striped: true,
1247
< 1000)) {
state: false
1270
< 1000)) {


state: false
1249
< 1000)) {
1272
< 1000)) {


1251
< 1000)) {
1274
< 1000)) {


1253
< 1000)) {
* (re)fill the filesystems block with the values from the given xml<br><br>
1276
< 1000)) {


* (re)fill the filesystems block with the values from the given xml<br><br>
1255
< 1000)) {
* tbody is cleared
1278
< 1000)) {


* tbody is cleared
1257
< 1000)) {
*/
1280
< 1000)) {


*/
1259
< 1000)) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('filesystem', blocks) < 0))) {
1282
< 1000)) {


if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('filesystem', blocks) < 0))) {
1261
< 1000)) {
return;
1284
< 1000)) {


return;
1263
< 1000)) {
1286
< 1000)) {


1265
< 1000)) {
1288
< 1000)) {


1267
< 1000)) {
1290
< 1000)) {


1269
< 1000)) {
threshold = parseInt($(this).attr("threshold"), 10);
1292
< 1000)) {


threshold = parseInt($(this).attr("threshold"), 10);
1271
< 1000)) {
1294
< 1000)) {


1273
< 1000)) {
var mpoint = "", mpid = 0, type = "", name = "", free = 0, used = 0, size = 0, percent = 0, options = "", inodes = 0, inodes_text = "", options_text = "", ignore = 0;
1296
< 1000)) {


var mpoint = "", mpid = 0, type = "", name = "", free = 0, used = 0, size = 0, percent = 0, options = "", inodes = 0, inodes_text = "", options_text = "", ignore = 0;
1275
< 1000)) {
type = $(this).attr("FSType");
1298
< 1000)) {


type = $(this).attr("FSType");
1277
< 1000)) {
free = parseInt($(this).attr("Free"), 10);
1300
< 1000)) {


free = parseInt($(this).attr("Free"), 10);
1279
< 1000)) {
size = parseInt($(this).attr("Total"), 10);
1302
< 1000)) {


size = parseInt($(this).attr("Total"), 10);
1281
< 1000)) {
options = $(this).attr("MountOptions");
1304
< 1000)) {


options = $(this).attr("MountOptions");
1283
< 1000)) {
mpoint = $(this).attr("MountPoint");
1306
< 1000)) {


mpoint = $(this).attr("MountPoint");
1285
< 1000)) {
1308
< 1000)) {


1287
< 1000)) {
mpoint = mpid;
1310
< 1000)) {


mpoint = mpid;
1289
< 1000)) {
if (options !== undefined) {
1312
< 1000)) {


if (options !== undefined) {
1291
< 1000)) {
}
1314
< 1000)) {


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


inodes_text = "<span style=\"font-style:italic\">&nbsp;(" + inodes.toString() + "%)</span>";
1295
< 1000)) {
if (type === undefined) {
1318
< 1000)) {


if (type === undefined) {
1297
< 1000)) {
}
1320
< 1000)) {


}
1299
< 1000)) {
if (!isNaN(ignore) && (ignore > 0) && showTotals) {
1323
< 1000)) {


if (!isNaN(ignore) && (ignore > 0) && showTotals) {
1301
< 1000)) {
if ((ignore == 3) && !isNaN(threshold) && (percent >= threshold)) {
1325
< 1000)) {


if ((ignore == 3) && !isNaN(threshold) && (percent >= threshold)) {
1303
< 1000)) {
} else {
1327
< 1000)) {


} else {
1305
< 1000)) {
}
1329
< 1000)) {


}
1307
< 1000)) {
if (!isNaN(threshold) && (percent >= threshold)) {
1331
< 1000)) {


if (!isNaN(threshold) && (percent >= threshold)) {
1309
< 1000)) {
} else {
1333
< 1000)) {


} else {
1311
< 1000)) {
}
1335
< 1000)) {


}
1313
< 1000)) {
} else {
1337
< 1000)) {


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


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


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


}
1321
< 1000)) {
if (!isNaN(ignore) && (ignore > 0)) {
1345
< 1000)) {


if (!isNaN(ignore) && (ignore > 0)) {
1323
< 1000)) {
total_used += used;
1347
< 1000)) {


total_used += used;
1325
< 1000)) {
total_used += used;
1349
< 1000)) {


total_used += used;
1327
< 1000)) {
}
1351
< 1000)) {


}
1329
< 1000)) {
total_used += used;
1353
< 1000)) {


total_used += used;
1331
< 1000)) {
total_size += size;
1355
< 1000)) {


total_size += size;
1333
< 1000)) {
total_usage = (total_size != 0) ? round(100 - (total_free / total_size) * 100, 2) : 0;
-
 
1335
< 1000)) {
});
1358
< 1000)) {


});
1337
< 1000)) {
if (showTotals) {
1360
< 1000)) {


if (showTotals) {
-
 
1361
< 1000)) {


usage = (total_size != 0) ? Math.ceil((total_used / total_size) * 100) : 0;
-
 
1362
< 1000)) {


total_usage = (total_size != 0) ? round(100 - (total_free / total_size) * 100, 2) : 0;
1339
< 1000)) {
$("#s_fs_total").html(createBar(total_usage, "barwarn"));
1364
< 1000)) {


$("#s_fs_total").html(createBar(total_usage, "barwarn" , usage));
1341
< 1000)) {
$("#s_fs_total").html(createBar(total_usage));
1366
< 1000)) {


$("#s_fs_total").html(createBar(total_usage, "bar", usage));
1343
< 1000)) {
$("#s_fs_tfree").html(formatBytes(total_free, xml));
1368
< 1000)) {


$("#s_fs_tfree").html(formatBytes(total_free, xml));
1345
< 1000)) {
$("#s_fs_tsize").html(formatBytes(total_size, xml));
1370
< 1000)) {


$("#s_fs_tsize").html(formatBytes(total_size, xml));
1347
< 1000)) {
}
1372
< 1000)) {


}
1349
< 1000)) {
/**
1374
< 1000)) {


/**
1351
< 1000)) {
* build the block content for the temperature block, this includes normal temperature information in the XML
1376
< 1000)) {


* build the block content for the temperature block, this includes normal temperature information in the XML
1353
< 1000)) {
* to avoid HTML warnings
1378
< 1000)) {


* to avoid HTML warnings
1355
< 1000)) {
*/
1380
< 1000)) {


*/
1357
< 1000)) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {
1382
< 1000)) {


if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {
1359
< 1000)) {
return;
1384
< 1000)) {


return;
1361
< 1000)) {
1386
< 1000)) {


1363
< 1000)) {
$("#temperatureTable tbody").empty();
1388
< 1000)) {


$("#temperatureTable tbody").empty();
1365
< 1000)) {
var label = "", value = "", event = "", limit = 0, _limit = "";
1390
< 1000)) {


var label = "", value = "", event = "", limit = 0, _limit = "";
1367
< 1000)) {
value = $(this).attr("Value");
1392
< 1000)) {


value = $(this).attr("Value");
1369
< 1000)) {
if (event !== undefined)
1394
< 1000)) {


if (event !== undefined)
1371
< 1000)) {
limit = parseFloat($(this).attr("Max"));
1396
< 1000)) {


limit = parseFloat($(this).attr("Max"));
1373
< 1000)) {
_limit = formatTemp(limit, xml);
1398
< 1000)) {


_limit = formatTemp(limit, xml);
1375
< 1000)) {
values = true;
1400
< 1000)) {


values = true;
1377
< 1000)) {
if (values) {
1402
< 1000)) {


if (values) {
1379
< 1000)) {
} else {
1404
< 1000)) {


} else {
1381
< 1000)) {
}
1406
< 1000)) {


}
1383
< 1000)) {
1408
< 1000)) {


1385
< 1000)) {
* (re)fill the voltage block with the values from the given xml<br><br>
1410
< 1000)) {


* (re)fill the voltage block with the values from the given xml<br><br>
1387
< 1000)) {
* entire table will be removed to avoid HTML warnings
1412
< 1000)) {


* entire table will be removed to avoid HTML warnings
1389
< 1000)) {
*/
1414
< 1000)) {


*/
1391
< 1000)) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('voltage', blocks) < 0))) {
1416
< 1000)) {


if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('voltage', blocks) < 0))) {
1393
< 1000)) {
return;
1418
< 1000)) {


return;
1395
< 1000)) {
1420
< 1000)) {


1397
< 1000)) {
$("#voltageTable tbody").empty();
1422
< 1000)) {


$("#voltageTable tbody").empty();
1399
< 1000)) {
var label = "", value = 0, event = "", max = 0, min = 0, _min = "", _max = "";
1424
< 1000)) {


var label = "", value = 0, event = "", max = 0, min = 0, _min = "", _max = "";
1401
< 1000)) {
value = parseFloat($(this).attr("Value"));
1426
< 1000)) {


value = parseFloat($(this).attr("Value"));
1403
< 1000)) {
if (event !== undefined)
1428
< 1000)) {


if (event !== undefined)
1405
< 1000)) {
max = parseFloat($(this).attr("Max"));
1430
< 1000)) {


max = parseFloat($(this).attr("Max"));
1407
< 1000)) {
_max = round(max, 2) + "&nbsp;" + genlang(62);
1432
< 1000)) {


_max = round(max, 2) + "&nbsp;" + genlang(62);
1409
< 1000)) {
if (isFinite(min))
1434
< 1000)) {


if (isFinite(min))
1411
< 1000)) {
if (isFinite(value))
1436
< 1000)) {


if (isFinite(value))
1413
< 1000)) {
else
1438
< 1000)) {


else
1415
< 1000)) {
values = true;
1440
< 1000)) {


values = true;
1417
< 1000)) {
if (values) {
1442
< 1000)) {


if (values) {
1419
< 1000)) {
} else {
1444
< 1000)) {


} else {
1421
< 1000)) {
}
1446
< 1000)) {


}
1423
< 1000)) {
1448
< 1000)) {


1425
< 1000)) {
* (re)fill the fan block with the values from the given xml<br><br>
1450
< 1000)) {


* (re)fill the fan block with the values from the given xml<br><br>
1427
< 1000)) {
* entire table will be removed to avoid HTML warnings
1452
< 1000)) {


* entire table will be removed to avoid HTML warnings
1429
< 1000)) {
*/
1454
< 1000)) {


*/
1431
< 1000)) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('fans', blocks) < 0))) {
1456
< 1000)) {


if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('fans', blocks) < 0))) {
1433
< 1000)) {
return;
1458
< 1000)) {


return;
1435
< 1000)) {
1460
< 1000)) {


1437
< 1000)) {
$("#fansTable tbody").empty();
1462
< 1000)) {


$("#fansTable tbody").empty();
1439
< 1000)) {
var label = "", value = 0, event = "", min = 0, _min = "", unit = "";
1464
< 1000)) {


var label = "", value = 0, event = "", min = 0, _min = "", unit = "";
1441
< 1000)) {
value = parseFloat($(this).attr("Value"));
1466
< 1000)) {


value = parseFloat($(this).attr("Value"));
1443
< 1000)) {
if (event !== undefined)
1468
< 1000)) {


if (event !== undefined)
1445
< 1000)) {
min = parseFloat($(this).attr("Min"));
1470
< 1000)) {


min = parseFloat($(this).attr("Min"));
1447
< 1000)) {
if (unit === "%") {
1472
< 1000)) {


if (unit === "%") {
1449
< 1000)) {
_min = round(min,0) + "%";
1474
< 1000)) {


_min = round(min,0) + "%";
1451
< 1000)) {
$("#fansTable tbody").append("<tr><td>" + label + "</td><td>" + createBar(round(value,0)) + "</td><td class=\"right\">" + _min + "</td></tr>");
1476
< 1000)) {


$("#fansTable tbody").append("<tr><td>" + label + "</td><td>" + createBar(round(value,0)) + "</td><td class=\"right\">" + _min + "</td></tr>");
1453
< 1000)) {
$("#fansTable tbody").append("<tr><td>" + label + "</td><td>---%</td><td class=\"right\">" + _min + "</td></tr>");
1478
< 1000)) {


$("#fansTable tbody").append("<tr><td>" + label + "</td><td>---%</td><td class=\"right\">" + _min + "</td></tr>");
1455
< 1000)) {
if (isFinite(min))
1480
< 1000)) {


if (isFinite(min))
1457
< 1000)) {
if (isFinite(value))
1482
< 1000)) {


if (isFinite(value))
1459
< 1000)) {
else
1484
< 1000)) {


else
1461
< 1000)) {
}
1486
< 1000)) {


}
1463
< 1000)) {
});
1488
< 1000)) {


});
1465
< 1000)) {
$("#fans").show();
1490
< 1000)) {


$("#fans").show();
1467
< 1000)) {
$("#fans").hide();
1492
< 1000)) {


$("#fans").hide();
1469
< 1000)) {
}
1494
< 1000)) {


}
1471
< 1000)) {
/**
1496
< 1000)) {


/**
1473
< 1000)) {
* build the power information into a separate block, if there is no power information available the
1498
< 1000)) {


* build the power information into a separate block, if there is no power information available the
1475
< 1000)) {
* @param {jQuery} xml phpSysInfo-XML
1500
< 1000)) {


* @param {jQuery} xml phpSysInfo-XML
1477
< 1000)) {
function refreshPower(xml) {
1502
< 1000)) {


function refreshPower(xml) {
1479
< 1000)) {
power', blocks) < 0))) {
1503
< 1000)) {


if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('power', blocks) < 0))) {
1480
< 1000)) {
return;
1505
< 1000)) {


return;
1482
< 1000)) {
1507
< 1000)) {


1484
< 1000)) {
$("#powerTable tbody").empty();
1509
< 1000)) {


$("#powerTable tbody").empty();
1486
< 1000)) {
var label = "", value = "", event = "", limit = 0, _limit = "";
1511
< 1000)) {


var label = "", value = "", event = "", limit = 0, _limit = "";
1488
< 1000)) {
value = parseFloat($(this).attr("Value"));
1513
< 1000)) {


value = parseFloat($(this).attr("Value"));
1490
< 1000)) {
if (event !== undefined)
1515
< 1000)) {


if (event !== undefined)
1492
< 1000)) {
limit = parseFloat($(this).attr("Max"));
1517
< 1000)) {


limit = parseFloat($(this).attr("Max"));
1494
< 1000)) {
_limit = round(limit, 2) + "&nbsp;" + genlang(103);
1519
< 1000)) {


_limit = round(limit, 2) + "&nbsp;" + genlang(103);
1496
< 1000)) {
$("#powerTable tbody").append("<tr><td>" + label + "</td><td class=\"right\">" + round(value, 2) + "&nbsp;" + genlang(103) + "</td><td class=\"right\">" + _limit + "</td></tr>");
1521
< 1000)) {


$("#powerTable tbody").append("<tr><td>" + label + "</td><td class=\"right\">" + round(value, 2) + "&nbsp;" + genlang(103) + "</td><td class=\"right\">" + _limit + "</td></tr>");
1498
< 1000)) {
$("#powerTable tbody").append("<tr><td>" + label + "</td><td class=\"right\">---&nbsp;" + genlang(103) + "</td><td class=\"right\">" + _limit + "</td></tr>");
1523
< 1000)) {


$("#powerTable tbody").append("<tr><td>" + label + "</td><td class=\"right\">---&nbsp;" + genlang(103) + "</td><td class=\"right\">" + _limit + "</td></tr>");
1500
< 1000)) {
});
1525
< 1000)) {


});
1502
< 1000)) {
$("#power").show();
1527
< 1000)) {


$("#power").show();
1504
< 1000)) {
$("#power").hide();
1529
< 1000)) {


$("#power").hide();
1506
< 1000)) {
}
1531
< 1000)) {


}
1508
< 1000)) {
/**
1533
< 1000)) {


/**
1510
< 1000)) {
* build the current information into a separate block, if there is no current information available the
1535
< 1000)) {


* build the current information into a separate block, if there is no current information available the
1512
< 1000)) {
* @param {jQuery} xml phpSysInfo-XML
1537
< 1000)) {


* @param {jQuery} xml phpSysInfo-XML
1514
< 1000)) {
function refreshCurrent(xml) {
1539
< 1000)) {


function refreshCurrent(xml) {
1516
< 1000)) {
current', blocks) < 0))) {
1540
< 1000)) {


if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('current', blocks) < 0))) {
1517
< 1000)) {
return;
1542
< 1000)) {


return;
1519
< 1000)) {
1544
< 1000)) {


1521
< 1000)) {
$("#currentTable tbody").empty();
1546
< 1000)) {


$("#currentTable tbody").empty();
1523
< 1000)) {
var label = "", value = "", event = "", min = 0, max = 0, _min = "", _max = "";
1548
< 1000)) {


var label = "", value = "", event = "", min = 0, max = 0, _min = "", _max = "";
1525
< 1000)) {
value = parseFloat($(this).attr("Value"));
1550
< 1000)) {


value = parseFloat($(this).attr("Value"));
1527
< 1000)) {
if (event !== undefined)
1552
< 1000)) {


if (event !== undefined)
1529
< 1000)) {
max = parseFloat($(this).attr("Max"));
1554
< 1000)) {


max = parseFloat($(this).attr("Max"));
1531
< 1000)) {
_max = round(max, 2) + "&nbsp;" + genlang(106);
1556
< 1000)) {


_max = round(max, 2) + "&nbsp;" + genlang(106);
1533
< 1000)) {
if (isFinite(min))
1558
< 1000)) {


if (isFinite(min))
1535
< 1000)) {
if (isFinite(value))
1560
< 1000)) {


if (isFinite(value))
1537
< 1000)) {
else
1562
< 1000)) {


else
1539
< 1000)) {
values = true;
1564
< 1000)) {


values = true;
1541
< 1000)) {
if (values) {
1566
< 1000)) {


if (values) {
1543
< 1000)) {
} else {
1568
< 1000)) {


} else {
1545
< 1000)) {
}
1570
< 1000)) {


}
1547
< 1000)) {
1572
< 1000)) {


1549
< 1000)) {
* (re)fill the other block with the values from the given xml<br><br>
1574
< 1000)) {


* (re)fill the other block with the values from the given xml<br><br>
1551
< 1000)) {
* entire table will be removed to avoid HTML warnings
1576
< 1000)) {


* entire table will be removed to avoid HTML warnings
1553
< 1000)) {
*/
1578
< 1000)) {


*/
1555
< 1000)) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('other', blocks) < 0))) {
1580
< 1000)) {


if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('other', blocks) < 0))) {
1557
< 1000)) {
return;
1582
< 1000)) {


return;
1559
< 1000)) {
1584
< 1000)) {


1561
< 1000)) {
$("#otherTable tbody").empty();
1586
< 1000)) {


$("#otherTable tbody").empty();
1563
< 1000)) {
var label = "", value = "", event = "", unit = "";
1588
< 1000)) {


var label = "", value = "", event = "", unit = "";
1565
< 1000)) {
value = $(this).attr("Value");
1590
< 1000)) {


value = $(this).attr("Value");
1567
< 1000)) {
if (event !== undefined)
1592
< 1000)) {


if (event !== undefined)
1569
< 1000)) {
unit = $(this).attr("Unit");
1594
< 1000)) {


unit = $(this).attr("Unit");
1571
< 1000)) {
$("#otherTable tbody").append("<tr><td>" + label + "</td><td>" + createBar(round(value,0)) + "</td></tr>");
1597
< 1000)) {


$("#otherTable tbody").append("<tr><td>" + label + "</td><td>" + createBar(round(value,0)) + "</td></tr>");
-
 
1598
< 1000)) {


else
-
 
1599
< 1000)) {


$("#otherTable tbody").append("<tr><td>" + label + "</td><td>---%</td></tr>");
1573
< 1000)) {
$("#otherTable tbody").append("<tr><td>" + label + "</td><td class=\"right\">" + value + "</td></tr>");
1601
< 1000)) {


$("#otherTable tbody").append("<tr><td>" + label + "</td><td class=\"right\">" + value + "</td></tr>");
1575
< 1000)) {
values = true;
1603
< 1000)) {


values = true;
1577
< 1000)) {
if (values) {
1605
< 1000)) {


if (values) {
1579
< 1000)) {
} else {
1607
< 1000)) {


} else {
1581
< 1000)) {
}
1609
< 1000)) {


}
1583
< 1000)) {
1611
< 1000)) {


1585
< 1000)) {
* (re)fill the ups block with the values from the given xml<br><br>
1613
< 1000)) {


* (re)fill the ups block with the values from the given xml<br><br>
1587
< 1000)) {
* entire table will be removed to avoid HTML warnings
1615
< 1000)) {


* entire table will be removed to avoid HTML warnings
1589
< 1000)) {
*/
1617
< 1000)) {


*/
1591
< 1000)) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('ups', blocks) < 0))) {
1619
< 1000)) {


if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('ups', blocks) < 0))) {
1593
< 1000)) {
return;
1621
< 1000)) {


return;
1595
< 1000)) {
1623
< 1000)) {


1597
< 1000)) {
1']", xml).length > 0);
1624
< 1000)) {


var add_apcupsd_cgi_links = ($("[ApcupsdCgiLinks='1']", xml).length > 0);
1598
< 1000)) {
html += "<h2>" + genlang(68) + "</h2>\n";
1626
< 1000)) {


html += "<h2>" + genlang(68) + "</h2>\n";
1600
< 1000)) {
html += " <table class=\"tablemain\" id=\"UPSTree\">\n";
1628
< 1000)) {


html += " <table class=\"tablemain\" id=\"UPSTree\">\n";
1602
< 1000)) {
1630
< 1000)) {


1604
< 1000)) {
$("UPSInfo UPS", xml).each(function getUps(id) {
1632
< 1000)) {


$("UPSInfo UPS", xml).each(function getUps(id) {
1606
< 1000)) {
name = $(this).attr("Name");
1634
< 1000)) {


name = $(this).attr("Name");
1608
< 1000)) {
mode = $(this).attr("Mode");
1636
< 1000)) {


mode = $(this).attr("Mode");
1610
< 1000)) {
upsstatus = $(this).attr("Status");
1638
< 1000)) {


upsstatus = $(this).attr("Status");
1612
< 1000)) {
1640
< 1000)) {


1614
< 1000)) {
outages_count = $(this).attr("OutagesCount");
1642
< 1000)) {


outages_count = $(this).attr("OutagesCount");
1616
< 1000)) {
last_outage_finish = $(this).attr("LastOutageFinish");
1644
< 1000)) {


last_outage_finish = $(this).attr("LastOutageFinish");
1618
< 1000)) {
line_frequency = $(this).attr("LineFrequency");
1646
< 1000)) {


line_frequency = $(this).attr("LineFrequency");
1620
< 1000)) {
battery_date = $(this).attr("BatteryDate");
1648
< 1000)) {


battery_date = $(this).attr("BatteryDate");
1622
< 1000)) {
battery_charge_percent = parseInt($(this).attr("BatteryChargePercent"), 10);
1650
< 1000)) {


battery_charge_percent = parseInt($(this).attr("BatteryChargePercent"), 10);
1624
< 1000)) {
1652
< 1000)) {


1626
< 1000)) {
html += "<tr><td colspan=\"2\"><div class=\"treediv\"><span class=\"treespanbold\">" + name + " (" + mode + ")</span></div></td></tr>\n";
1654
< 1000)) {


html += "<tr><td colspan=\"2\"><div class=\"treediv\"><span class=\"treespanbold\">" + name + " (" + mode + ")</span></div></td></tr>\n";
1628
< 1000)) {
html += "<tr><td colspan=\"2\"><div class=\"treediv\"><span class=\"treespanbold\">" + name + "</span></div></td></tr>\n";
1656
< 1000)) {


html += "<tr><td colspan=\"2\"><div class=\"treediv\"><span class=\"treespanbold\">" + name + "</span></div></td></tr>\n";
1630
< 1000)) {
index = tree.push(0);
1658
< 1000)) {


index = tree.push(0);
1632
< 1000)) {
html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(70) + "</span></div></td><td>" + model + "</td></tr>\n";
1660
< 1000)) {


html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(70) + "</span></div></td><td>" + model + "</td></tr>\n";
1634
< 1000)) {
}
1662
< 1000)) {


}
1636
< 1000)) {
html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(72) + "</span></div></td><td>" + start_time + "</td></tr>\n";
1664
< 1000)) {


html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(72) + "</span></div></td><td>" + start_time + "</td></tr>\n";
1638
< 1000)) {
}
1666
< 1000)) {


}
1640
< 1000)) {
html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(73) + "</span></div></td><td>" + upsstatus + "</td></tr>\n";
1668
< 1000)) {


html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(73) + "</span></div></td><td>" + upsstatus + "</td></tr>\n";
1642
< 1000)) {
}
1670
< 1000)) {


}
1644
< 1000)) {
html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(133) + "</span></div></td><td>" + beeperstatus + "</td></tr>\n";
1672
< 1000)) {


html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(133) + "</span></div></td><td>" + beeperstatus + "</td></tr>\n";
1646
< 1000)) {
}
1674
< 1000)) {


}
1648
< 1000)) {
html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(84) + "</span></div></td><td>" + temperature + "</td></tr>\n";
1676
< 1000)) {


html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(84) + "</span></div></td><td>" + temperature + "</td></tr>\n";
1650
< 1000)) {
}
1678
< 1000)) {


}
1652
< 1000)) {
html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(74) + "</span></div></td><td>" + outages_count + "</td></tr>\n";
1680
< 1000)) {


html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(74) + "</span></div></td><td>" + outages_count + "</td></tr>\n";
1654
< 1000)) {
}
1682
< 1000)) {


}
1656
< 1000)) {
html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(75) + "</span></div></td><td>" + last_outage + "</td></tr>\n";
1684
< 1000)) {


html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(75) + "</span></div></td><td>" + last_outage + "</td></tr>\n";
1658
< 1000)) {
}
1686
< 1000)) {


}
1660
< 1000)) {
html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(76) + "</span></div></td><td>" + last_outage_finish + "</td></tr>\n";
1688
< 1000)) {


html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(76) + "</span></div></td><td>" + last_outage_finish + "</td></tr>\n";
1662
< 1000)) {
}
1690
< 1000)) {


}
1664
< 1000)) {
html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(77) + "</span></div></td><td>" + line_voltage + "&nbsp;" + genlang(82) + "</td></tr>\n";
1692
< 1000)) {


html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(77) + "</span></div></td><td>" + line_voltage + "&nbsp;" + genlang(82) + "</td></tr>\n";
1666
< 1000)) {
}
1694
< 1000)) {


}
1668
< 1000)) {
html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(108) + "</span></div></td><td>" + line_frequency + "&nbsp;" + genlang(109) + "</td></tr>\n";
1696
< 1000)) {


html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(108) + "</span></div></td><td>" + line_frequency + "&nbsp;" + genlang(109) + "</td></tr>\n";
1670
< 1000)) {
}
1698
< 1000)) {


}
1672
< 1000)) {
html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(78) + "</span></div></td><td>" + createBar(load_percent) + "</td></tr>\n";
1700
< 1000)) {


html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(78) + "</span></div></td><td>" + createBar(load_percent) + "</td></tr>\n";
1674
< 1000)) {
}
1702
< 1000)) {


}
1676
< 1000)) {
html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(104) + "</span></div></td><td>" + battery_date + "</td></tr>\n";
1704
< 1000)) {


html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(104) + "</span></div></td><td>" + battery_date + "</td></tr>\n";
1678
< 1000)) {
}
1706
< 1000)) {


}
1680
< 1000)) {
html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(79) + "</span></div></td><td>" + battery_voltage + "&nbsp;" + genlang(82) + "</td></tr>\n";
1708
< 1000)) {


html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(79) + "</span></div></td><td>" + battery_voltage + "&nbsp;" + genlang(82) + "</td></tr>\n";
1682
< 1000)) {
}
1710
< 1000)) {


}
1684
< 1000)) {
html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(80) + "</span></div></td><td>" + createBar(battery_charge_percent) + "</td></tr>\n";
1712
< 1000)) {


html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(80) + "</span></div></td><td>" + createBar(battery_charge_percent) + "</td></tr>\n";
1686
< 1000)) {
}
1714
< 1000)) {


}
1688
< 1000)) {
html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(81) + "</span></div></td><td>" + time_left_minutes + "&nbsp;" + genlang(83) + "</td></tr>\n";
1716
< 1000)) {


html += "<tr><td style=\"width:36%\"><div class=\"treediv\"><span class=\"treespan\">" + genlang(81) + "</span></div></td><td>" + time_left_minutes + "&nbsp;" + genlang(83) + "</td></tr>\n";
1690
< 1000)) {
}
1718
< 1000)) {


}
1692
< 1000)) {
});
1720
< 1000)) {


});
1694
< 1000)) {
html += " </table>\n";
1722
< 1000)) {


html += " </table>\n";
1696
< 1000)) {
if (add_apcupsd_cgi_links){
1724
< 1000)) {


if (add_apcupsd_cgi_links){
1698
< 1000)) {
details' href='/cgi-bin/apcupsd/multimon.cgi' target='apcupsdcgi'>" + genlang(99) + "a>)\n";
1725
< 1000)) {


html += " (<a title='details' href='/cgi-bin/apcupsd/multimon.cgi' target='apcupsdcgi'>" + genlang(99) + "</a>)\n";
1699
< 1000)) {
1727
< 1000)) {


1701
< 1000)) {
1729
< 1000)) {


1703
< 1000)) {
$("#UPSTree").jqTreeTable(tree, {
1731
< 1000)) {


$("#UPSTree").jqTreeTable(tree, {
1705
< 1000)) {
shutImg: "./gfx/treeTable/tv-expandable.gif",
1733
< 1000)) {


shutImg: "./gfx/treeTable/tv-expandable.gif",
1707
< 1000)) {
lastOpenImg: "./gfx/treeTable/tv-collapsable-last.gif",
1735
< 1000)) {


lastOpenImg: "./gfx/treeTable/tv-collapsable-last.gif",
1709
< 1000)) {
lastLeafImg: "./gfx/treeTable/tv-item-last.gif",
1737
< 1000)) {


lastLeafImg: "./gfx/treeTable/tv-item-last.gif",
1711
< 1000)) {
blankImg: "./gfx/treeTable/blank.gif",
1739
< 1000)) {


blankImg: "./gfx/treeTable/blank.gif",
1713
< 1000)) {
column: 0,
1741
< 1000)) {


column: 0,
1715
< 1000)) {
highlight: false,
1743
< 1000)) {


highlight: false,
1717
< 1000)) {
});
1745
< 1000)) {


});
1719
< 1000)) {
} else {
1747
< 1000)) {


} else {
1721
< 1000)) {
}
1749
< 1000)) {


}
1723
< 1000)) {
1751
< 1000)) {


1725
< 1000)) {
* reload the page, this means all values are refreshed
1753
< 1000)) {


* reload the page, this means all values are refreshed
1727
< 1000)) {
function reload(initiate) {
1755
< 1000)) {


function reload(initiate) {
1729
< 1000)) {
url: 'xml.php',
1757
< 1000)) {


url: 'xml.php',
1731
< 1000)) {
1758
< 1000)) {


dataType: 'xml',
1732
< 1000)) {
if ((typeof(initiate) === 'boolean') && (initiate === true)) {
1760
< 1000)) {


if ((typeof(initiate) === 'boolean') && (initiate === true)) {
1734
< 1000)) {
sticky: true
1762
< 1000)) {


sticky: true
1736
< 1000)) {
} else {
1764
< 1000)) {


} else {
1738
< 1000)) {
}
1766
< 1000)) {


}
1740
< 1000)) {
success: function buildblocks(xml) {
1768
< 1000)) {


success: function buildblocks(xml) {
1742
< 1000)) {
1769
< 1000)) {


if ((typeof(initiate) === 'boolean') && (initiate === true)) {
1743
< 1000)) {
}
1771
< 1000)) {


}
1745
< 1000)) {
refreshVitals(xml);
1773
< 1000)) {


refreshVitals(xml);
1747
< 1000)) {
refreshMemory(xml);
1775
< 1000)) {


refreshMemory(xml);
1749
< 1000)) {
refreshNetwork(xml);
1777
< 1000)) {


refreshNetwork(xml);
1751
< 1000)) {
refreshCurrent(xml);
1779
< 1000)) {


refreshCurrent(xml);
1753
< 1000)) {
refreshFans(xml);
1781
< 1000)) {


refreshFans(xml);
1755
< 1000)) {
refreshOther(xml);
1783
< 1000)) {


refreshOther(xml);
1757
< 1000)) {
changeLanguage();
1785
< 1000)) {


changeLanguage();
1759
< 1000)) {
if ((typeof(initiate) === 'boolean') && (initiate === true)) {
1787
< 1000)) {


if ((typeof(initiate) === 'boolean') && (initiate === true)) {
1761
< 1000)) {
settimer(xml);
1789
< 1000)) {


settimer(xml);
1763
< 1000)) {
for (var i = 0; i < plugin_liste.length; i++) {
1791
< 1000)) {


for (var i = 0; i < plugin_liste.length; i++) {
1765
< 1000)) {
//dynamic call
1793
< 1000)) {


//dynamic call
1767
< 1000)) {
1794
< 1000)) {


window[plugin_liste[i].toLowerCase() + '_request']();
1768
< 1000)) {
catch (err) {
1796
< 1000)) {


catch (err) {
1770
< 1000)) {
}
1798
< 1000)) {


}
1772
< 1000)) {
1800
< 1000)) {


1774
< 1000)) {
1801
< 1000)) {


$('.stripeMe tr:nth-child(even)').addClass('even');
1775
< 1000)) {
});
1803
< 1000)) {


});
1777
< 1000)) {
1805
< 1000)) {


1779
< 1000)) {
* set a reload timer for the page
1807
< 1000)) {


* set a reload timer for the page
1781
< 1000)) {
*/
1809
< 1000)) {


*/
1783
< 1000)) {
$("Options", xml).each(function getRefreshTime(id) {
1811
< 1000)) {


$("Options", xml).each(function getRefreshTime(id) {
1785
< 1000)) {
options = $("Options", xml).get(id);
1813
< 1000)) {


options = $("Options", xml).get(id);
1787
< 1000)) {
if (refresh !== '0') {
1815
< 1000)) {


if (refresh !== '0') {
1789
< 1000)) {
}
1817
< 1000)) {


}
1791
< 1000)) {
}
1819
< 1000)) {


}
1793
< 1000)) {
$(document).ready(function buildpage() {
1821
< 1000)) {


$(document).ready(function buildpage() {
1795
< 1000)) {
1823
< 1000)) {


1797
< 1000)) {
showCPUInfoExpanded = $("#showCPUInfoExpanded").val().toString()==="true";
1825
< 1000)) {


showCPUInfoExpanded = $("#showCPUInfoExpanded").val().toString()==="true";
1799
< 1000)) {
showMemoryInfosExpanded = $("#showMemoryInfosExpanded").val().toString()==="true";
1827
< 1000)) {


showMemoryInfosExpanded = $("#showMemoryInfosExpanded").val().toString()==="true";
1801
< 1000)) {
showTotals = $("#hideTotals").val().toString()!=="true";
1829
< 1000)) {


showTotals = $("#hideTotals").val().toString()!=="true";
1803
< 1000)) {
if (isNaN(increaseWidth) || (increaseWidth<=0)) increaseWidth = 0;
1831
< 1000)) {


if (isNaN(increaseWidth) || (increaseWidth<=0)) increaseWidth = 0;
1805
< 1000)) {
case "bps": showNetworkActiveSpeed = 2;
1833
< 1000)) {


case "bps": showNetworkActiveSpeed = 2;
1807
< 1000)) {
case "true": showNetworkActiveSpeed = 1;
1835
< 1000)) {


case "true": showNetworkActiveSpeed = 1;
1809
< 1000)) {
default: showNetworkActiveSpeed = 0;
1837
< 1000)) {


default: showNetworkActiveSpeed = 0;
1811
< 1000)) {
1839
< 1000)) {


1813
< 1000)) {
if (blocktmp.length >0 ){
1841
< 1000)) {


if (blocktmp.length >0 ){
1815
< 1000)) {
blocks[0] = "true";
1843
< 1000)) {


blocks[0] = "true";
1817
< 1000)) {
blocks = blocktmp.split(',');
1845
< 1000)) {


blocks = blocktmp.split(',');
1819
< 1000)) {
for (i = 0; i < blocks.length; i++) {
1847
< 1000)) {


for (i = 0; i < blocks.length; i++) {
1821
< 1000)) {
$("#output").children().eq(j).before($("#"+blocks[i]));
1849
< 1000)) {


$("#output").children().eq(j).before($("#"+blocks[i]));
1823
< 1000)) {
}
1851
< 1000)) {


}
1825
< 1000)) {
1853
< 1000)) {


1827
< 1000)) {
}
1855
< 1000)) {


}
1829
< 1000)) {
if ($("#language option").length < 2) {
1857
< 1000)) {


if ($("#language option").length < 2) {
1831
< 1000)) {
/*
1859
< 1000)) {


/*
1833
< 1000)) {
for (i = 0; i < plugin_liste.length; i++) {
1861
< 1000)) {


for (i = 0; i < plugin_liste.length; i++) {
1835
< 1000)) {
}
1863
< 1000)) {


}
1837
< 1000)) {
} else {
1865
< 1000)) {


} else {
1839
< 1000)) {
if (cookie_language !== null) {
1867
< 1000)) {


if (cookie_language !== null) {
1841
< 1000)) {
$("#language").val(current_language);
1869
< 1000)) {


$("#language").val(current_language);
1843
< 1000)) {
current_language = $("#language").val().toString();
1871
< 1000)) {


current_language = $("#language").val().toString();
1845
< 1000)) {
/*
1873
< 1000)) {


/*
1847
< 1000)) {
for (i = 0; i < plugin_liste.length; i++) {
1875
< 1000)) {


for (i = 0; i < plugin_liste.length; i++) {
1849
< 1000)) {
}
1877
< 1000)) {


}
1851
< 1000)) {
$('#language').show();
1879
< 1000)) {


$('#language').show();
1853
< 1000)) {
1880
< 1000)) {


$('span[class=lang_045]').show();
1854
< 1000)) {
var i = 0;
1882
< 1000)) {


var i = 0;
1856
< 1000)) {
createCookie('psi_language', current_language, 365);
1884
< 1000)) {


createCookie('psi_language', current_language, 365);
1858
< 1000)) {
for (i = 0; i < plugin_liste.length; i++) {
1886
< 1000)) {


for (i = 0; i < plugin_liste.length; i++) {
1860
< 1000)) {
}
1888
< 1000)) {


}
1862
< 1000)) {
});
1890
< 1000)) {


});
1864
< 1000)) {
if ($("#template option").length < 2) {
1892
< 1000)) {


if ($("#template option").length < 2) {
1866
< 1000)) {
} else {
1894
< 1000)) {


} else {
1868
< 1000)) {
if (cookie_template !== null) {
1896
< 1000)) {


if (cookie_template !== null) {
1870
< 1000)) {
$("#template").val(cookie_template);
1898
< 1000)) {


$("#template").val(cookie_template);
1872
< 1000)) {
$("#template").val(old_template);
1900
< 1000)) {


$("#template").val(old_template);
1874
< 1000)) {
}
1902
< 1000)) {


}
1876
< 1000)) {
$('#template').show();
1904
< 1000)) {


$('#template').show();
1878
< 1000)) {
1905
< 1000)) {


$('span[class=lang_044]').show();
1879
< 1000)) {
switchStyle($("#template").val().toString());
1907
< 1000)) {


switchStyle($("#template").val().toString());
1881
< 1000)) {
#template").val().toString(), 365);
1908
< 1000)) {


createCookie('psi_template', $("#template").val().toString(), 365);
1882
< 1000)) {
});
1910
< 1000)) {


});
1884
< 1000)) {
1912
< 1000)) {


1886
< 1000)) {
1914
< 1000)) {


1888
< 1000)) {
1916
< 1000)) {


1890
< 1000)) {
});
1918
< 1000)) {


});
1892
< 1000)) {
jQuery.fn.dataTableExt.oSort['span-string-asc'] = function sortStringAsc(a, b) {
1920
< 1000)) {


jQuery.fn.dataTableExt.oSort['span-string-asc'] = function sortStringAsc(a, b) {
1894
< 1000)) {
x = a.substring(a.indexOf(">") + 1, a.indexOf("</"));
1922
< 1000)) {


x = a.substring(a.indexOf(">") + 1, a.indexOf("</"));
1896
< 1000)) {
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
1924
< 1000)) {


return ((x < y) ? -1 : ((x > y) ? 1 : 0));
1898
< 1000)) {
1926
< 1000)) {


1900
< 1000)) {
1927
< 1000)) {


jQuery.fn.dataTableExt.oSort['span-string-desc'] = function sortStringDesc(a, b) {
1901
< 1000)) {
x = a.substring(a.indexOf(">") + 1, a.indexOf("</"));
1929
< 1000)) {


x = a.substring(a.indexOf(">") + 1, a.indexOf("</"));
1903
< 1000)) {
return ((x < y) ? 1 : ((x > y) ? -1 : 0));
1931
< 1000)) {


return ((x < y) ? 1 : ((x > y) ? -1 : 0));
1905
< 1000)) {
1933
< 1000)) {


1907
< 1000)) {
1934
< 1000)) {


jQuery.fn.dataTableExt.oSort['span-number-asc'] = function sortNumberAsc(a, b) {
1908
< 1000)) {
x = parseInt(a.substring(a.indexOf(">") + 1, a.indexOf("</")), 10);
1936
< 1000)) {


x = parseInt(a.substring(a.indexOf(">") + 1, a.indexOf("</")), 10);
1910
< 1000)) {
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
1938
< 1000)) {


return ((x < y) ? -1 : ((x > y) ? 1 : 0));
1912
< 1000)) {
1940
< 1000)) {


1914
< 1000)) {
1941
< 1000)) {


jQuery.fn.dataTableExt.oSort['span-number-desc'] = function sortNumberDesc(a, b) {
1915
< 1000)) {
x = parseInt(a.substring(a.indexOf(">") + 1, a.indexOf("</")), 10);
1943
< 1000)) {


x = parseInt(a.substring(a.indexOf(">") + 1, a.indexOf("</")), 10);
1917
< 1000)) {
return ((x < y) ? 1 : ((x > y) ? -1 : 0));
1945
< 1000)) {


return ((x < y) ? 1 : ((x > y) ? -1 : 0));
1919
< 1000)) {
1947
< 1000)) {


1921
< 1000)) {
1948
< 1000)) {


jQuery.fn.dataTableExt.oSort['span-ip-asc'] = function sortIpAsc(a, b) {
1922
< 1000)) {
aa = a.substring(a.indexOf(">") + 1, a.indexOf("</"));
1950
< 1000)) {


aa = a.substring(a.indexOf(">") + 1, a.indexOf("</"));
1924
< 1000)) {
x = full_addr(aa);
1952
< 1000)) {


x = full_addr(aa);
1926
< 1000)) {
if ((x === '') || (y === '')) {
1954
< 1000)) {


if ((x === '') || (y === '')) {
1928
< 1000)) {
y = bb;
1956
< 1000)) {


y = bb;
1930
< 1000)) {
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
1958
< 1000)) {


return ((x < y) ? -1 : ((x > y) ? 1 : 0));
1932
< 1000)) {
1960
< 1000)) {


1934
< 1000)) {
1961
< 1000)) {


jQuery.fn.dataTableExt.oSort['span-ip-desc'] = function sortIpDesc(a, b) {
1935
< 1000)) {
aa = a.substring(a.indexOf(">") + 1, a.indexOf("</"));
1963
< 1000)) {


aa = a.substring(a.indexOf(">") + 1, a.indexOf("</"));
1937
< 1000)) {
x = full_addr(aa);
1965
< 1000)) {


x = full_addr(aa);
1939
< 1000)) {
if ((x === '') || (y === '')) {
1967
< 1000)) {


if ((x === '') || (y === '')) {
1941
< 1000)) {
y = bb;
1969
< 1000)) {


y = bb;
1943
< 1000)) {
return ((x < y) ? 1 : ((x > y) ? -1 : 0));
1971
< 1000)) {


return ((x < y) ? 1 : ((x > y) ? -1 : 0));
1945
< 1000)) {
1973
< 1000)) {


1947
< 1000)) {
var wrongvalue = false;
1975
< 1000)) {


var wrongvalue = false;
1949
< 1000)) {
// ipv4 notation
1977
< 1000)) {


// ipv4 notation
1951
< 1000)) {
ip_string ='::ffff:' + ip_string;
1979
< 1000)) {


ip_string ='::ffff:' + ip_string;
1953
< 1000)) {
// replace ipv4 address if any
1981
< 1000)) {


// replace ipv4 address if any
1955
< 1000)) {
if (ipv4) {
1983
< 1000)) {


if (ipv4) {
1957
< 1000)) {
ipv4 = ipv4[2].match(/[0-9]+/g);
1985
< 1000)) {


ipv4 = ipv4[2].match(/[0-9]+/g);
1959
< 1000)) {
var byte = parseInt(ipv4[i], 10);
1987
< 1000)) {


var byte = parseInt(ipv4[i], 10);
1961
< 1000)) {
ipv4[i] = ("0" + byte.toString(16)).substr(-2);
1989
< 1000)) {


ipv4[i] = ("0" + byte.toString(16)).substr(-2);
1963
< 1000)) {
wrongvalue = true;
1991
< 1000)) {


wrongvalue = true;
1965
< 1000)) {
}
1993
< 1000)) {


}
1967
< 1000)) {
if (wrongvalue) {
1995
< 1000)) {


if (wrongvalue) {
1969
< 1000)) {
1996
< 1000)) {


ip_string = '';
1970
< 1000)) {
ip_string += ipv4[0] + ipv4[1] + ':' + ipv4[2] + ipv4[3];
1998
< 1000)) {


ip_string += ipv4[0] + ipv4[1] + ':' + ipv4[2] + ipv4[3];
1972
< 1000)) {
}
2000
< 1000)) {


}
1974
< 1000)) {
if (ip_string === '') {
2002
< 1000)) {


if (ip_string === '') {
1976
< 1000)) {
2003
< 1000)) {


return '';
1977
< 1000)) {
// take care of leading and trailing ::
2005
< 1000)) {


// take care of leading and trailing ::
1979
< 1000)) {
2006
< 1000)) {


ip_string = ip_string.replace(/^:|:$/g, '');
1980
< 1000)) {
var ipv6 = ip_string.split(':');
2008
< 1000)) {


var ipv6 = ip_string.split(':');
1982
< 1000)) {
for (var li = 0; li < ipv6.length; li ++) {
2010
< 1000)) {


for (var li = 0; li < ipv6.length; li ++) {
1984
< 1000)) {
if (hex !== "") {
2012
< 1000)) {


if (hex !== "") {
1986
< 1000)) {
wrongvalue = true;
2014
< 1000)) {


wrongvalue = true;
1988
< 1000)) {
}
2016
< 1000)) {


}
1990
< 1000)) {
ipv6[li] = ("0000" + hex).substr(-4);
2018
< 1000)) {


ipv6[li] = ("0000" + hex).substr(-4);
1992
< 1000)) {
else {
2020
< 1000)) {


else {
1994
< 1000)) {
hex = [];
2022
< 1000)) {


hex = [];
1996
< 1000)) {
hex.push('0000');
2024
< 1000)) {


hex.push('0000');
1998
< 1000)) {
ipv6[li] = hex.join(':');
2026
< 1000)) {


ipv6[li] = hex.join(':');
2000
< 1000)) {
}
2028
< 1000)) {


}
2002
< 1000)) {
var out = ipv6.join(':');
2030
< 1000)) {


var out = ipv6.join(':');
2004
< 1000)) {
return out;
2032
< 1000)) {


return out;
2006
< 1000)) {
return '';
2034
< 1000)) {


return '';
2008
< 1000)) {
} else {
2036
< 1000)) {


} else {
2010
< 1000)) {
2037
< 1000)) {


return '';
2011
< 1000)) {
}
2039
< 1000)) {


}
2013
< 1000)) {
/**
2041
< 1000)) {


/**
2015
< 1000)) {
* @param {String} plugin name of the plugin
2043
< 1000)) {


* @param {String} plugin name of the plugin
2017
< 1000)) {
* @param {Boolean} reload controls if a reload button should be appended to the headline
2045
< 1000)) {


* @param {Boolean} reload controls if a reload button should be appended to the headline
2019
< 1000)) {
*/
2047
< 1000)) {


*/
2021
< 1000)) {
var block = "", reloadpic = "";
2049
< 1000)) {


var block = "", reloadpic = "";
2023
< 1000)) {
reloadpic = "<img id=\"Reload_" + plugin + "Table\" src=\"./gfx/reload.gif\" alt=\"reload\" title=\"reload\" style=\"vertical-align:middle;float:right;cursor:pointer;border:0px;width:16px\" />&nbsp;";
2051
< 1000)) {


reloadpic = "<img id=\"Reload_" + plugin + "Table\" src=\"./gfx/reload.gif\" alt=\"reload\" title=\"reload\" style=\"vertical-align:middle;float:right;cursor:pointer;border:0px;width:16px\" />&nbsp;";
2025
< 1000)) {
block += "<div id=\"panel_" + plugin + "\" style=\"display:none;\">\n";
2053
< 1000)) {


block += "<div id=\"panel_" + plugin + "\" style=\"display:none;\">\n";
2027
< 1000)) {
block += "<h2>" + reloadpic + genlang(translationid, plugin) + "\n";
2055
< 1000)) {


block += "<h2>" + reloadpic + genlang(translationid, plugin) + "\n";
2029
< 1000)) {
block += "</div>\n";
2057
< 1000)) {


block += "</div>\n";
2031
< 1000)) {
return block;
2059
< 1000)) {


return block;
2033
< 1000)) {
2061
< 1000)) {


2035
< 1000)) {
* translate a plugin and add this plugin to the internal plugin-list, this is only needed once and shouldn't be called more than once
2063
< 1000)) {


* translate a plugin and add this plugin to the internal plugin-list, this is only needed once and shouldn't be called more than once
2037
< 1000)) {
*/
2065
< 1000)) {


*/
2039
< 1000)) {
plugin_liste.pushIfNotExist(plugin);
2067
< 1000)) {


plugin_liste.pushIfNotExist(plugin);
2041
< 1000)) {
}
2069
< 1000)) {


}
2043
< 1000)) {
/**
2071
< 1000)) {


/**
2045
< 1000)) {
* @return {String} formatted datetime string
2073
< 1000)) {


* @return {String} formatted datetime string
2047
< 1000)) {
function datetime() {
2075
< 1000)) {


function datetime() {
2049
< 1000)) {
date = new Date();
2077
< 1000)) {


date = new Date();
2051
< 1000)) {
month = date.getMonth() + 1;
2079
< 1000)) {


month = date.getMonth() + 1;
2053
< 1000)) {
hour = date.getHours();
2081
< 1000)) {


hour = date.getHours();
2055
< 1000)) {
2083
< 1000)) {


2057
< 1000)) {
days = (day < 10) ? "0" + day.toString() : day.toString();
2085
< 1000)) {


days = (day < 10) ? "0" + day.toString() : day.toString();
2059
< 1000)) {
years = (year < 1000) ? year.toString() : year.toString();
2087
< 1000)) {


years = (year < 1000) ? year.toString() : year.toString();
2061
< 1000)) {
hours = (hour < 10) ? "0" + hour.toString() : hour.toString();
2089
< 1000)) {


hours = (hour < 10) ? "0" + hour.toString() : hour.toString();
2063
< 1000)) {
return days + "." + months + "." + years + " - " + hours + ":" + minutes;
2091
< 1000)) {


return days + "." + months + "." + years + " - " + hours + ":" + minutes;
2065
< 1000)) {
2093
< 1000)) {


2067
< 1000)) {
if (typeof(val) == 'undefined' || val === '') {
2095
< 1000)) {


if (typeof(val) == 'undefined' || val === '') {
2069
< 1000)) {
}
2097
< 1000)) {


}
2071
< 1000)) {
if ($.inArray(val, this) == -1) {
2099
< 1000)) {


if ($.inArray(val, this) == -1) {
2073
< 1000)) {
}
2101
< 1000)) {


}
2075
< 1000)) {
2103
< 1000)) {


2077
< 1000)) {
* insert dynamically a js script file into the website
2105
< 1000)) {


* insert dynamically a js script file into the website
2079
< 1000)) {
*/
2107
< 1000)) {


*/
2081
< 1000)) {
function appendjs(name) {
2109
< 1000)) {


function appendjs(name) {
2083
< 1000)) {
scrptE = document.createElement("script");
2111
< 1000)) {


scrptE = document.createElement("script");
2085
< 1000)) {
scrptE.setAttribute("src", name);
2113
< 1000)) {


scrptE.setAttribute("src", name);
2087
< 1000)) {
hdEl.appendChild(scrptE);
2115
< 1000)) {


hdEl.appendChild(scrptE);
2089
< 1000)) {
*/
2117
< 1000)) {


*/
2091
< 1000)) {
* insert dynamically a css file into the website
2119
< 1000)) {


* insert dynamically a css file into the website
2093
< 1000)) {
*/
2121
< 1000)) {


*/
2095
< 1000)) {
function appendcss(name) {
2123
< 1000)) {


function appendcss(name) {
2097
< 1000)) {
scrptE = document.createElement("link");
2125
< 1000)) {


scrptE = document.createElement("link");
2099
< 1000)) {
scrptE.setAttribute("type", "text/css");
2127
< 1000)) {


scrptE.setAttribute("type", "text/css");
2101
< 1000)) {
scrptE.setAttribute("href", name);
2129
< 1000)) {


scrptE.setAttribute("href", name);
2103
< 1000)) {
}
2131
< 1000)) {


}
2105
< 1000)) {
2133
< 1000)) {