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 && (
|
{filteredWorkspaceImages.length > 0 && (
|
||||||
<Gallery hasGutter aria-label="Selectable card container">
|
<Gallery hasGutter aria-label="Selectable card container">
|
||||||
{filteredWorkspaceImages.map((image) => (
|
{filteredWorkspaceImages
|
||||||
|
.filter((image) => !image.hidden)
|
||||||
|
.map((image) => (
|
||||||
<Card
|
<Card
|
||||||
isCompact
|
isCompact
|
||||||
isSelectable
|
isSelectable
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,9 @@ export const WorkspaceFormKindList: React.FunctionComponent<WorkspaceFormKindLis
|
||||||
)}
|
)}
|
||||||
{filteredWorkspaceKinds.length > 0 && (
|
{filteredWorkspaceKinds.length > 0 && (
|
||||||
<Gallery hasGutter aria-label="Selectable card container">
|
<Gallery hasGutter aria-label="Selectable card container">
|
||||||
{filteredWorkspaceKinds.map((kind) => (
|
{filteredWorkspaceKinds
|
||||||
|
.filter((kind) => !kind.hidden)
|
||||||
|
.map((kind) => (
|
||||||
<Card
|
<Card
|
||||||
isCompact
|
isCompact
|
||||||
isSelectable
|
isSelectable
|
||||||
|
|
@ -124,7 +126,11 @@ export const WorkspaceFormKindList: React.FunctionComponent<WorkspaceFormKindLis
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{(validSrc) => (
|
{(validSrc) => (
|
||||||
<img src={validSrc} alt={`${kind.name} logo`} style={{ maxWidth: '60px' }} />
|
<img
|
||||||
|
src={validSrc}
|
||||||
|
alt={`${kind.name} logo`}
|
||||||
|
style={{ maxWidth: '60px' }}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
</WithValidImage>
|
</WithValidImage>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,9 @@ export const WorkspaceFormPodConfigList: React.FunctionComponent<
|
||||||
)}
|
)}
|
||||||
{filteredWorkspacePodConfigs.length > 0 && (
|
{filteredWorkspacePodConfigs.length > 0 && (
|
||||||
<Gallery hasGutter aria-label="Selectable card container">
|
<Gallery hasGutter aria-label="Selectable card container">
|
||||||
{filteredWorkspacePodConfigs.map((podConfig) => (
|
{filteredWorkspacePodConfigs
|
||||||
|
.filter((podConfig) => !podConfig.hidden)
|
||||||
|
.map((podConfig) => (
|
||||||
<Card
|
<Card
|
||||||
isCompact
|
isCompact
|
||||||
isSelectable
|
isSelectable
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ export const buildMockWorkspaceKind = (
|
||||||
{ key: 'pythonVersion', value: '3.11' },
|
{ key: 'pythonVersion', value: '3.11' },
|
||||||
{ key: 'jupyterlabVersion', value: '1.8.0' },
|
{ key: 'jupyterlabVersion', value: '1.8.0' },
|
||||||
],
|
],
|
||||||
hidden: true,
|
hidden: false,
|
||||||
clusterMetrics: {
|
clusterMetrics: {
|
||||||
workspacesCount: 0,
|
workspacesCount: 0,
|
||||||
},
|
},
|
||||||
|
|
@ -257,7 +257,7 @@ export const buildMockWorkspaceKind = (
|
||||||
{ key: 'pythonVersion', value: '3.12' },
|
{ key: 'pythonVersion', value: '3.12' },
|
||||||
{ key: 'jupyterlabVersion', value: '2.0.0' },
|
{ key: 'jupyterlabVersion', value: '2.0.0' },
|
||||||
],
|
],
|
||||||
hidden: true,
|
hidden: false,
|
||||||
redirect: {
|
redirect: {
|
||||||
to: 'jupyterlab_scipy_210',
|
to: 'jupyterlab_scipy_210',
|
||||||
message: {
|
message: {
|
||||||
|
|
@ -318,7 +318,7 @@ export const buildMockWorkspaceKind = (
|
||||||
id: 'large_cpu',
|
id: 'large_cpu',
|
||||||
displayName: 'Large CPU',
|
displayName: 'Large CPU',
|
||||||
description: 'Pod with 1 CPU, 1 Gb RAM',
|
description: 'Pod with 1 CPU, 1 Gb RAM',
|
||||||
hidden: false,
|
hidden: true,
|
||||||
labels: [
|
labels: [
|
||||||
{ key: 'cpu', value: '1000m' },
|
{ key: 'cpu', value: '1000m' },
|
||||||
{ key: 'memory', value: '1Gi' },
|
{ key: 'memory', value: '1Gi' },
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue