@dovetail-v2/refine 0.3.12-alpha.1 → 0.3.13-alpha.0
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/components/KeyValue/KeyValue.d.ts +2 -0
- package/dist/components/LabelsAndAnnotationsShow/index.d.ts +8 -0
- package/dist/components/ResourceSelect/index.d.ts +1 -0
- package/dist/components/ShowContent/ShowContentView.d.ts +8 -1
- package/dist/components/ShowContent/fields.d.ts +8 -4
- package/dist/components/ShowContent/groups.d.ts +1 -4
- package/dist/components/ShowContent/tabs.d.ts +25 -4
- package/dist/components/index.d.ts +1 -0
- package/dist/hooks/useEagleTable/columns.d.ts +1 -1
- package/dist/i18n.d.ts +4 -2
- package/dist/locales/en-US/index.d.ts +0 -1
- package/dist/locales/zh-CN/index.d.ts +4 -1
- package/dist/models/cronjob-model.d.ts +2 -0
- package/dist/models/ingress-model.d.ts +1 -1
- package/dist/models/job-model.d.ts +1 -0
- package/dist/refine.cjs +608 -341
- package/dist/refine.js +610 -343
- package/dist/style.css +191 -18
- package/dist/styles/show.d.ts +2 -0
- package/dist/utils/match-selector.d.ts +1 -1
- package/package.json +1 -1
- package/dist/utils/selector.d.ts +0 -3
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ErrorContentType } from 'src/components/ErrorContent';
|
|
2
3
|
export interface KeyValueProps {
|
|
3
4
|
data: Record<string, string>;
|
|
4
5
|
empty?: string;
|
|
5
6
|
hideSecret?: boolean;
|
|
7
|
+
errorContent?: ErrorContentType;
|
|
6
8
|
}
|
|
7
9
|
export declare const KeyValue: React.FC<KeyValueProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface LabelsAndAnnotationsShowProps {
|
|
3
|
+
labels: Record<string, string>;
|
|
4
|
+
annotations: Record<string, string>;
|
|
5
|
+
size?: 'small' | 'medium';
|
|
6
|
+
}
|
|
7
|
+
export declare const LabelsAndAnnotationsShow: ({ labels, annotations, size, }: LabelsAndAnnotationsShowProps) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -13,13 +13,20 @@ export type ShowContentViewProps<Model extends ResourceModel> = React.PropsWithC
|
|
|
13
13
|
canCollapseTabs?: boolean;
|
|
14
14
|
hideTopBar?: boolean;
|
|
15
15
|
className?: string;
|
|
16
|
+
size?: 'small' | 'medium';
|
|
16
17
|
}>;
|
|
17
18
|
type ShowGroupComponentProps = React.PropsWithChildren<{
|
|
18
19
|
title: string;
|
|
19
20
|
className?: string;
|
|
21
|
+
size?: 'small' | 'medium';
|
|
20
22
|
operationEle?: React.ReactElement | null;
|
|
23
|
+
[key: string]: unknown;
|
|
21
24
|
}>;
|
|
22
25
|
export declare function ShowGroupWithTitleComponent(props: ShowGroupComponentProps): JSX.Element;
|
|
23
|
-
|
|
26
|
+
type BasicShowGroupComponentProps = React.PropsWithChildren<{
|
|
27
|
+
size?: 'small' | 'medium';
|
|
28
|
+
[key: string]: unknown;
|
|
29
|
+
}>;
|
|
30
|
+
export declare function BasicShowGroupComponent(props: BasicShowGroupComponentProps): JSX.Element;
|
|
24
31
|
export declare const ShowContentView: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(props: ShowContentViewProps<Model>) => JSX.Element | null;
|
|
25
32
|
export {};
|
|
@@ -11,9 +11,9 @@ export type ShowField<Model extends ResourceModel> = {
|
|
|
11
11
|
path: string[];
|
|
12
12
|
labelWidth?: string;
|
|
13
13
|
col?: number;
|
|
14
|
-
hidden?: boolean;
|
|
15
|
-
render?: (val: unknown, record: Model, field: ShowField<Model
|
|
16
|
-
renderContent?: (val: unknown, record: Model, field: ShowField<Model
|
|
14
|
+
hidden?: boolean | ((record: Model) => boolean);
|
|
15
|
+
render?: (val: unknown, record: Model, field: ShowField<Model>, size: 'small' | 'medium') => React.ReactNode | undefined;
|
|
16
|
+
renderContent?: (val: unknown, record: Model, field: ShowField<Model>, size: 'small' | 'medium') => React.ReactNode | undefined;
|
|
17
17
|
};
|
|
18
18
|
export declare enum AreaType {
|
|
19
19
|
Inline = "Inline",
|
|
@@ -31,6 +31,7 @@ export type ShowTab<Model extends ResourceModel> = {
|
|
|
31
31
|
title: string;
|
|
32
32
|
key: string;
|
|
33
33
|
groups: ShowGroup<Model>[];
|
|
34
|
+
background?: 'white' | 'gray';
|
|
34
35
|
};
|
|
35
36
|
export interface ShowConfig<Model extends ResourceModel = ResourceModel> {
|
|
36
37
|
basicGroup?: ShowGroup<Model>;
|
|
@@ -57,7 +58,9 @@ export declare const ClusterIpField: <Model extends ServiceModel>(i18n: I18nType
|
|
|
57
58
|
export declare const SessionAffinityField: <Model extends ServiceModel>(i18n: I18nType) => ShowField<Model>;
|
|
58
59
|
export declare const ServicePodsField: <Model extends ResourceModel<Unstructured>>() => ShowField<Model>;
|
|
59
60
|
export declare const IngressRulesTableTabField: <Model extends IngressModel>() => ShowField<Model>;
|
|
60
|
-
export declare const EventsTableTabField: <Model extends ResourceModel<Unstructured>>(
|
|
61
|
+
export declare const EventsTableTabField: <Model extends ResourceModel<Unstructured>>({ size, }: {
|
|
62
|
+
size?: "small" | "medium" | undefined;
|
|
63
|
+
}) => ShowField<Model>;
|
|
61
64
|
export declare const NamespaceField: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => ShowField<Model>;
|
|
62
65
|
export declare const AgeField: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => ShowField<Model>;
|
|
63
66
|
export declare const LabelsField: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => ShowField<Model>;
|
|
@@ -83,3 +86,4 @@ export declare const IsDefaultSCField: <Model extends StorageClassModel>(i18n: I
|
|
|
83
86
|
export declare const SCReclaimPolicyField: <Model extends StorageClassModel>(i18n: I18nType) => ShowField<Model>;
|
|
84
87
|
export declare const IsSCAllowVolumeExpansionField: <Model extends StorageClassModel>(i18n: I18nType) => ShowField<Model>;
|
|
85
88
|
export declare const ResourceTableField: <Model extends ResourceModel<Unstructured>>(resource: string, useTableParams?: import("@refinedev/core").useTableProps<Model, import("@refinedev/core").HttpError, Model> | undefined) => ShowField<Model>;
|
|
89
|
+
export declare const PodCountOfJobField: <Model extends JobModel>(i18n: I18nType) => ShowField<Model>;
|
|
@@ -1,7 +1,7 @@
|
|
|
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,
|
|
4
|
+
import { ResourceModel, WorkloadBaseModel, ServiceModel, JobModel, CronJobModel, PodModel, 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;
|
|
@@ -14,12 +14,9 @@ export declare const ServicePodsGroup: <Model extends ServiceModel>() => ShowGro
|
|
|
14
14
|
export declare const PVCPodsGroup: <Model extends PersistentVolumeClaimModel>() => ShowGroup<Model>;
|
|
15
15
|
export declare const ConditionsGroup: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => ShowGroup<Model>;
|
|
16
16
|
export declare const NodeTaintsGroup: (i18n: I18nType) => ShowGroup<ResourceModel<Node & Unstructured>>;
|
|
17
|
-
export declare const SecretDataGroup: <Model extends ResourceModel<Unstructured>>() => ShowGroup<Model>;
|
|
18
17
|
export declare const JobsGroup: <Model extends JobModel | CronJobModel>() => ShowGroup<Model>;
|
|
19
|
-
export declare const IngressRulesGroup: <Model extends IngressModel>(i18n: I18nType) => ShowGroup<Model>;
|
|
20
18
|
export declare const PodSelectorGroup: <Model extends ResourceModel<Required<Unstructured & import("kubernetes-types/core/v1").Service> | (NetworkPolicy & Unstructured)>>(i18n: I18nType) => ShowGroup<Model>;
|
|
21
19
|
export declare const PortsGroup: <Model extends ServiceModel>(i18n: I18nType) => ShowGroup<Model>;
|
|
22
|
-
export declare const DataGroup: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => ShowGroup<Model>;
|
|
23
20
|
export declare const NetworkPolicyIngressRulesGroup: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => ShowGroup<Model>;
|
|
24
21
|
export declare const NetworkPolicyEgressRulesGroup: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => ShowGroup<Model>;
|
|
25
22
|
export declare const StorageClassPvGroup: <Model extends StorageClassModel>(i18n: I18nType) => ShowGroup<Model>;
|
|
@@ -1,7 +1,28 @@
|
|
|
1
1
|
import { i18n as I18nType } from 'i18next';
|
|
2
|
-
import { ResourceModel, PodModel } from 'src/models';
|
|
2
|
+
import { ResourceModel, PodModel, ServiceModel, IngressModel } from 'src/models';
|
|
3
3
|
import { ShowTab } from './fields';
|
|
4
|
-
export declare const EventsTab: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export declare const EventsTab: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>({ i18n, size, }: {
|
|
5
|
+
i18n: I18nType;
|
|
6
|
+
size?: "small" | "medium" | undefined;
|
|
7
|
+
}) => ShowTab<Model>;
|
|
8
|
+
export declare const ConditionsTab: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>({ i18n, size, }: {
|
|
9
|
+
i18n: I18nType;
|
|
10
|
+
size?: "small" | "medium" | undefined;
|
|
11
|
+
}) => ShowTab<Model>;
|
|
12
|
+
export declare const LabelAnnotationsTab: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>({ i18n, size, }: {
|
|
13
|
+
i18n: I18nType;
|
|
14
|
+
size?: "small" | "medium" | undefined;
|
|
15
|
+
}) => ShowTab<Model>;
|
|
7
16
|
export declare const PodLogTab: <Model extends PodModel>(i18n: I18nType, apiUrl: string) => ShowTab<Model>;
|
|
17
|
+
export declare const PortsTab: <Model extends ServiceModel>({ i18n, }: {
|
|
18
|
+
i18n: I18nType;
|
|
19
|
+
}) => ShowTab<Model>;
|
|
20
|
+
export declare const IngressRulesTab: <Model extends IngressModel>({ i18n, }: {
|
|
21
|
+
i18n: I18nType;
|
|
22
|
+
}) => ShowTab<Model>;
|
|
23
|
+
export declare const DataTab: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>({ i18n, }: {
|
|
24
|
+
i18n: I18nType;
|
|
25
|
+
}) => ShowTab<Model>;
|
|
26
|
+
export declare const SecretDataTab: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>({ i18n, }: {
|
|
27
|
+
i18n: I18nType;
|
|
28
|
+
}) => ShowTab<Model>;
|
|
@@ -17,7 +17,7 @@ export declare const AgeColumnRenderer: <Model extends ResourceModel<import("k8s
|
|
|
17
17
|
isRelativeTime?: boolean | undefined;
|
|
18
18
|
}) => Column<Model>;
|
|
19
19
|
export declare const NodeNameColumnRenderer: <Model extends PodModel>(i18n: I18nType, options?: Partial<Column<Model>> | undefined) => Column<Model>;
|
|
20
|
-
export declare const
|
|
20
|
+
export declare const PodCountOfJobColumnRenderer: <Model extends JobModel>(i18n: I18nType) => Column<Model>;
|
|
21
21
|
export declare const DurationColumnRenderer: <Model extends JobModel | CronJobModel>(i18n: I18nType) => Column<Model>;
|
|
22
22
|
export declare const ServiceTypeColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType) => Column<Model>;
|
|
23
23
|
export declare function ServiceInClusterAccessTitle(): JSX.Element;
|
package/dist/i18n.d.ts
CHANGED
|
@@ -109,7 +109,6 @@ export declare const resources: {
|
|
|
109
109
|
create_failed_tip: string;
|
|
110
110
|
save_failed: string;
|
|
111
111
|
save_failed_tip: string;
|
|
112
|
-
completion_num_tooltip: string;
|
|
113
112
|
ready_num_tooltip: string;
|
|
114
113
|
realtime_log: string;
|
|
115
114
|
previous_log: string;
|
|
@@ -376,7 +375,7 @@ export declare const resources: {
|
|
|
376
375
|
create_failed_tip: string;
|
|
377
376
|
save_failed: string;
|
|
378
377
|
save_failed_tip: string;
|
|
379
|
-
|
|
378
|
+
job_pod_count_tooltip: string;
|
|
380
379
|
ready_num_tooltip: string;
|
|
381
380
|
true: string;
|
|
382
381
|
false: string;
|
|
@@ -522,6 +521,9 @@ export declare const resources: {
|
|
|
522
521
|
all: string;
|
|
523
522
|
optional_with_bracket: string;
|
|
524
523
|
label_annotations: string;
|
|
524
|
+
target_service: string;
|
|
525
|
+
target_service_port: string;
|
|
526
|
+
select_workload: string;
|
|
525
527
|
};
|
|
526
528
|
};
|
|
527
529
|
};
|
|
@@ -119,7 +119,7 @@ declare const _default: {
|
|
|
119
119
|
create_failed_tip: string;
|
|
120
120
|
save_failed: string;
|
|
121
121
|
save_failed_tip: string;
|
|
122
|
-
|
|
122
|
+
job_pod_count_tooltip: string;
|
|
123
123
|
ready_num_tooltip: string;
|
|
124
124
|
true: string;
|
|
125
125
|
false: string;
|
|
@@ -265,6 +265,9 @@ declare const _default: {
|
|
|
265
265
|
all: string;
|
|
266
266
|
optional_with_bracket: string;
|
|
267
267
|
label_annotations: string;
|
|
268
|
+
target_service: string;
|
|
269
|
+
target_service_port: string;
|
|
270
|
+
select_workload: string;
|
|
268
271
|
};
|
|
269
272
|
};
|
|
270
273
|
export default _default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GlobalStore, Unstructured } from 'k8s-api-provider';
|
|
2
2
|
import { CronJob } from 'kubernetes-types/batch/v1';
|
|
3
3
|
import { ResourceState } from '../constants';
|
|
4
|
+
import { JobModel } from './job-model';
|
|
4
5
|
import { WorkloadBaseModel } from './workload-base-model';
|
|
5
6
|
type RequiredCronJob = Required<CronJob> & Unstructured;
|
|
6
7
|
export declare class CronJobModel extends WorkloadBaseModel {
|
|
@@ -11,5 +12,6 @@ export declare class CronJobModel extends WorkloadBaseModel {
|
|
|
11
12
|
get stateDisplay(): ResourceState.SUSPENDED | ResourceState.RUNNING;
|
|
12
13
|
suspend(): RequiredCronJob;
|
|
13
14
|
resume(): RequiredCronJob;
|
|
15
|
+
getJobsCountDisplay(jobs: JobModel[]): string;
|
|
14
16
|
}
|
|
15
17
|
export {};
|
|
@@ -15,6 +15,6 @@ export declare class IngressModel extends ResourceModel<IngressTypes> {
|
|
|
15
15
|
_rawYaml: IngressTypes;
|
|
16
16
|
constructor(_rawYaml: IngressTypes, _globalStore: GlobalStore);
|
|
17
17
|
private getFullPath;
|
|
18
|
-
getFlattenedRules(services
|
|
18
|
+
getFlattenedRules(services?: Service[]): RuleItem[];
|
|
19
19
|
}
|
|
20
20
|
export {};
|
|
@@ -13,6 +13,7 @@ export declare class JobModel extends WorkloadBaseModel {
|
|
|
13
13
|
private getRestarts;
|
|
14
14
|
get duration(): number;
|
|
15
15
|
get completionsDisplay(): string;
|
|
16
|
+
get podCountDisplay(): string;
|
|
16
17
|
get succeeded(): number;
|
|
17
18
|
get completions(): number | undefined;
|
|
18
19
|
get stateDisplay(): ResourceState.COMPLETED | ResourceState.ABNORMAL | ResourceState.SUSPENDED | ResourceState.RUNNING;
|