From 126c8856cb22066e7e3d4d2d96ade58464f20c2b Mon Sep 17 00:00:00 2001 From: si458 Date: Sat, 22 Mar 2025 16:29:36 +0000 Subject: [PATCH] fix amt/cira browser notification wrong way round Signed-off-by: si458 --- meshcentral.js | 2 +- translate/translate.json | 40 +++++++++++++++++++++++++-------------- views/default.handlebars | 8 ++++---- views/default3.handlebars | 8 ++++---- 4 files changed, 35 insertions(+), 23 deletions(-) diff --git a/meshcentral.js b/meshcentral.js index f9f6ea82..3c877f11 100644 --- a/meshcentral.js +++ b/meshcentral.js @@ -2755,7 +2755,7 @@ function CreateMeshCentralServer(config, args) { // Clear the connectivity state of a node and setup the server so that messages can be routed correctly. // meshId: mesh identifier of format mesh/domain/meshidhex // nodeId: node identifier of format node/domain/nodeidhex - // connectType: Bitmask, 1 = MeshAgent, 2 = Intel AMT CIRA, 3 = Intel AMT local. + // connectType: Bitmask, 1 = MeshAgent, 2 = Intel AMT CIRA, 4 = Intel AMT local. obj.ClearConnectivityState = function (meshid, nodeid, connectType, serverid, extraInfo) { //console.log('ClearConnectivity for ' + nodeid.substring(0, 16) + ', Type: ' + connectTypeStrings[connectType] + (serverid == null?(''):(', ServerId: ' + serverid))); if ((serverid == null) && (obj.multiServer != null)) { obj.multiServer.DispatchMessage({ action: 'ClearConnectivityState', meshid: meshid, nodeid: nodeid, connectType: connectType, extraInfo: extraInfo }); } diff --git a/translate/translate.json b/translate/translate.json index c045d86b..3cc3be2b 100644 --- a/translate/translate.json +++ b/translate/translate.json @@ -41224,10 +41224,13 @@ "tr": "Intel AMT CIRA bağlandı", "uk": "Intel AMT CIRA підключено", "zh-chs": "英特尔 AMT CIRA 已连接", - "zh-cht": "英特爾 AMT CIRA 已連接", + "zh-cht": "英特爾 AMT CIRA 已連接" + }, + { + "en": "Intel AMT CIRA detected", "xloc": [ - "default.handlebars->47->274", - "default3.handlebars->35->271" + "default.handlebars->47->273", + "default3.handlebars->35->270" ] }, { @@ -41254,10 +41257,20 @@ "tr": "Intel AMT CIRA'nın bağlantısı kesildi", "uk": "Intel AMT CIRA припинено", "zh-chs": "英特尔 AMT CIRA 断开连接", - "zh-cht": "英特爾 AMT CIRA 斷開連接", + "zh-cht": "英特爾 AMT CIRA 斷開連接" + }, + { + "en": "Intel AMT CIRA not detected", "xloc": [ - "default.handlebars->47->278", - "default3.handlebars->35->275" + "default.handlebars->47->277", + "default3.handlebars->35->274" + ] + }, + { + "en": "Intel AMT connected", + "xloc": [ + "default.handlebars->47->274", + "default3.handlebars->35->271" ] }, { @@ -41284,10 +41297,13 @@ "tr": "Intel AMT algılandı", "uk": "Виявлено Intel AMT", "zh-chs": "检测到英特尔 AMT", - "zh-cht": "檢測到英特爾 AMT", + "zh-cht": "檢測到英特爾 AMT" + }, + { + "en": "Intel AMT disconnected", "xloc": [ - "default.handlebars->47->273", - "default3.handlebars->35->270" + "default.handlebars->47->278", + "default3.handlebars->35->275" ] }, { @@ -41344,11 +41360,7 @@ "tr": "Intel AMT algılanmadı", "uk": "Intel AMT не виявлено", "zh-chs": "未检测到英特尔 AMT", - "zh-cht": "未檢測到英特爾 AMT", - "xloc": [ - "default.handlebars->47->277", - "default3.handlebars->35->274" - ] + "zh-cht": "未檢測到英特爾 AMT" }, { "bs": "Intel ASCII", diff --git a/views/default.handlebars b/views/default.handlebars index c2528866..9bc997d3 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -3692,15 +3692,15 @@ if ((node.agent != null) && (node.agent.root === false)) { agentPrivilages = "Agent connected with limited privilages"; } var abc = { title: node.name, icon: node.icon, nodeid: node._id, id: message.event.id }; if (((node.conn & 1) == 0) && ((message.event.conn & 1) != 0)) { abc.text = agentPrivilages; addNotification(abc); } - if (((node.conn & 2) == 0) && ((message.event.conn & 2) != 0)) { abc.text = "Intel AMT detected"; addNotification(abc); } - if (((node.conn & 4) == 0) && ((message.event.conn & 4) != 0)) { abc.text = "Intel AMT CIRA connected"; addNotification(abc); } + if (((node.conn & 2) == 0) && ((message.event.conn & 2) != 0)) { abc.text = "Intel AMT CIRA detected"; addNotification(abc); } + if (((node.conn & 4) == 0) && ((message.event.conn & 4) != 0)) { abc.text = "Intel AMT connected"; addNotification(abc); } if (((node.conn & 16) == 0) && ((message.event.conn & 16) != 0)) { abc.text = "MQTT connected"; addNotification(abc); } } if (n & 4) { var abc = { title: node.name, icon: node.icon, nodeid: node._id, id: message.event.id }; if (((node.conn & 1) != 0) && ((message.event.conn & 1) == 0)) { abc.text = "Agent disconnected"; addNotification(abc); } - if (((node.conn & 2) != 0) && ((message.event.conn & 2) == 0)) { abc.text = "Intel AMT not detected"; addNotification(abc); } - if (((node.conn & 4) != 0) && ((message.event.conn & 4) == 0)) { abc.text = "Intel AMT CIRA disconnected"; addNotification(abc); } + if (((node.conn & 2) != 0) && ((message.event.conn & 2) == 0)) { abc.text = "Intel AMT CIRA not detected"; addNotification(abc); } + if (((node.conn & 4) != 0) && ((message.event.conn & 4) == 0)) { abc.text = "Intel AMT disconnected"; addNotification(abc); } if (((node.conn & 16) != 0) && ((message.event.conn & 16) == 0)) { abc.text = "MQTT disconnected"; addNotification(abc); } } diff --git a/views/default3.handlebars b/views/default3.handlebars index 713bb02b..817e4db5 100644 --- a/views/default3.handlebars +++ b/views/default3.handlebars @@ -4154,15 +4154,15 @@ if ((node.agent != null) && (node.agent.root === false)) { agentPrivilages = "Agent connected with limited privilages"; } var abc = { title: node.name, icon: node.icon, nodeid: node._id, id: message.event.id }; if (((node.conn & 1) == 0) && ((message.event.conn & 1) != 0)) { abc.text = agentPrivilages; addNotification(abc); } - if (((node.conn & 2) == 0) && ((message.event.conn & 2) != 0)) { abc.text = "Intel AMT detected"; addNotification(abc); } - if (((node.conn & 4) == 0) && ((message.event.conn & 4) != 0)) { abc.text = "Intel AMT CIRA connected"; addNotification(abc); } + if (((node.conn & 2) == 0) && ((message.event.conn & 2) != 0)) { abc.text = "Intel AMT CIRA detected"; addNotification(abc); } + if (((node.conn & 4) == 0) && ((message.event.conn & 4) != 0)) { abc.text = "Intel AMT connected"; addNotification(abc); } if (((node.conn & 16) == 0) && ((message.event.conn & 16) != 0)) { abc.text = "MQTT connected"; addNotification(abc); } } if (n & 4) { var abc = { title: node.name, icon: node.icon, nodeid: node._id, id: message.event.id }; if (((node.conn & 1) != 0) && ((message.event.conn & 1) == 0)) { abc.text = "Agent disconnected"; addNotification(abc); } - if (((node.conn & 2) != 0) && ((message.event.conn & 2) == 0)) { abc.text = "Intel AMT not detected"; addNotification(abc); } - if (((node.conn & 4) != 0) && ((message.event.conn & 4) == 0)) { abc.text = "Intel AMT CIRA disconnected"; addNotification(abc); } + if (((node.conn & 2) != 0) && ((message.event.conn & 2) == 0)) { abc.text = "Intel AMT CIRA not detected"; addNotification(abc); } + if (((node.conn & 4) != 0) && ((message.event.conn & 4) == 0)) { abc.text = "Intel AMT disconnected"; addNotification(abc); } if (((node.conn & 16) != 0) && ((message.event.conn & 16) == 0)) { abc.text = "MQTT disconnected"; addNotification(abc); } }