mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-15 14:11:46 +00:00
feat: show configured profile in table
Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
parent
d5ac6d9617
commit
375140b1b1
@ -272,7 +272,7 @@ harvester:
|
|||||||
cronExpression: Cron Expression
|
cronExpression: Cron Expression
|
||||||
retain: Retain
|
retain: Retain
|
||||||
scheduleType: Type
|
scheduleType: Type
|
||||||
profileCount: Profile Count
|
configuredProfile: Configured Count
|
||||||
maxFailure: Max Failure
|
maxFailure: Max Failure
|
||||||
sourceVm: Source Virtual Machine
|
sourceVm: Source Virtual Machine
|
||||||
vmSchedule: Virtual Machine Schedule
|
vmSchedule: Virtual Machine Schedule
|
||||||
|
|||||||
@ -94,11 +94,11 @@ export default {
|
|||||||
sort: ['spec.gpuAddress']
|
sort: ['spec.gpuAddress']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Profile Count',
|
name: 'Configured Profile',
|
||||||
label: 'Profile Count',
|
label: 'Configured Count',
|
||||||
labelKey: 'harvester.tableHeaders.profileCount',
|
labelKey: 'harvester.tableHeaders.configuredProfile',
|
||||||
value: 'spec.profileSpec.length',
|
value: 'configuredProfile',
|
||||||
sort: ['spec.profileSpec.length'],
|
sort: ['configuredProfile'],
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -75,6 +75,10 @@ export default class MIGCONFIGURATION extends SteveModel {
|
|||||||
return this.spec.enabled;
|
return this.spec.enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get configuredProfile() {
|
||||||
|
return this.spec?.profileSpec?.filter((p) => p.requested > 0).map((p) => p.name).join(', ') || '-';
|
||||||
|
}
|
||||||
|
|
||||||
async enableConfig() {
|
async enableConfig() {
|
||||||
try {
|
try {
|
||||||
this.spec.enabled = true;
|
this.spec.enabled = true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user