Skip to content

Commit

Permalink
Merge branch 'release-v1.0.5' into tooltip-redesign
Browse files Browse the repository at this point in the history
  • Loading branch information
tulsiojha committed Jul 26, 2024
2 parents 92c66b6 + 98bcda3 commit 2b7c98d
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 26 deletions.
10 changes: 5 additions & 5 deletions gql-queries-generator/doc/queries.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -6295,7 +6295,7 @@ query authCli_listApps($envName: String!) {
}
}
}
mapps: core_listApps(envName: $envName) {
mapps: core_listApps(pq: $pq, envName: $envName) {
edges {
node {
displayName
Expand Down Expand Up @@ -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 {
Expand Down
10 changes: 5 additions & 5 deletions src/apps/auth/server/gql/cli-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -425,7 +425,7 @@ export const cliQueries = (executor: IExecutor) => ({
}
}
}
mapps: core_listApps(envName: $envName) {
mapps: core_listApps(pq: $pq, envName: $envName) {
edges {
node {
displayName
Expand Down Expand Up @@ -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 {
Expand Down
12 changes: 10 additions & 2 deletions src/apps/console/components/wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -42,7 +50,7 @@ const Wrapper = ({
empty,
header,
secondaryHeader,
pagination = null,
pagination,
tools,
noResultFound,
}: WrapperProps) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const Apps = () => {
},
}}
tools={<Tools />}
pagination={appsData}
>
<AppsResourcesV2 items={apps} />
</Wrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ const Configs = () => {
>
{({ configsData }) => {
const configs = parseNodes(configsData);
const { pageInfo, totalCount } = configsData;

return (
<Wrapper
Expand Down Expand Up @@ -89,10 +88,7 @@ const Configs = () => {
},
},
}}
pagination={{
pageInfo,
totalCount,
}}
pagination={configsData}
tools={<Tools />}
>
<ConfigResourcesV2 items={configs} linkComponent={Link} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ const KlOperatorServices = () => {
},
}}
tools={<Tools />}
pagination={managedResourcesData}
>
<ManagedResourceResourcesV2
items={managedResources}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ const Workspaces = () => {
},
}}
tools={<Tools />}
pagination={environmentData}
>
<EnvironmentResourcesV2 items={environments || []} />
</Wrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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),
});

Expand Down Expand Up @@ -153,7 +155,6 @@ const ClusterComponent = ({
if (!clusters || !byokClusters) {
return null;
}

return (
<Wrapper
secondaryHeader={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const Tools = ({ onChange, value }: IFilterByClusterType) => {
);
return (
<CommonTools
{...{ options }}
{...{ options, noSort: true }}
// commonToolPrefix={
// <FilterByCLusterType
// onChange={(e) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ const Devices = () => {
return null;
}

const { pageInfo, totalCount } = devicesData;
return (
<Wrapper
secondaryHeader={{
Expand All @@ -116,10 +115,7 @@ const Devices = () => {
empty={getEmptyState({
deviceCount: vpnDevices.length,
})}
pagination={{
pageInfo,
totalCount,
}}
pagination={devicesData}
tools={<Tools />}
>
<VPNResourcesV2 items={vpnDevices} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ const KlOperatorServices = () => {
},
}}
tools={<Tools />}
pagination={managedServices}
>
<BackendServicesResourcesV2
items={backendServices}
Expand Down
2 changes: 2 additions & 0 deletions src/generated/gql/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7882,6 +7882,7 @@ export type AuthCli_GetConfigQuery = {
};

export type AuthCli_ListAppsQueryVariables = Exact<{
pq?: InputMaybe<CursorPaginationIn>;
envName: Scalars['String']['input'];
}>;

Expand Down Expand Up @@ -7935,6 +7936,7 @@ export type AuthCli_ListAppsQuery = {
};

export type AuthCli_ListConfigsQueryVariables = Exact<{
pq?: InputMaybe<CursorPaginationIn>;
envName: Scalars['String']['input'];
}>;

Expand Down

0 comments on commit 2b7c98d

Please sign in to comment.