mirror of
https://github.com/MCSManager/MCSManager.git
synced 2025-02-11 15:49:53 +08:00
修改 端口与内存去除前戳
This commit is contained in:
parent
657f1cc714
commit
1b29c29b4c
@ -99,11 +99,11 @@ class ServerProcess extends EventEmitter {
|
||||
dockerCommand = dockerCommand.replace(/\$\{imagename\}/igm,
|
||||
this.dataModel.dockerConfig.dockerImageName);
|
||||
dockerCommand = dockerCommand.replace(/\$\{ports\}/igm,
|
||||
this.dataModel.dockerConfig.dockerPorts);
|
||||
this.dataModel.dockerConfig.dockerPorts ? "-p " + this.dataModel.dockerConfig.dockerPorts : "");
|
||||
dockerCommand = dockerCommand.replace(/\$\{serverpath\}/igm,
|
||||
stdCwd);
|
||||
dockerCommand = dockerCommand.replace(/\$\{xmx\}/igm,
|
||||
(this.dataModel.dockerConfig.dockerXmx) || "");
|
||||
this.dataModel.dockerConfig.dockerXmx ? "-m " + this.dataModel.dockerConfig.dockerXmx : "");
|
||||
|
||||
//格式替换
|
||||
let dockerCommandPart = dockerCommand.replace(/ /igm, " ").split(" ");
|
||||
|
@ -49,10 +49,10 @@
|
||||
WS.sendMsg('docker/setconfig', JSON.stringify({
|
||||
serverName: PAGE.selectServerName,
|
||||
dockerConfig: {
|
||||
dockerCommand: this.dockerCommand || "",
|
||||
dockerImageName: this.dockerImageName || "mcsd",
|
||||
dockerXmx: this.dockerXmx ? "-m " + this.dockerXmx : "",
|
||||
dockerPorts: this.dockerPorts ? "-p " + this.dockerPorts : "",
|
||||
dockerCommand: this.dockerCommand.trim() || "",
|
||||
dockerImageName: this.dockerImageName.trim() || "mcsd",
|
||||
dockerXmx: this.dockerXmx.trim(),
|
||||
dockerPorts: this.dockerPorts.trim(),
|
||||
isDocker: this.isDocker
|
||||
}
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user