ui: Fix live patch of routers (#6353)

This commit is contained in:
Pearl Dsilva 2022-05-04 02:51:10 +05:30 committed by GitHub
parent 470de7fb54
commit 74c42ee3b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 1 deletions

View File

@ -233,6 +233,7 @@
"label.action.migrate.systemvm.processing": "Migrating system VM...",
"label.action.migrate.systemvm.to.ps": "Migrate system VM to another primary storage",
"label.action.patch.systemvm": "Patch system VM",
"label.action.patch.systemvm.vpc": "Patch system VM - VPC Router",
"label.action.patch.systemvm.processing": "Patching system VM....",
"label.action.project.add.account": "Add account to project",
"label.action.project.add.user": "Add user to project",

View File

@ -100,7 +100,7 @@ export default {
label: 'label.action.patch.systemvm',
message: 'message.action.patch.router',
dataView: true,
hidden: (record) => { return record.state === 'Running' },
show: (record) => { return record.state === 'Running' && !('vpcid' in record) },
mapping: {
id: {
value: (record) => { return record.guestnetworkid }
@ -120,6 +120,32 @@ export default {
})
}
},
{
api: 'restartVPC',
icon: 'diff-outlined',
label: 'label.action.patch.systemvm.vpc',
message: 'message.action.patch.router',
dataView: true,
show: (record) => { return record.state === 'Running' && ('vpcid' in record) },
mapping: {
id: {
value: (record) => { return record.vpcid }
},
livepatch: {
value: (record) => { return true }
}
},
groupAction: true,
popup: true,
groupMap: (selection, values, record) => {
return selection.map(x => {
const data = record.filter(y => { return y.id === x })
return {
id: data[0].vpcid, livepatch: true
}
})
}
},
{
api: 'scaleSystemVm',
icon: 'arrows-alt-outlined',