Added diagnostic agent connection status.

This commit is contained in:
Ylian Saint-Hilaire 2019-04-12 16:12:31 -07:00
parent 75fef431c9
commit 9beb7b8a89
3 changed files with 16 additions and 4 deletions

View File

@ -778,7 +778,13 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
if (nodes.length == 1)
{
self.realNodeKey = nodes[0].raid;
self.send(JSON.stringify({ action: 'diagnostic', value: { command: 'query', value: self.realNodeKey } }));
// Get agent connection state
var agentConnected = false;
var state = parent.parent.GetConnectivityState(self.realNodeKey);
if (state) { agentConnected = ((state.connectivity & 1) != 0) }
self.send(JSON.stringify({ action: 'diagnostic', value: { command: 'query', value: self.realNodeKey, agent: agentConnected } }));
} else
{
self.send(JSON.stringify({ action: 'diagnostic', value: { command: 'query', value: null } }));
@ -1124,7 +1130,13 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
db.Get('da' + obj.dbNodeKey, function (err, nodes) {
if (nodes.length == 1) {
obj.realNodeKey = nodes[0].raid;
obj.send(JSON.stringify({ action: 'diagnostic', value: { command: 'query', value: obj.realNodeKey } }));
// Get agent connection state
var agentConnected = false;
var state = parent.parent.GetConnectivityState(obj.realNodeKey);
if (state) { agentConnected = ((state.connectivity & 1) != 0) }
obj.send(JSON.stringify({ action: 'diagnostic', value: { command: 'query', value: obj.realNodeKey, agent: agentConnected } }));
} else {
obj.send(JSON.stringify({ action: 'diagnostic', value: { command: 'query', value: null } }));
}

View File

@ -1,6 +1,6 @@
{
"name": "meshcentral",
"version": "0.3.2-k",
"version": "0.3.2-l",
"keywords": [
"Remote Management",
"Intel AMT",

View File

@ -7577,7 +7577,7 @@
QV('topbar', x != 0);
if ((x == 0) && (webPageFullScreen)) {
QC('body').add("arg_hide");
QS('column_l').height = 'calc(100vh - 110px)';
QS('column_l').height = 'calc(100vh - 111px)';
// Please check. I think this part is not needed anymore. Removing class will revert to default style
//QS('page_content').position = '';