Skip to content

Commit

Permalink
Merge pull request #69 from a110605/issue_7174
Browse files Browse the repository at this point in the history
fix: failed to resume /active vm schedule job
  • Loading branch information
a110605 authored Jan 10, 2025
2 parents fb7d604 + 814d296 commit 4ca6cae
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 4ca6cae

Please sign in to comment.