fix amt/cira browser notification wrong way round

Signed-off-by: si458 <simonsmith5521@gmail.com>

si458 committed Mar 22, 2025 at 16:29 UTC 126c8856cb22066e7e3d4d2d96ade58464f20c2b
4 files changed +35 -23
meshcentral.js
+1 -1
@@ -2755,7 +2755,7 @@ function CreateMeshCentralServer(config, args) {
2755 // Clear the connectivity state of a node and setup the server so that messages can be routed correctly.
2756 // meshId: mesh identifier of format mesh/domain/meshidhex
2757 // nodeId: node identifier of format node/domain/nodeidhex
2758 - // connectType: Bitmask, 1 = MeshAgent, 2 = Intel AMT CIRA, 3 = Intel AMT local.
2758 + // connectType: Bitmask, 1 = MeshAgent, 2 = Intel AMT CIRA, 4 = Intel AMT local.
2759 obj.ClearConnectivityState = function (meshid, nodeid, connectType, serverid, extraInfo) {
2760 //console.log('ClearConnectivity for ' + nodeid.substring(0, 16) + ', Type: ' + connectTypeStrings[connectType] + (serverid == null?(''):(', ServerId: ' + serverid)));
2761 if ((serverid == null) && (obj.multiServer != null)) { obj.multiServer.DispatchMessage({ action: 'ClearConnectivityState', meshid: meshid, nodeid: nodeid, connectType: connectType, extraInfo: extraInfo }); }
translate/translate.json
+26 -14
@@ -41224,10 +41224,13 @@
41224 "tr": "Intel AMT CIRA bağlandı",
41225 "uk": "Intel AMT CIRA підключено",
41226 "zh-chs": "英特尔 AMT CIRA 已连接",
41227 - "zh-cht": "英特爾 AMT CIRA 已連接",
41227 + "zh-cht": "英特爾 AMT CIRA 已連接"
41228 + },
41229 + {
41230 + "en": "Intel AMT CIRA detected",
41231 "xloc": [
41229 - "default.handlebars->47->274",
41230 - "default3.handlebars->35->271"
41232 + "default.handlebars->47->273",
41233 + "default3.handlebars->35->270"
41234 ]
41235 },
41236 {
@@ -41254,10 +41257,20 @@
41257 "tr": "Intel AMT CIRA'nın bağlantısı kesildi",
41258 "uk": "Intel AMT CIRA припинено",
41259 "zh-chs": "英特尔 AMT CIRA 断开连接",
41257 - "zh-cht": "英特爾 AMT CIRA 斷開連接",
41260 + "zh-cht": "英特爾 AMT CIRA 斷開連接"
41261 + },
41262 + {
41263 + "en": "Intel AMT CIRA not detected",
41264 "xloc": [
41259 - "default.handlebars->47->278",
41260 - "default3.handlebars->35->275"
41265 + "default.handlebars->47->277",
41266 + "default3.handlebars->35->274"
41267 + ]
41268 + },
41269 + {
41270 + "en": "Intel AMT connected",
41271 + "xloc": [
41272 + "default.handlebars->47->274",
41273 + "default3.handlebars->35->271"
41274 ]
41275 },
41276 {
@@ -41284,10 +41297,13 @@
41297 "tr": "Intel AMT algılandı",
41298 "uk": "Виявлено Intel AMT",
41299 "zh-chs": "检测到英特尔 AMT",
41287 - "zh-cht": "檢測到英特爾 AMT",
41300 + "zh-cht": "檢測到英特爾 AMT"
41301 + },
41302 + {
41303 + "en": "Intel AMT disconnected",
41304 "xloc": [
41289 - "default.handlebars->47->273",
41290 - "default3.handlebars->35->270"
41305 + "default.handlebars->47->278",
41306 + "default3.handlebars->35->275"
41307 ]
41308 },
41309 {
@@ -41344,11 +41360,7 @@
41360 "tr": "Intel AMT algılanmadı",
41361 "uk": "Intel AMT не виявлено",
41362 "zh-chs": "未检测到英特尔 AMT",
41347 - "zh-cht": "未檢測到英特爾 AMT",
41348 - "xloc": [
41349 - "default.handlebars->47->277",
41350 - "default3.handlebars->35->274"
41351 - ]
41363 + "zh-cht": "未檢測到英特爾 AMT"
41364 },
41365 {
41366 "bs": "Intel ASCII",
views/default.handlebars
+4 -4
@@ -3692,15 +3692,15 @@
3692 if ((node.agent != null) && (node.agent.root === false)) { agentPrivilages = "Agent connected with limited privilages"; }
3693 var abc = { title: node.name, icon: node.icon, nodeid: node._id, id: message.event.id };
3694 if (((node.conn & 1) == 0) && ((message.event.conn & 1) != 0)) { abc.text = agentPrivilages; addNotification(abc); }
3695 - if (((node.conn & 2) == 0) && ((message.event.conn & 2) != 0)) { abc.text = "Intel AMT detected"; addNotification(abc); }
3696 - if (((node.conn & 4) == 0) && ((message.event.conn & 4) != 0)) { abc.text = "Intel AMT CIRA connected"; addNotification(abc); }
3695 + if (((node.conn & 2) == 0) && ((message.event.conn & 2) != 0)) { abc.text = "Intel AMT CIRA detected"; addNotification(abc); }
3696 + if (((node.conn & 4) == 0) && ((message.event.conn & 4) != 0)) { abc.text = "Intel AMT connected"; addNotification(abc); }
3697 if (((node.conn & 16) == 0) && ((message.event.conn & 16) != 0)) { abc.text = "MQTT connected"; addNotification(abc); }
3698 }
3699 if (n & 4) {
3700 var abc = { title: node.name, icon: node.icon, nodeid: node._id, id: message.event.id };
3701 if (((node.conn & 1) != 0) && ((message.event.conn & 1) == 0)) { abc.text = "Agent disconnected"; addNotification(abc); }
3702 - if (((node.conn & 2) != 0) && ((message.event.conn & 2) == 0)) { abc.text = "Intel AMT not detected"; addNotification(abc); }
3703 - if (((node.conn & 4) != 0) && ((message.event.conn & 4) == 0)) { abc.text = "Intel AMT CIRA disconnected"; addNotification(abc); }
3702 + if (((node.conn & 2) != 0) && ((message.event.conn & 2) == 0)) { abc.text = "Intel AMT CIRA not detected"; addNotification(abc); }
3703 + if (((node.conn & 4) != 0) && ((message.event.conn & 4) == 0)) { abc.text = "Intel AMT disconnected"; addNotification(abc); }
3704 if (((node.conn & 16) != 0) && ((message.event.conn & 16) == 0)) { abc.text = "MQTT disconnected"; addNotification(abc); }
3705 }
3706
views/default3.handlebars
+4 -4
@@ -4154,15 +4154,15 @@
4154 if ((node.agent != null) && (node.agent.root === false)) { agentPrivilages = "Agent connected with limited privilages"; }
4155 var abc = { title: node.name, icon: node.icon, nodeid: node._id, id: message.event.id };
4156 if (((node.conn & 1) == 0) && ((message.event.conn & 1) != 0)) { abc.text = agentPrivilages; addNotification(abc); }
4157 - if (((node.conn & 2) == 0) && ((message.event.conn & 2) != 0)) { abc.text = "Intel AMT detected"; addNotification(abc); }
4158 - if (((node.conn & 4) == 0) && ((message.event.conn & 4) != 0)) { abc.text = "Intel AMT CIRA connected"; addNotification(abc); }
4157 + if (((node.conn & 2) == 0) && ((message.event.conn & 2) != 0)) { abc.text = "Intel AMT CIRA detected"; addNotification(abc); }
4158 + if (((node.conn & 4) == 0) && ((message.event.conn & 4) != 0)) { abc.text = "Intel AMT connected"; addNotification(abc); }
4159 if (((node.conn & 16) == 0) && ((message.event.conn & 16) != 0)) { abc.text = "MQTT connected"; addNotification(abc); }
4160 }
4161 if (n & 4) {
4162 var abc = { title: node.name, icon: node.icon, nodeid: node._id, id: message.event.id };
4163 if (((node.conn & 1) != 0) && ((message.event.conn & 1) == 0)) { abc.text = "Agent disconnected"; addNotification(abc); }
4164 - if (((node.conn & 2) != 0) && ((message.event.conn & 2) == 0)) { abc.text = "Intel AMT not detected"; addNotification(abc); }
4165 - if (((node.conn & 4) != 0) && ((message.event.conn & 4) == 0)) { abc.text = "Intel AMT CIRA disconnected"; addNotification(abc); }
4164 + if (((node.conn & 2) != 0) && ((message.event.conn & 2) == 0)) { abc.text = "Intel AMT CIRA not detected"; addNotification(abc); }
4165 + if (((node.conn & 4) != 0) && ((message.event.conn & 4) == 0)) { abc.text = "Intel AMT disconnected"; addNotification(abc); }
4166 if (((node.conn & 16) != 0) && ((message.event.conn & 16) == 0)) { abc.text = "MQTT disconnected"; addNotification(abc); }
4167 }
4168