mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added DeviceSearchBarServerAndClientName option, #3260
This commit is contained in:
parent
72b92284d4
commit
966392b779
4 changed files with 18 additions and 13 deletions
|
@ -2055,6 +2055,7 @@
|
|||
updateNaggleFlags |= flags;
|
||||
if (updateNaggleTimer == null) {
|
||||
updateNaggleTimer = setTimeout(function () {
|
||||
if (updateNaggleFlags & 1) { onSearchInputChanged(); }
|
||||
if (updateNaggleFlags & 4) { updateDevices(); updateDeviceDetails(); }
|
||||
if (updateNaggleFlags & 128) { updateMeshes(); }
|
||||
updateNaggleTimer = null;
|
||||
|
@ -2674,7 +2675,7 @@
|
|||
function onRealNameCheckBox() {
|
||||
showRealNames = Q('RealNameCheckBox').checked;
|
||||
putstore('showRealNames', showRealNames ? 1 : 0);
|
||||
mainUpdate(4);
|
||||
mainUpdate(5);
|
||||
}
|
||||
|
||||
function onOnlineCheckBox(e) {
|
||||
|
@ -2763,15 +2764,13 @@
|
|||
try {
|
||||
var rs = x.split(/\s+/).join('|'), rx = new RegExp(rs); // In some cases (like +), this can throw an exception.
|
||||
for (var d in nodes) {
|
||||
nodes[d].v = (rx.test(nodes[d].name.toLowerCase())) || (nodes[d].rnamel != null && rx.test(nodes[d].rnamel.toLowerCase()));
|
||||
if ((nodes[d].v == false) && nodes[d].tags) {
|
||||
for (var s in nodes[d].tags) {
|
||||
if (rx.test(nodes[d].tags[s].toLowerCase())) {
|
||||
nodes[d].v = true;
|
||||
break;
|
||||
} else {
|
||||
nodes[d].v = false;
|
||||
}
|
||||
if (features2 & 0x00008000) {
|
||||
nodes[d].v = (rx.test(nodes[d].name.toLowerCase())) || ((nodes[d].rnamel != null) && rx.test(nodes[d].rnamel.toLowerCase()));
|
||||
} else {
|
||||
if (showRealNames) {
|
||||
nodes[d].v = (nodes[d].rnamel != null) && rx.test(nodes[d].rnamel.toLowerCase());
|
||||
} else {
|
||||
nodes[d].v = rx.test(nodes[d].name.toLowerCase());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5577,10 +5577,14 @@
|
|||
try {
|
||||
var rs = x.split(/\s+/).join('|'), rx = new RegExp(rs); // In some cases (like +), this can throw an exception.
|
||||
for (var d in nodes) {
|
||||
if (showRealNames) {
|
||||
if (nodes[d].rnamel != null && rx.test(nodes[d].rnamel.toLowerCase())) { r.push(d); }
|
||||
if (features2 & 0x00008000) { // Both server and client names must match
|
||||
if (rx.test(nodes[d].name.toLowerCase()) || ((nodes[d].rnamel != null) && rx.test(nodes[d].rnamel.toLowerCase()))) { r.push(d); }
|
||||
} else {
|
||||
if (rx.test(nodes[d].name.toLowerCase())) { r.push(d); }
|
||||
if (showRealNames) {
|
||||
if (nodes[d].rnamel != null && rx.test(nodes[d].rnamel.toLowerCase())) { r.push(d); }
|
||||
} else {
|
||||
if (rx.test(nodes[d].name.toLowerCase())) { r.push(d); }
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (ex) { for (var d in nodes) { r.push(d); } }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue