From 6fe42257b849b0bf6fa1593c690abd5f0e8d2551 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 26 Mar 2019 00:14:45 -0700 Subject: [PATCH] Fixed site minification. --- db.js | 2 +- meshcentral.js | 3 - package.json | 2 +- views/default-min.handlebars | 13941 +--------------------------- views/default.handlebars | 28 +- views/login-min.handlebars | 1288 +-- views/login-mobile-min.handlebars | 1218 +-- views/login-mobile.handlebars | 12 +- views/login.handlebars | 14 +- views/messenger-min.handlebars | 848 +- views/messenger.handlebars | 3 +- 11 files changed, 35 insertions(+), 17324 deletions(-) diff --git a/db.js b/db.js index 4fb096bc..a738fb95 100644 --- a/db.js +++ b/db.js @@ -410,7 +410,7 @@ module.exports.CreateDB = function (parent) { obj.file.count({ type: 'mesh' }, function (err, meshCount) { obj.file.count({ type: 'user' }, function (err, userCount) { obj.file.count({}, function (err, totalCount) { - func({ nodes: nodeCount, meshes: meshCount, powerEvents: powerCount, users: userCount, nodeInterfaces: nodeInterfaceCount, notes: noteCount, connectEvent: nodeLastConnectCount, smbios: nodeSmbiosCount, total: totalCount }); + func({ nodes: nodeCount, meshes: meshCount, users: userCount, total: totalCount }); }); }); }); diff --git a/meshcentral.js b/meshcentral.js index 92b9c740..82bdfd79 100644 --- a/meshcentral.js +++ b/meshcentral.js @@ -818,9 +818,6 @@ function CreateMeshCentralServer(config, args) { if (obj.mpsserver != null) { data.conn.am = Object.keys(obj.mpsserver.ciraConnections).length; } obj.db.SetServerStats(data); }); - - - }, 300000); //obj.debug(1, 'Server started'); diff --git a/package.json b/package.json index a398f046..381c5538 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.3.1-c", + "version": "0.3.1-e", "keywords": [ "Remote Management", "Intel AMT", diff --git a/views/default-min.handlebars b/views/default-min.handlebars index e6465347..5dcc8dfa 100644 --- a/views/default-min.handlebars +++ b/views/default-min.handlebars @@ -1,13940 +1 @@ - 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.handlebars b/views/default.handlebars index 76266058..0f035572 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -25,7 +25,7 @@ - + @@ -754,8 +754,8 @@   Password:
\ No newline at end of file + MeshCentral - Login
{{{title}}}
{{{title2}}}

Welcome


\ No newline at end of file diff --git a/views/login-mobile-min.handlebars b/views/login-mobile-min.handlebars index 1a1aeff0..c06a9651 100644 --- a/views/login-mobile-min.handlebars +++ b/views/login-mobile-min.handlebars @@ -1,1217 +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/login-mobile.handlebars b/views/login-mobile.handlebars index 7502965e..0506f220 100644 --- a/views/login-mobile.handlebars +++ b/views/login-mobile.handlebars @@ -288,12 +288,12 @@ if ('{{loginmode}}' == '4') { try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null } if ((hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn')) { - hardwareKeyChallenge.challenge = Uint8Array.from(atob(hardwareKeyChallenge.challenge), c => c.charCodeAt(0)).buffer; + hardwareKeyChallenge.challenge = Uint8Array.from(atob(hardwareKeyChallenge.challenge), function (c) { return c.charCodeAt(0) }).buffer; - const publicKeyCredentialRequestOptions = { challenge: hardwareKeyChallenge.challenge, allowCredentials: [], timeout: hardwareKeyChallenge.timeout } + var publicKeyCredentialRequestOptions = { challenge: hardwareKeyChallenge.challenge, allowCredentials: [], timeout: hardwareKeyChallenge.timeout } for (var i = 0; i < hardwareKeyChallenge.keyIds.length; i++) { publicKeyCredentialRequestOptions.allowCredentials.push( - { id: Uint8Array.from(atob(hardwareKeyChallenge.keyIds[i]), c => c.charCodeAt(0)), type: 'public-key', transports: ['usb', 'ble', 'nfc'], } + { id: Uint8Array.from(atob(hardwareKeyChallenge.keyIds[i]), function (c) { return c.charCodeAt(0) }), type: 'public-key', transports: ['usb', 'ble', 'nfc'], } ); } @@ -328,12 +328,12 @@ if ('{{loginmode}}' == '5') { try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null } if ((hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn')) { - hardwareKeyChallenge.challenge = Uint8Array.from(atob(hardwareKeyChallenge.challenge), c => c.charCodeAt(0)).buffer; + hardwareKeyChallenge.challenge = Uint8Array.from(atob(hardwareKeyChallenge.challenge), function (c) { return c.charCodeAt(0) }).buffer; - const publicKeyCredentialRequestOptions = { challenge: hardwareKeyChallenge.challenge, allowCredentials: [], timeout: hardwareKeyChallenge.timeout } + var publicKeyCredentialRequestOptions = { challenge: hardwareKeyChallenge.challenge, allowCredentials: [], timeout: hardwareKeyChallenge.timeout } for (var i = 0; i < hardwareKeyChallenge.keyIds.length; i++) { publicKeyCredentialRequestOptions.allowCredentials.push( - { id: Uint8Array.from(atob(hardwareKeyChallenge.keyIds[i]), c => c.charCodeAt(0)), type: 'public-key', transports: ['usb', 'ble', 'nfc'], } + { id: Uint8Array.from(atob(hardwareKeyChallenge.keyIds[i]), function (c) { return c.charCodeAt(0) }), type: 'public-key', transports: ['usb', 'ble', 'nfc'], } ); } diff --git a/views/login.handlebars b/views/login.handlebars index 814c928b..2e82bdf6 100644 --- a/views/login.handlebars +++ b/views/login.handlebars @@ -87,7 +87,7 @@ } - + MeshCentral - Login @@ -373,12 +373,12 @@ if ('{{loginmode}}' == '4') { try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null } if ((hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn')) { - hardwareKeyChallenge.challenge = Uint8Array.from(atob(hardwareKeyChallenge.challenge), c => c.charCodeAt(0)).buffer; + hardwareKeyChallenge.challenge = Uint8Array.from(atob(hardwareKeyChallenge.challenge), function (c) { return c.charCodeAt(0) }).buffer; - const publicKeyCredentialRequestOptions = { challenge: hardwareKeyChallenge.challenge, allowCredentials: [], timeout: hardwareKeyChallenge.timeout } + var publicKeyCredentialRequestOptions = { challenge: hardwareKeyChallenge.challenge, allowCredentials: [], timeout: hardwareKeyChallenge.timeout } for (var i = 0; i < hardwareKeyChallenge.keyIds.length; i++) { publicKeyCredentialRequestOptions.allowCredentials.push( - { id: Uint8Array.from(atob(hardwareKeyChallenge.keyIds[i]), c => c.charCodeAt(0)), type: 'public-key', transports: ['usb', 'ble', 'nfc'], } + { id: Uint8Array.from(atob(hardwareKeyChallenge.keyIds[i]), function (c) { return c.charCodeAt(0) }), type: 'public-key', transports: ['usb', 'ble', 'nfc'], } ); } @@ -413,12 +413,12 @@ if ('{{loginmode}}' == '5') { try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null } if ((hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn')) { - hardwareKeyChallenge.challenge = Uint8Array.from(atob(hardwareKeyChallenge.challenge), c => c.charCodeAt(0)).buffer; + hardwareKeyChallenge.challenge = Uint8Array.from(atob(hardwareKeyChallenge.challenge), function (c) { return c.charCodeAt(0) }).buffer; - const publicKeyCredentialRequestOptions = { challenge: hardwareKeyChallenge.challenge, allowCredentials: [], timeout: hardwareKeyChallenge.timeout } + var publicKeyCredentialRequestOptions = { challenge: hardwareKeyChallenge.challenge, allowCredentials: [], timeout: hardwareKeyChallenge.timeout } for (var i = 0; i < hardwareKeyChallenge.keyIds.length; i++) { publicKeyCredentialRequestOptions.allowCredentials.push( - { id: Uint8Array.from(atob(hardwareKeyChallenge.keyIds[i]), c => c.charCodeAt(0)), type: 'public-key', transports: ['usb', 'ble', 'nfc'], } + { id: Uint8Array.from(atob(hardwareKeyChallenge.keyIds[i]), function (c) { return c.charCodeAt(0) }), type: 'public-key', transports: ['usb', 'ble', 'nfc'], } ); } diff --git a/views/messenger-min.handlebars b/views/messenger-min.handlebars index e2486610..1115bb1d 100644 --- a/views/messenger-min.handlebars +++ b/views/messenger-min.handlebars @@ -1,847 +1 @@ - MeshMessenger
MeshMessenger
\ No newline at end of file + MeshMessenger
MeshMessenger
\ No newline at end of file diff --git a/views/messenger.handlebars b/views/messenger.handlebars index 474f7aee..f0adcc0d 100644 --- a/views/messenger.handlebars +++ b/views/messenger.handlebars @@ -560,8 +560,7 @@ displayLocalVideo(true); } for (var i in tracks) { webrtc.addTrack(tracks[i], localStream); } - }) - .catch(function (err) { + }, function (err) { displayControl(err.message + '.'); hangUpButtonClick(1); });