From e8059d3676085dddc1dd7e0a7617d0f495a43ad1 Mon Sep 17 00:00:00 2001
From: ssongliu <73214554+ssongliu@users.noreply.github.com>
Date: Fri, 26 Dec 2025 21:55:03 +0800
Subject: [PATCH] fix: Fix refresh issue during compose creation (#11482)
Refs #11463
---
frontend/src/views/container/compose/index.vue | 17 +++++++++++++++--
.../src/views/container/container/index.vue | 2 +-
frontend/src/views/container/image/index.vue | 2 +-
frontend/src/views/container/network/index.vue | 2 +-
frontend/src/views/container/volume/index.vue | 2 +-
5 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/frontend/src/views/container/compose/index.vue b/frontend/src/views/container/compose/index.vue
index 738d62d5d..5549fc227 100644
--- a/frontend/src/views/container/compose/index.vue
+++ b/frontend/src/views/container/compose/index.vue
@@ -16,7 +16,7 @@
-
+
@@ -475,6 +475,20 @@ const loadTableHeight = () => {
}
};
+const refresh = async () => {
+ if (!isActive.value || !isExist.value) {
+ return;
+ }
+ let params = {
+ info: searchName.value,
+ page: 1,
+ pageSize: 100,
+ };
+ await searchCompose(params).then((res) => {
+ data.value = res.data.items || [];
+ });
+};
+
const search = async (withRefreshDetail?: boolean) => {
if (!isActive.value || !isExist.value) {
return;
@@ -484,7 +498,6 @@ const search = async (withRefreshDetail?: boolean) => {
page: 1,
pageSize: 100,
};
- isOnCreate.value = false;
loading.value = true;
await searchCompose(params)
.then((res) => {
diff --git a/frontend/src/views/container/container/index.vue b/frontend/src/views/container/container/index.vue
index dbb7c2da3..b9a1ed660 100644
--- a/frontend/src/views/container/container/index.vue
+++ b/frontend/src/views/container/container/index.vue
@@ -649,7 +649,7 @@ const onTerminal = (row: any) => {
};
const onInspect = async (row: any) => {
- const res = await inspect({ id: row.containerID, type: 'container' });
+ const res = await inspect({ id: row.containerID, type: 'container', detail: '' });
containerInspectRef.value!.acceptParams({ data: res.data, ports: row.ports });
};
diff --git a/frontend/src/views/container/image/index.vue b/frontend/src/views/container/image/index.vue
index 5a332ddec..5021414d1 100644
--- a/frontend/src/views/container/image/index.vue
+++ b/frontend/src/views/container/image/index.vue
@@ -252,7 +252,7 @@ const changePinned = (row: any, isPinned: boolean) => {
};
const onInspect = async (id: string) => {
- const res = await inspect({ id: id, type: 'image' });
+ const res = await inspect({ id: id, type: 'image', detail: '' });
let detailInfo = JSON.stringify(JSON.parse(res.data), null, 2);
let param = {
header: i18n.global.t('commons.button.view'),
diff --git a/frontend/src/views/container/network/index.vue b/frontend/src/views/container/network/index.vue
index 7c7072d6e..d12e42d83 100644
--- a/frontend/src/views/container/network/index.vue
+++ b/frontend/src/views/container/network/index.vue
@@ -215,7 +215,7 @@ const batchDelete = async (row: Container.NetworkInfo | null) => {
};
const onInspect = async (id: string) => {
- const res = await inspect({ id: id, type: 'network' });
+ const res = await inspect({ id: id, type: 'network', detail: '' });
let networkData = JSON.parse(res.data);
detailDrawerRef.value!.acceptParams({ data: networkData });
};
diff --git a/frontend/src/views/container/volume/index.vue b/frontend/src/views/container/volume/index.vue
index 690800f33..13ca6336b 100644
--- a/frontend/src/views/container/volume/index.vue
+++ b/frontend/src/views/container/volume/index.vue
@@ -190,7 +190,7 @@ const search = async () => {
};
const onInspect = async (id: string) => {
- const res = await inspect({ id: id, type: 'volume' });
+ const res = await inspect({ id: id, type: 'volume', detail: '' });
let detailInfo = JSON.stringify(JSON.parse(res.data), null, 2);
let param = {
header: i18n.global.t('commons.button.view'),