Added diagnostic agent connection status.
This commit is contained in:
parent
0118f5209e
commit
e3d9ac6fde
16
meshagent.js
16
meshagent.js
|
@ -778,7 +778,13 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
|
||||||
if (nodes.length == 1)
|
if (nodes.length == 1)
|
||||||
{
|
{
|
||||||
self.realNodeKey = nodes[0].raid;
|
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
|
} else
|
||||||
{
|
{
|
||||||
self.send(JSON.stringify({ action: 'diagnostic', value: { command: 'query', value: null } }));
|
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) {
|
db.Get('da' + obj.dbNodeKey, function (err, nodes) {
|
||||||
if (nodes.length == 1) {
|
if (nodes.length == 1) {
|
||||||
obj.realNodeKey = nodes[0].raid;
|
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 {
|
} else {
|
||||||
obj.send(JSON.stringify({ action: 'diagnostic', value: { command: 'query', value: null } }));
|
obj.send(JSON.stringify({ action: 'diagnostic', value: { command: 'query', value: null } }));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "meshcentral",
|
"name": "meshcentral",
|
||||||
"version": "0.3.2-k",
|
"version": "0.3.2-l",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"Remote Management",
|
"Remote Management",
|
||||||
"Intel AMT",
|
"Intel AMT",
|
||||||
|
|
|
@ -7577,7 +7577,7 @@
|
||||||
QV('topbar', x != 0);
|
QV('topbar', x != 0);
|
||||||
if ((x == 0) && (webPageFullScreen)) {
|
if ((x == 0) && (webPageFullScreen)) {
|
||||||
QC('body').add("arg_hide");
|
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
|
// Please check. I think this part is not needed anymore. Removing class will revert to default style
|
||||||
//QS('page_content').position = '';
|
//QS('page_content').position = '';
|
||||||
|
|
Loading…
Reference in New Issue