mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 22:18:07 +08:00
fix: 解决容器 label 或者 env 为空导致无法编辑的问题 (#1580)
This commit is contained in:
parent
a54913f788
commit
f90c009782
@ -98,7 +98,7 @@ export const createVolume = (params: Container.VolumeCreate) => {
|
|||||||
|
|
||||||
// repo
|
// repo
|
||||||
export const checkRepoStatus = (id: number) => {
|
export const checkRepoStatus = (id: number) => {
|
||||||
return http.post(`/containers/repo/status`, { id: id });
|
return http.post(`/containers/repo/status`, { id: id }, 40000);
|
||||||
};
|
};
|
||||||
export const searchImageRepo = (params: SearchWithPage) => {
|
export const searchImageRepo = (params: SearchWithPage) => {
|
||||||
return http.post<ResPage<Container.RepoInfo>>(`/containers/repo/search`, params);
|
return http.post<ResPage<Container.RepoInfo>>(`/containers/repo/search`, params);
|
||||||
@ -107,13 +107,13 @@ export const listImageRepo = () => {
|
|||||||
return http.get<Container.RepoOptions>(`/containers/repo`);
|
return http.get<Container.RepoOptions>(`/containers/repo`);
|
||||||
};
|
};
|
||||||
export const createImageRepo = (params: Container.RepoCreate) => {
|
export const createImageRepo = (params: Container.RepoCreate) => {
|
||||||
return http.post(`/containers/repo`, params);
|
return http.post(`/containers/repo`, params, 40000);
|
||||||
};
|
};
|
||||||
export const updateImageRepo = (params: Container.RepoUpdate) => {
|
export const updateImageRepo = (params: Container.RepoUpdate) => {
|
||||||
return http.post(`/containers/repo/update`, params);
|
return http.post(`/containers/repo/update`, params, 40000);
|
||||||
};
|
};
|
||||||
export const deleteImageRepo = (params: Container.RepoDelete) => {
|
export const deleteImageRepo = (params: Container.RepoDelete) => {
|
||||||
return http.post(`/containers/repo/del`, params);
|
return http.post(`/containers/repo/del`, params, 40000);
|
||||||
};
|
};
|
||||||
|
|
||||||
// composeTemplate
|
// composeTemplate
|
||||||
|
@ -250,6 +250,8 @@ const acceptParams = (params: DialogProps): void => {
|
|||||||
itemCmd += `'${item}' `;
|
itemCmd += `'${item}' `;
|
||||||
}
|
}
|
||||||
dialogData.value.rowData.cmdStr = itemCmd ? itemCmd.substring(0, itemCmd.length - 1) : '';
|
dialogData.value.rowData.cmdStr = itemCmd ? itemCmd.substring(0, itemCmd.length - 1) : '';
|
||||||
|
dialogData.value.rowData.labels = dialogData.value.rowData.labels || [];
|
||||||
|
dialogData.value.rowData.env = dialogData.value.rowData.env || [];
|
||||||
dialogData.value.rowData.labelsStr = dialogData.value.rowData.labels.join('\n');
|
dialogData.value.rowData.labelsStr = dialogData.value.rowData.labels.join('\n');
|
||||||
dialogData.value.rowData.envStr = dialogData.value.rowData.env.join('\n');
|
dialogData.value.rowData.envStr = dialogData.value.rowData.env.join('\n');
|
||||||
dialogData.value.rowData.exposedPorts = dialogData.value.rowData.exposedPorts || [];
|
dialogData.value.rowData.exposedPorts = dialogData.value.rowData.exposedPorts || [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user