From 1b483985aaeaf4dca98451a5996e27e5ce34964b Mon Sep 17 00:00:00 2001 From: Piyush Kumar Date: Tue, 18 Jun 2024 01:56:31 +0530 Subject: [PATCH 01/13] ui changes for environment and cluster --- gql-queries-generator/doc/queries.graphql | 6 ++ .../environments/environment-resources-v2.tsx | 16 +++- .../infra+/clusters/cluster-resources-v2.tsx | 86 +++++++++++++------ .../_main+/$account+/user-profile/_layout.tsx | 2 +- .../gql/queries/byok-cluster-queries.ts | 1 + .../server/gql/queries/cluster-queries.ts | 3 + .../server/gql/queries/environment-queries.ts | 2 + src/generated/gql/sdl.graphql | 3 + src/generated/gql/server.ts | 6 ++ 9 files changed, 96 insertions(+), 29 deletions(-) diff --git a/gql-queries-generator/doc/queries.graphql b/gql-queries-generator/doc/queries.graphql index ca3e485c4..0adaeae37 100644 --- a/gql-queries-generator/doc/queries.graphql +++ b/gql-queries-generator/doc/queries.graphql @@ -122,6 +122,7 @@ query consoleListAllClusters($search: SearchCluster, $pagination: CursorPaginati node { accountName clusterSvcCIDR + lastOnlineAt createdBy { userEmail userId @@ -179,6 +180,7 @@ query consoleListAllClusters($search: SearchCluster, $pagination: CursorPaginati node { id displayName + lastOnlineAt markedForDeletion metadata { name @@ -293,6 +295,7 @@ query consoleListClusters($search: SearchCluster, $pagination: CursorPaginationI id displayName markedForDeletion + lastOnlineAt metadata { name annotations @@ -809,6 +812,7 @@ query consoleGetEnvironment($name: String!) { creationTime displayName clusterName + isArchived lastUpdatedBy { userEmail userId @@ -887,6 +891,7 @@ query consoleListEnvironments($search: SearchEnvironments, $pq: CursorPagination creationTime displayName clusterName + isArchived lastUpdatedBy { userEmail userId @@ -3357,6 +3362,7 @@ query consoleListByokClusters($search: SearchCluster, $pagination: CursorPaginat node { accountName clusterSvcCIDR + lastOnlineAt createdBy { userEmail userId diff --git a/src/apps/console/routes/_main+/$account+/environments/environment-resources-v2.tsx b/src/apps/console/routes/_main+/$account+/environments/environment-resources-v2.tsx index cc35cd003..06f273c6d 100644 --- a/src/apps/console/routes/_main+/$account+/environments/environment-resources-v2.tsx +++ b/src/apps/console/routes/_main+/$account+/environments/environment-resources-v2.tsx @@ -27,6 +27,7 @@ import { useConsoleApi } from '~/console/server/gql/api-provider'; import { useReload } from '~/root/lib/client/helpers/reloader'; import { toast } from '~/components/molecule/toast'; import { handleError } from '~/root/lib/utils/common'; +import { Badge } from '~/components/atoms/badge'; import CloneEnvironment from './clone-environment'; const RESOURCE_NAME = 'environment'; @@ -58,7 +59,7 @@ type IExtraButton = { const ExtraButton = ({ item, onAction }: IExtraButton) => { const { account } = useParams(); - return item.clusterName === '' ? ( + return item.isArchived ? ( { ), }, cluster: { - render: () => , + render: () => ( + + ), }, status: { - render: () => , + render: () => + i.isArchived ? ( + Deleted + ) : ( + + ), }, // environment: { // render: () => ( @@ -226,7 +234,7 @@ const ListView = ({ items, onAction }: IResource) => { }, }, // to: `/${account}/env/${id}`, - ...(i.clusterName !== '' ? { to: `/${account}/env/${id}` } : {}), + ...(i.isArchived ? {} : { to: `/${account}/env/${id}` }), }; }), }} diff --git a/src/apps/console/routes/_main+/$account+/infra+/clusters/cluster-resources-v2.tsx b/src/apps/console/routes/_main+/$account+/infra+/clusters/cluster-resources-v2.tsx index 0250fdd41..2319137d9 100644 --- a/src/apps/console/routes/_main+/$account+/infra+/clusters/cluster-resources-v2.tsx +++ b/src/apps/console/routes/_main+/$account+/infra+/clusters/cluster-resources-v2.tsx @@ -35,7 +35,7 @@ import { useWatchReload } from '~/lib/client/helpers/socket/useWatch'; import ListV2 from '~/console/components/listV2'; import { useState } from 'react'; -import { SyncStatusV2 } from '~/console/components/sync-status'; +// import { SyncStatusV2 } from '~/console/components/sync-status'; import { Button } from '~/components/atoms/button'; import { IByocClusters } from '~/console/server/gql/queries/byok-cluster-queries'; import DeleteDialog from '~/console/components/delete-dialog'; @@ -51,6 +51,7 @@ import { Badge } from '~/components/atoms/badge'; import { Github__Com___Kloudlite___Api___Pkg___Types__SyncState as SyncStatusState } from '~/root/src/generated/gql/server'; import { ViewClusterLogs } from '~/console/components/cluster-logs-popop'; import { ensureAccountClientSide } from '~/console/server/utils/auth-utils'; +import Tooltip from '~/components/atoms/tooltip'; import HandleByokCluster from '../byok-cluster/handle-byok-cluster'; type BaseType = ExtractNodeType & { type: 'normal' }; @@ -228,22 +229,66 @@ const GetByokClusterMessage = ({ } }; -const GetByokClusterSyncStatus = ({ - syncStatusState, -}: { - syncStatusState: SyncStatusState; -}) => { - switch (syncStatusState) { - case 'UPDATED_AT_AGENT': - return Online; - case 'ERRORED_AT_AGENT': - return Not Connected; - case 'APPLIED_AT_AGENT': - return Offline; - case 'DELETING_AT_AGENT': - return Deleting; +const GetSyncStatus = ({ lastOnlioneAt }: { lastOnlioneAt: string }) => { + if (lastOnlioneAt === null) { + return Offline; + } + + const lastTime = new Date(lastOnlioneAt); + const currentTime = new Date(); + + const timeDifference = + (currentTime.getTime() - lastTime.getTime()) / (1000 * 60); + + switch (true) { + case timeDifference <= 2: + return ( + + Last seen ({Math.floor(timeDifference * 60)}s ago) + + } + > +
+ Online +
+
+ ); + case timeDifference > 2: + return ( + + {lastOnlioneAt} ({timeDifference * 60}s ago) + + } + > +
+ Offline +
+
+ ); default: - return Not Connected; + return ( + + {lastOnlioneAt} + + } + > +
+ Offline +
+
+ ); } }; @@ -441,14 +486,7 @@ const ListView = ({ items = [], onEdit, onDelete, onShowLogs }: IResource) => { ), }, status: { - render: () => - i.type === 'normal' ? ( - - ) : ( - - ), + render: () => , }, updated: { render: () => ( diff --git a/src/apps/console/routes/_main+/$account+/user-profile/_layout.tsx b/src/apps/console/routes/_main+/$account+/user-profile/_layout.tsx index 9de215e3c..e3f0609cc 100644 --- a/src/apps/console/routes/_main+/$account+/user-profile/_layout.tsx +++ b/src/apps/console/routes/_main+/$account+/user-profile/_layout.tsx @@ -43,7 +43,7 @@ const UserProfile = () => { ({ node { accountName clusterSvcCIDR + lastOnlineAt createdBy { userEmail userId diff --git a/src/apps/console/server/gql/queries/cluster-queries.ts b/src/apps/console/server/gql/queries/cluster-queries.ts index 7d212dee2..9304623f5 100644 --- a/src/apps/console/server/gql/queries/cluster-queries.ts +++ b/src/apps/console/server/gql/queries/cluster-queries.ts @@ -108,6 +108,7 @@ export const clusterQueries = (executor: IExecutor) => ({ node { accountName clusterSvcCIDR + lastOnlineAt createdBy { userEmail userId @@ -166,6 +167,7 @@ export const clusterQueries = (executor: IExecutor) => ({ node { id displayName + lastOnlineAt markedForDeletion metadata { name @@ -292,6 +294,7 @@ export const clusterQueries = (executor: IExecutor) => ({ id displayName markedForDeletion + lastOnlineAt metadata { name annotations diff --git a/src/apps/console/server/gql/queries/environment-queries.ts b/src/apps/console/server/gql/queries/environment-queries.ts index 6ef2cadc3..5832f723a 100644 --- a/src/apps/console/server/gql/queries/environment-queries.ts +++ b/src/apps/console/server/gql/queries/environment-queries.ts @@ -37,6 +37,7 @@ export const environmentQueries = (executor: IExecutor) => ({ creationTime displayName clusterName + isArchived lastUpdatedBy { userEmail userId @@ -152,6 +153,7 @@ export const environmentQueries = (executor: IExecutor) => ({ creationTime displayName clusterName + isArchived lastUpdatedBy { userEmail userId diff --git a/src/generated/gql/sdl.graphql b/src/generated/gql/sdl.graphql index 03b96e076..421347ce8 100644 --- a/src/generated/gql/sdl.graphql +++ b/src/generated/gql/sdl.graphql @@ -172,6 +172,7 @@ type BYOKCluster { displayName: String! globalVPN: String! id: ID! + lastOnlineAt: Date lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! markedForDeletion: Boolean messageQueueTopicName: String! @@ -265,6 +266,7 @@ type Cluster { globalVPN: String id: ID! kind: String + lastOnlineAt: Date lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! markedForDeletion: Boolean metadata: Metadata! @@ -598,6 +600,7 @@ type Environment { creationTime: Date! displayName: String! id: ID! + isArchived: Boolean kind: String lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! markedForDeletion: Boolean diff --git a/src/generated/gql/server.ts b/src/generated/gql/server.ts index 1f5fd138a..93be5af30 100644 --- a/src/generated/gql/server.ts +++ b/src/generated/gql/server.ts @@ -1920,6 +1920,7 @@ export type ConsoleListAllClustersQuery = { node: { accountName: string; clusterSvcCIDR: string; + lastOnlineAt?: any; creationTime: any; displayName: string; globalVPN: string; @@ -1968,6 +1969,7 @@ export type ConsoleListAllClustersQuery = { node: { id: string; displayName: string; + lastOnlineAt?: any; markedForDeletion?: boolean; creationTime: any; updateTime: any; @@ -2066,6 +2068,7 @@ export type ConsoleListClustersQuery = { id: string; displayName: string; markedForDeletion?: boolean; + lastOnlineAt?: any; creationTime: any; updateTime: any; recordVersion: number; @@ -2515,6 +2518,7 @@ export type ConsoleGetEnvironmentQuery = { creationTime: any; displayName: string; clusterName: string; + isArchived?: boolean; markedForDeletion?: boolean; updateTime: any; createdBy: { userEmail: string; userId: string; userName: string }; @@ -2596,6 +2600,7 @@ export type ConsoleListEnvironmentsQuery = { creationTime: any; displayName: string; clusterName: string; + isArchived?: boolean; markedForDeletion?: boolean; recordVersion: number; updateTime: any; @@ -4989,6 +4994,7 @@ export type ConsoleListByokClustersQuery = { node: { accountName: string; clusterSvcCIDR: string; + lastOnlineAt?: any; creationTime: any; displayName: string; globalVPN: string; From 717c80823d547d20ef00317004a738d3884d578d Mon Sep 17 00:00:00 2001 From: Piyush Kumar Date: Tue, 18 Jun 2024 20:07:37 +0530 Subject: [PATCH 02/13] add empty image for all resources as per figma --- .../components/empty-resource-images.tsx | 250 ++++++++++++++++++ src/apps/console/components/icons.tsx | 2 + src/apps/console/routes/_a+/new-team.tsx | 55 +++- .../onboarding+/$a+/attach-new-cluster.tsx | 8 +- .../env+/$environment+/apps/route.tsx | 2 + .../$environment+/config.$config/route.tsx | 9 +- .../cs+/configs._index/route.tsx | 3 +- .../cs+/secrets._index/route.tsx | 3 +- .../$environment+/external-apps/route.tsx | 2 + .../$environment+/managed-resources/route.tsx | 4 +- .../$environment+/secret.$secret/route.tsx | 8 +- .../_main+/$account+/environments/route.tsx | 2 + .../infra+/$cluster+/helm-charts/_index.tsx | 2 + .../infra+/$cluster+/nodepools/route.tsx | 2 + .../infra+/$cluster+/storage/route.tsx | 11 +- .../byok-cluster/handle-byok-cluster.tsx | 10 +- .../$account+/infra+/clusters/route.tsx | 3 + .../$account+/infra+/vpn-devices/route.tsx | 3 +- .../$account+/managed-services/route.tsx | 2 + .../msvc+/$msv+/managed-resources/route.tsx | 2 + .../settings+/cloud-providers/route.tsx | 7 +- .../settings+/image-pull-secrets/_index.tsx | 4 +- 22 files changed, 370 insertions(+), 24 deletions(-) create mode 100644 src/apps/console/components/empty-resource-images.tsx diff --git a/src/apps/console/components/empty-resource-images.tsx b/src/apps/console/components/empty-resource-images.tsx new file mode 100644 index 000000000..becb05b82 --- /dev/null +++ b/src/apps/console/components/empty-resource-images.tsx @@ -0,0 +1,250 @@ +import React from 'react'; + +export const EmptyEnvironmentImage = () => { + return ( + + + + ); +}; + +export const EmptyAppImage = () => { + return ( + + + + + + + ); +}; + +export const EmptyConfigImage = () => { + return ( + + + + ); +}; + +export const EmptyConfigEntryImage = () => { + return ( + + + + + + ); +}; + +export const EmptyManagedResourceImage = () => { + return ( + + + + ); +}; + +export const EmptyClusterImage = () => { + return ( + + + + ); +}; + +export const EmptyHelmReleaseImage = () => { + return ( + + + + ); +}; + +export const EmptyNodepoolImage = () => { + return ( + + + + + + ); +}; + +export const EmptyStorageImage = () => { + return ( + + + + + + ); +}; + +export const EmptyCloudProviderImage = () => { + return ( + + + + ); +}; diff --git a/src/apps/console/components/icons.tsx b/src/apps/console/components/icons.tsx index f2f046e03..425f63616 100644 --- a/src/apps/console/components/icons.tsx +++ b/src/apps/console/components/icons.tsx @@ -133,4 +133,6 @@ export { BellFill, UserCircle, Sliders, + FileLock, + StackSimple, } from '@jengaicons/react'; diff --git a/src/apps/console/routes/_a+/new-team.tsx b/src/apps/console/routes/_a+/new-team.tsx index 5e2a6fd85..e3ca20aa2 100644 --- a/src/apps/console/routes/_a+/new-team.tsx +++ b/src/apps/console/routes/_a+/new-team.tsx @@ -1,7 +1,7 @@ import { useNavigate } from '@remix-run/react'; import { toast } from '~/components/molecule/toast'; import { useDataFromMatches } from '~/root/lib/client/hooks/use-custom-matches'; -import useForm from '~/root/lib/client/hooks/use-form'; +import useForm, { dummyEvent } from '~/root/lib/client/hooks/use-form'; import { UserMe } from '~/root/lib/server/gql/saved-queries'; import Yup from '~/root/lib/server/helpers/yup'; import { handleError } from '~/root/lib/utils/common'; @@ -18,6 +18,7 @@ import { authBaseUrl } from '~/root/lib/configs/base-url.cjs'; import { useExternalRedirect } from '~/root/lib/client/helpers/use-redirect'; import { Button } from '~/components/atoms/button'; import useCustomSwr from '~/root/lib/client/hooks/use-custom-swr'; +import Select from '~/components/atoms/select'; const NewAccount = () => { const api = useConsoleApi(); @@ -28,10 +29,50 @@ const NewAccount = () => { return api.listAccounts({}); }); + const regions = [ + { + label: 'ap-south-1', + value: 'ap-south-1', + render: () => ( +
+
ap-south-1
+
+ ), + }, + { + label: 'eu-north-1', + value: 'eu-north-1', + render: () => ( +
+
eu-north-1
+
+ ), + }, + { + label: 'eu-west-3', + value: 'eu-west-3', + render: () => ( +
+
eu-west-3
+
+ ), + }, + { + label: 'eu-west-2', + value: 'eu-west-2', + render: () => ( +
+
eu-west-2
+
+ ), + }, + ]; + const { values, handleChange, errors, isLoading, handleSubmit } = useForm({ initialValues: { name: '', displayName: '', + region: regions[0].value, isNameError: false, }, validationSchema: Yup.object({ @@ -110,6 +151,18 @@ const NewAccount = () => { handleChange={handleChange} nameErrorLabel="isNameError" /> + {/* { handleChange('region')(dummyEvent(value)); }} - options={async () => regions} - /> */} + options={async () => [ + ...((klRegionData && klRegionData) || []), + ]} + error={!!errors.region} + message={errors.region} + loading={klRegionIsLoading} + /> { nameErrorLabel="isNameError" /> { handleChange('visibilityMode')(dummyEvent(val)); @@ -105,11 +105,14 @@ const AttachNewCluster = () => { - {values.visibilityMode === false - ? 'Public mode assumes cluster is accessible to public internet' - : 'In Private mode traffic is routed via a kloudlite gateway'} - +
+ + Private clusters are those who are hosted behind a NAT. + + + Ex: Cluster running on your local machine + +
} /> diff --git a/src/apps/console/routes/_main+/$account+/infra+/clusters/cluster-resources-v2.tsx b/src/apps/console/routes/_main+/$account+/infra+/clusters/cluster-resources-v2.tsx index b2854d7dd..9ff0257d3 100644 --- a/src/apps/console/routes/_main+/$account+/infra+/clusters/cluster-resources-v2.tsx +++ b/src/apps/console/routes/_main+/$account+/infra+/clusters/cluster-resources-v2.tsx @@ -104,12 +104,10 @@ const ByokInstructionsPopup = ({ show, item, onClose, - clusterName, }: { show: boolean; item: CombinedBaseType; onClose: () => void; - clusterName: string; }) => { const params = useParams(); ensureAccountClientSide(params); @@ -181,7 +179,6 @@ const ByokButton = ({ item }: { item: CombinedBaseType }) => {
{show ? ( { setShow(false); diff --git a/src/apps/console/routes/_main+/$account+/settings+/general.tsx b/src/apps/console/routes/_main+/$account+/settings+/general.tsx index 701430675..5be042c33 100644 --- a/src/apps/console/routes/_main+/$account+/settings+/general.tsx +++ b/src/apps/console/routes/_main+/$account+/settings+/general.tsx @@ -46,6 +46,7 @@ export const updateAccount = async ({ name: parseName(data), }, contactEmail: data.contactEmail, + kloudliteGatewayRegion: data.kloudliteGatewayRegion, }, }); if (e) { @@ -128,11 +129,37 @@ const SettingGeneral = () => { } />{' '}
- +
+
+ +
+
+ + +
+ } + disabled + /> +
+
; @@ -32,6 +34,21 @@ export const accountQueries = (executor: IExecutor) => ({ vars(_: ConsoleCreateAccountMutationVariables) {}, } ), + getAvailableKloudliteRegions: executor( + gql` + query Accounts_availableKloudliteRegions { + accounts_availableKloudliteRegions { + displayName + id + } + } + `, + { + transformer: (data: ConsoleGetAvailableKloudliteRegionsQuery) => + data.accounts_availableKloudliteRegions, + vars(_: ConsoleGetAvailableKloudliteRegionsQueryVariables) {}, + } + ), listAccounts: executor( gql` @@ -44,6 +61,7 @@ export const accountQueries = (executor: IExecutor) => ({ } updateTime displayName + kloudliteGatewayRegion } } `, @@ -79,6 +97,7 @@ export const accountQueries = (executor: IExecutor) => ({ updateTime contactEmail displayName + kloudliteGatewayRegion } } `, diff --git a/src/generated/gql/sdl.graphql b/src/generated/gql/sdl.graphql index 421347ce8..2939e4473 100644 --- a/src/generated/gql/sdl.graphql +++ b/src/generated/gql/sdl.graphql @@ -11,6 +11,7 @@ type Account { displayName: String! id: ID! isActive: Boolean + kloudliteGatewayRegion: String! lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! logo: String markedForDeletion: Boolean @@ -24,6 +25,7 @@ input AccountIn { contactEmail: String displayName: String! isActive: Boolean + kloudliteGatewayRegion: String! logo: String metadata: MetadataIn } @@ -91,6 +93,16 @@ type AppPaginatedRecords { totalCount: Int! } +type AvailableKloudliteRegion { + displayName: String! + id: String! +} + +input AvailableKloudliteRegionIn { + displayName: String! + id: String! +} + type Build { buildClusterName: String! createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! @@ -3904,6 +3916,7 @@ input PortIn { scalar ProviderDetail type Query { + accounts_availableKloudliteRegions: [AvailableKloudliteRegion!] accounts_checkNameAvailability(name: String!): AccountsCheckNameAvailabilityOutput! accounts_ensureKloudliteRegistryPullSecrets(accountName: String!): Boolean! accounts_getAccount(accountName: String!): Account diff --git a/src/generated/gql/server.ts b/src/generated/gql/server.ts index 93be5af30..a16dee36c 100644 --- a/src/generated/gql/server.ts +++ b/src/generated/gql/server.ts @@ -398,6 +398,7 @@ export type AccountIn = { contactEmail?: InputMaybe; displayName: Scalars['String']['input']; isActive?: InputMaybe; + kloudliteGatewayRegion: Scalars['String']['input']; logo?: InputMaybe; metadata?: InputMaybe; }; @@ -1316,6 +1317,11 @@ export type AccountMembershipIn = { userId: Scalars['String']['input']; }; +export type AvailableKloudliteRegionIn = { + displayName: Scalars['String']['input']; + id: Scalars['String']['input']; +}; + export type BuildRunIn = { displayName: Scalars['String']['input']; }; @@ -1833,6 +1839,17 @@ export type ConsoleCreateAccountMutation = { accounts_createAccount: { displayName: string }; }; +export type ConsoleGetAvailableKloudliteRegionsQueryVariables = Exact<{ + [key: string]: never; +}>; + +export type ConsoleGetAvailableKloudliteRegionsQuery = { + accounts_availableKloudliteRegions?: Array<{ + displayName: string; + id: string; + }>; +}; + export type ConsoleListAccountsQueryVariables = Exact<{ [key: string]: never }>; export type ConsoleListAccountsQuery = { @@ -1840,6 +1857,7 @@ export type ConsoleListAccountsQuery = { id: string; updateTime: any; displayName: string; + kloudliteGatewayRegion: string; metadata?: { name: string; annotations?: any }; }>; }; @@ -1862,6 +1880,7 @@ export type ConsoleGetAccountQuery = { updateTime: any; contactEmail?: string; displayName: string; + kloudliteGatewayRegion: string; metadata?: { name: string; annotations?: any }; }; }; From 1be6407ec4b83931448d51e38fd3e63fc7a222ea Mon Sep 17 00:00:00 2001 From: Piyush Kumar Date: Wed, 19 Jun 2024 16:25:31 +0530 Subject: [PATCH 10/13] fix search functionality in infra resources --- src/apps/console/routes/_a+/teams.tsx | 12 ++- .../external-apps/handle-external-app.tsx | 2 +- .../$environment+/managed-resources/route.tsx | 2 + .../$environment+/managed-resources/tools.tsx | 24 +++--- .../_main+/$account+/environments/tools.tsx | 1 + .../$account+/infra+/clusters/tools.tsx | 77 ++++++++++--------- .../$account+/managed-services/tools.tsx | 36 +++++---- .../msvc+/$msv+/managed-resources/route.tsx | 8 +- .../msvc+/$msv+/managed-resources/tools.tsx | 24 +++--- 9 files changed, 97 insertions(+), 89 deletions(-) diff --git a/src/apps/console/routes/_a+/teams.tsx b/src/apps/console/routes/_a+/teams.tsx index 3b77d09a0..94a135156 100644 --- a/src/apps/console/routes/_a+/teams.tsx +++ b/src/apps/console/routes/_a+/teams.tsx @@ -228,11 +228,15 @@ const Accounts = () => { key: generateKey(name, index), className: 'flex-1', render: () => ( -
+
-
- {displayName}{' '} - #{name} +
+ + {displayName} + {' '} + + #{name} +
), diff --git a/src/apps/console/routes/_main+/$account+/env+/$environment+/external-apps/handle-external-app.tsx b/src/apps/console/routes/_main+/$account+/env+/$environment+/external-apps/handle-external-app.tsx index 17d6f0e29..a06014b93 100644 --- a/src/apps/console/routes/_main+/$account+/env+/$environment+/external-apps/handle-external-app.tsx +++ b/src/apps/console/routes/_main+/$account+/env+/$environment+/external-apps/handle-external-app.tsx @@ -181,7 +181,7 @@ const HandleExternalApp = (props: IDialog) => { return ( setVisible(v)}> - {isUpdate ? 'Edit External Name' : 'Add External Name'} + {isUpdate ? 'Edit External App' : 'Add External App'} {(!isUpdate || (isUpdate && props.data)) && } diff --git a/src/apps/console/routes/_main+/$account+/env+/$environment+/managed-resources/route.tsx b/src/apps/console/routes/_main+/$account+/env+/$environment+/managed-resources/route.tsx index ca139debb..7aee47738 100644 --- a/src/apps/console/routes/_main+/$account+/env+/$environment+/managed-resources/route.tsx +++ b/src/apps/console/routes/_main+/$account+/env+/$environment+/managed-resources/route.tsx @@ -11,6 +11,7 @@ import { Button } from '~/components/atoms/button'; import { useState } from 'react'; import { IAccountContext } from '~/console/routes/_main+/$account+/_layout'; import { EmptyManagedResourceImage } from '~/console/components/empty-resource-images'; +import { getSearch } from '~/console/server/utils/common'; import Tools from './tools'; import ManagedResourceResourcesV2 from './managed-resources-resource-v2'; import HandleManagedResourceV2 from './handle-managed-resource-v2'; @@ -22,6 +23,7 @@ export const loader = (ctx: IRemixCtx) => { ctx.request ).listManagedResources({ search: { + ...getSearch(ctx), envName: { matchType: 'exact', exact: environment, diff --git a/src/apps/console/routes/_main+/$account+/env+/$environment+/managed-resources/tools.tsx b/src/apps/console/routes/_main+/$account+/env+/$environment+/managed-resources/tools.tsx index 263c9bd9c..992555b0d 100644 --- a/src/apps/console/routes/_main+/$account+/env+/$environment+/managed-resources/tools.tsx +++ b/src/apps/console/routes/_main+/$account+/env+/$environment+/managed-resources/tools.tsx @@ -7,18 +7,18 @@ const Tools = ({ viewMode, setViewMode }: IModeProps) => { const options = useMemo( () => [ - { - name: 'Status', - type: 'text', - search: false, - dataFetcher: async () => { - return [ - { content: 'Active', value: 'active' }, - { content: 'Freezed', value: 'freezed' }, - { content: 'Archived', value: 'archived' }, - ]; - }, - }, + // { + // name: 'Status', + // type: 'text', + // search: false, + // dataFetcher: async () => { + // return [ + // { content: 'Active', value: 'active' }, + // { content: 'Freezed', value: 'freezed' }, + // { content: 'Archived', value: 'archived' }, + // ]; + // }, + // }, ], [searchParams] ); diff --git a/src/apps/console/routes/_main+/$account+/environments/tools.tsx b/src/apps/console/routes/_main+/$account+/environments/tools.tsx index 3bfdc3c7c..ecdcb2349 100644 --- a/src/apps/console/routes/_main+/$account+/environments/tools.tsx +++ b/src/apps/console/routes/_main+/$account+/environments/tools.tsx @@ -4,6 +4,7 @@ import CommonTools from '~/console/components/common-tools'; const Tools = () => { const [searchParams] = useSearchParams(); + console.log('ee params', searchParams); const options = useMemo(() => [], [searchParams]); diff --git a/src/apps/console/routes/_main+/$account+/infra+/clusters/tools.tsx b/src/apps/console/routes/_main+/$account+/infra+/clusters/tools.tsx index ff565f180..f519cdd0f 100644 --- a/src/apps/console/routes/_main+/$account+/infra+/clusters/tools.tsx +++ b/src/apps/console/routes/_main+/$account+/infra+/clusters/tools.tsx @@ -53,23 +53,22 @@ const FilterByCLusterType = ({ onChange, value }: IFilterByClusterType) => { const Tools = ({ onChange, value }: IFilterByClusterType) => { const [searchParams] = useSearchParams(); - + console.log('cc params', searchParams); const options = useMemo( () => [ - { - name: 'Provider', - type: 'cloudProviderName', - search: false, - dataFetcher: async () => { - return [ - { content: 'Amazon Web Services', value: 'aws' }, - { content: 'Digital Ocean', value: 'do' }, - { content: 'Google Cloud Platform', value: 'gcp' }, - { content: 'Microsoft Azure', value: 'azure' }, - ]; - }, - }, - + // { + // name: 'Provider', + // type: 'cloudProviderName', + // search: false, + // dataFetcher: async () => { + // return [ + // { content: 'Amazon Web Services', value: 'aws' }, + // { content: 'Digital Ocean', value: 'do' }, + // { content: 'Google Cloud Platform', value: 'gcp' }, + // { content: 'Microsoft Azure', value: 'azure' }, + // ]; + // }, + // }, // { // name: 'Region', // type: 'region', @@ -81,37 +80,39 @@ const Tools = ({ onChange, value }: IFilterByClusterType) => { // ]; // }, // }, - - { - name: 'Status', - type: 'isReady', - search: false, - dataFetcher: async () => { - return [ - { content: 'Running', value: true }, - { content: 'Error', value: false }, - // { content: 'Freezed', value: false, type: 'freezed' }, - ]; - }, - }, + // { + // name: 'Status', + // type: 'isReady', + // search: false, + // dataFetcher: async () => { + // return [ + // { content: 'Running', value: true }, + // { content: 'Error', value: false }, + // // { content: 'Freezed', value: false, type: 'freezed' }, + // ]; + // }, + // }, ], [searchParams] ); - return ( { - console.log(e); - onChange?.(e); - }} - value={value} - /> - } + // commonToolPrefix={ + // { + // console.log(e); + // onChange?.(e); + // }} + // value={value} + // /> + // } /> ); + + // const [searchParams] = useSearchParams(); + + // const options = useMemo(() => [], [searchParams]); }; export default Tools; diff --git a/src/apps/console/routes/_main+/$account+/managed-services/tools.tsx b/src/apps/console/routes/_main+/$account+/managed-services/tools.tsx index 263c9bd9c..c8ed144e2 100644 --- a/src/apps/console/routes/_main+/$account+/managed-services/tools.tsx +++ b/src/apps/console/routes/_main+/$account+/managed-services/tools.tsx @@ -5,23 +5,25 @@ import CommonTools, { IModeProps } from '~/console/components/common-tools'; const Tools = ({ viewMode, setViewMode }: IModeProps) => { const [searchParams] = useSearchParams(); - const options = useMemo( - () => [ - { - name: 'Status', - type: 'text', - search: false, - dataFetcher: async () => { - return [ - { content: 'Active', value: 'active' }, - { content: 'Freezed', value: 'freezed' }, - { content: 'Archived', value: 'archived' }, - ]; - }, - }, - ], - [searchParams] - ); + const options = useMemo(() => [], [searchParams]); + + // const options = useMemo( + // () => [ + // { + // name: 'Status', + // type: 'text', + // search: false, + // dataFetcher: async () => { + // return [ + // { content: 'Active', value: 'active' }, + // { content: 'Freezed', value: 'freezed' }, + // { content: 'Archived', value: 'archived' }, + // ]; + // }, + // }, + // ], + // [searchParams] + // ); return ; }; diff --git a/src/apps/console/routes/_main+/$account+/msvc+/$msv+/managed-resources/route.tsx b/src/apps/console/routes/_main+/$account+/msvc+/$msv+/managed-resources/route.tsx index da6422bfa..ce13413ac 100644 --- a/src/apps/console/routes/_main+/$account+/msvc+/$msv+/managed-resources/route.tsx +++ b/src/apps/console/routes/_main+/$account+/msvc+/$msv+/managed-resources/route.tsx @@ -10,6 +10,7 @@ import fake from '~/root/fake-data-generator/fake'; import { Button } from '~/components/atoms/button'; import { IAccountContext } from '~/console/routes/_main+/$account+/_layout'; import { EmptyManagedResourceImage } from '~/console/components/empty-resource-images'; +import { getSearch } from '~/console/server/utils/common'; import Tools from './tools'; import ManagedResourceResourcesV2 from './managed-resources-resource-v2'; @@ -20,13 +21,10 @@ export const loader = (ctx: IRemixCtx) => { ctx.request ).listManagedResources({ search: { - managedServiceName: { - matchType: 'exact', - exact: msv, - }, + ...getSearch(ctx), + managedServiceName: { matchType: 'exact', exact: msv }, }, }); - if (mErrors) { throw mErrors[0]; } diff --git a/src/apps/console/routes/_main+/$account+/msvc+/$msv+/managed-resources/tools.tsx b/src/apps/console/routes/_main+/$account+/msvc+/$msv+/managed-resources/tools.tsx index 263c9bd9c..992555b0d 100644 --- a/src/apps/console/routes/_main+/$account+/msvc+/$msv+/managed-resources/tools.tsx +++ b/src/apps/console/routes/_main+/$account+/msvc+/$msv+/managed-resources/tools.tsx @@ -7,18 +7,18 @@ const Tools = ({ viewMode, setViewMode }: IModeProps) => { const options = useMemo( () => [ - { - name: 'Status', - type: 'text', - search: false, - dataFetcher: async () => { - return [ - { content: 'Active', value: 'active' }, - { content: 'Freezed', value: 'freezed' }, - { content: 'Archived', value: 'archived' }, - ]; - }, - }, + // { + // name: 'Status', + // type: 'text', + // search: false, + // dataFetcher: async () => { + // return [ + // { content: 'Active', value: 'active' }, + // { content: 'Freezed', value: 'freezed' }, + // { content: 'Archived', value: 'archived' }, + // ]; + // }, + // }, ], [searchParams] ); From 45084aac57dcb266e1f7cedc07b7addfbcb1cd6a Mon Sep 17 00:00:00 2001 From: Karthik Th Date: Wed, 19 Jun 2024 16:25:53 +0530 Subject: [PATCH 11/13] wip --- src/apps/devdoc/app/layout/theme.tsx | 10 +++++++--- ...inerisation-reviving-legacy-apps-for-developers.mdx | 4 ++-- ...ifying-7-common-misconceptions-about-containers.mdx | 6 +++--- .../devdoc/pages/blog/remote-local-environments.mdx | 4 ++-- ...e-of-open-source-in-modern-software-development.mdx | 6 +++--- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/apps/devdoc/app/layout/theme.tsx b/src/apps/devdoc/app/layout/theme.tsx index c33ce0e8d..88bc58477 100644 --- a/src/apps/devdoc/app/layout/theme.tsx +++ b/src/apps/devdoc/app/layout/theme.tsx @@ -110,10 +110,14 @@ const Main = ({ children, pageOpts }: NextraThemeLayoutProps) => { return (
-
-
+
+
Kloudlite is live on Product Hunt!   - + Check out the launch and share your feedback!
diff --git a/src/apps/devdoc/pages/blog/containerisation-reviving-legacy-apps-for-developers.mdx b/src/apps/devdoc/pages/blog/containerisation-reviving-legacy-apps-for-developers.mdx index c9e65c8ff..850602b97 100644 --- a/src/apps/devdoc/pages/blog/containerisation-reviving-legacy-apps-for-developers.mdx +++ b/src/apps/devdoc/pages/blog/containerisation-reviving-legacy-apps-for-developers.mdx @@ -1,7 +1,7 @@ --- title: "Containerisation: Reviving Legacy Apps for Developers" -author: "Karthik Thirumalasetti" -authorEmail: "karthik001@me.com" +author: "Anshuman Bhaskar" +authorEmail: "nxtcoder17@gmail.com" gravatarHash: "3613c388f0507bbbd89a8a6e7a0f3f79bbe49a779d34eafdaede663b3f2a2542" date: "2024-04-08" category: "engineering" diff --git a/src/apps/devdoc/pages/blog/demystifying-7-common-misconceptions-about-containers.mdx b/src/apps/devdoc/pages/blog/demystifying-7-common-misconceptions-about-containers.mdx index 779ddb0fa..4f521d60c 100644 --- a/src/apps/devdoc/pages/blog/demystifying-7-common-misconceptions-about-containers.mdx +++ b/src/apps/devdoc/pages/blog/demystifying-7-common-misconceptions-about-containers.mdx @@ -1,8 +1,8 @@ --- title: "Demystifying 7 Common Misconceptions About Containers" -author: "Karthik Thirumalasetti" -authorEmail: "karthik001@me.com" -gravatarHash: "3613c388f0507bbbd89a8a6e7a0f3f79bbe49a779d34eafdaede663b3f2a2542" +author: "Piyush Kumar" +authorEmail: "nxtcoder19@gmail.com" +gravatarHash: "B91AC7FD82E97D96ED741FFA1B39DB6884ED940FAF598FC85F74CD57EE87AA76" date: "2024-04-09" category: "engineering" tags: [Containers, Misconception, DevOps, Application Modernization] diff --git a/src/apps/devdoc/pages/blog/remote-local-environments.mdx b/src/apps/devdoc/pages/blog/remote-local-environments.mdx index 1cfce919a..1f6d7c3d2 100644 --- a/src/apps/devdoc/pages/blog/remote-local-environments.mdx +++ b/src/apps/devdoc/pages/blog/remote-local-environments.mdx @@ -1,7 +1,7 @@ --- title: "What Are Remote Local Environments?" -author: "Karthik Thirumalasetti" -authorEmail: "karthik001@me.com" +author: "Aditya Sharma" +authorEmail: "aditya@me.com" gravatarHash: "3613c388f0507bbbd89a8a6e7a0f3f79bbe49a779d34eafdaede663b3f2a2542" date: "2024-06-04" category: "engineering" diff --git a/src/apps/devdoc/pages/blog/role-of-open-source-in-modern-software-development.mdx b/src/apps/devdoc/pages/blog/role-of-open-source-in-modern-software-development.mdx index f94aef30f..102fda066 100644 --- a/src/apps/devdoc/pages/blog/role-of-open-source-in-modern-software-development.mdx +++ b/src/apps/devdoc/pages/blog/role-of-open-source-in-modern-software-development.mdx @@ -1,8 +1,8 @@ --- title: "The Role of Open Source in Modern Software Development" -author: "Karthik Thirumalasetti" -authorEmail: "karthik001@me.com" -gravatarHash: "3613c388f0507bbbd89a8a6e7a0f3f79bbe49a779d34eafdaede663b3f2a2542" +author: "Pavani Katuboyina" +authorEmail: "pavani.k16@fms.edu" +gravatarHash: "E216535F9246F72AD959E59B724AFBFA102B8FEF6E797A0C86035236228DDDD5" date: "2024-06-04" category: "engineering" tags: [Containerization, Kubernetes, Legacy Modernization] From 082e91782983eaea5473e30df073f5f99a17a771 Mon Sep 17 00:00:00 2001 From: Piyush Kumar Date: Thu, 20 Jun 2024 15:31:09 +0530 Subject: [PATCH 12/13] minor refactoring --- .../console/page-components/app/general.tsx | 2 +- .../env+/$environment+/new-app/app-detail.tsx | 4 +- src/apps/console/server/utils/constants.ts | 2 + src/apps/devdoc/pnpm-lock.yaml | 131 +++++++++--------- 4 files changed, 73 insertions(+), 66 deletions(-) diff --git a/src/apps/console/page-components/app/general.tsx b/src/apps/console/page-components/app/general.tsx index 476c89318..18482bd02 100644 --- a/src/apps/console/page-components/app/general.tsx +++ b/src/apps/console/page-components/app/general.tsx @@ -148,7 +148,7 @@ const AppGeneral = ({ mode = 'new' }: { mode: 'edit' | 'new' }) => { name: Yup.string().required(), displayName: Yup.string().required(), imageUrl: Yup.string().matches( - /^\w(\w|[-/])+?(?::(\w|[-])+)?\w$/, + constants.dockerImageFormatRegex, 'Invalid image format' ), manualRepo: Yup.string().when( diff --git a/src/apps/console/routes/_main+/$account+/env+/$environment+/new-app/app-detail.tsx b/src/apps/console/routes/_main+/$account+/env+/$environment+/new-app/app-detail.tsx index 4218d4f3e..9506ad877 100644 --- a/src/apps/console/routes/_main+/$account+/env+/$environment+/new-app/app-detail.tsx +++ b/src/apps/console/routes/_main+/$account+/env+/$environment+/new-app/app-detail.tsx @@ -101,13 +101,13 @@ const AppDetail = () => { name: Yup.string().required(), displayName: Yup.string().required(), imageUrl: Yup.string().matches( - /^\w(\w|[-/])+?(?::(\w|[-])+)?\w$/, + constants.dockerImageFormatRegex, 'Invalid image format' ), manualRepo: Yup.string().when( ['imageUrl', 'imageMode'], ([imageUrl, imageMode], schema) => { - const regex = /^\w(\w|[-/])+?(?::(\w|[-])+)?\w$/; + const regex = constants.dockerImageFormatRegex; if (imageMode === 'git') { return schema; } diff --git a/src/apps/console/server/utils/constants.ts b/src/apps/console/server/utils/constants.ts index 678c073df..0c7b19033 100644 --- a/src/apps/console/server/utils/constants.ts +++ b/src/apps/console/server/utils/constants.ts @@ -8,4 +8,6 @@ export const constants = { `${registryHost}/${account}/kloudlite-apps`, defaultAppRepoNameOnly: 'kloudlite-apps', metadot: '·', + 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,})?$/, }; diff --git a/src/apps/devdoc/pnpm-lock.yaml b/src/apps/devdoc/pnpm-lock.yaml index adf8a0a6d..d83f8a30a 100644 --- a/src/apps/devdoc/pnpm-lock.yaml +++ b/src/apps/devdoc/pnpm-lock.yaml @@ -6,14 +6,14 @@ settings: dependencies: '@firebase/firestore': - specifier: ^4.6.2 + specifier: ^4.6.3 version: 4.6.3(@firebase/app@0.10.5) '@jengaicons/react': - specifier: ^1.3.0 + specifier: ^1.7.0 version: 1.7.0(react@18.3.1) '@mdxeditor/editor': - specifier: ^2.20.4 - version: 2.20.7(@codemirror/language@6.10.2)(@lezer/common@1.2.1)(@lezer/highlight@1.2.0)(@types/react@18.3.3)(react-dom@18.3.1)(react@18.3.1)(yjs@13.6.17) + specifier: ^2.20.7 + version: 2.20.7(@codemirror/language@6.10.2)(@lezer/common@1.2.1)(@lezer/highlight@1.2.0)(@types/react@18.3.3)(react-dom@18.3.1)(react@18.3.1)(yjs@13.6.18) '@radix-ui/react-accordion': specifier: ^1.1.2 version: 1.1.2(@types/react@18.3.3)(react-dom@18.3.1)(react@18.3.1) @@ -48,13 +48,13 @@ dependencies: specifier: ^5.0.0 version: 5.0.0 firebase: - specifier: ^10.8.0 + specifier: ^10.12.2 version: 10.12.2 flexsearch: - specifier: ^0.7.31 + specifier: ^0.7.43 version: 0.7.43 framer-motion: - specifier: ^10.16.16 + specifier: ^10.18.0 version: 10.18.0(react-dom@18.3.1)(react@18.3.1) git-url-parse: specifier: ^13.1.1 @@ -72,31 +72,31 @@ dependencies: specifier: file:../../design-system/out/kl-design-system-1.0.1.tgz version: file:../../design-system/out/kl-design-system-1.0.1.tgz(framer-motion@10.18.0)(react-dom@18.3.1)(react@18.3.1) next: - specifier: ^14.0.4 + specifier: ^14.2.4 version: 14.2.4(react-dom@18.3.1)(react@18.3.1) next-seo: - specifier: ^6.4.0 + specifier: ^6.5.0 version: 6.5.0(next@14.2.4)(react-dom@18.3.1)(react@18.3.1) next-themes: specifier: ^0.2.1 version: 0.2.1(next@14.2.4)(react-dom@18.3.1)(react@18.3.1) nextra: - specifier: ^2.13.2 + specifier: ^2.13.4 version: 2.13.4(next@14.2.4)(react-dom@18.3.1)(react@18.3.1) nextra-theme-docs: - specifier: ^2.13.2 + specifier: ^2.13.4 version: 2.13.4(next@14.2.4)(nextra@2.13.4)(react-dom@18.3.1)(react@18.3.1) react: - specifier: ^18.2.0 + specifier: ^18.3.1 version: 18.3.1 react-dom: - specifier: ^18.2.0 + specifier: ^18.3.1 version: 18.3.1(react@18.3.1) react-fast-marquee: specifier: ^1.6.4 version: 1.6.4(react-dom@18.3.1)(react@18.3.1) react-hook-form: - specifier: ^7.51.5 + specifier: ^7.52.0 version: 7.52.0(react@18.3.1) react-slick: specifier: ^0.30.2 @@ -114,7 +114,7 @@ dependencies: specifier: ^1.8.1 version: 1.8.1(jquery@3.7.1) zod: - specifier: ^3.22.4 + specifier: ^3.23.8 version: 3.23.8 devDependencies: @@ -125,25 +125,25 @@ devDependencies: specifier: 20.8.4 version: 20.8.4 '@types/react': - specifier: ^18.2.46 + specifier: ^18.3.3 version: 18.3.3 '@typescript-eslint/eslint-plugin': - specifier: ^6.16.0 + specifier: ^6.21.0 version: 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.57.0)(typescript@5.2.2) '@typescript-eslint/parser': - specifier: ^6.16.0 + specifier: ^6.21.0 version: 6.21.0(eslint@8.57.0)(typescript@5.2.2) autoprefixer: - specifier: ^10.4.16 + specifier: ^10.4.19 version: 10.4.19(postcss@8.4.38) eslint: - specifier: ^8.56.0 + specifier: ^8.57.0 version: 8.57.0 eslint-config-airbnb: specifier: 19.0.4 - version: 19.0.4(eslint-plugin-import@2.29.1)(eslint-plugin-jsx-a11y@6.8.0)(eslint-plugin-react-hooks@4.6.2)(eslint-plugin-react@7.34.2)(eslint@8.57.0) + version: 19.0.4(eslint-plugin-import@2.29.1)(eslint-plugin-jsx-a11y@6.8.0)(eslint-plugin-react-hooks@4.6.2)(eslint-plugin-react@7.34.3)(eslint@8.57.0) eslint-config-next: - specifier: ^14.0.4 + specifier: ^14.2.4 version: 14.2.4(eslint@8.57.0)(typescript@5.2.2) eslint-config-prettier: specifier: ^8.10.0 @@ -164,28 +164,28 @@ devDependencies: specifier: ^6.8.0 version: 6.8.0(eslint@8.57.0) eslint-plugin-mdx: - specifier: ^3.1.1 + specifier: ^3.1.5 version: 3.1.5(eslint@8.57.0) eslint-plugin-prefer-arrow-functions: - specifier: ^3.2.4 + specifier: ^3.3.2 version: 3.3.2(eslint@8.57.0) eslint-plugin-prettier: specifier: ^4.2.1 version: 4.2.1(eslint-config-prettier@8.10.0)(eslint@8.57.0)(prettier@2.8.8) eslint-plugin-react: - specifier: ^7.33.2 - version: 7.34.2(eslint@8.57.0) + specifier: ^7.34.3 + version: 7.34.3(eslint@8.57.0) eslint-plugin-react-hooks: - specifier: ^4.6.0 + specifier: ^4.6.2 version: 4.6.2(eslint@8.57.0) postcss: - specifier: ^8.4.32 + specifier: ^8.4.38 version: 8.4.38 prettier: specifier: ^2.8.8 version: 2.8.8 tailwindcss: - specifier: ^3.4.0 + specifier: ^3.4.4 version: 3.4.4 typescript: specifier: 5.2.2 @@ -231,8 +231,8 @@ packages: resolution: {integrity: sha512-s3jaWicZd0pkP0jf5ysyHUI/RE7MHos6qlToFcGWXVp+ykHOy77OUMrfbgJ9it2C5bow7OIQwYYaHjk9XlBQ2A==} dev: false - /@codemirror/autocomplete@6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.1)(@lezer/common@1.2.1): - resolution: {integrity: sha512-MjfDrHy0gHKlPWsvSsikhO1+BOh+eBHNgfH1OXs1+DAf30IonQldgMM3kxLDTG9ktE7kDLaA1j/l7KMPA4KNfw==} + /@codemirror/autocomplete@6.16.3(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.1)(@lezer/common@1.2.1): + resolution: {integrity: sha512-Vl/tIeRVVUCRDuOG48lttBasNQu8usGgXQawBXI7WJAiUDSFOfzflmEsZFZo48mAvAaa4FZ/4/yLLxFtdJaKYA==} peerDependencies: '@codemirror/language': ^6.0.0 '@codemirror/state': ^6.0.0 @@ -257,7 +257,7 @@ packages: /@codemirror/lang-css@6.2.1(@codemirror/view@6.28.1): resolution: {integrity: sha512-/UNWDNV5Viwi/1lpr/dIXJNWiwDxpw13I4pTUAsNxZdg6E0mI2kTQb0P2iHczg1Tu+H4EBgJR+hYhKiHKko7qg==} dependencies: - '@codemirror/autocomplete': 6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.1)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.16.3(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.1)(@lezer/common@1.2.1) '@codemirror/language': 6.10.2 '@codemirror/state': 6.4.1 '@lezer/common': 1.2.1 @@ -269,7 +269,7 @@ packages: /@codemirror/lang-html@6.4.9: resolution: {integrity: sha512-aQv37pIMSlueybId/2PVSP6NPnmurFDVmZwzc7jszd2KAF8qd4VBbvNYPXWQq90WIARjsdVkPbw29pszmHws3Q==} dependencies: - '@codemirror/autocomplete': 6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.1)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.16.3(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.1)(@lezer/common@1.2.1) '@codemirror/lang-css': 6.2.1(@codemirror/view@6.28.1) '@codemirror/lang-javascript': 6.2.2 '@codemirror/language': 6.10.2 @@ -283,9 +283,9 @@ packages: /@codemirror/lang-javascript@6.2.2: resolution: {integrity: sha512-VGQfY+FCc285AhWuwjYxQyUQcYurWlxdKYT4bqwr3Twnd5wP5WSeu52t4tvvuWmljT4EmgEgZCqSieokhtY8hg==} dependencies: - '@codemirror/autocomplete': 6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.1)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.16.3(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.1)(@lezer/common@1.2.1) '@codemirror/language': 6.10.2 - '@codemirror/lint': 6.8.0 + '@codemirror/lint': 6.8.1 '@codemirror/state': 6.4.1 '@codemirror/view': 6.28.1 '@lezer/common': 1.2.1 @@ -295,7 +295,7 @@ packages: /@codemirror/lang-markdown@6.2.5: resolution: {integrity: sha512-Hgke565YcO4fd9pe2uLYxnMufHO5rQwRr+AAhFq8ABuhkrjyX8R5p5s+hZUTdV60O0dMRjxKhBLxz8pu/MkUVA==} dependencies: - '@codemirror/autocomplete': 6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.1)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.16.3(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.1)(@lezer/common@1.2.1) '@codemirror/lang-html': 6.4.9 '@codemirror/language': 6.10.2 '@codemirror/state': 6.4.1 @@ -315,8 +315,8 @@ packages: style-mod: 4.1.2 dev: false - /@codemirror/lint@6.8.0: - resolution: {integrity: sha512-lsFofvaw0lnPRJlQylNsC4IRt/1lI4OD/yYslrSGVndOJfStc58v+8p9dgGiD90ktOfL7OhBWns1ZETYgz0EJA==} + /@codemirror/lint@6.8.1: + resolution: {integrity: sha512-IZ0Y7S4/bpaunwggW2jYqwLuHj0QtESf5xcROewY6+lDNwZ/NzvR4t+vpYgg9m7V8UXLPYqG+lu3DF470E5Oxg==} dependencies: '@codemirror/state': 6.4.1 '@codemirror/view': 6.28.1 @@ -376,7 +376,7 @@ packages: react: ^16.8.0 || ^17 || ^18 react-dom: ^16.8.0 || ^17 || ^18 dependencies: - '@codemirror/autocomplete': 6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.1)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.16.3(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.1)(@lezer/common@1.2.1) '@codemirror/commands': 6.6.0 '@codemirror/lang-css': 6.2.1(@codemirror/view@6.28.1) '@codemirror/lang-html': 6.4.9 @@ -1164,7 +1164,7 @@ packages: lexical: 0.14.5 dev: false - /@lexical/react@0.14.5(react-dom@18.3.1)(react@18.3.1)(yjs@13.6.17): + /@lexical/react@0.14.5(react-dom@18.3.1)(react@18.3.1)(yjs@13.6.18): resolution: {integrity: sha512-dn7J07nxG6CZqm5jhLjhkQlJWMQrdm4BGTEF6/MYog5uUUwqDwBdVnZ3hwadibupAmNT7+Xia+4vrp0oJWM1lQ==} peerDependencies: react: '>=17.x' @@ -1187,7 +1187,7 @@ packages: '@lexical/table': 0.14.5 '@lexical/text': 0.14.5 '@lexical/utils': 0.14.5 - '@lexical/yjs': 0.14.5(yjs@13.6.17) + '@lexical/yjs': 0.14.5(yjs@13.6.18) lexical: 0.14.5 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -1233,14 +1233,14 @@ packages: lexical: 0.14.5 dev: false - /@lexical/yjs@0.14.5(yjs@13.6.17): + /@lexical/yjs@0.14.5(yjs@13.6.18): resolution: {integrity: sha512-Y9dMA/B0tlkQLRUmwnfkPKOOaFQSFSp257pDoQr5Gnpx1OjZWGbbesPn4h2dFhGeLme41nznGZNwxR5nH6lGaw==} peerDependencies: yjs: '>=13.5.22' dependencies: '@lexical/offset': 0.14.5 lexical: 0.14.5 - yjs: 13.6.17 + yjs: 13.6.18 dev: false /@lezer/common@1.2.1: @@ -1324,7 +1324,7 @@ packages: react: 18.3.1 dev: false - /@mdxeditor/editor@2.20.7(@codemirror/language@6.10.2)(@lezer/common@1.2.1)(@lezer/highlight@1.2.0)(@types/react@18.3.3)(react-dom@18.3.1)(react@18.3.1)(yjs@13.6.17): + /@mdxeditor/editor@2.20.7(@codemirror/language@6.10.2)(@lezer/common@1.2.1)(@lezer/highlight@1.2.0)(@types/react@18.3.3)(react-dom@18.3.1)(react@18.3.1)(yjs@13.6.18): resolution: {integrity: sha512-UCwKd3aHzOiPw2hz6q4aqA44TwbWSNLMWMXK5/T0iIIn2FfEfHtxrPSvnnPoHd6ofRlDfqx84/U0nGg+dqHdtg==} engines: {node: '>=16'} peerDependencies: @@ -1341,7 +1341,7 @@ packages: '@lexical/list': 0.14.5 '@lexical/markdown': 0.14.5 '@lexical/plain-text': 0.14.5 - '@lexical/react': 0.14.5(react-dom@18.3.1)(react@18.3.1)(yjs@13.6.17) + '@lexical/react': 0.14.5(react-dom@18.3.1)(react@18.3.1)(yjs@13.6.18) '@lexical/rich-text': 0.14.5 '@lexical/selection': 0.14.5 '@lexical/utils': 0.14.5 @@ -1647,7 +1647,7 @@ packages: engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: '@npmcli/name-from-folder': 2.0.0 - glob: 10.4.1 + glob: 10.4.2 minimatch: 9.0.4 read-package-json-fast: 3.0.2 dev: true @@ -3145,7 +3145,7 @@ packages: hasBin: true dependencies: caniuse-lite: 1.0.30001636 - electron-to-chromium: 1.4.805 + electron-to-chromium: 1.4.806 node-releases: 2.0.14 update-browserslist-db: 1.0.16(browserslist@4.23.1) dev: true @@ -3316,10 +3316,10 @@ packages: /codemirror@6.0.1(@lezer/common@1.2.1): resolution: {integrity: sha512-J8j+nZ+CdWmIeFIGXEFbFPtpiYacFMDR8GlHK3IyHQJMCaVRfGx9NT+Hxivv1ckLWPvNdZqndbr/7lVhrf/Svg==} dependencies: - '@codemirror/autocomplete': 6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.1)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.16.3(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.1)(@lezer/common@1.2.1) '@codemirror/commands': 6.6.0 '@codemirror/language': 6.10.2 - '@codemirror/lint': 6.8.0 + '@codemirror/lint': 6.8.1 '@codemirror/search': 6.5.6 '@codemirror/state': 6.4.1 '@codemirror/view': 6.28.1 @@ -3915,8 +3915,8 @@ packages: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true - /electron-to-chromium@1.4.805: - resolution: {integrity: sha512-8W4UJwX/w9T0QSzINJckTKG6CYpAUTqsaWcWIsdud3I1FYJcMgW9QqT1/4CBff/pP/TihWh13OmiyY8neto6vw==} + /electron-to-chromium@1.4.806: + resolution: {integrity: sha512-nkoEX2QIB8kwCOtvtgwhXWy2IHVcOLQZu9Qo36uaGB835mdX/h8uLRlosL6QIhLVUnAiicXRW00PwaPZC74Nrg==} dev: true /elkjs@0.9.3: @@ -4136,7 +4136,7 @@ packages: semver: 6.3.1 dev: true - /eslint-config-airbnb@19.0.4(eslint-plugin-import@2.29.1)(eslint-plugin-jsx-a11y@6.8.0)(eslint-plugin-react-hooks@4.6.2)(eslint-plugin-react@7.34.2)(eslint@8.57.0): + /eslint-config-airbnb@19.0.4(eslint-plugin-import@2.29.1)(eslint-plugin-jsx-a11y@6.8.0)(eslint-plugin-react-hooks@4.6.2)(eslint-plugin-react@7.34.3)(eslint@8.57.0): resolution: {integrity: sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew==} engines: {node: ^10.12.0 || ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -4150,7 +4150,7 @@ packages: eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1)(eslint@8.57.0) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0) - eslint-plugin-react: 7.34.2(eslint@8.57.0) + eslint-plugin-react: 7.34.3(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) object.assign: 4.1.5 object.entries: 1.1.8 @@ -4173,7 +4173,7 @@ packages: eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0) - eslint-plugin-react: 7.34.2(eslint@8.57.0) + eslint-plugin-react: 7.34.3(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) typescript: 5.2.2 transitivePeerDependencies: @@ -4411,8 +4411,8 @@ packages: eslint: 8.57.0 dev: true - /eslint-plugin-react@7.34.2(eslint@8.57.0): - resolution: {integrity: sha512-2HCmrU+/JNigDN6tg55cRDKCQWicYAPB38JGSFDQt95jDm8rrvSUo7YPkOIm5l6ts1j1zCvysNcasvfTMQzUOw==} + /eslint-plugin-react@7.34.3(eslint@8.57.0): + resolution: {integrity: sha512-aoW4MV891jkUulwDApQbPYTVZmeuSyFrudpbTAQuj5Fv8VL+o6df2xIGpw8B0hPjAaih1/Fb0om9grCdyFYemA==} engines: {node: '>=4'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 @@ -4946,8 +4946,8 @@ packages: path-scurry: 1.11.1 dev: true - /glob@10.4.1: - resolution: {integrity: sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==} + /glob@10.4.2: + resolution: {integrity: sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==} engines: {node: '>=16 || 14 >=14.18'} hasBin: true dependencies: @@ -4955,6 +4955,7 @@ packages: jackspeak: 3.4.0 minimatch: 9.0.4 minipass: 7.1.2 + package-json-from-dist: 1.0.0 path-scurry: 1.11.1 dev: true @@ -7259,6 +7260,10 @@ packages: p-limit: 3.1.0 dev: true + /package-json-from-dist@1.0.0: + resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} + dev: true + /parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -8289,7 +8294,7 @@ packages: dependencies: '@jridgewell/gen-mapping': 0.3.5 commander: 4.1.1 - glob: 10.4.1 + glob: 10.4.2 lines-and-columns: 1.2.4 mz: 2.7.0 pirates: 4.0.6 @@ -8567,7 +8572,7 @@ packages: concat-stream: 2.0.0 debug: 4.3.5 extend: 3.0.2 - glob: 10.4.1 + glob: 10.4.2 ignore: 5.3.1 is-empty: 1.2.0 is-plain-obj: 4.1.0 @@ -9037,8 +9042,8 @@ packages: yargs-parser: 21.1.1 dev: false - /yjs@13.6.17: - resolution: {integrity: sha512-ERnKXYZrZqgGO81Yqt3D69detaRUwaqhsQTZRKi9CDMgteDMund+KcLChfwpjQbva9YwfRgh7S914Pa6qPVVCA==} + /yjs@13.6.18: + resolution: {integrity: sha512-GBTjO4QCmv2HFKFkYIJl7U77hIB1o22vSCSQD1Ge8ZxWbIbn8AltI4gyXbtL+g5/GJep67HCMq3Y5AmNwDSyEg==} engines: {node: '>=16.0.0', npm: '>=8.0.0'} dependencies: lib0: 0.2.94 @@ -9056,7 +9061,7 @@ packages: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} file:../../design-system/out/kl-design-system-1.0.1.tgz(framer-motion@10.18.0)(react-dom@18.3.1)(react@18.3.1): - resolution: {integrity: sha512-sROOJKmz4jcbS9yTbZf92Ajou0H65HYErFrW49/OFFI5yiSwNJx13JUJVvn++bAawDFTLadVtCJyO1EGFpzEjw==, tarball: file:../../design-system/out/kl-design-system-1.0.1.tgz} + resolution: {integrity: sha512-EKEvyC7CtNEz2sbD/AXUMSyYI6v41+YEbzV99jBmYck8dFnpbIqPneNfSsGD6zWQ5VmwAhFPE/dLt5UNOZBQAA==, tarball: file:../../design-system/out/kl-design-system-1.0.1.tgz} id: file:../../design-system/out/kl-design-system-1.0.1.tgz name: kl-design-system version: 1.0.1 From 2c13349491795afed4634c428eb87b6912f66df0 Mon Sep 17 00:00:00 2001 From: Piyush Kumar Date: Thu, 20 Jun 2024 15:58:29 +0530 Subject: [PATCH 13/13] update package.json --- package.json | 2 +- pnpm-lock.yaml | 2 +- .../handle-console-devices.tsx | 10 +++--- .../$environment+/new-app/app-network.tsx | 4 --- .../environments/environment-resources-v2.tsx | 2 +- .../infra+/clusters/cluster-resources-v2.tsx | 34 ++++++++++++------- 6 files changed, 30 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index f07f57f21..027606336 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@radix-ui/react-compose-refs": "^1.0.1", "@radix-ui/react-context": "^1.0.1", "@radix-ui/react-dialog": "1.0.4", - "@radix-ui/react-direction": "^1.0.1", + "@radix-ui/react-direction": "1.0.1", "@radix-ui/react-dismissable-layer": "^1.0.5", "@radix-ui/react-dropdown-menu": "^2.0.6", "@radix-ui/react-focus-guards": "^1.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1e16f5df0..275a7d09f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,7 +39,7 @@ dependencies: specifier: 1.0.4 version: 1.0.4(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1)(react@18.2.0) '@radix-ui/react-direction': - specifier: ^1.0.1 + specifier: 1.0.1 version: 1.0.1(@types/react@18.3.3)(react@18.2.0) '@radix-ui/react-dismissable-layer': specifier: ^1.0.5 diff --git a/src/apps/console/page-components/handle-console-devices.tsx b/src/apps/console/page-components/handle-console-devices.tsx index 32cb7ecea..b226c02d9 100644 --- a/src/apps/console/page-components/handle-console-devices.tsx +++ b/src/apps/console/page-components/handle-console-devices.tsx @@ -301,7 +301,7 @@ export const ShowWireguardConfig = ({ deviceName: string; creationMethod: string; }) => { - const [mode, setMode] = useState<'config' | 'qr'>('qr'); + const [mode, setMode] = useState<'config' | 'qr'>('config'); const [data, setData] = useState<{ value: string; @@ -391,14 +391,14 @@ export const ShowWireguardConfig = ({ setMode(v as any); }} items={[ - { - label: 'QR Code', - value: 'qr', - }, { label: 'Config', value: 'config', }, + { + label: 'QR Code', + value: 'qr', + }, ]} /> {modeView()} diff --git a/src/apps/console/routes/_main+/$account+/env+/$environment+/new-app/app-network.tsx b/src/apps/console/routes/_main+/$account+/env+/$environment+/new-app/app-network.tsx index 28eb2093d..207dd460f 100644 --- a/src/apps/console/routes/_main+/$account+/env+/$environment+/new-app/app-network.tsx +++ b/src/apps/console/routes/_main+/$account+/env+/$environment+/new-app/app-network.tsx @@ -210,10 +210,6 @@ export const ExposedPorts = () => { options={async () => []} onChange={(val, v) => { const r = /^\d+$/; - console.log( - 'here', - v.every((c) => r.test(c)) - ); if (v.every((c) => r.test(c))) { setServices([...v.map((vv) => ({ port: parseInt(vv, 10) }))]); } else { diff --git a/src/apps/console/routes/_main+/$account+/environments/environment-resources-v2.tsx b/src/apps/console/routes/_main+/$account+/environments/environment-resources-v2.tsx index 06f273c6d..d8d60c164 100644 --- a/src/apps/console/routes/_main+/$account+/environments/environment-resources-v2.tsx +++ b/src/apps/console/routes/_main+/$account+/environments/environment-resources-v2.tsx @@ -201,7 +201,7 @@ const ListView = ({ items, onAction }: IResource) => { status: { render: () => i.isArchived ? ( - Deleted + Archived ) : ( ), diff --git a/src/apps/console/routes/_main+/$account+/infra+/clusters/cluster-resources-v2.tsx b/src/apps/console/routes/_main+/$account+/infra+/clusters/cluster-resources-v2.tsx index 9ff0257d3..b7381329b 100644 --- a/src/apps/console/routes/_main+/$account+/infra+/clusters/cluster-resources-v2.tsx +++ b/src/apps/console/routes/_main+/$account+/infra+/clusters/cluster-resources-v2.tsx @@ -48,7 +48,7 @@ import CodeView from '~/console/components/code-view'; import useCustomSwr from '~/root/lib/client/hooks/use-custom-swr'; import { LoadingPlaceHolder } from '~/console/components/loading'; import { Badge } from '~/components/atoms/badge'; -import { Github__Com___Kloudlite___Api___Pkg___Types__SyncState as SyncStatusState } from '~/root/src/generated/gql/server'; +// import { Github__Com___Kloudlite___Api___Pkg___Types__SyncState as SyncStatusState } from '~/root/src/generated/gql/server'; import { ViewClusterLogs } from '~/console/components/cluster-logs-popop'; import { ensureAccountClientSide } from '~/console/server/utils/auth-utils'; import Tooltip from '~/components/atoms/tooltip'; @@ -204,14 +204,24 @@ const ByokButton = ({ item }: { item: CombinedBaseType }) => { }; const GetByokClusterMessage = ({ - syncStatusState, + lastOnlineAt, item, }: { - syncStatusState: SyncStatusState; + lastOnlineAt: string; item: CombinedBaseType; }) => { - switch (syncStatusState) { - case 'UPDATED_AT_AGENT': + if (lastOnlineAt === null) { + return ; + } + + const lastTime = new Date(lastOnlineAt); + const currentTime = new Date(); + + const timeDifference = + (currentTime.getTime() - lastTime.getTime()) / (1000 * 60); + + switch (true) { + case timeDifference <= 2: return ( { - if (lastOnlioneAt === null) { +const GetSyncStatus = ({ lastOnlineAt }: { lastOnlineAt: string }) => { + if (lastOnlineAt === null) { return Offline; } - const lastTime = new Date(lastOnlioneAt); + const lastTime = new Date(lastOnlineAt); const currentTime = new Date(); const timeDifference = @@ -261,7 +271,7 @@ const GetSyncStatus = ({ lastOnlioneAt }: { lastOnlioneAt: string }) => { side="top" content={
- {lastOnlioneAt} ({timeDifference * 60}s ago) + {lastOnlineAt} ({timeDifference * 60}s ago)
} > @@ -277,7 +287,7 @@ const GetSyncStatus = ({ lastOnlioneAt }: { lastOnlioneAt: string }) => { side="top" content={
- {lastOnlioneAt} + {lastOnlineAt}
} > @@ -477,13 +487,13 @@ const ListView = ({ items = [], onEdit, onDelete, onShowLogs }: IResource) => { /> ) : ( ), }, status: { - render: () => , + render: () => , }, updated: { render: () => (