mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-04 13:16:05 +08:00
Latest changes from Harvester master - a537c1ae38eb7030542ac371f24ae3336cd9d422
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { load } from 'js-yaml';
|
||||
import { omitBy, pickBy } from 'lodash';
|
||||
|
||||
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../config/harvester';
|
||||
import { colorForState } from '@shell/plugins/dashboard-store/resource-class';
|
||||
import { POD, NODE, PVC } from '@shell/config/types';
|
||||
import { findBy } from '@shell/utils/array';
|
||||
@@ -161,6 +161,12 @@ export default class VirtVm extends HarvesterResource {
|
||||
icon: 'icon icon-storage',
|
||||
label: this.t('harvester.action.editVMQuota')
|
||||
},
|
||||
{
|
||||
action: 'createSchedule',
|
||||
enabled: true,
|
||||
icon: 'icon icon-history',
|
||||
label: this.t('harvester.action.createSchedule')
|
||||
},
|
||||
{
|
||||
action: 'restoreVM',
|
||||
enabled: !!this.actions?.restore,
|
||||
@@ -323,6 +329,16 @@ export default class VirtVm extends HarvesterResource {
|
||||
);
|
||||
}
|
||||
|
||||
createSchedule(resources = this) {
|
||||
const router = this.currentRouter();
|
||||
|
||||
router.push({
|
||||
name: `${ HARVESTER_PRODUCT }-c-cluster-resource-create`,
|
||||
params: { resource: HCI.SCHEDULE_VM_BACKUP },
|
||||
query: { vmNamespace: this.metadata.namespace, vmName: this.metadata.name }
|
||||
});
|
||||
}
|
||||
|
||||
backupVM(resources = this) {
|
||||
this.$dispatch('promptModal', {
|
||||
resources,
|
||||
|
||||
Reference in New Issue
Block a user