Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WEB: Webinar and console changes #297

Merged
merged 29 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3bbdb7c
update image selection ui while creating app
nxtCoder19 Sep 16, 2024
b7244f6
minor ui changes
nxtCoder19 Sep 17, 2024
372bfdd
adding registration ui
nxtCoder19 Sep 17, 2024
5d47dcb
Merge branch 'update/multi-tanency' into webinar/registration
nxtCoder19 Sep 17, 2024
fc00a87
update website changes
nxtCoder19 Sep 17, 2024
dc49315
update website changes
nxtCoder19 Sep 17, 2024
966023b
Merge branch 'release-v1.0.5' into webinar/registration
nxtCoder19 Sep 17, 2024
cb7063d
update website changes
nxtCoder19 Sep 17, 2024
2f2a99a
Merge branch 'webinar/registration' of github.com:kloudlite/web into …
nxtCoder19 Sep 17, 2024
0a2b1be
webinar changes
nxtCoder19 Sep 17, 2024
b4cc722
Merge branch 'release-v1.0.5' into update/multi-tanency
nxtCoder19 Sep 17, 2024
07fd258
updated signup button
tulsiojha Sep 19, 2024
4ecb7a3
Merge branch 'website/fix' into webinar/registration
tulsiojha Sep 19, 2024
c75c219
merge website/fix
tulsiojha Sep 19, 2024
03b213a
webinar changes in progress
nxtCoder19 Sep 19, 2024
573fa51
Merge branch 'webinar/registration' of github.com:kloudlite/web into …
nxtCoder19 Sep 19, 2024
b2ba71a
wip
nxtCoder19 Sep 19, 2024
302abfe
wip
nxtCoder19 Sep 19, 2024
659625f
updated contactus, added google recaptcha
tulsiojha Sep 19, 2024
4d5e434
fix merge conflict
tulsiojha Sep 19, 2024
5b08141
updated event page
tulsiojha Sep 19, 2024
f38fe2c
updated import and firebase functions cleanup
tulsiojha Sep 19, 2024
52a57cd
updated events
tulsiojha Sep 19, 2024
18d8166
updated env access in dev
tulsiojha Sep 19, 2024
3a64a91
wip
nxtCoder19 Sep 19, 2024
105df11
wip
nxtCoder19 Sep 19, 2024
8466f7c
webinar changes
nxtCoder19 Sep 23, 2024
e3574b3
Merge branch 'webinar/registration' into update/multi-tanency
nxtCoder19 Sep 23, 2024
d19f0a7
update dockerfile
nxtCoder19 Sep 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ src/generated/plugin/node_modules
src/design-system/node_modules
src/apps/devdoc/node_modules
src/apps/devdoc/.next
src/apps/webinar/.env

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ out
storybook-dist

tsconfig-compile.tsbuildinfo

.secrets
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ COPY ./pnpm-lock.yaml ./pnpm-lock.yaml
# typecheck
ARG APP
ENV APP=${APP}
COPY ./src/generated/package.json ./src/generated/package.json
COPY ./src/generated/plugin/package.json ./src/generated/plugin/package.json
# COPY ./src/generated/package.json ./src/generated/package.json
# COPY ./src/generated/plugin/package.json ./src/generated/plugin/package.json
COPY ./src/generated/package.json ./src/generated/pnpm-lock.yaml ./src/generated/
COPY ./src/generated/plugin/package.json ./src/generated/plugin/pnpm-lock.yaml ./src/generated/plugin/

RUN pnpm i -p --frozen-lockfile

Expand Down
18 changes: 12 additions & 6 deletions Dockerfile.webinar
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
FROM node:20.8.1-alpine as base
FROM node:20.8.1-alpine AS base
RUN apk add g++ make py3-pip
RUN npm i -g pnpm
WORKDIR /app
COPY ./package.json ./package.json
COPY ./pnpm-lock.yaml ./pnpm-lock.yaml

COPY ./src/generated/package.json ./src/generated/package.json
COPY ./src/generated/plugin/package.json ./src/generated/plugin/package.json
RUN mkdir -p ./src/generated/plugin
COPY ./src/generated/package.json ./src/generated/pnpm-lock.yaml ./src/generated/
COPY ./src/generated/plugin/package.json ./src/generated/plugin/pnpm-lock.yaml ./src/generated/plugin/

RUN pnpm i
RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=pnpm-lock.yaml,target=pnpm-lock.yaml \
--mount=type=cache,target=/root/.local/share/pnpm/store \
pnpm i --frozen-lockfile

# lib
COPY ./lib ./lib

# design system
COPY ./src/design-system/ ./src/design-system/
WORKDIR /app/src/design-system
RUN pnpm i -p
RUN pnpm i --frozen-lockfile
RUN pnpm local:release

# webinar
WORKDIR /app
COPY ./src/apps/webinar ./src/apps/webinar
WORKDIR /app/src/apps/webinar
RUN pnpm i -p
RUN pnpm i --frozen-lockfile
RUN pnpm build

FROM node:20.8.1-alpine
Expand Down
4 changes: 2 additions & 2 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ tasks:
- |
BASE_URL=dev.kloudlite.io
COOKIE_DOMAIN=".kloudlite.io"
GATEWAY_URL="http://gateway.kloudlite.svc.cluster.local:3000"
GATEWAY_URL="http://gateway-api.kloudlite.svc.cluster.local:3000"
case {{.app}} in
"auth")
PORT=4000
Expand Down Expand Up @@ -106,7 +106,7 @@ tasks:
BASE_URL=kloudlite.io
URL_SUFFIX=""
COOKIE_DOMAIN=".kloudlite.io"
GATEWAY_URL="http://gateway.kloudlite.svc.cluster.local:3000"
GATEWAY_URL="http://gateway-api.kloudlite.svc.cluster.local:3000"

case {{.app}} in
"auth")
Expand Down
35 changes: 18 additions & 17 deletions lib/configs/base-url.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,26 @@ const getClientEnv = (env) => {
MANAGE_GITLAB_URL,
MANAGE_GITHUB_URL,
GITHUB_APP_NAME,
COOKIE_DOMAIN,
} = env;
return `
${BASE_URL ? `window.BASE_URL = ${`'${BASE_URL}'`}` : ''}
${
NODE_ENV === 'development'
? `window.DEVELOPER = ${`'${DEVELOPER}'`}`
: `window.NODE_ENV = ${`'${NODE_ENV}'`}`
}
${NODE_ENV === 'development'
? `window.DEVELOPER = ${`'${DEVELOPER}'`}`
: `window.NODE_ENV = ${`'${NODE_ENV}'`}`
}
${URL_SUFFIX ? `window.URL_SUFFIX = ${`'${URL_SUFFIX}'`}` : ''}
${REGISTRY_URL ? `window.REGISTRY_URL = ${`'${REGISTRY_URL}'`}` : ''}
${
MANAGE_GITHUB_URL
? `window.MANAGE_GITHUB_URL = ${`'${MANAGE_GITHUB_URL}'`}`
: ''
}
${
MANAGE_GITLAB_URL
? `window.MANAGE_GITLAB_URL = ${`'${MANAGE_GITLAB_URL}'`}`
: ''
}
${MANAGE_GITHUB_URL
? `window.MANAGE_GITHUB_URL = ${`'${MANAGE_GITHUB_URL}'`}`
: ''
}
${MANAGE_GITLAB_URL
? `window.MANAGE_GITLAB_URL = ${`'${MANAGE_GITLAB_URL}'`}`
: ''
}
${GITHUB_APP_NAME ? `window.GITHUB_APP_NAME = ${`'${GITHUB_APP_NAME}'`}` : ''}
`;
${COOKIE_DOMAIN ? `window.COOKIE_DOMAIN = ${`'${COOKIE_DOMAIN}'`}` : ''} `;
};

const getServerEnv = () => {
Expand Down Expand Up @@ -58,6 +56,9 @@ const getServerEnv = () => {
...(process.env.GITHUB_APP_NAME
? { GITHUB_APP_NAME: process.env.GITHUB_APP_NAME }
: {}),
...(process.env.COOKIE_DOMAIN
? { COOKIE_DOMAIN: process.env.COOKIE_DOMAIN }
: {}),
};
};

Expand Down Expand Up @@ -100,7 +101,7 @@ const baseUrls = () => {
return window.REGISTRY_URL;
}
return process.env.REGISTRY_URL;
})() || `registry.${bUrl}`;
})() || `registry.${bUrl} `;

const gitEnvs = (() => {
if (typeof window !== 'undefined') {
Expand Down
10 changes: 10 additions & 0 deletions lib/shared-statics/events.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (performance): Consider using a more dynamic solution for event configuration

While using a static JSON file for event configuration is simple, it might become hard to manage as the number of events grows. Consider using a database or a content management system for more flexible and scalable event management, especially if you plan to have many events or need to update them frequently.

"code-unbound-new-age-development-environments": {
"name": "Code Unbound: New Age Development Environments",
"dyteMeetingId": "bbbba7f8-3643-41fd-831a-15a321f80966",
"date": "2024-09-21",
"starttime": "12:15",
"endtime": "13:15",
"type": "Online"
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"homepage": "https://kloudlite.github.io",
"type": "module",
"scripts": {
"postinstall": "cd src/generated && pnpm i",
"postinstall": "cd src/generated && ls -al && pnpm i --frozen-lockfile",
"fake": "esbuild fake-data-generator/gen.ts --format=cjs --outfile=public/dist/fake-data-generator.cjs --platform=node && node public/dist/fake-data-generator.cjs",
"dev": "remix dev",
"serve": "remix-serve ./public/${APP}/server",
Expand Down Expand Up @@ -91,7 +91,7 @@
"react-qr-code": "^2.0.12",
"react-remove-scroll": "^2.5.7",
"react-router-dom": "^6.21.1",
"react-toastify": "10.0.5",
"react-toastify": "^9.1.3",
"react-tooltip": "^5.27.0",
"react-viewport-list": "^7.1.2",
"reconnecting-websocket": "^4.4.0",
Expand Down Expand Up @@ -140,4 +140,4 @@
"typescript": "^5.3.3",
"typescript-json-schema": "^0.62.0"
}
}
}
19 changes: 12 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 22 additions & 7 deletions src/apps/console/page-components/app/general.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { useParams } from '@remix-run/react';
import { useCallback, useEffect, useState } from 'react';
import { Checkbox } from '~/components/atoms/checkbox';
import { TextInput } from '~/components/atoms/input';
import Select from '~/components/atoms/select';
import { BottomNavigation } from '~/console/components/commons';
import { NameIdView } from '~/console/components/name-id-view';
import { useAppState } from '~/console/page-components/app-states';
Expand Down Expand Up @@ -64,12 +63,25 @@ import { handleError } from '~/root/lib/utils/common';
// return <ResourceExtraAction options={options} />;
// };

const AppSelectItem = ({ label, value }: { label: string; value: string }) => {
const AppSelectItem = ({
label,
value,
registry,
repository,
}: {
label: string;
value: string;
registry: string;
repository: string;
}) => {
return (
<div>
<div className="flex flex-col">
<div>{label}</div>
<div className="bodySm text-text-soft">{value}</div>
{registry !== '' && repository !== '' && (
<div className="bodySm text-text-soft">{`${registry}/${repository}`}</div>
)}
{/* <div className="bodySm text-text-soft">{value}</div> */}
</div>
</div>
);
Expand Down Expand Up @@ -111,6 +123,8 @@ const AppGeneral = ({ mode = 'new' }: { mode: 'edit' | 'new' }) => {
<AppSelectItem
label={`${i.imageName}:${i.imageTag}`}
value={`${i.imageName}:${i.imageTag}`}
registry={i.meta.registry || ''}
repository={i.meta.repository || ''}
/>
),
}));
Expand Down Expand Up @@ -303,16 +317,16 @@ const AppGeneral = ({ mode = 'new' }: { mode: 'edit' | 'new' }) => {
/>
)}
<div className="flex flex-col gap-xl">
{/* <TextInput
<TextInput
size="lg"
label="Image name"
placeholder="Enter Image name"
value={values.imageUrl}
onChange={handleChange('imageUrl')}
error={!!errors.imageUrl}
message={errors.imageUrl}
/> */}
<Select
/>
{/* <Select
label="Select Images"
size="lg"
value={values.imageUrl}
Expand All @@ -331,7 +345,8 @@ const AppGeneral = ({ mode = 'new' }: { mode: 'edit' | 'new' }) => {
error={!!errors.imageUrl}
message={errors.imageUrl}
loading={imageLoaded}
/>
createLabel="Select"
/> */}
</div>

<Checkbox
Expand Down
9 changes: 9 additions & 0 deletions src/apps/console/page-components/handle-environment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ const HandleEnvironment = ({ show, setShow }: IDialog<IEnvironment | null>) => {

const [clusterList, setClusterList] = useState<any[]>([]);

// const klCluster = {
// label: 'Kloudlite cluster',
// value: constants.kloudliteClusterName,
// ready: true,
// render: () => (
// <ClusterSelectItem label="Kloudlite cluster" value="kloudlite-cluster" />
// ),
// };

const getClusters = useCallback(async () => {
try {
const byokClusters = await api.listByokClusters({});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@ import { useEffect, useState } from 'react';
import { Button, IconButton } from '~/components/atoms/button';
import { Chip, ChipGroup } from '~/components/atoms/chips';
import { TextInput } from '~/components/atoms/input';
import Tooltip from '~/components/atoms/tooltip';
import { usePagination } from '~/components/molecule/pagination';
import { cn } from '~/components/utils';
import List from '~/console/components/list';
import NoResultsFound from '~/console/components/no-results-found';
import { IShowDialog } from '~/console/components/types.d';
import { useAppState } from '~/console/page-components/app-states';
import useForm from '~/root/lib/client/hooks/use-form';
import Yup from '~/root/lib/server/helpers/yup';
import { NonNullableString } from '~/root/lib/types/common';
import { listFlex } from '~/console/components/console-list-components';
import {
ArrowRight,
ChevronLeft,
Expand All @@ -21,8 +16,13 @@ import {
X,
XCircleFill,
} from '~/console/components/icons';
import Tooltip from '~/components/atoms/tooltip';
import { listFlex } from '~/console/components/console-list-components';
import List from '~/console/components/list';
import NoResultsFound from '~/console/components/no-results-found';
import { IShowDialog } from '~/console/components/types.d';
import { useAppState } from '~/console/page-components/app-states';
import useForm from '~/root/lib/client/hooks/use-form';
import Yup from '~/root/lib/server/helpers/yup';
import { NonNullableString } from '~/root/lib/types/common';
import AppDialog from './app-dialogs';

interface IConfigMount {
Expand Down Expand Up @@ -395,7 +395,7 @@ export const ConfigMounts = () => {
/>
<Chip
item={{ name: 'mres' }}
label="Integrated resources"
label="Managed resources"
type="CLICKABLE"
/>
</ChipGroup>
Expand Down
Loading
Loading