mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-14 00:04:59 -05:00
Merge pull request #5398 from Ylianst/hide-powerstate
hidePowerTimeline
This commit is contained in:
commit
a0b7280893
@ -1642,6 +1642,11 @@ See description for information about each item.
|
||||
"type": "object",
|
||||
"description": "LDAP options passed to ldapauth-fork"
|
||||
},
|
||||
"hidePowerTimeline": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "When enabled, this will hide the power timeline in the web ui"
|
||||
},
|
||||
"agentInviteCodes": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
|
@ -1640,6 +1640,11 @@
|
||||
"type": "object",
|
||||
"description": "LDAP options passed to ldapauth-fork"
|
||||
},
|
||||
"hidePowerTimeline": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "When enabled, this will hide the power timeline in the web ui"
|
||||
},
|
||||
"agentInviteCodes": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
|
@ -189,6 +189,7 @@
|
||||
"_agentKey": [ "abc", "123" ],
|
||||
"_ipkvm": false,
|
||||
"minify": true,
|
||||
"_hidePowerTimeline": true,
|
||||
"_newAccounts": true,
|
||||
"_newAccountsUserGroups": [ "ugrp//xxxxxxxxxxxxxxxxx" ],
|
||||
"_userNameIsEmail": true,
|
||||
|
@ -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', '<br />'); return; }
|
||||
if (currentNode.mtype == 3 || hidePowerTimeline) { QH('p10html2', '<br />'); return; }
|
||||
var timeline = null, now = Date.now();
|
||||
if (currentNode._id == powerTimelineNode) { timeline = powerTimeline; }
|
||||
|
||||
|
@ -1474,6 +1474,7 @@
|
||||
var sessionTime = parseInt('{{{sessiontime}}}');
|
||||
var webRelayPort = parseInt('{{{webRelayPort}}}');
|
||||
var webRelayDns = '{{{webRelayDns}}}';
|
||||
var hidePowerTimeline = {{{hidePowerTimeline}}};
|
||||
var sessionRefreshTimer = null;
|
||||
var domain = '{{{domain}}}';
|
||||
var domainUrl = '{{{domainurl}}}';
|
||||
@ -8270,7 +8271,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; }
|
||||
|
||||
|
@ -3104,7 +3104,8 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
|
||||
amtscanoptions: amtscanoptions,
|
||||
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] : '')
|
||||
webRelayDns: ((args.relaydns != null) ? args.relaydns[0] : ''),
|
||||
hidePowerTimeline: (domain.hidepowertimeline ? 'true' : 'false')
|
||||
}, dbGetFunc.req, domain), user);
|
||||
}
|
||||
xdbGetFunc.req = req;
|
||||
|
Loading…
Reference in New Issue
Block a user