Improved support for Intel Standard Manageability (Intel SM)
Ylian Saint-Hilaire committed
Jun 19, 2022 at 00:06 UTC
9f9af35e2fa6046093f78b3cef5012a76ef003cf
3 files changed
+33
-9
meshagent.js
+4
-1
@@ -1889,7 +1889,10 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
1889
if (!device.intelamt) { device.intelamt = {}; }
1890
if ((command.intelamt.Versions != null) && (typeof command.intelamt.Versions == 'object')) {
1891
if ((command.intelamt.Versions.AMT != null) && (typeof command.intelamt.Versions.AMT == 'string') && (command.intelamt.Versions.AMT.length < 12) && (device.intelamt.ver != command.intelamt.Versions.AMT)) { changes.push('AMT version'); device.intelamt.ver = command.intelamt.Versions.AMT; change = 1; log = 1; }
1892
- if ((command.intelamt.Versions.Sku != null) && (typeof command.intelamt.Versions.Sku == 'string')) { var sku = parseInt(command.intelamt.Versions.Sku); if (device.intelamt.sku !== command.intelamt.sku) { device.intelamt.sku = sku; change = 1; log = 1; } }
1892
+ if ((command.intelamt.Versions.Sku != null) && (typeof command.intelamt.Versions.Sku == 'string')) {
1893
+ const sku = parseInt(command.intelamt.Versions.Sku);
1894
+ if (device.intelamt.sku !== sku) { device.intelamt.sku = sku; change = 1; log = 1; }
1895
+ }
1896
}
1897
if ((command.intelamt.ProvisioningState != null) && (typeof command.intelamt.ProvisioningState == 'number') && (device.intelamt.state != command.intelamt.ProvisioningState)) { changes.push('AMT state'); device.intelamt.state = command.intelamt.ProvisioningState; change = 1; log = 1; }
1898
if ((command.intelamt.Flags != null) && (typeof command.intelamt.Flags == 'number') && (device.intelamt.flags != command.intelamt.Flags)) {
views/default-mobile.handlebars
+8
-2
@@ -4070,7 +4070,7 @@
4070
);
4071
4072
// Show the right settings
4073
- QV('d7amtkvm', (currentNode.intelamt != null && ((currentNode.intelamt.ver != null) || (currentNode.agent == null))) && ((deskState == 0) || (desktop.contype == 2)));
4073
+ QV('d7amtkvm', (currentNode.intelamt != null && ((typeof currentNode.intelamt.sku != 'number') || ((currentNode.intelamt.sku & 16) == 0)) && ((currentNode.intelamt.ver != null) || (currentNode.agent == null))) && ((deskState == 0) || (desktop.contype == 2)));
4074
QV('d7meshkvm', ((currentNode.agent != null) && (currentNode.agent.caps & 1) && ((deskState == false) || (desktop.contype == 1))));
4075
4076
// Enable buttons
@@ -5831,7 +5831,13 @@
5831
x += addDetailItem("Security", (node.intelamt.tls == 1) ? "Secured using TLS" : "TLS is not setup", s);
5832
// Check that the Intel AMT user is setup and there is no warnings (1 = invalid credentials, 8 = trying)
5833
x += addDetailItem("Admin Credentials", ((node.intelamt.user) == null || (node.intelamt.user == '') || ((node.intelamt.warn != null) && ((node.intelamt.warn & 9) != 0))) ? "Not Known" : "Known", s);
5834
- if (x != '') { sections.push({ name: "Intel® Active Management Technology (Intel® AMT)", html: x, img: 'amt' }); }
5834
+ if (x != '') {
5835
+ if ((typeof node.intelamt.sku == 'number') && ((node.intelamt.sku & 16) != 0)) {
5836
+ sections.push({ name: "Intel® Standard Manageability (Intel® SM)", html: x, img: 'amt' });
5837
+ } else {
5838
+ sections.push({ name: "Intel® Active Management Technology (Intel® AMT)", html: x, img: 'amt' });
5839
+ }
5840
+ }
5841
}
5842
5843
if (hardware.identifiers) {
views/default.handlebars
+21
-6
@@ -619,7 +619,7 @@
619
</div>
620
<div id="p11warning" onclick="showFeaturesDlg()">
621
<div class="icon2"></div>
622
- <div class="warningbox">Intel® AMT Redirection port or KVM feature is disabled<span id="p11warninga">, click here to enable it.</span></div>
622
+ <div class="warningbox">Redirection port or KVM feature is disabled<span id="p11warninga">, click here to enable it.</span></div>
623
</div>
624
<div id="p11warning2" onclick="showPowerActionDlg()">
625
<div class="icon2"></div>
@@ -655,7 +655,7 @@
655
<input type="button" id="autoconnectbutton1" value="AutoConnect" onclick=autoConnectDesktop(event) onkeypress="return false" onkeydown="return false" style="display:none;margin-right:4px" />
656
<span id=connectbutton1span><input type=button id=connectbutton1 cmenu="deskConnectButton" title="Connect using MeshAgent remote desktop" value="Connect" onclick=connectDesktop(event,3) onkeypress="return false" onkeydown="return false" disabled="disabled" /></span>
657
<span id=connectbutton1rspan><input type=button id=connectbutton1r cmenu="altPortContextMenu" value="RDP Connect" title="Connect using RDP" onclick=askRdpCredentials() onkeypress="return false" onkeydown="return false" disabled="disabled" /></span>
658
- <span id=connectbutton1hspan><input type=button id=connectbutton1h value="HW Connect" title="Connect using Intel® AMT hardware KVM" onclick=connectDesktop(event,2) onkeypress="return false" onkeydown="return false" disabled="disabled" /></span>
658
+ <span id=connectbutton1hspan><input type=button id=connectbutton1h value="HW Connect" title="Connect using hardware KVM" onclick=connectDesktop(event,2) onkeypress="return false" onkeydown="return false" disabled="disabled" /></span>
659
<span id=disconnectbutton1span><input type=button id=disconnectbutton1 cmenu="deskDisconnectButton" value="Disconnect" onclick=connectDesktop(event,0) onkeypress="return false" onkeydown="return false" /></span>
660
<span id="deskstatus" style="line-height:22px">Disconnected</span><span id="deskmetadata"></span>
661
</div>
@@ -731,7 +731,7 @@
731
</div>
732
<div id="p12warning" onclick=showFeaturesDlg()>
733
<div class="icon2"></div>
734
- <div class="warningbox">Intel® AMT Redirection port or KVM feature is disabled<span id="p12warninga">, click here to enable it.</span></div>
734
+ <div class="warningbox">Redirection port or KVM feature is disabled<span id="p12warninga">, click here to enable it.</span></div>
735
</div>
736
<div id="p12warning2" onclick=showPowerActionDlg()>
737
<div class="icon2"></div>
@@ -864,7 +864,7 @@
864
<div id="p14title">
865
<div id="p14BackButton" style="float:left"><div class="backButton" tabindex=0 onclick=goBack() title="Back" onkeypress="if (event.key == 'Enter') goBack()"><div class="backButtonEx"></div></div></div>
866
<div id="devListToolbarViewIcons"><div class="viewSelector" onclick=deskToggleFull(event) title="Full Screen. Hold shift to browser full screen."><div class="viewSelector5"></div></div></div>
867
- <h1>Intel® AMT - <span id=p14deviceName></span></h1>
867
+ <h1><span id=p14deviceNamePrefix>Intel® AMT</span> - <span id=p14deviceName></span></h1>
868
</div>
869
<iframe id=p14iframe src="{{{domainurl}}}commander.htm"></iframe>
870
</div>
@@ -7255,6 +7255,15 @@
7255
QV('p15uploadCore', (node.agent != null) && (node.agent.caps != null) && ((node.agent.caps & 16) != 0));
7256
QH('p15coreName', ((node.agent != null) && (node.agent.core != null))?node.agent.core:'');
7257
7258
+ // Set the Intel AMT / Intel SM tab name
7259
+ if ((node.intelamt != null) && (typeof node.intelamt.sku == 'number') && ((node.intelamt.sku & 16) != 0)) {
7260
+ QH('MainDevAmt', "Intel®SM");
7261
+ QH('p14deviceNamePrefix', "Intel® SM");
7262
+ } else {
7263
+ QH('MainDevAmt', "Intel®AMT");
7264
+ QH('p14deviceNamePrefix', "Intel® AMT");
7265
+ }
7266
+
7267
// Setup/Refresh Intel AMT tab
7268
var amtFrameNode = Q('p14iframe').contentWindow.getCurrentMeshNode();
7269
if ((amtFrameNode != null) && (amtFrameNode._id != currentNode._id)) { Q('p14iframe').contentWindow.disconnect(); }
@@ -8371,7 +8380,7 @@
8380
);
8381
}
8382
// Show the right settings
8374
- QV('td7amtkvm', (currentNode.intelamt != null && ((currentNode.intelamt.ver != null) || (currentNode.agent == null))) && ((deskState == 0) || (desktop.contype == 2)));
8383
+ QV('td7amtkvm', ((currentNode.intelamt != null) && ((typeof currentNode.intelamt.sku != 'number') || ((currentNode.intelamt.sku & 16) == 0)) && ((currentNode.intelamt.ver != null) || (currentNode.agent == null))) && ((deskState == 0) || (desktop.contype == 2)));
8384
QV('td7meshkvm', (webRtcDesktop) || ((currentNode.agent != null) && (currentNode.agent.caps & 1) && ((deskState == 0) || (desktop.contype == 1))));
8385
QV('td7rdpkvm', ((currentNode.agent != null) && ((currentNode.agent.id == 3) || (currentNode.agent.id == 4)) && ((deskState == 0) || (desktop.contype == 4))));
8386
@@ -11164,7 +11173,13 @@
11173
x += addDetailItem("Security", (node.intelamt.tls == 1)?"Secured using TLS":"TLS is not setup", s);
11174
// Check that the Intel AMT user is setup and there is no warnings (1 = invalid credentials, 8 = trying)
11175
x += addDetailItem("Admin Credentials", ((node.intelamt.user) == null || (node.intelamt.user == '') || ((node.intelamt.warn != null) && ((node.intelamt.warn & 9) != 0)))?"Not Known":"Known", s);
11167
- if (x != '') { sections.push({ name: "Intel® Active Management Technology (Intel® AMT)", html: x, img: 'amt64.png' }); }
11176
+ if (x != '') {
11177
+ if ((typeof node.intelamt.sku == 'number') && ((node.intelamt.sku & 16) != 0)) {
11178
+ sections.push({ name: "Intel® Standard Manageability (Intel® SM)", html: x, img: 'amt64.png' });
11179
+ } else {
11180
+ sections.push({ name: "Intel® Active Management Technology (Intel® AMT)", html: x, img: 'amt64.png' });
11181
+ }
11182
+ }
11183
}
11184
11185
if (hardware.identifiers) {