-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1170 from yaacov/show-vm-conditions
🐾 Plan -> vm list don't show plan status conditions
- Loading branch information
Showing
5 changed files
with
79 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...rc/modules/Plans/views/details/tabs/VirtualMachines/components/ConditionsCellRenderer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react'; | ||
import { TableCell } from 'src/modules/Providers/utils'; | ||
|
||
import { YellowExclamationTriangleIcon } from '@openshift-console/dynamic-plugin-sdk'; | ||
import { Label, Level, LevelItem } from '@patternfly/react-core'; | ||
|
||
import { PlanVMsCellProps } from './PlanVMsCellProps'; | ||
|
||
export const ConditionsCellRenderer: React.FC<PlanVMsCellProps> = ({ data }) => { | ||
const condition = data?.conditions?.[0]; | ||
if (!condition) { | ||
return <></>; | ||
} | ||
|
||
return ( | ||
<TableCell> | ||
<Level hasGutter> | ||
<LevelItem> | ||
<Label isCompact color="orange" icon={<YellowExclamationTriangleIcon />}> | ||
{condition.category} | ||
</Label> | ||
</LevelItem> | ||
<LevelItem>{condition.message}</LevelItem> | ||
</Level> | ||
</TableCell> | ||
); | ||
}; |
1 change: 1 addition & 0 deletions
1
...t-console-plugin/src/modules/Plans/views/details/tabs/VirtualMachines/components/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters