feat: show configured profile in table

Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
Andy Lee 2025-10-31 15:47:04 +08:00
parent d5ac6d9617
commit 375140b1b1
No known key found for this signature in database
GPG Key ID: 39DC4436AE3564D5
3 changed files with 10 additions and 6 deletions

View File

@ -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

View File

@ -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'
}, },
{ {

View File

@ -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;