Version 0.6.49

Ylian Saint-Hilaire committed Sep 25, 2020 at 10:36 UTC 0f1da939b9cf68a629c9f3f5db6f030845e360b6
3 files changed +13 -5
package.json
+1 -1
@@ -1,6 +1,6 @@
1 {
2 "name": "meshcentral",
3 - "version": "0.6.48",
3 + "version": "0.6.49",
4 "keywords": [
5 "Remote Device Management",
6 "Remote Device Monitoring",
translate/translate.json
+6
@@ -16640,6 +16640,12 @@
16640 "default.handlebars->27->1417"
16641 ]
16642 },
16643 + {
16644 + "en": "Group-Tags",
16645 + "xloc": [
16646 + "default.handlebars->container->column_l->p1->devListToolbarSpan->1->0->9->devListToolbarSort->sortselect->9"
16647 + ]
16648 + },
16649 {
16650 "cs": "Skupina1, Skupina2, Skupina3",
16651 "de": "Gruppe1, Gruppe2, Gruppe3",
views/default.handlebars
+6 -4
@@ -278,6 +278,7 @@
278 <option>Power</option>
279 <option>Device</option>
280 <option>Tags</option>
281 + <option>Group-Tags</option>
282 </select>
283 &nbsp;
284 </div>
@@ -3497,8 +3498,8 @@
3498
3499 var collapseName = node.meshid;
3500 if (sort == 1) { collapseName = ('pwr:' + (node.pwr?node.pwr:0)); }
3500 - else if (sort == 3) { collapseName = 'tag:**xx**xx*TaG*xx**xx**'; }
3501 - var collapsed = (sort != 3) & CollapsedGroups[collapseName];
3501 + else if ((sort == 3) || (sort == 4)) { collapseName = 'tag:**xx**xx*TaG*xx**xx**'; }
3502 + var collapsed = (sort != 3) & (sort != 4) & CollapsedGroups[collapseName];
3503 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)">';
3504 r += '<div class=deviceBarCheckbox><input class="' + node.meshid + ' DeviceCheckbox" onclick=p1updateInfo() value=devid_' + node._id + ' type=checkbox></div>';
3505 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 @@
3522 }
3523
3524 // If we are displaying devices by tags, put the device in the right tag group.
3524 - if ((sort == 3) && (r != '')) {
3525 + if (((sort == 3) || (sort == 4)) && (r != '')) {
3526 if (node.tags) {
3527 for (var j in node.tags) {
3528 var tag = node.tags[j];
3529 + if (sort == 4) { tag = mesh2.name + ' - ' + node.tags[j]; }
3530 var collapsed = CollapsedGroups['tag:' + tag];
3531 var r2 = r.replace('**xx**xx*TaG*xx**xx**', encodeURIComponentEx(tag) + (collapsed?' style=display:none':''));
3532 if (groups[tag] == null) { groups[tag] = r2; groupCount[tag] = 1; } else { groups[tag] += r2; groupCount[tag] += 1; }
@@ -3545,7 +3547,7 @@
3547 QE('autoConnectDesktopCheckbox', kvmDivs.length < 32);
3548
3549 // If displaying devices by groups, sort the group names and display the devices.
3548 - if (sort == 3) {
3550 + if ((sort == 3) || (sort == 4)) {
3551 var groupNames = [], tagDeviceHeaderId = 0;
3552 for (var i in groups) { groupNames.push(i); }
3553 groupNames.sort(function (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase()); });