@dovetail-v2/refine 0.1.8 → 0.1.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/{MonacoYamlDiffEditor-1593cfad.js → MonacoYamlDiffEditor-effbc940.js} +1 -1
- package/dist/{index-45031697.js → index-a2e0edc2.js} +1440 -739
- package/dist/refine.js +216 -196
- package/dist/refine.umd.cjs +1239 -538
- package/dist/style.css +44 -44
- package/lib/components/CreateButton/index.d.ts +5 -1
- package/lib/components/DropdownMenuItems/EditNodeTaintDropdownMenuItem.d.ts +12 -0
- package/lib/components/{CronJobDropdown → Dropdowns/CronJobDropdown}/index.d.ts +1 -1
- package/lib/components/{K8sDropdown → Dropdowns/K8sDropdown}/index.d.ts +1 -1
- package/lib/components/{PodDropdown → Dropdowns/PodDropdown}/index.d.ts +1 -1
- package/lib/components/{ReplicasDropdown → Dropdowns/ReplicasDropdown}/index.d.ts +1 -1
- package/lib/components/{WorkloadDropdown → Dropdowns/WorkloadDropdown}/index.d.ts +1 -1
- package/lib/components/EditField/index.d.ts +1 -1
- package/lib/components/EditMetadataForm/EditNodeTaintForm.d.ts +12 -0
- package/lib/components/Form/YamlForm.d.ts +1 -1
- package/lib/components/Form/useReactHookForm.d.ts +2 -1
- package/lib/components/Form/useYamlForm.d.ts +1 -1
- package/lib/components/InternalBaseTable/index.d.ts +43 -0
- package/lib/components/ListPage/index.d.ts +2 -2
- package/lib/components/NodeTaintsTable/NodeTaintsTable.d.ts +7 -0
- package/lib/components/NodeTaintsTable/index.d.ts +1 -0
- package/lib/components/PVCDistributeStorage/index.d.ts +16 -0
- package/lib/components/ResourceCRUD/list/index.d.ts +2 -2
- package/lib/components/ResourceFiledDisplays.d.ts +2 -3
- package/lib/components/ResourceLink/index.d.ts +2 -2
- package/lib/components/ResourceTable/index.d.ts +9 -0
- package/lib/components/ShowContent/fields.d.ts +10 -0
- package/lib/components/ShowContent/groups.d.ts +5 -2
- package/lib/components/StateTag/StateTag.d.ts +3 -3
- package/lib/components/Table/index.d.ts +11 -43
- package/lib/components/{Table/TableToolBar.d.ts → TableToolbar/index.d.ts} +1 -0
- package/lib/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +2 -0
- package/lib/components/index.d.ts +7 -5
- package/lib/constants/k8s.d.ts +36 -1
- package/lib/constants/state.d.ts +8 -3
- package/lib/contexts/component.d.ts +1 -1
- package/lib/hooks/useEagleTable/columns.d.ts +7 -1
- package/lib/hooks/useEagleTable/useEagleTable.d.ts +3 -3
- package/lib/hooks/useSubmitForm.d.ts +1 -1
- package/lib/hooks/useTableData.d.ts +1 -1
- package/lib/i18n.d.ts +41 -20
- package/lib/locales/en-US/index.d.ts +0 -1
- package/lib/locales/zh-CN/index.d.ts +41 -19
- package/lib/models/cronjob-model.d.ts +2 -2
- package/lib/models/daemonset-model.d.ts +2 -2
- package/lib/models/deployment-model.d.ts +2 -2
- package/lib/models/job-model.d.ts +2 -2
- package/lib/models/node-model.d.ts +2 -2
- package/lib/models/persistent-volume-claim.d.ts +6 -0
- package/lib/models/persistent-volume.d.ts +7 -0
- package/lib/models/statefulset-model.d.ts +2 -2
- package/lib/models/storage-class.d.ts +4 -0
- package/lib/pages/storageclasses/index.d.ts +7 -4
- package/lib/styles/tag.d.ts +1 -0
- package/lib/types/resource.d.ts +5 -6
- package/lib/utils/storage.d.ts +13 -0
- package/package.json +1 -1
- /package/lib/components/{Table → InternalBaseTable}/TableWidgets.d.ts +0 -0
package/dist/style.css
CHANGED
|
@@ -382,7 +382,7 @@
|
|
|
382
382
|
/* box shadow */
|
|
383
383
|
/* fisheye */
|
|
384
384
|
/* z-index */
|
|
385
|
-
.
|
|
385
|
+
.a60f3dj {
|
|
386
386
|
position: absolute;
|
|
387
387
|
top: 0;
|
|
388
388
|
left: 0;
|
|
@@ -392,7 +392,7 @@
|
|
|
392
392
|
transform: translateX(-9999px);
|
|
393
393
|
z-index: 999;
|
|
394
394
|
}
|
|
395
|
-
.
|
|
395
|
+
.a60f3dj::before {
|
|
396
396
|
content: "";
|
|
397
397
|
position: absolute;
|
|
398
398
|
height: 34px;
|
|
@@ -447,16 +447,16 @@
|
|
|
447
447
|
/* box shadow */
|
|
448
448
|
/* fisheye */
|
|
449
449
|
/* z-index */
|
|
450
|
-
.
|
|
450
|
+
.t47xc8k {
|
|
451
451
|
width: 100%;
|
|
452
452
|
border-top: 1px solid rgba(211, 218, 235, 0.6);
|
|
453
453
|
display: flex;
|
|
454
454
|
flex-direction: column;
|
|
455
455
|
}
|
|
456
|
-
.
|
|
456
|
+
.t47xc8k .ant-table-pagination {
|
|
457
457
|
display: none;
|
|
458
458
|
}
|
|
459
|
-
.
|
|
459
|
+
.t47xc8k .table-container {
|
|
460
460
|
min-height: 0;
|
|
461
461
|
}/* // basic */
|
|
462
462
|
/* FishEye Color Variables and Functions */
|
|
@@ -505,8 +505,10 @@
|
|
|
505
505
|
/* box shadow */
|
|
506
506
|
/* fisheye */
|
|
507
507
|
/* z-index */
|
|
508
|
-
.
|
|
509
|
-
|
|
508
|
+
.esoz3jw.ant-btn.ant-btn-link {
|
|
509
|
+
font-size: 13px;
|
|
510
|
+
height: 18px;
|
|
511
|
+
margin-left: 8px;
|
|
510
512
|
}/* // basic */
|
|
511
513
|
/* FishEye Color Variables and Functions */
|
|
512
514
|
/*
|
|
@@ -554,23 +556,8 @@
|
|
|
554
556
|
/* box shadow */
|
|
555
557
|
/* fisheye */
|
|
556
558
|
/* z-index */
|
|
557
|
-
.
|
|
558
|
-
|
|
559
|
-
max-width: 100%;
|
|
560
|
-
gap: 8px 8px;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
.t12ikbmp.ant-tag {
|
|
564
|
-
overflow: hidden;
|
|
565
|
-
text-overflow: ellipsis;
|
|
566
|
-
color: #1D326C;
|
|
567
|
-
}
|
|
568
|
-
.t12ikbmp.ant-tag.outside-tag {
|
|
569
|
-
border: 1px solid #A3B4CC;
|
|
570
|
-
background-color: #E4E9F2;
|
|
571
|
-
}
|
|
572
|
-
.t12ikbmp.ant-tag .inside-tag {
|
|
573
|
-
background-color: #CCD4E3;
|
|
559
|
+
.b1vtjd4k.ant-btn.ant-btn-link {
|
|
560
|
+
display: block;
|
|
574
561
|
}/* // basic */
|
|
575
562
|
/* FishEye Color Variables and Functions */
|
|
576
563
|
/*
|
|
@@ -618,13 +605,23 @@
|
|
|
618
605
|
/* box shadow */
|
|
619
606
|
/* fisheye */
|
|
620
607
|
/* z-index */
|
|
621
|
-
.
|
|
622
|
-
|
|
623
|
-
|
|
608
|
+
.t13a6vox {
|
|
609
|
+
flex-wrap: wrap;
|
|
610
|
+
max-width: 100%;
|
|
611
|
+
gap: 8px 8px;
|
|
624
612
|
}
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
613
|
+
|
|
614
|
+
.t12ikbmp.ant-tag {
|
|
615
|
+
overflow: hidden;
|
|
616
|
+
text-overflow: ellipsis;
|
|
617
|
+
color: #1D326C;
|
|
618
|
+
}
|
|
619
|
+
.t12ikbmp.ant-tag.outside-tag {
|
|
620
|
+
border: 1px solid #A3B4CC;
|
|
621
|
+
background-color: #E4E9F2;
|
|
622
|
+
}
|
|
623
|
+
.t12ikbmp.ant-tag .inside-tag {
|
|
624
|
+
background-color: #CCD4E3;
|
|
628
625
|
}/* // basic */
|
|
629
626
|
/* FishEye Color Variables and Functions */
|
|
630
627
|
/*
|
|
@@ -672,11 +669,13 @@
|
|
|
672
669
|
/* box shadow */
|
|
673
670
|
/* fisheye */
|
|
674
671
|
/* z-index */
|
|
675
|
-
.
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
672
|
+
.s82411.ant-tag {
|
|
673
|
+
padding: 3px 16px;
|
|
674
|
+
height: 24px;
|
|
675
|
+
}
|
|
676
|
+
.s82411.no-background {
|
|
677
|
+
background-color: transparent !important;
|
|
678
|
+
padding: 0;
|
|
680
679
|
}/* // basic */
|
|
681
680
|
/* FishEye Color Variables and Functions */
|
|
682
681
|
/*
|
|
@@ -724,10 +723,11 @@
|
|
|
724
723
|
/* box shadow */
|
|
725
724
|
/* fisheye */
|
|
726
725
|
/* z-index */
|
|
727
|
-
.
|
|
728
|
-
|
|
729
|
-
height:
|
|
730
|
-
|
|
726
|
+
.t19ustft {
|
|
727
|
+
display: inline-block;
|
|
728
|
+
line-height: 18px;
|
|
729
|
+
height: 18px;
|
|
730
|
+
border-bottom: 1px dashed rgba(107, 128, 167, 0.6);
|
|
731
731
|
}/* // basic */
|
|
732
732
|
/* FishEye Color Variables and Functions */
|
|
733
733
|
/*
|
|
@@ -775,20 +775,20 @@
|
|
|
775
775
|
/* box shadow */
|
|
776
776
|
/* fisheye */
|
|
777
777
|
/* z-index */
|
|
778
|
-
.
|
|
778
|
+
.t1908hhn {
|
|
779
779
|
padding: 12px 24px;
|
|
780
780
|
}
|
|
781
781
|
|
|
782
|
-
.
|
|
782
|
+
.t1ym1gqo {
|
|
783
783
|
justify-content: space-between;
|
|
784
784
|
width: 100%;
|
|
785
785
|
}
|
|
786
786
|
|
|
787
|
-
.
|
|
788
|
-
color: #
|
|
787
|
+
.t38ugwl {
|
|
788
|
+
color: #00122e;
|
|
789
789
|
}
|
|
790
790
|
|
|
791
|
-
.
|
|
791
|
+
.d13nfex0 {
|
|
792
792
|
color: rgba(44, 56, 82, 0.75);
|
|
793
793
|
}/* // basic */
|
|
794
794
|
/* FishEye Color Variables and Functions */
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Unstructured } from 'k8s-api-provider';
|
|
2
|
+
import { Node } from 'kubernetes-types/core/v1';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { ResourceModel } from '../../models';
|
|
5
|
+
type EditMenuItemProps = {
|
|
6
|
+
formRef: React.MutableRefObject<{
|
|
7
|
+
submit: () => Promise<unknown> | undefined;
|
|
8
|
+
} | null>;
|
|
9
|
+
resourceModel: ResourceModel<Unstructured & Node>;
|
|
10
|
+
};
|
|
11
|
+
export declare function EditNodeTaintDropdownMenuItem(props: EditMenuItemProps): JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -4,7 +4,7 @@ export interface EditFieldModalProps {
|
|
|
4
4
|
submitting?: boolean;
|
|
5
5
|
errorMsgs?: string[];
|
|
6
6
|
formRef: React.MutableRefObject<{
|
|
7
|
-
submit: () => Promise<unknown> | undefined;
|
|
7
|
+
submit: () => Promise<unknown> | boolean | undefined;
|
|
8
8
|
} | null>;
|
|
9
9
|
renderContent: () => React.ReactNode;
|
|
10
10
|
fullscreen?: boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Unstructured } from 'k8s-api-provider';
|
|
2
|
+
import { Node } from 'kubernetes-types/core/v1';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { ResourceModel } from '../../models';
|
|
5
|
+
interface EditNodeTaintFormProps {
|
|
6
|
+
nodeModel: ResourceModel<Unstructured & Node>;
|
|
7
|
+
}
|
|
8
|
+
interface EditNodeTaintFormHandler {
|
|
9
|
+
submit: () => Promise<unknown> | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare const EditNodeTaintForm: React.ForwardRefExoticComponent<EditNodeTaintFormProps & React.RefAttributes<EditNodeTaintFormHandler>>;
|
|
12
|
+
export {};
|
|
@@ -17,7 +17,7 @@ export interface YamlFormProps {
|
|
|
17
17
|
isShowLayout?: boolean;
|
|
18
18
|
useFormProps?: Parameters<typeof useYamlForm>[0];
|
|
19
19
|
rules?: YamlFormRule[];
|
|
20
|
-
transformInitValues?: (values:
|
|
20
|
+
transformInitValues?: (values: Record<string, unknown>) => Record<string, unknown>;
|
|
21
21
|
transformApplyValues?: (values: Unstructured) => Unstructured;
|
|
22
22
|
onSaveButtonPropsChange?: (saveButtonProps: {
|
|
23
23
|
disabled?: boolean;
|
|
@@ -25,5 +25,6 @@ export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError ex
|
|
|
25
25
|
* @see {@link https://refine.dev/docs/advanced-tutorials/forms/server-side-form-validation/}
|
|
26
26
|
*/
|
|
27
27
|
disableServerSideValidation?: boolean;
|
|
28
|
+
transformApplyValues?: (values: TVariables) => TVariables;
|
|
28
29
|
} & UseHookFormProps<TVariables, TContext>;
|
|
29
|
-
export declare const useForm: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends FieldValues = FieldValues, TContext extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ refineCoreProps, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, disableServerSideValidation: disableServerSideValidationProp, ...rest }?: UseFormProps<TQueryFnData, TError, TVariables, TContext, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TContext, TData, TResponse, TResponseError>;
|
|
30
|
+
export declare const useForm: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends FieldValues = FieldValues, TContext extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ refineCoreProps, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, disableServerSideValidation: disableServerSideValidationProp, transformApplyValues, ...rest }?: UseFormProps<TQueryFnData, TError, TVariables, TContext, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TContext, TData, TResponse, TResponseError>;
|
|
@@ -25,7 +25,7 @@ export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError ex
|
|
|
25
25
|
};
|
|
26
26
|
initialValuesForCreate?: Record<string, unknown>;
|
|
27
27
|
initialValuesForEdit?: Record<string, unknown>;
|
|
28
|
-
transformInitValues?: (values:
|
|
28
|
+
transformInitValues?: (values: Record<string, unknown>) => Record<string, unknown>;
|
|
29
29
|
transformApplyValues?: (values: Unstructured) => Unstructured;
|
|
30
30
|
rules?: YamlFormRule[];
|
|
31
31
|
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { TableProps as BaseTableProps, RequiredColumnProps } from '@cloudtower/eagle';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { FormType } from 'src/types';
|
|
4
|
+
export type IDObject = {
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
export type SorterOrder = 'descend' | 'ascend' | undefined;
|
|
8
|
+
export type Column<Data extends {
|
|
9
|
+
id: string;
|
|
10
|
+
}> = RequiredColumnProps<Data> & {
|
|
11
|
+
display?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type InternalTableProps<Data extends {
|
|
14
|
+
id: string;
|
|
15
|
+
}> = {
|
|
16
|
+
tableKey: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
loading: boolean;
|
|
19
|
+
error?: boolean;
|
|
20
|
+
data: Data[];
|
|
21
|
+
total: number;
|
|
22
|
+
refetch?: () => void;
|
|
23
|
+
rowKey: (string & keyof Data) | ((record: Data) => string);
|
|
24
|
+
columns: Array<Column<Data>>;
|
|
25
|
+
scroll?: BaseTableProps<Data>['scroll'];
|
|
26
|
+
currentPage: number;
|
|
27
|
+
defaultSize: number;
|
|
28
|
+
onActive?: (key: unknown, record: Data) => void;
|
|
29
|
+
onSelect?: (keys: React.Key[], rows: Data[]) => void;
|
|
30
|
+
onPageChange: (page: number) => void;
|
|
31
|
+
onSizeChange?: (size: number) => void;
|
|
32
|
+
onSorterChange?: (order: SorterOrder | null, key?: string) => void;
|
|
33
|
+
RowMenu?: React.FC<{
|
|
34
|
+
record: Data;
|
|
35
|
+
formType?: FormType;
|
|
36
|
+
}>;
|
|
37
|
+
empty?: string;
|
|
38
|
+
showMenuColumn?: boolean;
|
|
39
|
+
};
|
|
40
|
+
declare function Table<Data extends {
|
|
41
|
+
id: string;
|
|
42
|
+
}>(props: InternalTableProps<Data>): JSX.Element;
|
|
43
|
+
export default Table;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { InternalTableProps } from 'src/components/InternalBaseTable';
|
|
3
3
|
import { ResourceModel } from '../../models';
|
|
4
4
|
interface ListPageProps<T extends ResourceModel> {
|
|
5
5
|
selectedKeys: string[];
|
|
6
|
-
tableProps:
|
|
6
|
+
tableProps: InternalTableProps<T>;
|
|
7
7
|
contentClassName?: string;
|
|
8
8
|
}
|
|
9
9
|
export declare function ListPage<T extends ResourceModel>(props: ListPageProps<T>): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './NodeTaintsTable';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PersistentVolumeClaimModel } from 'src/models';
|
|
3
|
+
interface DistributeStorageFormHandler {
|
|
4
|
+
submit: () => Promise<unknown> | boolean | undefined;
|
|
5
|
+
}
|
|
6
|
+
interface DistributeStorageFormProps {
|
|
7
|
+
pvc: PersistentVolumeClaimModel;
|
|
8
|
+
defaultValue: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const DistributeStorageForm: React.ForwardRefExoticComponent<DistributeStorageFormProps & React.RefAttributes<DistributeStorageFormHandler>>;
|
|
11
|
+
interface PVCDistributeStorageProps {
|
|
12
|
+
pvc: PersistentVolumeClaimModel;
|
|
13
|
+
editable: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare function PVCDistributeStorage({ pvc, editable }: PVCDistributeStorageProps): JSX.Element;
|
|
16
|
+
export default PVCDistributeStorage;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IResourceComponentsProps } from '@refinedev/core';
|
|
3
|
-
import { ResourceModel } from '
|
|
4
|
-
import { ResourceConfig } from '
|
|
3
|
+
import { ResourceModel } from 'src/models';
|
|
4
|
+
import { ResourceConfig } from 'src/types';
|
|
5
5
|
type Props<Model extends ResourceModel> = IResourceComponentsProps & {
|
|
6
6
|
config: ResourceConfig<Model>;
|
|
7
7
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
interface
|
|
2
|
+
interface PVVolumeModeDisplayProps {
|
|
3
3
|
value: string;
|
|
4
4
|
}
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function PVVolumeModeDisplay(props: Props): JSX.Element;
|
|
5
|
+
export declare function PVVolumeModeDisplay(props: PVVolumeModeDisplayProps): JSX.Element;
|
|
7
6
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { useTable } from '@refinedev/core';
|
|
3
|
+
import { ResourceModel } from 'src/models';
|
|
4
|
+
interface ResourceTableProps<Model extends ResourceModel> {
|
|
5
|
+
resource: string;
|
|
6
|
+
useTableParams?: Parameters<typeof useTable<Model>>[0];
|
|
7
|
+
}
|
|
8
|
+
export declare function ResourceTable<Model extends ResourceModel>(props: ResourceTableProps<Model>): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useTable } from '@refinedev/core';
|
|
1
2
|
import { i18n as I18nType } from 'i18next';
|
|
2
3
|
import { Unstructured } from 'k8s-api-provider';
|
|
3
4
|
import { NetworkPolicy } from 'kubernetes-types/networking/v1';
|
|
@@ -38,6 +39,7 @@ export interface ShowConfig<Model extends ResourceModel = ResourceModel> {
|
|
|
38
39
|
export declare const ImageField: <Model extends WorkloadBaseModel>(i18n: I18nType) => ShowField<Model>;
|
|
39
40
|
export declare const ReplicaField: <Model extends JobModel | WorkloadModel>() => ShowField<Model>;
|
|
40
41
|
export declare const ConditionsField: <Model extends ResourceModel<Unstructured>>() => ShowField<Model>;
|
|
42
|
+
export declare const NodeTaintsField: () => ShowField<ResourceModel<Node & Unstructured>>;
|
|
41
43
|
export declare const PodsField: <Model extends WorkloadBaseModel>() => ShowField<Model>;
|
|
42
44
|
export declare const JobsField: <Model extends JobModel | CronJobModel>() => ShowField<Model>;
|
|
43
45
|
export declare const DataField: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => ShowField<Model>;
|
|
@@ -62,7 +64,15 @@ export declare const StorageClassProvisionerField: <Model extends StorageClassMo
|
|
|
62
64
|
export declare const StorageClassPvField: <Model extends StorageClassModel>() => ShowField<Model>;
|
|
63
65
|
export declare const PVCapacityField: <Model extends PersistentVolumeModel>(i18n: I18nType) => ShowField<Model>;
|
|
64
66
|
export declare const PVCStorageField: <Model extends PersistentVolumeClaimModel>(i18n: I18nType) => ShowField<Model>;
|
|
67
|
+
export declare const PVRefField: <Model extends PersistentVolumeClaimModel>(i18n: I18nType) => ShowField<Model>;
|
|
65
68
|
export declare const PVStorageClassField: <Model extends PersistentVolumeModel | PersistentVolumeClaimModel>(i18n: I18nType) => ShowField<Model>;
|
|
66
69
|
export declare const PVPhaseField: <Model extends PersistentVolumeModel | PersistentVolumeClaimModel>(i18n: I18nType) => ShowField<Model>;
|
|
67
70
|
export declare const PVVolumeModeField: <Model extends PersistentVolumeModel | PersistentVolumeClaimModel>(i18n: I18nType) => ShowField<Model>;
|
|
68
71
|
export declare const PVAccessModeField: <Model extends PersistentVolumeModel | PersistentVolumeClaimModel>(i18n: I18nType) => ShowField<Model>;
|
|
72
|
+
export declare const PVCPodsField: <Model extends PersistentVolumeClaimModel>() => ShowField<Model>;
|
|
73
|
+
export declare const PVCRefField: <Model extends PersistentVolumeModel>(i18n: I18nType) => ShowField<Model>;
|
|
74
|
+
export declare const PVCSIRefField: <Model extends PersistentVolumeModel>(i18n: I18nType) => ShowField<Model>;
|
|
75
|
+
export declare const IsDefaultSCField: <Model extends StorageClassModel>(i18n: I18nType) => ShowField<Model>;
|
|
76
|
+
export declare const SCReclaimPolicyField: <Model extends StorageClassModel>(i18n: I18nType) => ShowField<Model>;
|
|
77
|
+
export declare const IsSCAllowVolumeExpansionField: <Model extends StorageClassModel>(i18n: I18nType) => ShowField<Model>;
|
|
78
|
+
export declare const ResourceTableField: <Model extends ResourceModel<Unstructured>>(resource: string, useTableParams?: import("@refinedev/core").useTableProps<Model, import("@refinedev/core").HttpError, Model> | undefined) => ShowField<Model>;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { i18n as I18nType } from 'i18next';
|
|
2
2
|
import { Unstructured } from 'k8s-api-provider';
|
|
3
3
|
import { NetworkPolicy } from 'kubernetes-types/networking/v1';
|
|
4
|
-
import { ResourceModel, WorkloadBaseModel, ServiceModel, JobModel, CronJobModel, PodModel, IngressModel, StorageClassModel } from 'src/models';
|
|
4
|
+
import { ResourceModel, WorkloadBaseModel, ServiceModel, JobModel, CronJobModel, PodModel, IngressModel, StorageClassModel, PersistentVolumeClaimModel } from 'src/models';
|
|
5
5
|
import { ShowField, ShowArea, ShowGroup } from './fields';
|
|
6
6
|
export declare const BasicGroup: <Model extends ResourceModel<Unstructured>>(i18n: I18nType, { upAreas, downAreas, basicFields, }?: {
|
|
7
7
|
upAreas?: ShowArea<Model>[] | undefined;
|
|
8
8
|
downAreas?: ShowArea<Model>[] | undefined;
|
|
9
9
|
basicFields?: ShowField<Model>[] | undefined;
|
|
10
|
-
}) => ShowGroup<Model>;
|
|
10
|
+
}, isShowNamespace?: boolean) => ShowGroup<Model>;
|
|
11
11
|
export declare const PodsGroup: <Model extends WorkloadBaseModel>() => ShowGroup<Model>;
|
|
12
12
|
export declare const PodContainersGroup: <Model extends PodModel>(i18n: I18nType) => ShowGroup<Model>;
|
|
13
13
|
export declare const ServicePodsGroup: <Model extends ServiceModel>() => ShowGroup<Model>;
|
|
14
|
+
export declare const PVCPodsGroup: <Model extends PersistentVolumeClaimModel>() => ShowGroup<Model>;
|
|
14
15
|
export declare const ConditionsGroup: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => ShowGroup<Model>;
|
|
16
|
+
export declare const NodeTaintsGroup: (i18n: I18nType) => ShowGroup<ResourceModel<Node & Unstructured>>;
|
|
15
17
|
export declare const SecretDataGroup: <Model extends ResourceModel<Unstructured>>() => ShowGroup<Model>;
|
|
16
18
|
export declare const JobsGroup: <Model extends JobModel | CronJobModel>() => ShowGroup<Model>;
|
|
17
19
|
export declare const IngressRulesGroup: <Model extends IngressModel>(i18n: I18nType) => ShowGroup<Model>;
|
|
@@ -21,3 +23,4 @@ export declare const DataGroup: <Model extends ResourceModel<Unstructured>>(i18n
|
|
|
21
23
|
export declare const NetworkPolicyIngressRulesGroup: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => ShowGroup<Model>;
|
|
22
24
|
export declare const NetworkPolicyEgressRulesGroup: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => ShowGroup<Model>;
|
|
23
25
|
export declare const StorageClassPvGroup: <Model extends StorageClassModel>(i18n: I18nType) => ShowGroup<Model>;
|
|
26
|
+
export declare const ResourceTableGroup: <Model extends StorageClassModel>(resource: string, title: string) => ShowGroup<Model>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export declare const StateTagStyle: import("@linaria/core").LinariaClassName;
|
|
2
|
+
import { ResourceState } from '../../constants';
|
|
4
3
|
type Props = {
|
|
5
|
-
state?:
|
|
4
|
+
state?: ResourceState;
|
|
5
|
+
resourceKind?: string;
|
|
6
6
|
className?: string;
|
|
7
7
|
hideBackground?: boolean;
|
|
8
8
|
};
|
|
@@ -1,43 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
export type TableProps<Data extends {
|
|
14
|
-
id: string;
|
|
15
|
-
}> = {
|
|
16
|
-
tableKey: string;
|
|
17
|
-
className?: string;
|
|
18
|
-
loading: boolean;
|
|
19
|
-
error?: boolean;
|
|
20
|
-
data: Data[];
|
|
21
|
-
total: number;
|
|
22
|
-
refetch?: () => void;
|
|
23
|
-
rowKey: (string & keyof Data) | ((record: Data) => string);
|
|
24
|
-
columns: Array<Column<Data>>;
|
|
25
|
-
scroll?: BaseTableProps<Data>['scroll'];
|
|
26
|
-
currentPage: number;
|
|
27
|
-
defaultSize: number;
|
|
28
|
-
onActive?: (key: unknown, record: Data) => void;
|
|
29
|
-
onSelect?: (keys: React.Key[], rows: Data[]) => void;
|
|
30
|
-
onPageChange: (page: number) => void;
|
|
31
|
-
onSizeChange?: (size: number) => void;
|
|
32
|
-
onSorterChange?: (order: SorterOrder | null, key?: string) => void;
|
|
33
|
-
RowMenu?: React.FC<{
|
|
34
|
-
record: Data;
|
|
35
|
-
formType?: FormType;
|
|
36
|
-
}>;
|
|
37
|
-
empty?: string;
|
|
38
|
-
showMenuColumn?: boolean;
|
|
39
|
-
};
|
|
40
|
-
declare function Table<Data extends {
|
|
41
|
-
id: string;
|
|
42
|
-
}>(props: TableProps<Data>): JSX.Element;
|
|
43
|
-
export default Table;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { WidgetErrorContentProps } from 'src/components/ErrorContent';
|
|
3
|
+
import { InternalTableProps } from 'src/components/InternalBaseTable';
|
|
4
|
+
import { ResourceModel } from 'src/models';
|
|
5
|
+
interface TableProps<Model extends ResourceModel> {
|
|
6
|
+
tableProps: InternalTableProps<Model>;
|
|
7
|
+
displayName: string;
|
|
8
|
+
errorContentProps?: WidgetErrorContentProps;
|
|
9
|
+
}
|
|
10
|
+
export declare function Table<Model extends ResourceModel>(props: TableProps<Model>): JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { LabelSelector } from 'kubernetes-types/meta/v1';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { PodModel } from '../../models';
|
|
3
4
|
interface WorkloadPodsTableProps {
|
|
4
5
|
namespace?: string;
|
|
5
6
|
selector?: LabelSelector;
|
|
7
|
+
filter?: (item: PodModel) => boolean;
|
|
6
8
|
hideToolbar?: boolean;
|
|
7
9
|
}
|
|
8
10
|
export declare const WorkloadPodsTable: React.FC<WorkloadPodsTableProps>;
|
|
@@ -6,15 +6,15 @@ export * from './ConditionsTable';
|
|
|
6
6
|
export * from './FormLayout';
|
|
7
7
|
export * from './FormErrorAlert';
|
|
8
8
|
export * from './PodContainersTable';
|
|
9
|
-
export * from './WorkloadDropdown';
|
|
10
|
-
export * from './ReplicasDropdown';
|
|
11
|
-
export * from './PodDropdown';
|
|
9
|
+
export * from './Dropdowns/WorkloadDropdown';
|
|
10
|
+
export * from './Dropdowns/ReplicasDropdown';
|
|
11
|
+
export * from './Dropdowns/PodDropdown';
|
|
12
12
|
export * from './CreateButton';
|
|
13
13
|
export * from './ImageNames';
|
|
14
14
|
export * from './ResourceCRUD';
|
|
15
15
|
export * from './WorkloadPodsTable';
|
|
16
|
-
export * from './CronJobDropdown';
|
|
17
|
-
export * from './K8sDropdown';
|
|
16
|
+
export * from './Dropdowns/CronJobDropdown';
|
|
17
|
+
export * from './Dropdowns/K8sDropdown';
|
|
18
18
|
export * from './DropdownMenuItems';
|
|
19
19
|
export * from './ResourceUsageBar';
|
|
20
20
|
export * from './WorkloadReplicas';
|
|
@@ -30,6 +30,7 @@ export * from './ListPage';
|
|
|
30
30
|
export * from './StateTag';
|
|
31
31
|
export * from './DrawerShow';
|
|
32
32
|
export * from './Menu';
|
|
33
|
+
export * from './InternalBaseTable';
|
|
33
34
|
export * from './Table';
|
|
34
35
|
export * from './EditButton';
|
|
35
36
|
export * from './ReferenceLink';
|
|
@@ -47,3 +48,4 @@ export * as ValueDisplay from './ValueDisplay';
|
|
|
47
48
|
export * from './ResourceSelect';
|
|
48
49
|
export * from './Shell';
|
|
49
50
|
export * from './PodShellModal';
|
|
51
|
+
export * from './ResourceTable';
|
package/lib/constants/k8s.d.ts
CHANGED
|
@@ -477,11 +477,46 @@ export declare const NODE_INIT_VALUE: {
|
|
|
477
477
|
spec: {};
|
|
478
478
|
};
|
|
479
479
|
export declare const STORAGE_CLASS_INIT_VALUE: {
|
|
480
|
+
apiVersion: string;
|
|
481
|
+
kind: string;
|
|
482
|
+
metadata: {
|
|
483
|
+
name: string;
|
|
484
|
+
};
|
|
485
|
+
parameters: {};
|
|
486
|
+
provisioner: string;
|
|
487
|
+
reclaimPolicy: string;
|
|
488
|
+
allowVolumeExpansion: boolean;
|
|
489
|
+
volumeBindingMode: string;
|
|
490
|
+
};
|
|
491
|
+
export declare const PV_INIT_VALUE: {
|
|
492
|
+
apiVersion: string;
|
|
493
|
+
kind: string;
|
|
494
|
+
metadata: {
|
|
495
|
+
name: string;
|
|
496
|
+
};
|
|
497
|
+
spec: {
|
|
498
|
+
accessModes: string[];
|
|
499
|
+
capacity: {
|
|
500
|
+
storage: string;
|
|
501
|
+
};
|
|
502
|
+
persistentVolumeReclaimPolicy: string;
|
|
503
|
+
volumeMode: string;
|
|
504
|
+
};
|
|
505
|
+
};
|
|
506
|
+
export declare const PVC_INIT_VALUE: {
|
|
480
507
|
apiVersion: string;
|
|
481
508
|
kind: string;
|
|
482
509
|
metadata: {
|
|
483
510
|
name: string;
|
|
484
511
|
namespace: string;
|
|
485
512
|
};
|
|
486
|
-
spec: {
|
|
513
|
+
spec: {
|
|
514
|
+
accessModes: string[];
|
|
515
|
+
resources: {
|
|
516
|
+
requests: {
|
|
517
|
+
storage: string;
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
storageClassName: string;
|
|
521
|
+
};
|
|
487
522
|
};
|