-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some pv selection table optimizations and (#1530)
enhancements. Fixed filtering not working on claim name source storage class. Signed-off-by: Alexander Wels <[email protected]>
- Loading branch information
Showing
10 changed files
with
126 additions
and
62 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
42 changes: 42 additions & 0 deletions
42
src/app/home/pages/PlansPage/components/Wizard/ClaimDisplay.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,42 @@ | ||
import { PackageIcon, UnknownIcon, VirtualMachineIcon } from '@patternfly/react-icons'; | ||
import React from 'react'; | ||
import { IPlanPersistentVolume } from '../../../../../plan/duck/types'; | ||
import { pvcNameToString } from '../../helpers'; | ||
|
||
const styles = require('./PVStorageClassSelect.module').default; | ||
|
||
interface IClaimDisplayProps { | ||
pv: IPlanPersistentVolume; | ||
} | ||
|
||
export const ClaimDisplay: React.FunctionComponent<IClaimDisplayProps> = ({ | ||
pv, | ||
}: IClaimDisplayProps) => { | ||
if (!pv) { | ||
return null; | ||
} | ||
if (!pv.pvc.ownerType) { | ||
return <span> {pvcNameToString(pv.pvc)}</span>; | ||
} | ||
if (pv.pvc.ownerType === 'VirtualMachine') { | ||
return ( | ||
<> | ||
<VirtualMachineIcon title="Virtual Machine" /> | ||
<span> {pvcNameToString(pv.pvc)}</span> | ||
</> | ||
); | ||
} else if (pv.pvc.ownerType === 'Unknown') { | ||
return ( | ||
<> | ||
<UnknownIcon title="Unknown" /> | ||
<span> {pvcNameToString(pv.pvc)}</span> | ||
</> | ||
); | ||
} | ||
return ( | ||
<> | ||
<PackageIcon title={pv.pvc.ownerType} /> | ||
<span> {pvcNameToString(pv.pvc)}</span> | ||
</> | ||
); | ||
}; |
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
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
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
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