diff --git a/gql-queries-generator/doc/queries.graphql b/gql-queries-generator/doc/queries.graphql index 7ae969a73..b05c25872 100644 --- a/gql-queries-generator/doc/queries.graphql +++ b/gql-queries-generator/doc/queries.graphql @@ -4580,6 +4580,7 @@ query consoleListServiceBinding($envName: String!, $pagination: CursorPagination } } updateTime + serviceHost } } } diff --git a/src/apps/console/routes/_main+/$account+/env+/$environment+/services/services-resource-v2.tsx b/src/apps/console/routes/_main+/$account+/env+/$environment+/services/services-resource-v2.tsx index fa5087bda..b82eb0c4e 100644 --- a/src/apps/console/routes/_main+/$account+/env+/$environment+/services/services-resource-v2.tsx +++ b/src/apps/console/routes/_main+/$account+/env+/$environment+/services/services-resource-v2.tsx @@ -29,13 +29,16 @@ import { useConsoleApi } from '~/console/server/gql/api-provider'; import { IEnvironmentContext } from '../_layout'; import { useReload } from '~/root/lib/client/helpers/reloader'; import { toast } from '@kloudlite/design-system/molecule/toast'; +import { CopyContentToClipboard } from '~/console/components/common-console-components'; const RESOURCE_NAME = 'managed resource'; type BaseType = ExtractNodeType; const parseItem = (item: BaseType) => { + console.log("svcbinding", item) return { name: item.spec?.serviceRef?.name || "", + serviceHost: item.serviceHost, updateInfo: { time: parseUpdateOrCreatedOn(item), }, @@ -142,6 +145,14 @@ const InterceptPortView = ({ ); }; +const ServiceView = ({ service }: { service: string }) => { + return ( + + ); +}; interface IResource { items: BaseType[]; @@ -190,6 +201,11 @@ const ListView = ({ items = [], onAction }: IResource) => { name: 'name', className: listClass.title, }, + { + render: () => 'Service Host', + name: 'serviceHost', + className: 'w-[300px] truncate', + }, { render: () => '', name: 'intercept', @@ -212,12 +228,15 @@ const ListView = ({ items = [], onAction }: IResource) => { }, ], rows: items.map((i) => { - const { name, updateInfo } = parseItem(i); + const { name, updateInfo, serviceHost } = parseItem(i); return { columns: { name: { render: () => , }, + serviceHost: { + render: () => + }, intercept: { render: () => i.interceptStatus?.intercepted ? ( @@ -229,7 +248,6 @@ const ListView = ({ items = [], onAction }: IResource) => { ) : null, }, - updated: { render: () => , }, diff --git a/src/apps/console/server/gql/queries/service-binding-queries.ts b/src/apps/console/server/gql/queries/service-binding-queries.ts index 1367f8c9c..18465c50d 100644 --- a/src/apps/console/server/gql/queries/service-binding-queries.ts +++ b/src/apps/console/server/gql/queries/service-binding-queries.ts @@ -90,6 +90,7 @@ export const serviceBindingQueries = (executor: IExecutor) => ({ } } updateTime + serviceHost } } } diff --git a/src/generated/gql/sdl.graphql b/src/generated/gql/sdl.graphql index 8df228b88..a3bcde5b4 100644 --- a/src/generated/gql/sdl.graphql +++ b/src/generated/gql/sdl.graphql @@ -4547,6 +4547,7 @@ type ServiceBinding { markedForDeletion: Boolean metadata: Metadata recordVersion: Int! + serviceHost: String spec: Github__com___kloudlite___operator___apis___networking___v1__ServiceBindingSpec status: Github__com___kloudlite___operator___pkg___operator__Status updateTime: Date! diff --git a/src/generated/gql/server.ts b/src/generated/gql/server.ts index 268053e8a..118941814 100644 --- a/src/generated/gql/server.ts +++ b/src/generated/gql/server.ts @@ -6286,6 +6286,7 @@ export type ConsoleListServiceBindingQuery = { markedForDeletion?: boolean; recordVersion: number; updateTime: any; + serviceHost?: string; interceptStatus?: { intercepted?: boolean; toAddr: string;