Latest changes from Harvester master - a537c1ae38eb7030542ac371f24ae3336cd9d422

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
Francesco Torchia
2024-10-23 17:01:40 +02:00
parent 2ca86930ad
commit 118aaf16b7
35 changed files with 1484 additions and 93 deletions
@@ -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,