mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-26 23:25:53 -05:00
add filter to url (#5535)
This commit is contained in:
parent
c05cbeae88
commit
d80a74b915
@ -125,7 +125,7 @@ function parseUriArgs(decodeUrl) {
|
||||
name = arg.substring(0, i);
|
||||
r[name] = arg.substring(i + 1);
|
||||
if (decodeUrl) { r[name] = decodeURIComponent(arg.substring(i + 1)); }
|
||||
if (!isSafeString(r[name])) { delete r[name]; } else { var x = parseInt(r[name]); if (x == r[name]) { r[name] = x; } }
|
||||
if (!isSafeString2(r[name])) { delete r[name]; } else { var x = parseInt(r[name]); if (x == r[name]) { r[name] = x; } }
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
@ -1644,7 +1644,10 @@
|
||||
QV('DeskESC', browserfullscreen);
|
||||
if ((xtermfit != null) && (xxcurrentView == 12)) { xtermfit.fit(); }
|
||||
}
|
||||
setTimeout(function() { mainUpdate(512); }, 200);
|
||||
setTimeout(function() {
|
||||
if (urlargs.filter) { Q('SearchInput').value = urlargs.filter; Q('KvmSearchInput').value = urlargs.filter; }
|
||||
mainUpdate(512);
|
||||
}, 200);
|
||||
|
||||
// Connect to the mesh server
|
||||
meshserver = MeshServerCreateControl(domainUrl);
|
||||
@ -5019,7 +5022,25 @@
|
||||
}
|
||||
function disconnectAllKvmFunction() { if (xxdialogMode) return false; for (var nodeid in multiDesktop) { multiDesktop[nodeid].Stop(); } multiDesktop = {}; }
|
||||
function onMultiDesktopStateChange(desk, state) { try { QH('skvmid_' + desk.shortid, ["Disconnected", "Connecting...", "Setup...", '', ''][state]); } catch (ex) {} }
|
||||
function onDeviceSearchChanged(e) { if (e != null) { if (e.target.id == 'SearchInput') { Q('KvmSearchInput').value = Q('SearchInput').value; } else { Q('SearchInput').value = Q('KvmSearchInput').value; } } mainUpdate(5); }
|
||||
function onDeviceSearchChanged(e) {
|
||||
var url = new URL(window.location.href);
|
||||
if (e != null) {
|
||||
if (e.target.id == 'SearchInput') {
|
||||
Q('KvmSearchInput').value = Q('SearchInput').value;
|
||||
} else {
|
||||
Q('SearchInput').value = Q('KvmSearchInput').value;
|
||||
}
|
||||
url.searchParams.set('filter', e.target.value);
|
||||
if(urlargs.filter){ urlargs.filter = e.target.value; }
|
||||
}else{
|
||||
url.searchParams.delete('filter');
|
||||
if(urlargs.filter){ delete urlargs.filter; }
|
||||
}
|
||||
if (((features & 0x10000000) == 0) && (xxcurrentView > 0)) {
|
||||
try { window.history.replaceState({}, document.title, decodeURIComponent(url.toString())); } catch(e) { }
|
||||
}
|
||||
mainUpdate(5);
|
||||
}
|
||||
|
||||
function showMultiDesktopSettings() {
|
||||
QV('td7amtkvm', false);
|
||||
|
Loading…
Reference in New Issue
Block a user