@dovetail-v2/refine 0.3.17-alpha.0 → 0.3.17-alpha.1
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/ShowContent/fields.d.ts +2 -1
- package/dist/components/ShowContent/tabs.d.ts +7 -5
- package/dist/hooks/useEagleTable/columns.d.ts +8 -6
- package/dist/models/resource-model.d.ts +1 -1
- package/dist/pages/configmaps/index.d.ts +3 -1
- package/dist/pages/secrets/index.d.ts +3 -1
- package/dist/refine.cjs +16 -7
- package/dist/refine.js +16 -7
- package/dist/style.css +4 -1
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { StatusCapsuleColor } from '@cloudtower/eagle';
|
|
|
2
2
|
import { useTable } from '@refinedev/core';
|
|
3
3
|
import { i18n as I18nType } from 'i18next';
|
|
4
4
|
import { Unstructured } from 'k8s-api-provider';
|
|
5
|
+
import { ConfigMap, Secret } from 'kubernetes-types/core/v1';
|
|
5
6
|
import { NetworkPolicy } from 'kubernetes-types/networking/v1';
|
|
6
7
|
import React from 'react';
|
|
7
8
|
import { JobModel, ResourceModel, WorkloadModel, WorkloadBaseModel, CronJobModel, IngressModel, ServiceModel, StorageClassModel, PersistentVolumeModel, PersistentVolumeClaimModel } from '../../models';
|
|
@@ -50,7 +51,7 @@ export declare const ConditionsField: <Model extends ResourceModel<Unstructured>
|
|
|
50
51
|
export declare const NodeTaintsField: () => ShowField<ResourceModel<Node & Unstructured>>;
|
|
51
52
|
export declare const PodsField: <Model extends WorkloadBaseModel>() => ShowField<Model>;
|
|
52
53
|
export declare const JobsField: <Model extends JobModel | CronJobModel>() => ShowField<Model>;
|
|
53
|
-
export declare const DataField: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => ShowField<Model>;
|
|
54
|
+
export declare const DataField: <Model extends ResourceModel<Unstructured & (ConfigMap | Secret)>>(i18n: I18nType) => ShowField<Model>;
|
|
54
55
|
export declare const SecretDataField: <Model extends ResourceModel<Unstructured>>() => ShowField<Model>;
|
|
55
56
|
export declare const StartTimeField: (i18n: I18nType) => ShowField<JobModel>;
|
|
56
57
|
export declare const ServiceTypeField: <Model extends ServiceModel>(i18n: I18nType) => ShowField<Model>;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { i18n as I18nType } from 'i18next';
|
|
2
|
+
import { Unstructured } from 'k8s-api-provider';
|
|
3
|
+
import { ConfigMap, Secret } from 'kubernetes-types/core/v1';
|
|
2
4
|
import { ResourceModel, PodModel, ServiceModel, IngressModel } from 'src/models';
|
|
3
5
|
import { NetworkPolicyModel } from 'src/models';
|
|
4
6
|
import { ShowTab } from './fields';
|
|
5
|
-
export declare const EventsTab: <Model extends ResourceModel<
|
|
7
|
+
export declare const EventsTab: <Model extends ResourceModel<Unstructured>>({ i18n, size, }: {
|
|
6
8
|
i18n: I18nType;
|
|
7
9
|
size?: "small" | "medium" | undefined;
|
|
8
10
|
}) => ShowTab<Model>;
|
|
9
|
-
export declare const ConditionsTab: <Model extends ResourceModel<
|
|
11
|
+
export declare const ConditionsTab: <Model extends ResourceModel<Unstructured>>({ i18n, size, }: {
|
|
10
12
|
i18n: I18nType;
|
|
11
13
|
size?: "small" | "medium" | undefined;
|
|
12
14
|
}) => ShowTab<Model>;
|
|
13
|
-
export declare const LabelAnnotationsTab: <Model extends ResourceModel<
|
|
15
|
+
export declare const LabelAnnotationsTab: <Model extends ResourceModel<Unstructured>>({ i18n, size, }: {
|
|
14
16
|
i18n: I18nType;
|
|
15
17
|
size?: "small" | "medium" | undefined;
|
|
16
18
|
}) => ShowTab<Model>;
|
|
@@ -21,10 +23,10 @@ export declare const PortsTab: <Model extends ServiceModel>({ i18n, }: {
|
|
|
21
23
|
export declare const IngressRulesTab: <Model extends IngressModel>({ i18n, }: {
|
|
22
24
|
i18n: I18nType;
|
|
23
25
|
}) => ShowTab<Model>;
|
|
24
|
-
export declare const DataTab: <Model extends ResourceModel<
|
|
26
|
+
export declare const DataTab: <Model extends ResourceModel<Unstructured & (ConfigMap | Secret)>>({ i18n, }: {
|
|
25
27
|
i18n: I18nType;
|
|
26
28
|
}) => ShowTab<Model>;
|
|
27
|
-
export declare const SecretDataTab: <Model extends ResourceModel<
|
|
29
|
+
export declare const SecretDataTab: <Model extends ResourceModel<Unstructured>>({ i18n, }: {
|
|
28
30
|
i18n: I18nType;
|
|
29
31
|
}) => ShowTab<Model>;
|
|
30
32
|
export declare const NetworkPolicyIngressRulesTab: <Model extends NetworkPolicyModel>({ i18n, }: {
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { i18n as I18nType } from 'i18next';
|
|
3
|
+
import { Unstructured } from 'k8s-api-provider';
|
|
4
|
+
import { ConfigMap, Secret } from 'kubernetes-types/core/v1';
|
|
3
5
|
import { Column } from '../../components/InternalBaseTable';
|
|
4
6
|
import { JobModel, PodModel, ResourceModel, WorkloadModel, WorkloadBaseModel, CronJobModel, IngressModel, ServiceModel, DaemonSetModel, StorageClassModel, PersistentVolumeModel, PersistentVolumeClaimModel } from '../../models';
|
|
5
7
|
export declare const CommonSorter: (dataIndex: string[]) => (a: unknown, b: unknown) => 0 | 1 | -1;
|
|
6
|
-
export declare const NameColumnRenderer: <Model extends ResourceModel<
|
|
7
|
-
export declare const PlainTextNameColumnRenderer: <Model extends ResourceModel<
|
|
8
|
-
export declare const NameSpaceColumnRenderer: <Model extends ResourceModel<
|
|
8
|
+
export declare const NameColumnRenderer: <Model extends ResourceModel<Unstructured>>(i18n: I18nType, resource?: string) => Column<Model>;
|
|
9
|
+
export declare const PlainTextNameColumnRenderer: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => Column<Model>;
|
|
10
|
+
export declare const NameSpaceColumnRenderer: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => Column<Model>;
|
|
9
11
|
export declare const StateDisplayColumnRenderer: <Model extends PodModel | ServiceModel | WorkloadModel | JobModel | CronJobModel | DaemonSetModel>(i18n: I18nType) => Column<Model>;
|
|
10
12
|
export declare const WorkloadImageColumnRenderer: <Model extends WorkloadBaseModel>(i18n: I18nType) => Column<Model>;
|
|
11
13
|
export declare const RestartsColumnRenderer: <Model extends WorkloadModel>(i18n: I18nType) => Column<Model>;
|
|
12
14
|
export declare const ReplicasColumnRenderer: <Model extends WorkloadModel>(i18n: I18nType) => Column<Model>;
|
|
13
|
-
export declare const AgeColumnRenderer: <Model extends ResourceModel<
|
|
15
|
+
export declare const AgeColumnRenderer: <Model extends ResourceModel<Unstructured>>(i18n: I18nType, config?: {
|
|
14
16
|
title?: string;
|
|
15
17
|
width: number;
|
|
16
18
|
}, { isRelativeTime }?: {
|
|
@@ -19,7 +21,7 @@ export declare const AgeColumnRenderer: <Model extends ResourceModel<import("k8s
|
|
|
19
21
|
export declare const NodeNameColumnRenderer: <Model extends PodModel>(i18n: I18nType, options?: Partial<Column<Model>> | undefined) => Column<Model>;
|
|
20
22
|
export declare const PodCountOfJobColumnRenderer: <Model extends JobModel>(i18n: I18nType) => Column<Model>;
|
|
21
23
|
export declare const DurationColumnRenderer: <Model extends JobModel | CronJobModel>(i18n: I18nType) => Column<Model>;
|
|
22
|
-
export declare const ServiceTypeColumnRenderer: <Model extends ResourceModel<
|
|
24
|
+
export declare const ServiceTypeColumnRenderer: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => Column<Model>;
|
|
23
25
|
export declare function ServiceInClusterAccessTitle(): JSX.Element;
|
|
24
26
|
export declare const ServiceInClusterAccessColumnRenderer: <Model extends ServiceModel>() => Column<Model>;
|
|
25
27
|
export declare function ServiceOutClusterAccessTitle(): JSX.Element;
|
|
@@ -30,7 +32,7 @@ export declare const IngressDefaultBackendColumnRenderer: <Model extends Ingress
|
|
|
30
32
|
export declare const IngressClassColumnRenderer: <Model extends IngressModel>(i18n: I18nType) => Column<Model>;
|
|
31
33
|
export declare const IngressTlsColumnRenderer: <Model extends IngressModel>(i18n: I18nType) => Column<Model>;
|
|
32
34
|
export declare const PodContainersNumColumnRenderer: <Model extends PodModel>(i18n: I18nType) => Column<Model>;
|
|
33
|
-
export declare const DataKeysColumnRenderer: <Model extends ResourceModel<
|
|
35
|
+
export declare const DataKeysColumnRenderer: <Model extends ResourceModel<Unstructured & (ConfigMap | Secret)>>(i18n: I18nType) => Column<Model>;
|
|
34
36
|
export declare const PortMappingColumnRenderer: <Model extends ServiceModel>(i18n: I18nType) => Column<Model>;
|
|
35
37
|
export declare const ProvisionerColumnRenderer: <Model extends StorageClassModel>(i18n: I18nType) => Column<Model>;
|
|
36
38
|
export declare const PVCapacityColumnRenderer: <Model extends PersistentVolumeModel>(i18n: I18nType) => Column<Model>;
|
|
@@ -10,7 +10,7 @@ export declare class ResourceModel<T extends Unstructured = Unstructured> {
|
|
|
10
10
|
constructor(_rawYaml: T, _globalStore: GlobalStore);
|
|
11
11
|
init(): Promise<void>;
|
|
12
12
|
get name(): string | undefined;
|
|
13
|
-
get namespace(): string
|
|
13
|
+
get namespace(): string;
|
|
14
14
|
get labels(): {
|
|
15
15
|
[name: string]: string;
|
|
16
16
|
} | undefined;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { i18n } from 'i18next';
|
|
2
|
+
import { Unstructured } from 'k8s-api-provider';
|
|
3
|
+
import { ConfigMap } from 'kubernetes-types/core/v1';
|
|
2
4
|
import { ResourceModel } from '../../models';
|
|
3
5
|
import { ResourceConfig } from '../../types';
|
|
4
|
-
export declare const ConfigMapConfig: (i18n: i18n) => ResourceConfig<ResourceModel
|
|
6
|
+
export declare const ConfigMapConfig: (i18n: i18n) => ResourceConfig<ResourceModel<Unstructured & ConfigMap>>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { i18n } from 'i18next';
|
|
2
|
+
import { Unstructured } from 'k8s-api-provider';
|
|
3
|
+
import { Secret } from 'kubernetes-types/core/v1';
|
|
2
4
|
import { ResourceModel } from '../../models';
|
|
3
5
|
import { ResourceConfig } from '../../types';
|
|
4
|
-
export declare const SecretsConfig: (i18n: i18n) => ResourceConfig<ResourceModel
|
|
6
|
+
export declare const SecretsConfig: (i18n: i18n) => ResourceConfig<ResourceModel<Unstructured & Secret>>;
|
package/dist/refine.cjs
CHANGED
|
@@ -8363,7 +8363,7 @@ function useSubmitForm(options) {
|
|
|
8363
8363
|
onSubmit
|
|
8364
8364
|
};
|
|
8365
8365
|
}
|
|
8366
|
-
const
|
|
8366
|
+
const index_e7f1dg = "";
|
|
8367
8367
|
const EditButtonStyle = "esoz3jw";
|
|
8368
8368
|
function EditFieldModal(props) {
|
|
8369
8369
|
const {
|
|
@@ -8683,7 +8683,7 @@ class ResourceModel {
|
|
|
8683
8683
|
}
|
|
8684
8684
|
get namespace() {
|
|
8685
8685
|
var _a;
|
|
8686
|
-
return (_a = this._rawYaml.metadata) == null ? void 0 : _a.namespace;
|
|
8686
|
+
return ((_a = this._rawYaml.metadata) == null ? void 0 : _a.namespace) || "default";
|
|
8687
8687
|
}
|
|
8688
8688
|
get labels() {
|
|
8689
8689
|
var _a;
|
|
@@ -12603,11 +12603,15 @@ const DataField = (i18n2) => {
|
|
|
12603
12603
|
return {
|
|
12604
12604
|
key: "data",
|
|
12605
12605
|
path: ["data"],
|
|
12606
|
-
renderContent: (val) => {
|
|
12606
|
+
renderContent: (val, record) => {
|
|
12607
|
+
const finalData = {
|
|
12608
|
+
...val,
|
|
12609
|
+
..."binaryData" in record._rawYaml ? record._rawYaml.binaryData : {}
|
|
12610
|
+
};
|
|
12607
12611
|
return /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
|
|
12608
12612
|
className: "c91cpym",
|
|
12609
12613
|
children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(KeyValue, {
|
|
12610
|
-
data:
|
|
12614
|
+
data: finalData,
|
|
12611
12615
|
empty: i18n2.t("dovetail.no_resource", {
|
|
12612
12616
|
kind: i18n2.t("dovetail.data")
|
|
12613
12617
|
})
|
|
@@ -13946,7 +13950,7 @@ const ShowContentView = (props) => {
|
|
|
13946
13950
|
function renderGroup(group, isBasicGroup = false) {
|
|
13947
13951
|
let GroupContainer = React.Fragment;
|
|
13948
13952
|
let FieldContainer = React.Fragment;
|
|
13949
|
-
|
|
13953
|
+
let groupContainerProps = {
|
|
13950
13954
|
title: group.title || "",
|
|
13951
13955
|
size
|
|
13952
13956
|
};
|
|
@@ -13955,6 +13959,8 @@ const ShowContentView = (props) => {
|
|
|
13955
13959
|
GroupContainer = BasicShowGroupComponent;
|
|
13956
13960
|
} else if (group.title) {
|
|
13957
13961
|
GroupContainer = ShowGroupWithTitleComponent;
|
|
13962
|
+
} else {
|
|
13963
|
+
groupContainerProps = {};
|
|
13958
13964
|
}
|
|
13959
13965
|
const shouldRenderRow = !!(isBasicGroup || group.title);
|
|
13960
13966
|
if (shouldRenderRow) {
|
|
@@ -19493,8 +19499,11 @@ const DataKeysColumnRenderer = (i18n2) => {
|
|
|
19493
19499
|
display: true,
|
|
19494
19500
|
dataIndex: ["data"],
|
|
19495
19501
|
title: i18n2.t("dovetail.data"),
|
|
19496
|
-
render(data2) {
|
|
19497
|
-
const keys2 = Object.keys(
|
|
19502
|
+
render(data2, record) {
|
|
19503
|
+
const keys2 = Object.keys({
|
|
19504
|
+
...data2,
|
|
19505
|
+
..."binaryData" in record._rawYaml ? record._rawYaml.binaryData : {}
|
|
19506
|
+
});
|
|
19498
19507
|
return keys2.length ? keys2.map((key2) => /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.OverflowTooltip, {
|
|
19499
19508
|
content: key2
|
|
19500
19509
|
}, key2)) : /* @__PURE__ */ common.jsxRuntimeExports.jsx(ValueDisplay, {
|
package/dist/refine.js
CHANGED
|
@@ -8344,7 +8344,7 @@ function useSubmitForm(options) {
|
|
|
8344
8344
|
onSubmit
|
|
8345
8345
|
};
|
|
8346
8346
|
}
|
|
8347
|
-
const
|
|
8347
|
+
const index_e7f1dg = "";
|
|
8348
8348
|
const EditButtonStyle = "esoz3jw";
|
|
8349
8349
|
function EditFieldModal(props) {
|
|
8350
8350
|
const {
|
|
@@ -8664,7 +8664,7 @@ class ResourceModel {
|
|
|
8664
8664
|
}
|
|
8665
8665
|
get namespace() {
|
|
8666
8666
|
var _a;
|
|
8667
|
-
return (_a = this._rawYaml.metadata) == null ? void 0 : _a.namespace;
|
|
8667
|
+
return ((_a = this._rawYaml.metadata) == null ? void 0 : _a.namespace) || "default";
|
|
8668
8668
|
}
|
|
8669
8669
|
get labels() {
|
|
8670
8670
|
var _a;
|
|
@@ -12584,11 +12584,15 @@ const DataField = (i18n2) => {
|
|
|
12584
12584
|
return {
|
|
12585
12585
|
key: "data",
|
|
12586
12586
|
path: ["data"],
|
|
12587
|
-
renderContent: (val) => {
|
|
12587
|
+
renderContent: (val, record) => {
|
|
12588
|
+
const finalData = {
|
|
12589
|
+
...val,
|
|
12590
|
+
..."binaryData" in record._rawYaml ? record._rawYaml.binaryData : {}
|
|
12591
|
+
};
|
|
12588
12592
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
12589
12593
|
className: "c91cpym",
|
|
12590
12594
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValue, {
|
|
12591
|
-
data:
|
|
12595
|
+
data: finalData,
|
|
12592
12596
|
empty: i18n2.t("dovetail.no_resource", {
|
|
12593
12597
|
kind: i18n2.t("dovetail.data")
|
|
12594
12598
|
})
|
|
@@ -13927,7 +13931,7 @@ const ShowContentView = (props) => {
|
|
|
13927
13931
|
function renderGroup(group, isBasicGroup = false) {
|
|
13928
13932
|
let GroupContainer = React.Fragment;
|
|
13929
13933
|
let FieldContainer = React.Fragment;
|
|
13930
|
-
|
|
13934
|
+
let groupContainerProps = {
|
|
13931
13935
|
title: group.title || "",
|
|
13932
13936
|
size
|
|
13933
13937
|
};
|
|
@@ -13936,6 +13940,8 @@ const ShowContentView = (props) => {
|
|
|
13936
13940
|
GroupContainer = BasicShowGroupComponent;
|
|
13937
13941
|
} else if (group.title) {
|
|
13938
13942
|
GroupContainer = ShowGroupWithTitleComponent;
|
|
13943
|
+
} else {
|
|
13944
|
+
groupContainerProps = {};
|
|
13939
13945
|
}
|
|
13940
13946
|
const shouldRenderRow = !!(isBasicGroup || group.title);
|
|
13941
13947
|
if (shouldRenderRow) {
|
|
@@ -19474,8 +19480,11 @@ const DataKeysColumnRenderer = (i18n2) => {
|
|
|
19474
19480
|
display: true,
|
|
19475
19481
|
dataIndex: ["data"],
|
|
19476
19482
|
title: i18n2.t("dovetail.data"),
|
|
19477
|
-
render(data2) {
|
|
19478
|
-
const keys2 = Object.keys(
|
|
19483
|
+
render(data2, record) {
|
|
19484
|
+
const keys2 = Object.keys({
|
|
19485
|
+
...data2,
|
|
19486
|
+
..."binaryData" in record._rawYaml ? record._rawYaml.binaryData : {}
|
|
19487
|
+
});
|
|
19479
19488
|
return keys2.length ? keys2.map((key2) => /* @__PURE__ */ jsxRuntimeExports.jsx(OverflowTooltip, {
|
|
19480
19489
|
content: key2
|
|
19481
19490
|
}, key2)) : /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
package/dist/style.css
CHANGED
|
@@ -906,9 +906,12 @@
|
|
|
906
906
|
/* fisheye */
|
|
907
907
|
/* z-index */
|
|
908
908
|
.esoz3jw.ant-btn.ant-btn-link {
|
|
909
|
-
font-size:
|
|
909
|
+
font-size: 12px;
|
|
910
910
|
height: 18px;
|
|
911
911
|
margin-left: 8px;
|
|
912
|
+
}
|
|
913
|
+
.esoz3jw.ant-btn.ant-btn-link span {
|
|
914
|
+
height: 18px;
|
|
912
915
|
}/* // basic */
|
|
913
916
|
/* FishEye Color Variables and Functions */
|
|
914
917
|
/*
|