mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-05-15 07:21:48 +00:00
fix: add alternative action for VM restart and soft reboot (#868)
* fix: add alternative action for VM restart and soft reboot Signed-off-by: Andy Lee <andy.lee@suse.com> * refactor: fix alignment Signed-off-by: Andy Lee <andy.lee@suse.com> --------- Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
parent
e5a1929ac5
commit
af52df0ba0
@ -164,6 +164,7 @@ export default class VirtVm extends HarvesterResource {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
action: 'restartVM',
|
action: 'restartVM',
|
||||||
|
altAction: 'altRestartVM',
|
||||||
enabled: !!this.actions?.restart,
|
enabled: !!this.actions?.restart,
|
||||||
icon: 'icon icon-refresh',
|
icon: 'icon icon-refresh',
|
||||||
label: this.t('harvester.action.restart'),
|
label: this.t('harvester.action.restart'),
|
||||||
@ -171,10 +172,11 @@ export default class VirtVm extends HarvesterResource {
|
|||||||
bulkAction: 'restartVM'
|
bulkAction: 'restartVM'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
action: 'softrebootVM',
|
action: 'softrebootVM',
|
||||||
enabled: !!this.actions?.softreboot,
|
altAction: 'doSoftReboot',
|
||||||
icon: 'icon icon-pipeline',
|
enabled: !!this.actions?.softreboot,
|
||||||
label: this.t('harvester.action.softreboot')
|
icon: 'icon icon-pipeline',
|
||||||
|
label: this.t('harvester.action.softreboot')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
action: 'startVM',
|
action: 'startVM',
|
||||||
@ -371,6 +373,10 @@ export default class VirtVm extends HarvesterResource {
|
|||||||
this.metadata.annotations[HCI_ANNOTATIONS.VOLUME_CLAIM_TEMPLATE] = JSON.stringify(deleteDataSource);
|
this.metadata.annotations[HCI_ANNOTATIONS.VOLUME_CLAIM_TEMPLATE] = JSON.stringify(deleteDataSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
altRestartVM() {
|
||||||
|
this.doActionGrowl('restart', {});
|
||||||
|
}
|
||||||
|
|
||||||
restartVM(resources = this) {
|
restartVM(resources = this) {
|
||||||
this.$dispatch('promptModal', {
|
this.$dispatch('promptModal', {
|
||||||
resources,
|
resources,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user