mirror of https://github.com/rancher/dashboard.git
- Add providerSummary getter to machinedeployment model
- Hide provider labels for Harvester clusters Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
parent
5770637a4c
commit
b5ec434a42
|
|
@ -1 +1,3 @@
|
|||
export const NAME = 'harvesterManager';
|
||||
|
||||
export const KIND = { MACHINE_TEMPLATE: 'HarvesterMachineTemplate' };
|
||||
|
|
|
|||
|
|
@ -775,10 +775,10 @@ export default {
|
|||
v-clean-html="t('resourceTable.groupLabel.notInANodePool')"
|
||||
/>
|
||||
<div
|
||||
v-if="group.ref && group.ref.template"
|
||||
v-if="group.ref && group.ref.providerSummary"
|
||||
class="description text-muted text-small"
|
||||
>
|
||||
{{ group.ref.providerDisplay }} – {{ group.ref.providerLocation }} / {{ group.ref.providerSize }} ({{ group.ref.providerName }})
|
||||
{{ group.ref.providerSummary }}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import { handleConflict } from '@shell/plugins/dashboard-store/normalize';
|
|||
import { MACHINE_ROLES } from '@shell/config/labels-annotations';
|
||||
import { notOnlyOfRole } from '@shell/models/cluster.x-k8s.io.machine';
|
||||
import { KIND } from '../config/elemental-types';
|
||||
import { KIND as HARVESTER_KIND } from '../config/harvester-manager-types';
|
||||
|
||||
export default class CapiMachineDeployment extends SteveModel {
|
||||
get cluster() {
|
||||
|
|
@ -69,6 +70,19 @@ export default class CapiMachineDeployment extends SteveModel {
|
|||
return this.template?.providerSize || this.t('node.list.poolDescription.noSize');
|
||||
}
|
||||
|
||||
get providerSummary() {
|
||||
if (this.template) {
|
||||
switch (this.infrastructureRefKind) {
|
||||
case HARVESTER_KIND.MACHINE_TEMPLATE:
|
||||
return null;
|
||||
default:
|
||||
return `${ this.providerDisplay } \u2013 ${ this.providerLocation } / ${ this.providerSize } (${ this.providerName })`;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
get desired() {
|
||||
return this.spec?.replicas || 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue