From 3c566cbef30583189cb2e7c13086f4a20924ac5b Mon Sep 17 00:00:00 2001 From: Piyush Kumar Date: Mon, 16 Sep 2024 10:17:59 +0530 Subject: [PATCH 01/13] update image selection ui while creating app --- .../console/page-components/app/general.tsx | 20 ++++++++++++++++-- .../env+/$environment+/new-app/app-detail.tsx | 9 +++++--- .../apps/console/server/utils/constants.ts | 1 + .../src/app/components/join-webinar.tsx | 4 ++-- web/src/apps/webinar/src/app/favicon.ico | Bin 25931 -> 4287 bytes web/src/apps/webinar/src/app/layout.tsx | 2 +- 6 files changed, 28 insertions(+), 8 deletions(-) diff --git a/web/src/apps/console/page-components/app/general.tsx b/web/src/apps/console/page-components/app/general.tsx index e95f6f2a2..f51823956 100644 --- a/web/src/apps/console/page-components/app/general.tsx +++ b/web/src/apps/console/page-components/app/general.tsx @@ -64,12 +64,25 @@ import { handleError } from '~/root/lib/utils/common'; // return ; // }; -const AppSelectItem = ({ label, value }: { label: string; value: string }) => { +const AppSelectItem = ({ + label, + value, + registry, + repository, +}: { + label: string; + value: string; + registry: string; + repository: string; +}) => { return (
{label}
-
{value}
+ {registry !== '' && repository !== '' && ( +
{`${registry}/${repository}`}
+ )} + {/*
{value}
*/}
); @@ -111,6 +124,8 @@ const AppGeneral = ({ mode = 'new' }: { mode: 'edit' | 'new' }) => { ), })); @@ -331,6 +346,7 @@ const AppGeneral = ({ mode = 'new' }: { mode: 'edit' | 'new' }) => { error={!!errors.imageUrl} message={errors.imageUrl} loading={imageLoaded} + createLabel="Select" /> diff --git a/web/src/apps/console/routes/_main+/$account+/env+/$environment+/new-app/app-detail.tsx b/web/src/apps/console/routes/_main+/$account+/env+/$environment+/new-app/app-detail.tsx index 602448c8a..5bfbc34d8 100644 --- a/web/src/apps/console/routes/_main+/$account+/env+/$environment+/new-app/app-detail.tsx +++ b/web/src/apps/console/routes/_main+/$account+/env+/$environment+/new-app/app-detail.tsx @@ -73,7 +73,10 @@ const AppSelectItem = ({
{label}
-
{`${registry}/${repository}`}
+ {registry !== '' && repository !== '' && ( +
{`${registry}/${repository}`}
+ )} + {/*
{`${registry}/${repository}`}
*/}
); @@ -116,8 +119,8 @@ const AppDetail = () => { ), })); diff --git a/web/src/apps/console/server/utils/constants.ts b/web/src/apps/console/server/utils/constants.ts index 1a2bd8b69..62fcab66d 100644 --- a/web/src/apps/console/server/utils/constants.ts +++ b/web/src/apps/console/server/utils/constants.ts @@ -11,4 +11,5 @@ export const constants = { dockerImageFormatRegex: /^(([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\.)+[a-zA-Z]{2,}(:[0-9]+)?\/)?([a-z0-9]+(-[a-z0-9]+)*\/)*[a-z0-9]+([._-][a-z0-9]+)*(:[a-zA-Z0-9_][a-zA-Z0-9._-]{0,127}[a-zA-Z0-9])?(@[A-Za-z][A-Za-z0-9]*(?:[._-][A-Za-z0-9]+)?:[A-Fa-f0-9]{32,})?$/, keyFormatRegex: /^[A-Za-z0-9_]+([./-][A-Za-z0-9_]+)*$/, + kloudliteClusterName: 'kloudlite-enabled-cluster', }; diff --git a/web/src/apps/webinar/src/app/components/join-webinar.tsx b/web/src/apps/webinar/src/app/components/join-webinar.tsx index ca0d0b97f..96c73cf25 100644 --- a/web/src/apps/webinar/src/app/components/join-webinar.tsx +++ b/web/src/apps/webinar/src/app/components/join-webinar.tsx @@ -19,8 +19,8 @@ export const JoinWebinar = ({ userData, meetingStatus }: { userData: UesrData, m