Skip to content

Commit 1dcd1c6

Browse files
authored
Merge pull request #1439 from jpuzz0/MTV-1905
[MTV-1905] Canceled VMs are not displayed with status in the plans list
2 parents 976bb83 + 7acd05f commit 1dcd1c6

File tree

1 file changed

+13
-14
lines changed
  • packages/forklift-console-plugin/src/modules/Plans/views/list/components

1 file changed

+13
-14
lines changed

packages/forklift-console-plugin/src/modules/Plans/views/list/components/PlanStatusCell.tsx

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export const PlanStatusCell: React.FC<CellProps> = ({ data }) => {
3030
const { showModal } = useModal();
3131
const plan = data?.obj;
3232

33-
const vms = plan?.spec?.vms;
3433
const vmStatuses = plan?.status?.migration?.vms;
3534
const [lastMigration] = usePlanMigration(plan);
3635

@@ -101,7 +100,7 @@ export const PlanStatusCell: React.FC<CellProps> = ({ data }) => {
101100
)}
102101

103102
<Split hasGutter>
104-
{vmCount?.success > 0 && (
103+
{vmCount.success > 0 && (
105104
<SplitItem>
106105
<PlanStatusVmCount
107106
count={vmCount.success}
@@ -111,19 +110,19 @@ export const PlanStatusCell: React.FC<CellProps> = ({ data }) => {
111110
</SplitItem>
112111
)}
113112

114-
{phase !== PlanPhase.Running &&
115-
phase !== PlanPhase.NotReady &&
116-
vms?.length &&
117-
!vmCount?.error &&
118-
!vmCount.success && (
119-
<SplitItem>
120-
<PlanStatusVmCount count={vms.length} status="warning" linkPath={vmCountLinkPath} />
121-
</SplitItem>
122-
)}
123-
124-
{vmCount?.error > 0 && (
113+
{vmCount.canceled > 0 && (
125114
<SplitItem>
126-
<PlanStatusVmCount count={vmCount?.error} status="danger" linkPath={vmCountLinkPath} />
115+
<PlanStatusVmCount
116+
count={vmCount.canceled}
117+
status="warning"
118+
linkPath={vmCountLinkPath}
119+
/>
120+
</SplitItem>
121+
)}
122+
123+
{vmCount.error > 0 && (
124+
<SplitItem>
125+
<PlanStatusVmCount count={vmCount.error} status="danger" linkPath={vmCountLinkPath} />
127126
</SplitItem>
128127
)}
129128
</Split>

0 commit comments

Comments
 (0)