|
|
@ -138,13 +138,19 @@ export default { |
|
|
|
get("/v1/keys/cmd", { |
|
|
|
cmd: "start", |
|
|
|
service_path: item.service_path, |
|
|
|
}).then(({ code }) => { |
|
|
|
this.loading = false; |
|
|
|
if (code == 200) { |
|
|
|
this.msgSuccess("启动成功,请稍后刷新列表数据"); |
|
|
|
this.getList(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
.then(({ code, msg }) => { |
|
|
|
this.loading = false; |
|
|
|
if (code == 200) { |
|
|
|
this.msgSuccess("启动成功,请稍后刷新列表数据"); |
|
|
|
this.getList(); |
|
|
|
} else { |
|
|
|
this.msgError(msg); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.loading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 暂停服务 |
|
|
|
cmdPause(item) { |
|
|
@ -152,13 +158,19 @@ export default { |
|
|
|
get("/v1/keys/cmd", { |
|
|
|
cmd: "pause", |
|
|
|
service_path: item.service_path, |
|
|
|
}).then(({ code }) => { |
|
|
|
this.loading = false; |
|
|
|
if (code == 200) { |
|
|
|
this.msgSuccess("暂停成功,请稍后刷新列表数据"); |
|
|
|
this.getList(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
.then(({ code, msg }) => { |
|
|
|
this.loading = false; |
|
|
|
if (code == 200) { |
|
|
|
this.msgSuccess("暂停成功,请稍后刷新列表数据"); |
|
|
|
this.getList(); |
|
|
|
} else { |
|
|
|
this.msgError(msg); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.loading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 恢复服务 |
|
|
|
cmdRecover(item) { |
|
|
@ -166,13 +178,19 @@ export default { |
|
|
|
get("/v1/keys/cmd", { |
|
|
|
cmd: "recover", |
|
|
|
service_path: item.service_path, |
|
|
|
}).then(({ code }) => { |
|
|
|
this.loading = false; |
|
|
|
if (code == 200) { |
|
|
|
this.msgSuccess("恢复成功,请稍后刷新列表数据"); |
|
|
|
this.getList(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
.then(({ code, msg }) => { |
|
|
|
this.loading = false; |
|
|
|
if (code == 200) { |
|
|
|
this.msgSuccess("恢复成功,请稍后刷新列表数据"); |
|
|
|
this.getList(); |
|
|
|
} else { |
|
|
|
this.msgError(msg); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.loading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 停止服务 |
|
|
|
cmdStop(item) { |
|
|
@ -180,13 +198,19 @@ export default { |
|
|
|
get("/v1/keys/cmd", { |
|
|
|
cmd: "stop", |
|
|
|
service_path: item.service_path, |
|
|
|
}).then(({ code }) => { |
|
|
|
this.loading = false; |
|
|
|
if (code == 200) { |
|
|
|
this.msgSuccess("停止成功,请稍后刷新列表数据"); |
|
|
|
this.getList(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
.then(({ code, msg }) => { |
|
|
|
this.loading = false; |
|
|
|
if (code == 200) { |
|
|
|
this.msgSuccess("停止成功,请稍后刷新列表数据"); |
|
|
|
this.getList(); |
|
|
|
} else { |
|
|
|
this.msgError(msg); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.loading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 删除按钮操作 |
|
|
|
handleDelete(row) { |
|
|
|