Fixed individual device web app exception.

Ylian Saint-Hilaire committed Aug 25, 2020 at 10:46 UTC 89100d96942d2c65a94a635e27b16457d2ec5ab0
1 file changed +4 -4
views/default.handlebars
+4 -4
@@ -6507,15 +6507,15 @@
6507
6508 // Show and enable the right buttons
6509 function updateDesktopButtons() {
6510 - var mesh = meshes[currentNode.meshid];
6510 var deskState = 0;
6511 if (desktop != null) { deskState = desktop.State; }
6512 var rights = GetNodeRights(currentNode);
6513 + var mtype = (currentNode.agent == 1) ? 1 : 2;
6514
6515 // Show the right buttons
6516 QV('disconnectbutton1span', (deskState != 0));
6517 QV('connectbutton1span', (deskState == 0) && ((rights & 8) || (rights & 256)) && (currentNode.agent != null) && (currentNode.agent.caps & 1));
6518 - if (mesh.mtype == 1) {
6518 + if (mtype == 1) {
6519 QV('connectbutton1hspan',
6520 (deskState == 0) &&
6521 (rights & 8) &&
@@ -7397,13 +7397,13 @@
7397
7398 // Show and enable the right buttons
7399 function updateTerminalButtons() {
7400 - var mesh = meshes[terminalNode.meshid];
7400 + var mtype = (currentNode.agent == 1) ? 1 : 2;
7401 var termState = ((terminal != null) && (terminal.state != 0));
7402
7403 // Show the right buttons
7404 QV('disconnectbutton2span', (termState == true));
7405 QV('connectbutton2span', (termState == false) && (currentNode.agent != null) && (currentNode.agent.caps & 2));
7406 - if (mesh.mtype == 1) {
7406 + if (mtype == 1) {
7407 QV('connectbutton2hspan', (termState == false) && (terminalNode.intelamt != null) && (terminalNode.intelamt.state == 2));
7408 QV('terminalSizeDropDown', (termState == false) && (terminalNode.intelamt != null) && (terminalNode.intelamt.state == 2));
7409 } else {