Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions frontend/src/views/container/compose/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -441,17 +441,20 @@ const handleComposeOperate = async (operation: 'up' | 'stop' | 'restart', row: a
loading.value = true;
const params = {
name: row.name,
path: currentCompose.value.path,
path: row.path,
operation: operation,
withFile: false,
force: false,
};
await composeOperator(params)
.then(() => {
.then(async () => {
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
search();
if (row.name === currentCompose.value?.name) {
loadDetail(currentCompose.value, true);
await search();
if (currentCompose.value) {
const updated = data.value.find((item) => item.name === currentCompose.value.name);
if (updated) {
await loadDetail(updated, true);
}
}
})
.finally(() => {
Expand Down Expand Up @@ -480,7 +483,13 @@ const onSubmitEdit = async () => {
await composeUpdate(param)
.then(async () => {
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
await loadDetail(currentCompose.value, true);
await search();
if (currentCompose.value) {
const updated = data.value.find((item) => item.name === currentCompose.value.name);
if (updated) {
await loadDetail(updated, true);
}
}
})
.finally(() => {
loading.value = false;
Expand Down
Loading