mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-09-11 08:55:32 +03:00
showNotesPanel in device view (#5543)
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
0ce305ebcf
commit
c05cbeae88
@ -1658,6 +1658,11 @@ See description for information about each item.
|
||||
"default": false,
|
||||
"description": "When enabled, this will hide the power timeline in the web ui"
|
||||
},
|
||||
"showNotesPanel": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "When enabled, this will show the notes panel in the device view"
|
||||
},
|
||||
"agentInviteCodes": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
|
@ -1651,6 +1651,11 @@
|
||||
"default": false,
|
||||
"description": "When enabled, this will hide the power timeline in the web ui"
|
||||
},
|
||||
"showNotesPanel": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "When enabled, this will show the notes panel in the device view"
|
||||
},
|
||||
"agentInviteCodes": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
|
@ -3248,3 +3248,23 @@ a {
|
||||
border: 1px solid #ccc;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
#notesPanel table {
|
||||
color: black;
|
||||
background-color: #EEE;
|
||||
border-color: #AAA;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#notesPanel thead {
|
||||
background-color: #AAA;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#notesPanel thead tr {
|
||||
background-color: #AAA;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
@ -191,6 +191,7 @@
|
||||
"_ipkvm": false,
|
||||
"minify": true,
|
||||
"_hidePowerTimeline": true,
|
||||
"_showNotesPanel": true,
|
||||
"_newAccounts": true,
|
||||
"_newAccountsUserGroups": [ "ugrp//xxxxxxxxxxxxxxxxx" ],
|
||||
"_userNameIsEmail": true,
|
||||
|
@ -611,6 +611,18 @@
|
||||
<td style=width:auto valign=top>
|
||||
<div id=p10html></div>
|
||||
</td>
|
||||
<td style=width:100px;display:none id=notesPanel valign=top>
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>Notes</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><textarea id=notesPanelArea readonly style=width:300px;height:200px;resize:none;overflow-y:scroll></textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
<td style=width:20px></td>
|
||||
<td style=width:200px;vertical-align:top;position:relative valign=top>
|
||||
<div class="deviceNotifyLargeDot">
|
||||
@ -1485,6 +1497,7 @@
|
||||
var webRelayPort = parseInt('{{{webRelayPort}}}');
|
||||
var webRelayDns = '{{{webRelayDns}}}';
|
||||
var hidePowerTimeline = {{{hidePowerTimeline}}};
|
||||
var showNotesPanel = {{{showNotesPanel}}};
|
||||
var sessionRefreshTimer = null;
|
||||
var domain = '{{{domain}}}';
|
||||
var domainUrl = '{{{domainurl}}}';
|
||||
@ -2871,6 +2884,9 @@
|
||||
QV('idx_dlgOkButton', true);
|
||||
focusTextBox('d2devNotes');
|
||||
}
|
||||
}else{
|
||||
if (message.notes) { QH('notesPanelArea', decodeURIComponent(message.notes)); } else { QH('notesPanelArea', ''); }
|
||||
if (showNotesPanel && message.notes) { QV('notesPanel',true); }else{ QV('notesPanel', false); }
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -7680,6 +7696,7 @@
|
||||
meshserver.send({ action: 'lastconnect', nodeid: currentNode._id });
|
||||
meshserver.send({ action: 'getsysinfo', nodeid: currentNode._id });
|
||||
meshserver.send({ action: 'getnetworkinfo', nodeid: currentNode._id });
|
||||
meshserver.send({ action: 'getNotes', id: currentNode._id });
|
||||
QH('p17info2', '');
|
||||
}
|
||||
|
||||
@ -7964,7 +7981,11 @@
|
||||
meshserver.send({ action: 'getNotes', id: decodeURIComponent(noteid) });
|
||||
}
|
||||
|
||||
function showNotesEx(buttons, tag) { meshserver.send({ action: 'setNotes', id: decodeURIComponent(tag), notes: encodeURIComponentEx(Q('d2devNotes').value) }); }
|
||||
function showNotesEx(buttons, tag) {
|
||||
QH('notesPanelArea', Q('d2devNotes').value);
|
||||
meshserver.send({ action: 'setNotes', id: decodeURIComponent(tag), notes: encodeURIComponentEx(Q('d2devNotes').value) });
|
||||
if (showNotesPanel && Q('d2devNotes').value != '') { QV('notesPanel',true); }else{ QV('notesPanel', false); }
|
||||
}
|
||||
|
||||
function openIpKvmRemoteControl(nodeid) {
|
||||
if (xxdialogMode) return;
|
||||
|
@ -3105,7 +3105,8 @@ 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] : ''),
|
||||
hidePowerTimeline: (domain.hidepowertimeline ? 'true' : 'false')
|
||||
hidePowerTimeline: (domain.hidepowertimeline ? 'true' : 'false'),
|
||||
showNotesPanel: (domain.shownotespanel ? 'true' : 'false')
|
||||
}, dbGetFunc.req, domain), user);
|
||||
}
|
||||
xdbGetFunc.req = req;
|
||||
|
Loading…
Reference in New Issue
Block a user