From 2afc11f93bde489e346d5f6b5d760d8ed38e77b5 Mon Sep 17 00:00:00 2001 From: David Edler Date: Fri, 29 Nov 2024 16:55:52 +0100 Subject: [PATCH] fix(image) use all projects parameter to resolve image fingerprints in permission config. show project for images in permission selector Signed-off-by: David Edler --- src/api/images.tsx | 3 ++- src/util/permissions.tsx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/api/images.tsx b/src/api/images.tsx index d7679b8ec1..a063cdb259 100644 --- a/src/api/images.tsx +++ b/src/api/images.tsx @@ -26,7 +26,8 @@ export const fetchImage = ( export const fetchImageList = (project?: string): Promise => { const url = - "/1.0/images?recursion=1" + (project ? `&project=${project}` : ""); + "/1.0/images?recursion=1" + + (project ? `&project=${project}` : "&all-projects=1"); return new Promise((resolve, reject) => { fetch(url) .then(handleResponse) diff --git a/src/util/permissions.tsx b/src/util/permissions.tsx index 92d974589e..f353aeb6ba 100644 --- a/src/util/permissions.tsx +++ b/src/util/permissions.tsx @@ -371,7 +371,7 @@ export const enablePermissionsFeature = (): boolean => { // each resource type has specific columns to display, which should uniquely identify the resource export const getResourceOptionColumns = (type: string) => { const resourceOptionColumns: Record = { - image: ["description", "aliases", "fingerprint", "imageType"], + image: ["description", "aliases", "fingerprint", "imageType", "project"], image_alias: ["name", "project"], instance: ["name", "project"], network: ["name", "project"], @@ -379,7 +379,7 @@ export const getResourceOptionColumns = (type: string) => { network_zone: ["name", "project"], profile: ["name", "project"], storage_bucket: ["name", "project"], - storage_volume: ["name", "project", "pool"], + storage_volume: ["name", "pool", "project"], default: ["name"], };