@prorobotech/openapi-k8s-toolkit 1.0.3 → 1.1.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/openapi-k8s-toolkit.es.js +1764 -463
- package/dist/openapi-k8s-toolkit.es.js.map +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +1775 -467
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/components/atoms/CursorDefaultDiv/CursorDefaultDiv.d.ts +2 -2
- package/dist/types/components/atoms/CursorDefaultDiv/index.d.ts +1 -1
- package/dist/types/components/atoms/CursorPointerTag/index.d.ts +1 -1
- package/dist/types/components/atoms/CursorPointerTagMinContent/index.d.ts +1 -1
- package/dist/types/components/atoms/CustomSelect/index.d.ts +1 -1
- package/dist/types/components/atoms/FlexGrow/index.d.ts +1 -1
- package/dist/types/components/atoms/PaddingContainer/index.d.ts +1 -1
- package/dist/types/components/atoms/ResourceLink/ResourceLink.d.ts +19 -0
- package/dist/types/components/atoms/ResourceLink/index.d.ts +1 -0
- package/dist/types/components/atoms/ResourceLink/styled.d.ts +8 -0
- package/dist/types/components/atoms/UncontrolledSelect/index.d.ts +1 -1
- package/dist/types/components/atoms/index.d.ts +19 -13
- package/dist/types/components/molecules/BlackholeForm/atoms/ArrayInsideContainer/ArrayInsideContainer.d.ts +2 -2
- package/dist/types/components/molecules/BlackholeForm/atoms/ArrayInsideContainer/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/atoms/CustomCollapse/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/atoms/CustomSizeTitle/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/atoms/DebugNameViewer/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/atoms/HeightContainer/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/atoms/HiddenContainer/HiddenContainer.d.ts +4 -2
- package/dist/types/components/molecules/BlackholeForm/atoms/HiddenContainer/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/atoms/PersistedCheckbox/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/atoms/PossibleHiddenContainer/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/atoms/ResetedFormItem/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/atoms/index.d.ts +9 -9
- package/dist/types/components/molecules/BlackholeForm/index.d.ts +2 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormArrayHeader/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormBooleanInput/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormEnumStringInput/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormInlineYamlEditor/FormInlineYamlEditor.d.ts +4 -2
- package/dist/types/components/molecules/BlackholeForm/molecules/FormInlineYamlEditor/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormListInput/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormNamespaceInput/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormNumberInput/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormObjectFromSwagger/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormRangeInput/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormRangeInput/molecules/RangeInput/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormRangeInput/molecules/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormStringInput/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormStringMultilineInput/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/YamlEditor/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/YamlEditorSingleton/index.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/index.d.ts +13 -13
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/BlackholeForm.d.ts +2 -3
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/index.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/{BlackholeFormDataProvider/BlackholeFormDataProvider.d.ts → BlackholeFormProvider/BlackholeFormProvider.d.ts} +2 -2
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeFormProvider/index.d.ts +2 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/index.d.ts +4 -2
- package/dist/types/components/molecules/EnrichedTable/index.d.ts +2 -1
- package/dist/types/components/molecules/EnrichedTable/molecules/index.d.ts +1 -1
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/atoms/FilterDropdown/index.d.ts +1 -1
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/atoms/ShortenedTextWithTooltip/index.d.ts +1 -1
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/atoms/TableComponents/index.d.ts +1 -1
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/atoms/TextAlignContainer/index.d.ts +1 -1
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/atoms/TinyButton/index.d.ts +1 -1
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/atoms/TrimmedTags/index.d.ts +1 -1
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/atoms/index.d.ts +6 -6
- package/dist/types/components/molecules/EnrichedTable/organisms/index.d.ts +4 -2
- package/dist/types/components/molecules/Events/Events.d.ts +3 -2
- package/dist/types/components/molecules/Events/index.d.ts +1 -0
- package/dist/types/components/molecules/Events/molecules/EventRow/EventRow.d.ts +1 -0
- package/dist/types/components/molecules/Events/molecules/EventRow/utils.d.ts +0 -20
- package/dist/types/components/molecules/ManageableBreadcrumbs/index.d.ts +2 -3
- package/dist/types/components/molecules/ManageableBreadcrumbs/molecules/CollapsibleBreadcrumb/index.d.ts +1 -1
- package/dist/types/components/molecules/ManageableBreadcrumbs/molecules/index.d.ts +1 -1
- package/dist/types/components/molecules/ManageableBreadcrumbs/organisms/ManageableBreadcrumbs/ManageableBreadcrumbs.d.ts +8 -0
- package/dist/types/components/molecules/ManageableBreadcrumbs/organisms/ManageableBreadcrumbs/index.d.ts +2 -0
- package/dist/types/components/molecules/ManageableBreadcrumbs/organisms/ManageableBreadcrumbsProvider/ManageableBreadcrumbsProvider.d.ts +12 -0
- package/dist/types/components/molecules/ManageableBreadcrumbs/organisms/ManageableBreadcrumbsProvider/index.d.ts +3 -0
- package/dist/types/components/molecules/ManageableBreadcrumbs/organisms/ManageableBreadcrumbsProvider/styled.d.ts +276 -0
- package/dist/types/components/molecules/ManageableBreadcrumbs/{utils.d.ts → organisms/ManageableBreadcrumbsProvider/utils.d.ts} +2 -2
- package/dist/types/components/molecules/ManageableBreadcrumbs/organisms/index.d.ts +4 -0
- package/dist/types/components/molecules/ManageableSidebar/index.d.ts +2 -3
- package/dist/types/components/molecules/ManageableSidebar/organisms/ManageableSidebar/ManageableSidebar.d.ts +10 -0
- package/dist/types/components/molecules/ManageableSidebar/organisms/ManageableSidebar/index.d.ts +2 -0
- package/dist/types/components/molecules/ManageableSidebar/organisms/ManageableSidebarProvider/ManageableSidebarProvider.d.ts +15 -0
- package/dist/types/components/molecules/ManageableSidebar/organisms/ManageableSidebarProvider/index.d.ts +3 -0
- package/dist/types/components/molecules/ManageableSidebar/organisms/index.d.ts +4 -0
- package/dist/types/components/molecules/MarketPlace/atoms/AddCard/index.d.ts +1 -1
- package/dist/types/components/molecules/MarketPlace/atoms/index.d.ts +1 -1
- package/dist/types/components/molecules/MarketPlace/molecules/AddEditFormModal/index.d.ts +1 -1
- package/dist/types/components/molecules/MarketPlace/molecules/MarketplaceCard/index.d.ts +2 -1
- package/dist/types/components/molecules/MarketPlace/molecules/SearchTextInput/index.d.ts +1 -1
- package/dist/types/components/molecules/MarketPlace/molecules/index.d.ts +4 -3
- package/dist/types/components/molecules/ProjectInfoCard/molecules/DropdownAccessGroups/index.d.ts +1 -1
- package/dist/types/components/molecules/ProjectInfoCard/molecules/DropdownActions/index.d.ts +1 -1
- package/dist/types/components/molecules/ProjectInfoCard/molecules/index.d.ts +2 -2
- package/dist/types/components/molecules/Search/Search.d.ts +1 -2
- package/dist/types/components/molecules/Search/index.d.ts +1 -0
- package/dist/types/components/molecules/Terminals/NodeTerminal/molecules/XTerminal/index.d.ts +1 -1
- package/dist/types/components/molecules/Terminals/NodeTerminal/molecules/index.d.ts +1 -1
- package/dist/types/components/molecules/Terminals/PodLogs/molecules/XTerminal/index.d.ts +1 -1
- package/dist/types/components/molecules/Terminals/PodLogs/molecules/index.d.ts +1 -1
- package/dist/types/components/molecules/Terminals/PodLogsMonaco/molecules/MonacoEditor/index.d.ts +1 -1
- package/dist/types/components/molecules/Terminals/PodLogsMonaco/molecules/index.d.ts +1 -1
- package/dist/types/components/molecules/Terminals/PodTerminal/molecules/XTerminal/index.d.ts +1 -1
- package/dist/types/components/molecules/Terminals/PodTerminal/molecules/index.d.ts +1 -1
- package/dist/types/components/molecules/Terminals/index.d.ts +8 -4
- package/dist/types/components/molecules/index.d.ts +18 -9
- package/dist/types/components/organisms/DynamicComponents/molecules/Annotations/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Annotations/molecules/EditModal/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Annotations/molecules/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/AntdButton/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/AntdCard/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/AntdCol/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/AntdFlex/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/AntdLink/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/AntdRow/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/AntdTabs/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/AntdText/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/ArrayOfObjectsToKeyValues/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/ContentCard/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/ConverterBytes/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/DefaultDiv/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/EnrichedTable/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Events/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/ItemCounter/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/KeyCounter/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Labels/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Labels/molecules/EditModal/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Labels/molecules/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/LabelsToSearchParams/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/MarketplaceCard/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/MultiQuery/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/NodeTerminal/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/OwnerRefs/OwnerRefs.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/OwnerRefs/guard.d.ts +2 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/OwnerRefs/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/OwnerRefs/organsisms/RefsList/RefsList.d.ts +22 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/OwnerRefs/organsisms/RefsList/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/OwnerRefs/organsisms/RefsList/molecules/RefElement/RefElement.d.ts +21 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/OwnerRefs/organsisms/RefsList/molecules/RefElement/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/OwnerRefs/organsisms/RefsList/molecules/RefElement/utils.d.ts +5 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/OwnerRefs/organsisms/RefsList/molecules/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/OwnerRefs/types.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ParsedText/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/PartsOfUrl/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/PodLogs/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/PodTerminal/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/ProjectInfoCard/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/ResourceBadge/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/SecretBase64Plain/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/SidebarProvider/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Spacer/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/StatusText/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Taints/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Taints/molecules/EditModal/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Taints/molecules/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Tolerations/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Tolerations/molecules/EditModal/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Tolerations/molecules/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/VisibilityContainer/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/YamlEditorSingleton/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/YamlEditorSingleton/utils.d.ts +10 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/index.d.ts +37 -36
- package/dist/types/components/organisms/DynamicComponents/types.d.ts +37 -5
- package/dist/types/components/organisms/DynamicRendererWithProviders/DynamicRendererWithProviders.d.ts +2 -1
- package/dist/types/components/organisms/DynamicRendererWithProviders/hybridDataProvider.d.ts +22 -0
- package/dist/types/components/organisms/DynamicRendererWithProviders/multiK8sProvider.d.ts +22 -0
- package/dist/types/components/organisms/index.d.ts +5 -3
- package/dist/types/hooks/useApiResource.d.ts +1 -0
- package/dist/types/hooks/useBuiltinResource.d.ts +1 -0
- package/dist/types/hooks/useCrdResource.d.ts +1 -0
- package/dist/types/hooks/useK8sSmartResource.d.ts +29 -0
- package/dist/types/hooks/useK8sVerbs.d.ts +13 -0
- package/dist/types/hooks/useListThenWatch/index.d.ts +3 -0
- package/dist/types/hooks/useListThenWatch/reducer.d.ts +20 -0
- package/dist/types/hooks/useListThenWatch/types.d.ts +39 -0
- package/dist/types/hooks/useListThenWatch/useInfiniteSentinel.d.ts +2 -0
- package/dist/types/hooks/useListThenWatch/useListWatch.d.ts +72 -0
- package/dist/types/hooks/useListThenWatch/utils.d.ts +11 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/localTypes/bff/table.d.ts +1 -0
- package/dist/types/localTypes/dynamicRender.d.ts +2 -1
- package/dist/types/localTypes/k8s.d.ts +1 -0
- package/dist/types/localTypes/navigations.d.ts +24 -0
- package/dist/types/utils/createContextFactory/index.d.ts +1 -1
- package/dist/types/utils/deepMerge/index.d.ts +1 -1
- package/dist/types/utils/filterSelectOptions/index.d.ts +1 -1
- package/dist/types/utils/getAllPathsFromObj/index.d.ts +1 -1
- package/dist/types/utils/getGroupsByCategory/index.d.ts +1 -1
- package/dist/types/utils/getPrefixSubArrays/index.d.ts +1 -1
- package/dist/types/utils/getResourceLink/getResourceLink.d.ts +27 -0
- package/dist/types/utils/getResourceLink/index.d.ts +1 -0
- package/dist/types/utils/getSortedKinds/index.d.ts +1 -1
- package/dist/types/utils/getSortedKindsAll/index.d.ts +1 -1
- package/dist/types/utils/getStringByName/index.d.ts +1 -1
- package/dist/types/utils/getUppercase/index.d.ts +1 -1
- package/dist/types/utils/groupsToTreeData/index.d.ts +2 -1
- package/dist/types/utils/hslFromString/index.d.ts +1 -1
- package/dist/types/utils/index.d.ts +25 -22
- package/dist/types/utils/isFlatObject/index.d.ts +1 -1
- package/dist/types/utils/kindByGvr/index.d.ts +1 -1
- package/dist/types/utils/namespacedByGvr/index.d.ts +1 -1
- package/dist/types/utils/nestedStringsArrayInclude/index.d.ts +1 -1
- package/dist/types/utils/normalizeValuesForQuotas/index.d.ts +1 -1
- package/dist/types/utils/parseForQuotaValues/index.d.ts +1 -1
- package/dist/types/utils/pluralByKind/index.d.ts +1 -1
- package/dist/types/utils/prepareTemplate/index.d.ts +1 -1
- package/dist/types/utils/prepareUrlsToFetchForDynamicRenderer/index.d.ts +1 -1
- package/dist/types/utils/tableLocations/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeFormDataProvider/index.d.ts +0 -2
- package/dist/types/components/molecules/ManageableBreadcrumbs/ManageableBreadcrumbs.d.ts +0 -17
- package/dist/types/components/molecules/ManageableSidebar/ManageableSidebar.d.ts +0 -22
- /package/dist/types/components/molecules/ManageableBreadcrumbs/{styled.d.ts → organisms/ManageableBreadcrumbs/styled.d.ts} +0 -0
- /package/dist/types/components/molecules/ManageableBreadcrumbs/{types.d.ts → organisms/ManageableBreadcrumbsProvider/types.d.ts} +0 -0
- /package/dist/types/components/molecules/ManageableSidebar/{styled.d.ts → organisms/ManageableSidebar/styled.d.ts} +0 -0
- /package/dist/types/components/molecules/ManageableSidebar/{types.d.ts → organisms/ManageableSidebarProvider/types.d.ts} +0 -0
- /package/dist/types/components/molecules/ManageableSidebar/{utils.d.ts → organisms/ManageableSidebarProvider/utils.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { MultiQuery } from './MultiQuery';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { NodeTerminal } from './NodeTerminal';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { OwnerRefs } from './OwnerRefs';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { FlexProps } from 'antd';
|
|
3
|
+
import { TOwnerReference } from '../../types';
|
|
4
|
+
export type TRefsListProps = {
|
|
5
|
+
theme: 'dark' | 'light';
|
|
6
|
+
baseprefix?: string;
|
|
7
|
+
cluster: string;
|
|
8
|
+
refsArr: TOwnerReference[];
|
|
9
|
+
keysToForcedLabel?: string | string[];
|
|
10
|
+
forcedRelatedValuePath?: string;
|
|
11
|
+
rawObjectToFindLabel?: any;
|
|
12
|
+
jsonPathToArrayOfRefs: string;
|
|
13
|
+
forcedNamespace?: string;
|
|
14
|
+
baseFactoryNamespacedAPIKey: string;
|
|
15
|
+
baseFactoryClusterSceopedAPIKey: string;
|
|
16
|
+
baseFactoryNamespacedBuiltinKey: string;
|
|
17
|
+
baseFactoryClusterSceopedBuiltinKey: string;
|
|
18
|
+
baseNavigationPluralName: string;
|
|
19
|
+
baseNavigationSpecificName: string;
|
|
20
|
+
listFlexProps?: FlexProps;
|
|
21
|
+
};
|
|
22
|
+
export declare const RefsList: FC<TRefsListProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RefsList } from './RefsList';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { TOwnerReference } from '../../../../types';
|
|
3
|
+
type TRefElementProps = {
|
|
4
|
+
reference: TOwnerReference;
|
|
5
|
+
keysToForcedLabel?: string | string[];
|
|
6
|
+
forcedRelatedValuePath?: string;
|
|
7
|
+
rawObjectToFindLabel?: any;
|
|
8
|
+
jsonPathToArrayOfRefs: string;
|
|
9
|
+
forcedNamespace?: string;
|
|
10
|
+
theme: 'dark' | 'light';
|
|
11
|
+
baseprefix?: string;
|
|
12
|
+
cluster: string;
|
|
13
|
+
getPlural?: (kind: string, apiVersion?: string) => string | undefined;
|
|
14
|
+
baseFactoryNamespacedAPIKey: string;
|
|
15
|
+
baseFactoryClusterSceopedAPIKey: string;
|
|
16
|
+
baseFactoryNamespacedBuiltinKey: string;
|
|
17
|
+
baseFactoryClusterSceopedBuiltinKey: string;
|
|
18
|
+
baseFactoriesMapping?: Record<string, string>;
|
|
19
|
+
};
|
|
20
|
+
export declare const RefElement: FC<TRefElementProps>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RefElement } from './RefElement';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TOwnerReference } from '../../../../types';
|
|
2
|
+
type PathSeg = string | number;
|
|
3
|
+
export declare const findOwnerReferencePath: (rawObject: any, jsonPathToArrayOfRefs: string, reference: TOwnerReference) => PathSeg[] | undefined;
|
|
4
|
+
export declare const resolveFormPath: (pathInput: string | string[] | undefined, basePathForRelative: PathSeg[]) => PathSeg[];
|
|
5
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RefElement } from './RefElement';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { ParsedText } from './ParsedText';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { PartsOfUrl } from './PartsOfUrl';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { PodLogs } from './PodLogs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { PodTerminal } from './PodTerminal';
|
package/dist/types/components/organisms/DynamicComponents/molecules/ProjectInfoCard/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { ProjectInfoCard } from './ProjectInfoCard';
|
package/dist/types/components/organisms/DynamicComponents/molecules/ResourceBadge/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { ResourceBadge } from './ResourceBadge';
|
package/dist/types/components/organisms/DynamicComponents/molecules/SecretBase64Plain/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { SecretBase64Plain } from './SecretBase64Plain';
|
package/dist/types/components/organisms/DynamicComponents/molecules/SidebarProvider/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { SidebarProvider } from './SidebarProvider';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Spacer } from './Spacer';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { StatusText } from './StatusText';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Taints } from './Taints';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { EditModal } from './EditModal';
|
package/dist/types/components/organisms/DynamicComponents/molecules/Taints/molecules/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { EditModal } from './EditModal';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Tolerations } from './Tolerations';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { EditModal } from './EditModal';
|
package/dist/types/components/organisms/DynamicComponents/molecules/Tolerations/molecules/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { EditModal } from './EditModal';
|
package/dist/types/components/organisms/DynamicComponents/molecules/VisibilityContainer/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { VisibilityContainer } from './VisibilityContainer';
|
package/dist/types/components/organisms/DynamicComponents/molecules/YamlEditorSingleton/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { YamlEditorSingleton } from './YamlEditorSingleton';
|
package/dist/types/components/organisms/DynamicComponents/molecules/YamlEditorSingleton/utils.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const getDataByPath: ({ prefillValuesRaw, pathToData, }: {
|
|
2
|
+
prefillValuesRaw: unknown;
|
|
3
|
+
pathToData: string | string[];
|
|
4
|
+
}) => any;
|
|
5
|
+
export declare const getPrefillValuesWithForces: ({ prefillValues, forcedKind, apiGroup, apiVersion, }: {
|
|
6
|
+
prefillValues: any;
|
|
7
|
+
forcedKind?: string | undefined;
|
|
8
|
+
apiVersion?: string | undefined;
|
|
9
|
+
apiGroup?: string | undefined;
|
|
10
|
+
}) => any;
|
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
32
|
-
export
|
|
33
|
-
export
|
|
34
|
-
export
|
|
35
|
-
export
|
|
36
|
-
export
|
|
1
|
+
export { AntdText } from './AntdText';
|
|
2
|
+
export { AntdLink } from './AntdLink';
|
|
3
|
+
export { AntdCard } from './AntdCard';
|
|
4
|
+
export { AntdFlex } from './AntdFlex';
|
|
5
|
+
export { AntdRow } from './AntdRow';
|
|
6
|
+
export { AntdCol } from './AntdCol';
|
|
7
|
+
export { AntdTabs } from './AntdTabs';
|
|
8
|
+
export { AntdButton } from './AntdButton';
|
|
9
|
+
export { PartsOfUrl } from './PartsOfUrl';
|
|
10
|
+
export { MultiQuery } from './MultiQuery';
|
|
11
|
+
export { ParsedText } from './ParsedText';
|
|
12
|
+
export { ProjectInfoCard } from './ProjectInfoCard';
|
|
13
|
+
export { MarketplaceCard } from './MarketplaceCard';
|
|
14
|
+
export { ContentCard } from './ContentCard';
|
|
15
|
+
export { Spacer } from './Spacer';
|
|
16
|
+
export { DefaultDiv } from './DefaultDiv';
|
|
17
|
+
export { StatusText } from './StatusText';
|
|
18
|
+
export { SidebarProvider } from './SidebarProvider';
|
|
19
|
+
export { EnrichedTable } from './EnrichedTable';
|
|
20
|
+
export { PodTerminal } from './PodTerminal';
|
|
21
|
+
export { NodeTerminal } from './NodeTerminal';
|
|
22
|
+
export { PodLogs } from './PodLogs';
|
|
23
|
+
export { YamlEditorSingleton } from './YamlEditorSingleton';
|
|
24
|
+
export { VisibilityContainer } from './VisibilityContainer';
|
|
25
|
+
export { ArrayOfObjectsToKeyValues } from './ArrayOfObjectsToKeyValues';
|
|
26
|
+
export { ItemCounter } from './ItemCounter';
|
|
27
|
+
export { KeyCounter } from './KeyCounter';
|
|
28
|
+
export { Labels } from './Labels';
|
|
29
|
+
export { LabelsToSearchParams } from './LabelsToSearchParams';
|
|
30
|
+
export { Taints } from './Taints';
|
|
31
|
+
export { Tolerations } from './Tolerations';
|
|
32
|
+
export { Annotations } from './Annotations';
|
|
33
|
+
export { ConverterBytes } from './ConverterBytes';
|
|
34
|
+
export { SecretBase64Plain } from './SecretBase64Plain';
|
|
35
|
+
export { ResourceBadge } from './ResourceBadge';
|
|
36
|
+
export { Events } from './Events';
|
|
37
|
+
export { OwnerRefs } from './OwnerRefs';
|
|
@@ -2,9 +2,9 @@ import { CSSProperties } from 'react';
|
|
|
2
2
|
import { CardProps, FlexProps, RowProps, ColProps, ButtonProps, TabsProps, SelectProps } from 'antd';
|
|
3
3
|
import type { TextProps } from 'antd/es/typography/Text';
|
|
4
4
|
import type { LinkProps } from 'antd/es/typography/Link';
|
|
5
|
-
import { TContentCardProps, TSpacerProps } from '../../atoms';
|
|
6
|
-
import {
|
|
7
|
-
import { TUnitInput } from './molecules/ConverterBytes/types';
|
|
5
|
+
import type { TContentCardProps, TSpacerProps } from '../../atoms';
|
|
6
|
+
import type { TManageableSidebarProviderProps, TEnrichedTableProviderProps } from '../../molecules';
|
|
7
|
+
import type { TUnitInput } from './molecules/ConverterBytes/types';
|
|
8
8
|
export type TDynamicComponentsAppTypeMap = {
|
|
9
9
|
DefaultDiv: {
|
|
10
10
|
id: number | string;
|
|
@@ -99,10 +99,16 @@ export type TDynamicComponentsAppTypeMap = {
|
|
|
99
99
|
} & Omit<TextProps, 'id' | 'children'>;
|
|
100
100
|
SidebarProvider: {
|
|
101
101
|
id: number | string;
|
|
102
|
-
} & Omit<
|
|
102
|
+
} & Omit<TManageableSidebarProviderProps, 'replaceValues'>;
|
|
103
103
|
EnrichedTable: {
|
|
104
104
|
id: number | string;
|
|
105
|
-
fetchUrl
|
|
105
|
+
fetchUrl?: string;
|
|
106
|
+
k8sResourceToFetch?: {
|
|
107
|
+
group?: string;
|
|
108
|
+
version: string;
|
|
109
|
+
plural: string;
|
|
110
|
+
namespace?: string;
|
|
111
|
+
};
|
|
106
112
|
pathToItems: string | string[];
|
|
107
113
|
clusterNamePartOfUrl: string;
|
|
108
114
|
labelSelector?: Record<string, string>;
|
|
@@ -140,7 +146,9 @@ export type TDynamicComponentsAppTypeMap = {
|
|
|
140
146
|
apiGroup?: string;
|
|
141
147
|
apiVersion?: string;
|
|
142
148
|
typeName: string;
|
|
149
|
+
forcedKind?: string;
|
|
143
150
|
prefillValuesRequestIndex: number;
|
|
151
|
+
pathToData?: string | string[];
|
|
144
152
|
substractHeight?: number;
|
|
145
153
|
readOnly?: boolean;
|
|
146
154
|
};
|
|
@@ -321,5 +329,29 @@ export type TDynamicComponentsAppTypeMap = {
|
|
|
321
329
|
baseFactoryNamespacedBuiltinKey: string;
|
|
322
330
|
baseFactoryClusterSceopedBuiltinKey: string;
|
|
323
331
|
baseNamespaceFactoryKey: string;
|
|
332
|
+
baseNavigationPluralName: string;
|
|
333
|
+
baseNavigationSpecificName: string;
|
|
334
|
+
};
|
|
335
|
+
OwnerRefs: {
|
|
336
|
+
id: number | string;
|
|
337
|
+
baseprefix?: string;
|
|
338
|
+
clusterNamePartOfUrl: string;
|
|
339
|
+
reqIndex: string;
|
|
340
|
+
errorText: string;
|
|
341
|
+
notArrayErrorText: string;
|
|
342
|
+
emptyArrayErrorText: string;
|
|
343
|
+
isNotRefsArrayErrorText: string;
|
|
344
|
+
containerStyle?: CSSProperties;
|
|
345
|
+
listFlexProps?: FlexProps;
|
|
346
|
+
jsonPathToArrayOfRefs: string;
|
|
347
|
+
forcedNamespace?: string;
|
|
348
|
+
keysToForcedLabel?: string | string[];
|
|
349
|
+
forcedRelatedValuePath?: string;
|
|
350
|
+
baseFactoryNamespacedAPIKey: string;
|
|
351
|
+
baseFactoryClusterSceopedAPIKey: string;
|
|
352
|
+
baseFactoryNamespacedBuiltinKey: string;
|
|
353
|
+
baseFactoryClusterSceopedBuiltinKey: string;
|
|
354
|
+
baseNavigationPluralName: string;
|
|
355
|
+
baseNavigationSpecificName: string;
|
|
324
356
|
};
|
|
325
357
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { TItemTypeMap } from '../../../localTypes/dynamicRender';
|
|
3
|
+
import { TUseK8sSmartResourceParams } from '../../../hooks/useK8sSmartResource';
|
|
3
4
|
import { TDynamicRendererProps } from '../DynamicRenderer';
|
|
4
5
|
export declare const DynamicRendererWithProviders: <T extends TItemTypeMap>(props: TDynamicRendererProps<T> & {
|
|
5
|
-
urlsToFetch: string[];
|
|
6
|
+
urlsToFetch: (string | TUseK8sSmartResourceParams<any>)[];
|
|
6
7
|
dataToApplyToContext?: unknown;
|
|
7
8
|
theme: 'dark' | 'light';
|
|
8
9
|
nodeTerminalDefaultProfile?: string | undefined;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { AxiosError } from 'axios';
|
|
3
|
+
import { TUseK8sSmartResourceParams } from '../../../hooks/useK8sSmartResource';
|
|
4
|
+
type DataMap = Record<string, unknown>;
|
|
5
|
+
type MultiQueryContextValue = {
|
|
6
|
+
data: DataMap;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
isError: boolean;
|
|
9
|
+
errors: ReadonlyArray<AxiosError | Error | string | null>;
|
|
10
|
+
};
|
|
11
|
+
type MultiQueryProviderProps = {
|
|
12
|
+
/** Mixed array: first (any number of) K8s resources, then (any number of) URL strings */
|
|
13
|
+
items: ReadonlyArray<string | TUseK8sSmartResourceParams<unknown>>;
|
|
14
|
+
/** Optional short-circuit to set data.req0 directly */
|
|
15
|
+
dataToApplyToContext?: unknown;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
};
|
|
18
|
+
/** ------------------------------ Provider -------------------------------- */
|
|
19
|
+
export declare const MultiQueryProvider: FC<MultiQueryProviderProps>;
|
|
20
|
+
/** Consumer hook */
|
|
21
|
+
export declare const useMultiQuery: () => MultiQueryContextValue;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import type { AxiosError } from 'axios';
|
|
3
|
+
import { useK8sSmartResource } from '../../../hooks/useK8sSmartResource';
|
|
4
|
+
/** Reuse your hook's param type */
|
|
5
|
+
export type UseK8sSmartResourceParams<T> = Parameters<typeof useK8sSmartResource<T>>[0];
|
|
6
|
+
type DataMap = Record<string, unknown>;
|
|
7
|
+
type MultiK8sContextValue = {
|
|
8
|
+
data: DataMap;
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
isError: boolean;
|
|
11
|
+
errors: ReadonlyArray<AxiosError | Error | string | null>;
|
|
12
|
+
};
|
|
13
|
+
type MultiK8sProviderProps = {
|
|
14
|
+
resources: ReadonlyArray<UseK8sSmartResourceParams<unknown>>;
|
|
15
|
+
dataToApplyToContext?: unknown;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
};
|
|
18
|
+
/** --- Provider ----------------------------------------------------------- */
|
|
19
|
+
export declare const MultiK8sProvider: FC<MultiK8sProviderProps>;
|
|
20
|
+
/** --- Consumer Hook ------------------------------------------------------ */
|
|
21
|
+
export declare const useMultiK8s: () => MultiK8sContextValue;
|
|
22
|
+
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export { DynamicRenderer } from './DynamicRenderer';
|
|
2
|
+
export type { TDynamicRendererProps } from './DynamicRenderer';
|
|
3
|
+
export { DynamicComponents } from './DynamicComponents';
|
|
4
|
+
export type { TDynamicComponentsAppTypeMap } from './DynamicComponents';
|
|
5
|
+
export { DynamicRendererWithProviders } from './DynamicRendererWithProviders';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AxiosError } from 'axios';
|
|
2
|
+
import { TSingleResource } from '../localTypes/k8s';
|
|
3
|
+
export type TUseK8sSmartResourceParams<T> = {
|
|
4
|
+
cluster: string;
|
|
5
|
+
group?: string;
|
|
6
|
+
version: string;
|
|
7
|
+
plural: string;
|
|
8
|
+
namespace?: string;
|
|
9
|
+
fieldSelector?: string;
|
|
10
|
+
labelSelector?: string;
|
|
11
|
+
limit?: number;
|
|
12
|
+
isEnabled?: boolean;
|
|
13
|
+
listRefetchInterval?: number | false;
|
|
14
|
+
mapListWatchState?: (state: {
|
|
15
|
+
order: string[];
|
|
16
|
+
byKey: Record<string, TSingleResource>;
|
|
17
|
+
}) => T;
|
|
18
|
+
};
|
|
19
|
+
type SmartResult<T> = {
|
|
20
|
+
data: T | undefined;
|
|
21
|
+
isLoading: boolean;
|
|
22
|
+
isError: boolean;
|
|
23
|
+
error: AxiosError | Error | string | undefined;
|
|
24
|
+
_meta?: {
|
|
25
|
+
used: 'list' | 'watch' | 'disabled' | 'verbs-loading' | 'verbs-error';
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export declare const useK8sSmartResource: <T>({ cluster, group, version, plural, namespace, fieldSelector, labelSelector, isEnabled, listRefetchInterval, limit, mapListWatchState, }: TUseK8sSmartResourceParams<T>) => SmartResult<T>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const useK8sVerbs: ({ cluster, group, version, plural, isEnabled, }: {
|
|
2
|
+
cluster: string;
|
|
3
|
+
group?: string | undefined;
|
|
4
|
+
version: string;
|
|
5
|
+
plural: string;
|
|
6
|
+
isEnabled?: boolean | undefined;
|
|
7
|
+
}) => {
|
|
8
|
+
canList: boolean;
|
|
9
|
+
canWatch: boolean;
|
|
10
|
+
isError: boolean;
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
error: Error | null;
|
|
13
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TSingleResource } from '../../localTypes/k8s';
|
|
2
|
+
type TState = {
|
|
3
|
+
order: string[];
|
|
4
|
+
byKey: Record<string, TSingleResource>;
|
|
5
|
+
};
|
|
6
|
+
type TAction = {
|
|
7
|
+
type: 'RESET';
|
|
8
|
+
items: TSingleResource[];
|
|
9
|
+
} | {
|
|
10
|
+
type: 'APPEND_PAGE';
|
|
11
|
+
items: TSingleResource[];
|
|
12
|
+
} | {
|
|
13
|
+
type: 'UPSERT';
|
|
14
|
+
item: TSingleResource;
|
|
15
|
+
} | {
|
|
16
|
+
type: 'REMOVE';
|
|
17
|
+
key: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const reducer: (state: TState, action: TAction) => TState;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { TSingleResource } from '../../localTypes/k8s';
|
|
2
|
+
type TWatchPhase = 'ADDED' | 'MODIFIED' | 'DELETED' | 'BOOKMARK';
|
|
3
|
+
type TInitialFrame = {
|
|
4
|
+
type: 'INITIAL';
|
|
5
|
+
items: TSingleResource[];
|
|
6
|
+
continue?: string;
|
|
7
|
+
remainingItemCount?: number;
|
|
8
|
+
resourceVersion?: string;
|
|
9
|
+
};
|
|
10
|
+
type TPageFrame = {
|
|
11
|
+
type: 'PAGE';
|
|
12
|
+
items: TSingleResource[];
|
|
13
|
+
continue?: string;
|
|
14
|
+
remainingItemCount?: number;
|
|
15
|
+
};
|
|
16
|
+
type TPageErrorFrame = {
|
|
17
|
+
type: 'PAGE_ERROR';
|
|
18
|
+
error: string;
|
|
19
|
+
};
|
|
20
|
+
type TDeltaFrame = {
|
|
21
|
+
type: TWatchPhase;
|
|
22
|
+
item: TSingleResource;
|
|
23
|
+
};
|
|
24
|
+
type TConsoleFrame = {
|
|
25
|
+
type: 'SERVER_LOG';
|
|
26
|
+
level: 'info' | 'warn' | 'error';
|
|
27
|
+
message: string;
|
|
28
|
+
};
|
|
29
|
+
type TInitialError = {
|
|
30
|
+
type: 'INITIAL_ERROR';
|
|
31
|
+
message: string;
|
|
32
|
+
};
|
|
33
|
+
export type TServerFrame = TInitialFrame | TPageFrame | TPageErrorFrame | TDeltaFrame | TConsoleFrame | TInitialError;
|
|
34
|
+
export type TScrollMsg = {
|
|
35
|
+
type: 'SCROLL';
|
|
36
|
+
continue: string;
|
|
37
|
+
limit?: number;
|
|
38
|
+
};
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { TSingleResource } from '../../localTypes/k8s';
|
|
2
|
+
export type TConnStatus = 'connecting' | 'open' | 'closed';
|
|
3
|
+
/**
|
|
4
|
+
* Parameters that define which resource collection we are listing/watching.
|
|
5
|
+
* These map to common Kubernetes list params and discovery fields.
|
|
6
|
+
*/
|
|
7
|
+
export type TUseListWatchQuery = {
|
|
8
|
+
namespace?: string;
|
|
9
|
+
apiGroup?: string;
|
|
10
|
+
apiVersion: string;
|
|
11
|
+
plural: string;
|
|
12
|
+
fieldSelector?: string;
|
|
13
|
+
labelSelector?: string;
|
|
14
|
+
initialLimit?: number;
|
|
15
|
+
initialContinue?: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Hook configuration flags and callbacks.
|
|
19
|
+
*/
|
|
20
|
+
export type TUseListWatchOptions = {
|
|
21
|
+
/** Base WebSocket URL or path (http[s] will be auto-upgraded to ws[s]) */
|
|
22
|
+
wsUrl: string;
|
|
23
|
+
/** Page size for subsequent SCROLL requests */
|
|
24
|
+
pageSize?: number;
|
|
25
|
+
/** Temporarily pause applying ADDED/MODIFIED/DELETED updates */
|
|
26
|
+
paused?: boolean;
|
|
27
|
+
/** Skip applying DELETED events when true */
|
|
28
|
+
ignoreRemove?: boolean;
|
|
29
|
+
/** Optional connection status observer */
|
|
30
|
+
onStatus?: (s: TConnStatus) => void;
|
|
31
|
+
/** Optional error observer */
|
|
32
|
+
onError?: (msg: string) => void;
|
|
33
|
+
/** If true, auto-fetch all remaining pages after snapshot */
|
|
34
|
+
autoDrain?: boolean;
|
|
35
|
+
/** If false, reset state when URL or query changes */
|
|
36
|
+
preserveStateOnUrlChange?: boolean;
|
|
37
|
+
/** Gate the hook on/off. When false, no WebSocket is opened. */
|
|
38
|
+
isEnabled?: boolean;
|
|
39
|
+
/** What to list/watch */
|
|
40
|
+
query: TUseListWatchQuery;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Values returned from the hook for rendering and control.
|
|
44
|
+
*/
|
|
45
|
+
export type TUseListWatchReturn = {
|
|
46
|
+
state: {
|
|
47
|
+
order: string[];
|
|
48
|
+
byKey: Record<string, TSingleResource>;
|
|
49
|
+
};
|
|
50
|
+
total: number;
|
|
51
|
+
hasMore: boolean;
|
|
52
|
+
continueToken?: string;
|
|
53
|
+
status: TConnStatus;
|
|
54
|
+
lastError?: string;
|
|
55
|
+
hasInitial: boolean;
|
|
56
|
+
setPaused: (v: boolean) => void;
|
|
57
|
+
setIgnoreRemove: (v: boolean) => void;
|
|
58
|
+
/** Ask the server for the next page (if any) */
|
|
59
|
+
sendScroll: () => void;
|
|
60
|
+
/** Drain multiple pages sequentially (client-side pagination helper) */
|
|
61
|
+
drainAll: (opts?: {
|
|
62
|
+
maxPages?: number;
|
|
63
|
+
maxItems?: number;
|
|
64
|
+
}) => Promise<number>;
|
|
65
|
+
/** Manually reconnect the socket (cancels any pending auto-reconnect) */
|
|
66
|
+
reconnect: () => void;
|
|
67
|
+
/** Change the base WebSocket URL (will reconnect if enabled) */
|
|
68
|
+
setUrl: (next: string) => void;
|
|
69
|
+
/** Update the list/watch query (will reconnect if enabled) */
|
|
70
|
+
setQuery: (q: TUseListWatchQuery) => void;
|
|
71
|
+
};
|
|
72
|
+
export declare const useListWatch: ({ wsUrl, pageSize, paused, ignoreRemove, onStatus, onError, autoDrain, preserveStateOnUrlChange, isEnabled, query, }: TUseListWatchOptions) => TUseListWatchReturn;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TSingleResource } from '../../localTypes/k8s';
|
|
2
|
+
export declare const eventKey: (e: TSingleResource) => string;
|
|
3
|
+
export declare const compareRV: (a: string, b: string) => number;
|
|
4
|
+
type WithRV = {
|
|
5
|
+
metadata?: {
|
|
6
|
+
resourceVersion?: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export declare const getRV: (item: WithRV) => string | undefined;
|
|
10
|
+
export declare const getMaxRV: <T extends WithRV>(items: readonly T[]) => string | undefined;
|
|
11
|
+
export {};
|