mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-11 15:03:20 -05:00
Added agent customization install text, supported by upcoming agent.
This commit is contained in:
parent
4b6c5f38bd
commit
50d56b8697
@ -512,6 +512,7 @@
|
||||
"description": { "type": "string", "default": "Mesh Agent background service", "description": "The description of the agent as displayed to the user." },
|
||||
"companyName": { "type": "string", "default": "Mesh Agent", "description": "This will be used as the path to install the agent, by default this is 'Mesh Agent' in Windows and 'meshagent' in other OS's." },
|
||||
"serviceName": { "type": "string", "default": "Mesh Agent", "description": "The name of the background service, by default this is 'Mesh Agent' in Windows and 'meshagent' in other OS's but should be set to an all lower case, no space string." },
|
||||
"installText": { "type": "string", "default": null, "description": "Text string to show in the agent installation dialog box." },
|
||||
"image": { "type": "string", "default": null, "description": "The filename of a image file in .png format located in meshcentral-data to display in the MeshCentral Agent installation dialog, image should be square and from 64x64 to 200x200." },
|
||||
"fileName": { "type": "string", "default": "meshagent", "description": "The agent filename." }
|
||||
}
|
||||
|
@ -1560,6 +1560,17 @@ function CreateMeshCentralServer(config, args) {
|
||||
if (translations['zh-chs']) { translations['zh-hans'] = translations['zh-chs']; delete translations['zh-chs']; }
|
||||
if (translations['zh-cht']) { translations['zh-hant'] = translations['zh-cht']; delete translations['zh-cht']; }
|
||||
obj.agentTranslations = JSON.stringify(translations);
|
||||
|
||||
// If there is domain customizations to the agent strings, do this here.
|
||||
for (var i in obj.config.domains) {
|
||||
var domainTranslations = translations;
|
||||
if ((typeof obj.config.domains[i].agentcustomization == 'object') && (typeof obj.config.domains[i].agentcustomization.installtext == 'string')) {
|
||||
domainTranslations = Object.assign({}, domainTranslations); // Shallow clone
|
||||
for (var j in domainTranslations) { delete domainTranslations[j].description; }
|
||||
domainTranslations.en.description = obj.config.domains[i].agentcustomization.installtext;
|
||||
}
|
||||
obj.config.domains[i].agentTranslations = domainTranslations;
|
||||
}
|
||||
} catch (ex) { }
|
||||
|
||||
// Load the list of mesh agents and install scripts
|
||||
|
Loading…
Reference in New Issue
Block a user