mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-23 21:55:52 -05:00
Added online filter in web app
This commit is contained in:
parent
1f105e37a2
commit
25c8a934c7
@ -19030,6 +19030,12 @@
|
||||
"default.handlebars->25->119"
|
||||
]
|
||||
},
|
||||
{
|
||||
"en": "Online",
|
||||
"xloc": [
|
||||
"default.handlebars->container->column_l->p1->devListToolbarSpan->1->0->devListToolbar->9->1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cs": "Připojených uživatelů",
|
||||
"de": "Benutzer online",
|
||||
@ -19066,6 +19072,12 @@
|
||||
"default.handlebars->25->746"
|
||||
]
|
||||
},
|
||||
{
|
||||
"en": "Only show devices that are online",
|
||||
"xloc": [
|
||||
"default.handlebars->container->column_l->p1->devListToolbarSpan->1->0->devListToolbar->9"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cs": "Otevřít soubor…",
|
||||
"de": "Datei öffnen...",
|
||||
@ -30926,4 +30938,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -232,6 +232,7 @@
|
||||
<input type=button id=GroupActionButton disabled="disabled" value="Group Action" onclick=groupActionFunction() />
|
||||
<input id=SearchInput type=text placeholder=Filter onchange=onDeviceSearchChanged(event) onkeyup=onDeviceSearchChanged(event) autocomplete=off onfocus=onSearchFocus(1) onblur=onSearchFocus(0) />
|
||||
<label><input type=checkbox id=RealNameCheckBox onclick=onRealNameCheckBox() /><span title="Show devices operating system name">OS Name</span></label>
|
||||
<label><input type=checkbox id=OnlineCheckBox onclick=onDeviceSearchChanged(event) /><span title="Only show devices that are online">Online</span></label>
|
||||
</td>
|
||||
<td id=kvmListToolbar class=style14 style="display:none">
|
||||
<input type="button" onclick="connectAllKvmFunction()" value="Connect All" />
|
||||
@ -4089,6 +4090,10 @@
|
||||
}
|
||||
} catch (ex) { for (var d in nodes) { nodes[d].v = true; } }
|
||||
}
|
||||
|
||||
// Check power state
|
||||
var onlineOnly = Q('OnlineCheckBox').checked;
|
||||
if (onlineOnly) { for (var d in nodes) { if ((nodes[d].conn == null) || (nodes[d].conn == 0)) { nodes[d].v = false; } } }
|
||||
}
|
||||
|
||||
var contextelement = null;
|
||||
|
@ -3524,6 +3524,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||
} else if (req.query.meshaction != null) {
|
||||
if ((domain.loginkey != null) && (domain.loginkey.indexOf(req.query.key) == -1)) { res.sendStatus(404); return; } // Check 3FA URL key
|
||||
var user = obj.users[req.session.userid];
|
||||
if (user == null) { res.sendStatus(404); return; }
|
||||
if ((req.query.meshaction == 'route') && (req.query.nodeid != null)) {
|
||||
obj.db.Get(req.query.nodeid, function (err, nodes) {
|
||||
if (nodes.length != 1) { res.sendStatus(401); return; }
|
||||
|
Loading…
Reference in New Issue
Block a user