mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 23:53:13 +09:00
Fix mistake with Instance descriptions
Also added warning for description not found in master.
This commit is contained in:
1 file changed
+7
-3
+7
-3
@@ -157,8 +157,12 @@ masterConfigCommands.add(new libCommand.Command({
|
|||||||
let allConfigElements = "";
|
let allConfigElements = "";
|
||||||
for (let group of response.serialized_config.groups) {
|
for (let group of response.serialized_config.groups) {
|
||||||
for (let [name, value] of Object.entries(group.fields)) {
|
for (let [name, value] of Object.entries(group.fields)) {
|
||||||
let desc = libConfig.MasterConfig.groups.get(group.name)._definitions.get(name).description;
|
let desc = "";
|
||||||
allConfigElements += `# ${desc}\n`;
|
try {
|
||||||
|
desc += libConfig.MasterConfig.groups.get(group.name)._definitions.get(name).description;
|
||||||
|
} catch (err) {
|
||||||
|
desc += "No description found";
|
||||||
|
}
|
||||||
// split onto two lines for readability and es-lint
|
// split onto two lines for readability and es-lint
|
||||||
if (String(value) === "null") {
|
if (String(value) === "null") {
|
||||||
value = "";
|
value = "";
|
||||||
@@ -434,7 +438,7 @@ instanceConfigCommands.add(new libCommand.Command({
|
|||||||
}
|
}
|
||||||
let desc = "";
|
let desc = "";
|
||||||
try {
|
try {
|
||||||
desc += libConfig.MasterConfig.groups.get(group.name)._definitions.get(name).description;
|
desc += libConfig.InstanceConfig.groups.get(group.name)._definitions.get(name).description;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
desc += "No description found";
|
desc += "No description found";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user