@dovetail-v2/refine 0.3.16-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/ErrorContent/index.d.ts +2 -1
- package/dist/components/ShowContent/fields.d.ts +2 -1
- package/dist/components/ShowContent/tabs.d.ts +7 -5
- package/dist/components/YamlEditor/YamlEditorComponent.d.ts +1 -0
- package/dist/hooks/useEagleTable/columns.d.ts +8 -6
- package/dist/i18n.d.ts +2 -0
- package/dist/locales/zh-CN/index.d.ts +2 -0
- 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 +74 -35
- package/dist/refine.js +75 -36
- package/dist/style.css +7 -1
- package/package.json +1 -1
|
@@ -4,7 +4,8 @@ export declare const ErrorContent: import("@linaria/react").StyledComponent<Reac
|
|
|
4
4
|
export declare enum ErrorContentType {
|
|
5
5
|
List = "list",
|
|
6
6
|
Card = "card",
|
|
7
|
-
Widget = "widget"
|
|
7
|
+
Widget = "widget",
|
|
8
|
+
Item = "item"
|
|
8
9
|
}
|
|
9
10
|
export type WidgetErrorContentProps = {
|
|
10
11
|
className?: string;
|
|
@@ -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, }: {
|
|
@@ -16,6 +16,7 @@ export type YamlEditorProps<T extends string | Record<string, unknown> = string>
|
|
|
16
16
|
readOnly?: boolean;
|
|
17
17
|
debounceTime?: number;
|
|
18
18
|
isScrollOnFocus?: boolean;
|
|
19
|
+
isHideActions?: boolean;
|
|
19
20
|
onChange?: (value: T) => void;
|
|
20
21
|
onValidate?: (valid: boolean, schemaValid: boolean) => void;
|
|
21
22
|
onEditorCreate?: (editor: editor.IStandaloneCodeEditor) => void;
|
|
@@ -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>;
|
package/dist/i18n.d.ts
CHANGED
|
@@ -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
|
@@ -1230,6 +1230,8 @@ const target_service_port = "目标服务端口";
|
|
|
1230
1230
|
const select_workload = "选择工作负载";
|
|
1231
1231
|
const no_search_result = "无搜索结果";
|
|
1232
1232
|
const clear_search_condition = "清空搜索条件";
|
|
1233
|
+
const no_labels = "无标签";
|
|
1234
|
+
const no_annotations = "无注解";
|
|
1233
1235
|
const dovetail = {
|
|
1234
1236
|
copy,
|
|
1235
1237
|
reset_arguments,
|
|
@@ -1501,7 +1503,9 @@ const dovetail = {
|
|
|
1501
1503
|
target_service_port,
|
|
1502
1504
|
select_workload,
|
|
1503
1505
|
no_search_result,
|
|
1504
|
-
clear_search_condition
|
|
1506
|
+
clear_search_condition,
|
|
1507
|
+
no_labels,
|
|
1508
|
+
no_annotations
|
|
1505
1509
|
};
|
|
1506
1510
|
const ZH = {
|
|
1507
1511
|
dovetail
|
|
@@ -7953,7 +7957,7 @@ var styled_default = process.env.NODE_ENV !== "production" ? new Proxy(styled, {
|
|
|
7953
7957
|
return o(prop);
|
|
7954
7958
|
}
|
|
7955
7959
|
}) : styled;
|
|
7956
|
-
const
|
|
7960
|
+
const index_l4xyq7 = "";
|
|
7957
7961
|
const ErrorWrapper = /* @__PURE__ */ styled_default("div")({
|
|
7958
7962
|
name: "ErrorWrapper",
|
|
7959
7963
|
class: "egn3dbn",
|
|
@@ -7968,6 +7972,7 @@ var ErrorContentType = /* @__PURE__ */ ((ErrorContentType2) => {
|
|
|
7968
7972
|
ErrorContentType2["List"] = "list";
|
|
7969
7973
|
ErrorContentType2["Card"] = "card";
|
|
7970
7974
|
ErrorContentType2["Widget"] = "widget";
|
|
7975
|
+
ErrorContentType2["Item"] = "item";
|
|
7971
7976
|
return ErrorContentType2;
|
|
7972
7977
|
})(ErrorContentType || {});
|
|
7973
7978
|
const WidgetErrorContent = (props) => {
|
|
@@ -7982,18 +7987,26 @@ const WidgetErrorContent = (props) => {
|
|
|
7982
7987
|
t: t2
|
|
7983
7988
|
} = common.useTranslation();
|
|
7984
7989
|
const fontMap = {
|
|
7990
|
+
// 小卡片
|
|
7985
7991
|
[
|
|
7986
7992
|
"widget"
|
|
7987
7993
|
/* Widget */
|
|
7988
7994
|
]: eagle.Typo.Label.l1_regular_title,
|
|
7995
|
+
// 详情里整个大卡片
|
|
7989
7996
|
[
|
|
7990
7997
|
"card"
|
|
7991
7998
|
/* Card */
|
|
7992
7999
|
]: eagle.Typo.Label.l1_bold,
|
|
8000
|
+
// 列表
|
|
7993
8001
|
[
|
|
7994
8002
|
"list"
|
|
7995
8003
|
/* List */
|
|
7996
|
-
]: eagle.Typo.Display.d2_bold_title
|
|
8004
|
+
]: eagle.Typo.Display.d2_bold_title,
|
|
8005
|
+
// 详情里的某一项
|
|
8006
|
+
[
|
|
8007
|
+
"item"
|
|
8008
|
+
/* Item */
|
|
8009
|
+
]: eagle.Typo.Heading.h2_bold_title
|
|
7997
8010
|
};
|
|
7998
8011
|
return /* @__PURE__ */ common.jsxRuntimeExports.jsx(ErrorWrapper, {
|
|
7999
8012
|
className: common.cx_default(props.className, type2),
|
|
@@ -8350,7 +8363,7 @@ function useSubmitForm(options) {
|
|
|
8350
8363
|
onSubmit
|
|
8351
8364
|
};
|
|
8352
8365
|
}
|
|
8353
|
-
const
|
|
8366
|
+
const index_e7f1dg = "";
|
|
8354
8367
|
const EditButtonStyle = "esoz3jw";
|
|
8355
8368
|
function EditFieldModal(props) {
|
|
8356
8369
|
const {
|
|
@@ -8670,7 +8683,7 @@ class ResourceModel {
|
|
|
8670
8683
|
}
|
|
8671
8684
|
get namespace() {
|
|
8672
8685
|
var _a;
|
|
8673
|
-
return (_a = this._rawYaml.metadata) == null ? void 0 : _a.namespace;
|
|
8686
|
+
return ((_a = this._rawYaml.metadata) == null ? void 0 : _a.namespace) || "default";
|
|
8674
8687
|
}
|
|
8675
8688
|
get labels() {
|
|
8676
8689
|
var _a;
|
|
@@ -9699,8 +9712,8 @@ class PodModel extends WorkloadBaseModel {
|
|
|
9699
9712
|
return this.ips.join(", ");
|
|
9700
9713
|
}
|
|
9701
9714
|
get hasDnsConfig() {
|
|
9702
|
-
var _a, _b, _c, _d;
|
|
9703
|
-
return !!(((_a = this.spec) == null ? void 0 : _a.dnsConfig) && (((_b = this.spec.dnsConfig.nameservers) == null ? void 0 : _b.length) || ((_c = this.spec.dnsConfig.searches) == null ? void 0 : _c.length) || ((_d = this.spec.dnsConfig.options) == null ? void 0 : _d.length)));
|
|
9715
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
9716
|
+
return !!(((_a = this.spec) == null ? void 0 : _a.dnsConfig) && (((_b = this.spec.dnsConfig.nameservers) == null ? void 0 : _b.length) || ((_c = this.spec.dnsConfig.searches) == null ? void 0 : _c.length) || ((_d = this.spec.dnsConfig.options) == null ? void 0 : _d.length)) || ((_e = this.spec) == null ? void 0 : _e.dnsPolicy) || ((_g = (_f = this.spec) == null ? void 0 : _f.hostAliases) == null ? void 0 : _g.length));
|
|
9704
9717
|
}
|
|
9705
9718
|
}
|
|
9706
9719
|
class PodMetricsModel extends ResourceModel {
|
|
@@ -10390,7 +10403,14 @@ const ConditionsTable = ({ conditions = [] }) => {
|
|
|
10390
10403
|
width: 120,
|
|
10391
10404
|
sortable: true,
|
|
10392
10405
|
render: (value2) => {
|
|
10393
|
-
return
|
|
10406
|
+
return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
|
|
10407
|
+
eagle.StatusCapsule,
|
|
10408
|
+
{
|
|
10409
|
+
color: value2 === "True" ? "green" : "red",
|
|
10410
|
+
className: common.cx_default(StateTagStyle, "no-background"),
|
|
10411
|
+
children: value2 === "True" ? t2("dovetail.true") : t2("dovetail.false")
|
|
10412
|
+
}
|
|
10413
|
+
);
|
|
10394
10414
|
}
|
|
10395
10415
|
},
|
|
10396
10416
|
{
|
|
@@ -10789,7 +10809,7 @@ function validateNodePort(nodePort, allNodePorts, i18n2) {
|
|
|
10789
10809
|
return { isValid: true };
|
|
10790
10810
|
}
|
|
10791
10811
|
function K8sDropdown(props) {
|
|
10792
|
-
var _a;
|
|
10812
|
+
var _a, _b;
|
|
10793
10813
|
const { record, size = "normal", customButton } = props;
|
|
10794
10814
|
const globalStore = useGlobalStore();
|
|
10795
10815
|
const useResourceResult = core.useResource();
|
|
@@ -10800,7 +10820,7 @@ function K8sDropdown(props) {
|
|
|
10800
10820
|
const { openDeleteConfirmModal } = useDeleteModal({ resourceName: resourceName || "" });
|
|
10801
10821
|
const download2 = useDownloadYAML();
|
|
10802
10822
|
const openForm = useOpenForm();
|
|
10803
|
-
const isInShowPage = useResourceResult.action === "show";
|
|
10823
|
+
const isInShowPage = useResourceResult.action === "show" && ((_a = useResourceResult.resource) == null ? void 0 : _a.name) === config.name;
|
|
10804
10824
|
const { data: canEditData } = core.useCan({
|
|
10805
10825
|
resource: resourceName,
|
|
10806
10826
|
action: AccessControlAuth.Edit,
|
|
@@ -10815,7 +10835,7 @@ function K8sDropdown(props) {
|
|
|
10815
10835
|
namespace: record.namespace
|
|
10816
10836
|
}
|
|
10817
10837
|
});
|
|
10818
|
-
const formType = ((
|
|
10838
|
+
const formType = ((_b = config.formConfig) == null ? void 0 : _b.formType) || FormType.FORM;
|
|
10819
10839
|
return /* @__PURE__ */ common.jsxRuntimeExports.jsx(common.jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(
|
|
10820
10840
|
eagle.Dropdown,
|
|
10821
10841
|
{
|
|
@@ -11453,16 +11473,21 @@ const KeyValue = (props) => {
|
|
|
11453
11473
|
const {
|
|
11454
11474
|
t: t2
|
|
11455
11475
|
} = common.useTranslation();
|
|
11456
|
-
const result = Object.keys(data2).map((key2) =>
|
|
11457
|
-
|
|
11458
|
-
|
|
11459
|
-
className:
|
|
11460
|
-
children:
|
|
11461
|
-
|
|
11462
|
-
|
|
11463
|
-
|
|
11464
|
-
|
|
11465
|
-
|
|
11476
|
+
const result = Object.keys(data2).map((key2) => {
|
|
11477
|
+
const value2 = hideSecret ? toAsterisk(data2[key2]) : data2[key2];
|
|
11478
|
+
return /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
|
|
11479
|
+
className: ContentBlockStyle,
|
|
11480
|
+
children: [/* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
|
|
11481
|
+
className: common.cx_default(KeyStyle, eagle.Typo.Label.l4_regular),
|
|
11482
|
+
children: key2
|
|
11483
|
+
}), /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
|
|
11484
|
+
className: common.cx_default(eagle.Typo.Label.l4_regular, ValueStyle$2),
|
|
11485
|
+
children: value2 || /* @__PURE__ */ common.jsxRuntimeExports.jsx(ValueDisplay, {
|
|
11486
|
+
value: ""
|
|
11487
|
+
})
|
|
11488
|
+
})]
|
|
11489
|
+
}, key2);
|
|
11490
|
+
});
|
|
11466
11491
|
if (!result.length) {
|
|
11467
11492
|
return /* @__PURE__ */ common.jsxRuntimeExports.jsx(WidgetErrorContent, {
|
|
11468
11493
|
errorText: empty2 || t2("dovetail.empty"),
|
|
@@ -11758,6 +11783,7 @@ function _KeyValueTableForm(props, ref) {
|
|
|
11758
11783
|
rowIndex,
|
|
11759
11784
|
disabled
|
|
11760
11785
|
}) => {
|
|
11786
|
+
const record = _value[rowIndex || 0];
|
|
11761
11787
|
return /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.AutoComplete, {
|
|
11762
11788
|
options: keyOptions || [],
|
|
11763
11789
|
value: value22,
|
|
@@ -11767,7 +11793,7 @@ function _KeyValueTableForm(props, ref) {
|
|
|
11767
11793
|
var _a;
|
|
11768
11794
|
return ((_a = option == null ? void 0 : option.label) == null ? void 0 : _a.toString().toLowerCase().includes(inputValue.toLowerCase())) || false;
|
|
11769
11795
|
},
|
|
11770
|
-
disabled: disabled || disabledChagneDefaultValues && (
|
|
11796
|
+
disabled: disabled || disabledChagneDefaultValues && defaultValue.some((row) => lodashEs.isEqual(row, record)),
|
|
11771
11797
|
allowClear: true
|
|
11772
11798
|
});
|
|
11773
11799
|
};
|
|
@@ -11777,12 +11803,13 @@ function _KeyValueTableForm(props, ref) {
|
|
|
11777
11803
|
rowIndex,
|
|
11778
11804
|
disabled
|
|
11779
11805
|
}) => {
|
|
11806
|
+
const record = _value[rowIndex || 0];
|
|
11780
11807
|
return /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.TextArea, {
|
|
11781
11808
|
autoSize: true,
|
|
11782
11809
|
className: "c17gq8cd",
|
|
11783
11810
|
size: "small",
|
|
11784
11811
|
value: value22,
|
|
11785
|
-
disabled: disabled || disabledChagneDefaultValues && (
|
|
11812
|
+
disabled: disabled || disabledChagneDefaultValues && defaultValue.some((row) => lodashEs.isEqual(row, record)),
|
|
11786
11813
|
onChange: (e2) => {
|
|
11787
11814
|
onChange2(e2.target.value);
|
|
11788
11815
|
}
|
|
@@ -11843,8 +11870,9 @@ function _KeyValueTableForm(props, ref) {
|
|
|
11843
11870
|
defaultData: _value,
|
|
11844
11871
|
row: {
|
|
11845
11872
|
deletable: _value.length > (minSize || 0),
|
|
11846
|
-
disableActions(rowIndex) {
|
|
11847
|
-
|
|
11873
|
+
disableActions(rowIndex, datas) {
|
|
11874
|
+
const record = datas[rowIndex];
|
|
11875
|
+
if (disabledChagneDefaultValues && defaultValue.some((row) => lodashEs.isEqual(row, record))) {
|
|
11848
11876
|
return ["delete"];
|
|
11849
11877
|
}
|
|
11850
11878
|
}
|
|
@@ -12575,11 +12603,15 @@ const DataField = (i18n2) => {
|
|
|
12575
12603
|
return {
|
|
12576
12604
|
key: "data",
|
|
12577
12605
|
path: ["data"],
|
|
12578
|
-
renderContent: (val) => {
|
|
12606
|
+
renderContent: (val, record) => {
|
|
12607
|
+
const finalData = {
|
|
12608
|
+
...val,
|
|
12609
|
+
..."binaryData" in record._rawYaml ? record._rawYaml.binaryData : {}
|
|
12610
|
+
};
|
|
12579
12611
|
return /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
|
|
12580
12612
|
className: "c91cpym",
|
|
12581
12613
|
children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(KeyValue, {
|
|
12582
|
-
data:
|
|
12614
|
+
data: finalData,
|
|
12583
12615
|
empty: i18n2.t("dovetail.no_resource", {
|
|
12584
12616
|
kind: i18n2.t("dovetail.data")
|
|
12585
12617
|
})
|
|
@@ -13062,8 +13094,8 @@ const LabelsAndAnnotationsShow = ({
|
|
|
13062
13094
|
}), Object.keys(labels || {}).length ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(Tags, {
|
|
13063
13095
|
value: labels
|
|
13064
13096
|
}) : /* @__PURE__ */ common.jsxRuntimeExports.jsx(WidgetErrorContent, {
|
|
13065
|
-
errorText: sksI18n.t("dovetail.
|
|
13066
|
-
type: ErrorContentType.
|
|
13097
|
+
errorText: sksI18n.t("dovetail.no_labels"),
|
|
13098
|
+
type: ErrorContentType.Item
|
|
13067
13099
|
})]
|
|
13068
13100
|
}), /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
|
|
13069
13101
|
className: ItemWrapperStyle,
|
|
@@ -13072,7 +13104,8 @@ const LabelsAndAnnotationsShow = ({
|
|
|
13072
13104
|
children: sksI18n.t("dovetail.annotation")
|
|
13073
13105
|
}), /* @__PURE__ */ common.jsxRuntimeExports.jsx(KeyValue, {
|
|
13074
13106
|
data: annotations,
|
|
13075
|
-
|
|
13107
|
+
empty: sksI18n.t("dovetail.no_annotations"),
|
|
13108
|
+
errorContent: ErrorContentType.Item
|
|
13076
13109
|
})]
|
|
13077
13110
|
})]
|
|
13078
13111
|
});
|
|
@@ -13917,7 +13950,7 @@ const ShowContentView = (props) => {
|
|
|
13917
13950
|
function renderGroup(group, isBasicGroup = false) {
|
|
13918
13951
|
let GroupContainer = React.Fragment;
|
|
13919
13952
|
let FieldContainer = React.Fragment;
|
|
13920
|
-
|
|
13953
|
+
let groupContainerProps = {
|
|
13921
13954
|
title: group.title || "",
|
|
13922
13955
|
size
|
|
13923
13956
|
};
|
|
@@ -13926,6 +13959,8 @@ const ShowContentView = (props) => {
|
|
|
13926
13959
|
GroupContainer = BasicShowGroupComponent;
|
|
13927
13960
|
} else if (group.title) {
|
|
13928
13961
|
GroupContainer = ShowGroupWithTitleComponent;
|
|
13962
|
+
} else {
|
|
13963
|
+
groupContainerProps = {};
|
|
13929
13964
|
}
|
|
13930
13965
|
const shouldRenderRow = !!(isBasicGroup || group.title);
|
|
13931
13966
|
if (shouldRenderRow) {
|
|
@@ -15755,7 +15790,8 @@ const YamlEditorComponent = React.forwardRef(
|
|
|
15755
15790
|
eleRef,
|
|
15756
15791
|
className,
|
|
15757
15792
|
debounceTime,
|
|
15758
|
-
isScrollOnFocus = true
|
|
15793
|
+
isScrollOnFocus = true,
|
|
15794
|
+
isHideActions = false
|
|
15759
15795
|
} = props;
|
|
15760
15796
|
const { t: t2 } = common.useTranslation();
|
|
15761
15797
|
const [isCollapsed, setIsCollapsed] = React.useState(
|
|
@@ -15861,7 +15897,7 @@ const YamlEditorComponent = React.forwardRef(
|
|
|
15861
15897
|
),
|
|
15862
15898
|
/* @__PURE__ */ common.jsxRuntimeExports.jsx("div", { className: common.cx_default(TitleStyle, "yaml-editor-title"), children: title || t2("dovetail.configure_file") })
|
|
15863
15899
|
] }),
|
|
15864
|
-
/* @__PURE__ */ common.jsxRuntimeExports.jsxs(eagle.Space, { size: 14, children: [
|
|
15900
|
+
isHideActions ? null : /* @__PURE__ */ common.jsxRuntimeExports.jsxs(eagle.Space, { size: 14, children: [
|
|
15865
15901
|
isDiff ? void 0 : /* @__PURE__ */ common.jsxRuntimeExports.jsxs(common.jsxRuntimeExports.Fragment, { children: [
|
|
15866
15902
|
/* @__PURE__ */ common.jsxRuntimeExports.jsx(
|
|
15867
15903
|
eagle.Tooltip,
|
|
@@ -19463,8 +19499,11 @@ const DataKeysColumnRenderer = (i18n2) => {
|
|
|
19463
19499
|
display: true,
|
|
19464
19500
|
dataIndex: ["data"],
|
|
19465
19501
|
title: i18n2.t("dovetail.data"),
|
|
19466
|
-
render(data2) {
|
|
19467
|
-
const keys2 = Object.keys(
|
|
19502
|
+
render(data2, record) {
|
|
19503
|
+
const keys2 = Object.keys({
|
|
19504
|
+
...data2,
|
|
19505
|
+
..."binaryData" in record._rawYaml ? record._rawYaml.binaryData : {}
|
|
19506
|
+
});
|
|
19468
19507
|
return keys2.length ? keys2.map((key2) => /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.OverflowTooltip, {
|
|
19469
19508
|
content: key2
|
|
19470
19509
|
}, key2)) : /* @__PURE__ */ common.jsxRuntimeExports.jsx(ValueDisplay, {
|
package/dist/refine.js
CHANGED
|
@@ -11,7 +11,7 @@ import { ResourceContext, matchResourceFromRoute, useResource, useDelete, useNav
|
|
|
11
11
|
import { parse, stringify } from "qs";
|
|
12
12
|
import React, { createElement, isValidElement, cloneElement, Children, useContext, useCallback, createContext, useState, useEffect, useMemo, useRef, useImperativeHandle, lazy, Suspense, memo, forwardRef } from "react";
|
|
13
13
|
import { useLocation, useHistory, useParams, matchPath, Link, Route, NavLink, Router } from "react-router-dom";
|
|
14
|
-
import { usePushModal, usePopModal, DeleteDialog, Tag, RejectDialog, RejectDialogType, Typo, Input, Select, AntdOption, Button, Form, Space, TextArea, kitContext, Loading, Table as Table$2, Pagination, Alert, ImmersiveDialog, SmallDialog, Fields, Units, Link as Link$1, OverflowTooltip, Tooltip, Dropdown, Menu as Menu$1, Icon, Divider, LegacyModal,
|
|
14
|
+
import { usePushModal, usePopModal, DeleteDialog, Tag, RejectDialog, RejectDialogType, Typo, Input, Select, AntdOption, Button, Form, Space, TextArea, kitContext, Loading, Table as Table$2, Pagination, Alert, ImmersiveDialog, SmallDialog, Fields, Units, Link as Link$1, OverflowTooltip, Tooltip, StatusCapsule, Dropdown, Menu as Menu$1, Icon, Divider, LegacyModal, Popover, AntdTable, Upload, TableForm, AutoComplete, getOptions, DonutChart, SegmentControl, Checkbox, Tabs as Tabs$1, TabsTabPane, Col, Row, useMessage, SearchInput, Token, AntdSelectOptGroup, WizardDialog, MenuItemGroup, Layout as Layout$1, InputGroup, InputInteger, Time as Time$1, ModalStack, KitStoreProvider, ConfigProvider } from "@cloudtower/eagle";
|
|
15
15
|
import { EditPen16PrimaryIcon, Download16GradientBlueIcon, TrashBinDelete16Icon, MoreEllipsis324BoldSecondaryIcon, MoreEllipsis324BoldBlueIcon, MoreEllipsis316BoldBlueIcon, PlusAddCreateNew16BoldOntintIcon, ViewEye16GradientGrayIcon, EntityFilterIgnoreGradient16GrayIcon, InfoICircleFill16GrayIcon, InfoICircleFill16Gray70Icon, RecoverContinue16GradientBlueIcon, SuspendedPause16GradientBlueIcon, ArrowChevronLeft16BoldTertiaryIcon, ArrowChevronLeftSmall16BoldBlueIcon, ArrowChevronDownSmall16BlueIcon, ArrowChevronUpSmall16BlueIcon, Retry16GradientBlueIcon, OpenTerminal16GradientBlueIcon, ArrowChevronDown16BlueIcon, ArrowChevronUp16BlueIcon, HierarchyTriangleRight16GrayIcon, HierarchyTriangleRight16BlueIcon, ClipboardCopy16GradientGrayIcon, ClipboardCopy16GradientBlueIcon, Retry16GradientGrayIcon, EditPen16GradientGrayIcon, EditPen16GradientBlueIcon, Showdiff16GradientGrayIcon, Showdiff16GradientBlueIcon, XmarkFailedSeriousWarningFill16RedIcon, Pause16GradientBlueIcon, EditPen16BlueIcon } from "@cloudtower/icons-react";
|
|
16
16
|
import { first, get as get$2, cloneDeep, set, omit as omit$1, merge, isEqual as isEqual$1, debounce, last, setWith, clone, isObject as isObject$4, uniq, keyBy } from "lodash-es";
|
|
17
17
|
import yaml$2 from "js-yaml";
|
|
@@ -1211,6 +1211,8 @@ const target_service_port = "目标服务端口";
|
|
|
1211
1211
|
const select_workload = "选择工作负载";
|
|
1212
1212
|
const no_search_result = "无搜索结果";
|
|
1213
1213
|
const clear_search_condition = "清空搜索条件";
|
|
1214
|
+
const no_labels = "无标签";
|
|
1215
|
+
const no_annotations = "无注解";
|
|
1214
1216
|
const dovetail = {
|
|
1215
1217
|
copy,
|
|
1216
1218
|
reset_arguments,
|
|
@@ -1482,7 +1484,9 @@ const dovetail = {
|
|
|
1482
1484
|
target_service_port,
|
|
1483
1485
|
select_workload,
|
|
1484
1486
|
no_search_result,
|
|
1485
|
-
clear_search_condition
|
|
1487
|
+
clear_search_condition,
|
|
1488
|
+
no_labels,
|
|
1489
|
+
no_annotations
|
|
1486
1490
|
};
|
|
1487
1491
|
const ZH = {
|
|
1488
1492
|
dovetail
|
|
@@ -7934,7 +7938,7 @@ var styled_default = process.env.NODE_ENV !== "production" ? new Proxy(styled, {
|
|
|
7934
7938
|
return o(prop);
|
|
7935
7939
|
}
|
|
7936
7940
|
}) : styled;
|
|
7937
|
-
const
|
|
7941
|
+
const index_l4xyq7 = "";
|
|
7938
7942
|
const ErrorWrapper = /* @__PURE__ */ styled_default("div")({
|
|
7939
7943
|
name: "ErrorWrapper",
|
|
7940
7944
|
class: "egn3dbn",
|
|
@@ -7949,6 +7953,7 @@ var ErrorContentType = /* @__PURE__ */ ((ErrorContentType2) => {
|
|
|
7949
7953
|
ErrorContentType2["List"] = "list";
|
|
7950
7954
|
ErrorContentType2["Card"] = "card";
|
|
7951
7955
|
ErrorContentType2["Widget"] = "widget";
|
|
7956
|
+
ErrorContentType2["Item"] = "item";
|
|
7952
7957
|
return ErrorContentType2;
|
|
7953
7958
|
})(ErrorContentType || {});
|
|
7954
7959
|
const WidgetErrorContent = (props) => {
|
|
@@ -7963,18 +7968,26 @@ const WidgetErrorContent = (props) => {
|
|
|
7963
7968
|
t: t2
|
|
7964
7969
|
} = useTranslation();
|
|
7965
7970
|
const fontMap = {
|
|
7971
|
+
// 小卡片
|
|
7966
7972
|
[
|
|
7967
7973
|
"widget"
|
|
7968
7974
|
/* Widget */
|
|
7969
7975
|
]: Typo.Label.l1_regular_title,
|
|
7976
|
+
// 详情里整个大卡片
|
|
7970
7977
|
[
|
|
7971
7978
|
"card"
|
|
7972
7979
|
/* Card */
|
|
7973
7980
|
]: Typo.Label.l1_bold,
|
|
7981
|
+
// 列表
|
|
7974
7982
|
[
|
|
7975
7983
|
"list"
|
|
7976
7984
|
/* List */
|
|
7977
|
-
]: Typo.Display.d2_bold_title
|
|
7985
|
+
]: Typo.Display.d2_bold_title,
|
|
7986
|
+
// 详情里的某一项
|
|
7987
|
+
[
|
|
7988
|
+
"item"
|
|
7989
|
+
/* Item */
|
|
7990
|
+
]: Typo.Heading.h2_bold_title
|
|
7978
7991
|
};
|
|
7979
7992
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorWrapper, {
|
|
7980
7993
|
className: cx_default(props.className, type2),
|
|
@@ -8331,7 +8344,7 @@ function useSubmitForm(options) {
|
|
|
8331
8344
|
onSubmit
|
|
8332
8345
|
};
|
|
8333
8346
|
}
|
|
8334
|
-
const
|
|
8347
|
+
const index_e7f1dg = "";
|
|
8335
8348
|
const EditButtonStyle = "esoz3jw";
|
|
8336
8349
|
function EditFieldModal(props) {
|
|
8337
8350
|
const {
|
|
@@ -8651,7 +8664,7 @@ class ResourceModel {
|
|
|
8651
8664
|
}
|
|
8652
8665
|
get namespace() {
|
|
8653
8666
|
var _a;
|
|
8654
|
-
return (_a = this._rawYaml.metadata) == null ? void 0 : _a.namespace;
|
|
8667
|
+
return ((_a = this._rawYaml.metadata) == null ? void 0 : _a.namespace) || "default";
|
|
8655
8668
|
}
|
|
8656
8669
|
get labels() {
|
|
8657
8670
|
var _a;
|
|
@@ -9680,8 +9693,8 @@ class PodModel extends WorkloadBaseModel {
|
|
|
9680
9693
|
return this.ips.join(", ");
|
|
9681
9694
|
}
|
|
9682
9695
|
get hasDnsConfig() {
|
|
9683
|
-
var _a, _b, _c, _d;
|
|
9684
|
-
return !!(((_a = this.spec) == null ? void 0 : _a.dnsConfig) && (((_b = this.spec.dnsConfig.nameservers) == null ? void 0 : _b.length) || ((_c = this.spec.dnsConfig.searches) == null ? void 0 : _c.length) || ((_d = this.spec.dnsConfig.options) == null ? void 0 : _d.length)));
|
|
9696
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
9697
|
+
return !!(((_a = this.spec) == null ? void 0 : _a.dnsConfig) && (((_b = this.spec.dnsConfig.nameservers) == null ? void 0 : _b.length) || ((_c = this.spec.dnsConfig.searches) == null ? void 0 : _c.length) || ((_d = this.spec.dnsConfig.options) == null ? void 0 : _d.length)) || ((_e = this.spec) == null ? void 0 : _e.dnsPolicy) || ((_g = (_f = this.spec) == null ? void 0 : _f.hostAliases) == null ? void 0 : _g.length));
|
|
9685
9698
|
}
|
|
9686
9699
|
}
|
|
9687
9700
|
class PodMetricsModel extends ResourceModel {
|
|
@@ -10371,7 +10384,14 @@ const ConditionsTable = ({ conditions = [] }) => {
|
|
|
10371
10384
|
width: 120,
|
|
10372
10385
|
sortable: true,
|
|
10373
10386
|
render: (value2) => {
|
|
10374
|
-
return
|
|
10387
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10388
|
+
StatusCapsule,
|
|
10389
|
+
{
|
|
10390
|
+
color: value2 === "True" ? "green" : "red",
|
|
10391
|
+
className: cx_default(StateTagStyle, "no-background"),
|
|
10392
|
+
children: value2 === "True" ? t2("dovetail.true") : t2("dovetail.false")
|
|
10393
|
+
}
|
|
10394
|
+
);
|
|
10375
10395
|
}
|
|
10376
10396
|
},
|
|
10377
10397
|
{
|
|
@@ -10770,7 +10790,7 @@ function validateNodePort(nodePort, allNodePorts, i18n2) {
|
|
|
10770
10790
|
return { isValid: true };
|
|
10771
10791
|
}
|
|
10772
10792
|
function K8sDropdown(props) {
|
|
10773
|
-
var _a;
|
|
10793
|
+
var _a, _b;
|
|
10774
10794
|
const { record, size = "normal", customButton } = props;
|
|
10775
10795
|
const globalStore = useGlobalStore();
|
|
10776
10796
|
const useResourceResult = useResource();
|
|
@@ -10781,7 +10801,7 @@ function K8sDropdown(props) {
|
|
|
10781
10801
|
const { openDeleteConfirmModal } = useDeleteModal({ resourceName: resourceName || "" });
|
|
10782
10802
|
const download2 = useDownloadYAML();
|
|
10783
10803
|
const openForm = useOpenForm();
|
|
10784
|
-
const isInShowPage = useResourceResult.action === "show";
|
|
10804
|
+
const isInShowPage = useResourceResult.action === "show" && ((_a = useResourceResult.resource) == null ? void 0 : _a.name) === config.name;
|
|
10785
10805
|
const { data: canEditData } = useCan({
|
|
10786
10806
|
resource: resourceName,
|
|
10787
10807
|
action: AccessControlAuth.Edit,
|
|
@@ -10796,7 +10816,7 @@ function K8sDropdown(props) {
|
|
|
10796
10816
|
namespace: record.namespace
|
|
10797
10817
|
}
|
|
10798
10818
|
});
|
|
10799
|
-
const formType = ((
|
|
10819
|
+
const formType = ((_b = config.formConfig) == null ? void 0 : _b.formType) || FormType.FORM;
|
|
10800
10820
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10801
10821
|
Dropdown,
|
|
10802
10822
|
{
|
|
@@ -11434,16 +11454,21 @@ const KeyValue = (props) => {
|
|
|
11434
11454
|
const {
|
|
11435
11455
|
t: t2
|
|
11436
11456
|
} = useTranslation();
|
|
11437
|
-
const result = Object.keys(data2).map((key2) =>
|
|
11438
|
-
|
|
11439
|
-
|
|
11440
|
-
className:
|
|
11441
|
-
children:
|
|
11442
|
-
|
|
11443
|
-
|
|
11444
|
-
|
|
11445
|
-
|
|
11446
|
-
|
|
11457
|
+
const result = Object.keys(data2).map((key2) => {
|
|
11458
|
+
const value2 = hideSecret ? toAsterisk(data2[key2]) : data2[key2];
|
|
11459
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
11460
|
+
className: ContentBlockStyle,
|
|
11461
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
11462
|
+
className: cx_default(KeyStyle, Typo.Label.l4_regular),
|
|
11463
|
+
children: key2
|
|
11464
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
11465
|
+
className: cx_default(Typo.Label.l4_regular, ValueStyle$2),
|
|
11466
|
+
children: value2 || /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
|
11467
|
+
value: ""
|
|
11468
|
+
})
|
|
11469
|
+
})]
|
|
11470
|
+
}, key2);
|
|
11471
|
+
});
|
|
11447
11472
|
if (!result.length) {
|
|
11448
11473
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
|
|
11449
11474
|
errorText: empty2 || t2("dovetail.empty"),
|
|
@@ -11739,6 +11764,7 @@ function _KeyValueTableForm(props, ref) {
|
|
|
11739
11764
|
rowIndex,
|
|
11740
11765
|
disabled
|
|
11741
11766
|
}) => {
|
|
11767
|
+
const record = _value[rowIndex || 0];
|
|
11742
11768
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(AutoComplete, {
|
|
11743
11769
|
options: keyOptions || [],
|
|
11744
11770
|
value: value22,
|
|
@@ -11748,7 +11774,7 @@ function _KeyValueTableForm(props, ref) {
|
|
|
11748
11774
|
var _a;
|
|
11749
11775
|
return ((_a = option == null ? void 0 : option.label) == null ? void 0 : _a.toString().toLowerCase().includes(inputValue.toLowerCase())) || false;
|
|
11750
11776
|
},
|
|
11751
|
-
disabled: disabled || disabledChagneDefaultValues && (
|
|
11777
|
+
disabled: disabled || disabledChagneDefaultValues && defaultValue.some((row) => isEqual$1(row, record)),
|
|
11752
11778
|
allowClear: true
|
|
11753
11779
|
});
|
|
11754
11780
|
};
|
|
@@ -11758,12 +11784,13 @@ function _KeyValueTableForm(props, ref) {
|
|
|
11758
11784
|
rowIndex,
|
|
11759
11785
|
disabled
|
|
11760
11786
|
}) => {
|
|
11787
|
+
const record = _value[rowIndex || 0];
|
|
11761
11788
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(TextArea, {
|
|
11762
11789
|
autoSize: true,
|
|
11763
11790
|
className: "c17gq8cd",
|
|
11764
11791
|
size: "small",
|
|
11765
11792
|
value: value22,
|
|
11766
|
-
disabled: disabled || disabledChagneDefaultValues && (
|
|
11793
|
+
disabled: disabled || disabledChagneDefaultValues && defaultValue.some((row) => isEqual$1(row, record)),
|
|
11767
11794
|
onChange: (e2) => {
|
|
11768
11795
|
onChange2(e2.target.value);
|
|
11769
11796
|
}
|
|
@@ -11824,8 +11851,9 @@ function _KeyValueTableForm(props, ref) {
|
|
|
11824
11851
|
defaultData: _value,
|
|
11825
11852
|
row: {
|
|
11826
11853
|
deletable: _value.length > (minSize || 0),
|
|
11827
|
-
disableActions(rowIndex) {
|
|
11828
|
-
|
|
11854
|
+
disableActions(rowIndex, datas) {
|
|
11855
|
+
const record = datas[rowIndex];
|
|
11856
|
+
if (disabledChagneDefaultValues && defaultValue.some((row) => isEqual$1(row, record))) {
|
|
11829
11857
|
return ["delete"];
|
|
11830
11858
|
}
|
|
11831
11859
|
}
|
|
@@ -12556,11 +12584,15 @@ const DataField = (i18n2) => {
|
|
|
12556
12584
|
return {
|
|
12557
12585
|
key: "data",
|
|
12558
12586
|
path: ["data"],
|
|
12559
|
-
renderContent: (val) => {
|
|
12587
|
+
renderContent: (val, record) => {
|
|
12588
|
+
const finalData = {
|
|
12589
|
+
...val,
|
|
12590
|
+
..."binaryData" in record._rawYaml ? record._rawYaml.binaryData : {}
|
|
12591
|
+
};
|
|
12560
12592
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
12561
12593
|
className: "c91cpym",
|
|
12562
12594
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValue, {
|
|
12563
|
-
data:
|
|
12595
|
+
data: finalData,
|
|
12564
12596
|
empty: i18n2.t("dovetail.no_resource", {
|
|
12565
12597
|
kind: i18n2.t("dovetail.data")
|
|
12566
12598
|
})
|
|
@@ -13043,8 +13075,8 @@ const LabelsAndAnnotationsShow = ({
|
|
|
13043
13075
|
}), Object.keys(labels || {}).length ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tags, {
|
|
13044
13076
|
value: labels
|
|
13045
13077
|
}) : /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
|
|
13046
|
-
errorText: sksI18n.t("dovetail.
|
|
13047
|
-
type: ErrorContentType.
|
|
13078
|
+
errorText: sksI18n.t("dovetail.no_labels"),
|
|
13079
|
+
type: ErrorContentType.Item
|
|
13048
13080
|
})]
|
|
13049
13081
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
13050
13082
|
className: ItemWrapperStyle,
|
|
@@ -13053,7 +13085,8 @@ const LabelsAndAnnotationsShow = ({
|
|
|
13053
13085
|
children: sksI18n.t("dovetail.annotation")
|
|
13054
13086
|
}), /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValue, {
|
|
13055
13087
|
data: annotations,
|
|
13056
|
-
|
|
13088
|
+
empty: sksI18n.t("dovetail.no_annotations"),
|
|
13089
|
+
errorContent: ErrorContentType.Item
|
|
13057
13090
|
})]
|
|
13058
13091
|
})]
|
|
13059
13092
|
});
|
|
@@ -13898,7 +13931,7 @@ const ShowContentView = (props) => {
|
|
|
13898
13931
|
function renderGroup(group, isBasicGroup = false) {
|
|
13899
13932
|
let GroupContainer = React.Fragment;
|
|
13900
13933
|
let FieldContainer = React.Fragment;
|
|
13901
|
-
|
|
13934
|
+
let groupContainerProps = {
|
|
13902
13935
|
title: group.title || "",
|
|
13903
13936
|
size
|
|
13904
13937
|
};
|
|
@@ -13907,6 +13940,8 @@ const ShowContentView = (props) => {
|
|
|
13907
13940
|
GroupContainer = BasicShowGroupComponent;
|
|
13908
13941
|
} else if (group.title) {
|
|
13909
13942
|
GroupContainer = ShowGroupWithTitleComponent;
|
|
13943
|
+
} else {
|
|
13944
|
+
groupContainerProps = {};
|
|
13910
13945
|
}
|
|
13911
13946
|
const shouldRenderRow = !!(isBasicGroup || group.title);
|
|
13912
13947
|
if (shouldRenderRow) {
|
|
@@ -15736,7 +15771,8 @@ const YamlEditorComponent = forwardRef(
|
|
|
15736
15771
|
eleRef,
|
|
15737
15772
|
className,
|
|
15738
15773
|
debounceTime,
|
|
15739
|
-
isScrollOnFocus = true
|
|
15774
|
+
isScrollOnFocus = true,
|
|
15775
|
+
isHideActions = false
|
|
15740
15776
|
} = props;
|
|
15741
15777
|
const { t: t2 } = useTranslation();
|
|
15742
15778
|
const [isCollapsed, setIsCollapsed] = useState(
|
|
@@ -15842,7 +15878,7 @@ const YamlEditorComponent = forwardRef(
|
|
|
15842
15878
|
),
|
|
15843
15879
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cx_default(TitleStyle, "yaml-editor-title"), children: title || t2("dovetail.configure_file") })
|
|
15844
15880
|
] }),
|
|
15845
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { size: 14, children: [
|
|
15881
|
+
isHideActions ? null : /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { size: 14, children: [
|
|
15846
15882
|
isDiff ? void 0 : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
15847
15883
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
15848
15884
|
Tooltip,
|
|
@@ -19444,8 +19480,11 @@ const DataKeysColumnRenderer = (i18n2) => {
|
|
|
19444
19480
|
display: true,
|
|
19445
19481
|
dataIndex: ["data"],
|
|
19446
19482
|
title: i18n2.t("dovetail.data"),
|
|
19447
|
-
render(data2) {
|
|
19448
|
-
const keys2 = Object.keys(
|
|
19483
|
+
render(data2, record) {
|
|
19484
|
+
const keys2 = Object.keys({
|
|
19485
|
+
...data2,
|
|
19486
|
+
..."binaryData" in record._rawYaml ? record._rawYaml.binaryData : {}
|
|
19487
|
+
});
|
|
19449
19488
|
return keys2.length ? keys2.map((key2) => /* @__PURE__ */ jsxRuntimeExports.jsx(OverflowTooltip, {
|
|
19450
19489
|
content: key2
|
|
19451
19490
|
}, key2)) : /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
package/dist/style.css
CHANGED
|
@@ -720,6 +720,9 @@
|
|
|
720
720
|
.egn3dbn.card .error-content {
|
|
721
721
|
height: 96px;
|
|
722
722
|
}
|
|
723
|
+
.egn3dbn.item .title {
|
|
724
|
+
color: rgba(0, 21, 64, 0.3);
|
|
725
|
+
}
|
|
723
726
|
|
|
724
727
|
.e136jgy8 {
|
|
725
728
|
display: flex;
|
|
@@ -903,9 +906,12 @@
|
|
|
903
906
|
/* fisheye */
|
|
904
907
|
/* z-index */
|
|
905
908
|
.esoz3jw.ant-btn.ant-btn-link {
|
|
906
|
-
font-size:
|
|
909
|
+
font-size: 12px;
|
|
907
910
|
height: 18px;
|
|
908
911
|
margin-left: 8px;
|
|
912
|
+
}
|
|
913
|
+
.esoz3jw.ant-btn.ant-btn-link span {
|
|
914
|
+
height: 18px;
|
|
909
915
|
}/* // basic */
|
|
910
916
|
/* FishEye Color Variables and Functions */
|
|
911
917
|
/*
|