mirror of
https://github.com/louislam/dockge.git
synced 2024-11-27 13:14:03 +00:00
swapped to double quotes
swapped to double quotes from singles on service functions
This commit is contained in:
parent
635bf624e8
commit
1dd3205b30
2 changed files with 9 additions and 9 deletions
|
@ -254,7 +254,7 @@ export class DockerSocketHandler extends AgentSocketHandler {
|
|||
stack.joinCombinedTerminal(socket); // Ensure the combined terminal is joined
|
||||
callbackResult({
|
||||
ok: true,
|
||||
msg: `Service ${serviceName} started`
|
||||
msg: "Service" + serviceName + " started"
|
||||
}, callback);
|
||||
server.sendStackList();
|
||||
} catch (e) {
|
||||
|
@ -275,7 +275,7 @@ export class DockerSocketHandler extends AgentSocketHandler {
|
|||
await stack.stopService(socket, serviceName);
|
||||
callbackResult({
|
||||
ok: true,
|
||||
msg: `Service ${serviceName} stopped`
|
||||
msg: "Service" + serviceName + " stopped"
|
||||
}, callback);
|
||||
server.sendStackList();
|
||||
} catch (e) {
|
||||
|
@ -283,19 +283,19 @@ export class DockerSocketHandler extends AgentSocketHandler {
|
|||
}
|
||||
});
|
||||
|
||||
agentSocket.on('restartService', async (stackName: unknown, serviceName: unknown, callback) => {
|
||||
agentSocket.on("restartService", async (stackName: unknown, serviceName: unknown, callback) => {
|
||||
try {
|
||||
checkLogin(socket);
|
||||
|
||||
if (typeof stackName !== 'string' || typeof serviceName !== 'string') {
|
||||
throw new Error('Invalid stackName or serviceName');
|
||||
if (typeof stackName !== "string" || typeof serviceName !== "string") {
|
||||
throw new Error("Invalid stackName or serviceName");
|
||||
}
|
||||
|
||||
const stack = await Stack.getStack(server, stackName, true);
|
||||
await stack.restartService(socket, serviceName);
|
||||
callbackResult({
|
||||
ok: true,
|
||||
msg: `Service ${serviceName} restarted`
|
||||
msg: "Service" + serviceName + " restarted"
|
||||
}, callback);
|
||||
} catch (e) {
|
||||
callbackError(e, callback);
|
||||
|
|
|
@ -306,13 +306,13 @@ export default defineComponent({
|
|||
delete this.jsonObject.services[this.name];
|
||||
},
|
||||
startService() {
|
||||
this.$emit('start-service', this.name);
|
||||
this.$emit("start-service", this.name);
|
||||
},
|
||||
stopService() {
|
||||
this.$emit('stop-service', this.name);
|
||||
this.$emit("stop-service", this.name);
|
||||
},
|
||||
restartService() {
|
||||
this.$emit('restart-service', this.name);
|
||||
this.$emit("restart-service", this.name);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue