@dovetail-v2/refine 0.3.11-alpha.2 → 0.3.12-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.
@@ -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
- export declare function BasicShowGroupComponent(props: React.PropsWithChildren<unknown>): JSX.Element;
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 {};
@@ -12,8 +12,8 @@ export type ShowField<Model extends ResourceModel> = {
12
12
  labelWidth?: string;
13
13
  col?: number;
14
14
  hidden?: boolean;
15
- render?: (val: unknown, record: Model, field: ShowField<Model>) => React.ReactNode | undefined;
16
- renderContent?: (val: unknown, record: Model, field: ShowField<Model>) => React.ReactNode | undefined;
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>;
@@ -56,7 +57,9 @@ export declare const ClusterIpField: <Model extends ServiceModel>(i18n: I18nType
56
57
  export declare const SessionAffinityField: <Model extends ServiceModel>(i18n: I18nType) => ShowField<Model>;
57
58
  export declare const ServicePodsField: <Model extends ResourceModel<Unstructured>>() => ShowField<Model>;
58
59
  export declare const IngressRulesTableTabField: <Model extends IngressModel>() => ShowField<Model>;
59
- export declare const EventsTableTabField: <Model extends ResourceModel<Unstructured>>() => ShowField<Model>;
60
+ export declare const EventsTableTabField: <Model extends ResourceModel<Unstructured>>({ size, }: {
61
+ size?: "small" | "medium" | undefined;
62
+ }) => ShowField<Model>;
60
63
  export declare const NamespaceField: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => ShowField<Model>;
61
64
  export declare const AgeField: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => ShowField<Model>;
62
65
  export declare const LabelsField: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => ShowField<Model>;
@@ -82,3 +85,4 @@ export declare const IsDefaultSCField: <Model extends StorageClassModel>(i18n: I
82
85
  export declare const SCReclaimPolicyField: <Model extends StorageClassModel>(i18n: I18nType) => ShowField<Model>;
83
86
  export declare const IsSCAllowVolumeExpansionField: <Model extends StorageClassModel>(i18n: I18nType) => ShowField<Model>;
84
87
  export declare const ResourceTableField: <Model extends ResourceModel<Unstructured>>(resource: string, useTableParams?: import("@refinedev/core").useTableProps<Model, import("@refinedev/core").HttpError, Model> | undefined) => ShowField<Model>;
88
+ export declare const PodCountOfJobField: <Model extends JobModel>(i18n: I18nType) => ShowField<Model>;
@@ -1,5 +1,16 @@
1
1
  import { i18n as I18nType } from 'i18next';
2
2
  import { ResourceModel, PodModel } from 'src/models';
3
3
  import { ShowTab } from './fields';
4
- export declare const EventsTab: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType) => ShowTab<Model>;
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>;
5
16
  export declare const PodLogTab: <Model extends PodModel>(i18n: I18nType, apiUrl: string) => ShowTab<Model>;
@@ -9,6 +9,7 @@ type Props = {
9
9
  color: Record<string, StatusCapsuleColor | 'loading'>;
10
10
  text: Record<string, string>;
11
11
  };
12
+ size?: 'small' | 'medium';
12
13
  };
13
14
  export declare const StateTag: React.FC<Props>;
14
15
  export {};
@@ -5,5 +5,5 @@ type Props = {
5
5
  height?: string;
6
6
  modified: string;
7
7
  };
8
- declare const MonacoYamlDiffEditor: React.FC<Props>;
8
+ export declare const MonacoYamlDiffEditor: React.FC<Props>;
9
9
  export default MonacoYamlDiffEditor;
@@ -15,5 +15,5 @@ type Props<T extends string | Record<string, unknown> = string> = {
15
15
  schemas?: JSONSchema7[] | null;
16
16
  readOnly?: boolean;
17
17
  };
18
- declare function MonacoYamlEditor<T extends string | Record<string, unknown> = string>(props: Props<T>): JSX.Element;
18
+ export declare function MonacoYamlEditor<T extends string | Record<string, unknown> = string>(props: Props<T>): JSX.Element;
19
19
  export default MonacoYamlEditor;
@@ -1 +1,3 @@
1
1
  export * from './YamlEditorComponent';
2
+ export * from './MonacoYamlDiffEditor';
3
+ export * from './MonacoYamlEditor';
@@ -16,6 +16,7 @@ export * from './WorkloadPodsTable';
16
16
  export * from './Dropdowns/CronJobDropdown';
17
17
  export * from './Dropdowns/K8sDropdown';
18
18
  export * from './DropdownMenuItems';
19
+ export * from './EventsTable';
19
20
  export * from './ResourceUsageBar';
20
21
  export * from './WorkloadReplicas';
21
22
  export * from './CronjobJobsTable';
@@ -56,3 +57,4 @@ export * from './MatchLabelSelector';
56
57
  export * from './PortsConfigForm';
57
58
  export * from './SectionTitle';
58
59
  export * from './EditMetadataForm';
60
+ export * from './LabelsAndAnnotationsShow';
@@ -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 CompletionsCountColumnRenderer: <Model extends JobModel>(i18n: I18nType) => Column<Model>;
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;
@@ -252,6 +251,7 @@ export declare const resources: {
252
251
  name_duplicated: string;
253
252
  input_correct_port: string;
254
253
  optional_with_bracket: string;
254
+ label_annotations: string;
255
255
  };
256
256
  };
257
257
  'zh-CN': {
@@ -375,7 +375,7 @@ export declare const resources: {
375
375
  create_failed_tip: string;
376
376
  save_failed: string;
377
377
  save_failed_tip: string;
378
- completion_num_tooltip: string;
378
+ job_pod_count_tooltip: string;
379
379
  ready_num_tooltip: string;
380
380
  true: string;
381
381
  false: string;
@@ -520,6 +520,7 @@ export declare const resources: {
520
520
  node_port_duplicated: string;
521
521
  all: string;
522
522
  optional_with_bracket: string;
523
+ label_annotations: string;
523
524
  };
524
525
  };
525
526
  };
@@ -106,7 +106,6 @@ declare const _default: {
106
106
  create_failed_tip: string;
107
107
  save_failed: string;
108
108
  save_failed_tip: string;
109
- completion_num_tooltip: string;
110
109
  ready_num_tooltip: string;
111
110
  realtime_log: string;
112
111
  previous_log: string;
@@ -249,6 +248,7 @@ declare const _default: {
249
248
  name_duplicated: string;
250
249
  input_correct_port: string;
251
250
  optional_with_bracket: string;
251
+ label_annotations: string;
252
252
  };
253
253
  };
254
254
  export default _default;
@@ -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
- completion_num_tooltip: string;
122
+ job_pod_count_tooltip: string;
123
123
  ready_num_tooltip: string;
124
124
  true: string;
125
125
  false: string;
@@ -264,6 +264,7 @@ declare const _default: {
264
264
  node_port_duplicated: string;
265
265
  all: string;
266
266
  optional_with_bracket: string;
267
+ label_annotations: string;
267
268
  };
268
269
  };
269
270
  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 {};
@@ -13,5 +13,7 @@ export declare class DeploymentModel extends WorkloadModel {
13
13
  init(): Promise<void>;
14
14
  private getReplicaSets;
15
15
  get stateDisplay(): ResourceState.UPDATING | ResourceState.READY | ResourceState.STOPPED;
16
+ get revision(): string | undefined;
17
+ get currentReplicaSet(): ReplicaSetModel | undefined;
16
18
  }
17
19
  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;
@@ -12,6 +12,7 @@ export declare class ReplicaSetModel extends ResourceModel<RequiredReplicaSet> {
12
12
  constructor(_rawYaml: RequiredReplicaSet, _globalStore: GlobalStore);
13
13
  init(): Promise<void>;
14
14
  private getPods;
15
+ get revision(): string | undefined;
15
16
  get ownerDeploymentName(): string | undefined;
16
17
  }
17
18
  export {};