diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json index c8125869971..be0a42f20c0 100644 --- a/ui/public/locales/en.json +++ b/ui/public/locales/en.json @@ -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", diff --git a/ui/src/config/section/infra/routers.js b/ui/src/config/section/infra/routers.js index 3b595be9b39..576caef80a2 100644 --- a/ui/src/config/section/infra/routers.js +++ b/ui/src/config/section/infra/routers.js @@ -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',