@dovetail-v2/refine 0.1.9 → 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-0f76e977.js → MonacoYamlDiffEditor-effbc940.js} +1 -1
- package/dist/{index-aacb414b.js → index-a2e0edc2.js} +1435 -1163
- package/dist/refine.js +207 -203
- package/dist/refine.umd.cjs +1229 -957
- 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/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 +1 -1
- package/lib/components/ResourceFiledDisplays.d.ts +2 -3
- package/lib/components/ResourceLink/index.d.ts +2 -2
- package/lib/components/ShowContent/fields.d.ts +2 -0
- package/lib/components/ShowContent/groups.d.ts +4 -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 +6 -5
- package/lib/constants/state.d.ts +8 -3
- package/lib/contexts/component.d.ts +1 -1
- package/lib/hooks/useEagleTable/columns.d.ts +2 -1
- package/lib/hooks/useEagleTable/useEagleTable.d.ts +3 -4
- package/lib/hooks/useSubmitForm.d.ts +1 -1
- package/lib/hooks/useTableData.d.ts +1 -1
- package/lib/i18n.d.ts +29 -18
- package/lib/locales/zh-CN/index.d.ts +29 -18
- 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 +2 -0
- package/lib/models/persistent-volume.d.ts +3 -0
- package/lib/models/statefulset-model.d.ts +2 -2
- package/lib/styles/tag.d.ts +1 -0
- package/lib/types/resource.d.ts +3 -3
- 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 {};
|
|
@@ -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';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PersistentVolumeClaimModel } from 'src/models';
|
|
3
3
|
interface DistributeStorageFormHandler {
|
|
4
|
-
submit: () => Promise<unknown> | undefined;
|
|
4
|
+
submit: () => Promise<unknown> | boolean | undefined;
|
|
5
5
|
}
|
|
6
6
|
interface DistributeStorageFormProps {
|
|
7
7
|
pvc: PersistentVolumeClaimModel;
|
|
@@ -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 {};
|
|
@@ -39,6 +39,7 @@ export interface ShowConfig<Model extends ResourceModel = ResourceModel> {
|
|
|
39
39
|
export declare const ImageField: <Model extends WorkloadBaseModel>(i18n: I18nType) => ShowField<Model>;
|
|
40
40
|
export declare const ReplicaField: <Model extends JobModel | WorkloadModel>() => ShowField<Model>;
|
|
41
41
|
export declare const ConditionsField: <Model extends ResourceModel<Unstructured>>() => ShowField<Model>;
|
|
42
|
+
export declare const NodeTaintsField: () => ShowField<ResourceModel<Node & Unstructured>>;
|
|
42
43
|
export declare const PodsField: <Model extends WorkloadBaseModel>() => ShowField<Model>;
|
|
43
44
|
export declare const JobsField: <Model extends JobModel | CronJobModel>() => ShowField<Model>;
|
|
44
45
|
export declare const DataField: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => ShowField<Model>;
|
|
@@ -68,6 +69,7 @@ export declare const PVStorageClassField: <Model extends PersistentVolumeModel |
|
|
|
68
69
|
export declare const PVPhaseField: <Model extends PersistentVolumeModel | PersistentVolumeClaimModel>(i18n: I18nType) => ShowField<Model>;
|
|
69
70
|
export declare const PVVolumeModeField: <Model extends PersistentVolumeModel | PersistentVolumeClaimModel>(i18n: I18nType) => ShowField<Model>;
|
|
70
71
|
export declare const PVAccessModeField: <Model extends PersistentVolumeModel | PersistentVolumeClaimModel>(i18n: I18nType) => ShowField<Model>;
|
|
72
|
+
export declare const PVCPodsField: <Model extends PersistentVolumeClaimModel>() => ShowField<Model>;
|
|
71
73
|
export declare const PVCRefField: <Model extends PersistentVolumeModel>(i18n: I18nType) => ShowField<Model>;
|
|
72
74
|
export declare const PVCSIRefField: <Model extends PersistentVolumeModel>(i18n: I18nType) => ShowField<Model>;
|
|
73
75
|
export declare const IsDefaultSCField: <Model extends StorageClassModel>(i18n: I18nType) => 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>;
|
|
@@ -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';
|
package/lib/constants/state.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export declare enum
|
|
2
|
-
|
|
1
|
+
export declare enum ResourceState {
|
|
2
|
+
TERMINATED = "terminated",
|
|
3
3
|
UPDATING = "updating",
|
|
4
4
|
READY = "ready",
|
|
5
5
|
COMPLETED = "completed",
|
|
6
|
+
ABNORMAL = "abnormal",
|
|
6
7
|
FAILED = "failed",
|
|
7
8
|
SUSPENDED = "suspended",
|
|
8
9
|
RUNNING = "running",
|
|
@@ -11,5 +12,9 @@ export declare enum WorkloadState {
|
|
|
11
12
|
TERMINATING = "terminating",
|
|
12
13
|
PENDING = "pending",
|
|
13
14
|
WAITING = "waiting",
|
|
14
|
-
STOPPED = "stopped"
|
|
15
|
+
STOPPED = "stopped",
|
|
16
|
+
AVAILABLE = "available",
|
|
17
|
+
BOUND = "bound",
|
|
18
|
+
RELEASED = "released",
|
|
19
|
+
LOST = "lost"
|
|
15
20
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import Table from 'src/components/
|
|
2
|
+
import Table from 'src/components/InternalBaseTable';
|
|
3
3
|
import { Tabs } from 'src/components/Tabs';
|
|
4
4
|
declare const ComponentContext: import("react").Context<{
|
|
5
5
|
Table?: typeof Table | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { i18n as I18nType } from 'i18next';
|
|
3
|
-
import { Column } from '../../components/
|
|
3
|
+
import { Column } from '../../components/InternalBaseTable';
|
|
4
4
|
import { JobModel, PodModel, ResourceModel, WorkloadModel, WorkloadBaseModel, CronJobModel, IngressModel, ServiceModel, DaemonSetModel, StorageClassModel, PersistentVolumeModel, PersistentVolumeClaimModel } from '../../models';
|
|
5
5
|
export declare const CommonSorter: (dataIndex: string[]) => (a: unknown, b: unknown) => 0 | 1 | -1;
|
|
6
6
|
export declare const NameColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType, resource?: string) => Column<Model>;
|
|
@@ -45,3 +45,4 @@ export declare const PVVolumeModeColumnRenderer: <Model extends PersistentVolume
|
|
|
45
45
|
export declare const PVAccessModeColumnRenderer: <Model extends PersistentVolumeModel | PersistentVolumeClaimModel>(i18n: I18nType) => Column<Model>;
|
|
46
46
|
export declare const IsDefaultSCColumnRenderer: <Model extends StorageClassModel>(i18n: I18nType) => Column<Model>;
|
|
47
47
|
export declare const SCReclaimPolicyColumnRenderer: <Model extends StorageClassModel>(i18n: I18nType) => Column<Model>;
|
|
48
|
+
export declare const SCAllowExpandColumnRenderer: <Model extends StorageClassModel>(i18n: I18nType) => Column<Model>;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { RequiredColumnProps } from '@cloudtower/eagle';
|
|
2
2
|
import { useTable } from '@refinedev/core';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { Column,
|
|
4
|
+
import { Column, InternalTableProps } from '../../components/InternalBaseTable';
|
|
5
5
|
import { ResourceModel } from '../../models';
|
|
6
6
|
type Params<Model extends ResourceModel> = {
|
|
7
7
|
useTableParams: Parameters<typeof useTable<Model>>[0];
|
|
8
|
-
resource?: string;
|
|
9
8
|
columns: Column<Model>[];
|
|
10
|
-
tableProps?: Partial<
|
|
9
|
+
tableProps?: Partial<InternalTableProps<Model>>;
|
|
11
10
|
formatter?: (d: Model) => Model;
|
|
12
11
|
Dropdown?: React.FC<{
|
|
13
12
|
record: Model;
|
|
@@ -50,7 +49,7 @@ export declare const useEagleTable: <Model extends ResourceModel<import("k8s-api
|
|
|
50
49
|
overtime: {
|
|
51
50
|
elapsedTime?: number | undefined;
|
|
52
51
|
};
|
|
53
|
-
tableProps:
|
|
52
|
+
tableProps: InternalTableProps<Model>;
|
|
54
53
|
selectedKeys: string[];
|
|
55
54
|
};
|
|
56
55
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CrudSorting } from '@refinedev/core';
|
|
3
|
-
import { Column, SorterOrder } from 'src/components/
|
|
3
|
+
import { Column, SorterOrder } from 'src/components/InternalBaseTable';
|
|
4
4
|
type UseTableDataProps<Data extends {
|
|
5
5
|
id: string;
|
|
6
6
|
}> = {
|