diff --git a/gql-queries-generator/doc/queries.graphql b/gql-queries-generator/doc/queries.graphql
index fe7ccdfc5..197105453 100644
--- a/gql-queries-generator/doc/queries.graphql
+++ b/gql-queries-generator/doc/queries.graphql
@@ -6263,8 +6263,8 @@ query authCli_getConfig($envName: String!, $name: String!) {
}
}
-query authCli_listApps($envName: String!) {
- apps: core_listExternalApps(envName: $envName) {
+query authCli_listApps($pq: CursorPaginationIn, $envName: String!) {
+ apps: core_listExternalApps(pq: $pq, envName: $envName) {
edges {
node {
spec {
@@ -6295,7 +6295,7 @@ query authCli_listApps($envName: String!) {
}
}
}
- mapps: core_listApps(envName: $envName) {
+ mapps: core_listApps(pq: $pq, envName: $envName) {
edges {
node {
displayName
@@ -6332,8 +6332,8 @@ query authCli_listApps($envName: String!) {
}
}
-query authCli_listConfigs($envName: String!) {
- core_listConfigs(envName: $envName) {
+query authCli_listConfigs($pq: CursorPaginationIn, $envName: String!) {
+ core_listConfigs(pq: $pq, envName: $envName) {
totalCount
edges {
node {
diff --git a/src/apps/auth/server/gql/cli-queries.ts b/src/apps/auth/server/gql/cli-queries.ts
index 88e68344b..6c387b844 100644
--- a/src/apps/auth/server/gql/cli-queries.ts
+++ b/src/apps/auth/server/gql/cli-queries.ts
@@ -393,8 +393,8 @@ export const cliQueries = (executor: IExecutor) => ({
cli_listApps: executor(
gql`
- query Core_listApps($envName: String!) {
- apps: core_listExternalApps(envName: $envName) {
+ query Core_listApps($pq: CursorPaginationIn, $envName: String!) {
+ apps: core_listExternalApps(pq: $pq, envName: $envName) {
edges {
node {
spec {
@@ -425,7 +425,7 @@ export const cliQueries = (executor: IExecutor) => ({
}
}
}
- mapps: core_listApps(envName: $envName) {
+ mapps: core_listApps(pq: $pq, envName: $envName) {
edges {
node {
displayName
@@ -489,8 +489,8 @@ export const cliQueries = (executor: IExecutor) => ({
),
cli_listConfigs: executor(
gql`
- query Core_listConfigs($envName: String!) {
- core_listConfigs(envName: $envName) {
+ query Core_listConfigs($pq: CursorPaginationIn, $envName: String!) {
+ core_listConfigs(pq: $pq, envName: $envName) {
totalCount
edges {
node {
diff --git a/src/apps/console/components/wrapper.tsx b/src/apps/console/components/wrapper.tsx
index ef9ebbb3f..beb39447b 100644
--- a/src/apps/console/components/wrapper.tsx
+++ b/src/apps/console/components/wrapper.tsx
@@ -28,7 +28,15 @@ interface WrapperProps {
title: ReactNode;
action?: ReactNode;
};
- pagination?: any;
+ pagination?: {
+ pageInfo: {
+ endCursor?: string;
+ hasNextPage?: boolean;
+ hasPrevPage?: boolean;
+ startCursor?: string;
+ };
+ totalCount: number;
+ };
tools?: ReactNode;
noResultFound?: INoResultsFound;
}
@@ -42,7 +50,7 @@ const Wrapper = ({
empty,
header,
secondaryHeader,
- pagination = null,
+ pagination,
tools,
noResultFound,
}: WrapperProps) => {
diff --git a/src/apps/console/routes/_main+/$account+/env+/$environment+/apps/route.tsx b/src/apps/console/routes/_main+/$account+/env+/$environment+/apps/route.tsx
index 72147203b..d9e345861 100644
--- a/src/apps/console/routes/_main+/$account+/env+/$environment+/apps/route.tsx
+++ b/src/apps/console/routes/_main+/$account+/env+/$environment+/apps/route.tsx
@@ -85,6 +85,7 @@ const Apps = () => {
},
}}
tools={}
+ pagination={appsData}
>
diff --git a/src/apps/console/routes/_main+/$account+/env+/$environment+/cs+/configs._index/route.tsx b/src/apps/console/routes/_main+/$account+/env+/$environment+/cs+/configs._index/route.tsx
index 3b3b56889..15cef010c 100644
--- a/src/apps/console/routes/_main+/$account+/env+/$environment+/cs+/configs._index/route.tsx
+++ b/src/apps/console/routes/_main+/$account+/env+/$environment+/cs+/configs._index/route.tsx
@@ -56,7 +56,6 @@ const Configs = () => {
>
{({ configsData }) => {
const configs = parseNodes(configsData);
- const { pageInfo, totalCount } = configsData;
return (
{
},
},
}}
- pagination={{
- pageInfo,
- totalCount,
- }}
+ pagination={configsData}
tools={}
>
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 f2e2ae92c..5b2c9115f 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
@@ -91,6 +91,7 @@ const KlOperatorServices = () => {
},
}}
tools={}
+ pagination={managedResourcesData}
>
{
},
}}
tools={}
+ pagination={environmentData}
>
diff --git a/src/apps/console/routes/_main+/$account+/infra+/clusters/route.tsx b/src/apps/console/routes/_main+/$account+/infra+/clusters/route.tsx
index bd1e6523a..095c5ed3d 100644
--- a/src/apps/console/routes/_main+/$account+/infra+/clusters/route.tsx
+++ b/src/apps/console/routes/_main+/$account+/infra+/clusters/route.tsx
@@ -4,7 +4,7 @@ import { useLoaderData } from '@remix-run/react';
import { Button } from '~/components/atoms/button.jsx';
import Wrapper from '~/console/components/wrapper';
import { ExtractNodeType, parseNodes } from '~/console/server/r-utils/common';
-import { getPagination, getSearch } from '~/console/server/utils/common';
+import { getSearch } from '~/console/server/utils/common';
import { IRemixCtx } from '~/root/lib/types/common';
import { LoadingComp, pWrapper } from '~/console/components/loading-component';
import { ensureAccountSet } from '~/console/server/utils/auth-utils';
@@ -24,7 +24,9 @@ export const loader = async (ctx: IRemixCtx) => {
const { data, errors } = await GQLServerHandler(
ctx.request
).listAllClusters({
- pagination: getPagination(ctx),
+ pagination: {
+ first: 200,
+ },
search: getSearch(ctx),
});
@@ -153,7 +155,6 @@ const ClusterComponent = ({
if (!clusters || !byokClusters) {
return null;
}
-
return (
{
);
return (
{
diff --git a/src/apps/console/routes/_main+/$account+/infra+/vpn-devices/route.tsx b/src/apps/console/routes/_main+/$account+/infra+/vpn-devices/route.tsx
index 4482044c1..2338d7c42 100644
--- a/src/apps/console/routes/_main+/$account+/infra+/vpn-devices/route.tsx
+++ b/src/apps/console/routes/_main+/$account+/infra+/vpn-devices/route.tsx
@@ -96,7 +96,6 @@ const Devices = () => {
return null;
}
- const { pageInfo, totalCount } = devicesData;
return (
{
empty={getEmptyState({
deviceCount: vpnDevices.length,
})}
- pagination={{
- pageInfo,
- totalCount,
- }}
+ pagination={devicesData}
tools={}
>
diff --git a/src/apps/console/routes/_main+/$account+/managed-services/route.tsx b/src/apps/console/routes/_main+/$account+/managed-services/route.tsx
index de9cc8c4a..8e849787a 100644
--- a/src/apps/console/routes/_main+/$account+/managed-services/route.tsx
+++ b/src/apps/console/routes/_main+/$account+/managed-services/route.tsx
@@ -95,6 +95,7 @@ const KlOperatorServices = () => {
},
}}
tools={}
+ pagination={managedServices}
>
;
envName: Scalars['String']['input'];
}>;
@@ -7935,6 +7936,7 @@ export type AuthCli_ListAppsQuery = {
};
export type AuthCli_ListConfigsQueryVariables = Exact<{
+ pq?: InputMaybe;
envName: Scalars['String']['input'];
}>;