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
retain: Retain
scheduleType: Type
profileCount: Profile Count
configuredProfile: Configured Count
maxFailure: Max Failure
sourceVm: Source Virtual Machine
vmSchedule: Virtual Machine Schedule

View File

@ -94,11 +94,11 @@ export default {
sort: ['spec.gpuAddress']
},
{
name: 'Profile Count',
label: 'Profile Count',
labelKey: 'harvester.tableHeaders.profileCount',
value: 'spec.profileSpec.length',
sort: ['spec.profileSpec.length'],
name: 'Configured Profile',
label: 'Configured Count',
labelKey: 'harvester.tableHeaders.configuredProfile',
value: 'configuredProfile',
sort: ['configuredProfile'],
align: 'center'
},
{

View File

@ -75,6 +75,10 @@ export default class MIGCONFIGURATION extends SteveModel {
return this.spec.enabled;
}
get configuredProfile() {
return this.spec?.profileSpec?.filter((p) => p.requested > 0).map((p) => p.name).join(', ') || '-';
}
async enableConfig() {
try {
this.spec.enabled = true;