Rebranding fixes
This commit is contained in:
parent
b7280ff7ad
commit
60af11542f
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "meshcentral",
|
"name": "meshcentral",
|
||||||
"version": "0.4.0-u",
|
"version": "0.4.0-v",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"Remote Management",
|
"Remote Management",
|
||||||
"Intel AMT",
|
"Intel AMT",
|
||||||
|
|
|
@ -260,8 +260,13 @@
|
||||||
agentDesktop.ProcessData(data);
|
agentDesktop.ProcessData(data);
|
||||||
} else if (recFileProtocol == 101) {
|
} else if (recFileProtocol == 101) {
|
||||||
// Intel AMT KVM
|
// Intel AMT KVM
|
||||||
if ((readState == 0) && (rstr2hex(data) == '4100000000000000')) { readState = 1; } // We are not authenticated, KVM data starts here.
|
if ((readState == 0) && (rstr2hex(data) == '4100000000000000')) {
|
||||||
else if (readState == 1) { amtDesktop.ProcessData(data); }
|
// We are not authenticated, KVM data starts here.
|
||||||
|
readState = 1;
|
||||||
|
if (data.length > 8) { amtDesktop.ProcessData(data.substring(8)); }
|
||||||
|
} else if (readState == 1) {
|
||||||
|
amtDesktop.ProcessData(data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if ((type == 2) && flagBinary && flagUser) {
|
} else if ((type == 2) && flagBinary && flagUser) {
|
||||||
// User --> Device data
|
// User --> Device data
|
||||||
|
|
32
webserver.js
32
webserver.js
|
@ -1856,14 +1856,19 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||||
// Use the logo in the database
|
// Use the logo in the database
|
||||||
res.set({ 'Content-Type': 'image/jpeg' });
|
res.set({ 'Content-Type': 'image/jpeg' });
|
||||||
res.send(parent.configurationFiles[domain.titlepicture]);
|
res.send(parent.configurationFiles[domain.titlepicture]);
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
// Use the logo on file
|
// Use the logo on file
|
||||||
try { res.sendFile(obj.path.join(obj.parent.datapath, domain.titlepicture)); } catch (e) {
|
try { res.sendFile(obj.path.join(obj.parent.datapath, domain.titlepicture)); return; } catch (ex) { }
|
||||||
try { res.sendFile(obj.path.join(obj.parent.webPublicPath, 'images/logoback.png')); } catch (e) { res.sendStatus(404); }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (parent.webPublicOverridePath && obj.fs.existsSync(obj.path.join(obj.parent.webPublicOverridePath, 'images/logoback.png'))) {
|
||||||
|
// Use the override logo picture
|
||||||
|
try { res.sendFile(obj.path.join(obj.parent.webPublicOverridePath, 'images/logoback.png')); } catch (ex) { res.sendStatus(404); }
|
||||||
} else {
|
} else {
|
||||||
try { res.sendFile(obj.path.join(obj.parent.webPublicPath, 'images/logoback.png')); } catch (e) { res.sendStatus(404); }
|
// Use the default logo picture
|
||||||
|
try { res.sendFile(obj.path.join(obj.parent.webPublicPath, 'images/logoback.png')); } catch (ex) { res.sendStatus(404); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1877,14 +1882,16 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||||
// Use the welcome image in the database
|
// Use the welcome image in the database
|
||||||
res.set({ 'Content-Type': 'image/jpeg' });
|
res.set({ 'Content-Type': 'image/jpeg' });
|
||||||
res.send(parent.configurationFiles[domain.welcomepicture]);
|
res.send(parent.configurationFiles[domain.welcomepicture]);
|
||||||
} else {
|
return;
|
||||||
// Use the logo on file
|
|
||||||
try { res.sendFile(obj.path.join(obj.parent.datapath, domain.welcomepicture)); } catch (e) {
|
|
||||||
try { res.sendFile(obj.path.join(obj.parent.webPublicPath, 'images/mainwelcome.jpg')); } catch (e) { res.sendStatus(404); }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (parent.webPublicOverridePath && obj.fs.existsSync(obj.path.join(obj.parent.webPublicOverridePath, 'images/mainwelcome.jpg'))) {
|
||||||
|
// Use the override logo picture
|
||||||
|
try { res.sendFile(obj.path.join(obj.parent.webPublicOverridePath, 'images/mainwelcome.jpg')); } catch (ex) { res.sendStatus(404); }
|
||||||
} else {
|
} else {
|
||||||
try { res.sendFile(obj.path.join(obj.parent.webPublicPath, 'images/mainwelcome.jpg')); } catch (e) { res.sendStatus(404); }
|
// Use the default logo picture
|
||||||
|
try { res.sendFile(obj.path.join(obj.parent.webPublicPath, 'images/mainwelcome.jpg')); } catch (ex) { res.sendStatus(404); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3252,10 +3259,15 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||||
var p = obj.path.join(obj.parent.datapath, 'server.png');
|
var p = obj.path.join(obj.parent.datapath, 'server.png');
|
||||||
if (obj.fs.existsSync(p)) {
|
if (obj.fs.existsSync(p)) {
|
||||||
// Use the data folder server picture
|
// Use the data folder server picture
|
||||||
try { res.sendFile(p); } catch (e) { res.sendStatus(404); }
|
try { res.sendFile(p); } catch (ex) { res.sendStatus(404); }
|
||||||
|
} else {
|
||||||
|
if (parent.webPublicOverridePath && obj.fs.existsSync(obj.path.join(obj.parent.webPublicOverridePath, 'images/server-256.png'))) {
|
||||||
|
// Use the override server picture
|
||||||
|
try { res.sendFile(obj.path.join(obj.parent.webPublicOverridePath, 'images/server-256.png')); } catch (ex) { res.sendStatus(404); }
|
||||||
} else {
|
} else {
|
||||||
// Use the default server picture
|
// Use the default server picture
|
||||||
try { res.sendFile(obj.path.join(obj.parent.webPublicPath, 'images/server-256.png')); } catch (e) { res.sendStatus(404); }
|
try { res.sendFile(obj.path.join(obj.parent.webPublicPath, 'images/server-256.png')); } catch (ex) { res.sendStatus(404); }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue