Fleet fix target cluster names

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
Francesco Torchia 2025-07-08 17:52:00 +02:00
parent d387a3d844
commit a2583cd810
No known key found for this signature in database
GPG Key ID: E6D011B7415D4393
2 changed files with 9 additions and 3 deletions

View File

@ -1,12 +1,13 @@
<script lang="ts">
import { PropType } from 'vue';
import { Cluster } from '@shell/components/fleet/FleetClusterTargets/index.vue';
export default {
name: 'FleetTargetsList',
props: {
clusters: {
type: Array as PropType<{ name: string }[]>,
type: Array as PropType<Cluster[]>,
default: () => [],
},
@ -18,7 +19,7 @@ export default {
computed: {
names() {
const names = this.clusters.map(({ name }) => name);
const names = this.clusters.map(({ nameDisplay, name }) => nameDisplay || name);
const max = 10;
const remaining = names.length - max;

View File

@ -14,6 +14,11 @@ import { RcButton } from '@components/RcButton';
import RadioGroup from '@components/Form/Radio/RadioGroup.vue';
import TargetsList from '@shell/components/fleet/FleetClusterTargets/TargetsList.vue';
export interface Cluster {
name: string,
nameDisplay: string
}
interface DataType {
targetMode: TargetMode,
allClusters: any[],
@ -46,7 +51,7 @@ export default {
},
matching: {
type: Array as PropType<{ name: string }[]>,
type: Array as PropType<Cluster[]>,
default: () => [],
},