diff --git a/docs/docs/meshcentral/config.md b/docs/docs/meshcentral/config.md
index 95e43249..2bc3a643 100644
--- a/docs/docs/meshcentral/config.md
+++ b/docs/docs/meshcentral/config.md
@@ -1642,10 +1642,10 @@ See description for information about each item.
"type": "object",
"description": "LDAP options passed to ldapauth-fork"
},
- "hidePowerState": {
+ "hidePowerTimeline": {
"type": "boolean",
"default": false,
- "description": "When enabled, this will hide the power state table in the web ui"
+ "description": "When enabled, this will hide the power timeline in the web ui"
},
"agentInviteCodes": {
"type": "boolean",
diff --git a/meshcentral-config-schema.json b/meshcentral-config-schema.json
index 93560b1f..68769f94 100644
--- a/meshcentral-config-schema.json
+++ b/meshcentral-config-schema.json
@@ -1640,10 +1640,10 @@
"type": "object",
"description": "LDAP options passed to ldapauth-fork"
},
- "hidePowerState": {
+ "hidePowerTimeline": {
"type": "boolean",
"default": false,
- "description": "When enabled, this will hide the power state table in the web ui"
+ "description": "When enabled, this will hide the power timeline in the web ui"
},
"agentInviteCodes": {
"type": "boolean",
diff --git a/sample-config-advanced.json b/sample-config-advanced.json
index 0b9a92c7..8a1314ae 100644
--- a/sample-config-advanced.json
+++ b/sample-config-advanced.json
@@ -189,7 +189,7 @@
"_agentKey": [ "abc", "123" ],
"_ipkvm": false,
"minify": true,
- "_hidePowerState": true,
+ "_hidePowerTimeline": true,
"_newAccounts": true,
"_newAccountsUserGroups": [ "ugrp//xxxxxxxxxxxxxxxxx" ],
"_userNameIsEmail": true,
diff --git a/views/default-mobile.handlebars b/views/default-mobile.handlebars
index 5ce93198..e050b84c 100644
--- a/views/default-mobile.handlebars
+++ b/views/default-mobile.handlebars
@@ -1250,6 +1250,7 @@
var logoutControls = JSON.parse(decodeURIComponent('{{{logoutControls}}}'));
var authCookieRenewTimer = null;
var webRelayPort = parseInt('{{{webRelayPort}}}');
+ var hidePowerTimeline = {{{hidePowerTimeline}}};
var webRelayDns = '{{{webRelayDns}}}';
var meshserver = null;
var xdr = null;
@@ -3917,7 +3918,7 @@
// Draw device power bars. The bars are 766px wide.
function drawDeviceTimeline() {
- if (currentNode.mtype == 3) { QH('p10html2', '
'); return; }
+ if (currentNode.mtype == 3 || hidePowerTimeline) { QH('p10html2', '
'); return; }
var timeline = null, now = Date.now();
if (currentNode._id == powerTimelineNode) { timeline = powerTimeline; }
diff --git a/views/default.handlebars b/views/default.handlebars
index f33a23ee..1612b4ab 100644
--- a/views/default.handlebars
+++ b/views/default.handlebars
@@ -1473,6 +1473,7 @@
var sessionTime = parseInt('{{{sessiontime}}}');
var webRelayPort = parseInt('{{{webRelayPort}}}');
var webRelayDns = '{{{webRelayDns}}}';
+ var hidePowerTimeline = {{{hidePowerTimeline}}};
var sessionRefreshTimer = null;
var domain = '{{{domain}}}';
var domainUrl = '{{{domainurl}}}';
@@ -8267,7 +8268,7 @@
// Draw device power bars. The bars are 766px wide.
function drawDeviceTimeline() {
- if ((currentNode == null) || (xxcurrentView < 10) || (xxcurrentView > 19) || (currentNode.mtype == 3)) return;
+ if ((currentNode == null) || (xxcurrentView < 10) || (xxcurrentView > 19) || (currentNode.mtype == 3) || (hidePowerTimeline)) return;
var timeline = null, now = Date.now();
if (currentNode._id == powerTimelineNode) { timeline = powerTimeline; }
@@ -8315,10 +8316,7 @@
// Add the language and timezone of the browser to the server so the server can localize the time correctly.
var tz = '';
try { tz = '&tz=' + encodeURIComponentEx(Intl.DateTimeFormat().resolvedOptions().timeZone); } catch (ex) {}
- const hidePowerState = {{{hidePowerState}}};
- if(!hidePowerState){
- QH('p10html2', '
' + "Day" + ' | ' + "7 Day Power State" + ' |
' + x + '
');
- }
+ QH('p10html2', '' + "Day" + ' | ' + "7 Day Power State" + ' |
' + x + '
');
}
// Return a color for the given power state
diff --git a/webserver.js b/webserver.js
index f40459ae..190a1532 100644
--- a/webserver.js
+++ b/webserver.js
@@ -3105,7 +3105,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
pluginHandler: (parent.pluginHandler == null) ? 'null' : parent.pluginHandler.prepExports(),
webRelayPort: ((args.relaydns != null) ? ((typeof args.aliasport == 'number') ? args.aliasport : args.port) : ((parent.webrelayserver != null) ? ((typeof args.relayaliasport == 'number') ? args.relayaliasport : parent.webrelayserver.port) : 0)),
webRelayDns: ((args.relaydns != null) ? args.relaydns[0] : ''),
- hidePowerState: (domain.hidepowerstate ? 'true' : 'false')
+ hidePowerTimeline: (domain.hidepowertimeline ? 'true' : 'false')
}, dbGetFunc.req, domain), user);
}
xdbGetFunc.req = req;