From 61c31a61b4227f5848c313cd3d9bac8359cb02ec Mon Sep 17 00:00:00 2001 From: Francesco Torchia Date: Tue, 6 May 2025 10:59:46 +0200 Subject: [PATCH] Fleet Add source field in Dashboard Resource detail panel; Add no target clusters warning in Dashboard cards Signed-off-by: Francesco Torchia --- shell/assets/translations/en-us.yaml | 3 +- shell/components/fleet/FleetRepos.vue | 25 +------- .../fleet/dashboard/ResourceCardSummary.vue | 45 +++++++++----- .../fleet/dashboard/ResourceDetails.vue | 24 ++++++-- shell/components/formatter/FleetRepo.vue | 60 +++++++++++++++++++ shell/config/table-headers.js | 11 ++-- 6 files changed, 121 insertions(+), 47 deletions(-) create mode 100644 shell/components/formatter/FleetRepo.vue diff --git a/shell/assets/translations/en-us.yaml b/shell/assets/translations/en-us.yaml index e69b78d1f2..1d4f47cb35 100644 --- a/shell/assets/translations/en-us.yaml +++ b/shell/assets/translations/en-us.yaml @@ -2512,8 +2512,9 @@ fleet: =1 { cluster } other { clusters } } - + noClusters: The { type } is not targeting any clusters resources: Resources + source: Source cluster: summary: Resource Summary nonReady: Non-Ready Bundles diff --git a/shell/components/fleet/FleetRepos.vue b/shell/components/fleet/FleetRepos.vue index 4ce9a8d127..b78f2c8248 100644 --- a/shell/components/fleet/FleetRepos.vue +++ b/shell/components/fleet/FleetRepos.vue @@ -1,7 +1,5 @@ @@ -86,20 +97,26 @@ export default { v-else class="description" > - -
- {{ summary.partial }} - /{{ summary.total }} -   - {{ t('fleet.dashboard.cards.resourceSummary.part1') }} - {{ summary.clusters }} - {{ t('fleet.dashboard.cards.resourceSummary.part2', { count: summary.clusters }) }} -
+ + diff --git a/shell/components/fleet/dashboard/ResourceDetails.vue b/shell/components/fleet/dashboard/ResourceDetails.vue index 377e25c82b..c442fc5940 100644 --- a/shell/components/fleet/dashboard/ResourceDetails.vue +++ b/shell/components/fleet/dashboard/ResourceDetails.vue @@ -1,13 +1,16 @@ + + diff --git a/shell/config/table-headers.js b/shell/config/table-headers.js index 47b54c7342..21fd16382a 100644 --- a/shell/config/table-headers.js +++ b/shell/config/table-headers.js @@ -1077,11 +1077,12 @@ export const FLEET_REPO_TARGET = { }; export const FLEET_REPO = { - name: 'repo', - labelKey: 'tableHeaders.repo', - value: 'repoDisplay', - sort: 'repoDisplay', - search: ['spec.repo', 'status.commit'], + name: 'repo', + labelKey: 'tableHeaders.repo', + value: 'repoDisplay', + formatter: 'FleetRepo', + sort: 'repoDisplay', + search: ['spec.repo', 'status.commit'], }; export const UI_PLUGIN_CATALOG = [