Improve presentation of cluster provider on Cluster Management list (#5824)

* Improve presentation of cluster provide on Cluster Management list

* Fix lint issue
This commit is contained in:
Neil MacDougall 2022-05-20 14:50:04 +01:00 committed by GitHub
parent f912874410
commit 59b97e09c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 15 deletions

View File

@ -0,0 +1,27 @@
<script>
export default {
props: {
row: {
type: Object,
required: true
},
}
};
</script>
<template>
<div>
<template v-if="row.machineProvider">
{{ row.machineProviderDisplay }}
</template>
<template v-else-if="row.isCustom">
{{ t('cluster.provider.custom') }}
</template>
<template v-else>
{{ t('cluster.provider.imported') }}
</template>
<div class="text-muted">
{{ row.provisionerDisplay }}
</div>
</div>
</template>

View File

@ -154,6 +154,7 @@ export function init(store) {
labelKey: 'tableHeaders.provider',
value: 'machineProvider',
sort: ['machineProvider', 'provisioner'],
formatter: 'ClusterProvider',
},
MACHINE_SUMMARY,
AGE,

View File

@ -134,17 +134,6 @@ export default {
</Masthead>
<ResourceTable :schema="schema" :rows="rows" :namespaced="false">
<template #cell:provider="{row}">
<template v-if="row.machineProvider">
{{ row.machineProviderDisplay }}
<div class="text-muted">
{{ row.provisionerDisplay }}
</div>
</template>
<template v-else>
{{ row.provisionerDisplay }}
</template>
</template>
<template #cell:summary="{row}">
<span v-if="!row.stateParts.length">{{ row.nodes.length }}</span>
</template>