Version 0.6.49

This commit is contained in:
Ylian Saint-Hilaire 2020-09-25 10:36:53 -07:00
parent 852d2a8c76
commit 0f1da939b9
3 changed files with 13 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "meshcentral", "name": "meshcentral",
"version": "0.6.48", "version": "0.6.49",
"keywords": [ "keywords": [
"Remote Device Management", "Remote Device Management",
"Remote Device Monitoring", "Remote Device Monitoring",

View File

@ -16640,6 +16640,12 @@
"default.handlebars->27->1417" "default.handlebars->27->1417"
] ]
}, },
{
"en": "Group-Tags",
"xloc": [
"default.handlebars->container->column_l->p1->devListToolbarSpan->1->0->9->devListToolbarSort->sortselect->9"
]
},
{ {
"cs": "Skupina1, Skupina2, Skupina3", "cs": "Skupina1, Skupina2, Skupina3",
"de": "Gruppe1, Gruppe2, Gruppe3", "de": "Gruppe1, Gruppe2, Gruppe3",

View File

@ -278,6 +278,7 @@
<option>Power</option> <option>Power</option>
<option>Device</option> <option>Device</option>
<option>Tags</option> <option>Tags</option>
<option>Group-Tags</option>
</select> </select>
&nbsp; &nbsp;
</div> </div>
@ -3497,8 +3498,8 @@
var collapseName = node.meshid; var collapseName = node.meshid;
if (sort == 1) { collapseName = ('pwr:' + (node.pwr?node.pwr:0)); } if (sort == 1) { collapseName = ('pwr:' + (node.pwr?node.pwr:0)); }
else if (sort == 3) { collapseName = 'tag:**xx**xx*TaG*xx**xx**'; } else if ((sort == 3) || (sort == 4)) { collapseName = 'tag:**xx**xx*TaG*xx**xx**'; }
var collapsed = (sort != 3) & CollapsedGroups[collapseName]; var collapsed = (sort != 3) & (sort != 4) & CollapsedGroups[collapseName];
r += '<tr name=DevxCol' + collapseName + (collapsed?' style=display:none':'') + '><td style=position:relative><div id=devs cmenu=devsContentMenu class=bar18 tabindex=0 onmouseover=devMouseHover(this,1) onmouseout=devMouseHover(this,0) style=height:18px;width:100%;font-size:medium onkeypress="if (event.key==\'Enter\') gotoDevice(\'' + node._id + '\',null,null,event)">'; r += '<tr name=DevxCol' + collapseName + (collapsed?' style=display:none':'') + '><td style=position:relative><div id=devs cmenu=devsContentMenu class=bar18 tabindex=0 onmouseover=devMouseHover(this,1) onmouseout=devMouseHover(this,0) style=height:18px;width:100%;font-size:medium onkeypress="if (event.key==\'Enter\') gotoDevice(\'' + node._id + '\',null,null,event)">';
r += '<div class=deviceBarCheckbox><input class="' + node.meshid + ' DeviceCheckbox" onclick=p1updateInfo() value=devid_' + node._id + ' type=checkbox></div>'; r += '<div class=deviceBarCheckbox><input class="' + node.meshid + ' DeviceCheckbox" onclick=p1updateInfo() value=devid_' + node._id + ' type=checkbox></div>';
r += '<div class=deviceBarIcon onclick=gotoDevice(\'' + node._id + '\',null,null,event)><div class="j' + icon + '" style=width:16px;margin-top:1px;margin-left:2px;height:16px></div></div>'; r += '<div class=deviceBarIcon onclick=gotoDevice(\'' + node._id + '\',null,null,event)><div class="j' + icon + '" style=width:16px;margin-top:1px;margin-left:2px;height:16px></div></div>';
@ -3521,10 +3522,11 @@
} }
// If we are displaying devices by tags, put the device in the right tag group. // If we are displaying devices by tags, put the device in the right tag group.
if ((sort == 3) && (r != '')) { if (((sort == 3) || (sort == 4)) && (r != '')) {
if (node.tags) { if (node.tags) {
for (var j in node.tags) { for (var j in node.tags) {
var tag = node.tags[j]; var tag = node.tags[j];
if (sort == 4) { tag = mesh2.name + ' - ' + node.tags[j]; }
var collapsed = CollapsedGroups['tag:' + tag]; var collapsed = CollapsedGroups['tag:' + tag];
var r2 = r.replace('**xx**xx*TaG*xx**xx**', encodeURIComponentEx(tag) + (collapsed?' style=display:none':'')); var r2 = r.replace('**xx**xx*TaG*xx**xx**', encodeURIComponentEx(tag) + (collapsed?' style=display:none':''));
if (groups[tag] == null) { groups[tag] = r2; groupCount[tag] = 1; } else { groups[tag] += r2; groupCount[tag] += 1; } if (groups[tag] == null) { groups[tag] = r2; groupCount[tag] = 1; } else { groups[tag] += r2; groupCount[tag] += 1; }
@ -3545,7 +3547,7 @@
QE('autoConnectDesktopCheckbox', kvmDivs.length < 32); QE('autoConnectDesktopCheckbox', kvmDivs.length < 32);
// If displaying devices by groups, sort the group names and display the devices. // If displaying devices by groups, sort the group names and display the devices.
if (sort == 3) { if ((sort == 3) || (sort == 4)) {
var groupNames = [], tagDeviceHeaderId = 0; var groupNames = [], tagDeviceHeaderId = 0;
for (var i in groups) { groupNames.push(i); } for (var i in groups) { groupNames.push(i); }
groupNames.sort(function (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase()); }); groupNames.sort(function (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase()); });