Fixed site minification.
This commit is contained in:
parent
5169bf6309
commit
6fe42257b8
2
db.js
2
db.js
|
@ -410,7 +410,7 @@ module.exports.CreateDB = function (parent) {
|
||||||
obj.file.count({ type: 'mesh' }, function (err, meshCount) {
|
obj.file.count({ type: 'mesh' }, function (err, meshCount) {
|
||||||
obj.file.count({ type: 'user' }, function (err, userCount) {
|
obj.file.count({ type: 'user' }, function (err, userCount) {
|
||||||
obj.file.count({}, function (err, totalCount) {
|
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 });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -818,9 +818,6 @@ function CreateMeshCentralServer(config, args) {
|
||||||
if (obj.mpsserver != null) { data.conn.am = Object.keys(obj.mpsserver.ciraConnections).length; }
|
if (obj.mpsserver != null) { data.conn.am = Object.keys(obj.mpsserver.ciraConnections).length; }
|
||||||
obj.db.SetServerStats(data);
|
obj.db.SetServerStats(data);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}, 300000);
|
}, 300000);
|
||||||
|
|
||||||
//obj.debug(1, 'Server started');
|
//obj.debug(1, 'Server started');
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "meshcentral",
|
"name": "meshcentral",
|
||||||
"version": "0.3.1-c",
|
"version": "0.3.1-e",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"Remote Management",
|
"Remote Management",
|
||||||
"Intel AMT",
|
"Intel AMT",
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -25,7 +25,7 @@
|
||||||
<script type="text/javascript" src="scripts/agent-redir-rtc-0.1.0.js"></script>
|
<script type="text/javascript" src="scripts/agent-redir-rtc-0.1.0.js"></script>
|
||||||
<script type="text/javascript" src="scripts/agent-desktop-0.0.2.js"></script>
|
<script type="text/javascript" src="scripts/agent-desktop-0.0.2.js"></script>
|
||||||
<script type="text/javascript" src="scripts/qrcode.min.js"></script>
|
<script type="text/javascript" src="scripts/qrcode.min.js"></script>
|
||||||
<script type="text/javascript" src="scripts/u2f-api.js"></script>
|
<script keeplink=1 type="text/javascript" src="scripts/u2f-api.js"></script>
|
||||||
<script keeplink=1 type="text/javascript" src="scripts/charts.js"></script>
|
<script keeplink=1 type="text/javascript" src="scripts/charts.js"></script>
|
||||||
<script keeplink=1 type="text/javascript" src="scripts/filesaver.1.1.20151003.js"></script>
|
<script keeplink=1 type="text/javascript" src="scripts/filesaver.1.1.20151003.js"></script>
|
||||||
<script keeplink=1 type="text/javascript" src="scripts/ol.js"></script>
|
<script keeplink=1 type="text/javascript" src="scripts/ol.js"></script>
|
||||||
|
@ -754,8 +754,8 @@
|
||||||
<option value=2>Database</option>
|
<option value=2>Database</option>
|
||||||
</select>
|
</select>
|
||||||
<select id=p40time onchange=updateServerTimelineHours()>
|
<select id=p40time onchange=updateServerTimelineHours()>
|
||||||
<option value=1>Last hour</option>
|
<option value=3>Last 3 hours</option>
|
||||||
<option value=4>Last 3 hours</option>
|
<option value=8>Last 8 hours</option>
|
||||||
<option value=24>Last day</option>
|
<option value=24>Last day</option>
|
||||||
<option value=168>Last week</option>
|
<option value=168>Last week</option>
|
||||||
<option value=5040>Last 30 days</option>
|
<option value=5040>Last 30 days</option>
|
||||||
|
@ -1569,15 +1569,15 @@
|
||||||
setDialogMode(2, "Add Security Key", 2, null, x);
|
setDialogMode(2, "Add Security Key", 2, null, x);
|
||||||
|
|
||||||
var publicKey = message.request;
|
var publicKey = message.request;
|
||||||
message.request.challenge = Uint8Array.from(atob(message.request.challenge), c => c.charCodeAt(0))
|
message.request.challenge = Uint8Array.from(atob(message.request.challenge), function (c) { return c.charCodeAt(0) })
|
||||||
message.request.user.id = Uint8Array.from(atob(message.request.user.id), c => c.charCodeAt(0))
|
message.request.user.id = Uint8Array.from(atob(message.request.user.id), function (c) { return c.charCodeAt(0) })
|
||||||
navigator.credentials.create({ publicKey })
|
navigator.credentials.create({ publicKey: publicKey })
|
||||||
.then((newCredentialInfo) => {
|
.then(function(newCredentialInfo) {
|
||||||
// Public key credential
|
// Public key credential
|
||||||
var r = { rawId: btoa(String.fromCharCode.apply(null, new Uint8Array(newCredentialInfo.rawId))), response: { attestationObject: btoa(String.fromCharCode.apply(null, new Uint8Array(newCredentialInfo.response.attestationObject))), clientDataJSON: btoa(String.fromCharCode.apply(null, new Uint8Array(newCredentialInfo.response.clientDataJSON))) }, type: newCredentialInfo.type };
|
var r = { rawId: btoa(String.fromCharCode.apply(null, new Uint8Array(newCredentialInfo.rawId))), response: { attestationObject: btoa(String.fromCharCode.apply(null, new Uint8Array(newCredentialInfo.response.attestationObject))), clientDataJSON: btoa(String.fromCharCode.apply(null, new Uint8Array(newCredentialInfo.response.clientDataJSON))) }, type: newCredentialInfo.type };
|
||||||
meshserver.send({ action: 'webauthn-endregister', response: r });
|
meshserver.send({ action: 'webauthn-endregister', response: r });
|
||||||
setDialogMode(0);
|
setDialogMode(0);
|
||||||
}).catch((error) => {
|
}, function(error) {
|
||||||
// Error
|
// Error
|
||||||
setDialogMode(2, "Add Security Key", 1, null, "ERROR: " + error);
|
setDialogMode(2, "Add Security Key", 1, null, "ERROR: " + error);
|
||||||
});
|
});
|
||||||
|
@ -7269,15 +7269,16 @@
|
||||||
function refreshServerTimelineStats(stats) { meshserver.send({ action: 'servertimelinestats', hours: 24 }); }
|
function refreshServerTimelineStats(stats) { meshserver.send({ action: 'servertimelinestats', hours: 24 }); }
|
||||||
function pastDate(hours) { var t = new Date(); t.setTime(t.getTime() - (60 * 60 * 1000 * hours)); return t; }
|
function pastDate(hours) { var t = new Date(); t.setTime(t.getTime() - (60 * 60 * 1000 * hours)); return t; }
|
||||||
function setServerTimelineStats(stats) { serverTimelineStats = stats; updateServerTimelineStats(); }
|
function setServerTimelineStats(stats) { serverTimelineStats = stats; updateServerTimelineStats(); }
|
||||||
function updateServerTimelineHours() { serverTimelineConfig.data.labels = [pastDate(0), pastDate(Q('p40time').value)]; window.serverMainStats.update(); }
|
function updateServerTimelineHours() { serverTimelineConfig.options.scales.xAxes[0].time = { min: pastDate(Q('p40time').value) }; window.serverMainStats.update(); }
|
||||||
function setupServerTimelineStats() { window.serverMainStats = new Chart(document.getElementById('serverMainStats').getContext('2d'), serverTimelineConfig); }
|
function setupServerTimelineStats() { window.serverMainStats = new Chart(document.getElementById('serverMainStats').getContext('2d'), serverTimelineConfig); }
|
||||||
|
|
||||||
function updateServerTimelineStats() {
|
function updateServerTimelineStats() {
|
||||||
var data, chartType = Q('p40type').value;
|
var data, chartType = Q('p40type').value, timeAfter = pastDate(Q('p40time').value);
|
||||||
|
serverTimelineConfig.options.scales.xAxes[0].time = { min: timeAfter };
|
||||||
if (chartType == 0) { // Connections
|
if (chartType == 0) { // Connections
|
||||||
serverTimelineConfig.options.scales.yAxes[0].scaleLabel.labelString = 'Connection Count';
|
serverTimelineConfig.options.scales.yAxes[0].scaleLabel.labelString = 'Connection Count';
|
||||||
data = {
|
data = {
|
||||||
labels: [pastDate(0), pastDate(Q('p40time').value)],
|
labels: [pastDate(0), timeAfter],
|
||||||
datasets: [
|
datasets: [
|
||||||
{ label: 'Agents', data: [], backgroundColor: 'rgba(158, 151, 16, .1)', borderColor: 'rgb(158, 151, 16)', fill: true },
|
{ label: 'Agents', data: [], backgroundColor: 'rgba(158, 151, 16, .1)', borderColor: 'rgb(158, 151, 16)', fill: true },
|
||||||
{ label: 'Users', data: [], backgroundColor: 'rgba(16, 84, 158, .1)', borderColor: 'rgb(16, 84, 158)', fill: true },
|
{ label: 'Users', data: [], backgroundColor: 'rgba(16, 84, 158, .1)', borderColor: 'rgb(16, 84, 158)', fill: true },
|
||||||
|
@ -7287,6 +7288,7 @@
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
for (var i = 0; i < serverTimelineStats.length; i++) {
|
for (var i = 0; i < serverTimelineStats.length; i++) {
|
||||||
|
var t = new Date(serverTimelineStats[i].time);
|
||||||
if (serverTimelineStats[i].conn) {
|
if (serverTimelineStats[i].conn) {
|
||||||
data.datasets[0].data.push({ x: serverTimelineStats[i].time, y: serverTimelineStats[i].conn.ca });
|
data.datasets[0].data.push({ x: serverTimelineStats[i].time, y: serverTimelineStats[i].conn.ca });
|
||||||
data.datasets[1].data.push({ x: serverTimelineStats[i].time, y: serverTimelineStats[i].conn.cu });
|
data.datasets[1].data.push({ x: serverTimelineStats[i].time, y: serverTimelineStats[i].conn.cu });
|
||||||
|
@ -7298,7 +7300,7 @@
|
||||||
} else if (chartType == 1) { // Memory
|
} else if (chartType == 1) { // Memory
|
||||||
serverTimelineConfig.options.scales.yAxes[0].scaleLabel.labelString = 'Megabytes';
|
serverTimelineConfig.options.scales.yAxes[0].scaleLabel.labelString = 'Megabytes';
|
||||||
data = {
|
data = {
|
||||||
labels: [pastDate(0), pastDate(Q('p40time').value)],
|
labels: [pastDate(0), timeAfter],
|
||||||
datasets: [
|
datasets: [
|
||||||
{ label: 'External', data: [], backgroundColor: 'rgba(158, 151, 16, .1)', borderColor: 'rgb(158, 151, 16)', fill: true },
|
{ label: 'External', data: [], backgroundColor: 'rgba(158, 151, 16, .1)', borderColor: 'rgb(158, 151, 16)', fill: true },
|
||||||
{ label: 'Heap Used', data: [], backgroundColor: 'rgba(16, 84, 158, .1)', borderColor: 'rgb(16, 84, 158)', fill: true },
|
{ label: 'Heap Used', data: [], backgroundColor: 'rgba(16, 84, 158, .1)', borderColor: 'rgb(16, 84, 158)', fill: true },
|
||||||
|
@ -7315,7 +7317,7 @@
|
||||||
} else if (chartType == 2) { // Database
|
} else if (chartType == 2) { // Database
|
||||||
serverTimelineConfig.options.scales.yAxes[0].scaleLabel.labelString = 'Records';
|
serverTimelineConfig.options.scales.yAxes[0].scaleLabel.labelString = 'Records';
|
||||||
data = {
|
data = {
|
||||||
labels: [pastDate(0), pastDate(Q('p40time').value)],
|
labels: [pastDate(0), timeAfter],
|
||||||
datasets: [
|
datasets: [
|
||||||
{ label: 'Groups', data: [], backgroundColor: 'rgba(158, 151, 16, .1)', borderColor: 'rgb(158, 151, 16)', fill: true },
|
{ label: 'Groups', data: [], backgroundColor: 'rgba(158, 151, 16, .1)', borderColor: 'rgb(158, 151, 16)', fill: true },
|
||||||
{ label: 'Devices', data: [], backgroundColor: 'rgba(16, 84, 158, .1)', borderColor: 'rgb(16, 84, 158)', fill: true },
|
{ label: 'Devices', data: [], backgroundColor: 'rgba(16, 84, 158, .1)', borderColor: 'rgb(16, 84, 158)', fill: true },
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -288,12 +288,12 @@
|
||||||
if ('{{loginmode}}' == '4') {
|
if ('{{loginmode}}' == '4') {
|
||||||
try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null }
|
try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null }
|
||||||
if ((hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn')) {
|
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++) {
|
for (var i = 0; i < hardwareKeyChallenge.keyIds.length; i++) {
|
||||||
publicKeyCredentialRequestOptions.allowCredentials.push(
|
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') {
|
if ('{{loginmode}}' == '5') {
|
||||||
try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null }
|
try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null }
|
||||||
if ((hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn')) {
|
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++) {
|
for (var i = 0; i < hardwareKeyChallenge.keyIds.length; i++) {
|
||||||
publicKeyCredentialRequestOptions.allowCredentials.push(
|
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'], }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script type="text/javascript" src="scripts/common-0.0.1.js"></script>
|
<script type="text/javascript" src="scripts/common-0.0.1.js"></script>
|
||||||
<script type="text/javascript" src="scripts/u2f-api.js"></script>
|
<script keeplink=1 type="text/javascript" src="scripts/u2f-api.js"></script>
|
||||||
<title>MeshCentral - Login</title>
|
<title>MeshCentral - Login</title>
|
||||||
</head>
|
</head>
|
||||||
<body onload="if (typeof(startup) !== 'undefined') startup();">
|
<body onload="if (typeof(startup) !== 'undefined') startup();">
|
||||||
|
@ -373,12 +373,12 @@
|
||||||
if ('{{loginmode}}' == '4') {
|
if ('{{loginmode}}' == '4') {
|
||||||
try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null }
|
try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null }
|
||||||
if ((hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn')) {
|
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++) {
|
for (var i = 0; i < hardwareKeyChallenge.keyIds.length; i++) {
|
||||||
publicKeyCredentialRequestOptions.allowCredentials.push(
|
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') {
|
if ('{{loginmode}}' == '5') {
|
||||||
try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null }
|
try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null }
|
||||||
if ((hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn')) {
|
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++) {
|
for (var i = 0; i < hardwareKeyChallenge.keyIds.length; i++) {
|
||||||
publicKeyCredentialRequestOptions.allowCredentials.push(
|
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'], }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -560,8 +560,7 @@
|
||||||
displayLocalVideo(true);
|
displayLocalVideo(true);
|
||||||
}
|
}
|
||||||
for (var i in tracks) { webrtc.addTrack(tracks[i], localStream); }
|
for (var i in tracks) { webrtc.addTrack(tracks[i], localStream); }
|
||||||
})
|
}, function (err) {
|
||||||
.catch(function (err) {
|
|
||||||
displayControl(err.message + '.');
|
displayControl(err.message + '.');
|
||||||
hangUpButtonClick(1);
|
hangUpButtonClick(1);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue