diff --git a/agents/meshinstall-initd.sh b/agents/meshinstall-initd.sh index 31a39b79..58f05148 100644 --- a/agents/meshinstall-initd.sh +++ b/agents/meshinstall-initd.sh @@ -34,7 +34,7 @@ stop() { pid=$( cat "$PIDFILE" ) if kill -0 $pid 2>/dev/null; then echo 'Stopping service…' >&2 - kill -16 $pid + kill -15 $pid echo 'Service stopped' >&2 else echo 'Service not running' diff --git a/agents/modules_meshcore/amt-manage.js b/agents/modules_meshcore/amt-manage.js index 7b7389a5..6d3b8a82 100644 --- a/agents/modules_meshcore/amt-manage.js +++ b/agents/modules_meshcore/amt-manage.js @@ -110,7 +110,7 @@ function AmtManager(agent, db, isdebug) { } // Sent to the entire group, no sessionid or userid specified. - if (notify != null) { agent.SendCommand({ "action": "msg", "type": "notify", "value": notify, "tag": "general" }); } + if (notify != null) { agent.SendCommand({ "action": "msg", "type": "notify", "value": notify, "tag": "general", "amtMessage": amtMessage }); } } // Launch LMS diff --git a/meshuser.js b/meshuser.js index e062cb18..3fcb5ed2 100644 --- a/meshuser.js +++ b/meshuser.js @@ -310,6 +310,11 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use // Send user information to web socket, this is the first thing we send try { ws.send(JSON.stringify({ action: 'userinfo', userinfo: parent.CloneSafeUser(parent.users[user._id]) })); } catch (ex) { } + // Send user web state + db.Get('ws' + user._id, function (err, docs) { + if (docs.length == 1) { try { ws.send(JSON.stringify({ action: 'event', event: { action: 'userWebState', state: docs[0].state, nolog: 1 } })); } catch (ex) { } } + }); + // We are all set, start receiving data ws._socket.resume(); }); diff --git a/package.json b/package.json index 3ae66b41..51f47f90 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.3.8-d", + "version": "0.3.8-e", "keywords": [ "Remote Management", "Intel AMT", diff --git a/views/default-min.handlebars b/views/default-min.handlebars index f4d7a6a5..2631e27c 100644 --- a/views/default-min.handlebars +++ b/views/default-min.handlebars @@ -1 +1 @@ -
{{{logoutControl}}}
My Devices | My Account | My Events | My Files | My Users | My Server |
{{{logoutControl}}}
My Devices | My Account | My Events | My Files | My Users | My Server |
Notification Settings
Change password
Delete account
@@ -1432,6 +1433,8 @@
// Node was found, dispatch the message
if (message.type == 'console') { p15consoleReceive(nodes[index], message.value); } // This is a console message.
else if (message.type == 'notify') { // This is a notification message.
+ var n = getstore('notifications', 0);
+ if (((n & 8) == 0) && (message.amtMessage != null)) { break; } // Intel AMT desktop & terminal messages should be ignored.
var n = { text: message.value, title: message.title, icon: message.icon };
if (message.nodeid != null) { n.nodeid = message.nodeid; }
if (message.tag != null) { n.tag = message.tag; }
@@ -1942,6 +1945,19 @@
if (index != -1) {
var node = nodes[index];
+ // Event the connection change if needed
+ var n = getstore('notifications', 0);
+ if (n & 2) {
+ if (((node.conn & 1) == 0) && ((message.event.conn & 1) != 0)) { addNotification({ text: 'Agent connected', title: node.name, icon: node.icon, nodeid: node._id }); }
+ if (((node.conn & 2) == 0) && ((message.event.conn & 2) != 0)) { addNotification({ text: 'Intel AMT detected', title: node.name, icon: node.icon, nodeid: node._id }); }
+ if (((node.conn & 4) == 0) && ((message.event.conn & 4) != 0)) { addNotification({ text: 'Intel AMT CIRA connected', title: node.name, icon: node.icon, nodeid: node._id }); }
+ }
+ if (n & 4) {
+ if (((node.conn & 1) != 0) && ((message.event.conn & 1) == 0)) { addNotification({ text: 'Agent disconnected', title: node.name, icon: node.icon, nodeid: node._id }); }
+ if (((node.conn & 2) != 0) && ((message.event.conn & 2) == 0)) { addNotification({ text: 'Intel AMT not detected', title: node.name, icon: node.icon, nodeid: node._id }); }
+ if (((node.conn & 4) != 0) && ((message.event.conn & 4) == 0)) { addNotification({ text: 'Intel AMT CIRA disconnected', title: node.name, icon: node.icon, nodeid: node._id }); }
+ }
+
// Change the node connection state
node.conn = message.event.conn;
node.pwr = message.event.pwr;
@@ -6052,6 +6068,31 @@
return false;
}
+ function account_showAccountNotifySettings() {
+ if (xxdialogMode) return false;
+ var x = '';
+ x += '