Skip to content

Commit

Permalink
Merge pull request #75 from harvester/mergify/bp/release-harvester-v1…
Browse files Browse the repository at this point in the history
….5/pr-69

fix: failed to resume /active vm schedule job (backport #69)
  • Loading branch information
a110605 authored Jan 10, 2025
2 parents ee9575f + 7d97e68 commit 90b85d2
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions pkg/harvester/models/harvesterhci.io.schedulevmbackup.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import HarvesterResource from './harvester';
import { get } from '@shell/utils/object';
import { findBy } from '@shell/utils/array';
import { colorForState, stateDisplay, STATES } from '@shell/plugins/dashboard-store/resource-class';
import { _CREATE } from '@shell/config/query-params';
import { ucFirst, escapeHtml } from '@shell/utils/string';
Expand Down Expand Up @@ -67,14 +65,7 @@ export default class ScheduleVmBackup extends HarvesterResource {
}

get state() {
const conditions = get(this, 'status.conditions');
const isSuspended = findBy(conditions, 'type', 'BackupSuspend')?.status === 'True';

if (isSuspended) {
return STATES.suspended.label;
}

return this.metadata.state.name;
return this.status?.suspended === true ? STATES.suspended.label : STATES.active.label;
}

get stateDescription() {
Expand Down

0 comments on commit 90b85d2

Please sign in to comment.