diff --git a/assets/src/components/cd/globalServices/GlobalServiceDetailTable.tsx b/assets/src/components/cd/globalServices/GlobalServiceDetailTable.tsx index 698317fd2f..90c86aaddf 100644 --- a/assets/src/components/cd/globalServices/GlobalServiceDetailTable.tsx +++ b/assets/src/components/cd/globalServices/GlobalServiceDetailTable.tsx @@ -172,7 +172,7 @@ export function GlobalServiceDetailTable({ hasNextPage={pageInfo?.hasNextPage} fetchNextPage={fetchNextPage} isFetchingNextPage={loading} - reactTableOptions={{ meta: { refetch: () => null } }} + reactTableOptions={{ meta: { refetch: () => undefined } }} reactVirtualOptions={SERVICES_REACT_VIRTUAL_OPTIONS} /> diff --git a/assets/src/components/cd/namespaces/NamespacesDetailTable.tsx b/assets/src/components/cd/namespaces/NamespacesDetailTable.tsx index ae27db4bc2..1afa2440d9 100644 --- a/assets/src/components/cd/namespaces/NamespacesDetailTable.tsx +++ b/assets/src/components/cd/namespaces/NamespacesDetailTable.tsx @@ -148,7 +148,7 @@ export function NamespacesDetailTable({ hasNextPage={pageInfo?.hasNextPage} fetchNextPage={fetchNextPage} isFetchingNextPage={loading} - reactTableOptions={{ meta: { refetch: () => null } }} + reactTableOptions={{ meta: { refetch: () => undefined } }} reactVirtualOptions={SERVICES_REACT_VIRTUAL_OPTIONS} /> diff --git a/assets/src/components/cluster/ContainerStatuses.tsx b/assets/src/components/cluster/ContainerStatuses.tsx index 13a9325c58..f38b2d437a 100644 --- a/assets/src/components/cluster/ContainerStatuses.tsx +++ b/assets/src/components/cluster/ContainerStatuses.tsx @@ -61,7 +61,10 @@ export function ContainerStatuses({ return ( {statuses.map(({ name, readiness }) => ( - + ))} ) diff --git a/assets/src/components/cluster/pods/PodsList.tsx b/assets/src/components/cluster/pods/PodsList.tsx index 39c4da412f..a0aecd12ec 100644 --- a/assets/src/components/cluster/pods/PodsList.tsx +++ b/assets/src/components/cluster/pods/PodsList.tsx @@ -234,9 +234,7 @@ export const ColImages = columnHelper.accessor((row) => row?.images || [], { label={image} placement="left-start" > - - {image} - + {image} )) }, diff --git a/assets/src/components/kubernetes/Cluster.tsx b/assets/src/components/kubernetes/Cluster.tsx index afaf9281a6..fe2b1eecd1 100644 --- a/assets/src/components/kubernetes/Cluster.tsx +++ b/assets/src/components/kubernetes/Cluster.tsx @@ -3,18 +3,20 @@ import { Outlet, useLocation, useNavigate, useParams } from 'react-router-dom' import { isEmpty } from 'lodash' import { - ClusterTinyFragment, - useClustersTinyQuery, + KubernetesClusterFragment, + Maybe, + PinnedCustomResourceFragment, + useKubernetesClustersQuery, } from '../../generated/graphql' import { mapExistingNodes } from '../../utils/graphql' - import { getWorkloadsAbsPath } from '../../routes/kubernetesRoutesConsts' import { useNamespacesQuery } from '../../generated/graphql-kubernetes' import { KubernetesClient } from '../../helpers/kubernetes.client' type ClusterContextT = { - clusters: ClusterTinyFragment[] - cluster?: ClusterTinyFragment + clusters: KubernetesClusterFragment[] + refetch?: Nullable<() => void> + cluster?: KubernetesClusterFragment namespaces: string[] } @@ -36,12 +38,36 @@ export const useClusters = () => { return clusters } +export const useRefetch = () => { + const { refetch } = useClusterContext() + + return refetch +} + export const useCluster = () => { const { cluster } = useClusterContext() return cluster } +export const usePinnedResources = (): Maybe[] => { + const cluster = useCluster() + + return cluster?.pinnedCustomResources ?? [] +} + +export const useIsPinnedResource = ( + kind: string, + version: string, + group: string +) => { + const pinnedResources = usePinnedResources() + + return !!pinnedResources.find( + (pr) => pr?.group === group && pr?.version === version && pr?.kind === kind + ) +} + export const useNamespaces = () => { const { namespaces } = useClusterContext() @@ -53,7 +79,7 @@ export default function Cluster() { const { search } = useLocation() const navigate = useNavigate() - const { data } = useClustersTinyQuery({ + const { data, refetch } = useKubernetesClustersQuery({ pollInterval: 120_000, fetchPolicy: 'cache-and-network', }) @@ -82,8 +108,8 @@ export default function Cluster() { ) const context = useMemo( - () => ({ clusters, cluster, namespaces }) as ClusterContextT, - [clusters, cluster, namespaces] + () => ({ clusters, refetch, cluster, namespaces }) as ClusterContextT, + [clusters, refetch, cluster, namespaces] ) useEffect(() => { diff --git a/assets/src/components/kubernetes/access/Access.tsx b/assets/src/components/kubernetes/access/Access.tsx index 6bfd7e99a2..46c104fe47 100644 --- a/assets/src/components/kubernetes/access/Access.tsx +++ b/assets/src/components/kubernetes/access/Access.tsx @@ -1,6 +1,6 @@ import { Outlet, useLocation, useMatch } from 'react-router-dom' import { SubTab, TabList, TabPanel } from '@pluralsh/design-system' -import { Suspense, useMemo, useRef, useState } from 'react' +import { Suspense, useMemo, useRef } from 'react' import { CLUSTER_ROLES_REL_PATH, @@ -13,12 +13,22 @@ import { import { ScrollablePage } from '../../utils/layout/ScrollablePage' import { LinkTabWrap } from '../../utils/Tabs' import { PluralErrorBoundary } from '../../cd/PluralErrorBoundary' -import { - PageScrollableContext, - useSetPageHeaderContent, -} from '../../cd/ContinuousDeployment' +import { useSetPageHeaderContent } from '../../cd/ContinuousDeployment' import LoadingIndicator from '../../utils/LoadingIndicator' import { useCluster } from '../Cluster' +import { Maybe } from '../../../generated/graphql-kubernetes' +import { KubernetesClusterFragment } from '../../../generated/graphql' +import { getBaseBreadcrumbs } from '../common/utils' + +export const getAccessBreadcrumbs = ( + cluster?: Maybe +) => [ + ...getBaseBreadcrumbs(cluster), + { + label: 'access', + url: getAccessAbsPath(cluster?.id), + }, +] const directory = [ { path: ROLES_REL_PATH, label: 'Roles' }, @@ -30,15 +40,6 @@ const directory = [ export default function Access() { const cluster = useCluster() - const [scrollable, setScrollable] = useState(false) - - const pageScrollableContext = useMemo( - () => ({ - setScrollable, - }), - [] - ) - const tabStateRef = useRef(null) const pathMatch = useMatch(`${getAccessAbsPath(cluster?.id)}/:tab/*`) const tab = pathMatch?.params?.tab || '' @@ -83,18 +84,16 @@ export default function Access() { return ( - - }> - - - + }> + + diff --git a/assets/src/components/kubernetes/access/ClusterRole.tsx b/assets/src/components/kubernetes/access/ClusterRole.tsx index cab45da181..ee3707093a 100644 --- a/assets/src/components/kubernetes/access/ClusterRole.tsx +++ b/assets/src/components/kubernetes/access/ClusterRole.tsx @@ -9,15 +9,13 @@ import { useClusterRoleQuery, } from '../../../generated/graphql-kubernetes' import { MetadataSidecar } from '../common/utils' - import { getResourceDetailsAbsPath } from '../../../routes/kubernetesRoutesConsts' import LoadingIndicator from '../../utils/LoadingIndicator' import ResourceDetails, { TabEntry } from '../common/ResourceDetails' import PolicyRules from '../common/PolicyRules' - import { FullHeightTableWrap } from '../../utils/layout/FullHeightTableWrap' - import { useCluster } from '../Cluster' +import { Kind } from '../common/types' import { getBreadcrumbs } from './ClusterRoles' @@ -47,7 +45,7 @@ export default function ClusterRole(): ReactElement { { label: name ?? '', - url: getResourceDetailsAbsPath(clusterId, 'clusterrole', name), + url: getResourceDetailsAbsPath(clusterId, Kind.ClusterRole, name), }, ], [cluster, clusterId, name] diff --git a/assets/src/components/kubernetes/access/ClusterRoleBinding.tsx b/assets/src/components/kubernetes/access/ClusterRoleBinding.tsx index 1c4c235432..0c7a77f2db 100644 --- a/assets/src/components/kubernetes/access/ClusterRoleBinding.tsx +++ b/assets/src/components/kubernetes/access/ClusterRoleBinding.tsx @@ -16,6 +16,7 @@ import LoadingIndicator from '../../utils/LoadingIndicator' import { FullHeightTableWrap } from '../../utils/layout/FullHeightTableWrap' import Subjects from '../common/Subjects' import { useCluster } from '../Cluster' +import { Kind } from '../common/types' import { getBreadcrumbs } from './ClusterRoleBindings' @@ -44,7 +45,11 @@ export default function ClusterRoleBinding(): ReactElement { ...getBreadcrumbs(cluster), { label: name ?? '', - url: getResourceDetailsAbsPath(clusterId, 'clusterrolebinding', name), + url: getResourceDetailsAbsPath( + clusterId, + Kind.ClusterRoleBinding, + name + ), }, ], [cluster, clusterId, name] @@ -63,7 +68,7 @@ export default function ClusterRoleBinding(): ReactElement { as={Link} to={getResourceDetailsAbsPath( clusterId, - 'clusterrole', + Kind.ClusterRole, crb?.roleRef.name ?? '' )} inline diff --git a/assets/src/components/kubernetes/access/ClusterRoleBindings.tsx b/assets/src/components/kubernetes/access/ClusterRoleBindings.tsx index 8f59a424ee..ef596d7714 100644 --- a/assets/src/components/kubernetes/access/ClusterRoleBindings.tsx +++ b/assets/src/components/kubernetes/access/ClusterRoleBindings.tsx @@ -11,21 +11,19 @@ import { Maybe, useClusterRoleBindingsQuery, } from '../../../generated/graphql-kubernetes' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { CLUSTER_ROLE_BINDINGS_REL_PATH, getAccessAbsPath, } from '../../../routes/kubernetesRoutesConsts' import { useCluster } from '../Cluster' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'access', - url: getAccessAbsPath(cluster?.id), - }, +import { getAccessBreadcrumbs } from './Access' + +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getAccessBreadcrumbs(cluster), { label: 'cluster role bindings', url: `${getAccessAbsPath(cluster?.id)}/${CLUSTER_ROLE_BINDINGS_REL_PATH}`, @@ -39,11 +37,11 @@ export default function ClusterRoleBindings() { useSetBreadcrumbs(useMemo(() => getBreadcrumbs(cluster), [cluster])) - const { colName, colLabels, colCreationTimestamp } = + const { colAction, colName, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) const columns = useMemo( - () => [colName, colLabels, colCreationTimestamp], - [colName, colLabels, colCreationTimestamp] + () => [colName, colLabels, colCreationTimestamp, colAction], + [colName, colLabels, colCreationTimestamp, colAction] ) return ( diff --git a/assets/src/components/kubernetes/access/ClusterRoles.tsx b/assets/src/components/kubernetes/access/ClusterRoles.tsx index fc603b8ac7..28d0ffdc45 100644 --- a/assets/src/components/kubernetes/access/ClusterRoles.tsx +++ b/assets/src/components/kubernetes/access/ClusterRoles.tsx @@ -11,21 +11,19 @@ import { Maybe, useClusterRolesQuery, } from '../../../generated/graphql-kubernetes' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { CLUSTER_ROLES_REL_PATH, getAccessAbsPath, } from '../../../routes/kubernetesRoutesConsts' import { useCluster } from '../Cluster' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'access', - url: getAccessAbsPath(cluster?.id), - }, +import { getAccessBreadcrumbs } from './Access' + +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getAccessBreadcrumbs(cluster), { label: 'cluster roles', url: `${getAccessAbsPath(cluster?.id)}/${CLUSTER_ROLES_REL_PATH}`, @@ -39,11 +37,11 @@ export default function ClusterRoles() { useSetBreadcrumbs(useMemo(() => getBreadcrumbs(cluster), [cluster])) - const { colName, colLabels, colCreationTimestamp } = + const { colAction, colName, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) const columns = useMemo( - () => [colName, colLabels, colCreationTimestamp], - [colName, colLabels, colCreationTimestamp] + () => [colName, colLabels, colCreationTimestamp, colAction], + [colName, colLabels, colCreationTimestamp, colAction] ) return ( diff --git a/assets/src/components/kubernetes/access/Role.tsx b/assets/src/components/kubernetes/access/Role.tsx index 6bb72a2910..2f71920a00 100644 --- a/assets/src/components/kubernetes/access/Role.tsx +++ b/assets/src/components/kubernetes/access/Role.tsx @@ -9,7 +9,6 @@ import { useRoleQuery, } from '../../../generated/graphql-kubernetes' import { KubernetesClient } from '../../../helpers/kubernetes.client' - import { ROLES_REL_PATH, getAccessAbsPath, @@ -18,12 +17,10 @@ import { import { NAMESPACE_PARAM } from '../Navigation' import LoadingIndicator from '../../utils/LoadingIndicator' import ResourceDetails, { TabEntry } from '../common/ResourceDetails' - import PolicyRules from '../common/PolicyRules' - import { FullHeightTableWrap } from '../../utils/layout/FullHeightTableWrap' - import { useCluster } from '../Cluster' +import { Kind } from '../common/types' import { getBreadcrumbs } from './Roles' @@ -56,7 +53,7 @@ export default function Role(): ReactElement { }, { label: name ?? '', - url: getResourceDetailsAbsPath(clusterId, 'role', name, namespace), + url: getResourceDetailsAbsPath(clusterId, Kind.Role, name, namespace), }, ], [cluster, clusterId, name, namespace] diff --git a/assets/src/components/kubernetes/access/RoleBinding.tsx b/assets/src/components/kubernetes/access/RoleBinding.tsx index bdf40a0013..8633b9e552 100644 --- a/assets/src/components/kubernetes/access/RoleBinding.tsx +++ b/assets/src/components/kubernetes/access/RoleBinding.tsx @@ -23,6 +23,8 @@ import Subjects from '../common/Subjects' import { useCluster } from '../Cluster' +import { Kind } from '../common/types' + import { getBreadcrumbs } from './RoleBindings' const directory: Array = [ @@ -59,7 +61,7 @@ export default function RoleBinding(): ReactElement { label: name ?? '', url: getResourceDetailsAbsPath( clusterId, - 'rolebinding', + Kind.RoleBinding, name, namespace ), @@ -81,7 +83,7 @@ export default function RoleBinding(): ReactElement { as={Link} to={getResourceDetailsAbsPath( clusterId, - 'role', + Kind.Role, rb?.roleRef.name ?? '', namespace )} diff --git a/assets/src/components/kubernetes/access/RoleBindings.tsx b/assets/src/components/kubernetes/access/RoleBindings.tsx index 6a26fbff0d..29213c3ba7 100644 --- a/assets/src/components/kubernetes/access/RoleBindings.tsx +++ b/assets/src/components/kubernetes/access/RoleBindings.tsx @@ -11,21 +11,19 @@ import { RoleBindingsQueryVariables, useRoleBindingsQuery, } from '../../../generated/graphql-kubernetes' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { ROLE_BINDINGS_REL_PATH, getAccessAbsPath, } from '../../../routes/kubernetesRoutesConsts' import { useCluster } from '../Cluster' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'access', - url: getAccessAbsPath(cluster?.id), - }, +import { getAccessBreadcrumbs } from './Access' + +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getAccessBreadcrumbs(cluster), { label: 'role bindings', url: `${getAccessAbsPath(cluster?.id)}/${ROLE_BINDINGS_REL_PATH}`, @@ -39,11 +37,11 @@ export default function RoleBindings() { useSetBreadcrumbs(useMemo(() => getBreadcrumbs(cluster), [cluster])) - const { colName, colNamespace, colLabels, colCreationTimestamp } = + const { colAction, colName, colNamespace, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) const columns = useMemo( - () => [colName, colNamespace, colLabels, colCreationTimestamp], - [colName, colNamespace, colLabels, colCreationTimestamp] + () => [colName, colNamespace, colLabels, colCreationTimestamp, colAction], + [colName, colNamespace, colLabels, colCreationTimestamp, colAction] ) return ( diff --git a/assets/src/components/kubernetes/access/Roles.tsx b/assets/src/components/kubernetes/access/Roles.tsx index f31187dcf6..bbd899860a 100644 --- a/assets/src/components/kubernetes/access/Roles.tsx +++ b/assets/src/components/kubernetes/access/Roles.tsx @@ -1,6 +1,5 @@ import { createColumnHelper } from '@tanstack/react-table' import { useMemo } from 'react' - import { useSetBreadcrumbs } from '@pluralsh/design-system' import { @@ -11,21 +10,19 @@ import { RolesQueryVariables, useRolesQuery, } from '../../../generated/graphql-kubernetes' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { ROLES_REL_PATH, getAccessAbsPath, } from '../../../routes/kubernetesRoutesConsts' import { useCluster } from '../Cluster' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'access', - url: getAccessAbsPath(cluster?.id), - }, +import { getAccessBreadcrumbs } from './Access' + +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getAccessBreadcrumbs(cluster), { label: 'roles', url: `${getAccessAbsPath(cluster?.id)}/${ROLES_REL_PATH}`, @@ -39,14 +36,13 @@ export default function Roles() { useSetBreadcrumbs(useMemo(() => getBreadcrumbs(cluster), [cluster])) - const { colName, colNamespace, colLabels, colCreationTimestamp } = + const { colAction, colName, colNamespace, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) const columns = useMemo( - () => [colName, colNamespace, colLabels, colCreationTimestamp], - [colName, colNamespace, colLabels, colCreationTimestamp] + () => [colName, colNamespace, colLabels, colCreationTimestamp, colAction], + [colName, colNamespace, colLabels, colCreationTimestamp, colAction] ) - // TODO: Fix query for all namespaces. return ( namespaced diff --git a/assets/src/components/kubernetes/access/ServiceAccount.tsx b/assets/src/components/kubernetes/access/ServiceAccount.tsx index cb9942ca55..9581e203f9 100644 --- a/assets/src/components/kubernetes/access/ServiceAccount.tsx +++ b/assets/src/components/kubernetes/access/ServiceAccount.tsx @@ -19,6 +19,8 @@ import ResourceDetails, { TabEntry } from '../common/ResourceDetails' import { useCluster } from '../Cluster' +import { Kind } from '../common/types' + import { getBreadcrumbs } from './ServiceAccounts' const directory: Array = [{ path: 'raw', label: 'Raw' }] as const @@ -52,7 +54,7 @@ export default function ServiceAccount(): ReactElement { label: name ?? '', url: getResourceDetailsAbsPath( clusterId, - 'serviceaccount', + Kind.ServiceAccount, name, namespace ), diff --git a/assets/src/components/kubernetes/access/ServiceAccounts.tsx b/assets/src/components/kubernetes/access/ServiceAccounts.tsx index d1b7eb23e2..803847588f 100644 --- a/assets/src/components/kubernetes/access/ServiceAccounts.tsx +++ b/assets/src/components/kubernetes/access/ServiceAccounts.tsx @@ -10,21 +10,19 @@ import { ServiceAccountsQueryVariables, useServiceAccountsQuery, } from '../../../generated/graphql-kubernetes' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { SERVICE_ACCOUNTS_REL_PATH, getAccessAbsPath, } from '../../../routes/kubernetesRoutesConsts' import { useCluster } from '../Cluster' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'access', - url: getAccessAbsPath(cluster?.id), - }, +import { getAccessBreadcrumbs } from './Access' + +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getAccessBreadcrumbs(cluster), { label: 'service accounts', url: `${getAccessAbsPath(cluster?.id)}/${SERVICE_ACCOUNTS_REL_PATH}`, @@ -38,11 +36,11 @@ export default function ServiceAccounts() { useSetBreadcrumbs(useMemo(() => getBreadcrumbs(cluster), [cluster])) - const { colName, colNamespace, colLabels, colCreationTimestamp } = + const { colAction, colName, colNamespace, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) const columns = useMemo( - () => [colName, colNamespace, colLabels, colCreationTimestamp], - [colName, colNamespace, colLabels, colCreationTimestamp] + () => [colName, colNamespace, colLabels, colCreationTimestamp, colAction], + [colName, colNamespace, colLabels, colCreationTimestamp, colAction] ) return ( diff --git a/assets/src/components/kubernetes/cluster/Cluster.tsx b/assets/src/components/kubernetes/cluster/Cluster.tsx index 80abbcf972..c246c64373 100644 --- a/assets/src/components/kubernetes/cluster/Cluster.tsx +++ b/assets/src/components/kubernetes/cluster/Cluster.tsx @@ -1,6 +1,6 @@ import { Outlet, useLocation, useMatch } from 'react-router-dom' import { SubTab, TabList, TabPanel } from '@pluralsh/design-system' -import { Suspense, useMemo, useRef, useState } from 'react' +import { Suspense, useMemo, useRef } from 'react' import { EVENTS_REL_PATH, @@ -12,12 +12,22 @@ import { import { ScrollablePage } from '../../utils/layout/ScrollablePage' import { LinkTabWrap } from '../../utils/Tabs' import { PluralErrorBoundary } from '../../cd/PluralErrorBoundary' -import { - PageScrollableContext, - useSetPageHeaderContent, -} from '../../cd/ContinuousDeployment' +import { useSetPageHeaderContent } from '../../cd/ContinuousDeployment' import LoadingIndicator from '../../utils/LoadingIndicator' import { useCluster } from '../Cluster' +import { Maybe } from '../../../generated/graphql-kubernetes' +import { KubernetesClusterFragment } from '../../../generated/graphql' +import { getBaseBreadcrumbs } from '../common/utils' + +export const getClusterBreadcrumbs = ( + cluster?: Maybe +) => [ + ...getBaseBreadcrumbs(cluster), + { + label: 'cluster', + url: getClusterAbsPath(cluster?.id), + }, +] const directory = [ { path: NODES_REL_PATH, label: 'Nodes' }, @@ -28,15 +38,6 @@ const directory = [ export default function Cluster() { const cluster = useCluster() - const [scrollable, setScrollable] = useState(false) - - const pageScrollableContext = useMemo( - () => ({ - setScrollable, - }), - [] - ) - const tabStateRef = useRef(null) const pathMatch = useMatch(`${getClusterAbsPath(cluster?.id)}/:tab/*`) const tab = pathMatch?.params?.tab || '' @@ -81,18 +82,16 @@ export default function Cluster() { return ( - - }> - - - + }> + + diff --git a/assets/src/components/kubernetes/cluster/Events.tsx b/assets/src/components/kubernetes/cluster/Events.tsx index c062bfc94c..04ce79ddf7 100644 --- a/assets/src/components/kubernetes/cluster/Events.tsx +++ b/assets/src/components/kubernetes/cluster/Events.tsx @@ -1,7 +1,6 @@ import { createColumnHelper } from '@tanstack/react-table' -import { Link } from 'react-router-dom' import { useSetBreadcrumbs } from '@pluralsh/design-system' -import { useMemo } from 'react' +import React, { useMemo } from 'react' import { Common_EventList as EventListT, @@ -13,24 +12,20 @@ import { } from '../../../generated/graphql-kubernetes' import { ResourceList } from '../common/ResourceList' import { DateTimeCol } from '../../utils/table/DateTimeCol' -import { ClusterTinyFragment } from '../../../generated/graphql' -import { InlineLink } from '../../utils/typography/InlineLink' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { EVENTS_REL_PATH, getClusterAbsPath, - getResourceDetailsAbsPath, } from '../../../routes/kubernetesRoutesConsts' import { useCluster } from '../Cluster' -import { getBaseBreadcrumbs } from '../common/utils' +import { Kind } from '../common/types' +import ResourceLink from '../common/ResourceLink' import { EventTypeChip } from './utils' +import { getClusterBreadcrumbs } from './Cluster' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'cluster', - url: getClusterAbsPath(cluster?.id), - }, +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getClusterBreadcrumbs(cluster), { label: 'events', url: `${getClusterAbsPath(cluster?.id)}/${EVENTS_REL_PATH}`, @@ -50,22 +45,17 @@ const colObjectNamespace = columnHelper.accessor( { id: 'objectNamespace', header: 'Namespace', - cell: ({ getValue, table }) => { + cell: ({ getValue }) => { const namespace = getValue() - if (!namespace) return null - - const { cluster } = table.options.meta as { - cluster?: ClusterTinyFragment - } - return ( - e.stopPropagation()} - > - {getValue()} - + /> ) }, } diff --git a/assets/src/components/kubernetes/cluster/HorizontalPodAutoscalers.tsx b/assets/src/components/kubernetes/cluster/HorizontalPodAutoscalers.tsx index 4cf076ed12..690e01bde2 100644 --- a/assets/src/components/kubernetes/cluster/HorizontalPodAutoscalers.tsx +++ b/assets/src/components/kubernetes/cluster/HorizontalPodAutoscalers.tsx @@ -1,7 +1,4 @@ -import { ReactElement } from 'react' - -import { Link } from 'react-router-dom' - +import { ReactElement, useMemo } from 'react' import { createColumnHelper } from '@tanstack/react-table' import { ResourceList } from '../common/ResourceList' @@ -12,68 +9,72 @@ import { HorizontalPodAutoscalersQueryVariables, useHorizontalPodAutoscalersQuery, } from '../../../generated/graphql-kubernetes' -import { ClusterTinyFragment } from '../../../generated/graphql' -import { getResourceDetailsAbsPath } from '../../../routes/kubernetesRoutesConsts' -import { InlineLink } from '../../utils/typography/InlineLink' -import { DateTimeCol } from '../../utils/table/DateTimeCol' +import { toKind } from '../common/types' +import ResourceLink from '../common/ResourceLink' +import { useDefaultColumns } from '../common/utils' const columnHelper = createColumnHelper() -const COLUMNS = [ - columnHelper.accessor((hpa) => hpa?.objectMeta?.name, { - id: 'name', - header: 'Name', - cell: ({ getValue }) => getValue(), - }), - columnHelper.accessor((hpa) => hpa?.minReplicas, { +const COLUMNS = { + colMinReplicas: columnHelper.accessor((hpa) => hpa?.minReplicas, { id: 'minReplicas', header: 'Min replicas', cell: ({ getValue }) => getValue(), }), - columnHelper.accessor((hpa) => hpa?.maxReplicas, { + colMaxReplicas: columnHelper.accessor((hpa) => hpa?.maxReplicas, { id: 'maxReplicas', header: 'Max replicas', cell: ({ getValue }) => getValue(), }), - columnHelper.accessor((hpa) => hpa, { + colReference: columnHelper.accessor((hpa) => hpa, { id: 'reference', header: 'Reference', - cell: ({ getValue, table }) => { - const { cluster } = table.options.meta as { - cluster?: ClusterTinyFragment - } + cell: ({ getValue }) => { const hpa = getValue() const ref = hpa?.scaleTargetRef return ( - - - {ref?.kind?.toLowerCase()}/{ref?.name} - - + ) }, }), - columnHelper.accessor((hpa) => hpa?.objectMeta?.creationTimestamp, { - id: 'creationTimestamp', - header: 'Creation', - enableSorting: true, - cell: ({ getValue }) => , - }), -] +} export function useHorizontalPodAutoscalersColumns(): Array { - return COLUMNS + const { colAction, colName, colCreationTimestamp } = + useDefaultColumns(columnHelper) + const { colMinReplicas, colMaxReplicas, colReference } = COLUMNS + + return useMemo( + () => [ + colName, + colMinReplicas, + colMaxReplicas, + colReference, + colCreationTimestamp, + colAction, + ], + [ + colName, + colMinReplicas, + colMaxReplicas, + colReference, + colCreationTimestamp, + colAction, + ] + ) } export default function HorizontalPodAutoscalers(): ReactElement { + const columns = useHorizontalPodAutoscalersColumns() + return ( namespaced - columns={COLUMNS} + columns={columns} query={useHorizontalPodAutoscalersQuery} queryName="handleGetHorizontalPodAutoscalerList" itemsKey="horizontalpodautoscalers" diff --git a/assets/src/components/kubernetes/cluster/Namespace.tsx b/assets/src/components/kubernetes/cluster/Namespace.tsx index 5235573aee..d449e6a626 100644 --- a/assets/src/components/kubernetes/cluster/Namespace.tsx +++ b/assets/src/components/kubernetes/cluster/Namespace.tsx @@ -31,6 +31,8 @@ import { SubTitle } from '../../utils/SubTitle' import { useCluster } from '../Cluster' +import { Kind } from '../common/types' + import { getBreadcrumbs } from './Namespaces' import { NamespacePhaseChip } from './utils' import { useEventsColumns } from './Events' @@ -61,7 +63,7 @@ export default function Namespace(): ReactElement { ...getBreadcrumbs(cluster), { label: name ?? '', - url: getResourceDetailsAbsPath(clusterId, 'namespace', name), + url: getResourceDetailsAbsPath(clusterId, Kind.Namespace, name), }, ], [cluster, clusterId, name] diff --git a/assets/src/components/kubernetes/cluster/Namespaces.tsx b/assets/src/components/kubernetes/cluster/Namespaces.tsx index 73a7435df2..82efcb66ea 100644 --- a/assets/src/components/kubernetes/cluster/Namespaces.tsx +++ b/assets/src/components/kubernetes/cluster/Namespaces.tsx @@ -11,10 +11,10 @@ import { NamespacesQueryVariables, useNamespacesQuery, } from '../../../generated/graphql-kubernetes' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { NAMESPACES_REL_PATH, getClusterAbsPath, @@ -23,13 +23,10 @@ import { import { useCluster } from '../Cluster' import { NamespacePhaseChip } from './utils' +import { getClusterBreadcrumbs } from './Cluster' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'cluster', - url: getClusterAbsPath(cluster?.id), - }, +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getClusterBreadcrumbs(cluster), { label: 'namespaces', url: `${getClusterAbsPath(cluster?.id)}/${NAMESPACES_REL_PATH}`, @@ -49,11 +46,11 @@ export default function Namespaces() { useSetBreadcrumbs(useMemo(() => getBreadcrumbs(cluster), [cluster])) - const { colName, colLabels, colCreationTimestamp } = + const { colAction, colName, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) const columns = useMemo( - () => [colName, colPhase, colLabels, colCreationTimestamp], - [colName, colLabels, colCreationTimestamp] + () => [colName, colPhase, colLabels, colCreationTimestamp, colAction], + [colName, colLabels, colCreationTimestamp, colAction] ) return ( diff --git a/assets/src/components/kubernetes/cluster/Node.tsx b/assets/src/components/kubernetes/cluster/Node.tsx index d23587366f..145667b6ef 100644 --- a/assets/src/components/kubernetes/cluster/Node.tsx +++ b/assets/src/components/kubernetes/cluster/Node.tsx @@ -45,6 +45,8 @@ import { useCluster } from '../Cluster' import { MetadataSidecar, ResourceReadyChip } from '../common/utils' +import { Kind } from '../common/types' + import { getBreadcrumbs } from './Nodes' import { useEventsColumns } from './Events' @@ -77,7 +79,7 @@ export default function Node(): ReactElement { ...getBreadcrumbs(cluster), { label: name ?? '', - url: getResourceDetailsAbsPath(clusterId, 'namespace', name), + url: getResourceDetailsAbsPath(clusterId, Kind.Namespace, name), }, ], [cluster, clusterId, name] diff --git a/assets/src/components/kubernetes/cluster/Nodes.tsx b/assets/src/components/kubernetes/cluster/Nodes.tsx index 71b1a45afe..4ea00fd9ba 100644 --- a/assets/src/components/kubernetes/cluster/Nodes.tsx +++ b/assets/src/components/kubernetes/cluster/Nodes.tsx @@ -1,7 +1,6 @@ import { createColumnHelper } from '@tanstack/react-table' import { useMemo } from 'react' import { filesize } from 'filesize' - import { useSetBreadcrumbs } from '@pluralsh/design-system' import { @@ -12,28 +11,21 @@ import { NodesQueryVariables, useNodesQuery, } from '../../../generated/graphql-kubernetes' -import { - ResourceReadyChip, - getBaseBreadcrumbs, - useDefaultColumns, -} from '../common/utils' +import { ResourceReadyChip, useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' import { UsageBar } from '../../cluster/nodes/UsageBar' import { Usage } from '../../cluster/TableElements' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { NODES_REL_PATH, getClusterAbsPath, } from '../../../routes/kubernetesRoutesConsts' - import { useCluster } from '../Cluster' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'cluster', - url: getClusterAbsPath(cluster?.id), - }, +import { getClusterBreadcrumbs } from './Cluster' + +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getClusterBreadcrumbs(cluster), { label: 'nodes', url: `${getClusterAbsPath(cluster?.id)}/${NODES_REL_PATH}`, diff --git a/assets/src/components/kubernetes/common/DeleteResource.tsx b/assets/src/components/kubernetes/common/DeleteResource.tsx new file mode 100644 index 0000000000..5a019c4a46 --- /dev/null +++ b/assets/src/components/kubernetes/common/DeleteResource.tsx @@ -0,0 +1,114 @@ +import { ReactNode, useMemo, useState } from 'react' +import { Checkbox, IconFrame, TrashCanIcon } from '@pluralsh/design-system' +import { useParams } from 'react-router-dom' +import { QueryHookOptions } from '@apollo/client/react/types/types' +import { useTheme } from 'styled-components' + +import { Confirm } from '../../utils/Confirm' +import { + useNamespacedResourceDeleteMutation, + useResourceDeleteMutation, +} from '../../../generated/graphql-kubernetes' +import { KubernetesClient } from '../../../helpers/kubernetes.client' + +import { Resource } from './types' + +interface DeleteResourceProps { + resource: Resource + refetch?: Nullable< + (variables?: Partial) => Promise | void + > +} + +export default function DeleteResourceButton({ + resource, + refetch, +}: DeleteResourceProps): ReactNode { + const [open, setOpen] = useState(false) + + return ( +
e.stopPropagation()}> + } + onClick={() => setOpen(true)} + textValue="Delete" + tooltip + /> + {open && ( + + )} +
+ ) +} + +function DeleteResourceModal({ open, setOpen, resource, refetch }): ReactNode { + const theme = useTheme() + const [deleting, setDeleting] = useState(false) + const [deleteNow, setDeleteNow] = useState(false) + const { clusterId } = useParams() + const name = resource?.objectMeta?.name ?? '' + const namespace = resource?.objectMeta?.namespace ?? '' + const kind = resource?.typeMeta?.kind ?? '' + const deleteMutation = useMemo( + () => + namespace + ? useNamespacedResourceDeleteMutation + : useResourceDeleteMutation, + [namespace] + ) + + const [mutation, { error }] = deleteMutation({ + client: KubernetesClient(clusterId ?? ''), + variables: { + name, + namespace, + kind, + deleteNow: `${deleteNow}`, + }, + onError: () => setDeleting(false), + onCompleted: () => + refetch?.({ + fetchPolicy: 'no-cache', + }) + .then(() => setOpen(false)) + .finally(() => setDeleting(false)), + }) + + return ( + setOpen(false)} + destructive + label="Delete" + loading={deleting} + error={error} + errorMessage="Could not delete resource" + errorHeader="Something went wrong" + open={open} + submit={() => { + setDeleting(true) + mutation() + }} + title={`Delete ${kind}`} + text={`The ${kind} "${name}"${ + namespace ? ` in namespace "${namespace}"` : '' + } will be deleted.`} + extraContent={ + setDeleteNow(e.target.checked)} + css={{ + paddingTop: theme.spacing.medium, + }} + > + Delete now (sets delete grace period to 1 second) + + } + /> + ) +} diff --git a/assets/src/components/kubernetes/common/HorizontalPodAutoscalers.tsx b/assets/src/components/kubernetes/common/HorizontalPodAutoscalers.tsx index 99ddc3eaa5..f3925b82e4 100644 --- a/assets/src/components/kubernetes/common/HorizontalPodAutoscalers.tsx +++ b/assets/src/components/kubernetes/common/HorizontalPodAutoscalers.tsx @@ -7,11 +7,13 @@ import { HorizontalPodAutoscalersForResourceQueryVariables, useHorizontalPodAutoscalersForResourceQuery, } from '../../../generated/graphql-kubernetes' -import { ResourceList } from '../common/ResourceList' import { useHorizontalPodAutoscalersColumns } from '../cluster/HorizontalPodAutoscalers' +import { ResourceList } from './ResourceList' +import { Kind } from './types' + interface HorizontalPodAutoscalersProps { - kind: string + kind: Kind namespace: string name: string } diff --git a/assets/src/components/kubernetes/common/ImagePullSecrets.tsx b/assets/src/components/kubernetes/common/ImagePullSecrets.tsx index af998789f9..b7ac920075 100644 --- a/assets/src/components/kubernetes/common/ImagePullSecrets.tsx +++ b/assets/src/components/kubernetes/common/ImagePullSecrets.tsx @@ -1,10 +1,9 @@ import { createColumnHelper } from '@tanstack/react-table' import { ReactElement } from 'react' import { Table } from '@pluralsh/design-system' -import { Link } from 'react-router-dom' -import { getResourceDetailsAbsPath } from '../../../routes/kubernetesRoutesConsts' -import { InlineLink } from '../../utils/typography/InlineLink' +import { Kind } from './types' +import ResourceLink from './ResourceLink' const columnHelper = createColumnHelper() @@ -25,14 +24,17 @@ const columns = [ id: 'name', header: 'Name', cell: ({ getValue }) => { - const { clusterId, name, namespace } = getValue() + const { name, namespace } = getValue() return ( - - {name} - + ) }, }), diff --git a/assets/src/components/kubernetes/common/Raw.tsx b/assets/src/components/kubernetes/common/Raw.tsx index d9bd09c20b..ba023cea78 100644 --- a/assets/src/components/kubernetes/common/Raw.tsx +++ b/assets/src/components/kubernetes/common/Raw.tsx @@ -46,7 +46,7 @@ export default function Raw(): ReactElement { : useResourceUpdateMutation, [namespace] ) - const { data, refetch, loading } = resourceQuery({ + const { data, refetch, loading, error } = resourceQuery({ client: KubernetesClient(clusterId ?? ''), skip: !clusterId, fetchPolicy: 'no-cache', @@ -90,7 +90,7 @@ export default function Raw(): ReactElement { } }, [data]) - if (!current) return + if (!current && !error) return if (!data?.handleGetResource?.Object && !loading) return diff --git a/assets/src/components/kubernetes/common/ResourceDetails.tsx b/assets/src/components/kubernetes/common/ResourceDetails.tsx index ebdbdc011f..802dd0f380 100644 --- a/assets/src/components/kubernetes/common/ResourceDetails.tsx +++ b/assets/src/components/kubernetes/common/ResourceDetails.tsx @@ -18,12 +18,14 @@ export interface TabEntry { interface ResourceDetailsProps { tabs: Array + additionalHeaderContent?: Array | ReactElement sidecar: ReactElement children?: Array | ReactElement } export default function ResourceDetails({ tabs, + additionalHeaderContent, sidecar, children, }: ResourceDetailsProps): ReactElement { @@ -53,11 +55,17 @@ export default function ResourceDetails({ > -
+
{tabs.map(({ label, path }) => ( @@ -87,6 +96,7 @@ export default function ResourceDetails({
{headerContent} + {additionalHeaderContent} { + let partial = '' + const { kind, namespace, name } = objectRef ?? {} + + if (short) { + return name + } + + if (full && kind) { + partial += `${kind}/` + } + + return namespace ? `${partial}${namespace}/${name}` : `${partial}${name}` + }, [full, objectRef, short]) + + if (full && short) { + throw new Error( + "full and short props are mutually exclusive and can't both be set to true" + ) + } + + if (!objectRef?.name) return emptyState + + return ( + + {message} + + ) +} diff --git a/assets/src/components/kubernetes/common/ResourceList.tsx b/assets/src/components/kubernetes/common/ResourceList.tsx index 6d19bd36ad..73934a9428 100644 --- a/assets/src/components/kubernetes/common/ResourceList.tsx +++ b/assets/src/components/kubernetes/common/ResourceList.tsx @@ -1,5 +1,4 @@ import { ReactElement, useCallback, useEffect, useMemo } from 'react' -import type { OperationVariables } from '@apollo/client/core' import type { QueryHookOptions, QueryResult, @@ -7,14 +6,9 @@ import type { import { Table } from '@pluralsh/design-system' import styled from 'styled-components' import { useNavigate } from 'react-router-dom' -import { Row } from '@tanstack/react-table' +import { Row, SortingState, TableOptions } from '@tanstack/react-table' import { KubernetesClient } from '../../../helpers/kubernetes.client' -import { - Types_ListMeta as ListMetaT, - Types_ObjectMeta as ObjectMetaT, - Types_TypeMeta as TypeMetaT, -} from '../../../generated/graphql-kubernetes' import { FullHeightTableWrap } from '../../utils/layout/FullHeightTableWrap' import { getCustomResourceDetailsAbsPath, @@ -23,57 +17,24 @@ import { import { useCluster } from '../Cluster' import { useDataSelect } from './DataSelect' +import { + QueryName, + ResourceListItemsKey, + ResourceList as ResourceListT, + Resource as ResourceT, + ResourceVariables, + toKind, +} from './types' +import { ErrorToast } from './errors' import { DEFAULT_DATA_SELECT, - ITEMS_PER_PAGE, extendConnection, usePageInfo, useSortedTableOptions, } from './utils' -interface DataSelectVariables extends OperationVariables { - filterBy?: Nullable - sortBy?: Nullable - itemsPerPage?: Nullable - page?: Nullable -} - -interface ResourceVariables extends DataSelectVariables { - namespace?: Nullable -} - -interface ResourceListT { - listMeta: ListMetaT -} - -export interface ResourceT { - objectMeta: ObjectMetaT - typeMeta: TypeMetaT -} - -type QueryName = Exclude, '__typename'> -type ResourceListItemsKey = Exclude< - Extract, - '__typename' | 'listMeta' | 'errors' | 'status' | 'cumulativeMetrics' -> - -interface ResourceListProps< - TResourceList, - TQuery, - TVariables extends ResourceVariables, -> { - columns: Array - query: ( - baseOptions: QueryHookOptions - ) => QueryResult - queryOptions?: QueryHookOptions - queryName: QueryName - itemsKey: ResourceListItemsKey - namespaced?: boolean - customResource?: boolean - disableOnRowClick?: boolean -} +const SKELETON_ITEMS = 10 const Skeleton = styled(SkeletonUnstyled)(({ theme }) => ({ '@keyframes moving-gradient': { @@ -105,6 +66,26 @@ function SkeletonUnstyled({ ...props }): ReactElement { ) } +interface ResourceListProps< + TResourceList, + TQuery, + TVariables extends ResourceVariables, +> { + columns: Array + initialSort?: SortingState + query: ( + baseOptions: QueryHookOptions + ) => QueryResult + queryOptions?: QueryHookOptions + queryName: QueryName + itemsKey: ResourceListItemsKey + namespaced?: boolean + customResource?: boolean + disableOnRowClick?: boolean + maxHeight?: string + tableOptions?: Omit, 'data' | 'columns' | 'getCoreRowModel'> +} + export function ResourceList< TResourceList extends ResourceListT, TResource extends ResourceT, @@ -112,6 +93,7 @@ export function ResourceList< TVariables extends ResourceVariables, >({ columns, + initialSort, query, queryOptions, namespaced = false, @@ -119,15 +101,17 @@ export function ResourceList< queryName, itemsKey, disableOnRowClick, + maxHeight, + tableOptions, }: ResourceListProps): ReactElement { const navigate = useNavigate() const cluster = useCluster() const { setNamespaced, namespace, filter } = useDataSelect() - const { sortBy, reactTableOptions } = useSortedTableOptions({ - meta: { cluster }, + const { sortBy, reactTableOptions } = useSortedTableOptions(initialSort, { + meta: { cluster, ...tableOptions }, }) - const { data, loading, fetchMore } = query({ + const { data, loading, fetchMore, refetch } = query({ client: KubernetesClient(cluster?.id ?? ''), skip: !cluster, pollInterval: 30_000, @@ -144,7 +128,7 @@ export function ResourceList< const items = useMemo( () => loading - ? Array(ITEMS_PER_PAGE - 1).fill({}) + ? Array(SKELETON_ITEMS).fill({}) : (resourceList?.[itemsKey] as Array) ?? [], [itemsKey, loading, resourceList] ) @@ -175,41 +159,47 @@ export function ResourceList< }, [setNamespaced, namespaced]) return ( - - ) => { - navigate( - customResource - ? getCustomResourceDetailsAbsPath( - cluster?.id, - row.original.typeMeta.kind!, - row.original.objectMeta.name!, - row.original.objectMeta.namespace - ) - : getResourceDetailsAbsPath( - cluster?.id, - row.original.typeMeta.kind!, - row.original.objectMeta.name!, - row.original.objectMeta.namespace - ) - ) - } - } - css={{ - maxHeight: 'unset', - height: '100%', - }} - /> - + <> + + +
) => { + navigate( + customResource + ? getCustomResourceDetailsAbsPath( + cluster?.id, + row.original.typeMeta.kind!, + row.original.objectMeta.name!, + row.original.objectMeta.namespace + ) + : getResourceDetailsAbsPath( + cluster?.id, + toKind(row.original.typeMeta.kind!), + row.original.objectMeta.name!, + row.original.objectMeta.namespace + ) + ) + } + } + css={{ + maxHeight: maxHeight ?? 'unset', + height: '100%', + }} + /> + + ) } diff --git a/assets/src/components/kubernetes/common/ResourceOwner.tsx b/assets/src/components/kubernetes/common/ResourceOwner.tsx index b2ebe0c71b..fcc45f938e 100644 --- a/assets/src/components/kubernetes/common/ResourceOwner.tsx +++ b/assets/src/components/kubernetes/common/ResourceOwner.tsx @@ -1,41 +1,36 @@ import { ReactElement } from 'react' import moment from 'moment' import { ChipList } from '@pluralsh/design-system' -import { Link } from 'react-router-dom' import { Controller_ResourceOwner as ResourceOwnerT } from '../../../generated/graphql-kubernetes' -import { getResourceDetailsAbsPath } from '../../../routes/kubernetesRoutesConsts' -import { InlineLink } from '../../utils/typography/InlineLink' import ResourceInfoCard, { ResourceInfoCardEntry, ResourceInfoCardSection, } from './ResourceInfoCard' import Annotations from './Annotations' +import ResourceLink from './ResourceLink' +import { toKind } from './types' interface ResourceOwnerProps { owner: Nullable - clusterId: Nullable } export default function ResourceOwner({ owner, - clusterId, }: ResourceOwnerProps): ReactElement { return ( - - {owner?.objectMeta?.name} - + {owner?.pods?.running} / {owner?.pods?.desired} diff --git a/assets/src/components/kubernetes/common/Subjects.tsx b/assets/src/components/kubernetes/common/Subjects.tsx index 4b175ee0e6..9f7ce2cacd 100644 --- a/assets/src/components/kubernetes/common/Subjects.tsx +++ b/assets/src/components/kubernetes/common/Subjects.tsx @@ -1,14 +1,14 @@ -import { ReactElement } from 'react' +import React, { ReactElement } from 'react' import { Table } from '@pluralsh/design-system' import { createColumnHelper } from '@tanstack/react-table' -import { Link, useParams } from 'react-router-dom' import { Maybe, V1_Subject as SubjectT, } from '../../../generated/graphql-kubernetes' -import { getResourceDetailsAbsPath } from '../../../routes/kubernetesRoutesConsts' -import { InlineLink } from '../../utils/typography/InlineLink' + +import { Kind } from './types' +import ResourceLink from './ResourceLink' const columnHelper = createColumnHelper() @@ -22,20 +22,16 @@ const columns = [ id: 'namespace', header: 'Namespace', cell: ({ getValue }) => { - // eslint-disable-next-line react-hooks/rules-of-hooks - const { clusterId } = useParams() - const namespace = getValue() - if (!namespace) return null - return ( - e.stopPropagation()} - > - {namespace} - + /> ) }, }), diff --git a/assets/src/components/kubernetes/common/errors.tsx b/assets/src/components/kubernetes/common/errors.tsx new file mode 100644 index 0000000000..54d847a291 --- /dev/null +++ b/assets/src/components/kubernetes/common/errors.tsx @@ -0,0 +1,54 @@ +import { ReactElement, useCallback, useEffect, useState } from 'react' +import { GraphQLToast } from '@pluralsh/design-system' + +import { hash } from '../../../utils/sha' + +import type { Error } from './types' + +interface ErrorToastProps { + errors: Nullable> +} + +function ErrorToast({ errors }: ErrorToastProps): Nullable { + const [queue, setQueue] = useState>(errors?.slice(1) ?? []) + const [error, setError] = useState>(errors?.at(0)) + const [sha, setSHA] = useState() + const onClose = useCallback(() => { + const error = [...queue].shift() + + setQueue(queue.slice(1)) + setError(error) + }, [queue]) + + useEffect(() => { + calculateSHA(JSON.stringify(error)) + + async function calculateSHA(current: string) { + setSHA(await hash(current ?? '')) + } + }, [error]) + + useEffect(() => { + if (!errors) { + return + } + + setQueue(errors?.slice(1) ?? []) + setError(errors?.at(0)) + }, [errors]) + + return ( + error && ( + + ) + ) +} + +export { ErrorToast } diff --git a/assets/src/components/kubernetes/common/types.ts b/assets/src/components/kubernetes/common/types.ts new file mode 100644 index 0000000000..c16dd11f6e --- /dev/null +++ b/assets/src/components/kubernetes/common/types.ts @@ -0,0 +1,128 @@ +import type { OperationVariables } from '@apollo/client/core' + +import { + Types_ListMeta as ListMetaT, + Types_ObjectMeta as ObjectMetaT, + Types_TypeMeta as TypeMetaT, +} from '../../../generated/graphql-kubernetes' + +interface ErrorStatus { + code: number + message: string + reason: string + status: string +} + +interface Error { + ErrStatus: ErrorStatus +} + +interface DataSelectVariables extends OperationVariables { + filterBy?: Nullable + sortBy?: Nullable + itemsPerPage?: Nullable + page?: Nullable +} + +interface ResourceVariables extends DataSelectVariables { + namespace?: Nullable +} + +interface ResourceList { + errors: Array + listMeta: ListMetaT +} + +interface Resource { + objectMeta: ObjectMetaT + typeMeta: TypeMetaT +} + +type QueryName = Exclude, '__typename'> +type ResourceListItemsKey = Exclude< + Extract, + '__typename' | 'listMeta' | 'errors' | 'status' | 'cumulativeMetrics' +> + +enum Kind { + // Workloads + Deployment = 'deployment', + Pod = 'pod', + ReplicaSet = 'replicaset', + StatefulSet = 'statefulset', + DaemonSet = 'daemonset', + Job = 'job', + CronJob = 'cronjob', + ReplicationController = 'replicationcontroller', + // Discovery + Service = 'service', + Ingress = 'ingress', + IngressClass = 'ingressclass', + NetworkPolicy = 'networkpolicy', + // Storage + PersistentVolumeClaim = 'persistentvolumeclaim', + PersistentVolume = 'persistentvolume', + StorageClass = 'storageclass', + // Configuration + ConfigMap = 'configmap', + Secret = 'secret', + // Access + Role = 'role', + RoleBinding = 'rolebinding', + ClusterRole = 'clusterrole', + ClusterRoleBinding = 'clusterrolebinding', + ServiceAccount = 'serviceaccount', + // Cluster + Node = 'node', + Event = 'event', + Namespace = 'namespace', + HorizontalPodAutoscaler = 'horizontalpodautoscaler', + // CRD + CustomResourceDefinition = 'customresourcedefinition', + None = '', +} + +interface ObjectReference { + kind: Kind + namespace?: Nullable + name: Nullable +} + +interface UnknownProps { + [key: string]: unknown +} + +function toKind(kind: Nullable): Kind { + if (!kind) { + return Kind.None + } + + const result = Object.values(Kind).find((k) => k === kind?.toLowerCase()) + + if (result) { + return result + } + + throw new Error(`Unknown resource kind: ${kind}`) +} + +function fromResource(resource: Resource): ObjectReference { + return { + kind: toKind(resource?.typeMeta?.kind?.toLowerCase() ?? ''), + name: resource?.objectMeta?.name ?? '', + namespace: resource?.objectMeta?.namespace ?? '', + } +} + +export type { + Error, + ResourceVariables, + ResourceList, + Resource, + QueryName, + ResourceListItemsKey, + ObjectReference, + UnknownProps, +} + +export { fromResource, toKind, Kind } diff --git a/assets/src/components/kubernetes/common/utils.tsx b/assets/src/components/kubernetes/common/utils.tsx index 2e409030bf..932bf175d1 100644 --- a/assets/src/components/kubernetes/common/utils.tsx +++ b/assets/src/components/kubernetes/common/utils.tsx @@ -2,11 +2,8 @@ import uniqWith from 'lodash/uniqWith' import React, { ReactNode, useMemo, useState } from 'react' import { ColumnHelper, SortingState, TableOptions } from '@tanstack/react-table' import { Chip, ChipList, Sidecar, SidecarItem } from '@pluralsh/design-system' -import { Link, useParams } from 'react-router-dom' import moment from 'moment/moment' - import yaml from 'js-yaml' - import { capitalize } from 'lodash' import { @@ -16,16 +13,13 @@ import { Types_TypeMeta as TypeMetaT, } from '../../../generated/graphql-kubernetes' import { DateTimeCol } from '../../utils/table/DateTimeCol' -import { ClusterTinyFragment } from '../../../generated/graphql' -import { - getKubernetesAbsPath, - getResourceDetailsAbsPath, -} from '../../../routes/kubernetesRoutesConsts' +import { KubernetesClusterFragment } from '../../../generated/graphql' +import { getKubernetesAbsPath } from '../../../routes/kubernetesRoutesConsts' -import { InlineLink } from '../../utils/typography/InlineLink' - -import { ResourceT } from './ResourceList' +import { Kind, Resource } from './types' import Annotations from './Annotations' +import ResourceLink from './ResourceLink' +import DeleteResourceButton from './DeleteResource' export const ITEMS_PER_PAGE = 25 @@ -53,26 +47,17 @@ export function useDefaultColumns< id: 'namespace', header: 'Namespace', enableSorting: true, - cell: ({ getValue, table, row }) => { + cell: ({ getValue }) => { const namespace = getValue() - if (!namespace) return null - - const { cluster } = table.options.meta as { - cluster?: ClusterTinyFragment - } - return ( - e.stopPropagation()} - > - {getValue()} - + /> ) }, }), @@ -102,6 +87,16 @@ export function useDefaultColumns< cell: ({ getValue }) => , } ), + colAction: columnHelper.accessor((r) => r, { + id: 'action', + header: '', + cell: ({ getValue, table }) => ( + + ), + }), }), [columnHelper] ) @@ -133,32 +128,6 @@ export function ResourceReadyChip({ ) } -export function ResourceLink({ - name, - namespace, - kind, - emptyState = '-', -}: { - name?: Maybe - namespace?: Maybe - kind: string - emptyState?: string -}) { - const { clusterId } = useParams() - - if (!name) return emptyState - - return ( - - - {namespace} - {namespace && '/'} - {name} - - - ) -} - export function usePageInfo(items: any[], listMeta: ListMetaT | undefined) { const totalItems = listMeta?.totalItems ?? 0 const pages = Math.ceil(totalItems / ITEMS_PER_PAGE) @@ -169,9 +138,10 @@ export function usePageInfo(items: any[], listMeta: ListMetaT | undefined) { } export function useSortedTableOptions( + initialSort?: SortingState, options?: Omit, 'data' | 'columns' | 'getCoreRowModel'> ) { - const [sorting, setSorting] = useState([]) + const [sorting, setSorting] = useState(initialSort ?? []) return useMemo( () => ({ @@ -211,7 +181,9 @@ export function extendConnection( } } -export const getBaseBreadcrumbs = (cluster?: Maybe) => [ +export const getBaseBreadcrumbs = ( + cluster?: Maybe +) => [ { label: 'kubernetes', url: getKubernetesAbsPath(cluster?.id), @@ -256,7 +228,7 @@ export function MetadataSidecar({ resource, children, }: { - resource?: Maybe + resource?: Maybe children?: ReactNode }) { const objectMeta = resource?.objectMeta @@ -269,7 +241,12 @@ export function MetadataSidecar({ {objectMeta.name} {objectMeta.namespace && ( - {objectMeta.namespace} + )} {objectMeta.uid} diff --git a/assets/src/components/kubernetes/configuration/ConfigMap.tsx b/assets/src/components/kubernetes/configuration/ConfigMap.tsx index 4eccf0eef1..307260578e 100644 --- a/assets/src/components/kubernetes/configuration/ConfigMap.tsx +++ b/assets/src/components/kubernetes/configuration/ConfigMap.tsx @@ -23,6 +23,8 @@ import ResourceDetails, { TabEntry } from '../common/ResourceDetails' import { useCluster } from '../Cluster' +import { Kind } from '../common/types' + import { getBreadcrumbs } from './ConfigMaps' const directory: Array = [ @@ -59,7 +61,7 @@ export default function ConfigMap(): ReactElement { label: name ?? '', url: getResourceDetailsAbsPath( clusterId, - 'configmap', + Kind.ConfigMap, name, namespace ), diff --git a/assets/src/components/kubernetes/configuration/ConfigMaps.tsx b/assets/src/components/kubernetes/configuration/ConfigMaps.tsx index 0c1cef165e..df6f7406e8 100644 --- a/assets/src/components/kubernetes/configuration/ConfigMaps.tsx +++ b/assets/src/components/kubernetes/configuration/ConfigMaps.tsx @@ -4,7 +4,7 @@ import { createColumnHelper } from '@tanstack/react-table' import { useSetBreadcrumbs } from '@pluralsh/design-system' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' import { Configmap_ConfigMapList as ConfigMapListT, @@ -18,15 +18,13 @@ import { CONFIG_MAPS_REL_PATH, getConfigurationAbsPath, } from '../../../routes/kubernetesRoutesConsts' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { useCluster } from '../Cluster' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'configuration', - url: getConfigurationAbsPath(cluster?.id), - }, +import { getConfigurationBreadcrumbs } from './Configuration' + +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getConfigurationBreadcrumbs(cluster), { label: 'config maps', url: `${getConfigurationAbsPath(cluster?.id)}/${CONFIG_MAPS_REL_PATH}`, @@ -40,11 +38,11 @@ export default function ConfigMaps() { useSetBreadcrumbs(useMemo(() => getBreadcrumbs(cluster), [cluster])) - const { colName, colNamespace, colLabels, colCreationTimestamp } = + const { colAction, colName, colNamespace, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) const columns = useMemo( - () => [colName, colNamespace, colLabels, colCreationTimestamp], - [colName, colNamespace, colLabels, colCreationTimestamp] + () => [colName, colNamespace, colLabels, colCreationTimestamp, colAction], + [colName, colNamespace, colLabels, colCreationTimestamp, colAction] ) return ( diff --git a/assets/src/components/kubernetes/configuration/Configuration.tsx b/assets/src/components/kubernetes/configuration/Configuration.tsx index 5fb3e15fe6..5a6537dc9f 100644 --- a/assets/src/components/kubernetes/configuration/Configuration.tsx +++ b/assets/src/components/kubernetes/configuration/Configuration.tsx @@ -1,6 +1,6 @@ import { Outlet, useLocation, useMatch } from 'react-router-dom' import { SubTab, TabList, TabPanel } from '@pluralsh/design-system' -import { Suspense, useMemo, useRef, useState } from 'react' +import { Suspense, useMemo, useRef } from 'react' import { CONFIG_MAPS_REL_PATH, @@ -11,13 +11,23 @@ import { import { ScrollablePage } from '../../utils/layout/ScrollablePage' import { LinkTabWrap } from '../../utils/Tabs' import { PluralErrorBoundary } from '../../cd/PluralErrorBoundary' -import { - PageScrollableContext, - useSetPageHeaderContent, -} from '../../cd/ContinuousDeployment' +import { useSetPageHeaderContent } from '../../cd/ContinuousDeployment' import LoadingIndicator from '../../utils/LoadingIndicator' import { useCluster } from '../Cluster' +import { Maybe } from '../../../generated/graphql-kubernetes' +import { KubernetesClusterFragment } from '../../../generated/graphql' +import { getBaseBreadcrumbs } from '../common/utils' + +export const getConfigurationBreadcrumbs = ( + cluster?: Maybe +) => [ + ...getBaseBreadcrumbs(cluster), + { + label: 'configuration', + url: getConfigurationAbsPath(cluster?.id), + }, +] const directory = [ { path: CONFIG_MAPS_REL_PATH, label: 'Config maps' }, @@ -26,15 +36,6 @@ const directory = [ export default function Configuration() { const cluster = useCluster() - const [scrollable, setScrollable] = useState(false) - - const pageScrollableContext = useMemo( - () => ({ - setScrollable, - }), - [] - ) - const tabStateRef = useRef(null) const pathMatch = useMatch(`${getConfigurationAbsPath(cluster?.id)}/:tab/*`) const tab = pathMatch?.params?.tab || '' @@ -79,18 +80,16 @@ export default function Configuration() { return ( - - }> - - - + }> + + diff --git a/assets/src/components/kubernetes/configuration/Secret.tsx b/assets/src/components/kubernetes/configuration/Secret.tsx index 3cbbb6a2be..cbfad64d14 100644 --- a/assets/src/components/kubernetes/configuration/Secret.tsx +++ b/assets/src/components/kubernetes/configuration/Secret.tsx @@ -1,4 +1,4 @@ -import { ReactElement, useEffect, useMemo, useState } from 'react' +import React, { ReactElement, useEffect, useMemo, useState } from 'react' import { Button, EyeClosedIcon, @@ -28,8 +28,11 @@ import { getResourceDetailsAbsPath, } from '../../../routes/kubernetesRoutesConsts' import ResourceDetails, { TabEntry } from '../common/ResourceDetails' - import { useCluster } from '../Cluster' +import { useSetPageHeaderContent } from '../../cd/ContinuousDeployment' +import { FullHeightTableWrap } from '../../utils/layout/FullHeightTableWrap' + +import { Kind } from '../common/types' import { getBreadcrumbs } from './Secrets' @@ -65,7 +68,12 @@ export default function Secret(): ReactElement { }, { label: name ?? '', - url: getResourceDetailsAbsPath(clusterId, 'secret', name, namespace), + url: getResourceDetailsAbsPath( + clusterId, + Kind.Secret, + name, + namespace + ), }, ], [cluster, clusterId, name, namespace] @@ -154,9 +162,24 @@ const columns = [ ] export function SecretData(): ReactElement { - const theme = useTheme() const secret = useOutletContext() as SecretT const [revealAll, setRevealAll] = useState(false) + + const headerContent = useMemo( + () => ( + + ), + [revealAll, setRevealAll] + ) + + useSetPageHeaderContent(headerContent) + const data: SecretDataEntry[] = useMemo( () => Object.entries(secret?.data ?? {}).map(([key, value]) => ({ @@ -167,23 +190,7 @@ export function SecretData(): ReactElement { ) return ( -
-
- -
+
- + ) } diff --git a/assets/src/components/kubernetes/configuration/Secrets.tsx b/assets/src/components/kubernetes/configuration/Secrets.tsx index 6f8ad9aef3..eb1d6484c9 100644 --- a/assets/src/components/kubernetes/configuration/Secrets.tsx +++ b/assets/src/components/kubernetes/configuration/Secrets.tsx @@ -3,7 +3,7 @@ import { createColumnHelper } from '@tanstack/react-table' import { useSetBreadcrumbs } from '@pluralsh/design-system' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' import { Maybe, @@ -13,19 +13,17 @@ import { SecretsQueryVariables, useSecretsQuery, } from '../../../generated/graphql-kubernetes' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { SECRETS_REL_PATH, getConfigurationAbsPath, } from '../../../routes/kubernetesRoutesConsts' import { useCluster } from '../Cluster' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'configuration', - url: getConfigurationAbsPath(cluster?.id), - }, +import { getConfigurationBreadcrumbs } from './Configuration' + +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getConfigurationBreadcrumbs(cluster), { label: 'secrets', url: `${getConfigurationAbsPath(cluster?.id)}/${SECRETS_REL_PATH}`, @@ -45,11 +43,18 @@ export default function Secrets() { useSetBreadcrumbs(useMemo(() => getBreadcrumbs(cluster), [cluster])) - const { colName, colNamespace, colLabels, colCreationTimestamp } = + const { colAction, colName, colNamespace, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) const columns = useMemo( - () => [colName, colNamespace, colType, colLabels, colCreationTimestamp], - [colName, colNamespace, colLabels, colCreationTimestamp] + () => [ + colName, + colNamespace, + colType, + colLabels, + colCreationTimestamp, + colAction, + ], + [colName, colNamespace, colLabels, colCreationTimestamp, colAction] ) return ( diff --git a/assets/src/components/kubernetes/customresources/CustomResource.tsx b/assets/src/components/kubernetes/customresources/CustomResource.tsx index 071f71a1cb..c6e33dbcf6 100644 --- a/assets/src/components/kubernetes/customresources/CustomResource.tsx +++ b/assets/src/components/kubernetes/customresources/CustomResource.tsx @@ -13,17 +13,16 @@ import { useCustomResourceQuery, } from '../../../generated/graphql-kubernetes' import { KubernetesClient } from '../../../helpers/kubernetes.client' - import { getResourceDetailsAbsPath } from '../../../routes/kubernetesRoutesConsts' import LoadingIndicator from '../../utils/LoadingIndicator' import ResourceDetails, { TabEntry } from '../common/ResourceDetails' import { useCluster } from '../Cluster' - import { useEventsColumns } from '../cluster/Events' import { ResourceList } from '../common/ResourceList' - import { NAMESPACE_PARAM } from '../Navigation' +import { Kind } from '../common/types' + import { getBreadcrumbs } from './CustomResourceDefinitions' const directory: Array = [ @@ -51,7 +50,7 @@ export default function CustomResource(): ReactElement { label: crd ?? '', url: getResourceDetailsAbsPath( clusterId, - 'customresourcedefinition', + Kind.CustomResourceDefinition, crd ), }, @@ -61,7 +60,7 @@ export default function CustomResource(): ReactElement { label: namespace, url: `${getResourceDetailsAbsPath( clusterId, - 'customresourcedefinition', + Kind.CustomResourceDefinition, crd )}?${NAMESPACE_PARAM}=${namespace}`, }, @@ -86,7 +85,7 @@ export default function CustomResource(): ReactElement { } export function CustomResourceEvents(): ReactElement { - const { name } = useParams() + const { name, namespace, crd } = useParams() const columns = useEventsColumns() return ( @@ -100,7 +99,11 @@ export function CustomResourceEvents(): ReactElement { columns={columns} query={useCustomResourceEventsQuery} queryOptions={{ - variables: { name } as CustomResourceEventsQueryVariables, + variables: { + name, + namespace, + crd, + } as CustomResourceEventsQueryVariables, }} queryName="handleGetCustomResourceObjectEvents" itemsKey="events" diff --git a/assets/src/components/kubernetes/customresources/CustomResourceDefinition.tsx b/assets/src/components/kubernetes/customresources/CustomResourceDefinition.tsx index 0d177eab1b..122ace0424 100644 --- a/assets/src/components/kubernetes/customresources/CustomResourceDefinition.tsx +++ b/assets/src/components/kubernetes/customresources/CustomResourceDefinition.tsx @@ -33,9 +33,10 @@ import { ResourceList } from '../common/ResourceList' import { useCluster } from '../Cluster' import { useSetPageHeaderContent } from '../../cd/ContinuousDeployment' import { DataSelectInputs, useDataSelect } from '../common/DataSelect' - import { NAMESPACE_PARAM } from '../Navigation' +import { Kind } from '../common/types' + import { getBreadcrumbs } from './CustomResourceDefinitions' import { CRDEstablishedChip } from './utils' @@ -67,7 +68,7 @@ export default function CustomResourceDefinition(): ReactElement { label: name ?? '', url: getResourceDetailsAbsPath( clusterId, - 'customresourcedefinition', + Kind.CustomResourceDefinition, name ), }, @@ -113,8 +114,8 @@ export function CustomRersourceDefinitionObjects(): ReactElement { const namespaced = crd.scope.toLowerCase() === 'namespaced' const dataSelect = useDataSelect() const { name } = useParams() - const [params] = useSearchParams() - const { colName, colNamespace, colLabels, colCreationTimestamp } = + const [params, setParams] = useSearchParams() + const { colAction, colName, colNamespace, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) const columns = useMemo( () => [ @@ -122,22 +123,33 @@ export function CustomRersourceDefinitionObjects(): ReactElement { ...(namespaced ? [colNamespace] : []), colLabels, colCreationTimestamp, + colAction, ], - [namespaced, colName, colNamespace, colLabels, colCreationTimestamp] + [ + namespaced, + colName, + colNamespace, + colLabels, + colCreationTimestamp, + colAction, + ] ) useEffect( - () => dataSelect.setNamespaced(namespaced), + () => { + dataSelect.setNamespaced(namespaced) + dataSelect.setNamespace(params.get(NAMESPACE_PARAM) ?? '') + }, // eslint-disable-next-line react-hooks/exhaustive-deps - [dataSelect.setNamespaced, namespaced] + [] ) - // TODO: Update param when namespace changes. - useEffect( - () => dataSelect.setNamespace(params.get(NAMESPACE_PARAM) ?? ''), - // eslint-disable-next-line react-hooks/exhaustive-deps - [dataSelect.setNamespace, params] - ) + useEffect(() => { + if (isEmpty(dataSelect.namespace)) params.delete(NAMESPACE_PARAM) + else params.set(NAMESPACE_PARAM, dataSelect.namespace) + + setParams(params) + }, [dataSelect.namespace, params, setParams]) const headerContent = useMemo( () => , diff --git a/assets/src/components/kubernetes/customresources/CustomResourceDefinitions.tsx b/assets/src/components/kubernetes/customresources/CustomResourceDefinitions.tsx index 4c3c5a6e21..4978319543 100644 --- a/assets/src/components/kubernetes/customresources/CustomResourceDefinitions.tsx +++ b/assets/src/components/kubernetes/customresources/CustomResourceDefinitions.tsx @@ -1,27 +1,56 @@ import { createColumnHelper } from '@tanstack/react-table' -import React, { useMemo } from 'react' -import { useTheme } from 'styled-components' -import { ChipList, useSetBreadcrumbs } from '@pluralsh/design-system' +import React, { useMemo, useRef, useState } from 'react' +import styled, { useTheme } from 'styled-components' +import { + ChipList, + CloseIcon, + IconFrame, + PushPinIcon, + SubTab, + TabList, + Toast, + Tooltip, + useSetBreadcrumbs, +} from '@pluralsh/design-system' +import { useParams } from 'react-router-dom' + +import { ApolloError } from 'apollo-boost' import { + Types_CustomResourceDefinition as CustomResourceDefinitionT, CustomResourceDefinitionsQuery, CustomResourceDefinitionsQueryVariables, Types_CustomResourceDefinitionList as CustomResourceListT, - Types_CustomResourceDefinition as CustomResourceT, Maybe, useCustomResourceDefinitionsQuery, } from '../../../generated/graphql-kubernetes' import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' +import { + KubernetesClusterFragment, + PinnedCustomResourceFragment, + usePinCustomResourceMutation, + useUnpinCustomResourceMutation, +} from '../../../generated/graphql' +import { + getCustomResourcesAbsPath, + getResourceDetailsAbsPath, +} from '../../../routes/kubernetesRoutesConsts' +import { + useCluster, + useIsPinnedResource, + usePinnedResources, + useRefetch, +} from '../Cluster' -import { ClusterTinyFragment } from '../../../generated/graphql' -import { getCustomResourcesAbsPath } from '../../../routes/kubernetesRoutesConsts' +import { LinkTabWrap } from '../../utils/Tabs' +import { useSetPageHeaderContent } from '../../cd/ContinuousDeployment' -import { useCluster } from '../Cluster' +import { Kind } from '../common/types' import { CRDEstablishedChip } from './utils' -export const getBreadcrumbs = (cluster?: Maybe) => [ +export const getBreadcrumbs = (cluster?: Maybe) => [ ...getBaseBreadcrumbs(cluster), { label: 'custom resources', @@ -29,7 +58,7 @@ export const getBreadcrumbs = (cluster?: Maybe) => [ }, ] -const columnHelper = createColumnHelper() +const columnHelper = createColumnHelper() const colName = columnHelper.accessor((r) => r?.objectMeta.name, { id: 'name', @@ -61,6 +90,12 @@ const colVersion = columnHelper.accessor((crd) => crd?.version, { cell: ({ getValue }) => getValue(), }) +const colKind = columnHelper.accessor((crd) => crd?.names?.kind, { + id: 'kind', + header: 'Kind', + cell: ({ getValue }) => getValue(), +}) + const colScope = columnHelper.accessor((crd) => crd?.scope, { id: 'scope', header: 'Scope', @@ -86,27 +121,234 @@ const colCategories = columnHelper.accessor((crd) => crd?.names.categories, { ), }) +const colPin = columnHelper.accessor((crd) => crd, { + id: 'pin', + header: '', + cell: ({ getValue }) => { + const crd = getValue() + + return ( + crd?.objectMeta?.name && + crd?.group && + crd?.version && + crd?.names?.kind && + crd?.scope && ( + + ) + ) + }, +}) + +function PinCustomResourceDefinition({ + name, + group, + version, + kind, + namespaced, +}: { + name: string + group: string + version: string + kind: string + namespaced: boolean +}) { + const { clusterId } = useParams() + const refetchClusters = useRefetch() + const isPinned = useIsPinnedResource(kind, version, group) + const [success, setSuccess] = useState(false) + const [error, setError] = useState() + const [mutation] = usePinCustomResourceMutation({ + variables: { + attributes: { + name, + group, + version, + kind, + namespaced, + clusterId, + displayName: kind, // TODO: Add modal with input so users can pick it on their own. + }, + }, + onError: (error) => { + setError(error) + setTimeout(() => setError(undefined), 3000) + }, + onCompleted: () => { + refetchClusters?.() + setSuccess(true) + setTimeout(() => setSuccess(false), 3000) + }, + }) + + return ( + <> + {!isPinned && ( + } + textValue="Pin custom resource" + tooltip + size="medium" + clickable + onClick={(e) => { + e.stopPropagation() + mutation() + }} + /> + )} + {success && ( + + Resource pinned successfully + + )} + {error && ( + + {error.message} + + )} + + ) +} + +const DeleteIcon = styled(CloseIcon)(({ theme }) => ({ + marginLeft: theme.spacing.xxsmall, + padding: theme.spacing.xxsmall, + opacity: 0, + '&:hover': { + color: theme.colors['icon-danger'], + }, +})) + +const LinkContainer = styled(LinkTabWrap)(() => ({ + [`:hover ${DeleteIcon}`]: { opacity: 1 }, +})) + +function PinnedCustomResourceDefinitions({ + cluster, + pinnedResources, +}: { + cluster?: KubernetesClusterFragment + pinnedResources: Maybe[] +}) { + const refetchClusters = useRefetch() + const tabStateRef = useRef(null) + const [error, setError] = useState() + const [mutation] = useUnpinCustomResourceMutation({ + onCompleted: () => refetchClusters?.(), + onError: (error) => { + setError(error) + setTimeout(() => setError(undefined), 3000) + }, + }) + + return ( + + <> + {pinnedResources + .filter((pr): pr is PinnedCustomResourceFragment => !!pr) + .map(({ id, name, displayName }) => ( + + + {displayName} + + {/* TODO: Add loading icon. */} + { + e.preventDefault() + mutation({ variables: { id } }) + }} + /> + + + + ))} + {error && ( + + {error.message} + + )} + + + ) +} + export default function CustomResourceDefinitions() { const theme = useTheme() const cluster = useCluster() + const pinnedResources = usePinnedResources() useSetBreadcrumbs(useMemo(() => getBreadcrumbs(cluster), [cluster])) - const { colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) + const { colAction, colLabels, colCreationTimestamp } = + useDefaultColumns(columnHelper) const columns = useMemo( () => [ colName, colGroup, colVersion, + colKind, colScope, colEstablished, colCategories, colLabels, colCreationTimestamp, + colPin, + colAction, ], - [colLabels, colCreationTimestamp] + [colAction, colLabels, colCreationTimestamp] + ) + + const headerContent = useMemo( + () => ( + + ), + [cluster, pinnedResources] ) + useSetPageHeaderContent(headerContent) + return (
diff --git a/assets/src/components/kubernetes/discovery/Discovery.tsx b/assets/src/components/kubernetes/discovery/Discovery.tsx index 342d3ab9c6..aae3aa7ce5 100644 --- a/assets/src/components/kubernetes/discovery/Discovery.tsx +++ b/assets/src/components/kubernetes/discovery/Discovery.tsx @@ -1,6 +1,6 @@ import { Outlet, useLocation, useMatch } from 'react-router-dom' import { SubTab, TabList, TabPanel } from '@pluralsh/design-system' -import { Suspense, useMemo, useRef, useState } from 'react' +import { Suspense, useMemo, useRef } from 'react' import { INGRESSES_REL_PATH, @@ -13,12 +13,22 @@ import { import { ScrollablePage } from '../../utils/layout/ScrollablePage' import { LinkTabWrap } from '../../utils/Tabs' import { PluralErrorBoundary } from '../../cd/PluralErrorBoundary' -import { - PageScrollableContext, - useSetPageHeaderContent, -} from '../../cd/ContinuousDeployment' +import { useSetPageHeaderContent } from '../../cd/ContinuousDeployment' import LoadingIndicator from '../../utils/LoadingIndicator' import { useCluster } from '../Cluster' +import { Maybe } from '../../../generated/graphql-kubernetes' +import { KubernetesClusterFragment } from '../../../generated/graphql' +import { getBaseBreadcrumbs } from '../common/utils' + +export const getDiscoveryBreadcrumbs = ( + cluster?: Maybe +) => [ + ...getBaseBreadcrumbs(cluster), + { + label: 'discovery', + url: getDiscoveryAbsPath(cluster?.id), + }, +] const directory = [ { path: SERVICES_REL_PATH, label: 'Services' }, @@ -29,15 +39,6 @@ const directory = [ export default function Discovery() { const cluster = useCluster() - const [scrollable, setScrollable] = useState(false) - - const pageScrollableContext = useMemo( - () => ({ - setScrollable, - }), - [] - ) - const tabStateRef = useRef(null) const pathMatch = useMatch(`${getDiscoveryAbsPath(cluster?.id)}/:tab/*`) const tab = pathMatch?.params?.tab || '' @@ -82,18 +83,16 @@ export default function Discovery() { return ( - - }> - - - + }> + + diff --git a/assets/src/components/kubernetes/discovery/Ingress.tsx b/assets/src/components/kubernetes/discovery/Ingress.tsx index 0e18ec42e4..c2349b90b3 100644 --- a/assets/src/components/kubernetes/discovery/Ingress.tsx +++ b/assets/src/components/kubernetes/discovery/Ingress.tsx @@ -1,7 +1,5 @@ import React, { ReactElement, useMemo } from 'react' - -import { Link, Outlet, useOutletContext, useParams } from 'react-router-dom' - +import { Outlet, useOutletContext, useParams } from 'react-router-dom' import { Card, ChipList, @@ -9,9 +7,7 @@ import { Table, useSetBreadcrumbs, } from '@pluralsh/design-system' - import { useTheme } from 'styled-components' - import { createColumnHelper } from '@tanstack/react-table' import ResourceDetails, { TabEntry } from '../common/ResourceDetails' @@ -28,28 +24,20 @@ import { useIngressQuery, } from '../../../generated/graphql-kubernetes' import { KubernetesClient } from '../../../helpers/kubernetes.client' - import { INGRESSES_REL_PATH, getDiscoveryAbsPath, getResourceDetailsAbsPath, } from '../../../routes/kubernetesRoutesConsts' - import { NAMESPACE_PARAM } from '../Navigation' - import LoadingIndicator from '../../utils/LoadingIndicator' - import { useEventsColumns } from '../cluster/Events' - import { ResourceList } from '../common/ResourceList' - import { SubTitle } from '../../utils/SubTitle' - import { ResourceInfoCardEntry } from '../common/ResourceInfoCard' - -import { InlineLink } from '../../utils/typography/InlineLink' - import { useCluster } from '../Cluster' +import { Kind } from '../common/types' +import ResourceLink from '../common/ResourceLink' import { getBreadcrumbs } from './Ingresses' import { Endpoints } from './utils' @@ -87,7 +75,12 @@ export default function Ingress(): ReactElement { }, { label: name ?? '', - url: getResourceDetailsAbsPath(clusterId, 'ingress', name, namespace), + url: getResourceDetailsAbsPath( + clusterId, + Kind.Ingress, + name, + namespace + ), }, ], [cluster, clusterId, name, namespace] @@ -152,20 +145,18 @@ const columns = [ header: 'Service', cell: ({ getValue }) => { // eslint-disable-next-line react-hooks/rules-of-hooks - const { clusterId, namespace } = useParams() + const { namespace } = useParams() return ( - e.stopPropagation()} - > - {getValue()} - + /> ) }, }), @@ -179,20 +170,18 @@ const columns = [ header: 'TLS secret', cell: ({ getValue }) => { // eslint-disable-next-line react-hooks/rules-of-hooks - const { clusterId, namespace } = useParams() + const { namespace } = useParams() return ( - e.stopPropagation()} - > - {getValue()} - + /> ) }, }), diff --git a/assets/src/components/kubernetes/discovery/IngressClass.tsx b/assets/src/components/kubernetes/discovery/IngressClass.tsx index b569cdd95a..c7aaf43496 100644 --- a/assets/src/components/kubernetes/discovery/IngressClass.tsx +++ b/assets/src/components/kubernetes/discovery/IngressClass.tsx @@ -14,6 +14,8 @@ import ResourceDetails, { TabEntry } from '../common/ResourceDetails' import { useCluster } from '../Cluster' +import { Kind } from '../common/types' + import { getBreadcrumbs } from './IngressClasses' const directory: Array = [{ path: 'raw', label: 'Raw' }] as const @@ -38,7 +40,7 @@ export default function IngressClass(): ReactElement { ...getBreadcrumbs(cluster), { label: name ?? '', - url: getResourceDetailsAbsPath(clusterId, 'ingressclass', name), + url: getResourceDetailsAbsPath(clusterId, Kind.IngressClass, name), }, ], [cluster, clusterId, name] diff --git a/assets/src/components/kubernetes/discovery/IngressClasses.tsx b/assets/src/components/kubernetes/discovery/IngressClasses.tsx index c9317b61c1..0870c8efc9 100644 --- a/assets/src/components/kubernetes/discovery/IngressClasses.tsx +++ b/assets/src/components/kubernetes/discovery/IngressClasses.tsx @@ -11,21 +11,19 @@ import { Maybe, useIngressClassesQuery, } from '../../../generated/graphql-kubernetes' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { INGRESS_CLASSES_REL_PATH, getDiscoveryAbsPath, } from '../../../routes/kubernetesRoutesConsts' import { useCluster } from '../Cluster' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'discovery', - url: getDiscoveryAbsPath(cluster?.id), - }, +import { getDiscoveryBreadcrumbs } from './Discovery' + +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getDiscoveryBreadcrumbs(cluster), { label: 'ingress classes', url: `${getDiscoveryAbsPath(cluster?.id)}/${INGRESS_CLASSES_REL_PATH}`, @@ -48,11 +46,11 @@ export default function IngressClasses() { useSetBreadcrumbs(useMemo(() => getBreadcrumbs(cluster), [cluster])) - const { colName, colLabels, colCreationTimestamp } = + const { colAction, colName, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) const columns = useMemo( - () => [colName, colController, colLabels, colCreationTimestamp], - [colName, colLabels, colCreationTimestamp] + () => [colName, colController, colLabels, colCreationTimestamp, colAction], + [colName, colLabels, colCreationTimestamp, colAction] ) return ( diff --git a/assets/src/components/kubernetes/discovery/Ingresses.tsx b/assets/src/components/kubernetes/discovery/Ingresses.tsx index e9b70271e6..3b6655a5ff 100644 --- a/assets/src/components/kubernetes/discovery/Ingresses.tsx +++ b/assets/src/components/kubernetes/discovery/Ingresses.tsx @@ -12,11 +12,11 @@ import { Maybe, useIngressesQuery, } from '../../../generated/graphql-kubernetes' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' import { TableText } from '../../cluster/TableElements' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { INGRESSES_REL_PATH, getDiscoveryAbsPath, @@ -25,13 +25,10 @@ import { import { useCluster } from '../Cluster' import { TableEndpoints } from './utils' +import { getDiscoveryBreadcrumbs } from './Discovery' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'discovery', - url: getDiscoveryAbsPath(cluster?.id), - }, +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getDiscoveryBreadcrumbs(cluster), { label: 'ingresses', url: `${getDiscoveryAbsPath(cluster?.id)}/${INGRESSES_REL_PATH}`, @@ -59,7 +56,7 @@ const colHosts = columnHelper.accessor((ingress) => ingress?.hosts, { }) export function useIngressesColumns(): Array { - const { colName, colNamespace, colLabels, colCreationTimestamp } = + const { colAction, colName, colNamespace, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) return useMemo( @@ -70,8 +67,9 @@ export function useIngressesColumns(): Array { colHosts, colLabels, colCreationTimestamp, + colAction, ], - [colName, colNamespace, colLabels, colCreationTimestamp] + [colName, colNamespace, colLabels, colCreationTimestamp, colAction] ) } diff --git a/assets/src/components/kubernetes/discovery/NetworkPolicies.tsx b/assets/src/components/kubernetes/discovery/NetworkPolicies.tsx index 99077b5e58..8864ac5092 100644 --- a/assets/src/components/kubernetes/discovery/NetworkPolicies.tsx +++ b/assets/src/components/kubernetes/discovery/NetworkPolicies.tsx @@ -11,22 +11,20 @@ import { Networkpolicy_NetworkPolicy as NetworkPolicyT, useNetworkPoliciesQuery, } from '../../../generated/graphql-kubernetes' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { NETWORK_POLICIES_REL_PATH, getDiscoveryAbsPath, } from '../../../routes/kubernetesRoutesConsts' import { useCluster } from '../Cluster' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'discovery', - url: getDiscoveryAbsPath(cluster?.id), - }, +import { getDiscoveryBreadcrumbs } from './Discovery' + +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getDiscoveryBreadcrumbs(cluster), { label: 'network policies', url: `${getDiscoveryAbsPath(cluster?.id)}/${NETWORK_POLICIES_REL_PATH}`, @@ -40,11 +38,11 @@ export default function NetworkPolicies() { useSetBreadcrumbs(useMemo(() => getBreadcrumbs(cluster), [cluster])) - const { colName, colNamespace, colLabels, colCreationTimestamp } = + const { colAction, colName, colNamespace, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) const columns = useMemo( - () => [colName, colNamespace, colLabels, colCreationTimestamp], - [colName, colNamespace, colLabels, colCreationTimestamp] + () => [colName, colNamespace, colLabels, colCreationTimestamp, colAction], + [colName, colNamespace, colLabels, colCreationTimestamp, colAction] ) return ( diff --git a/assets/src/components/kubernetes/discovery/NetworkPolicy.tsx b/assets/src/components/kubernetes/discovery/NetworkPolicy.tsx index c2eedf88d8..9f77c66f91 100644 --- a/assets/src/components/kubernetes/discovery/NetworkPolicy.tsx +++ b/assets/src/components/kubernetes/discovery/NetworkPolicy.tsx @@ -26,6 +26,8 @@ import { SubTitle } from '../../utils/SubTitle' import { useCluster } from '../Cluster' +import { Kind } from '../common/types' + import { getBreadcrumbs } from './Services' const directory: Array = [ @@ -62,7 +64,7 @@ export default function NetworkPolicy(): ReactElement { label: name ?? '', url: getResourceDetailsAbsPath( clusterId, - 'networkpolicy', + Kind.NetworkPolicy, name, namespace ), diff --git a/assets/src/components/kubernetes/discovery/Service.tsx b/assets/src/components/kubernetes/discovery/Service.tsx index b047c1d32e..852a6561ef 100644 --- a/assets/src/components/kubernetes/discovery/Service.tsx +++ b/assets/src/components/kubernetes/discovery/Service.tsx @@ -50,8 +50,10 @@ import { ResourceInfoCardEntry } from '../common/ResourceInfoCard' import { useCluster } from '../Cluster' +import { Kind } from '../common/types' + import { getBreadcrumbs } from './Services' -import { Endpoints } from './utils' +import { Endpoints, serviceTypeDisplayName } from './utils' import { useIngressesColumns } from './Ingresses' const directory: Array = [ @@ -89,7 +91,12 @@ export default function Service(): ReactElement { }, { label: name ?? '', - url: getResourceDetailsAbsPath(clusterId, 'service', name, namespace), + url: getResourceDetailsAbsPath( + clusterId, + Kind.Service, + name, + namespace + ), }, ], [cluster, clusterId, name, namespace] @@ -103,7 +110,10 @@ export default function Service(): ReactElement { tabs={directory} sidecar={ - {service?.type} + + {serviceTypeDisplayName[service?.type.toLowerCase() ?? ''] ?? + service?.type} + {service?.clusterIP} {service?.sessionAffinity} diff --git a/assets/src/components/kubernetes/discovery/Services.tsx b/assets/src/components/kubernetes/discovery/Services.tsx index 8d88ef52ac..d76f227ef4 100644 --- a/assets/src/components/kubernetes/discovery/Services.tsx +++ b/assets/src/components/kubernetes/discovery/Services.tsx @@ -11,10 +11,10 @@ import { ServicesQueryVariables, useServicesQuery, } from '../../../generated/graphql-kubernetes' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { SERVICES_REL_PATH, getDiscoveryAbsPath, @@ -23,13 +23,10 @@ import { import { useCluster } from '../Cluster' import { TableEndpoints, serviceTypeDisplayName } from './utils' +import { getDiscoveryBreadcrumbs } from './Discovery' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'discovery', - url: getDiscoveryAbsPath(cluster?.id), - }, +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getDiscoveryBreadcrumbs(cluster), { label: 'services', url: `${getDiscoveryAbsPath(cluster?.id)}/${SERVICES_REL_PATH}`, @@ -70,7 +67,7 @@ const colExternalEndpoints = columnHelper.accessor( ) export function useServicesColumns(): Array { - const { colName, colNamespace, colLabels, colCreationTimestamp } = + const { colAction, colName, colNamespace, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) return useMemo( @@ -83,8 +80,9 @@ export function useServicesColumns(): Array { colExternalEndpoints, colLabels, colCreationTimestamp, + colAction, ], - [colName, colNamespace, colLabels, colCreationTimestamp] + [colName, colNamespace, colLabels, colCreationTimestamp, colAction] ) } diff --git a/assets/src/components/kubernetes/storage/PersistentVolume.tsx b/assets/src/components/kubernetes/storage/PersistentVolume.tsx index d7e987d1aa..9247d720d1 100644 --- a/assets/src/components/kubernetes/storage/PersistentVolume.tsx +++ b/assets/src/components/kubernetes/storage/PersistentVolume.tsx @@ -5,7 +5,7 @@ import { SidecarItem, useSetBreadcrumbs, } from '@pluralsh/design-system' -import { Link, Outlet, useOutletContext, useParams } from 'react-router-dom' +import { Outlet, useOutletContext, useParams } from 'react-router-dom' import { useTheme } from 'styled-components' import { @@ -15,14 +15,14 @@ import { } from '../../../generated/graphql-kubernetes' import { KubernetesClient } from '../../../helpers/kubernetes.client' import LoadingIndicator from '../../utils/LoadingIndicator' -import { MetadataSidecar, ResourceLink } from '../common/utils' +import { MetadataSidecar } from '../common/utils' import { getResourceDetailsAbsPath } from '../../../routes/kubernetesRoutesConsts' import ResourceDetails, { TabEntry } from '../common/ResourceDetails' -import { InlineLink } from '../../utils/typography/InlineLink' import { SubTitle } from '../../utils/SubTitle' import { ResourceInfoCardEntry } from '../common/ResourceInfoCard' - import { useCluster } from '../Cluster' +import ResourceLink from '../common/ResourceLink' +import { Kind } from '../common/types' import { PVStatusChip } from './utils' import { getBreadcrumbs } from './PersistentVolumes' @@ -52,7 +52,11 @@ export default function PersistentVolume(): ReactElement { ...getBreadcrumbs(cluster), { label: name ?? '', - url: getResourceDetailsAbsPath(clusterId, 'persistentvolume', name), + url: getResourceDetailsAbsPath( + clusterId, + Kind.PersistentVolume, + name + ), }, ], [cluster, clusterId, name] @@ -78,31 +82,21 @@ export default function PersistentVolume(): ReactElement { /> - {pv?.claim ? ( - - {pv?.claim} - - ) : ( - '-' - )} + - - {pv?.storageClass} - + @@ -143,582 +137,592 @@ export function PersistentVolumeInfo(): ReactElement { const source = pv?.persistentVolumeSource return ( - <> -
- {/* TODO: Handle all sources. */} - Source - - {source?.awsElasticBlockStore && ( - <> - - AWS Elastic Block Store - - - {source.awsElasticBlockStore.fsType} - - - {source.awsElasticBlockStore.readOnly} - - - {source.awsElasticBlockStore.volumeID} - - - {source.awsElasticBlockStore.partition} - - - )} - {source?.azureDisk && ( - <> - - Azure disk - - - {source.azureDisk.fsType} - - - {source.azureDisk.readOnly} - - - {source.azureDisk.diskName} - - - {source.azureDisk.diskURI} - - - {source.azureDisk.kind} - - - {source.azureDisk.cachingMode} - - - )} - {source?.azureFile && ( - <> - - Azure file - - - {source.azureFile.shareName} - - - {source.azureFile.readOnly} - +
+ Source + + {source?.awsElasticBlockStore && ( + <> + + AWS Elastic Block Store + + + {source.awsElasticBlockStore.fsType} + + + {source.awsElasticBlockStore.readOnly} + + + {source.awsElasticBlockStore.volumeID} + + + {source.awsElasticBlockStore.partition} + + + )} + {source?.azureDisk && ( + <> + + Azure disk + + + {source.azureDisk.fsType} + + + {source.azureDisk.readOnly} + + + {source.azureDisk.diskName} + + + {source.azureDisk.diskURI} + + + {source.azureDisk.kind} + + + {source.azureDisk.cachingMode} + + + )} + {source?.azureFile && ( + <> + + Azure file + + + {source.azureFile.shareName} + + + {source.azureFile.readOnly} + + + + + + )} + {source?.cephfs && ( + <> + + Ceph Storage Cluster + + + {source.cephfs.readOnly} + + + {source.cephfs.path} + + + {source.cephfs.user} + + + + + + {source.cephfs.secretFile} + + + + + + )} + {source?.cinder && ( + <> + Cinder + + {source.cinder.fsType} + + + {source.cinder.readOnly} + + + {source.cinder.volumeID} + + {source.cinder.secretRef && ( - - )} - {source?.cephfs && ( - <> - - Ceph Storage Cluster - - - {source.cephfs.readOnly} - - - {source.cephfs.path} - - - {source.cephfs.user} - - - - - - {source.cephfs.secretFile} - - + )} + + )} + {source?.csi && ( + <> + CSI + + {source.csi.fsType} + + + {source.csi.readOnly} + + + {source.csi.driver} + + + {source.csi.volumeHandle} + + {source.csi.controllerExpandSecretRef && ( + - - - )} - {source?.cinder && ( - <> - - Cinder - - - {source.cinder.fsType} - - - {source.cinder.readOnly} - - - {source.cinder.volumeID} - - {source.cinder.secretRef && ( - - - - )} - - )} - {source?.csi && ( - <> - CSI - - {source.csi.fsType} - - - {source.csi.readOnly} - - - {source.csi.driver} - - - {source.csi.volumeHandle} - - {source.csi.controllerExpandSecretRef && ( - - - - )} - {source.csi.controllerPublishSecretRef && ( - - - - )} - {source.csi.nodeExpandSecretRef && ( - - - - )} - {source.csi.nodePublishSecretRef && ( - - - - )} - {source.csi.nodeStageSecretRef && ( - - - - )} - - label.join(': ')} - limit={5} + objectRef={{ + kind: Kind.Secret, + namespace: source.csi.controllerExpandSecretRef?.namespace, + name: source.csi.controllerExpandSecretRef?.name, + }} /> - - )} - {source?.fc && ( - <> - - Fibre Channel - - - {source.fc.fsType} - - - {source.fc.readOnly} - - - {source.fc.lun} - - - - - - - - - )} - {source?.flexVolume && ( - <> - - Flex Volume - - - {source.flexVolume.fsType} - - - {source.flexVolume.readOnly} - - - {source.flexVolume.driver} - - - {source.flexVolume.options} - - + )} + {source.csi.controllerPublishSecretRef && ( + - - - )} - {source?.flocker && ( - <> - - Flocker - - - {source.flocker.datasetName} - - - {source.flocker.datasetUUID} - - - )} - {source?.gcePersistentDisk && ( - <> - - GCE Persistent Disk - - - {source.gcePersistentDisk.fsType} - - - {source.gcePersistentDisk.readOnly} - - - {source.gcePersistentDisk.pdName} - - - {source.gcePersistentDisk.partition} - - - )} - {source?.glusterfs && ( - <> - - Gluster - - - {source.glusterfs.readOnly} - - - {source.glusterfs.path} - - - {source.glusterfs.endpoints} - - - {source.glusterfs.endpointsNamespace} - - - )} - {source?.hostPath && ( - <> - - Host path - - - {source.hostPath.type} - - - {source.hostPath.path} - - - )} - {source?.iscsi && ( - <> - - iSCSI - - - {source.iscsi.fsType} - - - {source.iscsi.readOnly} - - - {source.iscsi.targetPortal} - - - {source.iscsi.lun} - - - {source.iscsi.iqn} - - - {source.iscsi.chapAuthDiscovery} - - - {source.iscsi.chapAuthSession} - - - {source.iscsi.initiatorName} - - - {source.iscsi.iscsiInterface} - - - {source.iscsi.targetPortal} - - - - - - )} - {source?.local && ( - <> - - Local - - - {source.local.fsType} - - - {source.local.path} - - - )} - {source?.nfs && ( - <> - NFS - - {source.nfs.readOnly} - - - {source.nfs.server} - - - {source.nfs.path} - - - )} - {source?.photonPersistentDisk && ( - <> - - Photon OS persistent disk - - - {source.photonPersistentDisk.fsType} - - - {source.photonPersistentDisk.pdID} - - - )} - {source?.portworxVolume && ( - <> - - Portworx volume - - - {source.portworxVolume.fsType} - - - {source.portworxVolume.readOnly} - - - {source.portworxVolume.volumeID} - - - )} - {source?.quobyte && ( - <> - - Quobyte - - - {source.quobyte.readOnly} - - - {source.quobyte.volume} - - - {source.quobyte.user} - - - {source.quobyte.group} - - - {source.quobyte.registry} - - - )} - {source?.rbd && ( - <> - RBD - - {source.rbd.fsType} - - - {source.rbd.readOnly} - - - {source.rbd.image} - - - {source.rbd.keyring} - - - {source.rbd.pool} - - - {source.rbd.user} - - - - + )} + {source.csi.nodeExpandSecretRef && ( + - - )} - {source?.scaleIO && ( - <> - - ScaleIO - - - {source.scaleIO.fsType} - - - {source.scaleIO.readOnly} - - - {source.scaleIO.volumeName} - - - {source.scaleIO.gateway} - - - {source.scaleIO.protectionDomain} - - - {source.scaleIO.sslEnabled} - - - {source.scaleIO.storageMode} - - - {source.scaleIO.storagePool} - - - {source.scaleIO.system} - - + )} + {source.csi.nodePublishSecretRef && ( + - - )} - {source?.storageos && ( - <> - - StorageOS - - - {source.storageos.fsType} - - - {source.storageos.readOnly} - - - {source.storageos.volumeName} - - - {source.storageos.volumeNamespace} - - + )} + {source.csi.nodeStageSecretRef && ( + - - )} - {source?.vsphereVolume && ( - <> - - vSphere volume - - - {source.vsphereVolume.fsType} - - - {source.vsphereVolume.volumePath} - - - {source.vsphereVolume.storagePolicyID} - - - {source.vsphereVolume.storagePolicyName} - - - )} - -
- {/* TODO: Show it after fixing type issues. */} - {/*
*/} - {/* Capacity */} - {/* */} - {/*
*/} - + )} + + label.join(': ')} + limit={5} + /> + + + )} + {source?.fc && ( + <> + + Fibre Channel + + + {source.fc.fsType} + + + {source.fc.readOnly} + + + {source.fc.lun} + + + + + + + + + )} + {source?.flexVolume && ( + <> + + Flex Volume + + + {source.flexVolume.fsType} + + + {source.flexVolume.readOnly} + + + {source.flexVolume.driver} + + + {source.flexVolume.options} + + + + + + )} + {source?.flocker && ( + <> + + Flocker + + + {source.flocker.datasetName} + + + {source.flocker.datasetUUID} + + + )} + {source?.gcePersistentDisk && ( + <> + + GCE Persistent Disk + + + {source.gcePersistentDisk.fsType} + + + {source.gcePersistentDisk.readOnly} + + + {source.gcePersistentDisk.pdName} + + + {source.gcePersistentDisk.partition} + + + )} + {source?.glusterfs && ( + <> + + Gluster + + + {source.glusterfs.readOnly} + + + {source.glusterfs.path} + + + {source.glusterfs.endpoints} + + + {source.glusterfs.endpointsNamespace} + + + )} + {source?.hostPath && ( + <> + + Host path + + + {source.hostPath.type} + + + {source.hostPath.path} + + + )} + {source?.iscsi && ( + <> + iSCSI + + {source.iscsi.fsType} + + + {source.iscsi.readOnly} + + + {source.iscsi.targetPortal} + + + {source.iscsi.lun} + + + {source.iscsi.iqn} + + + {source.iscsi.chapAuthDiscovery} + + + {source.iscsi.chapAuthSession} + + + {source.iscsi.initiatorName} + + + {source.iscsi.iscsiInterface} + + + {source.iscsi.targetPortal} + + + + + + )} + {source?.local && ( + <> + Local + + {source.local.fsType} + + + {source.local.path} + + + )} + {source?.nfs && ( + <> + NFS + + {source.nfs.readOnly} + + + {source.nfs.server} + + + {source.nfs.path} + + + )} + {source?.photonPersistentDisk && ( + <> + + Photon OS persistent disk + + + {source.photonPersistentDisk.fsType} + + + {source.photonPersistentDisk.pdID} + + + )} + {source?.portworxVolume && ( + <> + + Portworx volume + + + {source.portworxVolume.fsType} + + + {source.portworxVolume.readOnly} + + + {source.portworxVolume.volumeID} + + + )} + {source?.quobyte && ( + <> + + Quobyte + + + {source.quobyte.readOnly} + + + {source.quobyte.volume} + + + {source.quobyte.user} + + + {source.quobyte.group} + + + {source.quobyte.registry} + + + )} + {source?.rbd && ( + <> + RBD + + {source.rbd.fsType} + + + {source.rbd.readOnly} + + + {source.rbd.image} + + + {source.rbd.keyring} + + + {source.rbd.pool} + + + {source.rbd.user} + + + + + + + + + )} + {source?.scaleIO && ( + <> + + ScaleIO + + + {source.scaleIO.fsType} + + + {source.scaleIO.readOnly} + + + {source.scaleIO.volumeName} + + + {source.scaleIO.gateway} + + + {source.scaleIO.protectionDomain} + + + {source.scaleIO.sslEnabled} + + + {source.scaleIO.storageMode} + + + {source.scaleIO.storagePool} + + + {source.scaleIO.system} + + + + + + )} + {source?.storageos && ( + <> + + StorageOS + + + {source.storageos.fsType} + + + {source.storageos.readOnly} + + + {source.storageos.volumeName} + + + {source.storageos.volumeNamespace} + + + + + + )} + {source?.vsphereVolume && ( + <> + + vSphere volume + + + {source.vsphereVolume.fsType} + + + {source.vsphereVolume.volumePath} + + + {source.vsphereVolume.storagePolicyID} + + + {source.vsphereVolume.storagePolicyName} + + + )} +
+
) } diff --git a/assets/src/components/kubernetes/storage/PersistentVolumeClaim.tsx b/assets/src/components/kubernetes/storage/PersistentVolumeClaim.tsx index e80475e5e8..be8d7099ce 100644 --- a/assets/src/components/kubernetes/storage/PersistentVolumeClaim.tsx +++ b/assets/src/components/kubernetes/storage/PersistentVolumeClaim.tsx @@ -1,7 +1,5 @@ import React, { ReactElement, useMemo } from 'react' - -import { Link, Outlet, useParams } from 'react-router-dom' - +import { Outlet, useParams } from 'react-router-dom' import { ChipList, SidecarItem, @@ -15,7 +13,6 @@ import { usePersistentVolumeClaimQuery, } from '../../../generated/graphql-kubernetes' import { KubernetesClient } from '../../../helpers/kubernetes.client' - import { PERSISTENT_VOLUME_CLAIMS_REL_PATH, getResourceDetailsAbsPath, @@ -23,10 +20,9 @@ import { } from '../../../routes/kubernetesRoutesConsts' import { NAMESPACE_PARAM } from '../Navigation' import LoadingIndicator from '../../utils/LoadingIndicator' - -import { InlineLink } from '../../utils/typography/InlineLink' - import { useCluster } from '../Cluster' +import { Kind } from '../common/types' +import ResourceLink from '../common/ResourceLink' import { getBreadcrumbs } from './PersistentVolumeClaims' import { PVCStatusChip } from './utils' @@ -62,7 +58,7 @@ export default function PersistentVolumeClaim(): ReactElement { label: name ?? '', url: getResourceDetailsAbsPath( clusterId, - 'persistentvolumeclaim', + Kind.PersistentVolumeClaim, name, namespace ), @@ -89,26 +85,20 @@ export default function PersistentVolumeClaim(): ReactElement { />
- - {pvc?.volume} - + - - {pvc?.storageClass} - + diff --git a/assets/src/components/kubernetes/storage/PersistentVolumeClaims.tsx b/assets/src/components/kubernetes/storage/PersistentVolumeClaims.tsx index b39cdf0665..9552916876 100644 --- a/assets/src/components/kubernetes/storage/PersistentVolumeClaims.tsx +++ b/assets/src/components/kubernetes/storage/PersistentVolumeClaims.tsx @@ -1,7 +1,6 @@ import { createColumnHelper } from '@tanstack/react-table' -import { useMemo } from 'react' +import React, { useMemo } from 'react' import { ChipList, useSetBreadcrumbs } from '@pluralsh/design-system' -import { Link } from 'react-router-dom' import { Maybe, @@ -11,26 +10,22 @@ import { PersistentVolumeClaimsQueryVariables, usePersistentVolumeClaimsQuery, } from '../../../generated/graphql-kubernetes' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' -import { ClusterTinyFragment } from '../../../generated/graphql' -import { InlineLink } from '../../utils/typography/InlineLink' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { PERSISTENT_VOLUME_CLAIMS_REL_PATH, - getResourceDetailsAbsPath, getStorageAbsPath, } from '../../../routes/kubernetesRoutesConsts' - import { useCluster } from '../Cluster' +import { Kind } from '../common/types' +import ResourceLink from '../common/ResourceLink' import { PVCStatusChip } from './utils' +import { getStorageBreadcrumbs } from './Storage' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'storage', - url: getStorageAbsPath(cluster?.id), - }, +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getStorageBreadcrumbs(cluster), { label: 'persistent volume claims', url: `${getStorageAbsPath( @@ -56,7 +51,7 @@ export const colCapacity = columnHelper.accessor((pvc) => pvc.capacity, { }) export const usePersistentVolumeClaimListColumns = () => { - const { colName, colNamespace, colLabels, colCreationTimestamp } = + const { colAction, colName, colNamespace, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) return useMemo( @@ -71,46 +66,28 @@ export const usePersistentVolumeClaimListColumns = () => { columnHelper.accessor((pvc) => pvc.volume, { id: 'volume', header: 'Volume', - cell: ({ getValue, table }) => { - const { cluster } = table.options.meta as { - cluster?: ClusterTinyFragment - } - - return ( - e.stopPropagation()} - > - {getValue()} - - ) - }, + cell: ({ getValue }) => ( + e.stopPropagation()} + /> + ), }), columnHelper.accessor((pvc) => pvc.storageClass, { id: 'storageClass', header: 'Storage class', - cell: ({ getValue, table }) => { - const { cluster } = table.options.meta as { - cluster?: ClusterTinyFragment - } - - return ( - e.stopPropagation()} - > - {getValue()} - - ) - }, + cell: ({ getValue }) => ( + e.stopPropagation()} + /> + ), }), columnHelper.accessor((pvc) => pvc.accessModes, { id: 'accessModes', @@ -128,8 +105,9 @@ export const usePersistentVolumeClaimListColumns = () => { colCapacity, colLabels, colCreationTimestamp, + colAction, ], - [colCreationTimestamp, colLabels, colName, colNamespace] + [colCreationTimestamp, colLabels, colName, colNamespace, colAction] ) } diff --git a/assets/src/components/kubernetes/storage/PersistentVolumes.tsx b/assets/src/components/kubernetes/storage/PersistentVolumes.tsx index f83660f9f5..bd50d9e36c 100644 --- a/assets/src/components/kubernetes/storage/PersistentVolumes.tsx +++ b/assets/src/components/kubernetes/storage/PersistentVolumes.tsx @@ -1,7 +1,6 @@ import { createColumnHelper } from '@tanstack/react-table' -import { useMemo } from 'react' +import React, { useMemo } from 'react' import { ChipList, useSetBreadcrumbs } from '@pluralsh/design-system' -import { Link } from 'react-router-dom' import { Maybe, @@ -11,27 +10,22 @@ import { PersistentVolumesQueryVariables, usePersistentVolumesQuery, } from '../../../generated/graphql-kubernetes' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' - -import { ClusterTinyFragment } from '../../../generated/graphql' -import { InlineLink } from '../../utils/typography/InlineLink' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { PERSISTENT_VOLUMES_REL_PATH, - getResourceDetailsAbsPath, getStorageAbsPath, } from '../../../routes/kubernetesRoutesConsts' - import { useCluster } from '../Cluster' +import { Kind } from '../common/types' +import ResourceLink from '../common/ResourceLink' import { PVStatusChip } from './utils' +import { getStorageBreadcrumbs } from './Storage' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'storage', - url: getStorageAbsPath(cluster?.id), - }, +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getStorageBreadcrumbs(cluster), { label: 'persistent volumes', url: `${getStorageAbsPath(cluster?.id)}/${PERSISTENT_VOLUMES_REL_PATH}`, @@ -49,24 +43,18 @@ export const colStatus = columnHelper.accessor((pv) => pv.status, { export const colClaim = columnHelper.accessor((pv) => pv.claim, { id: 'claim', header: 'Claim', - cell: ({ getValue, table }) => { - const { cluster } = table.options.meta as { - cluster?: ClusterTinyFragment - } + cell: ({ getValue }) => { const [namespace, name] = (getValue() ?? '').split('/') return ( - e.stopPropagation()} - > - {getValue()} - + /> ) }, }) @@ -74,20 +62,15 @@ export const colClaim = columnHelper.accessor((pv) => pv.claim, { const colStorageClass = columnHelper.accessor((pv) => pv.storageClass, { id: 'storageClass', header: 'Storage class', - cell: ({ getValue, table }) => { - const { cluster } = table.options.meta as { - cluster?: ClusterTinyFragment - } - - return ( - e.stopPropagation()} - > - {getValue()} - - ) - }, + cell: ({ getValue }) => ( + e.stopPropagation()} + /> + ), }) export const colReclaimPolicy = columnHelper.accessor( @@ -138,7 +121,7 @@ export default function PersistentVolumes() { useSetBreadcrumbs(useMemo(() => getBreadcrumbs(cluster), [cluster])) - const { colName, colLabels, colCreationTimestamp } = + const { colAction, colName, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) const columns = useMemo( () => [ @@ -152,8 +135,9 @@ export default function PersistentVolumes() { colAccessModes, colLabels, colCreationTimestamp, + colAction, ], - [colName, colLabels, colCreationTimestamp] + [colName, colLabels, colCreationTimestamp, colAction] ) return ( diff --git a/assets/src/components/kubernetes/storage/Storage.tsx b/assets/src/components/kubernetes/storage/Storage.tsx index a881064b68..9852d72291 100644 --- a/assets/src/components/kubernetes/storage/Storage.tsx +++ b/assets/src/components/kubernetes/storage/Storage.tsx @@ -1,6 +1,6 @@ import { Outlet, useLocation, useMatch } from 'react-router-dom' import { SubTab, TabList, TabPanel } from '@pluralsh/design-system' -import { Suspense, useMemo, useRef, useState } from 'react' +import { Suspense, useMemo, useRef } from 'react' import { PERSISTENT_VOLUMES_REL_PATH, @@ -12,13 +12,23 @@ import { import { ScrollablePage } from '../../utils/layout/ScrollablePage' import { LinkTabWrap } from '../../utils/Tabs' import { PluralErrorBoundary } from '../../cd/PluralErrorBoundary' -import { - PageScrollableContext, - useSetPageHeaderContent, -} from '../../cd/ContinuousDeployment' +import { useSetPageHeaderContent } from '../../cd/ContinuousDeployment' import LoadingIndicator from '../../utils/LoadingIndicator' import { useCluster } from '../Cluster' +import { Maybe } from '../../../generated/graphql-kubernetes' +import { KubernetesClusterFragment } from '../../../generated/graphql' +import { getBaseBreadcrumbs } from '../common/utils' + +export const getStorageBreadcrumbs = ( + cluster?: Maybe +) => [ + ...getBaseBreadcrumbs(cluster), + { + label: 'storage', + url: getStorageAbsPath(cluster?.id), + }, +] const directory = [ { @@ -31,15 +41,6 @@ const directory = [ export default function Storage() { const cluster = useCluster() - const [scrollable, setScrollable] = useState(false) - - const pageScrollableContext = useMemo( - () => ({ - setScrollable, - }), - [] - ) - const tabStateRef = useRef(null) const pathMatch = useMatch(`${getStorageAbsPath(cluster?.id)}/:tab/*`) const tab = pathMatch?.params?.tab || '' @@ -84,18 +85,16 @@ export default function Storage() { return ( - - }> - - - + }> + + diff --git a/assets/src/components/kubernetes/storage/StorageClass.tsx b/assets/src/components/kubernetes/storage/StorageClass.tsx index 4aa0934d15..c86ed2bfcc 100644 --- a/assets/src/components/kubernetes/storage/StorageClass.tsx +++ b/assets/src/components/kubernetes/storage/StorageClass.tsx @@ -5,7 +5,6 @@ import { SidecarItem, useSetBreadcrumbs, } from '@pluralsh/design-system' - import { createColumnHelper } from '@tanstack/react-table' import { KubernetesClient } from '../../../helpers/kubernetes.client' @@ -22,10 +21,9 @@ import { MetadataSidecar, useDefaultColumns } from '../common/utils' import { getResourceDetailsAbsPath } from '../../../routes/kubernetesRoutesConsts' import LoadingIndicator from '../../utils/LoadingIndicator' import ResourceDetails, { TabEntry } from '../common/ResourceDetails' - import { ResourceList } from '../common/ResourceList' - import { useCluster } from '../Cluster' +import { Kind } from '../common/types' import { getBreadcrumbs } from './StorageClasses' import { @@ -60,7 +58,7 @@ export default function StorageClass(): ReactElement { ...getBreadcrumbs(cluster), { label: name ?? '', - url: getResourceDetailsAbsPath(clusterId, 'storageclass', name), + url: getResourceDetailsAbsPath(clusterId, Kind.StorageClass, name), }, ], [cluster, clusterId, name] diff --git a/assets/src/components/kubernetes/storage/StorageClasses.tsx b/assets/src/components/kubernetes/storage/StorageClasses.tsx index 1521b7be03..866675ace4 100644 --- a/assets/src/components/kubernetes/storage/StorageClasses.tsx +++ b/assets/src/components/kubernetes/storage/StorageClasses.tsx @@ -12,21 +12,19 @@ import { StorageClassesQueryVariables, useStorageClassesQuery, } from '../../../generated/graphql-kubernetes' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { STORAGE_CLASSES_REL_PATH, getStorageAbsPath, } from '../../../routes/kubernetesRoutesConsts' import { useCluster } from '../Cluster' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'storage', - url: getStorageAbsPath(cluster?.id), - }, +import { getStorageBreadcrumbs } from './Storage' + +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getStorageBreadcrumbs(cluster), { label: 'storage classes', url: `${getStorageAbsPath(cluster?.id)}/${STORAGE_CLASSES_REL_PATH}`, @@ -66,7 +64,7 @@ export default function StorageClasses() { useSetBreadcrumbs(useMemo(() => getBreadcrumbs(cluster), [cluster])) - const { colName, colLabels, colCreationTimestamp } = + const { colAction, colName, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) const columns = useMemo( () => [ @@ -75,8 +73,9 @@ export default function StorageClasses() { colParameters, colLabels, colCreationTimestamp, + colAction, ], - [colName, colLabels, colCreationTimestamp] + [colName, colLabels, colCreationTimestamp, colAction] ) return ( diff --git a/assets/src/components/kubernetes/workloads/CronJob.tsx b/assets/src/components/kubernetes/workloads/CronJob.tsx index dbaf9bff5e..0e09a164ac 100644 --- a/assets/src/components/kubernetes/workloads/CronJob.tsx +++ b/assets/src/components/kubernetes/workloads/CronJob.tsx @@ -1,11 +1,15 @@ -import { ReactElement, useMemo } from 'react' +import React, { ReactElement, useMemo, useState } from 'react' import { Outlet, useParams } from 'react-router-dom' import { + Button, ChipList, + PlayIcon, SidecarItem, + Toast, useSetBreadcrumbs, } from '@pluralsh/design-system' import moment from 'moment/moment' +import { ApolloError } from 'apollo-boost' import { CronJobEventsQuery, @@ -14,6 +18,7 @@ import { CronJobJobsQueryVariables, CronJobQueryVariables, Cronjob_CronJobDetail as CronJobT, + CronJobTriggerMutationVariables, Common_EventList as EventListT, Common_Event as EventT, Job_JobList as JobListT, @@ -21,6 +26,7 @@ import { useCronJobEventsQuery, useCronJobJobsQuery, useCronJobQuery, + useCronJobTriggerMutation, } from '../../../generated/graphql-kubernetes' import { KubernetesClient } from '../../../helpers/kubernetes.client' import { MetadataSidecar } from '../common/utils' @@ -37,6 +43,8 @@ import { useEventsColumns } from '../cluster/Events' import { SubTitle } from '../../utils/SubTitle' import { useCluster } from '../Cluster' +import { Kind } from '../common/types' + import { getBreadcrumbs } from './CronJobs' import { useJobsColumns } from './Jobs' @@ -49,14 +57,28 @@ const directory: Array = [ export default function CronJob(): ReactElement { const cluster = useCluster() const { clusterId, name, namespace } = useParams() - const { data, loading } = useCronJobQuery({ + const [triggerBanner, setTriggerBanner] = useState(false) + const [error, setError] = useState() + + const { data, loading, refetch } = useCronJobQuery({ client: KubernetesClient(clusterId ?? ''), skip: !clusterId, pollInterval: 30_000, - variables: { - name, - namespace, - } as CronJobQueryVariables, + variables: { name, namespace } as CronJobQueryVariables, + }) + + const [mutation, { loading: mutationLoading }] = useCronJobTriggerMutation({ + client: KubernetesClient(clusterId ?? ''), + variables: { name, namespace } as CronJobTriggerMutationVariables, + onCompleted: () => { + refetch({ name, namespace }) + setTriggerBanner(true) + setTimeout(() => setTriggerBanner(false), 3000) + }, + onError: (error) => { + setError(error) + setTimeout(() => setError(undefined), 3000) + }, }) useSetBreadcrumbs( @@ -71,7 +93,12 @@ export default function CronJob(): ReactElement { }, { label: name ?? '', - url: getResourceDetailsAbsPath(clusterId, 'cronjob', name, namespace), + url: getResourceDetailsAbsPath( + clusterId, + Kind.CronJob, + name, + namespace + ), }, ], [cluster, clusterId, name, namespace] @@ -85,37 +112,68 @@ export default function CronJob(): ReactElement { } return ( - - - -} - /> - - {cronJob?.schedule} - - {moment(cronJob?.lastSchedule).format('lll')} - - {cronJob?.active} - - {cronJob?.suspend ? 'True' : 'False'} - - - {cronJob?.concurrencyPolicy} - - - {cronJob?.startingDeadlineSeconds ?? 0} - - - } - > - - + <> + } + onClick={() => mutation()} + loading={mutationLoading} + > + Trigger + + } + sidecar={ + + + -} + /> + + {cronJob?.schedule} + + {moment(cronJob?.lastSchedule).format('lll')} + + {cronJob?.active} + + {cronJob?.suspend ? 'True' : 'False'} + + + {cronJob?.concurrencyPolicy} + + + {cronJob?.startingDeadlineSeconds ?? 0} + + + } + > + + + {triggerBanner && ( + + Cron job triggered successfully + + )} + {error && ( + + {error.message} + + )} + ) } @@ -135,6 +193,7 @@ export function CronJobJobs(): ReactElement { > namespaced columns={columns} + initialSort={[{ id: 'creationTimestamp', desc: true }]} query={useCronJobJobsQuery} queryOptions={{ variables: { @@ -157,6 +216,7 @@ export function CronJobJobs(): ReactElement { > namespaced columns={columns} + initialSort={[{ id: 'creationTimestamp', desc: true }]} query={useCronJobJobsQuery} queryOptions={{ variables: { @@ -167,6 +227,7 @@ export function CronJobJobs(): ReactElement { }} queryName="handleGetCronJobJobs" itemsKey="jobs" + maxHeight="500px" /> diff --git a/assets/src/components/kubernetes/workloads/CronJobs.tsx b/assets/src/components/kubernetes/workloads/CronJobs.tsx index 9421c0042d..75a000164e 100644 --- a/assets/src/components/kubernetes/workloads/CronJobs.tsx +++ b/assets/src/components/kubernetes/workloads/CronJobs.tsx @@ -11,11 +11,11 @@ import { Maybe, useCronJobsQuery, } from '../../../generated/graphql-kubernetes' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' import { DateTimeCol } from '../../utils/table/DateTimeCol' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { CRON_JOBS_REL_PATH, getWorkloadsAbsPath, @@ -24,13 +24,10 @@ import { import { useCluster } from '../Cluster' import { CronJobSuspendChip, WorkloadImages } from './utils' +import { getWorkloadsBreadcrumbs } from './Workloads' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'workloads', - url: getWorkloadsAbsPath(cluster?.id), - }, +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getWorkloadsBreadcrumbs(cluster), { label: 'cron jobs', url: `${getWorkloadsAbsPath(cluster?.id)}/${CRON_JOBS_REL_PATH}`, @@ -74,7 +71,7 @@ export default function CronJobs() { useSetBreadcrumbs(useMemo(() => getBreadcrumbs(cluster), [cluster])) - const { colName, colNamespace, colLabels, colCreationTimestamp } = + const { colAction, colName, colNamespace, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) const columns = useMemo( () => [ @@ -87,8 +84,9 @@ export default function CronJobs() { colImages, colLabels, colCreationTimestamp, + colAction, ], - [colName, colNamespace, colLabels, colCreationTimestamp] + [colName, colNamespace, colLabels, colCreationTimestamp, colAction] ) return ( diff --git a/assets/src/components/kubernetes/workloads/DaemonSet.tsx b/assets/src/components/kubernetes/workloads/DaemonSet.tsx index 185f631047..9e83e83e95 100644 --- a/assets/src/components/kubernetes/workloads/DaemonSet.tsx +++ b/assets/src/components/kubernetes/workloads/DaemonSet.tsx @@ -43,6 +43,8 @@ import { LabelSelector } from '../common/LabelSelector' import { PodInfo } from '../common/PodInfo' import { useCluster } from '../Cluster' +import { Kind } from '../common/types' + import { getBreadcrumbs } from './DaemonSets' import { usePodsColumns } from './Pods' import { WorkloadStatusChip } from './utils' @@ -81,7 +83,7 @@ export default function DaemonSet(): ReactElement { label: name ?? '', url: getResourceDetailsAbsPath( clusterId, - 'daemonset', + Kind.DaemonSet, name, namespace ), diff --git a/assets/src/components/kubernetes/workloads/DaemonSets.tsx b/assets/src/components/kubernetes/workloads/DaemonSets.tsx index bc9eeac354..9b82238b6b 100644 --- a/assets/src/components/kubernetes/workloads/DaemonSets.tsx +++ b/assets/src/components/kubernetes/workloads/DaemonSets.tsx @@ -11,12 +11,12 @@ import { Maybe, useDaemonSetsQuery, } from '../../../generated/graphql-kubernetes' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' import { UsageText } from '../../cluster/TableElements' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { DAEMON_SETS_REL_PATH, getWorkloadsAbsPath, @@ -25,13 +25,10 @@ import { import { useCluster } from '../Cluster' import { WorkloadImages, WorkloadStatusChip } from './utils' +import { getWorkloadsBreadcrumbs } from './Workloads' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'workloads', - url: getWorkloadsAbsPath(cluster?.id), - }, +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getWorkloadsBreadcrumbs(cluster), { label: 'daemon sets', url: `${getWorkloadsAbsPath(cluster?.id)}/${DAEMON_SETS_REL_PATH}`, @@ -79,7 +76,7 @@ export default function CronJobs() { useSetBreadcrumbs(useMemo(() => getBreadcrumbs(cluster), [cluster])) - const { colName, colNamespace, colLabels, colCreationTimestamp } = + const { colAction, colName, colNamespace, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) const columns = useMemo( () => [ @@ -90,8 +87,9 @@ export default function CronJobs() { colStatus, colLabels, colCreationTimestamp, + colAction, ], - [colName, colNamespace, colLabels, colCreationTimestamp] + [colName, colNamespace, colLabels, colCreationTimestamp, colAction] ) return ( diff --git a/assets/src/components/kubernetes/workloads/Deployment.tsx b/assets/src/components/kubernetes/workloads/Deployment.tsx index f97884df69..08b5106685 100644 --- a/assets/src/components/kubernetes/workloads/Deployment.tsx +++ b/assets/src/components/kubernetes/workloads/Deployment.tsx @@ -1,5 +1,5 @@ -import { ReactElement, useMemo } from 'react' -import { Link, Outlet, useParams } from 'react-router-dom' +import React, { ReactElement, useMemo } from 'react' +import { Outlet, useParams } from 'react-router-dom' import { ChipList, SidecarItem, @@ -46,9 +46,10 @@ import ResourceInfoCard, { ResourceInfoCardSection, } from '../common/ResourceInfoCard' import Annotations from '../common/Annotations' -import { InlineLink } from '../../utils/typography/InlineLink' import HorizontalPodAutoscalersForResource from '../common/HorizontalPodAutoscalers' import { useCluster } from '../Cluster' +import ResourceLink from '../common/ResourceLink' +import { Kind, Resource, fromResource } from '../common/types' import { getBreadcrumbs } from './Deployments' import { useReplicaSetsColumns } from './ReplicaSets' @@ -88,7 +89,7 @@ export default function Deployment(): ReactElement { label: name ?? '', url: getResourceDetailsAbsPath( clusterId, - 'deployment', + Kind.Deployment, name, namespace ), @@ -191,19 +192,18 @@ function NewReplicaSet(): ReactElement { - - {replicaSet?.objectMeta?.name} - + - {replicaSet?.objectMeta?.namespace ?? ''} + {moment(replicaSet?.objectMeta?.creationTimestamp).format('lll')}{' '} @@ -233,7 +233,7 @@ export function DeploymentHorizontalPodAutoscalers(): ReactElement { return ( diff --git a/assets/src/components/kubernetes/workloads/Deployments.tsx b/assets/src/components/kubernetes/workloads/Deployments.tsx index 9d1d7ffaf2..6dd93a9bab 100644 --- a/assets/src/components/kubernetes/workloads/Deployments.tsx +++ b/assets/src/components/kubernetes/workloads/Deployments.tsx @@ -11,9 +11,9 @@ import { useDeploymentsQuery, } from '../../../generated/graphql-kubernetes' import { ResourceList } from '../common/ResourceList' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { UsageText } from '../../cluster/TableElements' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { DEPLOYMENTS_REL_PATH, getWorkloadsAbsPath, @@ -22,13 +22,10 @@ import { import { useCluster } from '../Cluster' import { WorkloadImages, WorkloadStatusChip } from './utils' +import { getWorkloadsBreadcrumbs } from './Workloads' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'workloads', - url: getWorkloadsAbsPath(cluster?.id), - }, +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getWorkloadsBreadcrumbs(cluster), { label: 'deployments', url: `${getWorkloadsAbsPath(cluster?.id)}/${DEPLOYMENTS_REL_PATH}`, @@ -76,7 +73,7 @@ export default function Deployments() { useSetBreadcrumbs(useMemo(() => getBreadcrumbs(cluster), [cluster])) - const { colName, colNamespace, colLabels, colCreationTimestamp } = + const { colName, colNamespace, colLabels, colCreationTimestamp, colAction } = useDefaultColumns(columnHelper) const columns = useMemo( () => [ @@ -87,8 +84,9 @@ export default function Deployments() { colStatus, colLabels, colCreationTimestamp, + colAction, ], - [colName, colNamespace, colLabels, colCreationTimestamp] + [colName, colNamespace, colLabels, colCreationTimestamp, colAction] ) return ( diff --git a/assets/src/components/kubernetes/workloads/Job.tsx b/assets/src/components/kubernetes/workloads/Job.tsx index 7f3ae44b04..3b5941626e 100644 --- a/assets/src/components/kubernetes/workloads/Job.tsx +++ b/assets/src/components/kubernetes/workloads/Job.tsx @@ -38,6 +38,8 @@ import { ReadinessT } from '../../../utils/status' import { StatusChip } from '../../cluster/TableElements' import { useCluster } from '../Cluster' +import { Kind } from '../common/types' + import { getBreadcrumbs } from './Jobs' import { usePodsColumns } from './Pods' @@ -73,7 +75,7 @@ export default function Job(): ReactElement { }, { label: name ?? '', - url: getResourceDetailsAbsPath(clusterId, 'job', name, namespace), + url: getResourceDetailsAbsPath(clusterId, Kind.Job, name, namespace), }, ], [cluster, clusterId, name, namespace] diff --git a/assets/src/components/kubernetes/workloads/Jobs.tsx b/assets/src/components/kubernetes/workloads/Jobs.tsx index df290a2043..0c999de120 100644 --- a/assets/src/components/kubernetes/workloads/Jobs.tsx +++ b/assets/src/components/kubernetes/workloads/Jobs.tsx @@ -10,10 +10,10 @@ import { Maybe, useJobsQuery, } from '../../../generated/graphql-kubernetes' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' import { UsageText } from '../../cluster/TableElements' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { JOBS_REL_PATH, getWorkloadsAbsPath, @@ -21,13 +21,10 @@ import { import { useCluster } from '../Cluster' import { WorkloadImages, WorkloadStatusChip } from './utils' +import { getWorkloadsBreadcrumbs } from './Workloads' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'workloads', - url: getWorkloadsAbsPath(cluster?.id), - }, +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getWorkloadsBreadcrumbs(cluster), { label: 'jobs', url: `${getWorkloadsAbsPath(cluster?.id)}/${JOBS_REL_PATH}`, @@ -71,7 +68,7 @@ const colStatus = columnHelper.accessor((job) => job.podInfo, { }) export function useJobsColumns(): Array { - const { colName, colNamespace, colLabels, colCreationTimestamp } = + const { colAction, colName, colNamespace, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) return useMemo( @@ -83,8 +80,9 @@ export function useJobsColumns(): Array { colStatus, colLabels, colCreationTimestamp, + colAction, ], - [colName, colNamespace, colLabels, colCreationTimestamp] + [colName, colNamespace, colLabels, colCreationTimestamp, colAction] ) } diff --git a/assets/src/components/kubernetes/workloads/Pod.tsx b/assets/src/components/kubernetes/workloads/Pod.tsx index dec10b9f6b..446f18e255 100644 --- a/assets/src/components/kubernetes/workloads/Pod.tsx +++ b/assets/src/components/kubernetes/workloads/Pod.tsx @@ -1,5 +1,5 @@ -import { ReactElement, useMemo } from 'react' -import { Link, Outlet, useOutletContext, useParams } from 'react-router-dom' +import React, { ReactElement, useMemo } from 'react' +import { Outlet, useOutletContext, useParams } from 'react-router-dom' import { SidecarItem, Table, useSetBreadcrumbs } from '@pluralsh/design-system' import { KubernetesClient } from '../../../helpers/kubernetes.client' @@ -27,13 +27,14 @@ import { getResourceDetailsAbsPath, getWorkloadsAbsPath, } from '../../../routes/kubernetesRoutesConsts' -import { InlineLink } from '../../utils/typography/InlineLink' import ResourceOwner from '../common/ResourceOwner' import { NAMESPACE_PARAM } from '../Navigation' import { ContainerStatusT } from '../../cluster/pods/PodsList' import { ContainerStatuses } from '../../cluster/ContainerStatuses' import { useCluster } from '../Cluster' import ImagePullSecrets from '../common/ImagePullSecrets' +import { Kind } from '../common/types' +import ResourceLink from '../common/ResourceLink' import { getBreadcrumbs } from './Pods' import { toReadiness } from './utils' @@ -70,7 +71,7 @@ export function Pod(): ReactElement { }, { label: name ?? '', - url: getResourceDetailsAbsPath(clusterId, 'pod', name, namespace), + url: getResourceDetailsAbsPath(clusterId, Kind.Pod, name, namespace), }, ], [cluster, clusterId, name, namespace] @@ -103,23 +104,23 @@ export function Pod(): ReactElement { {pod?.podPhase} - - {pod?.nodeName} - + - - {pod?.serviceAccountName} - + {pod?.podIP} @@ -146,10 +147,7 @@ export function PodInfo(): ReactElement { {pod?.controller?.objectMeta?.name && (
Owner - +
)}
diff --git a/assets/src/components/kubernetes/workloads/Pods.tsx b/assets/src/components/kubernetes/workloads/Pods.tsx index f5b7c7a967..28fb83822f 100644 --- a/assets/src/components/kubernetes/workloads/Pods.tsx +++ b/assets/src/components/kubernetes/workloads/Pods.tsx @@ -1,6 +1,5 @@ import { createColumnHelper } from '@tanstack/react-table' -import { useMemo } from 'react' -import { Link } from 'react-router-dom' +import React, { useMemo } from 'react' import { useSetBreadcrumbs } from '@pluralsh/design-system' import { @@ -11,28 +10,26 @@ import { PodsQueryVariables, usePodsQuery, } from '../../../generated/graphql-kubernetes' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' -import { InlineLink } from '../../utils/typography/InlineLink' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { PODS_REL_PATH, - getResourceDetailsAbsPath, getWorkloadsAbsPath, } from '../../../routes/kubernetesRoutesConsts' import { useCluster } from '../Cluster' -import { numishSort } from '../../cluster/TableElements' import { ContainerStatuses } from '../../cluster/ContainerStatuses' import { ContainerStatusT } from '../../cluster/pods/PodsList' +import { Kind } from '../common/types' + +import ResourceLink from '../common/ResourceLink' + import { WorkloadImages, toReadiness } from './utils' +import { getWorkloadsBreadcrumbs } from './Workloads' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'workloads', - url: getWorkloadsAbsPath(cluster?.id), - }, +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getWorkloadsBreadcrumbs(cluster), { label: 'pods', url: `${getWorkloadsAbsPath(cluster?.id)}/${PODS_REL_PATH}`, @@ -66,20 +63,15 @@ const colImages = columnHelper.accessor((pod) => pod?.containerImages, { const colNode = columnHelper.accessor((pod) => pod?.nodeName, { id: 'node', header: 'Node', - cell: ({ getValue, table }) => { - const { cluster } = table.options.meta as { - cluster?: ClusterTinyFragment - } - - return ( - e.stopPropagation()} - > - {getValue()} - - ) - }, + cell: ({ getValue }) => ( + e.stopPropagation()} + /> + ), }) const colRestarts = columnHelper.accessor((pod) => pod?.restartCount, { @@ -92,8 +84,6 @@ const colContainers = columnHelper.accessor( (row) => row?.containerStatuses?.length, { id: 'containers', - enableSorting: true, - sortingFn: numishSort, cell: ({ row: { original } }) => ( { - const { colName, colNamespace, colCreationTimestamp } = + const { colName, colNamespace, colCreationTimestamp, colAction } = useDefaultColumns(columnHelper) return useMemo( @@ -125,8 +115,9 @@ export function usePodsColumns(): Array { // TODO: Add CPU and memory. colContainers, colCreationTimestamp, + colAction, ], - [colName, colNamespace, colCreationTimestamp] + [colName, colNamespace, colCreationTimestamp, colAction] ) } diff --git a/assets/src/components/kubernetes/workloads/ReplicaSet.tsx b/assets/src/components/kubernetes/workloads/ReplicaSet.tsx index 4654ab84dd..c940d52c92 100644 --- a/assets/src/components/kubernetes/workloads/ReplicaSet.tsx +++ b/assets/src/components/kubernetes/workloads/ReplicaSet.tsx @@ -43,8 +43,8 @@ import { getWorkloadsAbsPath, } from '../../../routes/kubernetesRoutesConsts' import { NAMESPACE_PARAM } from '../Navigation' - import { useCluster } from '../Cluster' +import { Kind } from '../common/types' import { getBreadcrumbs } from './ReplicaSets' import { usePodsColumns } from './Pods' @@ -85,7 +85,7 @@ export default function ReplicaSet(): ReactElement { label: name ?? '', url: getResourceDetailsAbsPath( clusterId, - 'replicaset', + Kind.ReplicaSet, name, namespace ), @@ -140,7 +140,7 @@ export function ReplicaSetInfo(): ReactElement {
Horizontal Pod Autoscalers diff --git a/assets/src/components/kubernetes/workloads/ReplicaSets.tsx b/assets/src/components/kubernetes/workloads/ReplicaSets.tsx index 57c6d5538d..9e8a14685e 100644 --- a/assets/src/components/kubernetes/workloads/ReplicaSets.tsx +++ b/assets/src/components/kubernetes/workloads/ReplicaSets.tsx @@ -11,9 +11,9 @@ import { useReplicaSetsQuery, } from '../../../generated/graphql-kubernetes' import { ResourceList } from '../common/ResourceList' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { UsageText } from '../../cluster/TableElements' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { REPLICA_SETS_REL_PATH, getWorkloadsAbsPath, @@ -21,13 +21,10 @@ import { import { useCluster } from '../Cluster' import { WorkloadImages, WorkloadStatusChip } from './utils' +import { getWorkloadsBreadcrumbs } from './Workloads' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'workloads', - url: getWorkloadsAbsPath(cluster?.id), - }, +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getWorkloadsBreadcrumbs(cluster), { label: 'replica sets', url: `${getWorkloadsAbsPath(cluster?.id)}/${REPLICA_SETS_REL_PATH}`, @@ -71,7 +68,7 @@ const colStatus = columnHelper.accessor((rs) => rs.podInfo, { }) export function useReplicaSetsColumns(): Array { - const { colName, colNamespace, colLabels, colCreationTimestamp } = + const { colAction, colName, colNamespace, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) return useMemo( @@ -83,8 +80,9 @@ export function useReplicaSetsColumns(): Array { colStatus, colLabels, colCreationTimestamp, + colAction, ], - [colName, colNamespace, colLabels, colCreationTimestamp] + [colName, colNamespace, colLabels, colCreationTimestamp, colAction] ) } diff --git a/assets/src/components/kubernetes/workloads/ReplicationController.tsx b/assets/src/components/kubernetes/workloads/ReplicationController.tsx index fc95bf22ad..61d0a9e75d 100644 --- a/assets/src/components/kubernetes/workloads/ReplicationController.tsx +++ b/assets/src/components/kubernetes/workloads/ReplicationController.tsx @@ -45,6 +45,8 @@ import { LabelSelector } from '../common/LabelSelector' import { useCluster } from '../Cluster' +import { Kind } from '../common/types' + import { getBreadcrumbs } from './ReplicationControllers' import { usePodsColumns } from './Pods' import { WorkloadStatusChip } from './utils' @@ -83,7 +85,7 @@ export default function ReplicationController(): ReactElement { label: name ?? '', url: getResourceDetailsAbsPath( clusterId, - 'replicationcontroller', + Kind.ReplicationController, name, namespace ), diff --git a/assets/src/components/kubernetes/workloads/ReplicationControllers.tsx b/assets/src/components/kubernetes/workloads/ReplicationControllers.tsx index 43985e838c..4252fc2396 100644 --- a/assets/src/components/kubernetes/workloads/ReplicationControllers.tsx +++ b/assets/src/components/kubernetes/workloads/ReplicationControllers.tsx @@ -10,10 +10,10 @@ import { ReplicationControllersQueryVariables, useReplicationControllersQuery, } from '../../../generated/graphql-kubernetes' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { ResourceList } from '../common/ResourceList' import { UsageText } from '../../cluster/TableElements' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { REPLICATION_CONTROLLERS_REL_PATH, getWorkloadsAbsPath, @@ -21,13 +21,10 @@ import { import { useCluster } from '../Cluster' import { WorkloadImages, WorkloadStatusChip } from './utils' +import { getWorkloadsBreadcrumbs } from './Workloads' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'workloads', - url: getWorkloadsAbsPath(cluster?.id), - }, +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getWorkloadsBreadcrumbs(cluster), { label: 'replication controllers', url: `${getWorkloadsAbsPath( @@ -77,7 +74,7 @@ export default function ReplicationControllers() { useSetBreadcrumbs(useMemo(() => getBreadcrumbs(cluster), [cluster])) - const { colName, colNamespace, colLabels, colCreationTimestamp } = + const { colAction, colName, colNamespace, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) const columns = useMemo( () => [ @@ -88,8 +85,9 @@ export default function ReplicationControllers() { colStatus, colLabels, colCreationTimestamp, + colAction, ], - [colName, colNamespace, colLabels, colCreationTimestamp] + [colName, colNamespace, colLabels, colCreationTimestamp, colAction] ) return ( diff --git a/assets/src/components/kubernetes/workloads/StatefulSet.tsx b/assets/src/components/kubernetes/workloads/StatefulSet.tsx index 3203a109c5..88d1e533a2 100644 --- a/assets/src/components/kubernetes/workloads/StatefulSet.tsx +++ b/assets/src/components/kubernetes/workloads/StatefulSet.tsx @@ -37,6 +37,8 @@ import { PodInfo } from '../common/PodInfo' import { useCluster } from '../Cluster' +import { Kind } from '../common/types' + import { getBreadcrumbs } from './StatefulSets' import { usePodsColumns } from './Pods' import { WorkloadStatusChip } from './utils' @@ -74,7 +76,7 @@ export default function StatefulSet(): ReactElement { label: name ?? '', url: getResourceDetailsAbsPath( clusterId, - 'statefulset', + Kind.StatefulSet, name, namespace ), diff --git a/assets/src/components/kubernetes/workloads/StatefulSets.tsx b/assets/src/components/kubernetes/workloads/StatefulSets.tsx index b1d1d116ee..d9bfe9e8e0 100644 --- a/assets/src/components/kubernetes/workloads/StatefulSets.tsx +++ b/assets/src/components/kubernetes/workloads/StatefulSets.tsx @@ -11,9 +11,9 @@ import { useStatefulSetsQuery, } from '../../../generated/graphql-kubernetes' import { ResourceList } from '../common/ResourceList' -import { getBaseBreadcrumbs, useDefaultColumns } from '../common/utils' +import { useDefaultColumns } from '../common/utils' import { UsageText } from '../../cluster/TableElements' -import { ClusterTinyFragment } from '../../../generated/graphql' +import { KubernetesClusterFragment } from '../../../generated/graphql' import { STATEFUL_SETS_REL_PATH, getWorkloadsAbsPath, @@ -21,13 +21,10 @@ import { import { useCluster } from '../Cluster' import { WorkloadImages, WorkloadStatusChip } from './utils' +import { getWorkloadsBreadcrumbs } from './Workloads' -export const getBreadcrumbs = (cluster?: Maybe) => [ - ...getBaseBreadcrumbs(cluster), - { - label: 'workloads', - url: getWorkloadsAbsPath(cluster?.id), - }, +export const getBreadcrumbs = (cluster?: Maybe) => [ + ...getWorkloadsBreadcrumbs(cluster), { label: 'stateful sets', url: `${getWorkloadsAbsPath(cluster?.id)}/${STATEFUL_SETS_REL_PATH}`, @@ -75,7 +72,7 @@ export default function StatefulSets() { useSetBreadcrumbs(useMemo(() => getBreadcrumbs(cluster), [cluster])) - const { colName, colNamespace, colLabels, colCreationTimestamp } = + const { colAction, colName, colNamespace, colLabels, colCreationTimestamp } = useDefaultColumns(columnHelper) const columns = useMemo( () => [ @@ -86,8 +83,9 @@ export default function StatefulSets() { colStatus, colLabels, colCreationTimestamp, + colAction, ], - [colName, colNamespace, colLabels, colCreationTimestamp] + [colName, colNamespace, colLabels, colCreationTimestamp, colAction] ) return ( diff --git a/assets/src/components/kubernetes/workloads/Workloads.tsx b/assets/src/components/kubernetes/workloads/Workloads.tsx index 4b68b47467..dc6990e72b 100644 --- a/assets/src/components/kubernetes/workloads/Workloads.tsx +++ b/assets/src/components/kubernetes/workloads/Workloads.tsx @@ -1,5 +1,5 @@ import { SubTab, TabList, TabPanel } from '@pluralsh/design-system' -import { Suspense, useMemo, useRef, useState } from 'react' +import { Suspense, useMemo, useRef } from 'react' import { Outlet, useLocation, useMatch } from 'react-router-dom' import { @@ -15,13 +15,13 @@ import { } from '../../../routes/kubernetesRoutesConsts' import { LinkTabWrap } from '../../utils/Tabs' import { PluralErrorBoundary } from '../../cd/PluralErrorBoundary' -import { - PageScrollableContext, - useSetPageHeaderContent, -} from '../../cd/ContinuousDeployment' +import { useSetPageHeaderContent } from '../../cd/ContinuousDeployment' import LoadingIndicator from '../../utils/LoadingIndicator' import { ScrollablePage } from '../../utils/layout/ScrollablePage' import { useCluster } from '../Cluster' +import { Maybe } from '../../../generated/graphql-kubernetes' +import { KubernetesClusterFragment } from '../../../generated/graphql' +import { getBaseBreadcrumbs } from '../common/utils' const directory = [ { path: DEPLOYMENTS_REL_PATH, label: 'Deployments' }, @@ -34,10 +34,18 @@ const directory = [ { path: REPLICATION_CONTROLLERS_REL_PATH, label: 'Replication controllers' }, ] as const +export const getWorkloadsBreadcrumbs = ( + cluster?: Maybe +) => [ + ...getBaseBreadcrumbs(cluster), + { + label: 'workloads', + url: getWorkloadsAbsPath(cluster?.id), + }, +] + export default function Workloads() { const cluster = useCluster() - const [scrollable, setScrollable] = useState(false) - const pageScrollableContext = useMemo(() => ({ setScrollable }), []) const tabStateRef = useRef(null) const pathMatch = useMatch(`${getWorkloadsAbsPath(cluster?.id)}/:tab/*`) const tab = pathMatch?.params?.tab || '' @@ -82,18 +90,16 @@ export default function Workloads() { return ( - - }> - - - + }> + + diff --git a/assets/src/components/kubernetes/workloads/utils.tsx b/assets/src/components/kubernetes/workloads/utils.tsx index b505994526..376da7a463 100644 --- a/assets/src/components/kubernetes/workloads/utils.tsx +++ b/assets/src/components/kubernetes/workloads/utils.tsx @@ -9,6 +9,7 @@ import { Common_PodInfo as PodInfoT, } from '../../../generated/graphql-kubernetes' import { Readiness, ReadinessT } from '../../../utils/status' +import { TruncateStart } from '../../utils/table/TruncateStart' const podStatusSeverity = { Running: 'success', @@ -94,10 +95,10 @@ export function WorkloadStatusChip({ podInfo }: { podInfo: PodInfoT }) { return ( 0} + condition={podInfo?.warnings?.length > 0} wrapper={ ev?.message)?.join(', ')} + label={podInfo?.warnings?.map((ev) => ev?.message)?.join(', ')} placement="bottom" /> } @@ -124,15 +125,13 @@ export function WorkloadImages({ images }: { images: Maybe[] }) { }} > {images.map((image) => ( - - {image} - + {image} + ))} ) diff --git a/assets/src/components/pr/automations/PrAutomationsColumns.tsx b/assets/src/components/pr/automations/PrAutomationsColumns.tsx index c059cb8bd1..1b294658d8 100644 --- a/assets/src/components/pr/automations/PrAutomationsColumns.tsx +++ b/assets/src/components/pr/automations/PrAutomationsColumns.tsx @@ -65,11 +65,7 @@ const ColRepo = columnHelper.accessor(({ node }) => node?.identifier, { header: 'Repo', meta: { truncate: true }, cell: function Cell({ getValue }) { - return ( - - {getValue()} - - ) + return {getValue()} }, }) diff --git a/assets/src/components/pr/scm/PrScmConnectionsColumns.tsx b/assets/src/components/pr/scm/PrScmConnectionsColumns.tsx index 13fdaa731d..e4ae414d53 100644 --- a/assets/src/components/pr/scm/PrScmConnectionsColumns.tsx +++ b/assets/src/components/pr/scm/PrScmConnectionsColumns.tsx @@ -49,11 +49,7 @@ const ColBaseUrl = columnHelper.accessor(({ node }) => node?.baseUrl, { header: 'Base url', meta: { truncate: true }, cell: function Cell({ getValue }) { - return ( - - {getValue()} - - ) + return {getValue()} }, }) @@ -62,11 +58,7 @@ const ColApiUrl = columnHelper.accessor(({ node }) => node?.apiUrl, { header: 'API url', meta: { truncate: true }, cell: function Cell({ getValue }) { - return ( - - {getValue()} - - ) + return {getValue()} }, }) diff --git a/assets/src/components/utils/Confirm.tsx b/assets/src/components/utils/Confirm.tsx index a2cae54248..db99d93e9c 100644 --- a/assets/src/components/utils/Confirm.tsx +++ b/assets/src/components/utils/Confirm.tsx @@ -1,23 +1,26 @@ import { ReactNode } from 'react' import { ApolloError } from '@apollo/client' import { Button, Modal } from '@pluralsh/design-system' - -import { ModalMountTransition } from 'components/utils/ModalMountTransition' - import { useTheme } from 'styled-components' +import { GraphQLError } from 'graphql' +import { GraphQLErrors } from '@apollo/client/errors' import { GqlError } from './Alert' +import { ModalMountTransition } from './ModalMountTransition' type ConfirmProps = { open: boolean close: Nullable<(...args: any[]) => unknown> title?: ReactNode error?: ApolloError | undefined + errorHeader?: string + errorMessage?: string text?: ReactNode submit: (...args: any[]) => unknown label?: ReactNode loading?: boolean destructive?: boolean + extraContent?: ReactNode } export function Confirm({ @@ -25,11 +28,14 @@ export function Confirm({ close, title = 'Are you sure?', error, + errorHeader = 'Something went wrong', + errorMessage, text, submit, label, loading = false, destructive = false, + extraContent, }: ConfirmProps) { const theme = useTheme() @@ -62,16 +68,30 @@ export function Confirm({ } > - {error ? ( - - ) : ( -
- {text} + {error && ( +
+
)} +
+ {text} +
+ {extraContent && extraContent} ) diff --git a/assets/src/generated/graphql-kubernetes.ts b/assets/src/generated/graphql-kubernetes.ts index 0f0984326b..89d710ca79 100644 --- a/assets/src/generated/graphql-kubernetes.ts +++ b/assets/src/generated/graphql-kubernetes.ts @@ -4610,7 +4610,7 @@ export type ClusterRolesQueryVariables = Exact<{ }>; -export type ClusterRolesQuery = { __typename?: 'Query', handleGetClusterRoleList?: { __typename?: 'clusterrole_ClusterRoleList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'clusterrole_ClusterRole', typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type ClusterRolesQuery = { __typename?: 'Query', handleGetClusterRoleList?: { __typename?: 'clusterrole_ClusterRoleList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'clusterrole_ClusterRole', typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type ClusterRoleQueryVariables = Exact<{ name: Scalars['String']['input']; @@ -4628,7 +4628,7 @@ export type ClusterRoleBindingsQueryVariables = Exact<{ }>; -export type ClusterRoleBindingsQuery = { __typename?: 'Query', handleGetClusterRoleBindingList?: { __typename?: 'clusterrolebinding_ClusterRoleBindingList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'clusterrolebinding_ClusterRoleBinding', typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type ClusterRoleBindingsQuery = { __typename?: 'Query', handleGetClusterRoleBindingList?: { __typename?: 'clusterrolebinding_ClusterRoleBindingList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'clusterrolebinding_ClusterRoleBinding', typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type ClusterRoleBindingQueryVariables = Exact<{ name: Scalars['String']['input']; @@ -4646,7 +4646,7 @@ export type RolesQueryVariables = Exact<{ }>; -export type RolesQuery = { __typename?: 'Query', handleGetRoleList?: { __typename?: 'role_RoleList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'role_Role', typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type RolesQuery = { __typename?: 'Query', handleGetRoleList?: { __typename?: 'role_RoleList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'role_Role', typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type RoleQueryVariables = Exact<{ name: Scalars['String']['input']; @@ -4665,7 +4665,7 @@ export type RoleBindingsQueryVariables = Exact<{ }>; -export type RoleBindingsQuery = { __typename?: 'Query', handleGetRoleBindingList?: { __typename?: 'rolebinding_RoleBindingList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'rolebinding_RoleBinding', typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type RoleBindingsQuery = { __typename?: 'Query', handleGetRoleBindingList?: { __typename?: 'rolebinding_RoleBindingList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'rolebinding_RoleBinding', typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type RoleBindingQueryVariables = Exact<{ name: Scalars['String']['input']; @@ -4684,7 +4684,7 @@ export type ServiceAccountsQueryVariables = Exact<{ }>; -export type ServiceAccountsQuery = { __typename?: 'Query', handleGetServiceAccountList?: { __typename?: 'serviceaccount_ServiceAccountList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'serviceaccount_ServiceAccount', typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type ServiceAccountsQuery = { __typename?: 'Query', handleGetServiceAccountList?: { __typename?: 'serviceaccount_ServiceAccountList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'serviceaccount_ServiceAccount', typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type ServiceAccountQueryVariables = Exact<{ namespace: Scalars['String']['input']; @@ -4703,9 +4703,9 @@ export type EventsQueryVariables = Exact<{ }>; -export type EventsQuery = { __typename?: 'Query', handleGetEventList?: { __typename?: 'common_EventList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type EventsQuery = { __typename?: 'Query', handleGetEventList?: { __typename?: 'common_EventList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; -export type EventListFragment = { __typename?: 'common_EventList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> }; +export type EventListFragment = { __typename?: 'common_EventList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> }; export type EventFragment = { __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } }; @@ -4720,7 +4720,7 @@ export type HorizontalPodAutoscalersQueryVariables = Exact<{ }>; -export type HorizontalPodAutoscalersQuery = { __typename?: 'Query', handleGetHorizontalPodAutoscalerList?: { __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscalerList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, horizontalpodautoscalers: Array<{ __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscaler', currentCPUUtilizationPercentage: number, maxReplicas: number, minReplicas: number, targetCPUUtilizationPercentage: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, scaleTargetRef: { __typename?: 'horizontalpodautoscaler_ScaleTargetRef', name: string, kind: string } } | null> } | null }; +export type HorizontalPodAutoscalersQuery = { __typename?: 'Query', handleGetHorizontalPodAutoscalerList?: { __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscalerList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, horizontalpodautoscalers: Array<{ __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscaler', currentCPUUtilizationPercentage: number, maxReplicas: number, minReplicas: number, targetCPUUtilizationPercentage: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, scaleTargetRef: { __typename?: 'horizontalpodautoscaler_ScaleTargetRef', name: string, kind: string } } | null> } | null }; export type HorizontalPodAutoscalersForResourceQueryVariables = Exact<{ kind: Scalars['String']['input']; @@ -4733,7 +4733,7 @@ export type HorizontalPodAutoscalersForResourceQueryVariables = Exact<{ }>; -export type HorizontalPodAutoscalersForResourceQuery = { __typename?: 'Query', handleGetHorizontalPodAutoscalerListForResource?: { __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscalerList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, horizontalpodautoscalers: Array<{ __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscaler', currentCPUUtilizationPercentage: number, maxReplicas: number, minReplicas: number, targetCPUUtilizationPercentage: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, scaleTargetRef: { __typename?: 'horizontalpodautoscaler_ScaleTargetRef', name: string, kind: string } } | null> } | null }; +export type HorizontalPodAutoscalersForResourceQuery = { __typename?: 'Query', handleGetHorizontalPodAutoscalerListForResource?: { __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscalerList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, horizontalpodautoscalers: Array<{ __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscaler', currentCPUUtilizationPercentage: number, maxReplicas: number, minReplicas: number, targetCPUUtilizationPercentage: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, scaleTargetRef: { __typename?: 'horizontalpodautoscaler_ScaleTargetRef', name: string, kind: string } } | null> } | null }; export type NamespacesQueryVariables = Exact<{ namespace: Scalars['String']['input']; @@ -4744,7 +4744,7 @@ export type NamespacesQueryVariables = Exact<{ }>; -export type NamespacesQuery = { __typename?: 'Query', handleGetNamespaces?: { __typename?: 'namespace_NamespaceList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, namespaces: Array<{ __typename?: 'namespace_Namespace', phase: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type NamespacesQuery = { __typename?: 'Query', handleGetNamespaces?: { __typename?: 'namespace_NamespaceList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, namespaces: Array<{ __typename?: 'namespace_Namespace', phase: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type NamespaceQueryVariables = Exact<{ name: Scalars['String']['input']; @@ -4762,7 +4762,7 @@ export type NamespaceEventsQueryVariables = Exact<{ }>; -export type NamespaceEventsQuery = { __typename?: 'Query', handleGetNamespaceEvents?: { __typename?: 'common_EventList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type NamespaceEventsQuery = { __typename?: 'Query', handleGetNamespaceEvents?: { __typename?: 'common_EventList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type NodesQueryVariables = Exact<{ namespace: Scalars['String']['input']; @@ -4773,7 +4773,7 @@ export type NodesQueryVariables = Exact<{ }>; -export type NodesQuery = { __typename?: 'Query', handleGetNodeList?: { __typename?: 'node_NodeList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, nodes: Array<{ __typename?: 'node_Node', ready: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, allocatedResources: { __typename?: 'node_NodeAllocatedResources', cpuRequests: any, cpuRequestsFraction: number, cpuCapacity: any, memoryRequests: any, memoryRequestsFraction: number, memoryCapacity: any, allocatedPods: number, podFraction: number, podCapacity: any } } | null> } | null }; +export type NodesQuery = { __typename?: 'Query', handleGetNodeList?: { __typename?: 'node_NodeList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, nodes: Array<{ __typename?: 'node_Node', ready: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, allocatedResources: { __typename?: 'node_NodeAllocatedResources', cpuRequests: any, cpuRequestsFraction: number, cpuCapacity: any, memoryRequests: any, memoryRequestsFraction: number, memoryCapacity: any, allocatedPods: number, podFraction: number, podCapacity: any } } | null> } | null }; export type NodeQueryVariables = Exact<{ name: Scalars['String']['input']; @@ -4785,10 +4785,14 @@ export type NodeQuery = { __typename?: 'Query', handleGetNodeDetail?: { __typena export type NodePodsQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type NodePodsQuery = { __typename?: 'Query', handleGetNodePods?: { __typename?: 'pod_PodList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, pods: Array<{ __typename?: 'pod_Pod', status: string, containerImages: Array, nodeName: string, restartCount: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, containerStatuses: Array<{ __typename?: 'pod_ContainerStatus', name: string, ready: boolean, state: ContainerState } | null>, warnings: Array<{ __typename?: 'common_Event', message: string } | null> } | null> } | null }; +export type NodePodsQuery = { __typename?: 'Query', handleGetNodePods?: { __typename?: 'pod_PodList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, pods: Array<{ __typename?: 'pod_Pod', status: string, containerImages: Array, nodeName: string, restartCount: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, containerStatuses: Array<{ __typename?: 'pod_ContainerStatus', name: string, ready: boolean, state: ContainerState } | null>, warnings: Array<{ __typename?: 'common_Event', message: string } | null> } | null> } | null }; export type NodeEventsQueryVariables = Exact<{ name: Scalars['String']['input']; @@ -4799,7 +4803,7 @@ export type NodeEventsQueryVariables = Exact<{ }>; -export type NodeEventsQuery = { __typename?: 'Query', handleGetNodeEvents?: { __typename?: 'common_EventList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type NodeEventsQuery = { __typename?: 'Query', handleGetNodeEvents?: { __typename?: 'common_EventList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type ListMetaFragment = { __typename?: 'types_ListMeta', totalItems: number }; @@ -4827,7 +4831,7 @@ export type ResourceOwnerFragment = { __typename?: 'controller_ResourceOwner', c export type SelectorFragment = { __typename?: 'v1_LabelSelector', matchLabels?: any | null, matchExpressions?: Array<{ __typename?: 'v1_LabelSelectorRequirement', key: string, operator: string, values?: Array | null } | null> | null }; -export type HorizontalPodAutoscalerListFragment = { __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscalerList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, horizontalpodautoscalers: Array<{ __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscaler', currentCPUUtilizationPercentage: number, maxReplicas: number, minReplicas: number, targetCPUUtilizationPercentage: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, scaleTargetRef: { __typename?: 'horizontalpodautoscaler_ScaleTargetRef', name: string, kind: string } } | null> }; +export type HorizontalPodAutoscalerListFragment = { __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscalerList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, horizontalpodautoscalers: Array<{ __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscaler', currentCPUUtilizationPercentage: number, maxReplicas: number, minReplicas: number, targetCPUUtilizationPercentage: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, scaleTargetRef: { __typename?: 'horizontalpodautoscaler_ScaleTargetRef', name: string, kind: string } } | null> }; export type HorizontalPodAutoscalerFragment = { __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscaler', currentCPUUtilizationPercentage: number, maxReplicas: number, minReplicas: number, targetCPUUtilizationPercentage: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, scaleTargetRef: { __typename?: 'horizontalpodautoscaler_ScaleTargetRef', name: string, kind: string } }; @@ -4867,6 +4871,35 @@ export type ResourceUpdateMutationVariables = Exact<{ export type ResourceUpdateMutation = { __typename?: 'Mutation', handlePutResource?: any | null }; +export type ResourceScaleMutationVariables = Exact<{ + kind: Scalars['String']['input']; + namespace: Scalars['String']['input']; + name: Scalars['String']['input']; + scaleBy: Scalars['String']['input']; +}>; + + +export type ResourceScaleMutation = { __typename?: 'Mutation', handleScaleResource?: { __typename?: 'scaling_ReplicaCounts', actualReplicas: number, desiredReplicas: number } | null }; + +export type ResourceDeleteMutationVariables = Exact<{ + kind: Scalars['String']['input']; + name: Scalars['String']['input']; + deleteNow?: InputMaybe; +}>; + + +export type ResourceDeleteMutation = { __typename?: 'Mutation', handleDeleteResource?: any | null }; + +export type NamespacedResourceDeleteMutationVariables = Exact<{ + kind: Scalars['String']['input']; + namespace: Scalars['String']['input']; + name: Scalars['String']['input']; + deleteNow?: InputMaybe; +}>; + + +export type NamespacedResourceDeleteMutation = { __typename?: 'Mutation', handleDeleteResource?: any | null }; + export type ConfigMapsQueryVariables = Exact<{ namespace: Scalars['String']['input']; filterBy?: InputMaybe; @@ -4876,7 +4909,7 @@ export type ConfigMapsQueryVariables = Exact<{ }>; -export type ConfigMapsQuery = { __typename?: 'Query', handleGetConfigMapList?: { __typename?: 'configmap_ConfigMapList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'configmap_ConfigMap', typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type ConfigMapsQuery = { __typename?: 'Query', handleGetConfigMapList?: { __typename?: 'configmap_ConfigMapList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'configmap_ConfigMap', typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type ConfigMapQueryVariables = Exact<{ name: Scalars['String']['input']; @@ -4895,7 +4928,7 @@ export type SecretsQueryVariables = Exact<{ }>; -export type SecretsQuery = { __typename?: 'Query', handleGetSecretList?: { __typename?: 'secret_SecretList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, secrets: Array<{ __typename?: 'secret_Secret', type: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type SecretsQuery = { __typename?: 'Query', handleGetSecretList?: { __typename?: 'secret_SecretList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, secrets: Array<{ __typename?: 'secret_Secret', type: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type SecretQueryVariables = Exact<{ name: Scalars['String']['input']; @@ -4913,7 +4946,7 @@ export type CustomResourceDefinitionsQueryVariables = Exact<{ }>; -export type CustomResourceDefinitionsQuery = { __typename?: 'Query', handleGetCustomResourceDefinitionList?: { __typename?: 'types_CustomResourceDefinitionList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'types_CustomResourceDefinition', established: string, group: string, scope: string, version?: string | null, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, names: { __typename?: 'types_CustomResourceDefinitionNames', categories?: Array | null, kind: string, listKind?: string | null, plural: string, shortNames?: Array | null, singular?: string | null } } | null> } | null }; +export type CustomResourceDefinitionsQuery = { __typename?: 'Query', handleGetCustomResourceDefinitionList?: { __typename?: 'types_CustomResourceDefinitionList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'types_CustomResourceDefinition', established: string, group: string, scope: string, version?: string | null, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, names: { __typename?: 'types_CustomResourceDefinitionNames', categories?: Array | null, kind: string, listKind?: string | null, plural: string, shortNames?: Array | null, singular?: string | null } } | null> } | null }; export type CustomResourceDefinitionQueryVariables = Exact<{ name: Scalars['String']['input']; @@ -4932,7 +4965,7 @@ export type CustomResourcesQueryVariables = Exact<{ }>; -export type CustomResourcesQuery = { __typename?: 'Query', handleGetCustomResourceObjectList?: { __typename?: 'types_CustomResourceObjectList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'types_CustomResourceObject', typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type CustomResourcesQuery = { __typename?: 'Query', handleGetCustomResourceObjectList?: { __typename?: 'types_CustomResourceObjectList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'types_CustomResourceObject', typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type CustomResourceQueryVariables = Exact<{ namespace: Scalars['String']['input']; @@ -4947,10 +4980,14 @@ export type CustomResourceEventsQueryVariables = Exact<{ crd: Scalars['String']['input']; namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type CustomResourceEventsQuery = { __typename?: 'Query', handleGetCustomResourceObjectEvents?: { __typename?: 'common_EventList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type CustomResourceEventsQuery = { __typename?: 'Query', handleGetCustomResourceObjectEvents?: { __typename?: 'common_EventList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type IngressesQueryVariables = Exact<{ namespace: Scalars['String']['input']; @@ -4961,7 +4998,7 @@ export type IngressesQueryVariables = Exact<{ }>; -export type IngressesQuery = { __typename?: 'Query', handleGetIngressList?: { __typename?: 'ingress_IngressList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'ingress_Ingress', hosts: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, endpoints: Array<{ __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> } | null> } | null> } | null }; +export type IngressesQuery = { __typename?: 'Query', handleGetIngressList?: { __typename?: 'ingress_IngressList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'ingress_Ingress', hosts: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, endpoints: Array<{ __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> } | null> } | null> } | null }; export type IngressQueryVariables = Exact<{ name: Scalars['String']['input']; @@ -4974,12 +5011,16 @@ export type IngressQuery = { __typename?: 'Query', handleGetIngressDetail?: { __ export type IngressEventsQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type IngressEventsQuery = { __typename?: 'Query', handleGetIngressEvent?: { __typename?: 'common_EventList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type IngressEventsQuery = { __typename?: 'Query', handleGetIngressEvent?: { __typename?: 'common_EventList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; -export type IngressListFragment = { __typename?: 'ingress_IngressList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'ingress_Ingress', hosts: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, endpoints: Array<{ __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> } | null> } | null> }; +export type IngressListFragment = { __typename?: 'ingress_IngressList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'ingress_Ingress', hosts: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, endpoints: Array<{ __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> } | null> } | null> }; export type IngressClassesQueryVariables = Exact<{ filterBy?: InputMaybe; @@ -4989,7 +5030,7 @@ export type IngressClassesQueryVariables = Exact<{ }>; -export type IngressClassesQuery = { __typename?: 'Query', handleGetIngressClassList?: { __typename?: 'ingressclass_IngressClassList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'ingressclass_IngressClass', controller: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type IngressClassesQuery = { __typename?: 'Query', handleGetIngressClassList?: { __typename?: 'ingressclass_IngressClassList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'ingressclass_IngressClass', controller: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type IngressClassQueryVariables = Exact<{ name: Scalars['String']['input']; @@ -5007,7 +5048,7 @@ export type NetworkPoliciesQueryVariables = Exact<{ }>; -export type NetworkPoliciesQuery = { __typename?: 'Query', handleGetNetworkPolicyList?: { __typename?: 'networkpolicy_NetworkPolicyList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'networkpolicy_NetworkPolicy', typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type NetworkPoliciesQuery = { __typename?: 'Query', handleGetNetworkPolicyList?: { __typename?: 'networkpolicy_NetworkPolicyList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'networkpolicy_NetworkPolicy', typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type NetworkPolicyQueryVariables = Exact<{ name: Scalars['String']['input']; @@ -5026,7 +5067,7 @@ export type ServicesQueryVariables = Exact<{ }>; -export type ServicesQuery = { __typename?: 'Query', handleGetServiceList?: { __typename?: 'service_ServiceList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, services: Array<{ __typename?: 'service_Service', type: string, clusterIP: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, internalEndpoint: { __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> }, externalEndpoints: Array<{ __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> } | null> } | null> } | null }; +export type ServicesQuery = { __typename?: 'Query', handleGetServiceList?: { __typename?: 'service_ServiceList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, services: Array<{ __typename?: 'service_Service', type: string, clusterIP: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, internalEndpoint: { __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> }, externalEndpoints: Array<{ __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> } | null> } | null> } | null }; export type ServiceQueryVariables = Exact<{ name: Scalars['String']['input']; @@ -5039,28 +5080,40 @@ export type ServiceQuery = { __typename?: 'Query', handleGetServiceDetail?: { __ export type ServiceEventsQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type ServiceEventsQuery = { __typename?: 'Query', handleGetServiceEvent?: { __typename?: 'common_EventList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type ServiceEventsQuery = { __typename?: 'Query', handleGetServiceEvent?: { __typename?: 'common_EventList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type ServicePodsQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type ServicePodsQuery = { __typename?: 'Query', handleGetServicePods?: { __typename?: 'pod_PodList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, pods: Array<{ __typename?: 'pod_Pod', status: string, containerImages: Array, nodeName: string, restartCount: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, containerStatuses: Array<{ __typename?: 'pod_ContainerStatus', name: string, ready: boolean, state: ContainerState } | null>, warnings: Array<{ __typename?: 'common_Event', message: string } | null> } | null> } | null }; +export type ServicePodsQuery = { __typename?: 'Query', handleGetServicePods?: { __typename?: 'pod_PodList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, pods: Array<{ __typename?: 'pod_Pod', status: string, containerImages: Array, nodeName: string, restartCount: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, containerStatuses: Array<{ __typename?: 'pod_ContainerStatus', name: string, ready: boolean, state: ContainerState } | null>, warnings: Array<{ __typename?: 'common_Event', message: string } | null> } | null> } | null }; export type ServiceIngressesQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type ServiceIngressesQuery = { __typename?: 'Query', handleGetServiceIngressList?: { __typename?: 'ingress_IngressList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'ingress_Ingress', hosts: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, endpoints: Array<{ __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> } | null> } | null> } | null }; +export type ServiceIngressesQuery = { __typename?: 'Query', handleGetServiceIngressList?: { __typename?: 'ingress_IngressList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'ingress_Ingress', hosts: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, endpoints: Array<{ __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> } | null> } | null> } | null }; -export type ServiceListFragment = { __typename?: 'service_ServiceList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, services: Array<{ __typename?: 'service_Service', type: string, clusterIP: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, internalEndpoint: { __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> }, externalEndpoints: Array<{ __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> } | null> } | null> }; +export type ServiceListFragment = { __typename?: 'service_ServiceList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, services: Array<{ __typename?: 'service_Service', type: string, clusterIP: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, internalEndpoint: { __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> }, externalEndpoints: Array<{ __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> } | null> } | null> }; export type PersistentVolumesQueryVariables = Exact<{ filterBy?: InputMaybe; @@ -5070,7 +5123,7 @@ export type PersistentVolumesQueryVariables = Exact<{ }>; -export type PersistentVolumesQuery = { __typename?: 'Query', handleGetPersistentVolumeList?: { __typename?: 'persistentvolume_PersistentVolumeList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'persistentvolume_PersistentVolume', status: string, claim: string, storageClass: string, reason: string, reclaimPolicy: string, accessModes: Array, capacity: any, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type PersistentVolumesQuery = { __typename?: 'Query', handleGetPersistentVolumeList?: { __typename?: 'persistentvolume_PersistentVolumeList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'persistentvolume_PersistentVolume', status: string, claim: string, storageClass: string, reason: string, reclaimPolicy: string, accessModes: Array, capacity: any, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type PersistentVolumeQueryVariables = Exact<{ name: Scalars['String']['input']; @@ -5088,7 +5141,7 @@ export type PersistentVolumeClaimsQueryVariables = Exact<{ }>; -export type PersistentVolumeClaimsQuery = { __typename?: 'Query', handleGetPersistentVolumeClaimList?: { __typename?: 'persistentvolumeclaim_PersistentVolumeClaimList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'persistentvolumeclaim_PersistentVolumeClaim', status: string, volume: string, storageClass: string, accessModes: Array, capacity: any, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type PersistentVolumeClaimsQuery = { __typename?: 'Query', handleGetPersistentVolumeClaimList?: { __typename?: 'persistentvolumeclaim_PersistentVolumeClaimList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'persistentvolumeclaim_PersistentVolumeClaim', status: string, volume: string, storageClass: string, accessModes: Array, capacity: any, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type PersistentVolumeClaimQueryVariables = Exact<{ name: Scalars['String']['input']; @@ -5102,7 +5155,7 @@ export type PersistentVolumeClaimFragment = { __typename?: 'persistentvolumeclai export type PersistentVolumeClaimDetailFragment = { __typename?: 'persistentvolumeclaim_PersistentVolumeClaimDetail', status: string, volume: string, storageClass: string, accessModes: Array, capacity: any, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } }; -export type PersistentVolumeClaimListFragment = { __typename?: 'persistentvolumeclaim_PersistentVolumeClaimList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'persistentvolumeclaim_PersistentVolumeClaim', status: string, volume: string, storageClass: string, accessModes: Array, capacity: any, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> }; +export type PersistentVolumeClaimListFragment = { __typename?: 'persistentvolumeclaim_PersistentVolumeClaimList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'persistentvolumeclaim_PersistentVolumeClaim', status: string, volume: string, storageClass: string, accessModes: Array, capacity: any, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> }; export type StorageClassesQueryVariables = Exact<{ filterBy?: InputMaybe; @@ -5112,7 +5165,7 @@ export type StorageClassesQueryVariables = Exact<{ }>; -export type StorageClassesQuery = { __typename?: 'Query', handleGetStorageClassList?: { __typename?: 'storageclass_StorageClassList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'storageclass_StorageClass', parameters: any, provisioner: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type StorageClassesQuery = { __typename?: 'Query', handleGetStorageClassList?: { __typename?: 'storageclass_StorageClassList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'storageclass_StorageClass', parameters: any, provisioner: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type StorageClassQueryVariables = Exact<{ name: Scalars['String']['input']; @@ -5141,7 +5194,7 @@ export type CronJobsQueryVariables = Exact<{ }>; -export type CronJobsQuery = { __typename?: 'Query', handleGetCronJobList?: { __typename?: 'cronjob_CronJobList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'cronjob_CronJob', containerImages: Array, schedule: string, suspend: boolean, active: number, lastSchedule: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type CronJobsQuery = { __typename?: 'Query', handleGetCronJobList?: { __typename?: 'cronjob_CronJobList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'cronjob_CronJob', containerImages: Array, schedule: string, suspend: boolean, active: number, lastSchedule: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type CronJobQueryVariables = Exact<{ namespace: Scalars['String']['input']; @@ -5154,21 +5207,37 @@ export type CronJobQuery = { __typename?: 'Query', handleGetCronJobDetail?: { __ export type CronJobEventsQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type CronJobEventsQuery = { __typename?: 'Query', handleGetCronJobEvents?: { __typename?: 'common_EventList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type CronJobEventsQuery = { __typename?: 'Query', handleGetCronJobEvents?: { __typename?: 'common_EventList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type CronJobJobsQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; active?: InputMaybe; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; +}>; + + +export type CronJobJobsQuery = { __typename?: 'Query', handleGetCronJobJobs?: { __typename?: 'job_JobList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, jobs: Array<{ __typename?: 'job_Job', initContainerImages: Array, containerImages: Array, parallelism: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> }, jobStatus: { __typename?: 'job_JobStatus', message: string, status: string, conditions: Array<{ __typename?: 'common_Condition', message: string, type: string, status: string, lastProbeTime: string, lastTransitionTime: string, reason: string } | null> } } | null> } | null }; + +export type CronJobTriggerMutationVariables = Exact<{ + name: Scalars['String']['input']; + namespace: Scalars['String']['input']; }>; -export type CronJobJobsQuery = { __typename?: 'Query', handleGetCronJobJobs?: { __typename?: 'job_JobList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, jobs: Array<{ __typename?: 'job_Job', initContainerImages: Array, containerImages: Array, parallelism: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> }, jobStatus: { __typename?: 'job_JobStatus', message: string, status: string, conditions: Array<{ __typename?: 'common_Condition', message: string, type: string, status: string, lastProbeTime: string, lastTransitionTime: string, reason: string } | null> } } | null> } | null }; +export type CronJobTriggerMutation = { __typename?: 'Mutation', handleTriggerCronJob?: any | null }; -export type CronJobListFragment = { __typename?: 'cronjob_CronJobList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'cronjob_CronJob', containerImages: Array, schedule: string, suspend: boolean, active: number, lastSchedule: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> }; +export type CronJobListFragment = { __typename?: 'cronjob_CronJobList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'cronjob_CronJob', containerImages: Array, schedule: string, suspend: boolean, active: number, lastSchedule: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> }; export type CronJobFragment = { __typename?: 'cronjob_CronJob', containerImages: Array, schedule: string, suspend: boolean, active: number, lastSchedule: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } }; @@ -5183,7 +5252,7 @@ export type DaemonSetsQueryVariables = Exact<{ }>; -export type DaemonSetsQuery = { __typename?: 'Query', handleGetDaemonSetList?: { __typename?: 'daemonset_DaemonSetList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, daemonSets: Array<{ __typename?: 'daemonset_DaemonSet', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> } | null }; +export type DaemonSetsQuery = { __typename?: 'Query', handleGetDaemonSetList?: { __typename?: 'daemonset_DaemonSetList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, daemonSets: Array<{ __typename?: 'daemonset_DaemonSet', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> } | null }; export type DaemonSetQueryVariables = Exact<{ namespace: Scalars['String']['input']; @@ -5196,28 +5265,40 @@ export type DaemonSetQuery = { __typename?: 'Query', handleGetDaemonSetDetail?: export type DaemonSetEventsQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type DaemonSetEventsQuery = { __typename?: 'Query', handleGetDaemonSetEvents?: { __typename?: 'common_EventList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type DaemonSetEventsQuery = { __typename?: 'Query', handleGetDaemonSetEvents?: { __typename?: 'common_EventList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type DaemonSetPodsQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type DaemonSetPodsQuery = { __typename?: 'Query', handleGetDaemonSetPods?: { __typename?: 'pod_PodList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, pods: Array<{ __typename?: 'pod_Pod', status: string, containerImages: Array, nodeName: string, restartCount: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, containerStatuses: Array<{ __typename?: 'pod_ContainerStatus', name: string, ready: boolean, state: ContainerState } | null>, warnings: Array<{ __typename?: 'common_Event', message: string } | null> } | null> } | null }; +export type DaemonSetPodsQuery = { __typename?: 'Query', handleGetDaemonSetPods?: { __typename?: 'pod_PodList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, pods: Array<{ __typename?: 'pod_Pod', status: string, containerImages: Array, nodeName: string, restartCount: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, containerStatuses: Array<{ __typename?: 'pod_ContainerStatus', name: string, ready: boolean, state: ContainerState } | null>, warnings: Array<{ __typename?: 'common_Event', message: string } | null> } | null> } | null }; export type DaemonSetServicesQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type DaemonSetServicesQuery = { __typename?: 'Query', handleGetDaemonSetServices?: { __typename?: 'service_ServiceList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, services: Array<{ __typename?: 'service_Service', type: string, clusterIP: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, internalEndpoint: { __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> }, externalEndpoints: Array<{ __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> } | null> } | null> } | null }; +export type DaemonSetServicesQuery = { __typename?: 'Query', handleGetDaemonSetServices?: { __typename?: 'service_ServiceList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, services: Array<{ __typename?: 'service_Service', type: string, clusterIP: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, internalEndpoint: { __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> }, externalEndpoints: Array<{ __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> } | null> } | null> } | null }; -export type DaemonSetListFragment = { __typename?: 'daemonset_DaemonSetList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, daemonSets: Array<{ __typename?: 'daemonset_DaemonSet', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> }; +export type DaemonSetListFragment = { __typename?: 'daemonset_DaemonSetList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, daemonSets: Array<{ __typename?: 'daemonset_DaemonSet', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> }; export type DaemonSetFragment = { __typename?: 'daemonset_DaemonSet', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } }; @@ -5232,7 +5313,7 @@ export type DeploymentsQueryVariables = Exact<{ }>; -export type DeploymentsQuery = { __typename?: 'Query', handleGetDeployments?: { __typename?: 'deployment_DeploymentList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, deployments: Array<{ __typename?: 'deployment_Deployment', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, pods: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> } | null }; +export type DeploymentsQuery = { __typename?: 'Query', handleGetDeployments?: { __typename?: 'deployment_DeploymentList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, deployments: Array<{ __typename?: 'deployment_Deployment', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, pods: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> } | null }; export type DeploymentQueryVariables = Exact<{ namespace: Scalars['String']['input']; @@ -5245,14 +5326,22 @@ export type DeploymentQuery = { __typename?: 'Query', handleGetDeploymentDetail? export type DeploymentEventsQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type DeploymentEventsQuery = { __typename?: 'Query', handleGetDeploymentEvents?: { __typename?: 'common_EventList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type DeploymentEventsQuery = { __typename?: 'Query', handleGetDeploymentEvents?: { __typename?: 'common_EventList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type DeploymentNewReplicaSetQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; @@ -5261,12 +5350,16 @@ export type DeploymentNewReplicaSetQuery = { __typename?: 'Query', handleGetDepl export type DeploymentOldReplicaSetsQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type DeploymentOldReplicaSetsQuery = { __typename?: 'Query', handleGetDeploymentOldReplicaSets?: { __typename?: 'replicaset_ReplicaSetList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, replicaSets: Array<{ __typename?: 'replicaset_ReplicaSet', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> } | null }; +export type DeploymentOldReplicaSetsQuery = { __typename?: 'Query', handleGetDeploymentOldReplicaSets?: { __typename?: 'replicaset_ReplicaSetList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, replicaSets: Array<{ __typename?: 'replicaset_ReplicaSet', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> } | null }; -export type DeploymentListFragment = { __typename?: 'deployment_DeploymentList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, deployments: Array<{ __typename?: 'deployment_Deployment', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, pods: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> }; +export type DeploymentListFragment = { __typename?: 'deployment_DeploymentList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, deployments: Array<{ __typename?: 'deployment_Deployment', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, pods: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> }; export type DeploymentFragment = { __typename?: 'deployment_Deployment', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, pods: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } }; @@ -5285,7 +5378,7 @@ export type JobsQueryVariables = Exact<{ }>; -export type JobsQuery = { __typename?: 'Query', handleGetJobList?: { __typename?: 'job_JobList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, jobs: Array<{ __typename?: 'job_Job', initContainerImages: Array, containerImages: Array, parallelism: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> }, jobStatus: { __typename?: 'job_JobStatus', message: string, status: string, conditions: Array<{ __typename?: 'common_Condition', message: string, type: string, status: string, lastProbeTime: string, lastTransitionTime: string, reason: string } | null> } } | null> } | null }; +export type JobsQuery = { __typename?: 'Query', handleGetJobList?: { __typename?: 'job_JobList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, jobs: Array<{ __typename?: 'job_Job', initContainerImages: Array, containerImages: Array, parallelism: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> }, jobStatus: { __typename?: 'job_JobStatus', message: string, status: string, conditions: Array<{ __typename?: 'common_Condition', message: string, type: string, status: string, lastProbeTime: string, lastTransitionTime: string, reason: string } | null> } } | null> } | null }; export type JobQueryVariables = Exact<{ namespace: Scalars['String']['input']; @@ -5298,20 +5391,28 @@ export type JobQuery = { __typename?: 'Query', handleGetJobDetail?: { __typename export type JobEventsQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type JobEventsQuery = { __typename?: 'Query', handleGetJobEvents?: { __typename?: 'common_EventList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type JobEventsQuery = { __typename?: 'Query', handleGetJobEvents?: { __typename?: 'common_EventList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type JobPodsQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type JobPodsQuery = { __typename?: 'Query', handleGetJobPods?: { __typename?: 'pod_PodList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, pods: Array<{ __typename?: 'pod_Pod', status: string, containerImages: Array, nodeName: string, restartCount: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, containerStatuses: Array<{ __typename?: 'pod_ContainerStatus', name: string, ready: boolean, state: ContainerState } | null>, warnings: Array<{ __typename?: 'common_Event', message: string } | null> } | null> } | null }; +export type JobPodsQuery = { __typename?: 'Query', handleGetJobPods?: { __typename?: 'pod_PodList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, pods: Array<{ __typename?: 'pod_Pod', status: string, containerImages: Array, nodeName: string, restartCount: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, containerStatuses: Array<{ __typename?: 'pod_ContainerStatus', name: string, ready: boolean, state: ContainerState } | null>, warnings: Array<{ __typename?: 'common_Event', message: string } | null> } | null> } | null }; -export type JobListFragment = { __typename?: 'job_JobList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, jobs: Array<{ __typename?: 'job_Job', initContainerImages: Array, containerImages: Array, parallelism: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> }, jobStatus: { __typename?: 'job_JobStatus', message: string, status: string, conditions: Array<{ __typename?: 'common_Condition', message: string, type: string, status: string, lastProbeTime: string, lastTransitionTime: string, reason: string } | null> } } | null> }; +export type JobListFragment = { __typename?: 'job_JobList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, jobs: Array<{ __typename?: 'job_Job', initContainerImages: Array, containerImages: Array, parallelism: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> }, jobStatus: { __typename?: 'job_JobStatus', message: string, status: string, conditions: Array<{ __typename?: 'common_Condition', message: string, type: string, status: string, lastProbeTime: string, lastTransitionTime: string, reason: string } | null> } } | null> }; export type JobFragment = { __typename?: 'job_Job', initContainerImages: Array, containerImages: Array, parallelism: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> }, jobStatus: { __typename?: 'job_JobStatus', message: string, status: string, conditions: Array<{ __typename?: 'common_Condition', message: string, type: string, status: string, lastProbeTime: string, lastTransitionTime: string, reason: string } | null> } }; @@ -5328,7 +5429,7 @@ export type PodsQueryVariables = Exact<{ }>; -export type PodsQuery = { __typename?: 'Query', handleGetPods?: { __typename?: 'pod_PodList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, pods: Array<{ __typename?: 'pod_Pod', status: string, containerImages: Array, nodeName: string, restartCount: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, containerStatuses: Array<{ __typename?: 'pod_ContainerStatus', name: string, ready: boolean, state: ContainerState } | null>, warnings: Array<{ __typename?: 'common_Event', message: string } | null> } | null> } | null }; +export type PodsQuery = { __typename?: 'Query', handleGetPods?: { __typename?: 'pod_PodList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, pods: Array<{ __typename?: 'pod_Pod', status: string, containerImages: Array, nodeName: string, restartCount: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, containerStatuses: Array<{ __typename?: 'pod_ContainerStatus', name: string, ready: boolean, state: ContainerState } | null>, warnings: Array<{ __typename?: 'common_Event', message: string } | null> } | null> } | null }; export type PodQueryVariables = Exact<{ name: Scalars['String']['input']; @@ -5336,7 +5437,7 @@ export type PodQueryVariables = Exact<{ }>; -export type PodQuery = { __typename?: 'Query', handleGetPodDetail?: { __typename?: 'pod_PodDetail', nodeName: string, restartCount: number, serviceAccountName: string, podIP: string, podPhase: string, qosClass: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, conditions: Array<{ __typename?: 'common_Condition', message: string, type: string, status: string, lastProbeTime: string, lastTransitionTime: string, reason: string } | null>, containers: Array<{ __typename?: 'pod_Container', name: string, args: Array, commands: Array, image: string, state: ContainerState, securityContext: { __typename?: 'v1_SecurityContext', runAsUser?: any | null, runAsNonRoot?: boolean | null, runAsGroup?: any | null, allowPrivilegeEscalation?: boolean | null, privileged?: boolean | null, procMount?: string | null, readOnlyRootFilesystem?: boolean | null, windowsOptions?: { __typename?: 'v1_WindowsSecurityContextOptions', runAsUserName?: string | null, hostProcess?: boolean | null, gmsaCredentialSpecName?: string | null, gmsaCredentialSpec?: string | null } | null, seLinuxOptions?: { __typename?: 'v1_SELinuxOptions', user?: string | null, role?: string | null, level?: string | null, type?: string | null } | null, seccompProfile?: { __typename?: 'v1_SeccompProfile', type: string, localhostProfile?: string | null } | null, capabilities?: { __typename?: 'v1_Capabilities', add?: Array | null, drop?: Array | null } | null }, livenessProbe: { __typename?: 'v1_Probe', failureThreshold?: number | null, initialDelaySeconds?: number | null, periodSeconds?: number | null, successThreshold?: number | null, terminationGracePeriodSeconds?: any | null, timeoutSeconds?: number | null, tcpSocket?: { __typename?: 'v1_TCPSocketAction', host?: string | null, port: string } | null, grpc?: { __typename?: 'v1_GRPCAction', service: string, port: number } | null, httpGet?: { __typename?: 'v1_HTTPGetAction', host?: string | null, port: string, scheme?: string | null, path?: string | null, httpHeaders?: Array<{ __typename?: 'v1_HTTPHeader', name: string, value: string } | null> | null } | null, exec?: { __typename?: 'v1_ExecAction', command?: Array | null } | null }, readinessProbe: { __typename?: 'v1_Probe', failureThreshold?: number | null, initialDelaySeconds?: number | null, periodSeconds?: number | null, successThreshold?: number | null, terminationGracePeriodSeconds?: any | null, timeoutSeconds?: number | null, tcpSocket?: { __typename?: 'v1_TCPSocketAction', host?: string | null, port: string } | null, grpc?: { __typename?: 'v1_GRPCAction', service: string, port: number } | null, httpGet?: { __typename?: 'v1_HTTPGetAction', host?: string | null, port: string, scheme?: string | null, path?: string | null, httpHeaders?: Array<{ __typename?: 'v1_HTTPHeader', name: string, value: string } | null> | null } | null, exec?: { __typename?: 'v1_ExecAction', command?: Array | null } | null }, status: { __typename?: 'v1_ContainerStatus', name: string, started?: boolean | null, ready: boolean, containerID?: string | null, image: string, imageID: string, restartCount: number, resources?: { __typename?: 'v1_ResourceRequirements', claims?: Array<{ __typename?: 'v1_ResourceClaim', name: string } | null> | null } | null, lastState?: { __typename?: 'v1_ContainerState', running?: { __typename?: 'v1_ContainerStateRunning', startedAt?: string | null } | null, terminated?: { __typename?: 'v1_ContainerStateTerminated', startedAt?: string | null, reason?: string | null, message?: string | null, containerID?: string | null, exitCode: number, finishedAt?: string | null, signal?: number | null } | null, waiting?: { __typename?: 'v1_ContainerStateWaiting', message?: string | null, reason?: string | null } | null } | null, state?: { __typename?: 'v1_ContainerState', running?: { __typename?: 'v1_ContainerStateRunning', startedAt?: string | null } | null, terminated?: { __typename?: 'v1_ContainerStateTerminated', startedAt?: string | null, reason?: string | null, message?: string | null, containerID?: string | null, exitCode: number, finishedAt?: string | null, signal?: number | null } | null, waiting?: { __typename?: 'v1_ContainerStateWaiting', message?: string | null, reason?: string | null } | null } | null }, resources?: { __typename?: 'v1_ResourceRequirements', requests: any, limits: any, claims?: Array<{ __typename?: 'v1_ResourceClaim', name: string } | null> | null } | null } | null>, initContainers: Array<{ __typename?: 'pod_Container', name: string, args: Array, commands: Array, image: string, state: ContainerState, securityContext: { __typename?: 'v1_SecurityContext', runAsUser?: any | null, runAsNonRoot?: boolean | null, runAsGroup?: any | null, allowPrivilegeEscalation?: boolean | null, privileged?: boolean | null, procMount?: string | null, readOnlyRootFilesystem?: boolean | null, windowsOptions?: { __typename?: 'v1_WindowsSecurityContextOptions', runAsUserName?: string | null, hostProcess?: boolean | null, gmsaCredentialSpecName?: string | null, gmsaCredentialSpec?: string | null } | null, seLinuxOptions?: { __typename?: 'v1_SELinuxOptions', user?: string | null, role?: string | null, level?: string | null, type?: string | null } | null, seccompProfile?: { __typename?: 'v1_SeccompProfile', type: string, localhostProfile?: string | null } | null, capabilities?: { __typename?: 'v1_Capabilities', add?: Array | null, drop?: Array | null } | null }, livenessProbe: { __typename?: 'v1_Probe', failureThreshold?: number | null, initialDelaySeconds?: number | null, periodSeconds?: number | null, successThreshold?: number | null, terminationGracePeriodSeconds?: any | null, timeoutSeconds?: number | null, tcpSocket?: { __typename?: 'v1_TCPSocketAction', host?: string | null, port: string } | null, grpc?: { __typename?: 'v1_GRPCAction', service: string, port: number } | null, httpGet?: { __typename?: 'v1_HTTPGetAction', host?: string | null, port: string, scheme?: string | null, path?: string | null, httpHeaders?: Array<{ __typename?: 'v1_HTTPHeader', name: string, value: string } | null> | null } | null, exec?: { __typename?: 'v1_ExecAction', command?: Array | null } | null }, readinessProbe: { __typename?: 'v1_Probe', failureThreshold?: number | null, initialDelaySeconds?: number | null, periodSeconds?: number | null, successThreshold?: number | null, terminationGracePeriodSeconds?: any | null, timeoutSeconds?: number | null, tcpSocket?: { __typename?: 'v1_TCPSocketAction', host?: string | null, port: string } | null, grpc?: { __typename?: 'v1_GRPCAction', service: string, port: number } | null, httpGet?: { __typename?: 'v1_HTTPGetAction', host?: string | null, port: string, scheme?: string | null, path?: string | null, httpHeaders?: Array<{ __typename?: 'v1_HTTPHeader', name: string, value: string } | null> | null } | null, exec?: { __typename?: 'v1_ExecAction', command?: Array | null } | null }, status: { __typename?: 'v1_ContainerStatus', name: string, started?: boolean | null, ready: boolean, containerID?: string | null, image: string, imageID: string, restartCount: number, resources?: { __typename?: 'v1_ResourceRequirements', claims?: Array<{ __typename?: 'v1_ResourceClaim', name: string } | null> | null } | null, lastState?: { __typename?: 'v1_ContainerState', running?: { __typename?: 'v1_ContainerStateRunning', startedAt?: string | null } | null, terminated?: { __typename?: 'v1_ContainerStateTerminated', startedAt?: string | null, reason?: string | null, message?: string | null, containerID?: string | null, exitCode: number, finishedAt?: string | null, signal?: number | null } | null, waiting?: { __typename?: 'v1_ContainerStateWaiting', message?: string | null, reason?: string | null } | null } | null, state?: { __typename?: 'v1_ContainerState', running?: { __typename?: 'v1_ContainerStateRunning', startedAt?: string | null } | null, terminated?: { __typename?: 'v1_ContainerStateTerminated', startedAt?: string | null, reason?: string | null, message?: string | null, containerID?: string | null, exitCode: number, finishedAt?: string | null, signal?: number | null } | null, waiting?: { __typename?: 'v1_ContainerStateWaiting', message?: string | null, reason?: string | null } | null } | null }, resources?: { __typename?: 'v1_ResourceRequirements', requests: any, limits: any, claims?: Array<{ __typename?: 'v1_ResourceClaim', name: string } | null> | null } | null } | null>, imagePullSecrets?: Array<{ __typename?: 'v1_LocalObjectReference', name?: string | null } | null> | null, persistentVolumeClaimList: { __typename?: 'persistentvolumeclaim_PersistentVolumeClaimList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'persistentvolumeclaim_PersistentVolumeClaim', status: string, volume: string, storageClass: string, accessModes: Array, capacity: any, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> }, controller?: { __typename?: 'controller_ResourceOwner', containerImages: Array, initContainerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, pods: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null, securityContext: { __typename?: 'v1_PodSecurityContext', fsGroup?: any | null, fsGroupChangePolicy?: string | null, runAsUser?: any | null, runAsGroup?: any | null, runAsNonRoot?: boolean | null, supplementalGroups?: Array | null, seccompProfile?: { __typename?: 'v1_SeccompProfile', type: string, localhostProfile?: string | null } | null, seLinuxOptions?: { __typename?: 'v1_SELinuxOptions', type?: string | null, level?: string | null, role?: string | null, user?: string | null } | null, sysctls?: Array<{ __typename?: 'v1_Sysctl', name: string, value: string } | null> | null, windowsOptions?: { __typename?: 'v1_WindowsSecurityContextOptions', gmsaCredentialSpec?: string | null, gmsaCredentialSpecName?: string | null, hostProcess?: boolean | null, runAsUserName?: string | null } | null } } | null }; +export type PodQuery = { __typename?: 'Query', handleGetPodDetail?: { __typename?: 'pod_PodDetail', nodeName: string, restartCount: number, serviceAccountName: string, podIP: string, podPhase: string, qosClass: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, conditions: Array<{ __typename?: 'common_Condition', message: string, type: string, status: string, lastProbeTime: string, lastTransitionTime: string, reason: string } | null>, containers: Array<{ __typename?: 'pod_Container', name: string, args: Array, commands: Array, image: string, state: ContainerState, securityContext: { __typename?: 'v1_SecurityContext', runAsUser?: any | null, runAsNonRoot?: boolean | null, runAsGroup?: any | null, allowPrivilegeEscalation?: boolean | null, privileged?: boolean | null, procMount?: string | null, readOnlyRootFilesystem?: boolean | null, windowsOptions?: { __typename?: 'v1_WindowsSecurityContextOptions', runAsUserName?: string | null, hostProcess?: boolean | null, gmsaCredentialSpecName?: string | null, gmsaCredentialSpec?: string | null } | null, seLinuxOptions?: { __typename?: 'v1_SELinuxOptions', user?: string | null, role?: string | null, level?: string | null, type?: string | null } | null, seccompProfile?: { __typename?: 'v1_SeccompProfile', type: string, localhostProfile?: string | null } | null, capabilities?: { __typename?: 'v1_Capabilities', add?: Array | null, drop?: Array | null } | null }, livenessProbe: { __typename?: 'v1_Probe', failureThreshold?: number | null, initialDelaySeconds?: number | null, periodSeconds?: number | null, successThreshold?: number | null, terminationGracePeriodSeconds?: any | null, timeoutSeconds?: number | null, tcpSocket?: { __typename?: 'v1_TCPSocketAction', host?: string | null, port: string } | null, grpc?: { __typename?: 'v1_GRPCAction', service: string, port: number } | null, httpGet?: { __typename?: 'v1_HTTPGetAction', host?: string | null, port: string, scheme?: string | null, path?: string | null, httpHeaders?: Array<{ __typename?: 'v1_HTTPHeader', name: string, value: string } | null> | null } | null, exec?: { __typename?: 'v1_ExecAction', command?: Array | null } | null }, readinessProbe: { __typename?: 'v1_Probe', failureThreshold?: number | null, initialDelaySeconds?: number | null, periodSeconds?: number | null, successThreshold?: number | null, terminationGracePeriodSeconds?: any | null, timeoutSeconds?: number | null, tcpSocket?: { __typename?: 'v1_TCPSocketAction', host?: string | null, port: string } | null, grpc?: { __typename?: 'v1_GRPCAction', service: string, port: number } | null, httpGet?: { __typename?: 'v1_HTTPGetAction', host?: string | null, port: string, scheme?: string | null, path?: string | null, httpHeaders?: Array<{ __typename?: 'v1_HTTPHeader', name: string, value: string } | null> | null } | null, exec?: { __typename?: 'v1_ExecAction', command?: Array | null } | null }, status: { __typename?: 'v1_ContainerStatus', name: string, started?: boolean | null, ready: boolean, containerID?: string | null, image: string, imageID: string, restartCount: number, resources?: { __typename?: 'v1_ResourceRequirements', claims?: Array<{ __typename?: 'v1_ResourceClaim', name: string } | null> | null } | null, lastState?: { __typename?: 'v1_ContainerState', running?: { __typename?: 'v1_ContainerStateRunning', startedAt?: string | null } | null, terminated?: { __typename?: 'v1_ContainerStateTerminated', startedAt?: string | null, reason?: string | null, message?: string | null, containerID?: string | null, exitCode: number, finishedAt?: string | null, signal?: number | null } | null, waiting?: { __typename?: 'v1_ContainerStateWaiting', message?: string | null, reason?: string | null } | null } | null, state?: { __typename?: 'v1_ContainerState', running?: { __typename?: 'v1_ContainerStateRunning', startedAt?: string | null } | null, terminated?: { __typename?: 'v1_ContainerStateTerminated', startedAt?: string | null, reason?: string | null, message?: string | null, containerID?: string | null, exitCode: number, finishedAt?: string | null, signal?: number | null } | null, waiting?: { __typename?: 'v1_ContainerStateWaiting', message?: string | null, reason?: string | null } | null } | null }, resources?: { __typename?: 'v1_ResourceRequirements', requests: any, limits: any, claims?: Array<{ __typename?: 'v1_ResourceClaim', name: string } | null> | null } | null } | null>, initContainers: Array<{ __typename?: 'pod_Container', name: string, args: Array, commands: Array, image: string, state: ContainerState, securityContext: { __typename?: 'v1_SecurityContext', runAsUser?: any | null, runAsNonRoot?: boolean | null, runAsGroup?: any | null, allowPrivilegeEscalation?: boolean | null, privileged?: boolean | null, procMount?: string | null, readOnlyRootFilesystem?: boolean | null, windowsOptions?: { __typename?: 'v1_WindowsSecurityContextOptions', runAsUserName?: string | null, hostProcess?: boolean | null, gmsaCredentialSpecName?: string | null, gmsaCredentialSpec?: string | null } | null, seLinuxOptions?: { __typename?: 'v1_SELinuxOptions', user?: string | null, role?: string | null, level?: string | null, type?: string | null } | null, seccompProfile?: { __typename?: 'v1_SeccompProfile', type: string, localhostProfile?: string | null } | null, capabilities?: { __typename?: 'v1_Capabilities', add?: Array | null, drop?: Array | null } | null }, livenessProbe: { __typename?: 'v1_Probe', failureThreshold?: number | null, initialDelaySeconds?: number | null, periodSeconds?: number | null, successThreshold?: number | null, terminationGracePeriodSeconds?: any | null, timeoutSeconds?: number | null, tcpSocket?: { __typename?: 'v1_TCPSocketAction', host?: string | null, port: string } | null, grpc?: { __typename?: 'v1_GRPCAction', service: string, port: number } | null, httpGet?: { __typename?: 'v1_HTTPGetAction', host?: string | null, port: string, scheme?: string | null, path?: string | null, httpHeaders?: Array<{ __typename?: 'v1_HTTPHeader', name: string, value: string } | null> | null } | null, exec?: { __typename?: 'v1_ExecAction', command?: Array | null } | null }, readinessProbe: { __typename?: 'v1_Probe', failureThreshold?: number | null, initialDelaySeconds?: number | null, periodSeconds?: number | null, successThreshold?: number | null, terminationGracePeriodSeconds?: any | null, timeoutSeconds?: number | null, tcpSocket?: { __typename?: 'v1_TCPSocketAction', host?: string | null, port: string } | null, grpc?: { __typename?: 'v1_GRPCAction', service: string, port: number } | null, httpGet?: { __typename?: 'v1_HTTPGetAction', host?: string | null, port: string, scheme?: string | null, path?: string | null, httpHeaders?: Array<{ __typename?: 'v1_HTTPHeader', name: string, value: string } | null> | null } | null, exec?: { __typename?: 'v1_ExecAction', command?: Array | null } | null }, status: { __typename?: 'v1_ContainerStatus', name: string, started?: boolean | null, ready: boolean, containerID?: string | null, image: string, imageID: string, restartCount: number, resources?: { __typename?: 'v1_ResourceRequirements', claims?: Array<{ __typename?: 'v1_ResourceClaim', name: string } | null> | null } | null, lastState?: { __typename?: 'v1_ContainerState', running?: { __typename?: 'v1_ContainerStateRunning', startedAt?: string | null } | null, terminated?: { __typename?: 'v1_ContainerStateTerminated', startedAt?: string | null, reason?: string | null, message?: string | null, containerID?: string | null, exitCode: number, finishedAt?: string | null, signal?: number | null } | null, waiting?: { __typename?: 'v1_ContainerStateWaiting', message?: string | null, reason?: string | null } | null } | null, state?: { __typename?: 'v1_ContainerState', running?: { __typename?: 'v1_ContainerStateRunning', startedAt?: string | null } | null, terminated?: { __typename?: 'v1_ContainerStateTerminated', startedAt?: string | null, reason?: string | null, message?: string | null, containerID?: string | null, exitCode: number, finishedAt?: string | null, signal?: number | null } | null, waiting?: { __typename?: 'v1_ContainerStateWaiting', message?: string | null, reason?: string | null } | null } | null }, resources?: { __typename?: 'v1_ResourceRequirements', requests: any, limits: any, claims?: Array<{ __typename?: 'v1_ResourceClaim', name: string } | null> | null } | null } | null>, imagePullSecrets?: Array<{ __typename?: 'v1_LocalObjectReference', name?: string | null } | null> | null, persistentVolumeClaimList: { __typename?: 'persistentvolumeclaim_PersistentVolumeClaimList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, items: Array<{ __typename?: 'persistentvolumeclaim_PersistentVolumeClaim', status: string, volume: string, storageClass: string, accessModes: Array, capacity: any, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> }, controller?: { __typename?: 'controller_ResourceOwner', containerImages: Array, initContainerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, pods: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null, securityContext: { __typename?: 'v1_PodSecurityContext', fsGroup?: any | null, fsGroupChangePolicy?: string | null, runAsUser?: any | null, runAsGroup?: any | null, runAsNonRoot?: boolean | null, supplementalGroups?: Array | null, seccompProfile?: { __typename?: 'v1_SeccompProfile', type: string, localhostProfile?: string | null } | null, seLinuxOptions?: { __typename?: 'v1_SELinuxOptions', type?: string | null, level?: string | null, role?: string | null, user?: string | null } | null, sysctls?: Array<{ __typename?: 'v1_Sysctl', name: string, value: string } | null> | null, windowsOptions?: { __typename?: 'v1_WindowsSecurityContextOptions', gmsaCredentialSpec?: string | null, gmsaCredentialSpecName?: string | null, hostProcess?: boolean | null, runAsUserName?: string | null } | null } } | null }; export type PodEventsQueryVariables = Exact<{ name: Scalars['String']['input']; @@ -5348,7 +5449,7 @@ export type PodEventsQueryVariables = Exact<{ }>; -export type PodEventsQuery = { __typename?: 'Query', handleGetPodEvents?: { __typename?: 'common_EventList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type PodEventsQuery = { __typename?: 'Query', handleGetPodEvents?: { __typename?: 'common_EventList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type ContainerFragment = { __typename?: 'pod_Container', name: string, args: Array, commands: Array, image: string, state: ContainerState, securityContext: { __typename?: 'v1_SecurityContext', runAsUser?: any | null, runAsNonRoot?: boolean | null, runAsGroup?: any | null, allowPrivilegeEscalation?: boolean | null, privileged?: boolean | null, procMount?: string | null, readOnlyRootFilesystem?: boolean | null, windowsOptions?: { __typename?: 'v1_WindowsSecurityContextOptions', runAsUserName?: string | null, hostProcess?: boolean | null, gmsaCredentialSpecName?: string | null, gmsaCredentialSpec?: string | null } | null, seLinuxOptions?: { __typename?: 'v1_SELinuxOptions', user?: string | null, role?: string | null, level?: string | null, type?: string | null } | null, seccompProfile?: { __typename?: 'v1_SeccompProfile', type: string, localhostProfile?: string | null } | null, capabilities?: { __typename?: 'v1_Capabilities', add?: Array | null, drop?: Array | null } | null }, livenessProbe: { __typename?: 'v1_Probe', failureThreshold?: number | null, initialDelaySeconds?: number | null, periodSeconds?: number | null, successThreshold?: number | null, terminationGracePeriodSeconds?: any | null, timeoutSeconds?: number | null, tcpSocket?: { __typename?: 'v1_TCPSocketAction', host?: string | null, port: string } | null, grpc?: { __typename?: 'v1_GRPCAction', service: string, port: number } | null, httpGet?: { __typename?: 'v1_HTTPGetAction', host?: string | null, port: string, scheme?: string | null, path?: string | null, httpHeaders?: Array<{ __typename?: 'v1_HTTPHeader', name: string, value: string } | null> | null } | null, exec?: { __typename?: 'v1_ExecAction', command?: Array | null } | null }, readinessProbe: { __typename?: 'v1_Probe', failureThreshold?: number | null, initialDelaySeconds?: number | null, periodSeconds?: number | null, successThreshold?: number | null, terminationGracePeriodSeconds?: any | null, timeoutSeconds?: number | null, tcpSocket?: { __typename?: 'v1_TCPSocketAction', host?: string | null, port: string } | null, grpc?: { __typename?: 'v1_GRPCAction', service: string, port: number } | null, httpGet?: { __typename?: 'v1_HTTPGetAction', host?: string | null, port: string, scheme?: string | null, path?: string | null, httpHeaders?: Array<{ __typename?: 'v1_HTTPHeader', name: string, value: string } | null> | null } | null, exec?: { __typename?: 'v1_ExecAction', command?: Array | null } | null }, status: { __typename?: 'v1_ContainerStatus', name: string, started?: boolean | null, ready: boolean, containerID?: string | null, image: string, imageID: string, restartCount: number, resources?: { __typename?: 'v1_ResourceRequirements', claims?: Array<{ __typename?: 'v1_ResourceClaim', name: string } | null> | null } | null, lastState?: { __typename?: 'v1_ContainerState', running?: { __typename?: 'v1_ContainerStateRunning', startedAt?: string | null } | null, terminated?: { __typename?: 'v1_ContainerStateTerminated', startedAt?: string | null, reason?: string | null, message?: string | null, containerID?: string | null, exitCode: number, finishedAt?: string | null, signal?: number | null } | null, waiting?: { __typename?: 'v1_ContainerStateWaiting', message?: string | null, reason?: string | null } | null } | null, state?: { __typename?: 'v1_ContainerState', running?: { __typename?: 'v1_ContainerStateRunning', startedAt?: string | null } | null, terminated?: { __typename?: 'v1_ContainerStateTerminated', startedAt?: string | null, reason?: string | null, message?: string | null, containerID?: string | null, exitCode: number, finishedAt?: string | null, signal?: number | null } | null, waiting?: { __typename?: 'v1_ContainerStateWaiting', message?: string | null, reason?: string | null } | null } | null }, resources?: { __typename?: 'v1_ResourceRequirements', requests: any, limits: any, claims?: Array<{ __typename?: 'v1_ResourceClaim', name: string } | null> | null } | null }; @@ -5358,7 +5459,7 @@ export type PodSecurityContextFragment = { __typename?: 'v1_PodSecurityContext', export type SecurityContextFragment = { __typename?: 'v1_SecurityContext', runAsUser?: any | null, runAsNonRoot?: boolean | null, runAsGroup?: any | null, allowPrivilegeEscalation?: boolean | null, privileged?: boolean | null, procMount?: string | null, readOnlyRootFilesystem?: boolean | null, windowsOptions?: { __typename?: 'v1_WindowsSecurityContextOptions', runAsUserName?: string | null, hostProcess?: boolean | null, gmsaCredentialSpecName?: string | null, gmsaCredentialSpec?: string | null } | null, seLinuxOptions?: { __typename?: 'v1_SELinuxOptions', user?: string | null, role?: string | null, level?: string | null, type?: string | null } | null, seccompProfile?: { __typename?: 'v1_SeccompProfile', type: string, localhostProfile?: string | null } | null, capabilities?: { __typename?: 'v1_Capabilities', add?: Array | null, drop?: Array | null } | null }; -export type PodListFragment = { __typename?: 'pod_PodList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, pods: Array<{ __typename?: 'pod_Pod', status: string, containerImages: Array, nodeName: string, restartCount: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, containerStatuses: Array<{ __typename?: 'pod_ContainerStatus', name: string, ready: boolean, state: ContainerState } | null>, warnings: Array<{ __typename?: 'common_Event', message: string } | null> } | null> }; +export type PodListFragment = { __typename?: 'pod_PodList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, pods: Array<{ __typename?: 'pod_Pod', status: string, containerImages: Array, nodeName: string, restartCount: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, containerStatuses: Array<{ __typename?: 'pod_ContainerStatus', name: string, ready: boolean, state: ContainerState } | null>, warnings: Array<{ __typename?: 'common_Event', message: string } | null> } | null> }; export type ReplicaSetsQueryVariables = Exact<{ namespace: Scalars['String']['input']; @@ -5369,7 +5470,7 @@ export type ReplicaSetsQueryVariables = Exact<{ }>; -export type ReplicaSetsQuery = { __typename?: 'Query', handleGetReplicaSets?: { __typename?: 'replicaset_ReplicaSetList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, replicaSets: Array<{ __typename?: 'replicaset_ReplicaSet', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> } | null }; +export type ReplicaSetsQuery = { __typename?: 'Query', handleGetReplicaSets?: { __typename?: 'replicaset_ReplicaSetList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, replicaSets: Array<{ __typename?: 'replicaset_ReplicaSet', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> } | null }; export type ReplicaSetQueryVariables = Exact<{ namespace: Scalars['String']['input']; @@ -5377,37 +5478,49 @@ export type ReplicaSetQueryVariables = Exact<{ }>; -export type ReplicaSetQuery = { __typename?: 'Query', handleGetReplicaSetDetail?: { __typename?: 'replicaset_ReplicaSetDetail', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> }, selector: { __typename?: 'v1_LabelSelector', matchLabels?: any | null, matchExpressions?: Array<{ __typename?: 'v1_LabelSelectorRequirement', key: string, operator: string, values?: Array | null } | null> | null }, horizontalPodAutoscalerList: { __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscalerList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, horizontalpodautoscalers: Array<{ __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscaler', currentCPUUtilizationPercentage: number, maxReplicas: number, minReplicas: number, targetCPUUtilizationPercentage: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, scaleTargetRef: { __typename?: 'horizontalpodautoscaler_ScaleTargetRef', name: string, kind: string } } | null> } } | null }; +export type ReplicaSetQuery = { __typename?: 'Query', handleGetReplicaSetDetail?: { __typename?: 'replicaset_ReplicaSetDetail', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> }, selector: { __typename?: 'v1_LabelSelector', matchLabels?: any | null, matchExpressions?: Array<{ __typename?: 'v1_LabelSelectorRequirement', key: string, operator: string, values?: Array | null } | null> | null }, horizontalPodAutoscalerList: { __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscalerList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, horizontalpodautoscalers: Array<{ __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscaler', currentCPUUtilizationPercentage: number, maxReplicas: number, minReplicas: number, targetCPUUtilizationPercentage: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, scaleTargetRef: { __typename?: 'horizontalpodautoscaler_ScaleTargetRef', name: string, kind: string } } | null> } } | null }; export type ReplicaSetEventsQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type ReplicaSetEventsQuery = { __typename?: 'Query', handleGetReplicaSetEvents?: { __typename?: 'common_EventList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type ReplicaSetEventsQuery = { __typename?: 'Query', handleGetReplicaSetEvents?: { __typename?: 'common_EventList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type ReplicaSetPodsQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type ReplicaSetPodsQuery = { __typename?: 'Query', handleGetReplicaSetPods?: { __typename?: 'pod_PodList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, pods: Array<{ __typename?: 'pod_Pod', status: string, containerImages: Array, nodeName: string, restartCount: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, containerStatuses: Array<{ __typename?: 'pod_ContainerStatus', name: string, ready: boolean, state: ContainerState } | null>, warnings: Array<{ __typename?: 'common_Event', message: string } | null> } | null> } | null }; +export type ReplicaSetPodsQuery = { __typename?: 'Query', handleGetReplicaSetPods?: { __typename?: 'pod_PodList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, pods: Array<{ __typename?: 'pod_Pod', status: string, containerImages: Array, nodeName: string, restartCount: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, containerStatuses: Array<{ __typename?: 'pod_ContainerStatus', name: string, ready: boolean, state: ContainerState } | null>, warnings: Array<{ __typename?: 'common_Event', message: string } | null> } | null> } | null }; export type ReplicaSetServicesQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type ReplicaSetServicesQuery = { __typename?: 'Query', handleGetReplicaSetServices?: { __typename?: 'service_ServiceList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, services: Array<{ __typename?: 'service_Service', type: string, clusterIP: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, internalEndpoint: { __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> }, externalEndpoints: Array<{ __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> } | null> } | null> } | null }; +export type ReplicaSetServicesQuery = { __typename?: 'Query', handleGetReplicaSetServices?: { __typename?: 'service_ServiceList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, services: Array<{ __typename?: 'service_Service', type: string, clusterIP: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, internalEndpoint: { __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> }, externalEndpoints: Array<{ __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> } | null> } | null> } | null }; -export type ReplicaSetListFragment = { __typename?: 'replicaset_ReplicaSetList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, replicaSets: Array<{ __typename?: 'replicaset_ReplicaSet', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> }; +export type ReplicaSetListFragment = { __typename?: 'replicaset_ReplicaSetList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, replicaSets: Array<{ __typename?: 'replicaset_ReplicaSet', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> }; export type ReplicaSetFragment = { __typename?: 'replicaset_ReplicaSet', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } }; -export type ReplicaSetDetailFragment = { __typename?: 'replicaset_ReplicaSetDetail', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> }, selector: { __typename?: 'v1_LabelSelector', matchLabels?: any | null, matchExpressions?: Array<{ __typename?: 'v1_LabelSelectorRequirement', key: string, operator: string, values?: Array | null } | null> | null }, horizontalPodAutoscalerList: { __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscalerList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, horizontalpodautoscalers: Array<{ __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscaler', currentCPUUtilizationPercentage: number, maxReplicas: number, minReplicas: number, targetCPUUtilizationPercentage: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, scaleTargetRef: { __typename?: 'horizontalpodautoscaler_ScaleTargetRef', name: string, kind: string } } | null> } }; +export type ReplicaSetDetailFragment = { __typename?: 'replicaset_ReplicaSetDetail', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> }, selector: { __typename?: 'v1_LabelSelector', matchLabels?: any | null, matchExpressions?: Array<{ __typename?: 'v1_LabelSelectorRequirement', key: string, operator: string, values?: Array | null } | null> | null }, horizontalPodAutoscalerList: { __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscalerList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, horizontalpodautoscalers: Array<{ __typename?: 'horizontalpodautoscaler_HorizontalPodAutoscaler', currentCPUUtilizationPercentage: number, maxReplicas: number, minReplicas: number, targetCPUUtilizationPercentage: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, scaleTargetRef: { __typename?: 'horizontalpodautoscaler_ScaleTargetRef', name: string, kind: string } } | null> } }; export type ReplicationControllersQueryVariables = Exact<{ namespace: Scalars['String']['input']; @@ -5418,7 +5531,7 @@ export type ReplicationControllersQueryVariables = Exact<{ }>; -export type ReplicationControllersQuery = { __typename?: 'Query', handleGetReplicationControllerList?: { __typename?: 'replicationcontroller_ReplicationControllerList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, replicationControllers: Array<{ __typename?: 'replicationcontroller_ReplicationController', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> } | null }; +export type ReplicationControllersQuery = { __typename?: 'Query', handleGetReplicationControllerList?: { __typename?: 'replicationcontroller_ReplicationControllerList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, replicationControllers: Array<{ __typename?: 'replicationcontroller_ReplicationController', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> } | null }; export type ReplicationControllerQueryVariables = Exact<{ namespace: Scalars['String']['input']; @@ -5431,28 +5544,40 @@ export type ReplicationControllerQuery = { __typename?: 'Query', handleGetReplic export type ReplicationControllerEventsQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type ReplicationControllerEventsQuery = { __typename?: 'Query', handleGetReplicationControllerEvents?: { __typename?: 'common_EventList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type ReplicationControllerEventsQuery = { __typename?: 'Query', handleGetReplicationControllerEvents?: { __typename?: 'common_EventList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type ReplicationControllerPodsQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type ReplicationControllerPodsQuery = { __typename?: 'Query', handleGetReplicationControllerPods?: { __typename?: 'pod_PodList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, pods: Array<{ __typename?: 'pod_Pod', status: string, containerImages: Array, nodeName: string, restartCount: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, containerStatuses: Array<{ __typename?: 'pod_ContainerStatus', name: string, ready: boolean, state: ContainerState } | null>, warnings: Array<{ __typename?: 'common_Event', message: string } | null> } | null> } | null }; +export type ReplicationControllerPodsQuery = { __typename?: 'Query', handleGetReplicationControllerPods?: { __typename?: 'pod_PodList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, pods: Array<{ __typename?: 'pod_Pod', status: string, containerImages: Array, nodeName: string, restartCount: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, containerStatuses: Array<{ __typename?: 'pod_ContainerStatus', name: string, ready: boolean, state: ContainerState } | null>, warnings: Array<{ __typename?: 'common_Event', message: string } | null> } | null> } | null }; export type ReplicationControllerServicesQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type ReplicationControllerServicesQuery = { __typename?: 'Query', handleGetReplicationControllerServices?: { __typename?: 'service_ServiceList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, services: Array<{ __typename?: 'service_Service', type: string, clusterIP: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, internalEndpoint: { __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> }, externalEndpoints: Array<{ __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> } | null> } | null> } | null }; +export type ReplicationControllerServicesQuery = { __typename?: 'Query', handleGetReplicationControllerServices?: { __typename?: 'service_ServiceList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, services: Array<{ __typename?: 'service_Service', type: string, clusterIP: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, internalEndpoint: { __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> }, externalEndpoints: Array<{ __typename?: 'common_Endpoint', host: string, ports: Array<{ __typename?: 'common_ServicePort', port: number, nodePort: number, protocol: string } | null> } | null> } | null> } | null }; -export type ReplicationControllerListFragment = { __typename?: 'replicationcontroller_ReplicationControllerList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, replicationControllers: Array<{ __typename?: 'replicationcontroller_ReplicationController', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> }; +export type ReplicationControllerListFragment = { __typename?: 'replicationcontroller_ReplicationControllerList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, replicationControllers: Array<{ __typename?: 'replicationcontroller_ReplicationController', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> }; export type ReplicationControllerFragment = { __typename?: 'replicationcontroller_ReplicationController', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } }; @@ -5467,7 +5592,7 @@ export type StatefulSetsQueryVariables = Exact<{ }>; -export type StatefulSetsQuery = { __typename?: 'Query', handleGetStatefulSetList?: { __typename?: 'statefulset_StatefulSetList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, statefulSets: Array<{ __typename?: 'statefulset_StatefulSet', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> } | null }; +export type StatefulSetsQuery = { __typename?: 'Query', handleGetStatefulSetList?: { __typename?: 'statefulset_StatefulSetList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, statefulSets: Array<{ __typename?: 'statefulset_StatefulSet', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> } | null }; export type StatefulSetQueryVariables = Exact<{ namespace: Scalars['String']['input']; @@ -5480,20 +5605,28 @@ export type StatefulSetQuery = { __typename?: 'Query', handleGetStatefulSetDetai export type StatefulSetEventsQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type StatefulSetEventsQuery = { __typename?: 'Query', handleGetStatefulSetEvents?: { __typename?: 'common_EventList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; +export type StatefulSetEventsQuery = { __typename?: 'Query', handleGetStatefulSetEvents?: { __typename?: 'common_EventList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, events: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } | null }; export type StatefulSetPodsQueryVariables = Exact<{ namespace: Scalars['String']['input']; name: Scalars['String']['input']; + filterBy?: InputMaybe; + sortBy?: InputMaybe; + itemsPerPage?: InputMaybe; + page?: InputMaybe; }>; -export type StatefulSetPodsQuery = { __typename?: 'Query', handleGetStatefulSetPods?: { __typename?: 'pod_PodList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, pods: Array<{ __typename?: 'pod_Pod', status: string, containerImages: Array, nodeName: string, restartCount: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, containerStatuses: Array<{ __typename?: 'pod_ContainerStatus', name: string, ready: boolean, state: ContainerState } | null>, warnings: Array<{ __typename?: 'common_Event', message: string } | null> } | null> } | null }; +export type StatefulSetPodsQuery = { __typename?: 'Query', handleGetStatefulSetPods?: { __typename?: 'pod_PodList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, pods: Array<{ __typename?: 'pod_Pod', status: string, containerImages: Array, nodeName: string, restartCount: number, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, containerStatuses: Array<{ __typename?: 'pod_ContainerStatus', name: string, ready: boolean, state: ContainerState } | null>, warnings: Array<{ __typename?: 'common_Event', message: string } | null> } | null> } | null }; -export type StatefulSetListFragment = { __typename?: 'statefulset_StatefulSetList', listMeta: { __typename?: 'types_ListMeta', totalItems: number }, statefulSets: Array<{ __typename?: 'statefulset_StatefulSet', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> }; +export type StatefulSetListFragment = { __typename?: 'statefulset_StatefulSetList', errors: Array, listMeta: { __typename?: 'types_ListMeta', totalItems: number }, statefulSets: Array<{ __typename?: 'statefulset_StatefulSet', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } } | null> }; export type StatefulSetFragment = { __typename?: 'statefulset_StatefulSet', initContainerImages: Array, containerImages: Array, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, podInfo: { __typename?: 'common_PodInfo', current: number, desired?: number | null, failed: number, pending: number, running: number, succeeded: number, warnings: Array<{ __typename?: 'common_Event', objectName?: string | null, objectNamespace?: string | null, reason: string, type: string, message: string, sourceComponent: string, sourceHost: string, count: number, firstSeen: string, lastSeen: string, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null } } | null> } }; @@ -5544,6 +5677,7 @@ export const EventFragmentDoc = gql` ${ObjectMetaFragmentDoc}`; export const EventListFragmentDoc = gql` fragment EventList on common_EventList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -5625,6 +5759,7 @@ export const EndpointFragmentDoc = gql` `; export const IngressListFragmentDoc = gql` fragment IngressList on ingress_IngressList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -5647,6 +5782,7 @@ ${ObjectMetaFragmentDoc} ${EndpointFragmentDoc}`; export const ServiceListFragmentDoc = gql` fragment ServiceList on service_ServiceList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -5705,6 +5841,7 @@ export const PersistentVolumeClaimFragmentDoc = gql` ${ObjectMetaFragmentDoc}`; export const PersistentVolumeClaimListFragmentDoc = gql` fragment PersistentVolumeClaimList on persistentvolumeclaim_PersistentVolumeClaimList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -5732,6 +5869,7 @@ export const CronJobFragmentDoc = gql` ${ObjectMetaFragmentDoc}`; export const CronJobListFragmentDoc = gql` fragment CronJobList on cronjob_CronJobList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -5778,6 +5916,7 @@ ${ObjectMetaFragmentDoc} ${PodInfoFragmentDoc}`; export const DaemonSetListFragmentDoc = gql` fragment DaemonSetList on daemonset_DaemonSetList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -5837,6 +5976,7 @@ ${ObjectMetaFragmentDoc} ${PodInfoFragmentDoc}`; export const DeploymentListFragmentDoc = gql` fragment DeploymentList on deployment_DeploymentList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -5936,6 +6076,7 @@ ${PodInfoFragmentDoc} ${JobStatusFragmentDoc}`; export const JobListFragmentDoc = gql` fragment JobList on job_JobList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -6129,6 +6270,7 @@ export const PodSecurityContextFragmentDoc = gql` `; export const PodListFragmentDoc = gql` fragment PodList on pod_PodList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -6175,6 +6317,7 @@ ${ObjectMetaFragmentDoc} ${PodInfoFragmentDoc}`; export const ReplicaSetListFragmentDoc = gql` fragment ReplicaSetList on replicaset_ReplicaSetList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -6205,6 +6348,7 @@ export const HorizontalPodAutoscalerFragmentDoc = gql` ${ObjectMetaFragmentDoc}`; export const HorizontalPodAutoscalerListFragmentDoc = gql` fragment HorizontalPodAutoscalerList on horizontalpodautoscaler_HorizontalPodAutoscalerList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -6258,6 +6402,7 @@ ${ObjectMetaFragmentDoc} ${PodInfoFragmentDoc}`; export const ReplicationControllerListFragmentDoc = gql` fragment ReplicationControllerList on replicationcontroller_ReplicationControllerList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -6304,6 +6449,7 @@ ${ObjectMetaFragmentDoc} ${PodInfoFragmentDoc}`; export const StatefulSetListFragmentDoc = gql` fragment StatefulSetList on statefulset_StatefulSetList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -6338,6 +6484,7 @@ export const ClusterRolesDocument = gql` itemsPerPage: $itemsPerPage page: $page ) @rest(path: "clusterrole?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -6450,6 +6597,7 @@ export const ClusterRoleBindingsDocument = gql` itemsPerPage: $itemsPerPage page: $page ) @rest(path: "clusterrolebinding?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -6568,6 +6716,7 @@ export const RolesDocument = gql` itemsPerPage: $itemsPerPage page: $page ) @rest(type: "role_RoleList", path: "role/{args.namespace}?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -6682,6 +6831,7 @@ export const RoleBindingsDocument = gql` itemsPerPage: $itemsPerPage page: $page ) @rest(path: "rolebinding/{args.namespace}?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -6801,6 +6951,7 @@ export const ServiceAccountsDocument = gql` itemsPerPage: $itemsPerPage page: $page ) @rest(type: "serviceaccount_ServiceAccountList", path: "serviceaccount/{args.namespace}?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -7065,6 +7216,7 @@ export const NamespacesDocument = gql` itemsPerPage: $itemsPerPage page: $page ) @rest(path: "namespace?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -7246,6 +7398,7 @@ export const NodesDocument = gql` itemsPerPage: $itemsPerPage page: $page ) @rest(path: "node?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -7401,8 +7554,14 @@ export type NodeLazyQueryHookResult = ReturnType; export type NodeSuspenseQueryHookResult = ReturnType; export type NodeQueryResult = Apollo.QueryResult; export const NodePodsDocument = gql` - query NodePods($namespace: String!, $name: String!) { - handleGetNodePods(name: $name) @rest(type: "pod_PodList", path: "node/{args.name}/pod") { + query NodePods($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { + handleGetNodePods( + name: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "pod_PodList", path: "node/{args.name}/pod?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...PodList } } @@ -7422,6 +7581,10 @@ export const NodePodsDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -7493,7 +7656,7 @@ export type NodeEventsSuspenseQueryHookResult = ReturnType; export const NamespacedResourceDocument = gql` query NamespacedResource($kind: String!, $name: String!, $namespace: String!) { - handleGetResource(kind: $kind, name: $name, namespace: $namespace) @rest(path: "_raw/{args.kind}/namespace/{args.namespace}/name/{args.name}") { + handleGetResource(kind: $kind, name: $name, namespace: $namespace) @rest(method: "GET", path: "_raw/{args.kind}/namespace/{args.namespace}/name/{args.name}") { Object } } @@ -7535,7 +7698,7 @@ export type NamespacedResourceSuspenseQueryHookResult = ReturnType; export const ResourceDocument = gql` query Resource($kind: String!, $name: String!) { - handleGetResource(kind: $kind, name: $name, namespace: "") @rest(path: "_raw/{args.kind}/name/{args.name}") { + handleGetResource(kind: $kind, name: $name, namespace: "") @rest(method: "GET", path: "_raw/{args.kind}/name/{args.name}") { Object } } @@ -7646,6 +7809,125 @@ export function useResourceUpdateMutation(baseOptions?: Apollo.MutationHookOptio export type ResourceUpdateMutationHookResult = ReturnType; export type ResourceUpdateMutationResult = Apollo.MutationResult; export type ResourceUpdateMutationOptions = Apollo.BaseMutationOptions; +export const ResourceScaleDocument = gql` + mutation ResourceScale($kind: String!, $namespace: String!, $name: String!, $scaleBy: String!) { + handleScaleResource( + kind: $kind + namespace: $namespace + name: $name + scaleBy: $scaleBy + ) @rest(type: "Void", path: "scale/{args.kind}/{args.namespace}/{args.name}?scaleBy={args.scaleBy}", method: "PUT", bodyKey: "scaleBy") { + actualReplicas + desiredReplicas + } +} + `; +export type ResourceScaleMutationFn = Apollo.MutationFunction; + +/** + * __useResourceScaleMutation__ + * + * To run a mutation, you first call `useResourceScaleMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useResourceScaleMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [resourceScaleMutation, { data, loading, error }] = useResourceScaleMutation({ + * variables: { + * kind: // value for 'kind' + * namespace: // value for 'namespace' + * name: // value for 'name' + * scaleBy: // value for 'scaleBy' + * }, + * }); + */ +export function useResourceScaleMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(ResourceScaleDocument, options); + } +export type ResourceScaleMutationHookResult = ReturnType; +export type ResourceScaleMutationResult = Apollo.MutationResult; +export type ResourceScaleMutationOptions = Apollo.BaseMutationOptions; +export const ResourceDeleteDocument = gql` + mutation ResourceDelete($kind: String!, $name: String!, $deleteNow: String) { + handleDeleteResource( + kind: $kind + name: $name + namespace: "" + deleteNow: $deleteNow + ) @rest(type: "Void", path: "_raw/{args.kind}/name/{args.name}?deleteNow={args.deleteNow}", method: "DELETE") +} + `; +export type ResourceDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useResourceDeleteMutation__ + * + * To run a mutation, you first call `useResourceDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useResourceDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [resourceDeleteMutation, { data, loading, error }] = useResourceDeleteMutation({ + * variables: { + * kind: // value for 'kind' + * name: // value for 'name' + * deleteNow: // value for 'deleteNow' + * }, + * }); + */ +export function useResourceDeleteMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(ResourceDeleteDocument, options); + } +export type ResourceDeleteMutationHookResult = ReturnType; +export type ResourceDeleteMutationResult = Apollo.MutationResult; +export type ResourceDeleteMutationOptions = Apollo.BaseMutationOptions; +export const NamespacedResourceDeleteDocument = gql` + mutation NamespacedResourceDelete($kind: String!, $namespace: String!, $name: String!, $deleteNow: String) { + handleDeleteResource( + kind: $kind + namespace: $namespace + name: $name + deleteNow: $deleteNow + ) @rest(type: "Void", path: "_raw/{args.kind}/namespace/{args.namespace}/name/{args.name}?deleteNow={args.deleteNow}", method: "DELETE") +} + `; +export type NamespacedResourceDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useNamespacedResourceDeleteMutation__ + * + * To run a mutation, you first call `useNamespacedResourceDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useNamespacedResourceDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [namespacedResourceDeleteMutation, { data, loading, error }] = useNamespacedResourceDeleteMutation({ + * variables: { + * kind: // value for 'kind' + * namespace: // value for 'namespace' + * name: // value for 'name' + * deleteNow: // value for 'deleteNow' + * }, + * }); + */ +export function useNamespacedResourceDeleteMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(NamespacedResourceDeleteDocument, options); + } +export type NamespacedResourceDeleteMutationHookResult = ReturnType; +export type NamespacedResourceDeleteMutationResult = Apollo.MutationResult; +export type NamespacedResourceDeleteMutationOptions = Apollo.BaseMutationOptions; export const ConfigMapsDocument = gql` query ConfigMaps($namespace: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { handleGetConfigMapList( @@ -7655,6 +7937,7 @@ export const ConfigMapsDocument = gql` itemsPerPage: $itemsPerPage page: $page ) @rest(path: "configmap/{args.namespace}?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -7765,6 +8048,7 @@ export const SecretsDocument = gql` itemsPerPage: $itemsPerPage page: $page ) @rest(path: "secret/{args.namespace}?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -7876,6 +8160,7 @@ export const CustomResourceDefinitionsDocument = gql` itemsPerPage: $itemsPerPage page: $page ) @rest(path: "crd?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { + errors listMeta { totalItems } @@ -8013,6 +8298,7 @@ export const CustomResourcesDocument = gql` itemsPerPage: $itemsPerPage page: $page ) @rest(path: "crd/{args.namespace}/{args.crd}/object?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { + errors listMeta { totalItems } @@ -8119,12 +8405,16 @@ export type CustomResourceLazyQueryHookResult = ReturnType; export type CustomResourceQueryResult = Apollo.QueryResult; export const CustomResourceEventsDocument = gql` - query CustomResourceEvents($crd: String!, $namespace: String!, $name: String!) { + query CustomResourceEvents($crd: String!, $namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { handleGetCustomResourceObjectEvents( namespace: $namespace object: $name crd: $crd - ) @rest(type: "common_EventList", path: "crd/{args.namespace}/{args.crd}/{args.object}/event") { + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "common_EventList", path: "crd/{args.namespace}/{args.crd}/{args.object}/event?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...EventList } } @@ -8145,6 +8435,10 @@ export const CustomResourceEventsDocument = gql` * crd: // value for 'crd' * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -8330,8 +8624,15 @@ export type IngressLazyQueryHookResult = ReturnType; export type IngressSuspenseQueryHookResult = ReturnType; export type IngressQueryResult = Apollo.QueryResult; export const IngressEventsDocument = gql` - query IngressEvents($namespace: String!, $name: String!) { - handleGetIngressEvent(namespace: $namespace, ingress: $name) @rest(type: "common_EventList", path: "ingress/{args.namespace}/{args.ingress}/event") { + query IngressEvents($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { + handleGetIngressEvent( + namespace: $namespace + ingress: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "common_EventList", path: "ingress/{args.namespace}/{args.ingress}/event?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...EventList } } @@ -8351,6 +8652,10 @@ export const IngressEventsDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -8378,6 +8683,7 @@ export const IngressClassesDocument = gql` itemsPerPage: $itemsPerPage page: $page ) @rest(path: "ingressclass?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -8487,6 +8793,7 @@ export const NetworkPoliciesDocument = gql` itemsPerPage: $itemsPerPage page: $page ) @rest(path: "networkpolicy/{args.namespace}?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -8756,8 +9063,15 @@ export type ServiceLazyQueryHookResult = ReturnType; export type ServiceSuspenseQueryHookResult = ReturnType; export type ServiceQueryResult = Apollo.QueryResult; export const ServiceEventsDocument = gql` - query ServiceEvents($namespace: String!, $name: String!) { - handleGetServiceEvent(namespace: $namespace, service: $name) @rest(type: "common_EventList", path: "service/{args.namespace}/{args.service}/event") { + query ServiceEvents($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { + handleGetServiceEvent( + namespace: $namespace + service: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "common_EventList", path: "service/{args.namespace}/{args.service}/event?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...EventList } } @@ -8777,6 +9091,10 @@ export const ServiceEventsDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -8797,8 +9115,15 @@ export type ServiceEventsLazyQueryHookResult = ReturnType; export type ServiceEventsQueryResult = Apollo.QueryResult; export const ServicePodsDocument = gql` - query ServicePods($namespace: String!, $name: String!) { - handleGetServicePods(namespace: $namespace, service: $name) @rest(type: "pod_PodList", path: "service/{args.namespace}/{args.service}/pod") { + query ServicePods($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { + handleGetServicePods( + namespace: $namespace + service: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "pod_PodList", path: "service/{args.namespace}/{args.service}/pod?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...PodList } } @@ -8818,6 +9143,10 @@ export const ServicePodsDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -8838,8 +9167,15 @@ export type ServicePodsLazyQueryHookResult = ReturnType; export type ServicePodsQueryResult = Apollo.QueryResult; export const ServiceIngressesDocument = gql` - query ServiceIngresses($namespace: String!, $name: String!) { - handleGetServiceIngressList(namespace: $namespace, service: $name) @rest(type: "ingress_IngressList", path: "service/{args.namespace}/{args.service}/ingress") { + query ServiceIngresses($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { + handleGetServiceIngressList( + namespace: $namespace + service: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "ingress_IngressList", path: "service/{args.namespace}/{args.service}/ingress?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...IngressList } } @@ -8859,6 +9195,10 @@ export const ServiceIngressesDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -8886,6 +9226,7 @@ export const PersistentVolumesDocument = gql` itemsPerPage: $itemsPerPage page: $page ) @rest(path: "persistentvolume?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -9297,6 +9638,7 @@ export const StorageClassesDocument = gql` itemsPerPage: $itemsPerPage page: $page ) @rest(path: "storageclass?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -9559,8 +9901,15 @@ export type CronJobLazyQueryHookResult = ReturnType; export type CronJobSuspenseQueryHookResult = ReturnType; export type CronJobQueryResult = Apollo.QueryResult; export const CronJobEventsDocument = gql` - query CronJobEvents($namespace: String!, $name: String!) { - handleGetCronJobEvents(namespace: $namespace, name: $name) @rest(type: "common_EventList", path: "cronjob/{args.namespace}/{args.name}/event") { + query CronJobEvents($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { + handleGetCronJobEvents( + namespace: $namespace + name: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "common_EventList", path: "cronjob/{args.namespace}/{args.name}/event") { ...EventList } } @@ -9580,6 +9929,10 @@ export const CronJobEventsDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -9600,8 +9953,16 @@ export type CronJobEventsLazyQueryHookResult = ReturnType; export type CronJobEventsQueryResult = Apollo.QueryResult; export const CronJobJobsDocument = gql` - query CronJobJobs($namespace: String!, $name: String!, $active: String) { - handleGetCronJobJobs(namespace: $namespace, name: $name, active: $active) @rest(type: "job_JobList", path: "cronjob/{args.namespace}/{args.name}/job?active={args.active}") { + query CronJobJobs($namespace: String!, $name: String!, $active: String, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { + handleGetCronJobJobs( + namespace: $namespace + name: $name + active: $active + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "job_JobList", path: "cronjob/{args.namespace}/{args.name}/job?active={args.active}&filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...JobList } } @@ -9622,6 +9983,10 @@ export const CronJobJobsDocument = gql` * namespace: // value for 'namespace' * name: // value for 'name' * active: // value for 'active' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -9641,6 +10006,38 @@ export type CronJobJobsQueryHookResult = ReturnType; export type CronJobJobsLazyQueryHookResult = ReturnType; export type CronJobJobsSuspenseQueryHookResult = ReturnType; export type CronJobJobsQueryResult = Apollo.QueryResult; +export const CronJobTriggerDocument = gql` + mutation CronJobTrigger($name: String!, $namespace: String!) { + handleTriggerCronJob(name: $name, namespace: $namespace) @rest(type: "Void", path: "/cronjob/{args.namespace}/{args.name}/trigger", method: "PUT", bodyKey: "name") +} + `; +export type CronJobTriggerMutationFn = Apollo.MutationFunction; + +/** + * __useCronJobTriggerMutation__ + * + * To run a mutation, you first call `useCronJobTriggerMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCronJobTriggerMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [cronJobTriggerMutation, { data, loading, error }] = useCronJobTriggerMutation({ + * variables: { + * name: // value for 'name' + * namespace: // value for 'namespace' + * }, + * }); + */ +export function useCronJobTriggerMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CronJobTriggerDocument, options); + } +export type CronJobTriggerMutationHookResult = ReturnType; +export type CronJobTriggerMutationResult = Apollo.MutationResult; +export type CronJobTriggerMutationOptions = Apollo.BaseMutationOptions; export const DaemonSetsDocument = gql` query DaemonSets($namespace: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { handleGetDaemonSetList( @@ -9733,8 +10130,15 @@ export type DaemonSetLazyQueryHookResult = ReturnType; export type DaemonSetQueryResult = Apollo.QueryResult; export const DaemonSetEventsDocument = gql` - query DaemonSetEvents($namespace: String!, $name: String!) { - handleGetDaemonSetEvents(namespace: $namespace, daemonSet: $name) @rest(type: "common_EventList", path: "daemonset/{args.namespace}/{args.daemonSet}/event") { + query DaemonSetEvents($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { + handleGetDaemonSetEvents( + namespace: $namespace + daemonSet: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "common_EventList", path: "daemonset/{args.namespace}/{args.daemonSet}/event?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...EventList } } @@ -9754,6 +10158,10 @@ export const DaemonSetEventsDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -9774,8 +10182,15 @@ export type DaemonSetEventsLazyQueryHookResult = ReturnType; export type DaemonSetEventsQueryResult = Apollo.QueryResult; export const DaemonSetPodsDocument = gql` - query DaemonSetPods($namespace: String!, $name: String!) { - handleGetDaemonSetPods(namespace: $namespace, daemonSet: $name) @rest(type: "pod_PodList", path: "daemonset/{args.namespace}/{args.daemonSet}/pod") { + query DaemonSetPods($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { + handleGetDaemonSetPods( + namespace: $namespace + daemonSet: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "pod_PodList", path: "daemonset/{args.namespace}/{args.daemonSet}/pod?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...PodList } } @@ -9795,6 +10210,10 @@ export const DaemonSetPodsDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -9815,8 +10234,15 @@ export type DaemonSetPodsLazyQueryHookResult = ReturnType; export type DaemonSetPodsQueryResult = Apollo.QueryResult; export const DaemonSetServicesDocument = gql` - query DaemonSetServices($namespace: String!, $name: String!) { - handleGetDaemonSetServices(namespace: $namespace, daemonSet: $name) @rest(type: "service_ServiceList", path: "daemonset/{args.namespace}/{args.daemonSet}/service") { + query DaemonSetServices($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { + handleGetDaemonSetServices( + namespace: $namespace + daemonSet: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "service_ServiceList", path: "daemonset/{args.namespace}/{args.daemonSet}/service?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...ServiceList } } @@ -9836,6 +10262,10 @@ export const DaemonSetServicesDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -9947,8 +10377,15 @@ export type DeploymentLazyQueryHookResult = ReturnType; export type DeploymentQueryResult = Apollo.QueryResult; export const DeploymentEventsDocument = gql` - query DeploymentEvents($namespace: String!, $name: String!) { - handleGetDeploymentEvents(namespace: $namespace, deployment: $name) @rest(type: "common_EventList", path: "deployment/{args.namespace}/{args.deployment}/event") { + query DeploymentEvents($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { + handleGetDeploymentEvents( + namespace: $namespace + deployment: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "common_EventList", path: "deployment/{args.namespace}/{args.deployment}/event?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...EventList } } @@ -9968,6 +10405,10 @@ export const DeploymentEventsDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -9988,8 +10429,15 @@ export type DeploymentEventsLazyQueryHookResult = ReturnType; export type DeploymentEventsQueryResult = Apollo.QueryResult; export const DeploymentNewReplicaSetDocument = gql` - query DeploymentNewReplicaSet($namespace: String!, $name: String!) { - handleGetDeploymentNewReplicaSet(namespace: $namespace, deployment: $name) @rest(type: "replicaset_ReplicaSet", path: "deployment/{args.namespace}/{args.deployment}/newreplicaset") { + query DeploymentNewReplicaSet($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { + handleGetDeploymentNewReplicaSet( + namespace: $namespace + deployment: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "replicaset_ReplicaSet", path: "deployment/{args.namespace}/{args.deployment}/newreplicaset?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...ReplicaSet } } @@ -10009,6 +10457,10 @@ export const DeploymentNewReplicaSetDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -10029,8 +10481,15 @@ export type DeploymentNewReplicaSetLazyQueryHookResult = ReturnType; export type DeploymentNewReplicaSetQueryResult = Apollo.QueryResult; export const DeploymentOldReplicaSetsDocument = gql` - query DeploymentOldReplicaSets($namespace: String!, $name: String!) { - handleGetDeploymentOldReplicaSets(namespace: $namespace, deployment: $name) @rest(type: "replicaset_ReplicaSetList", path: "deployment/{args.namespace}/{args.deployment}/oldreplicaset") { + query DeploymentOldReplicaSets($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { + handleGetDeploymentOldReplicaSets( + namespace: $namespace + deployment: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "replicaset_ReplicaSetList", path: "deployment/{args.namespace}/{args.deployment}/oldreplicaset?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...ReplicaSetList } } @@ -10050,6 +10509,10 @@ export const DeploymentOldReplicaSetsDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -10161,8 +10624,15 @@ export type JobLazyQueryHookResult = ReturnType; export type JobSuspenseQueryHookResult = ReturnType; export type JobQueryResult = Apollo.QueryResult; export const JobEventsDocument = gql` - query JobEvents($namespace: String!, $name: String!) { - handleGetJobEvents(namespace: $namespace, name: $name) @rest(type: "common_EventList", path: "job/{args.namespace}/{args.name}/event") { + query JobEvents($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { + handleGetJobEvents( + namespace: $namespace + name: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "common_EventList", path: "job/{args.namespace}/{args.name}/event?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...EventList } } @@ -10182,6 +10652,10 @@ export const JobEventsDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -10202,8 +10676,15 @@ export type JobEventsLazyQueryHookResult = ReturnType; export type JobEventsQueryResult = Apollo.QueryResult; export const JobPodsDocument = gql` - query JobPods($namespace: String!, $name: String!) { - handleGetJobPods(namespace: $namespace, name: $name) @rest(type: "pod_PodList", path: "job/{args.namespace}/{args.name}/pod") { + query JobPods($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { + handleGetJobPods( + namespace: $namespace + name: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "pod_PodList", path: "job/{args.namespace}/{args.name}/pod?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...PodList } } @@ -10223,6 +10704,10 @@ export const JobPodsDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -10515,8 +11000,15 @@ export type ReplicaSetLazyQueryHookResult = ReturnType; export type ReplicaSetQueryResult = Apollo.QueryResult; export const ReplicaSetEventsDocument = gql` - query ReplicaSetEvents($namespace: String!, $name: String!) { - handleGetReplicaSetEvents(namespace: $namespace, replicaSet: $name) @rest(type: "common_EventList", path: "replicaset/{args.namespace}/{args.replicaSet}/event") { + query ReplicaSetEvents($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { + handleGetReplicaSetEvents( + namespace: $namespace + replicaSet: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "common_EventList", path: "replicaset/{args.namespace}/{args.replicaSet}/event?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...EventList } } @@ -10536,6 +11028,10 @@ export const ReplicaSetEventsDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -10556,8 +11052,15 @@ export type ReplicaSetEventsLazyQueryHookResult = ReturnType; export type ReplicaSetEventsQueryResult = Apollo.QueryResult; export const ReplicaSetPodsDocument = gql` - query ReplicaSetPods($namespace: String!, $name: String!) { - handleGetReplicaSetPods(namespace: $namespace, replicaSet: $name) @rest(type: "pod_PodList", path: "replicaset/{args.namespace}/{args.replicaSet}/pod") { + query ReplicaSetPods($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { + handleGetReplicaSetPods( + namespace: $namespace + replicaSet: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "pod_PodList", path: "replicaset/{args.namespace}/{args.replicaSet}/pod?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...PodList } } @@ -10577,6 +11080,10 @@ export const ReplicaSetPodsDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -10597,8 +11104,15 @@ export type ReplicaSetPodsLazyQueryHookResult = ReturnType; export type ReplicaSetPodsQueryResult = Apollo.QueryResult; export const ReplicaSetServicesDocument = gql` - query ReplicaSetServices($namespace: String!, $name: String!) { - handleGetReplicaSetServices(namespace: $namespace, replicaSet: $name) @rest(type: "service_ServiceList", path: "replicaset/{args.namespace}/{args.replicaSet}/service") { + query ReplicaSetServices($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { + handleGetReplicaSetServices( + namespace: $namespace + replicaSet: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "service_ServiceList", path: "replicaset/{args.namespace}/{args.replicaSet}/service?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...ServiceList } } @@ -10618,6 +11132,10 @@ export const ReplicaSetServicesDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -10732,11 +11250,15 @@ export type ReplicationControllerLazyQueryHookResult = ReturnType; export type ReplicationControllerQueryResult = Apollo.QueryResult; export const ReplicationControllerEventsDocument = gql` - query ReplicationControllerEvents($namespace: String!, $name: String!) { + query ReplicationControllerEvents($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { handleGetReplicationControllerEvents( namespace: $namespace replicationController: $name - ) @rest(type: "common_EventList", path: "replicationcontroller/{args.namespace}/{args.replicationController}/event") { + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "common_EventList", path: "replicationcontroller/{args.namespace}/{args.replicationController}/event?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...EventList } } @@ -10756,6 +11278,10 @@ export const ReplicationControllerEventsDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -10776,11 +11302,15 @@ export type ReplicationControllerEventsLazyQueryHookResult = ReturnType; export type ReplicationControllerEventsQueryResult = Apollo.QueryResult; export const ReplicationControllerPodsDocument = gql` - query ReplicationControllerPods($namespace: String!, $name: String!) { + query ReplicationControllerPods($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { handleGetReplicationControllerPods( namespace: $namespace replicationController: $name - ) @rest(type: "pod_PodList", path: "replicationcontroller/{args.namespace}/{args.replicationController}/pod") { + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "pod_PodList", path: "replicationcontroller/{args.namespace}/{args.replicationController}/pod?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...PodList } } @@ -10800,6 +11330,10 @@ export const ReplicationControllerPodsDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -10820,11 +11354,15 @@ export type ReplicationControllerPodsLazyQueryHookResult = ReturnType; export type ReplicationControllerPodsQueryResult = Apollo.QueryResult; export const ReplicationControllerServicesDocument = gql` - query ReplicationControllerServices($namespace: String!, $name: String!) { + query ReplicationControllerServices($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { handleGetReplicationControllerServices( namespace: $namespace replicationController: $name - ) @rest(type: "service_ServiceList", path: "replicationcontroller/{args.namespace}/{args.replicationController}/service") { + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "service_ServiceList", path: "replicationcontroller/{args.namespace}/{args.replicationController}/service?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...ServiceList } } @@ -10844,6 +11382,10 @@ export const ReplicationControllerServicesDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -10955,8 +11497,15 @@ export type StatefulSetLazyQueryHookResult = ReturnType; export type StatefulSetQueryResult = Apollo.QueryResult; export const StatefulSetEventsDocument = gql` - query StatefulSetEvents($namespace: String!, $name: String!) { - handleGetStatefulSetEvents(namespace: $namespace, statefulset: $name) @rest(type: "common_EventList", path: "statefulset/{args.namespace}/{args.statefulset}/event") { + query StatefulSetEvents($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { + handleGetStatefulSetEvents( + namespace: $namespace + statefulset: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "common_EventList", path: "statefulset/{args.namespace}/{args.statefulset}/event?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...EventList } } @@ -10976,6 +11525,10 @@ export const StatefulSetEventsDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ @@ -10996,8 +11549,15 @@ export type StatefulSetEventsLazyQueryHookResult = ReturnType; export type StatefulSetEventsQueryResult = Apollo.QueryResult; export const StatefulSetPodsDocument = gql` - query StatefulSetPods($namespace: String!, $name: String!) { - handleGetStatefulSetPods(namespace: $namespace, statefulset: $name) @rest(type: "pod_PodList", path: "statefulset/{args.namespace}/{args.statefulset}/pod") { + query StatefulSetPods($namespace: String!, $name: String!, $filterBy: String, $sortBy: String, $itemsPerPage: String, $page: String) { + handleGetStatefulSetPods( + namespace: $namespace + statefulset: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest(type: "pod_PodList", path: "statefulset/{args.namespace}/{args.statefulset}/pod?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}") { ...PodList } } @@ -11017,6 +11577,10 @@ export const StatefulSetPodsDocument = gql` * variables: { * namespace: // value for 'namespace' * name: // value for 'name' + * filterBy: // value for 'filterBy' + * sortBy: // value for 'sortBy' + * itemsPerPage: // value for 'itemsPerPage' + * page: // value for 'page' * }, * }); */ diff --git a/assets/src/generated/graphql.ts b/assets/src/generated/graphql.ts index 3346438cc9..f27a64f13b 100644 --- a/assets/src/generated/graphql.ts +++ b/assets/src/generated/graphql.ts @@ -7941,6 +7941,29 @@ export type DeleteGroupMutationVariables = Exact<{ export type DeleteGroupMutation = { __typename?: 'RootMutationType', deleteGroup?: { __typename?: 'Group', id: string, name: string, description?: string | null, insertedAt?: string | null, updatedAt?: string | null } | null }; +export type KubernetesClusterFragment = { __typename?: 'Cluster', id: string, name: string, self?: boolean | null, distro?: ClusterDistro | null, pinnedCustomResources?: Array<{ __typename?: 'PinnedCustomResource', id: string, name: string, kind: string, version: string, group: string, displayName: string, namespaced?: boolean | null, cluster?: { __typename?: 'Cluster', id: string, name: string, self?: boolean | null, distro?: ClusterDistro | null, provider?: { __typename?: 'ClusterProvider', cloud: string } | null } | null } | null> | null, provider?: { __typename?: 'ClusterProvider', cloud: string } | null }; + +export type PinnedCustomResourceFragment = { __typename?: 'PinnedCustomResource', id: string, name: string, kind: string, version: string, group: string, displayName: string, namespaced?: boolean | null, cluster?: { __typename?: 'Cluster', id: string, name: string, self?: boolean | null, distro?: ClusterDistro | null, provider?: { __typename?: 'ClusterProvider', cloud: string } | null } | null }; + +export type KubernetesClustersQueryVariables = Exact<{ [key: string]: never; }>; + + +export type KubernetesClustersQuery = { __typename?: 'RootQueryType', clusters?: { __typename?: 'ClusterConnection', edges?: Array<{ __typename?: 'ClusterEdge', node?: { __typename?: 'Cluster', id: string, name: string, self?: boolean | null, distro?: ClusterDistro | null, pinnedCustomResources?: Array<{ __typename?: 'PinnedCustomResource', id: string, name: string, kind: string, version: string, group: string, displayName: string, namespaced?: boolean | null, cluster?: { __typename?: 'Cluster', id: string, name: string, self?: boolean | null, distro?: ClusterDistro | null, provider?: { __typename?: 'ClusterProvider', cloud: string } | null } | null } | null> | null, provider?: { __typename?: 'ClusterProvider', cloud: string } | null } | null } | null> | null } | null }; + +export type PinCustomResourceMutationVariables = Exact<{ + attributes: PinnedCustomResourceAttributes; +}>; + + +export type PinCustomResourceMutation = { __typename?: 'RootMutationType', createPinnedCustomResource?: { __typename?: 'PinnedCustomResource', id: string, name: string, kind: string, version: string, group: string, displayName: string, namespaced?: boolean | null, cluster?: { __typename?: 'Cluster', id: string, name: string, self?: boolean | null, distro?: ClusterDistro | null, provider?: { __typename?: 'ClusterProvider', cloud: string } | null } | null } | null }; + +export type UnpinCustomResourceMutationVariables = Exact<{ + id: Scalars['ID']['input']; +}>; + + +export type UnpinCustomResourceMutation = { __typename?: 'RootMutationType', deletePinnedCustomResource?: { __typename?: 'PinnedCustomResource', id: string, name: string, kind: string, version: string, group: string, displayName: string, namespaced?: boolean | null, cluster?: { __typename?: 'Cluster', id: string, name: string, self?: boolean | null, distro?: ClusterDistro | null, provider?: { __typename?: 'ClusterProvider', cloud: string } | null } | null } | null }; + export type CanaryStatusFragment = { __typename?: 'CanaryStatus', failedChecks?: number | null, canaryWeight?: number | null, iterations?: number | null, phase?: string | null, conditions?: Array<{ __typename?: 'StatusCondition', message: string, reason: string, status: string, type: string } | null> | null }; export type CanarySpecFragment = { __typename?: 'CanarySpec', provider?: string | null, analysis?: { __typename?: 'CanaryAnalysis', interval?: string | null, maxWeight?: number | null, stepWeight?: number | null, stepWeights?: Array | null, threshold?: number | null } | null }; @@ -9712,6 +9735,29 @@ export const GroupMemberFragmentDoc = gql` } ${UserFragmentDoc} ${GroupFragmentDoc}`; +export const PinnedCustomResourceFragmentDoc = gql` + fragment PinnedCustomResource on PinnedCustomResource { + id + name + kind + version + group + cluster { + ...ClusterTiny + } + displayName + namespaced +} + ${ClusterTinyFragmentDoc}`; +export const KubernetesClusterFragmentDoc = gql` + fragment KubernetesCluster on Cluster { + ...ClusterTiny + pinnedCustomResources { + ...PinnedCustomResource + } +} + ${ClusterTinyFragmentDoc} +${PinnedCustomResourceFragmentDoc}`; export const StatusConditionFragmentDoc = gql` fragment StatusCondition on StatusCondition { message @@ -14954,6 +15000,115 @@ export function useDeleteGroupMutation(baseOptions?: Apollo.MutationHookOptions< export type DeleteGroupMutationHookResult = ReturnType; export type DeleteGroupMutationResult = Apollo.MutationResult; export type DeleteGroupMutationOptions = Apollo.BaseMutationOptions; +export const KubernetesClustersDocument = gql` + query KubernetesClusters { + clusters(first: 200) { + edges { + node { + ...KubernetesCluster + } + } + } +} + ${KubernetesClusterFragmentDoc}`; + +/** + * __useKubernetesClustersQuery__ + * + * To run a query within a React component, call `useKubernetesClustersQuery` and pass it any options that fit your needs. + * When your component renders, `useKubernetesClustersQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useKubernetesClustersQuery({ + * variables: { + * }, + * }); + */ +export function useKubernetesClustersQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(KubernetesClustersDocument, options); + } +export function useKubernetesClustersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(KubernetesClustersDocument, options); + } +export function useKubernetesClustersSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(KubernetesClustersDocument, options); + } +export type KubernetesClustersQueryHookResult = ReturnType; +export type KubernetesClustersLazyQueryHookResult = ReturnType; +export type KubernetesClustersSuspenseQueryHookResult = ReturnType; +export type KubernetesClustersQueryResult = Apollo.QueryResult; +export const PinCustomResourceDocument = gql` + mutation PinCustomResource($attributes: PinnedCustomResourceAttributes!) { + createPinnedCustomResource(attributes: $attributes) { + ...PinnedCustomResource + } +} + ${PinnedCustomResourceFragmentDoc}`; +export type PinCustomResourceMutationFn = Apollo.MutationFunction; + +/** + * __usePinCustomResourceMutation__ + * + * To run a mutation, you first call `usePinCustomResourceMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `usePinCustomResourceMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [pinCustomResourceMutation, { data, loading, error }] = usePinCustomResourceMutation({ + * variables: { + * attributes: // value for 'attributes' + * }, + * }); + */ +export function usePinCustomResourceMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(PinCustomResourceDocument, options); + } +export type PinCustomResourceMutationHookResult = ReturnType; +export type PinCustomResourceMutationResult = Apollo.MutationResult; +export type PinCustomResourceMutationOptions = Apollo.BaseMutationOptions; +export const UnpinCustomResourceDocument = gql` + mutation UnpinCustomResource($id: ID!) { + deletePinnedCustomResource(id: $id) { + ...PinnedCustomResource + } +} + ${PinnedCustomResourceFragmentDoc}`; +export type UnpinCustomResourceMutationFn = Apollo.MutationFunction; + +/** + * __useUnpinCustomResourceMutation__ + * + * To run a mutation, you first call `useUnpinCustomResourceMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUnpinCustomResourceMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [unpinCustomResourceMutation, { data, loading, error }] = useUnpinCustomResourceMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useUnpinCustomResourceMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UnpinCustomResourceDocument, options); + } +export type UnpinCustomResourceMutationHookResult = ReturnType; +export type UnpinCustomResourceMutationResult = Apollo.MutationResult; +export type UnpinCustomResourceMutationOptions = Apollo.BaseMutationOptions; export const CanaryDocument = gql` query Canary($name: String!, $namespace: String!, $serviceId: ID) { canary(name: $name, namespace: $namespace, serviceId: $serviceId) { @@ -16531,6 +16686,7 @@ export const namedOperations = { Groups: 'Groups', SearchGroups: 'SearchGroups', GroupMembers: 'GroupMembers', + KubernetesClusters: 'KubernetesClusters', Canary: 'Canary', Certificate: 'Certificate', CronJob: 'CronJob', @@ -16609,6 +16765,8 @@ export const namedOperations = { CreateGroup: 'CreateGroup', UpdateGroup: 'UpdateGroup', DeleteGroup: 'DeleteGroup', + PinCustomResource: 'PinCustomResource', + UnpinCustomResource: 'UnpinCustomResource', UpsertNotificationRouter: 'UpsertNotificationRouter', DeleteNotificationRouter: 'DeleteNotificationRouter', UpsertNotificationSink: 'UpsertNotificationSink', @@ -16696,6 +16854,8 @@ export const namedOperations = { DatabaseTableRow: 'DatabaseTableRow', GroupMember: 'GroupMember', Group: 'Group', + KubernetesCluster: 'KubernetesCluster', + PinnedCustomResource: 'PinnedCustomResource', CanaryStatus: 'CanaryStatus', CanarySpec: 'CanarySpec', Canary: 'Canary', diff --git a/assets/src/graph-kubernetes/access/clusterrole.graphql b/assets/src/graph-kubernetes/access/clusterrole.graphql index d50e498f9d..9eebdb6890 100644 --- a/assets/src/graph-kubernetes/access/clusterrole.graphql +++ b/assets/src/graph-kubernetes/access/clusterrole.graphql @@ -14,6 +14,7 @@ query ClusterRoles( @rest( path: "clusterrole?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/access/clusterrolebinding.graphql b/assets/src/graph-kubernetes/access/clusterrolebinding.graphql index 8666ca6f76..4dc39eaa95 100644 --- a/assets/src/graph-kubernetes/access/clusterrolebinding.graphql +++ b/assets/src/graph-kubernetes/access/clusterrolebinding.graphql @@ -14,6 +14,7 @@ query ClusterRoleBindings( @rest( path: "clusterrolebinding?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/access/role.graphql b/assets/src/graph-kubernetes/access/role.graphql index 89c293054c..07b965557e 100644 --- a/assets/src/graph-kubernetes/access/role.graphql +++ b/assets/src/graph-kubernetes/access/role.graphql @@ -16,6 +16,7 @@ query Roles( type: "role_RoleList" path: "role/{args.namespace}?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/access/rolebinding.graphql b/assets/src/graph-kubernetes/access/rolebinding.graphql index 519c636147..e683a022db 100644 --- a/assets/src/graph-kubernetes/access/rolebinding.graphql +++ b/assets/src/graph-kubernetes/access/rolebinding.graphql @@ -15,6 +15,7 @@ query RoleBindings( @rest( path: "rolebinding/{args.namespace}?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/access/serviceaccount.graphql b/assets/src/graph-kubernetes/access/serviceaccount.graphql index 6e934663b5..a9051acfe5 100644 --- a/assets/src/graph-kubernetes/access/serviceaccount.graphql +++ b/assets/src/graph-kubernetes/access/serviceaccount.graphql @@ -16,6 +16,7 @@ query ServiceAccounts( type: "serviceaccount_ServiceAccountList" path: "serviceaccount/{args.namespace}?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/cluster/event_fragments.graphql b/assets/src/graph-kubernetes/cluster/event_fragments.graphql index a408bc08e9..634619208b 100644 --- a/assets/src/graph-kubernetes/cluster/event_fragments.graphql +++ b/assets/src/graph-kubernetes/cluster/event_fragments.graphql @@ -1,4 +1,5 @@ fragment EventList on common_EventList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/cluster/namespace.graphql b/assets/src/graph-kubernetes/cluster/namespace.graphql index 6758560528..2a79a75583 100644 --- a/assets/src/graph-kubernetes/cluster/namespace.graphql +++ b/assets/src/graph-kubernetes/cluster/namespace.graphql @@ -14,6 +14,7 @@ query Namespaces( @rest( path: "namespace?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/cluster/node.graphql b/assets/src/graph-kubernetes/cluster/node.graphql index c915b528c7..fea38fc67a 100644 --- a/assets/src/graph-kubernetes/cluster/node.graphql +++ b/assets/src/graph-kubernetes/cluster/node.graphql @@ -14,6 +14,7 @@ query Nodes( @rest( path: "node?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } @@ -93,9 +94,25 @@ query Node($name: String!) { } } -query NodePods($namespace: String!, $name: String!) { - handleGetNodePods(name: $name) - @rest(type: "pod_PodList", path: "node/{args.name}/pod") { +query NodePods( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { + handleGetNodePods( + name: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) + @rest( + type: "pod_PodList" + path: "node/{args.name}/pod?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" + ) { ...PodList } } diff --git a/assets/src/graph-kubernetes/common/fragments.graphql b/assets/src/graph-kubernetes/common/fragments.graphql index d4b7b5241d..8e91ad1111 100644 --- a/assets/src/graph-kubernetes/common/fragments.graphql +++ b/assets/src/graph-kubernetes/common/fragments.graphql @@ -127,6 +127,7 @@ fragment Selector on v1_LabelSelector { } fragment HorizontalPodAutoscalerList on horizontalpodautoscaler_HorizontalPodAutoscalerList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/common/resource.graphql b/assets/src/graph-kubernetes/common/resource.graphql index e9eca2a8e1..07b49226fe 100644 --- a/assets/src/graph-kubernetes/common/resource.graphql +++ b/assets/src/graph-kubernetes/common/resource.graphql @@ -1,6 +1,7 @@ query NamespacedResource($kind: String!, $name: String!, $namespace: String!) { handleGetResource(kind: $kind, name: $name, namespace: $namespace) @rest( + method: "GET" path: "_raw/{args.kind}/namespace/{args.namespace}/name/{args.name}" ) { Object @@ -9,7 +10,7 @@ query NamespacedResource($kind: String!, $name: String!, $namespace: String!) { query Resource($kind: String!, $name: String!) { handleGetResource(kind: $kind, name: $name, namespace: "") - @rest(path: "_raw/{args.kind}/name/{args.name}") { + @rest(method: "GET", path: "_raw/{args.kind}/name/{args.name}") { Object } } @@ -41,3 +42,59 @@ mutation ResourceUpdate($kind: String!, $name: String!, $input: JSON!) { method: "PUT" ) } + +mutation ResourceScale( + $kind: String! + $namespace: String! + $name: String! + $scaleBy: String! +) { + handleScaleResource( + kind: $kind + namespace: $namespace + name: $name + scaleBy: $scaleBy + ) + @rest( + type: "Void" + path: "scale/{args.kind}/{args.namespace}/{args.name}?scaleBy={args.scaleBy}" + method: "PUT" + bodyKey: "scaleBy" + ) { + actualReplicas + desiredReplicas + } +} + +mutation ResourceDelete($kind: String!, $name: String!, $deleteNow: String) { + handleDeleteResource( + kind: $kind + name: $name + namespace: "" + deleteNow: $deleteNow + ) + @rest( + type: "Void" + path: "_raw/{args.kind}/name/{args.name}?deleteNow={args.deleteNow}" + method: "DELETE" + ) +} + +mutation NamespacedResourceDelete( + $kind: String! + $namespace: String! + $name: String! + $deleteNow: String +) { + handleDeleteResource( + kind: $kind + namespace: $namespace + name: $name + deleteNow: $deleteNow + ) + @rest( + type: "Void" + path: "_raw/{args.kind}/namespace/{args.namespace}/name/{args.name}?deleteNow={args.deleteNow}" + method: "DELETE" + ) +} diff --git a/assets/src/graph-kubernetes/configuration/configmap.graphql b/assets/src/graph-kubernetes/configuration/configmap.graphql index 5dad147330..a4cfa3a4a7 100644 --- a/assets/src/graph-kubernetes/configuration/configmap.graphql +++ b/assets/src/graph-kubernetes/configuration/configmap.graphql @@ -15,6 +15,7 @@ query ConfigMaps( @rest( path: "configmap/{args.namespace}?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/configuration/secret.graphql b/assets/src/graph-kubernetes/configuration/secret.graphql index e2e26eeb9f..9a048c2280 100644 --- a/assets/src/graph-kubernetes/configuration/secret.graphql +++ b/assets/src/graph-kubernetes/configuration/secret.graphql @@ -15,6 +15,7 @@ query Secrets( @rest( path: "secret/{args.namespace}?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/customresourcedefinition.graphql b/assets/src/graph-kubernetes/customresourcedefinition.graphql index fe6b66f8eb..d473666cbf 100644 --- a/assets/src/graph-kubernetes/customresourcedefinition.graphql +++ b/assets/src/graph-kubernetes/customresourcedefinition.graphql @@ -13,6 +13,7 @@ query CustomResourceDefinitions( @rest( path: "crd?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { + errors listMeta { totalItems } @@ -87,6 +88,7 @@ query CustomResources( @rest( path: "crd/{args.namespace}/{args.crd}/object?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { + errors listMeta { totalItems } @@ -116,15 +118,27 @@ query CustomResource($namespace: String!, $name: String!, $crd: String!) { } } -query CustomResourceEvents($crd: String!, $namespace: String!, $name: String!) { +query CustomResourceEvents( + $crd: String! + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { handleGetCustomResourceObjectEvents( namespace: $namespace object: $name crd: $crd + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page ) @rest( type: "common_EventList" - path: "crd/{args.namespace}/{args.crd}/{args.object}/event" + path: "crd/{args.namespace}/{args.crd}/{args.object}/event?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...EventList } diff --git a/assets/src/graph-kubernetes/discovery/ingress.graphql b/assets/src/graph-kubernetes/discovery/ingress.graphql index 98b7787ebd..55c7e7c745 100644 --- a/assets/src/graph-kubernetes/discovery/ingress.graphql +++ b/assets/src/graph-kubernetes/discovery/ingress.graphql @@ -99,11 +99,25 @@ query Ingress($name: String!, $namespace: String!) { } } -query IngressEvents($namespace: String!, $name: String!) { - handleGetIngressEvent(namespace: $namespace, ingress: $name) +query IngressEvents( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { + handleGetIngressEvent( + namespace: $namespace + ingress: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest( type: "common_EventList" - path: "ingress/{args.namespace}/{args.ingress}/event" + path: "ingress/{args.namespace}/{args.ingress}/event?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...EventList } diff --git a/assets/src/graph-kubernetes/discovery/ingress_fragments.graphql b/assets/src/graph-kubernetes/discovery/ingress_fragments.graphql index 5d0d03bf02..45557dd2bf 100644 --- a/assets/src/graph-kubernetes/discovery/ingress_fragments.graphql +++ b/assets/src/graph-kubernetes/discovery/ingress_fragments.graphql @@ -1,4 +1,5 @@ fragment IngressList on ingress_IngressList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/discovery/ingressclass.graphql b/assets/src/graph-kubernetes/discovery/ingressclass.graphql index 66d0147459..cfe1aa29ef 100644 --- a/assets/src/graph-kubernetes/discovery/ingressclass.graphql +++ b/assets/src/graph-kubernetes/discovery/ingressclass.graphql @@ -13,6 +13,7 @@ query IngressClasses( @rest( path: "ingressclass?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/discovery/networkpolicy.graphql b/assets/src/graph-kubernetes/discovery/networkpolicy.graphql index e8c5dfc992..d48b9bd5b0 100644 --- a/assets/src/graph-kubernetes/discovery/networkpolicy.graphql +++ b/assets/src/graph-kubernetes/discovery/networkpolicy.graphql @@ -15,6 +15,7 @@ query NetworkPolicies( @rest( path: "networkpolicy/{args.namespace}?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/discovery/service.graphql b/assets/src/graph-kubernetes/discovery/service.graphql index 6ed9768e95..3c2108b8c7 100644 --- a/assets/src/graph-kubernetes/discovery/service.graphql +++ b/assets/src/graph-kubernetes/discovery/service.graphql @@ -62,31 +62,73 @@ query Service($name: String!, $namespace: String!) { } } -query ServiceEvents($namespace: String!, $name: String!) { - handleGetServiceEvent(namespace: $namespace, service: $name) +query ServiceEvents( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { + handleGetServiceEvent( + namespace: $namespace + service: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest( type: "common_EventList" - path: "service/{args.namespace}/{args.service}/event" + path: "service/{args.namespace}/{args.service}/event?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...EventList } } -query ServicePods($namespace: String!, $name: String!) { - handleGetServicePods(namespace: $namespace, service: $name) +query ServicePods( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { + handleGetServicePods( + namespace: $namespace + service: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest( type: "pod_PodList" - path: "service/{args.namespace}/{args.service}/pod" + path: "service/{args.namespace}/{args.service}/pod?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...PodList } } -query ServiceIngresses($namespace: String!, $name: String!) { - handleGetServiceIngressList(namespace: $namespace, service: $name) +query ServiceIngresses( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { + handleGetServiceIngressList( + namespace: $namespace + service: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest( type: "ingress_IngressList" - path: "service/{args.namespace}/{args.service}/ingress" + path: "service/{args.namespace}/{args.service}/ingress?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...IngressList } diff --git a/assets/src/graph-kubernetes/discovery/service_fragments.graphql b/assets/src/graph-kubernetes/discovery/service_fragments.graphql index 03cfdc15ce..10ad1384f7 100644 --- a/assets/src/graph-kubernetes/discovery/service_fragments.graphql +++ b/assets/src/graph-kubernetes/discovery/service_fragments.graphql @@ -1,4 +1,5 @@ fragment ServiceList on service_ServiceList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/storage/persistentvolume.graphql b/assets/src/graph-kubernetes/storage/persistentvolume.graphql index 1953e08d4c..a90b72754a 100644 --- a/assets/src/graph-kubernetes/storage/persistentvolume.graphql +++ b/assets/src/graph-kubernetes/storage/persistentvolume.graphql @@ -13,6 +13,7 @@ query PersistentVolumes( @rest( path: "persistentvolume?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/storage/persistentvolumeclaim.graphql b/assets/src/graph-kubernetes/storage/persistentvolumeclaim.graphql index 1345318fd2..a3e599841f 100644 --- a/assets/src/graph-kubernetes/storage/persistentvolumeclaim.graphql +++ b/assets/src/graph-kubernetes/storage/persistentvolumeclaim.graphql @@ -59,6 +59,7 @@ fragment PersistentVolumeClaimDetail on persistentvolumeclaim_PersistentVolumeCl } fragment PersistentVolumeClaimList on persistentvolumeclaim_PersistentVolumeClaimList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/storage/storageclass.graphql b/assets/src/graph-kubernetes/storage/storageclass.graphql index 5868adf2ac..f7c7a77743 100644 --- a/assets/src/graph-kubernetes/storage/storageclass.graphql +++ b/assets/src/graph-kubernetes/storage/storageclass.graphql @@ -13,6 +13,7 @@ query StorageClasses( @rest( path: "storageclass?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/workloads/cronjob.graphql b/assets/src/graph-kubernetes/workloads/cronjob.graphql index 11c2c1e682..426c8d97ff 100644 --- a/assets/src/graph-kubernetes/workloads/cronjob.graphql +++ b/assets/src/graph-kubernetes/workloads/cronjob.graphql @@ -30,8 +30,22 @@ query CronJob($namespace: String!, $name: String!) { } } -query CronJobEvents($namespace: String!, $name: String!) { - handleGetCronJobEvents(namespace: $namespace, name: $name) +query CronJobEvents( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { + handleGetCronJobEvents( + namespace: $namespace + name: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest( type: "common_EventList" path: "cronjob/{args.namespace}/{args.name}/event" @@ -40,12 +54,38 @@ query CronJobEvents($namespace: String!, $name: String!) { } } -query CronJobJobs($namespace: String!, $name: String!, $active: String) { - handleGetCronJobJobs(namespace: $namespace, name: $name, active: $active) +query CronJobJobs( + $namespace: String! + $name: String! + $active: String + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { + handleGetCronJobJobs( + namespace: $namespace + name: $name + active: $active + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest( type: "job_JobList" - path: "cronjob/{args.namespace}/{args.name}/job?active={args.active}" + path: "cronjob/{args.namespace}/{args.name}/job?active={args.active}&filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...JobList } } + +mutation CronJobTrigger($name: String!, $namespace: String!) { + handleTriggerCronJob(name: $name, namespace: $namespace) + @rest( + type: "Void" + path: "/cronjob/{args.namespace}/{args.name}/trigger" + method: "PUT" + bodyKey: "name" # Marked as body key to avoid empty body errors. + ) +} diff --git a/assets/src/graph-kubernetes/workloads/cronjob_fragments.graphql b/assets/src/graph-kubernetes/workloads/cronjob_fragments.graphql index 62beedc989..a42ee402ba 100644 --- a/assets/src/graph-kubernetes/workloads/cronjob_fragments.graphql +++ b/assets/src/graph-kubernetes/workloads/cronjob_fragments.graphql @@ -1,4 +1,5 @@ fragment CronJobList on cronjob_CronJobList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/workloads/daemonset.graphql b/assets/src/graph-kubernetes/workloads/daemonset.graphql index e53ef47318..f1c97a32c5 100644 --- a/assets/src/graph-kubernetes/workloads/daemonset.graphql +++ b/assets/src/graph-kubernetes/workloads/daemonset.graphql @@ -30,31 +30,73 @@ query DaemonSet($namespace: String!, $name: String!) { } } -query DaemonSetEvents($namespace: String!, $name: String!) { - handleGetDaemonSetEvents(namespace: $namespace, daemonSet: $name) +query DaemonSetEvents( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { + handleGetDaemonSetEvents( + namespace: $namespace + daemonSet: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest( type: "common_EventList" - path: "daemonset/{args.namespace}/{args.daemonSet}/event" + path: "daemonset/{args.namespace}/{args.daemonSet}/event?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...EventList } } -query DaemonSetPods($namespace: String!, $name: String!) { - handleGetDaemonSetPods(namespace: $namespace, daemonSet: $name) +query DaemonSetPods( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { + handleGetDaemonSetPods( + namespace: $namespace + daemonSet: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest( type: "pod_PodList" - path: "daemonset/{args.namespace}/{args.daemonSet}/pod" + path: "daemonset/{args.namespace}/{args.daemonSet}/pod?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...PodList } } -query DaemonSetServices($namespace: String!, $name: String!) { - handleGetDaemonSetServices(namespace: $namespace, daemonSet: $name) +query DaemonSetServices( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { + handleGetDaemonSetServices( + namespace: $namespace + daemonSet: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest( type: "service_ServiceList" - path: "daemonset/{args.namespace}/{args.daemonSet}/service" + path: "daemonset/{args.namespace}/{args.daemonSet}/service?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...ServiceList } diff --git a/assets/src/graph-kubernetes/workloads/daemonset_fragments.graphql b/assets/src/graph-kubernetes/workloads/daemonset_fragments.graphql index 2160878fe8..e0ec7fbc3f 100644 --- a/assets/src/graph-kubernetes/workloads/daemonset_fragments.graphql +++ b/assets/src/graph-kubernetes/workloads/daemonset_fragments.graphql @@ -1,4 +1,5 @@ fragment DaemonSetList on daemonset_DaemonSetList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/workloads/deployment.graphql b/assets/src/graph-kubernetes/workloads/deployment.graphql index 8bfb0f9c21..55fcc835cf 100644 --- a/assets/src/graph-kubernetes/workloads/deployment.graphql +++ b/assets/src/graph-kubernetes/workloads/deployment.graphql @@ -30,31 +30,73 @@ query Deployment($namespace: String!, $name: String!) { } } -query DeploymentEvents($namespace: String!, $name: String!) { - handleGetDeploymentEvents(namespace: $namespace, deployment: $name) +query DeploymentEvents( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { + handleGetDeploymentEvents( + namespace: $namespace + deployment: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest( type: "common_EventList" - path: "deployment/{args.namespace}/{args.deployment}/event" + path: "deployment/{args.namespace}/{args.deployment}/event?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...EventList } } -query DeploymentNewReplicaSet($namespace: String!, $name: String!) { - handleGetDeploymentNewReplicaSet(namespace: $namespace, deployment: $name) +query DeploymentNewReplicaSet( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { + handleGetDeploymentNewReplicaSet( + namespace: $namespace + deployment: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest( type: "replicaset_ReplicaSet" - path: "deployment/{args.namespace}/{args.deployment}/newreplicaset" + path: "deployment/{args.namespace}/{args.deployment}/newreplicaset?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...ReplicaSet } } -query DeploymentOldReplicaSets($namespace: String!, $name: String!) { - handleGetDeploymentOldReplicaSets(namespace: $namespace, deployment: $name) +query DeploymentOldReplicaSets( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { + handleGetDeploymentOldReplicaSets( + namespace: $namespace + deployment: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest( type: "replicaset_ReplicaSetList" - path: "deployment/{args.namespace}/{args.deployment}/oldreplicaset" + path: "deployment/{args.namespace}/{args.deployment}/oldreplicaset?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...ReplicaSetList } diff --git a/assets/src/graph-kubernetes/workloads/deployment_fragments.graphql b/assets/src/graph-kubernetes/workloads/deployment_fragments.graphql index dee1c4a029..9612e16d94 100644 --- a/assets/src/graph-kubernetes/workloads/deployment_fragments.graphql +++ b/assets/src/graph-kubernetes/workloads/deployment_fragments.graphql @@ -1,4 +1,5 @@ fragment DeploymentList on deployment_DeploymentList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/workloads/job.graphql b/assets/src/graph-kubernetes/workloads/job.graphql index 45f6e9eb5f..436428c066 100644 --- a/assets/src/graph-kubernetes/workloads/job.graphql +++ b/assets/src/graph-kubernetes/workloads/job.graphql @@ -27,19 +27,50 @@ query Job($namespace: String!, $name: String!) { } } -query JobEvents($namespace: String!, $name: String!) { - handleGetJobEvents(namespace: $namespace, name: $name) +query JobEvents( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { + handleGetJobEvents( + namespace: $namespace + name: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest( type: "common_EventList" - path: "job/{args.namespace}/{args.name}/event" + path: "job/{args.namespace}/{args.name}/event?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...EventList } } -query JobPods($namespace: String!, $name: String!) { - handleGetJobPods(namespace: $namespace, name: $name) - @rest(type: "pod_PodList", path: "job/{args.namespace}/{args.name}/pod") { +query JobPods( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { + handleGetJobPods( + namespace: $namespace + name: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) + @rest( + type: "pod_PodList" + path: "job/{args.namespace}/{args.name}/pod?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" + ) { ...PodList } } diff --git a/assets/src/graph-kubernetes/workloads/job_fragments.graphql b/assets/src/graph-kubernetes/workloads/job_fragments.graphql index 6454b6834c..688d6df3dc 100644 --- a/assets/src/graph-kubernetes/workloads/job_fragments.graphql +++ b/assets/src/graph-kubernetes/workloads/job_fragments.graphql @@ -1,4 +1,5 @@ fragment JobList on job_JobList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/workloads/pod_fragments.graphql b/assets/src/graph-kubernetes/workloads/pod_fragments.graphql index 68afd28a2b..e2d520f25f 100644 --- a/assets/src/graph-kubernetes/workloads/pod_fragments.graphql +++ b/assets/src/graph-kubernetes/workloads/pod_fragments.graphql @@ -121,6 +121,7 @@ fragment SecurityContext on v1_SecurityContext { } fragment PodList on pod_PodList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/workloads/replicaset.graphql b/assets/src/graph-kubernetes/workloads/replicaset.graphql index 8426e510f1..1564156a32 100644 --- a/assets/src/graph-kubernetes/workloads/replicaset.graphql +++ b/assets/src/graph-kubernetes/workloads/replicaset.graphql @@ -30,31 +30,73 @@ query ReplicaSet($namespace: String!, $name: String!) { } } -query ReplicaSetEvents($namespace: String!, $name: String!) { - handleGetReplicaSetEvents(namespace: $namespace, replicaSet: $name) +query ReplicaSetEvents( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { + handleGetReplicaSetEvents( + namespace: $namespace + replicaSet: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest( type: "common_EventList" - path: "replicaset/{args.namespace}/{args.replicaSet}/event" + path: "replicaset/{args.namespace}/{args.replicaSet}/event?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...EventList } } -query ReplicaSetPods($namespace: String!, $name: String!) { - handleGetReplicaSetPods(namespace: $namespace, replicaSet: $name) +query ReplicaSetPods( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { + handleGetReplicaSetPods( + namespace: $namespace + replicaSet: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest( type: "pod_PodList" - path: "replicaset/{args.namespace}/{args.replicaSet}/pod" + path: "replicaset/{args.namespace}/{args.replicaSet}/pod?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...PodList } } -query ReplicaSetServices($namespace: String!, $name: String!) { - handleGetReplicaSetServices(namespace: $namespace, replicaSet: $name) +query ReplicaSetServices( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { + handleGetReplicaSetServices( + namespace: $namespace + replicaSet: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest( type: "service_ServiceList" - path: "replicaset/{args.namespace}/{args.replicaSet}/service" + path: "replicaset/{args.namespace}/{args.replicaSet}/service?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...ServiceList } diff --git a/assets/src/graph-kubernetes/workloads/replicaset_fragments.graphql b/assets/src/graph-kubernetes/workloads/replicaset_fragments.graphql index 41c45291e5..fefad34a77 100644 --- a/assets/src/graph-kubernetes/workloads/replicaset_fragments.graphql +++ b/assets/src/graph-kubernetes/workloads/replicaset_fragments.graphql @@ -1,4 +1,5 @@ fragment ReplicaSetList on replicaset_ReplicaSetList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/workloads/replicationcontroller.graphql b/assets/src/graph-kubernetes/workloads/replicationcontroller.graphql index 6fa4dd731d..301e99e141 100644 --- a/assets/src/graph-kubernetes/workloads/replicationcontroller.graphql +++ b/assets/src/graph-kubernetes/workloads/replicationcontroller.graphql @@ -33,40 +33,73 @@ query ReplicationController($namespace: String!, $name: String!) { } } -query ReplicationControllerEvents($namespace: String!, $name: String!) { +query ReplicationControllerEvents( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { handleGetReplicationControllerEvents( namespace: $namespace replicationController: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page ) @rest( type: "common_EventList" - path: "replicationcontroller/{args.namespace}/{args.replicationController}/event" + path: "replicationcontroller/{args.namespace}/{args.replicationController}/event?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...EventList } } -query ReplicationControllerPods($namespace: String!, $name: String!) { +query ReplicationControllerPods( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { handleGetReplicationControllerPods( namespace: $namespace replicationController: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page ) @rest( type: "pod_PodList" - path: "replicationcontroller/{args.namespace}/{args.replicationController}/pod" + path: "replicationcontroller/{args.namespace}/{args.replicationController}/pod?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...PodList } } -query ReplicationControllerServices($namespace: String!, $name: String!) { +query ReplicationControllerServices( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { handleGetReplicationControllerServices( namespace: $namespace replicationController: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page ) @rest( type: "service_ServiceList" - path: "replicationcontroller/{args.namespace}/{args.replicationController}/service" + path: "replicationcontroller/{args.namespace}/{args.replicationController}/service?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...ServiceList } diff --git a/assets/src/graph-kubernetes/workloads/replicationcontroller_fragments.graphql b/assets/src/graph-kubernetes/workloads/replicationcontroller_fragments.graphql index e1ca099519..8bf30ece71 100644 --- a/assets/src/graph-kubernetes/workloads/replicationcontroller_fragments.graphql +++ b/assets/src/graph-kubernetes/workloads/replicationcontroller_fragments.graphql @@ -1,4 +1,5 @@ fragment ReplicationControllerList on replicationcontroller_ReplicationControllerList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph-kubernetes/workloads/statefulset.graphql b/assets/src/graph-kubernetes/workloads/statefulset.graphql index b69a6a4d02..d86c7add92 100644 --- a/assets/src/graph-kubernetes/workloads/statefulset.graphql +++ b/assets/src/graph-kubernetes/workloads/statefulset.graphql @@ -30,21 +30,49 @@ query StatefulSet($namespace: String!, $name: String!) { } } -query StatefulSetEvents($namespace: String!, $name: String!) { - handleGetStatefulSetEvents(namespace: $namespace, statefulset: $name) +query StatefulSetEvents( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { + handleGetStatefulSetEvents( + namespace: $namespace + statefulset: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest( type: "common_EventList" - path: "statefulset/{args.namespace}/{args.statefulset}/event" + path: "statefulset/{args.namespace}/{args.statefulset}/event?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...EventList } } -query StatefulSetPods($namespace: String!, $name: String!) { - handleGetStatefulSetPods(namespace: $namespace, statefulset: $name) +query StatefulSetPods( + $namespace: String! + $name: String! + $filterBy: String + $sortBy: String + $itemsPerPage: String + $page: String +) { + handleGetStatefulSetPods( + namespace: $namespace + statefulset: $name + filterBy: $filterBy + sortBy: $sortBy + itemsPerPage: $itemsPerPage + page: $page + ) @rest( type: "pod_PodList" - path: "statefulset/{args.namespace}/{args.statefulset}/pod" + path: "statefulset/{args.namespace}/{args.statefulset}/pod?filterBy={args.filterBy}&sortBy={args.sortBy}&itemsPerPage={args.itemsPerPage}&page={args.page}" ) { ...PodList } diff --git a/assets/src/graph-kubernetes/workloads/statefulset_fragments.graphql b/assets/src/graph-kubernetes/workloads/statefulset_fragments.graphql index b0c9302c59..226330cad4 100644 --- a/assets/src/graph-kubernetes/workloads/statefulset_fragments.graphql +++ b/assets/src/graph-kubernetes/workloads/statefulset_fragments.graphql @@ -1,4 +1,5 @@ fragment StatefulSetList on statefulset_StatefulSetList { + errors listMeta @type(name: "types_ListMeta") { ...ListMeta } diff --git a/assets/src/graph/kubernetes.graphql b/assets/src/graph/kubernetes.graphql new file mode 100644 index 0000000000..39372dbae4 --- /dev/null +++ b/assets/src/graph/kubernetes.graphql @@ -0,0 +1,41 @@ +fragment KubernetesCluster on Cluster { + ...ClusterTiny + pinnedCustomResources { + ...PinnedCustomResource + } +} + +fragment PinnedCustomResource on PinnedCustomResource { + id + name + kind + version + group + cluster { + ...ClusterTiny + } + displayName + namespaced +} + +query KubernetesClusters { + clusters(first: 200) { + edges { + node { + ...KubernetesCluster + } + } + } +} + +mutation PinCustomResource($attributes: PinnedCustomResourceAttributes!) { + createPinnedCustomResource(attributes: $attributes) { + ...PinnedCustomResource + } +} + +mutation UnpinCustomResource($id: ID!) { + deletePinnedCustomResource(id: $id) { + ...PinnedCustomResource + } +} diff --git a/assets/src/routes/consoleRoutes.tsx b/assets/src/routes/consoleRoutes.tsx index af41ecab06..23aef071ce 100644 --- a/assets/src/routes/consoleRoutes.tsx +++ b/assets/src/routes/consoleRoutes.tsx @@ -232,7 +232,7 @@ export const consoleComponentRoutes = [ /* KUBERNETES */ kubernetesRoute, -] +].map((route, idx) => ({ ...route, key: route.props.path ?? idx })) export const consoleRoutes: RouteObject[] = [ // ----- Old-style component-based routes ----- diff --git a/assets/src/routes/kubernetesRoutesConsts.tsx b/assets/src/routes/kubernetesRoutesConsts.tsx index 5fd8438daf..09e8c26479 100644 --- a/assets/src/routes/kubernetesRoutesConsts.tsx +++ b/assets/src/routes/kubernetesRoutesConsts.tsx @@ -1,5 +1,7 @@ import pluralize from 'pluralize' +import { Kind } from '../components/kubernetes/common/types' + export const KUBERNETES_ROOT_PATH = 'kubernetes' export const KUBERNETES_PARAM_CLUSTER = ':clusterId?' export const KUBERNETES_ABS_PATH = getKubernetesAbsPath( @@ -85,7 +87,7 @@ export function getCustomResourcesAbsPath( export function getResourceDetailsAbsPath( clusterId: Nullable, - kind: Nullable, + kind: Nullable, name: Nullable, namespace?: Nullable ): string { diff --git a/assets/src/types/react-table.d.ts b/assets/src/types/react-table.d.ts index 06a55e1397..bdd13f7a36 100644 --- a/assets/src/types/react-table.d.ts +++ b/assets/src/types/react-table.d.ts @@ -1,4 +1,5 @@ import '@tanstack/react-table' +import { OperationVariables } from '@apollo/client/core' declare module '@tanstack/table-core' { // eslint-disable-next-line @typescript-eslint/no-unused-vars @@ -9,7 +10,11 @@ declare module '@tanstack/table-core' { } // eslint-disable-next-line @typescript-eslint/no-unused-vars interface TableMeta { - refetch?: Nullable<() => void> + refetch?: Nullable< + ( + variables?: Partial | undefined + ) => Promise | void + > [k: string]: any } }