新增 终端配置设置

This commit is contained in:
Suwings 2022-01-29 13:55:03 +08:00
parent f0d47d54be
commit 1a285a6928
2 changed files with 9 additions and 1 deletions

View File

@ -44,6 +44,11 @@ export default class InstanceConfig {
public fileCode: string = "utf-8";
public processType: string = "general";
// terminal option
public terminalOption = {
haveColor: true
};
// Event task
public eventTask = {
autoStart: false,
@ -61,7 +66,7 @@ export default class InstanceConfig {
cpuUsage: null,
maxSpace: null,
io: null,
network: null,
network: null
};
public pingConfig = {

View File

@ -148,6 +148,9 @@ export default class Instance extends EventEmitter {
configureEntityParams(this.config.eventTask, cfg.eventTask, "autoRestart", Boolean);
configureEntityParams(this.config.eventTask, cfg.eventTask, "ignore", Boolean);
}
if (cfg.terminalOption) {
configureEntityParams(this.config.terminalOption, cfg.terminalOption, "haveColor", Boolean);
}
StorageSubsystem.store("InstanceConfig", this.instanceUuid, this.config);
}