* Mon May 12 2025 Brian Read <brianr@koozali.org> 11.0.0-1.sme

- Adding SM2 panel [SME: 13004]
- Upgrade to phpsysinfo 3.4.4
- Add code to delete inline styles and add css to make it look better.
- version saved / built uses the static version, which means no drops downs and choices.
This commit is contained in:
2025-05-14 16:14:01 +01:00
parent 80b1da5fa5
commit c8ce77259d
952 changed files with 51341 additions and 28699 deletions

View File

@@ -34,18 +34,23 @@ var psstatus_show = false, psstatus_table;
* @param {jQuery} xml plugin-XML
*/
function psstatus_populate(xml) {
var name = "", status = 0, state = "";
var name = "", status = 0, state = "", hostname = "";
psstatus_table.fnClearTable();
hostname = $("Plugins Plugin_PSStatus", xml).attr('Hostname');
if (hostname !== undefined) {
$('span[class=Hostname_PSStatus]').html(hostname);
}
$("Plugins Plugin_PSStatus Process", xml).each(function psstatus_getprocess(idp) {
name = $(this).attr("Name");
status = parseInt($(this).attr("Status"), 10);
if (!isNaN(status) && (status === 1)) {
state = "<span style=\"display:none;\">" + status.toString() + "</span><img src=\"./plugins/psstatus/gfx/online.png\" alt=\"online\" />";
state = "<span style=\"display:none;\">" + status.toString() + "</span><img src=\"./plugins/psstatus/gfx/online.gif\" alt=\"online\" title=\"\" style=\"width:18px;\" />";
}
else {
state = "<span style=\"display:none;\">" + status.toString() + "</span><img src=\"./plugins/psstatus/gfx/offline.png\" alt=\"offline\" />";
state = "<span style=\"display:none;\">" + status.toString() + "</span><img src=\"./plugins/psstatus/gfx/offline.gif\" alt=\"offline\" title=\"\" style=\"width:18px;\" />";
}
psstatus_table.fnAddData(["<span style=\"display:none;\">" + name + "</span>" + name, state]);
psstatus_show = true;
@@ -58,16 +63,18 @@ function psstatus_populate(xml) {
function psstatus_buildTable() {
var html = "";
html += "<table id=\"Plugin_PSStatusTable\" style=\"border-spacing:0;\">\n";
html += " <thead>\n";
html += " <tr>\n";
html += " <th>" + genlang(3, false, "PSStatus") + "</th>\n";
html += " <th>" + genlang(4, false, "PSStatus") + "</th>\n";
html += " </tr>\n";
html += " </thead>\n";
html += " <tbody>\n";
html += " </tbody>\n";
html += "</table>\n";
html += "<div style=\"overflow-x:auto;\">\n";
html += " <table id=\"Plugin_PSStatusTable\" style=\"border-collapse:collapse;\">\n";
html += " <thead>\n";
html += " <tr>\n";
html += " <th>" + genlang(2, "PSStatus") + "</th>\n";
html += " <th>" + genlang(3, "PSStatus") + "</th>\n";
html += " </tr>\n";
html += " </thead>\n";
html += " <tbody>\n";
html += " </tbody>\n";
html += " </table>\n";
html += "</div>\n";
$("#Plugin_PSStatus").append(html);
@@ -92,6 +99,7 @@ function psstatus_buildTable() {
* load the xml via ajax
*/
function psstatus_request() {
$("#Reload_PSStatusTable").attr("title", "reload");
$.ajax({
url: "xml.php?plugin=PSStatus",
dataType: "xml",
@@ -111,7 +119,7 @@ function psstatus_request() {
$(document).ready(function psstatus_buildpage() {
$("#footer").before(buildBlock("PSStatus", 1, true));
$("#Plugin_PSStatus").css("width", "451px");
$("#Plugin_PSStatus").addClass("halfsize");
psstatus_buildTable();
@@ -119,6 +127,6 @@ $(document).ready(function psstatus_buildpage() {
$("#Reload_PSStatusTable").click(function psstatus_reload(id) {
psstatus_request();
$("#Reload_PSStatusTable").attr("title",datetime());
$(this).attr("title", datetime());
});
});

View File

@@ -1,15 +1,20 @@
function renderPlugin_psstatus(data) {
var directives = {
Status: {
Status1: {
text: function () {
return (this['Status'] === "1") ? "ON" : "OFF";
return (this.Status === "1") ? "ON" : "";
}
},
Status0: {
text: function () {
return (this.Status === "1") ? "" : "OFF";
}
}
};
if (data['Plugins']['Plugin_PSStatus'] !== undefined) {
var psitems = items(data['Plugins']['Plugin_PSStatus']['Process']);
if (data.Plugins.Plugin_PSStatus !== undefined) {
var psitems = items(data.Plugins.Plugin_PSStatus.Process);
if (psitems.length > 0) {
var ps_memory = [];
ps_memory.push_attrs(psitems);