From 04eb8191edfa03b9ff656aa51e466f72efbb80cb Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Thu, 21 Sep 2023 17:20:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=B9=E5=99=A8=E9=95=9C=E5=83=8F?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AF=A6=E6=83=85=E5=B1=95=E7=A4=BA=20(#2370?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/container.go | 2 ++ .../src/views/container/container/index.vue | 5 ++-- frontend/src/views/container/image/index.vue | 27 +++++++++++++++---- .../src/views/container/image/prune/index.vue | 2 +- .../src/views/container/network/index.vue | 6 ++--- frontend/src/views/container/volume/index.vue | 5 ++-- 6 files changed, 31 insertions(+), 16 deletions(-) diff --git a/backend/app/service/container.go b/backend/app/service/container.go index 14a5f7c2b..f9400bb32 100644 --- a/backend/app/service/container.go +++ b/backend/app/service/container.go @@ -226,6 +226,8 @@ func (u *ContainerService) Inspect(req dto.InspectReq) (string, error) { switch req.Type { case "container": inspectInfo, err = client.ContainerInspect(context.Background(), req.ID) + case "image": + inspectInfo, _, err = client.ImageInspectWithRaw(context.Background(), req.ID) case "network": inspectInfo, err = client.NetworkInspect(context.TODO(), req.ID, types.NetworkInspectOptions{}) case "volume": diff --git a/frontend/src/views/container/container/index.vue b/frontend/src/views/container/container/index.vue index 216f0bbc1..4a8966b10 100644 --- a/frontend/src/views/container/container/index.vue +++ b/frontend/src/views/container/container/index.vue @@ -273,7 +273,6 @@ const props = withDefaults(defineProps(), { filters: '', }); -const detailInfo = ref(); const mydetail = ref(); const dialogContainerLogRef = ref(); @@ -366,10 +365,10 @@ const onTerminal = (row: any) => { const onInspect = async (id: string) => { const res = await inspect({ id: id, type: 'container' }); - detailInfo.value = JSON.stringify(JSON.parse(res.data), null, 2); + let detailInfo = JSON.stringify(JSON.parse(res.data), null, 2); let param = { header: i18n.global.t('commons.button.view'), - detailInfo: detailInfo.value, + detailInfo: detailInfo, }; mydetail.value!.acceptParams(param); }; diff --git a/frontend/src/views/container/image/index.vue b/frontend/src/views/container/image/index.vue index e40af65d7..0e5665c26 100644 --- a/frontend/src/views/container/image/index.vue +++ b/frontend/src/views/container/image/index.vue @@ -41,9 +41,12 @@ - + @@ -91,6 +94,7 @@ + @@ -104,6 +108,7 @@