mirror of https://github.com/rancher/dashboard.git
Fleet fix target cluster names
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
parent
d387a3d844
commit
a2583cd810
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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: () => [],
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue