mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-14 08:14:59 -05:00
Fixed multi-desktop with filter, added tag:xxx filter.
This commit is contained in:
parent
51c6567905
commit
5888975d67
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "meshcentral",
|
"name": "meshcentral",
|
||||||
"version": "0.4.6-l",
|
"version": "0.4.6-m",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"Remote Management",
|
"Remote Management",
|
||||||
"Intel AMT",
|
"Intel AMT",
|
||||||
|
@ -3068,7 +3068,7 @@
|
|||||||
if ((meshrights & 8) || (meshrights & 256)) { // Requires remote control rights or desktop view only rights
|
if ((meshrights & 8) || (meshrights & 256)) { // Requires remote control rights or desktop view only rights
|
||||||
//var conn = 0;
|
//var conn = 0;
|
||||||
//if ((node.conn & 1) != 0) { conn = 1; } else if ((node.conn & 6) != 0) { conn = 2; } // Check what type of connect we can do (Agent vs AMT)
|
//if ((node.conn & 1) != 0) { conn = 1; } else if ((node.conn & 6) != 0) { conn = 2; } // Check what type of connect we can do (Agent vs AMT)
|
||||||
if (node.conn & 1) { count++; }
|
if ((node.conn & 1) && (node.v == true)) { count++; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3077,7 +3077,7 @@
|
|||||||
|
|
||||||
// Perform connect all
|
// Perform connect all
|
||||||
for (var i in nodes) {
|
for (var i in nodes) {
|
||||||
if ((multiDesktop[nodes[i]._id] == null) && ((multiDesktopFilter.length == 0) || (multiDesktopFilter.indexOf('devid_' + nodes[i]._id) >= 0))) {
|
if ((nodes[i].v == true) && (multiDesktop[nodes[i]._id] == null) && ((multiDesktopFilter.length == 0) || (multiDesktopFilter.indexOf('devid_' + nodes[i]._id) >= 0))) {
|
||||||
toggleKvmDevice(nodes[i]._id);
|
toggleKvmDevice(nodes[i]._id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3638,13 +3638,15 @@
|
|||||||
function onConsoleFocus(x) { consoleFocus = x; }
|
function onConsoleFocus(x) { consoleFocus = x; }
|
||||||
|
|
||||||
function onSearchInputChanged() {
|
function onSearchInputChanged() {
|
||||||
var x = Q('SearchInput').value.toLowerCase().trim(); putstore('_search', x);
|
var x = Q('SearchInput').value.toLowerCase().trim(); putstore('_search', Q('SearchInput').value);
|
||||||
var userSearch = null, ipSearch = null, groupSearch = null;
|
var userSearch = null, ipSearch = null, groupSearch = null, tagSearch = null;
|
||||||
if (x.startsWith("user:")) { userSearch = x.substring(5); }
|
if (x.startsWith("user:")) { userSearch = x.substring(5); }
|
||||||
else if (x.startsWith("u:")) { userSearch = x.substring(2); }
|
else if (x.startsWith("u:")) { userSearch = x.substring(2); }
|
||||||
else if (x.startsWith("ip:")) { ipSearch = x.substring(3); }
|
else if (x.startsWith("ip:")) { ipSearch = x.substring(3); }
|
||||||
else if (x.startsWith("group:")) { groupSearch = x.substring(6); }
|
else if (x.startsWith("group:")) { groupSearch = x.substring(6); }
|
||||||
else if (x.startsWith("g:")) { groupSearch = x.substring(2); }
|
else if (x.startsWith("g:")) { groupSearch = x.substring(2); }
|
||||||
|
else if (x.startsWith("tag:")) { tagSearch = Q('SearchInput').value.trim().substring(4); }
|
||||||
|
else if (x.startsWith("t:")) { tagSearch = Q('SearchInput').value.trim().substring(2); }
|
||||||
|
|
||||||
if (x == '') {
|
if (x == '') {
|
||||||
// No search
|
// No search
|
||||||
@ -3655,6 +3657,9 @@
|
|||||||
} else if (groupSearch != null) {
|
} else if (groupSearch != null) {
|
||||||
// Group filter
|
// Group filter
|
||||||
for (var d in nodes) { nodes[d].v = (meshes[nodes[d].meshid].name.toLowerCase().indexOf(groupSearch) >= 0); }
|
for (var d in nodes) { nodes[d].v = (meshes[nodes[d].meshid].name.toLowerCase().indexOf(groupSearch) >= 0); }
|
||||||
|
} else if (tagSearch != null) {
|
||||||
|
// Tag filter
|
||||||
|
for (var d in nodes) { nodes[d].v = ((nodes[d].tags != null) && (nodes[d].tags.indexOf(tagSearch) >= 0)); }
|
||||||
} else if (userSearch != null) {
|
} else if (userSearch != null) {
|
||||||
// User search
|
// User search
|
||||||
for (var d in nodes) {
|
for (var d in nodes) {
|
||||||
|
Loading…
Reference in New Issue
Block a user