New virual machine icon, MeshCtrl.js fixes.
@ -213,7 +213,8 @@ if (args['_'].length == 0) {
|
|||||||
console.log(" MeshCtrl ListDevices");
|
console.log(" MeshCtrl ListDevices");
|
||||||
console.log(" MeshCtrl ListDevices -id [groupid] --json");
|
console.log(" MeshCtrl ListDevices -id [groupid] --json");
|
||||||
console.log("\r\nOptional arguments:\r\n");
|
console.log("\r\nOptional arguments:\r\n");
|
||||||
console.log(" --id [groupid] - Filter by device group identifier.");
|
console.log(" --id [groupid] - Filter by group identifier (or --group).");
|
||||||
|
console.log(" --group [groupname] - Filter by group name (or --id).");
|
||||||
console.log(" --count - Only return the device count.");
|
console.log(" --count - Only return the device count.");
|
||||||
console.log(" --json - Show result as JSON.");
|
console.log(" --json - Show result as JSON.");
|
||||||
break;
|
break;
|
||||||
@ -565,7 +566,9 @@ function serverConnect() {
|
|||||||
case 'listdevicegroups': { ws.send(JSON.stringify({ action: 'meshes' })); break; }
|
case 'listdevicegroups': { ws.send(JSON.stringify({ action: 'meshes' })); break; }
|
||||||
case 'listusersofdevicegroup': { ws.send(JSON.stringify({ action: 'meshes' })); break; }
|
case 'listusersofdevicegroup': { ws.send(JSON.stringify({ action: 'meshes' })); break; }
|
||||||
case 'listdevices': {
|
case 'listdevices': {
|
||||||
if (args.id) {
|
if (args.group) {
|
||||||
|
ws.send(JSON.stringify({ action: 'nodes', meshname: args.group, responseid: 'meshctrl' })); break;
|
||||||
|
} else if (args.id) {
|
||||||
ws.send(JSON.stringify({ action: 'nodes', meshid: args.id, responseid: 'meshctrl' })); break;
|
ws.send(JSON.stringify({ action: 'nodes', meshid: args.id, responseid: 'meshctrl' })); break;
|
||||||
} else {
|
} else {
|
||||||
ws.send(JSON.stringify({ action: 'meshes' }));
|
ws.send(JSON.stringify({ action: 'meshes' }));
|
||||||
|
16
meshuser.js
@ -482,6 +482,19 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||||||
case 'nodes':
|
case 'nodes':
|
||||||
{
|
{
|
||||||
var links = [], extraids = null, err = null;
|
var links = [], extraids = null, err = null;
|
||||||
|
|
||||||
|
// Resolve the device group name if needed
|
||||||
|
if ((typeof command.meshname == 'string') && (command.meshid == null)) {
|
||||||
|
for (var i in parent.meshes) {
|
||||||
|
var m = parent.meshes[i];
|
||||||
|
if ((m.mtype == 2) && (m.name == command.meshname) && parent.IsMeshViewable(user, m)) {
|
||||||
|
if (command.meshid == null) { command.meshid = m._id; } else { err = 'Duplicate device groups found'; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (command.meshid == null) { err = 'Invalid group id'; }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (err == null) {
|
||||||
try {
|
try {
|
||||||
if (command.meshid == null) {
|
if (command.meshid == null) {
|
||||||
// Request a list of all meshes this user as rights to
|
// Request a list of all meshes this user as rights to
|
||||||
@ -504,10 +517,11 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||||||
meshid = command.meshid;
|
meshid = command.meshid;
|
||||||
if (common.validateString(meshid, 0, 128) == false) { err = 'Invalid group id'; } else {
|
if (common.validateString(meshid, 0, 128) == false) { err = 'Invalid group id'; } else {
|
||||||
if (meshid.split('/').length == 1) { meshid = 'mesh/' + domain.id + '/' + command.meshid; }
|
if (meshid.split('/').length == 1) { meshid = 'mesh/' + domain.id + '/' + command.meshid; }
|
||||||
if (obj.IsMeshViewable(user, meshid)) { links.push(meshid); } else { err = 'Invalid group id'; }
|
if (parent.IsMeshViewable(user, meshid)) { links.push(meshid); } else { err = 'Invalid group id'; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (ex) { err = 'Validation exception: ' + ex; }
|
} catch (ex) { err = 'Validation exception: ' + ex; }
|
||||||
|
}
|
||||||
|
|
||||||
// Handle any errors
|
// Handle any errors
|
||||||
if (err != null) {
|
if (err != null) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "meshcentral",
|
"name": "meshcentral",
|
||||||
"version": "0.5.1-x",
|
"version": "0.5.1-y",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"Remote Management",
|
"Remote Management",
|
||||||
"Intel AMT",
|
"Intel AMT",
|
||||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.6 KiB |
BIN
public/images/icons256-8-1.png
Normal file
After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 48 KiB |
@ -1194,6 +1194,14 @@ a {
|
|||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.i8 {
|
||||||
|
background: url(../images/icons50.png) -350px 0px;
|
||||||
|
height: 50px;
|
||||||
|
width: 50px;
|
||||||
|
cursor: pointer;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
.j1 {
|
.j1 {
|
||||||
background: url(../images/icons16.png) 0px 0px;
|
background: url(../images/icons16.png) 0px 0px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
@ -1250,6 +1258,14 @@ a {
|
|||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.j8 {
|
||||||
|
background: url(../images/icons16.png) -112px 0px;
|
||||||
|
height: 16px;
|
||||||
|
width: 16px;
|
||||||
|
cursor: pointer;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
.relayIcon16 {
|
.relayIcon16 {
|
||||||
background: url(../images/icon-relay.png);
|
background: url(../images/icon-relay.png);
|
||||||
height: 16px;
|
height: 16px;
|
||||||
@ -1458,6 +1474,14 @@ a {
|
|||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.si8 {
|
||||||
|
background: url(../images/icons16.png) -112px 0px;
|
||||||
|
height: 16px;
|
||||||
|
width: 16px;
|
||||||
|
border: none;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
.mi {
|
.mi {
|
||||||
background: url(../images/meshicon50.png) 0px 0px;
|
background: url(../images/meshicon50.png) 0px 0px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
@ -85,6 +85,13 @@
|
|||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.i8 {
|
||||||
|
background: url(../images/icons50.png) -350px 0px;
|
||||||
|
height: 50px;
|
||||||
|
width: 50px;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
.m0 {
|
.m0 {
|
||||||
background: url(../images/images16.png) -32px 0px;
|
background: url(../images/images16.png) -32px 0px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
@ -2264,7 +2271,8 @@
|
|||||||
x += '<div style=display:inline-block class=i4 onclick=p10setIcon(4)></div><br />';
|
x += '<div style=display:inline-block class=i4 onclick=p10setIcon(4)></div><br />';
|
||||||
x += '<div style=display:inline-block class=i5 onclick=p10setIcon(5)></div>';
|
x += '<div style=display:inline-block class=i5 onclick=p10setIcon(5)></div>';
|
||||||
x += '<div style=display:inline-block class=i6 onclick=p10setIcon(6)></div>';
|
x += '<div style=display:inline-block class=i6 onclick=p10setIcon(6)></div>';
|
||||||
x += '<div style=display:inline-block class=i7 onclick=p10setIcon(7)></div></table>';
|
x += '<div style=display:inline-block class=i7 onclick=p10setIcon(7)></div>';
|
||||||
|
x += '<div style=display:inline-block class=i8 onclick=p10setIcon(8)></div></table>';
|
||||||
setDialogMode(2, "Icon Selection", 0, null, x);
|
setDialogMode(2, "Icon Selection", 0, null, x);
|
||||||
QV('id_dialogclose', true);
|
QV('id_dialogclose', true);
|
||||||
}
|
}
|
||||||
|
@ -5607,14 +5607,17 @@
|
|||||||
if (xxdialogMode) return;
|
if (xxdialogMode) return;
|
||||||
if ((GetNodeRights(currentNode) & 4) == 0) return;
|
if ((GetNodeRights(currentNode) & 4) == 0) return;
|
||||||
|
|
||||||
var x = '<br><div style=display:inline-block;width:16px></div>';
|
var x = '<div style=text-align:center><br />';
|
||||||
x += '<div tabindex=0 style=display:inline-block class=i1 onclick=p10setIcon(1) onkeypress="if (event.key==\'Enter\') p10setIcon(1)"></div>';
|
x += '<div tabindex=0 style="display:inline-block;margin:0 10px 0 10px" class=i1 onclick=p10setIcon(1) onkeypress="if (event.key==\'Enter\') p10setIcon(1)"></div>';
|
||||||
x += '<div tabindex=0 style=display:inline-block class=i2 onclick=p10setIcon(2) onkeypress="if (event.key==\'Enter\') p10setIcon(2)"></div>';
|
x += '<div tabindex=0 style="display:inline-block;margin:0 10px 0 10px" class=i2 onclick=p10setIcon(2) onkeypress="if (event.key==\'Enter\') p10setIcon(2)"></div>';
|
||||||
x += '<div tabindex=0 style=display:inline-block class=i3 onclick=p10setIcon(3) onkeypress="if (event.key==\'Enter\') p10setIcon(3)"></div>';
|
x += '<div tabindex=0 style="display:inline-block;margin:0 10px 0 10px" class=i3 onclick=p10setIcon(3) onkeypress="if (event.key==\'Enter\') p10setIcon(3)"></div>';
|
||||||
x += '<div tabindex=0 style=display:inline-block class=i4 onclick=p10setIcon(4) onkeypress="if (event.key==\'Enter\') p10setIcon(4)"></div>';
|
x += '<div tabindex=0 style="display:inline-block;margin:0 10px 0 10px" class=i4 onclick=p10setIcon(4) onkeypress="if (event.key==\'Enter\') p10setIcon(4)"></div>';
|
||||||
x += '<div tabindex=0 style=display:inline-block class=i5 onclick=p10setIcon(5) onkeypress="if (event.key==\'Enter\') p10setIcon(5)"></div>';
|
x += '<br />';
|
||||||
x += '<div tabindex=0 style=display:inline-block class=i6 onclick=p10setIcon(6) onkeypress="if (event.key==\'Enter\') p10setIcon(6)"></div>';
|
x += '<div tabindex=0 style="display:inline-block;margin:0 10px 0 10px" class=i5 onclick=p10setIcon(5) onkeypress="if (event.key==\'Enter\') p10setIcon(5)"></div>';
|
||||||
x += '<div tabindex=0 style=display:inline-block class=i7 onclick=p10setIcon(7) onkeypress="if (event.key==\'Enter\') p10setIcon(7)"></div><br><br>';
|
x += '<div tabindex=0 style="display:inline-block;margin:0 10px 0 10px" class=i6 onclick=p10setIcon(6) onkeypress="if (event.key==\'Enter\') p10setIcon(6)"></div>';
|
||||||
|
x += '<div tabindex=0 style="display:inline-block;margin:0 10px 0 10px" class=i7 onclick=p10setIcon(6) onkeypress="if (event.key==\'Enter\') p10setIcon(7)"></div>';
|
||||||
|
x += '<div tabindex=0 style="display:inline-block;margin:0 10px 0 10px" class=i8 onclick=p10setIcon(8) onkeypress="if (event.key==\'Enter\') p10setIcon(8)"></div>';
|
||||||
|
x += '<br /><br /></div>';
|
||||||
setDialogMode(2, "Icon Selection", 0, null, x);
|
setDialogMode(2, "Icon Selection", 0, null, x);
|
||||||
QV('id_dialogclose', true);
|
QV('id_dialogclose', true);
|
||||||
}
|
}
|
||||||
|