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 @@