* 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,8 +34,15 @@ var quotas_show = false, quotas_table;
* @param {jQuery} xml plugin-XML
*/
function quotas_populate(xml) {
var hostname = "";
quotas_table.fnClearTable();
hostname = $("Plugins Plugin_Quotas", xml).attr('Hostname');
if (hostname !== undefined) {
$('span[class=Hostname_Quotas]').html(hostname);
}
$("Plugins Plugin_Quotas Quota", xml).each(function quotas_getquota(id) {
var user = "", bused = 0, bsoft = 0, bhard = 0, bpuse = 0, fpuse = 0, fused = 0, fsoft = 0, fhard = 0;
user = $(this).attr("User");
@@ -59,23 +66,25 @@ function quotas_populate(xml) {
function quotas_buildTable() {
var html = "";
html += "<table id=\"Plugin_QuotasTable\" style=\"border-spacing:0;\">\n";
html += " <thead>\n";
html += " <tr>\n";
html += " <th>" + genlang(3, false, "Quotas") + "</th>\n";
html += " <th class=\"right\">" + genlang(4, false, "Quotas") + "</th>\n";
html += " <th class=\"right\">" + genlang(5, false, "Quotas") + "</th>\n";
html += " <th class=\"right\">" + genlang(6, false, "Quotas") + "</th>\n";
html += " <th>" + genlang(7, false, "Quotas") + "</th>\n";
html += " <th class=\"right\">" + genlang(8, false, "Quotas") + "</th>\n";
html += " <th class=\"right\">" + genlang(9, false, "Quotas") + "</th>\n";
html += " <th class=\"right\">" + genlang(10, false, "Quotas") + "</th>\n";
html += " <th>" + genlang(11, false, "Quotas") + "</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_QuotasTable\" style=\"border-collapse:collapse;\">\n";
html += " <thead>\n";
html += " <tr>\n";
html += " <th>" + genlang(2, "Quotas") + "</th>\n";
html += " <th class=\"right\">" + genlang(3, "Quotas") + "</th>\n";
html += " <th class=\"right\">" + genlang(4, "Quotas") + "</th>\n";
html += " <th class=\"right\">" + genlang(5, "Quotas") + "</th>\n";
html += " <th>" + genlang(6, "Quotas") + "</th>\n";
html += " <th class=\"right\">" + genlang(7, "Quotas") + "</th>\n";
html += " <th class=\"right\">" + genlang(8, "Quotas") + "</th>\n";
html += " <th class=\"right\">" + genlang(9, "Quotas") + "</th>\n";
html += " <th>" + genlang(10, "Quotas") + "</th>\n";
html += " </tr>\n";
html += " </thead>\n";
html += " <tbody>\n";
html += " </tbody>\n";
html += " </table>\n";
html += "</div>\n";
$("#Plugin_Quotas").append(html);
@@ -114,6 +123,7 @@ function quotas_buildTable() {
* load the xml via ajax
*/
function quotas_request() {
$("#Reload_QuotasTable").attr("title", "reload");
$.ajax({
url: "xml.php?plugin=Quotas",
dataType: "xml",
@@ -133,7 +143,7 @@ function quotas_request() {
$(document).ready(function quotas_buildpage() {
$("#footer").before(buildBlock("Quotas", 1, true));
$("#Plugin_Quotas").css("width", "915px");
$("#Plugin_Quotas").addClass("fullsize");
quotas_buildTable();
@@ -141,6 +151,6 @@ $(document).ready(function quotas_buildpage() {
$("#Reload_QuotasTable").click(function quotas_reload(id) {
quotas_request();
$("#Reload_QuotasTable").attr("title",datetime());
$(this).attr("title", datetime());
});
});

View File

@@ -3,36 +3,36 @@ function renderPlugin_quotas(data) {
var directives = {
ByteUsed: {
text: function () {
return formatBytes(this["ByteUsed"], data["Options"]["@attributes"]["byteFormat"]);
html: function () {
return formatBytes(this.ByteUsed, data.Options["@attributes"].byteFormat);
}
},
ByteSoft: {
text: function () {
return formatBytes(this["ByteSoft"], data["Options"]["@attributes"]["byteFormat"]);
html: function () {
return formatBytes(this.ByteSoft, data.Options["@attributes"].byteFormat);
}
},
ByteHard: {
text: function () {
return formatBytes(this["ByteHard"], data["Options"]["@attributes"]["byteFormat"]);
html: function () {
return formatBytes(this.ByteHard, data.Options["@attributes"].byteFormat);
}
},
BytePercentUsed: {
html: function () {
return '<div class="progress"><div class="progress-bar progress-bar-info" style="width: ' + this["BytePercentUsed"] + '%;"></div>' +
'</div><div class="percent">' + this["BytePercentUsed"] + '%</div>';
return '<div class="progress"><div class="progress-bar progress-bar-info" style="width:' + this.BytePercentUsed + '%;"></div>' +
'</div><div class="percent">' + this.BytePercentUsed + '%</div>';
}
},
FilePercentUsed: {
html: function () {
return '<div class="progress"><div class="progress-bar progress-bar-info" style="width: ' + this["FilePercentUsed"] + '%;"></div>' +
'</div><div class="percent">' + this["FilePercentUsed"] + '%</div>';
return '<div class="progress"><div class="progress-bar progress-bar-info" style="width:' + this.FilePercentUsed + '%;"></div>' +
'</div><div class="percent">' + this.FilePercentUsed + '%</div>';
}
}
};
if (data['Plugins']['Plugin_Quotas'] !== undefined) {
var qtitems = items(data['Plugins']['Plugin_Quotas']['Quota']);
if (data.Plugins.Plugin_Quotas !== undefined) {
var qtitems = items(data.Plugins.Plugin_Quotas.Quota);
if (qtitems.length > 0) {
var qt_memory = [];
qt_memory.push_attrs(qtitems);