fix: docker 状态判断逻辑修改 (#1073)

This commit is contained in:
ssongliu
2023-05-18 16:46:13 +08:00
committed by GitHub
parent 8c4016792b
commit 72bc99bddc
7 changed files with 47 additions and 101 deletions
-5
View File
@@ -247,11 +247,6 @@ export namespace Container {
export interface DaemonJsonUpdateByFile {
file: string;
}
export interface DockerOperate {
stopSocket: boolean;
stopService: boolean;
operation: string;
}
export interface DaemonJsonConf {
isSwarm: boolean;
status: string;
+2 -2
View File
@@ -130,8 +130,8 @@ export const composeUpdate = (params: Container.ComposeUpdate) => {
};
// docker
export const dockerOperate = (params: Container.DockerOperate) => {
return http.post(`/containers/docker/operate`, params);
export const dockerOperate = (operation: string) => {
return http.post(`/containers/docker/operate`, { operation: operation });
};
export const loadDaemonJson = () => {
return http.get<Container.DaemonJsonConf>(`/containers/daemonjson`);