From e9372a049618766292841c0dd80e15185cc16cb5 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Wed, 26 Sep 2018 17:29:12 -0700 Subject: [PATCH] UI improvements --- meshuser.js | 2 +- package.json | 2 +- public/images/views.png | Bin 1399 -> 1815 bytes public/styles/style.css | 23 ++++++++++ views/default-min.handlebars | 2 +- views/default-mobile-min.handlebars | 2 +- views/default-mobile.handlebars | 38 ++++++++-------- views/default.handlebars | 67 +++++++++++++++++++--------- 8 files changed, 93 insertions(+), 43 deletions(-) diff --git a/meshuser.js b/meshuser.js index 0c7eae3b..ba6ed0f2 100644 --- a/meshuser.js +++ b/meshuser.js @@ -128,7 +128,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain) { obj.db.getStats(function (data) { var os = require('os'); var stats = { action: 'serverstats', totalmem: os.totalmem(), freemem: os.freemem() }; - if (obj.parent.parent.platform != 'win32') { stats.cpuavg = os.loadavg(); } //else { stats.cpuavg = [ 0.2, 0.5, 0.6 ]; } + if (obj.parent.parent.platform != 'win32') { stats.cpuavg = os.loadavg(); } // else { stats.cpuavg = [ 0.2435345, 0.523234234, 0.6435345345 ]; } var serverStats = { "User Accounts": Object.keys(obj.parent.users).length, "Device Groups": Object.keys(obj.parent.meshes).length, "Connected Agents": Object.keys(obj.parent.wsagents).length, "Connected Users": Object.keys(obj.parent.wssessions2).length }; if (obj.parent.parent.mpsserver != null) { serverStats['Connected Intel® AMT'] = Object.keys(obj.parent.parent.mpsserver.ciraConnections).length; } stats.values = { "Server State": serverStats, "Database": { "Records": data.total, "Users": data.users, "Device Groups": data.meshes, "Devices": data.nodes, "Device NetInfo": data.nodeInterfaces, "Device Power Event": data.powerEvents, "Notes": data.notes, "Connection Records": data.connectEvents } } diff --git a/package.json b/package.json index 309a3450..14f26b6a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.2.1-x", + "version": "0.2.1-z", "keywords": [ "Remote Management", "Intel AMT", diff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#WE)o}QkdySv-4V+tnNKUznzqCtEG zwazRJ92Yimm$#w8{u zvOb-%vNHKB3@%fjpP#<#1wtLF>CkKI*wH8q2X}5KToVR&KE1uY@*WI+({b8BWMyT^ z^O&`@HPc%NI_L@etpT?uz3An%l%F2l;qg8$JITq(tkwzm_$EGFg}Dxw?&*4jDlsuJa>*JS8-tyl z9hoevwy2gvY0aQ|4yjWHw-3e0CP;XOP&l*z6>08YW55ue&yUS1YWU=^=ZsJ;Y( z`Y2MP8$3b}KC8R9xF`?mQd56Z4TE9^P7qvjFh5#ZS&Yy9*;D zBhb^+BPS6}+WkQXR!84G1w!qH%s`F7 MeshCentral
{{{title}}}
{{{title2}}}

{{{logoutControl}}}

 

\ No newline at end of file + MeshCentral
{{{title}}}
{{{title2}}}

{{{logoutControl}}}

 

\ No newline at end of file diff --git a/views/default-mobile-min.handlebars b/views/default-mobile-min.handlebars index d377c55c..a87bfe0b 100644 --- a/views/default-mobile-min.handlebars +++ b/views/default-mobile-min.handlebars @@ -1 +1 @@ - MeshCentral - Login
{{{title}}}
{{{title2}}}
\ No newline at end of file + MeshCentral - Login
{{{title}}}
{{{title2}}}
\ No newline at end of file diff --git a/views/default-mobile.handlebars b/views/default-mobile.handlebars index 812f0f8f..338db28c 100644 --- a/views/default-mobile.handlebars +++ b/views/default-mobile.handlebars @@ -243,11 +243,11 @@
- Meshes + Device Groups ( New )

- +
@@ -953,9 +953,9 @@ function account_createMesh() { if (xxdialogMode) return; var x = addHtmlValue('Name', ''); - x += addHtmlValue('Type', '
'); + x += addHtmlValue('Type', '
'); x += addHtmlValue('Description', '
'); - setDialogMode(2, "Create Mesh", 3, account_createMeshEx, x); + setDialogMode(2, "Create Device Group", 3, account_createMeshEx, x); account_validateMeshCreate(); Q('dp3meshname').focus(); } @@ -1472,7 +1472,7 @@ var x = ''; // Attribute: Mesh - x += addDeviceAttribute('Mesh', '' + EscapeHtml(meshes[node.meshid].name) + ''); + x += addDeviceAttribute('Group', '' + EscapeHtml(meshes[node.meshid].name) + ''); // Attribute: Name if (node.rname != null) { x += addDeviceAttribute('Name', '' + EscapeHtml(node.rname) + ''); } @@ -1504,7 +1504,7 @@ var str = ''; if (node.agent.id <= agentsStr.length) { str = agentsStr[node.agent.id]; } else { str = agentsStr[0]; } if (node.agent.ver != 0) { str += ' v' + node.agent.ver; } - x += addDeviceAttribute('Mesh Agent', str); + x += addDeviceAttribute('Agent', str); } // Attribute: Intel AMT @@ -1552,17 +1552,17 @@ var connectivity = node.conn; if (connectivity && connectivity > 1) { var cstate = []; - if ((node.conn & 1) != 0) cstate.push('Mesh Agent'); + if ((node.conn & 1) != 0) cstate.push('Agent'); if ((node.conn & 2) != 0) cstate.push('Intel® AMT CIRA'); if ((node.conn & 4) != 0) cstate.push('Intel® AMT'); - if ((node.conn & 8) != 0) cstate.push('Mesh Relay'); + if ((node.conn & 8) != 0) cstate.push('Agent Relay'); x += addDeviceAttribute('Connectivity', cstate.join(', ')); } - // Node grouping tags + // Node tags var groupingTags = 'None'; if (node.tags != null) { groupingTags = ''; for (var i in node.tags) { groupingTags += '' + node.tags[i] + ''; } } - x += addDeviceAttribute('Groups', '' + groupingTags + ''); + x += addDeviceAttribute('Tags', '' + groupingTags + ''); x += '

'; // Show action button, only show if we have permissions 4, 8, 64 @@ -1792,7 +1792,7 @@ meshserver.send({ action: 'changedevice', nodeid: currentNode._id, icon: icon }); } - var showEditNodeValueDialog_modes = ['Device Name', 'Hostname', 'Description', 'Groups']; + var showEditNodeValueDialog_modes = ['Device Name', 'Hostname', 'Description', 'Tags']; var showEditNodeValueDialog_modes2 = ['name', 'host', 'desc', 'tags']; var showEditNodeValueDialog_modes3 = ['', '', '', 'Group1, Group2, Group3']; function showEditNodeValueDialog(mode) { @@ -2577,7 +2577,7 @@ var meshtype = 'Unknown #' + currentMesh.mtype; var meshrights = currentMesh.links['user/' + domain + '/' + userinfo.name.toLowerCase()].rights; if (currentMesh.mtype == 1) meshtype = 'Intel® AMT group'; - if (currentMesh.mtype == 2) meshtype = 'Mesh agent group'; + if (currentMesh.mtype == 2) meshtype = 'Software agent group'; var x = ''; x += addHtmlValue('Name', addLinkConditional(EscapeHtml(currentMesh.name), 'p20editmesh(1)', (meshrights & 1) != 0)); @@ -2665,7 +2665,7 @@ if (xxdialogMode) return; var x = addHtmlValue('Name', ''); x += addHtmlValue('Description', ''); - setDialogMode(2, "Edit Mesh", 3, p20editmeshEx, x); + setDialogMode(2, "Edit Device Group", 3, p20editmeshEx, x); Q('dp20meshname').value = currentMesh.name; if (currentMesh.desc) Q('dp20meshdesc').value = currentMesh.desc; p20editmeshValidate(); @@ -2685,9 +2685,9 @@ var x = addHtmlValue('User', ''); x += '
'; x += 'Full Administrator
'; - x += 'Edit Mesh
'; - x += 'Manage Mesh Users
'; - x += 'Manage Mesh Computers
'; + x += 'Edit Device Group
'; + x += 'Manage Device Group Users
'; + x += 'Manage Device Group Computers
'; x += 'Remote Control
'; x += 'Mesh Agent Console
'; x += 'Server Files
'; @@ -2733,9 +2733,9 @@ userid = decodeURIComponent(userid); var r = '', cmeshrights = currentMesh.links['user/' + domain + '/' + userinfo.name.toLowerCase()].rights, meshrights = currentMesh.links[userid].rights; if (meshrights == 0xFFFFFFFF) r = ', Full Administrator'; else { - if ((meshrights & 1) != 0) r += ', Edit Mesh'; - if ((meshrights & 2) != 0) r += ', Manage Mesh Users'; - if ((meshrights & 4) != 0) r += ', Manage Mesh Computers'; + if ((meshrights & 1) != 0) r += ', Edit Device Group'; + if ((meshrights & 2) != 0) r += ', Manage Device Group Users'; + if ((meshrights & 4) != 0) r += ', Manage Device Group Computers'; if ((meshrights & 8) != 0) r += ', Remote Control'; if ((meshrights & 16) != 0) r += ', Agent Console'; if ((meshrights & 32) != 0) r += ', Server Files'; diff --git a/views/default.handlebars b/views/default.handlebars index 41fda3cc..99037cfd 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -367,7 +367,8 @@
-
+
+

General -

@@ -385,6 +386,7 @@