diff --git a/shell/config/labels-annotations.js b/shell/config/labels-annotations.js index 0c353e85bc..5de5c58cf2 100644 --- a/shell/config/labels-annotations.js +++ b/shell/config/labels-annotations.js @@ -91,11 +91,12 @@ export const CATALOG = { _CLUSTER_TPL: 'cluster-template', _CLUSTER_TOOL: 'cluster-tool', - COMPONENT: 'catalog.cattle.io/ui-component', - SOURCE_REPO_TYPE: 'catalog.cattle.io/ui-source-repo-type', - SOURCE_REPO_NAME: 'catalog.cattle.io/ui-source-repo', - COLOR: 'catalog.cattle.io/ui-color', - DISPLAY_NAME: 'catalog.cattle.io/display-name', + COMPONENT: 'catalog.cattle.io/ui-component', + SOURCE_REPO_TYPE: 'catalog.cattle.io/ui-source-repo-type', + SOURCE_REPO_NAME: 'catalog.cattle.io/ui-source-repo', + COLOR: 'catalog.cattle.io/ui-color', + DISPLAY_NAME: 'catalog.cattle.io/display-name', + CLUSTER_REPO_NAME: 'catalog.cattle.io/cluster-repo-name', SUPPORTED_OS: 'catalog.cattle.io/os', PERMITTED_OS: 'catalog.cattle.io/permits-os', diff --git a/shell/models/catalog.cattle.io.app.js b/shell/models/catalog.cattle.io.app.js index 233a1e6153..eee202e0bf 100644 --- a/shell/models/catalog.cattle.io.app.js +++ b/shell/models/catalog.cattle.io.app.js @@ -55,12 +55,13 @@ export default class CatalogApp extends SteveModel { } const chartName = chart.metadata?.name; - const preferRepoType = chart.metadata?.annotations?.[CATALOG_ANNOTATIONS.SOURCE_REPO_TYPE]; - const preferRepoName = chart.metadata?.annotations?.[CATALOG_ANNOTATIONS.SOURCE_REPO_NAME]; + const repoName = chart.metadata?.annotations?.[CATALOG_ANNOTATIONS.SOURCE_REPO_NAME] || this.metadata?.labels?.[CATALOG_ANNOTATIONS.CLUSTER_REPO_NAME]; + const preferRepoType = chart.metadata?.annotations?.[CATALOG_ANNOTATIONS.SOURCE_REPO_TYPE] || 'cluster'; + const match = this.$rootGetters['catalog/chart']({ chartName, + repoName, preferRepoType, - preferRepoName, includeHidden });