/web/acc/phpsysinfo/plugins/uprecords/js/uprecords.js |
---|
0,0 → 1,126 |
/*************************************************************************** |
* Copyright (C) 2008 by phpSysInfo - A PHP System Information Script * |
* http://phpsysinfo.sourceforge.net/ * |
* * |
* This program is free software; you can redistribute it and/or modify * |
* it under the terms of the GNU General Public License as published by * |
* the Free Software Foundation; either version 2 of the License, or * |
* (at your option) any later version. * |
* * |
* This program is distributed in the hope that it will be useful, * |
* but WITHOUT ANY WARRANTY; without even the implied warranty of * |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
* GNU General Public License for more details. * |
* * |
* You should have received a copy of the GNU General Public License * |
* along with this program; if not, write to the * |
* Free Software Foundation, Inc., * |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
***************************************************************************/ |
//$Id: uprecords.js 661 2014-01-08 11:26:39 aolah76 $ |
/*global $, jQuery, buildBlock, datetime, plugin_translate, genlang, createBar */ |
"use strict"; |
var uprecords_show = false; |
/** |
* insert content into table |
* @param {jQuery} xml plugin-XML |
*/ |
function uprecords_populate(xml) { |
var html = "", datetimeFormat = ""; |
$("Options", xml).each(function getByteFormat(id) { |
datetimeFormat = $(this).attr("datetimeFormat"); |
}); |
$("Plugins Plugin_uprecords uprecords Item", xml).each(function uprecords_getitem(idp) { |
html += " <tr>\n"; |
html += " <td style=\"font-weight:normal\">" + $(this).attr("hash") + "</td>\n"; |
html += " <td style=\"font-weight:normal\">" + $(this).attr("Uptime") + "</td>\n"; |
html += " <td style=\"font-weight:normal\">" + $(this).attr("System") + "</td>\n"; |
/* |
var lastboot = new Date($(this).attr("Bootup")); |
if (typeof(lastboot.toUTCString)==="function") { |
html += " <td style=\"font-weight:normal\">" + lastboot.toUTCString() + "</td>\n"; |
} else { //deprecated |
html += " <td style=\"font-weight:normal\">" + lastboot.toGMTString() + "</td>\n"; |
} |
*/ |
if ((datetimeFormat !== undefined) && (datetimeFormat.toLowerCase() === "locale")) { |
var lastboot = new Date($(this).attr("Bootup")); |
html += " <td style=\"font-weight:normal\">" + lastboot.toLocaleString() + "</td>\n"; |
} else { |
html += " <td style=\"font-weight:normal\">" + $(this).attr("Bootup") + "</td>\n"; |
} |
html += " </tr>\n"; |
uprecords_show = true; |
}); |
$("#Plugin_uprecordsTable-tbody").empty().append(html); |
$('#Plugin_uprecordsTable tr:nth-child(even)').addClass('even'); |
} |
function uprecords_buildTable() { |
var html = ""; |
html += "<div style=\"overflow-x:auto;\">\n"; |
html += " <table id=\"Plugin_uprecordsTable\" class=\"stripeMe\" style=\"border-collapse:collapse;\">\n"; |
html += " <thead>\n"; |
html += " <tr>\n"; |
html += " <th>" + genlang(101, "uprecords") + "</th>\n"; |
html += " <th>" + genlang(102, "uprecords") + "</th>\n"; |
html += " <th>" + genlang(103, "uprecords") + "</th>\n"; |
html += " <th>" + genlang(104, "uprecords") + "</th>\n"; |
html += " </tr>\n"; |
html += " </thead>\n"; |
html += " <tbody id=\"Plugin_uprecordsTable-tbody\">\n"; |
html += " </tbody>\n"; |
html += " </table>\n"; |
html += "</div>\n"; |
$("#Plugin_uprecords").append(html); |
} |
/** |
* load the xml via ajax |
*/ |
function uprecords_request() { |
$("#Reload_uprecordsTable").attr("title", "reload"); |
$.ajax({ |
url: "xml.php?plugin=uprecords", |
dataType: "xml", |
error: function uprecords_error() { |
$.jGrowl("Error loading XML document for Plugin uprecords!"); |
}, |
success: function uprecords_buildblock(xml) { |
populateErrors(xml); |
uprecords_populate(xml); |
if (uprecords_show) { |
plugin_translate("uprecords"); |
$("#Plugin_uprecords").show(); |
} |
} |
}); |
} |
$(document).ready(function uprecords_buildpage() { |
$("#footer").before(buildBlock("uprecords", 1, true)); |
$("#Plugin_uprecords").css("width", "915px"); |
uprecords_buildTable(); |
uprecords_request(); |
$("#Reload_uprecordsTable").click(function uprecords_reload(id) { |
uprecords_request(); |
$(this).attr("title", datetime()); |
}); |
}); |
/web/acc/phpsysinfo/plugins/uprecords/js/uprecords_bootstrap.js |
---|
0,0 → 1,35 |
function renderPlugin_uprecords(data) { |
var directives = { |
hash: { |
html: function () { |
return this.hash; |
} |
}, |
Bootup: { |
html: function () { |
if (((datetimeFormat = data.Options["@attributes"].datetimeFormat) !== undefined) && (datetimeFormat.toLowerCase() === "locale")) { |
var bootup = new Date(this.Bootup); |
return bootup.toLocaleString(); |
} else { |
return this.Bootup; |
} |
} |
} |
}; |
if ((data.Plugins.Plugin_uprecords !== undefined) && (data.Plugins.Plugin_uprecords.Uprecords !== undefined)) { |
var upitems = items(data.Plugins.Plugin_uprecords.Uprecords.Item); |
if (upitems.length > 0) { |
var up_memory = []; |
up_memory.push_attrs(upitems); |
$('#uprecords-data').render(up_memory, directives); |
$('#block_uprecords').show(); |
} else { |
$('#block_uprecords').hide(); |
} |
} else { |
$('#block_uprecords').hide(); |
} |
} |
/web/acc/phpsysinfo/plugins/uprecords/lang/en.xml |
---|
0,0 → 1,24 |
<?xml version="1.0" encoding="utf-8"?> |
<!-- $Id: en.xml 661 2014-01-08 11:26:39Z aolah76 $ --> |
<!-- |
phpSysInfo language file Language: English Created by: Ambrus Sandor Olah |
--> |
<tns:translationPlugin language="english" charset="utf-8" |
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd"> |
<expression id="plugin_uprecords_001" name="uprecords_title"> |
<exp>Uprecords</exp> |
</expression> |
<expression id="plugin_uprecords_101" name="uprecords_hash"> |
<exp>#</exp> |
</expression> |
<expression id="plugin_uprecords_102" name="uprecords_uptime"> |
<exp>Uptime</exp> |
</expression> |
<expression id="plugin_uprecords_103" name="uprecords_system"> |
<exp>System</exp> |
</expression> |
<expression id="plugin_uprecords_104" name="uprecords_bootup"> |
<exp>Boot up</exp> |
</expression> |
</tns:translationPlugin> |
/web/acc/phpsysinfo/plugins/uprecords/lang/fr.xml |
---|
0,0 → 1,23 |
<?xml version="1.0" encoding="utf-8"?> |
<!-- |
phpSysInfo language file Language: French Created by: phpsysinfo |
--> |
<tns:translationPlugin language="french" charset="utf-8" |
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd"> |
<expression id="plugin_uprecords_001" name="uprecords_title"> |
<exp>Uprecords</exp> |
</expression> |
<expression id="plugin_uprecords_101" name="uprecords_hash"> |
<exp>#</exp> |
</expression> |
<expression id="plugin_uprecords_102" name="uprecords_uptime"> |
<exp>Uptime</exp> |
</expression> |
<expression id="plugin_uprecords_103" name="uprecords_system"> |
<exp>Système</exp> |
</expression> |
<expression id="plugin_uprecords_104" name="uprecords_bootup"> |
<exp>Démarrage</exp> |
</expression> |
</tns:translationPlugin> |
/web/acc/phpsysinfo/plugins/uprecords/lang/gr.xml |
---|
0,0 → 1,24 |
<?xml version="1.0" encoding="utf-8"?> |
<!-- $Id: gr.xml 661 2014-01-08 11:26:39Z aolah76 $ --> |
<!-- |
phpSysInfo language file Language: Greek Created by: ChriZathens |
--> |
<tns:translationPlugin language="greek" charset="utf-8" |
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd"> |
<expression id="plugin_uprecords_001" name="uprecords_title"> |
<exp>Uprecords</exp> |
</expression> |
<expression id="plugin_uprecords_101" name="uprecords_hash"> |
<exp>#</exp> |
</expression> |
<expression id="plugin_uprecords_102" name="uprecords_uptime"> |
<exp>Ώρες Λειτουργίας</exp> |
</expression> |
<expression id="plugin_uprecords_103" name="uprecords_system"> |
<exp>Σύστημα</exp> |
</expression> |
<expression id="plugin_uprecords_104" name="uprecords_bootup"> |
<exp>Εκκίνηση</exp> |
</expression> |
</tns:translationPlugin> |
/web/acc/phpsysinfo/plugins/uprecords/lang/hu.xml |
---|
0,0 → 1,24 |
<?xml version="1.0" encoding="utf-8"?> |
<!-- $Id: hu.xml 661 2014-01-08 11:26:39Z aolah76 $ --> |
<!-- |
phpSysInfo language file Language: Hungarian Created by: Ambrus Sandor Olah |
--> |
<tns:translationPlugin language="hungarian" charset="utf-8" |
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd"> |
<expression id="plugin_uprecords_001" name="uprecords_title"> |
<exp>Uprecords</exp> |
</expression> |
<expression id="plugin_uprecords_101" name="uprecords_hash"> |
<exp>#</exp> |
</expression> |
<expression id="plugin_uprecords_102" name="uprecords_uptime"> |
<exp>Uptime</exp> |
</expression> |
<expression id="plugin_uprecords_103" name="uprecords_system"> |
<exp>Rendszer</exp> |
</expression> |
<expression id="plugin_uprecords_104" name="uprecords_bootup"> |
<exp>Rendszerindítás időpontja</exp> |
</expression> |
</tns:translationPlugin> |
/web/acc/phpsysinfo/plugins/uprecords/lang/pl.xml |
---|
0,0 → 1,24 |
<?xml version="1.0" encoding="utf-8"?> |
<!-- $Id: pl.xml 661 2014-01-08 11:26:39Z aolah76 $ --> |
<!-- |
phpSysInfo language file Language: Polish Created by: Created by: Mieczyslaw Nalewaj |
--> |
<tns:translationPlugin language="polish" charset="utf-8" |
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd"> |
<expression id="plugin_uprecords_001" name="uprecords_title"> |
<exp>Uprecords</exp> |
</expression> |
<expression id="plugin_uprecords_101" name="uprecords_hash"> |
<exp>#</exp> |
</expression> |
<expression id="plugin_uprecords_102" name="uprecords_uptime"> |
<exp>Czas pracy</exp> |
</expression> |
<expression id="plugin_uprecords_103" name="uprecords_system"> |
<exp>System</exp> |
</expression> |
<expression id="plugin_uprecords_104" name="uprecords_bootup"> |
<exp>Wystartował</exp> |
</expression> |
</tns:translationPlugin> |
/web/acc/phpsysinfo/plugins/uprecords/lang/ro.xml |
---|
0,0 → 1,24 |
<?xml version="1.0" encoding="utf-8"?> |
<!-- $Id: ro.xml 661 2014-01-08 11:26:39Z aolah76 $ --> |
<!-- |
phpSysInfo language file Language: Romană Created by: Iulian Alexe |
--> |
<tns:translationPlugin language="romana" charset="utf-8" |
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd"> |
<expression id="plugin_uprecords_001" name="uprecords_title"> |
<exp>Uprecords</exp> |
</expression> |
<expression id="plugin_uprecords_101" name="uprecords_hash"> |
<exp>#</exp> |
</expression> |
<expression id="plugin_uprecords_102" name="uprecords_uptime"> |
<exp>Uptime</exp> |
</expression> |
<expression id="plugin_uprecords_103" name="uprecords_system"> |
<exp>System</exp> |
</expression> |
<expression id="plugin_uprecords_104" name="uprecords_bootup"> |
<exp>Boot up</exp> |
</expression> |
</tns:translationPlugin> |
/web/acc/phpsysinfo/plugins/uprecords/lang/ru.xml |
---|
0,0 → 1,24 |
<?xml version="1.0" encoding="utf-8"?> |
<!-- $Id: ru.xml 661 2015-01-05 11:26:39Z $ --> |
<!-- |
phpSysInfo language file Language: Russian Created by: Denis Sevostyanov (den007) |
--> |
<tns:translationPlugin language="russian" charset="utf-8" |
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd"> |
<expression id="plugin_uprecords_001" name="uprecords_title"> |
<exp>Состояное системы</exp> |
</expression> |
<expression id="plugin_uprecords_101" name="uprecords_hash"> |
<exp>#</exp> |
</expression> |
<expression id="plugin_uprecords_102" name="uprecords_uptime"> |
<exp>Аптайм</exp> |
</expression> |
<expression id="plugin_uprecords_103" name="uprecords_system"> |
<exp>Система</exp> |
</expression> |
<expression id="plugin_uprecords_104" name="uprecords_bootup"> |
<exp>Загружено</exp> |
</expression> |
</tns:translationPlugin> |