feat: Hide entities with hidden flag on Workspace create (#581)
Signed-off-by: Charles Thao <cthao@redhat.com>
This commit is contained in:
parent
5d91ee05b2
commit
ade0282aca
|
|
@ -100,7 +100,9 @@ export const WorkspaceFormImageList: React.FunctionComponent<WorkspaceFormImageL
|
|||
)}
|
||||
{filteredWorkspaceImages.length > 0 && (
|
||||
<Gallery hasGutter aria-label="Selectable card container">
|
||||
{filteredWorkspaceImages.map((image) => (
|
||||
{filteredWorkspaceImages
|
||||
.filter((image) => !image.hidden)
|
||||
.map((image) => (
|
||||
<Card
|
||||
isCompact
|
||||
isSelectable
|
||||
|
|
|
|||
|
|
@ -95,7 +95,9 @@ export const WorkspaceFormKindList: React.FunctionComponent<WorkspaceFormKindLis
|
|||
)}
|
||||
{filteredWorkspaceKinds.length > 0 && (
|
||||
<Gallery hasGutter aria-label="Selectable card container">
|
||||
{filteredWorkspaceKinds.map((kind) => (
|
||||
{filteredWorkspaceKinds
|
||||
.filter((kind) => !kind.hidden)
|
||||
.map((kind) => (
|
||||
<Card
|
||||
isCompact
|
||||
isSelectable
|
||||
|
|
@ -124,7 +126,11 @@ export const WorkspaceFormKindList: React.FunctionComponent<WorkspaceFormKindLis
|
|||
}
|
||||
>
|
||||
{(validSrc) => (
|
||||
<img src={validSrc} alt={`${kind.name} logo`} style={{ maxWidth: '60px' }} />
|
||||
<img
|
||||
src={validSrc}
|
||||
alt={`${kind.name} logo`}
|
||||
style={{ maxWidth: '60px' }}
|
||||
/>
|
||||
)}
|
||||
</WithValidImage>
|
||||
</CardHeader>
|
||||
|
|
|
|||
|
|
@ -96,7 +96,9 @@ export const WorkspaceFormPodConfigList: React.FunctionComponent<
|
|||
)}
|
||||
{filteredWorkspacePodConfigs.length > 0 && (
|
||||
<Gallery hasGutter aria-label="Selectable card container">
|
||||
{filteredWorkspacePodConfigs.map((podConfig) => (
|
||||
{filteredWorkspacePodConfigs
|
||||
.filter((podConfig) => !podConfig.hidden)
|
||||
.map((podConfig) => (
|
||||
<Card
|
||||
isCompact
|
||||
isSelectable
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ export const buildMockWorkspaceKind = (
|
|||
{ key: 'pythonVersion', value: '3.11' },
|
||||
{ key: 'jupyterlabVersion', value: '1.8.0' },
|
||||
],
|
||||
hidden: true,
|
||||
hidden: false,
|
||||
clusterMetrics: {
|
||||
workspacesCount: 0,
|
||||
},
|
||||
|
|
@ -257,7 +257,7 @@ export const buildMockWorkspaceKind = (
|
|||
{ key: 'pythonVersion', value: '3.12' },
|
||||
{ key: 'jupyterlabVersion', value: '2.0.0' },
|
||||
],
|
||||
hidden: true,
|
||||
hidden: false,
|
||||
redirect: {
|
||||
to: 'jupyterlab_scipy_210',
|
||||
message: {
|
||||
|
|
@ -318,7 +318,7 @@ export const buildMockWorkspaceKind = (
|
|||
id: 'large_cpu',
|
||||
displayName: 'Large CPU',
|
||||
description: 'Pod with 1 CPU, 1 Gb RAM',
|
||||
hidden: false,
|
||||
hidden: true,
|
||||
labels: [
|
||||
{ key: 'cpu', value: '1000m' },
|
||||
{ key: 'memory', value: '1Gi' },
|
||||
|
|
|
|||
Loading…
Reference in New Issue