@dovetail-v2/refine 0.0.64 → 0.0.66-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/{MonacoYamlDiffEditor-c863e3f0.js → MonacoYamlDiffEditor-bcc9a5fe.js} +1 -1
- package/dist/{index-7523291c.js → index-4ac6ee9d.js} +153 -183
- package/dist/refine.js +5 -1
- package/dist/refine.umd.cjs +123 -153
- package/lib/src/plugins/index.d.ts +2 -0
- package/lib/src/plugins/model-plugin.d.ts +3 -2
- package/lib/src/plugins/relation-plugin.d.ts +1 -2
- package/package.json +5 -5
package/dist/refine.umd.cjs
CHANGED
|
@@ -8332,9 +8332,8 @@ var __publicField = (obj, key, value) => {
|
|
|
8332
8332
|
});
|
|
8333
8333
|
}
|
|
8334
8334
|
function NameInputWidget(props) {
|
|
8335
|
-
const kit = eagle.useUIKit();
|
|
8336
8335
|
const { action } = core.useResource();
|
|
8337
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8336
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Input, { ...props, disabled: action === "edit" });
|
|
8338
8337
|
}
|
|
8339
8338
|
const dnsSubDomainRules = [
|
|
8340
8339
|
{
|
|
@@ -8379,7 +8378,6 @@ var __publicField = (obj, key, value) => {
|
|
|
8379
8378
|
}
|
|
8380
8379
|
];
|
|
8381
8380
|
function NamespaceSelectWidget(props) {
|
|
8382
|
-
const kit = eagle.useUIKit();
|
|
8383
8381
|
const { action } = core.useResource();
|
|
8384
8382
|
const { data: data2 } = core.useList({
|
|
8385
8383
|
resource: "namespaces",
|
|
@@ -8391,7 +8389,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8391
8389
|
mode: "off"
|
|
8392
8390
|
}
|
|
8393
8391
|
});
|
|
8394
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8392
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Select, { input: props, disabled: action === "edit", children: data2 == null ? void 0 : data2.data.map((namespace2) => /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.AntdOption, { value: namespace2.metadata.name, children: namespace2.metadata.name }, namespace2.metadata.name)) });
|
|
8395
8393
|
}
|
|
8396
8394
|
const namespaceRules = [
|
|
8397
8395
|
{
|
|
@@ -8401,7 +8399,6 @@ var __publicField = (obj, key, value) => {
|
|
|
8401
8399
|
];
|
|
8402
8400
|
function KeyValueInput(props) {
|
|
8403
8401
|
const { children, item } = props;
|
|
8404
|
-
const kit = eagle.useUIKit();
|
|
8405
8402
|
const onKeyChange = React.useCallback(
|
|
8406
8403
|
(event2) => {
|
|
8407
8404
|
var _a;
|
|
@@ -8424,14 +8421,13 @@ var __publicField = (obj, key, value) => {
|
|
|
8424
8421
|
},
|
|
8425
8422
|
[item, props]
|
|
8426
8423
|
);
|
|
8427
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
8428
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8429
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8424
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, { children: [
|
|
8425
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Input, { value: item.key, onChange: onKeyChange }),
|
|
8426
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(eagle.TextArea, { value: item.value, onChange: onValueChange }),
|
|
8430
8427
|
children
|
|
8431
8428
|
] });
|
|
8432
8429
|
}
|
|
8433
8430
|
function KeyValueListWidget(props) {
|
|
8434
|
-
const kit = eagle.useUIKit();
|
|
8435
8431
|
const { value: value2 } = props;
|
|
8436
8432
|
const items = React.useMemo(() => {
|
|
8437
8433
|
return Object.entries(value2 || {}).map(([key2, value22]) => ({
|
|
@@ -8473,7 +8469,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8473
8469
|
onChange(temp);
|
|
8474
8470
|
},
|
|
8475
8471
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8476
|
-
|
|
8472
|
+
eagle.Button,
|
|
8477
8473
|
{
|
|
8478
8474
|
onClick: () => {
|
|
8479
8475
|
onRemove(index2);
|
|
@@ -8486,15 +8482,14 @@ var __publicField = (obj, key, value) => {
|
|
|
8486
8482
|
index2
|
|
8487
8483
|
);
|
|
8488
8484
|
}),
|
|
8489
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8485
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Form.Item, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, { type: "primary", onClick: onAdd, children: "Add" }) })
|
|
8490
8486
|
] });
|
|
8491
8487
|
}
|
|
8492
8488
|
function MetadataForm() {
|
|
8493
|
-
const kit = eagle.useUIKit();
|
|
8494
8489
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
8495
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8490
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Form.Item, { label: "Name", name: ["metadata", "name"], rules: rfc1123LabelRules, children: /* @__PURE__ */ jsxRuntimeExports.jsx(NameInputWidget, {}) }),
|
|
8496
8491
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8497
|
-
|
|
8492
|
+
eagle.Form.Item,
|
|
8498
8493
|
{
|
|
8499
8494
|
label: "Namespace",
|
|
8500
8495
|
name: ["metadata", "namespace"],
|
|
@@ -8502,8 +8497,8 @@ var __publicField = (obj, key, value) => {
|
|
|
8502
8497
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(NamespaceSelectWidget, {})
|
|
8503
8498
|
}
|
|
8504
8499
|
),
|
|
8505
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8506
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8500
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Form.Item, { name: ["metadata", "labels"], label: "Labels", children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValueListWidget, {}) }),
|
|
8501
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Form.Item, { name: ["metadata", "annotations"], label: "Annotations", children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValueListWidget, {}) })
|
|
8507
8502
|
] });
|
|
8508
8503
|
}
|
|
8509
8504
|
function memoize$2(fn) {
|
|
@@ -8693,7 +8688,6 @@ var __publicField = (obj, key, value) => {
|
|
|
8693
8688
|
const index_dmbxj3 = "";
|
|
8694
8689
|
const TableContainerStyle = "t1upn1sz";
|
|
8695
8690
|
function Table(props) {
|
|
8696
|
-
const kit = eagle.useUIKit();
|
|
8697
8691
|
const {
|
|
8698
8692
|
t: t2
|
|
8699
8693
|
} = useTranslation();
|
|
@@ -8738,7 +8732,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8738
8732
|
return columns;
|
|
8739
8733
|
}, [columns, RowMenu]);
|
|
8740
8734
|
if (loading) {
|
|
8741
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8735
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Loading, {});
|
|
8742
8736
|
} else if (error) {
|
|
8743
8737
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
|
|
8744
8738
|
errorText: t2("dovetail.retry_when_access_data_failed"),
|
|
@@ -8758,7 +8752,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8758
8752
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
8759
8753
|
ref: wrapperRef,
|
|
8760
8754
|
className: cx_default(TableContainerStyle, props.className, "table-wrapper"),
|
|
8761
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8755
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Table, {
|
|
8762
8756
|
tableLayout: "fixed",
|
|
8763
8757
|
columns: finalColumns,
|
|
8764
8758
|
dataSource,
|
|
@@ -8769,7 +8763,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8769
8763
|
scroll
|
|
8770
8764
|
}), /* @__PURE__ */ jsxRuntimeExports.jsx(AuxiliaryLine, {
|
|
8771
8765
|
ref: auxiliaryLineRef
|
|
8772
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8766
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Pagination, {
|
|
8773
8767
|
current: currentPage,
|
|
8774
8768
|
size: defaultSize,
|
|
8775
8769
|
count: total,
|
|
@@ -10220,14 +10214,13 @@ var __publicField = (obj, key, value) => {
|
|
|
10220
10214
|
const {
|
|
10221
10215
|
value: value2
|
|
10222
10216
|
} = props;
|
|
10223
|
-
const kit = eagle.useUIKit();
|
|
10224
10217
|
if (!value2) {
|
|
10225
10218
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
|
10226
10219
|
value: ""
|
|
10227
10220
|
});
|
|
10228
10221
|
}
|
|
10229
10222
|
const tags = Object.keys(value2).map((key2) => {
|
|
10230
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10223
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Tag.SplitTag, {
|
|
10231
10224
|
className: TagStyle,
|
|
10232
10225
|
primaryContent: key2,
|
|
10233
10226
|
secondaryContent: value2[key2],
|
|
@@ -10235,7 +10228,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10235
10228
|
color: "gray"
|
|
10236
10229
|
}, key2);
|
|
10237
10230
|
});
|
|
10238
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10231
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Space, {
|
|
10239
10232
|
className: TagWrapper,
|
|
10240
10233
|
size: 8,
|
|
10241
10234
|
children: tags
|
|
@@ -10248,7 +10241,6 @@ var __publicField = (obj, key, value) => {
|
|
|
10248
10241
|
hideBackground,
|
|
10249
10242
|
className
|
|
10250
10243
|
}) => {
|
|
10251
|
-
const kit = eagle.useUIKit();
|
|
10252
10244
|
const {
|
|
10253
10245
|
t: t2
|
|
10254
10246
|
} = useTranslation();
|
|
@@ -10267,7 +10259,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10267
10259
|
terminated: "red",
|
|
10268
10260
|
stopped: "gray"
|
|
10269
10261
|
};
|
|
10270
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10262
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.StatusCapsule, {
|
|
10271
10263
|
className: cx_default(className, StateTagStyle, hideBackground && "no-background"),
|
|
10272
10264
|
color: statusMap[state2] !== "loading" ? statusMap[state2] : void 0,
|
|
10273
10265
|
loading: statusMap[state2] === "loading",
|
|
@@ -10586,7 +10578,6 @@ var __publicField = (obj, key, value) => {
|
|
|
10586
10578
|
}
|
|
10587
10579
|
function K8sDropdown(props) {
|
|
10588
10580
|
const { record, size = "normal" } = props;
|
|
10589
|
-
const kit = eagle.useUIKit();
|
|
10590
10581
|
const { globalStore } = useGlobalStore();
|
|
10591
10582
|
const useResourceResult = core.useResource();
|
|
10592
10583
|
const resource = useResourceResult.resource;
|
|
@@ -10607,18 +10598,18 @@ var __publicField = (obj, key, value) => {
|
|
|
10607
10598
|
});
|
|
10608
10599
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
10609
10600
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10610
|
-
|
|
10601
|
+
eagle.Dropdown,
|
|
10611
10602
|
{
|
|
10612
|
-
overlay: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10603
|
+
overlay: /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Menu, { children: [
|
|
10613
10604
|
isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10614
|
-
|
|
10605
|
+
eagle.Menu.Item,
|
|
10615
10606
|
{
|
|
10616
10607
|
onClick: openForm,
|
|
10617
10608
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Icon, { src: iconsReact.EditPen16PrimaryIcon, children: t2("dovetail.edit_yaml") })
|
|
10618
10609
|
}
|
|
10619
10610
|
),
|
|
10620
10611
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10621
|
-
|
|
10612
|
+
eagle.Menu.Item,
|
|
10622
10613
|
{
|
|
10623
10614
|
onClick: () => {
|
|
10624
10615
|
var _a;
|
|
@@ -10633,9 +10624,9 @@ var __publicField = (obj, key, value) => {
|
|
|
10633
10624
|
}
|
|
10634
10625
|
),
|
|
10635
10626
|
props.children,
|
|
10636
|
-
(canDeleteData == null ? void 0 : canDeleteData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10627
|
+
(canDeleteData == null ? void 0 : canDeleteData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Divider, { style: { margin: 0 } }) : null,
|
|
10637
10628
|
(canDeleteData == null ? void 0 : canDeleteData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10638
|
-
|
|
10629
|
+
eagle.Menu.Item,
|
|
10639
10630
|
{
|
|
10640
10631
|
danger: true,
|
|
10641
10632
|
onClick: () => {
|
|
@@ -10647,7 +10638,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10647
10638
|
] }),
|
|
10648
10639
|
trigger: ["click"],
|
|
10649
10640
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10650
|
-
|
|
10641
|
+
eagle.Button,
|
|
10651
10642
|
{
|
|
10652
10643
|
type: "quiet",
|
|
10653
10644
|
size: size === "large" ? "middle" : "small",
|
|
@@ -10664,7 +10655,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10664
10655
|
)
|
|
10665
10656
|
}
|
|
10666
10657
|
),
|
|
10667
|
-
visible ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10658
|
+
visible ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Modal, { ...modalProps }) : null
|
|
10668
10659
|
] });
|
|
10669
10660
|
}
|
|
10670
10661
|
var ColumnKeys = /* @__PURE__ */ ((ColumnKeys2) => {
|
|
@@ -10762,12 +10753,11 @@ var __publicField = (obj, key, value) => {
|
|
|
10762
10753
|
};
|
|
10763
10754
|
function CreateButton() {
|
|
10764
10755
|
var _a;
|
|
10765
|
-
const kit = eagle.useUIKit();
|
|
10766
10756
|
const { t: t2 } = useTranslation();
|
|
10767
10757
|
const openForm = useOpenForm();
|
|
10768
10758
|
const { resource } = core.useResource();
|
|
10769
10759
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10770
|
-
|
|
10760
|
+
eagle.Button,
|
|
10771
10761
|
{
|
|
10772
10762
|
prefixIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(iconsReact.PlusAddCreateNew16BoldOntintIcon, {}),
|
|
10773
10763
|
type: "primary",
|
|
@@ -10806,7 +10796,6 @@ var __publicField = (obj, key, value) => {
|
|
|
10806
10796
|
};
|
|
10807
10797
|
const DeleteManyButton = (props) => {
|
|
10808
10798
|
const { resource } = core.useResource();
|
|
10809
|
-
const kit = eagle.useUIKit();
|
|
10810
10799
|
const { t: t2 } = useTranslation();
|
|
10811
10800
|
const { modalProps, visible, setVisible } = useDeleteManyModal(
|
|
10812
10801
|
(resource == null ? void 0 : resource.name) || "",
|
|
@@ -10816,8 +10805,8 @@ var __publicField = (obj, key, value) => {
|
|
|
10816
10805
|
setVisible(true);
|
|
10817
10806
|
}, [setVisible]);
|
|
10818
10807
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
10819
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10820
|
-
visible ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10808
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, { type: "primary", danger: true, onClick, children: t2("dovetail.delete") }),
|
|
10809
|
+
visible ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Modal, { ...modalProps }) : null
|
|
10821
10810
|
] });
|
|
10822
10811
|
};
|
|
10823
10812
|
const TableToolBar_4s5vf2 = "";
|
|
@@ -10831,18 +10820,17 @@ var __publicField = (obj, key, value) => {
|
|
|
10831
10820
|
hideCreate
|
|
10832
10821
|
}) => {
|
|
10833
10822
|
var _a;
|
|
10834
|
-
const kit = eagle.useUIKit();
|
|
10835
10823
|
const {
|
|
10836
10824
|
resource
|
|
10837
10825
|
} = core.useResource();
|
|
10838
10826
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
10839
10827
|
className: cx_default(ToolbarWrapperStyle, "table-toolbar"),
|
|
10840
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10828
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, {
|
|
10841
10829
|
className: ToolbarStyle$1,
|
|
10842
10830
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
10843
10831
|
className: cx_default(eagle.Typo.Display.d2_regular_title, TitleStyle$2),
|
|
10844
10832
|
children: (_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind
|
|
10845
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10833
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, {
|
|
10846
10834
|
children: [selectedKeys.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteManyButton, {
|
|
10847
10835
|
ids: selectedKeys
|
|
10848
10836
|
}) : void 0, /* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
|
|
@@ -10877,7 +10865,6 @@ var __publicField = (obj, key, value) => {
|
|
|
10877
10865
|
const {
|
|
10878
10866
|
i18n: i18n2
|
|
10879
10867
|
} = useTranslation();
|
|
10880
|
-
const kit = eagle.useUIKit();
|
|
10881
10868
|
const [selectedKeys] = React.useState([]);
|
|
10882
10869
|
const component = React.useContext(ComponentContext);
|
|
10883
10870
|
const Table$1 = component.Table || Table;
|
|
@@ -10915,7 +10902,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10915
10902
|
type: ErrorContentType.Card
|
|
10916
10903
|
});
|
|
10917
10904
|
}
|
|
10918
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10905
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, {
|
|
10919
10906
|
direction: "vertical",
|
|
10920
10907
|
className: WrapperStyle$5,
|
|
10921
10908
|
children: [hideToolBar ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(TableToolBar, {
|
|
@@ -11052,7 +11039,6 @@ var __publicField = (obj, key, value) => {
|
|
|
11052
11039
|
namespace: namespace2,
|
|
11053
11040
|
resourceId
|
|
11054
11041
|
} = props;
|
|
11055
|
-
const kit = eagle.useUIKit();
|
|
11056
11042
|
const navigation = core.useNavigation();
|
|
11057
11043
|
const go = core.useGo();
|
|
11058
11044
|
const onClick = () => {
|
|
@@ -11066,7 +11052,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11066
11052
|
}
|
|
11067
11053
|
});
|
|
11068
11054
|
};
|
|
11069
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11055
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Link, {
|
|
11070
11056
|
className: LinkStyle,
|
|
11071
11057
|
onClick,
|
|
11072
11058
|
children: resourceId
|
|
@@ -11260,9 +11246,8 @@ var __publicField = (obj, key, value) => {
|
|
|
11260
11246
|
}
|
|
11261
11247
|
function Tabs(props) {
|
|
11262
11248
|
const { tabs, className } = props;
|
|
11263
|
-
|
|
11264
|
-
|
|
11265
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.tabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
|
|
11249
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Tabs, { className, children: tabs.map((tab) => {
|
|
11250
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.TabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
|
|
11266
11251
|
}) });
|
|
11267
11252
|
}
|
|
11268
11253
|
const ShowContent_1u0cbxv = "";
|
|
@@ -11303,7 +11288,6 @@ var __publicField = (obj, key, value) => {
|
|
|
11303
11288
|
formatter,
|
|
11304
11289
|
Dropdown = K8sDropdown
|
|
11305
11290
|
} = props;
|
|
11306
|
-
const kit = eagle.useUIKit();
|
|
11307
11291
|
const parsed = core.useParsed();
|
|
11308
11292
|
const {
|
|
11309
11293
|
resource
|
|
@@ -11346,7 +11330,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11346
11330
|
} else {
|
|
11347
11331
|
content = lodashEs.get(record, field.path);
|
|
11348
11332
|
}
|
|
11349
|
-
return hasCol ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11333
|
+
return hasCol ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Col, {
|
|
11350
11334
|
flex: areaType === AreaType.Inline ? "none" : "",
|
|
11351
11335
|
span: field.col || 24,
|
|
11352
11336
|
children: field.render ? field.render(value2, record, field) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
@@ -11401,7 +11385,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11401
11385
|
children: (_b = resource == null ? void 0 : resource.meta) == null ? void 0 : _b.kind
|
|
11402
11386
|
})
|
|
11403
11387
|
})
|
|
11404
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
11388
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, {
|
|
11405
11389
|
className: TopBarStyle,
|
|
11406
11390
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
11407
11391
|
style: {
|
|
@@ -11413,11 +11397,11 @@ var __publicField = (obj, key, value) => {
|
|
|
11413
11397
|
}), stateDisplay ? /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
|
|
11414
11398
|
state: stateDisplay
|
|
11415
11399
|
}) : void 0]
|
|
11416
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
11400
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, {
|
|
11417
11401
|
children: [(_d = showConfig.renderExtraButton) == null ? void 0 : _d.call(showConfig, record), !showConfig.hideEditYamlButton ? /* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
|
|
11418
11402
|
resource: resource == null ? void 0 : resource.name,
|
|
11419
11403
|
action: AccessControlAuth.Edit,
|
|
11420
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11404
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, {
|
|
11421
11405
|
style: {
|
|
11422
11406
|
marginRight: 8
|
|
11423
11407
|
},
|
|
@@ -11442,7 +11426,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11442
11426
|
className: cx_default(TabContentStyle, tab.groups.length <= 1 && FullTabContentStyle),
|
|
11443
11427
|
children: (_a2 = tab.groups) == null ? void 0 : _a2.map((group) => {
|
|
11444
11428
|
const GroupContainer = group.title ? ShowGroupComponent : React.Fragment;
|
|
11445
|
-
const FieldContainer = group.title ?
|
|
11429
|
+
const FieldContainer = group.title ? eagle.Row : React.Fragment;
|
|
11446
11430
|
const groupContainerProps = group.title ? {
|
|
11447
11431
|
title: group.title || ""
|
|
11448
11432
|
} : {};
|
|
@@ -11455,7 +11439,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11455
11439
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(FieldContainer, {
|
|
11456
11440
|
...fieldContainerProps,
|
|
11457
11441
|
children: renderFields(area.fields, area.type, !!group.title)
|
|
11458
|
-
}, index2), index2 !== group.areas.length - 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11442
|
+
}, index2), index2 !== group.areas.length - 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Divider, {
|
|
11459
11443
|
style: {
|
|
11460
11444
|
margin: "8px 0 12px 0"
|
|
11461
11445
|
}
|
|
@@ -11470,7 +11454,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11470
11454
|
});
|
|
11471
11455
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
11472
11456
|
className: ShowContentWrapperStyle,
|
|
11473
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11457
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Space, {
|
|
11474
11458
|
direction: "vertical",
|
|
11475
11459
|
className: ShowContentHeaderStyle,
|
|
11476
11460
|
children: topBar
|
|
@@ -11521,7 +11505,6 @@ var __publicField = (obj, key, value) => {
|
|
|
11521
11505
|
const {
|
|
11522
11506
|
i18n: i18n2
|
|
11523
11507
|
} = useTranslation();
|
|
11524
|
-
const kit = eagle.useUIKit();
|
|
11525
11508
|
const [selectedKeys, setSelectedKeys] = React.useState([]);
|
|
11526
11509
|
const component = React.useContext(ComponentContext);
|
|
11527
11510
|
const Table$1 = component.Table || Table;
|
|
@@ -11566,7 +11549,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11566
11549
|
type: ErrorContentType.Card
|
|
11567
11550
|
});
|
|
11568
11551
|
}
|
|
11569
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
11552
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, {
|
|
11570
11553
|
direction: "vertical",
|
|
11571
11554
|
className: "c1dicff8",
|
|
11572
11555
|
children: [hideToolbar ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(TableToolBar, {
|
|
@@ -11584,9 +11567,8 @@ var __publicField = (obj, key, value) => {
|
|
|
11584
11567
|
function FormErrorAlert(props) {
|
|
11585
11568
|
const { errorMsgs, style, className, isEdit } = props;
|
|
11586
11569
|
const { i18n: i18n2 } = useTranslation();
|
|
11587
|
-
const kit = eagle.useUIKit();
|
|
11588
11570
|
return errorMsgs.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11589
|
-
|
|
11571
|
+
eagle.Alert,
|
|
11590
11572
|
{
|
|
11591
11573
|
message: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
11592
11574
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: i18n2.t(isEdit ? "dovetail.save_failed_tip" : "dovetail.create_failed_tip") }),
|
|
@@ -11694,7 +11676,6 @@ var __publicField = (obj, key, value) => {
|
|
|
11694
11676
|
formRef: form,
|
|
11695
11677
|
renderContent
|
|
11696
11678
|
} = props;
|
|
11697
|
-
const kit = eagle.useUIKit();
|
|
11698
11679
|
const {
|
|
11699
11680
|
i18n: i18n2
|
|
11700
11681
|
} = useTranslation();
|
|
@@ -11714,7 +11695,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11714
11695
|
popModal();
|
|
11715
11696
|
reset();
|
|
11716
11697
|
}, [reset]);
|
|
11717
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
11698
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Modal, {
|
|
11718
11699
|
className: ModalStyle,
|
|
11719
11700
|
title: title || i18n2.t("dovetail.edit"),
|
|
11720
11701
|
confirmLoading: submitting,
|
|
@@ -11736,7 +11717,6 @@ var __publicField = (obj, key, value) => {
|
|
|
11736
11717
|
const {
|
|
11737
11718
|
modalProps
|
|
11738
11719
|
} = props;
|
|
11739
|
-
const kit = eagle.useUIKit();
|
|
11740
11720
|
const {
|
|
11741
11721
|
i18n: i18n2
|
|
11742
11722
|
} = useTranslation();
|
|
@@ -11747,7 +11727,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11747
11727
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
|
|
11748
11728
|
resource: resource == null ? void 0 : resource.name,
|
|
11749
11729
|
action: AccessControlAuth.Edit,
|
|
11750
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11730
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, {
|
|
11751
11731
|
className: EditButtonStyle,
|
|
11752
11732
|
type: "link",
|
|
11753
11733
|
onClick: () => {
|
|
@@ -11776,7 +11756,6 @@ var __publicField = (obj, key, value) => {
|
|
|
11776
11756
|
record,
|
|
11777
11757
|
label: label2
|
|
11778
11758
|
} = props;
|
|
11779
|
-
const kit = eagle.useUIKit();
|
|
11780
11759
|
const {
|
|
11781
11760
|
resource
|
|
11782
11761
|
} = core.useResource();
|
|
@@ -11813,7 +11792,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11813
11792
|
React.useImperativeHandle(ref, () => ({
|
|
11814
11793
|
submit
|
|
11815
11794
|
}), [submit]);
|
|
11816
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11795
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Form.Item, {
|
|
11817
11796
|
label: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
11818
11797
|
style: {
|
|
11819
11798
|
width: "134px"
|
|
@@ -11821,7 +11800,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11821
11800
|
children: label2
|
|
11822
11801
|
}),
|
|
11823
11802
|
colon: false,
|
|
11824
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11803
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Fields.Integer, {
|
|
11825
11804
|
style: {
|
|
11826
11805
|
width: "142px"
|
|
11827
11806
|
},
|
|
@@ -11846,7 +11825,6 @@ var __publicField = (obj, key, value) => {
|
|
|
11846
11825
|
record,
|
|
11847
11826
|
editable
|
|
11848
11827
|
}) {
|
|
11849
|
-
const kit = eagle.useUIKit();
|
|
11850
11828
|
const {
|
|
11851
11829
|
t: t2
|
|
11852
11830
|
} = useTranslation();
|
|
@@ -11874,7 +11852,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11874
11852
|
className: WorkloadReplicasWrapperStyle,
|
|
11875
11853
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
11876
11854
|
className: DonutChartWrapperStyle,
|
|
11877
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11855
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.DonutChart, {
|
|
11878
11856
|
className: DonutChartStyle,
|
|
11879
11857
|
data: donutData,
|
|
11880
11858
|
width: 70,
|
|
@@ -17805,7 +17783,6 @@ var __publicField = (obj, key, value) => {
|
|
|
17805
17783
|
pod: pod2
|
|
17806
17784
|
}) => {
|
|
17807
17785
|
var _a, _b, _c, _d, _e;
|
|
17808
|
-
const kit = eagle.useUIKit();
|
|
17809
17786
|
const [selectedContainer, setSelectedContainer] = React.useState(((_b = (_a = pod2.spec) == null ? void 0 : _a.containers[0]) == null ? void 0 : _b.name) || "");
|
|
17810
17787
|
const [logs, setLogs] = React.useState([]);
|
|
17811
17788
|
const [logType, setLogType] = React.useState("realtime");
|
|
@@ -17928,7 +17905,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17928
17905
|
className: ToolbarStyle,
|
|
17929
17906
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
|
|
17930
17907
|
className: ToolbarAreaStyle,
|
|
17931
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17908
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(eagle.SegmentControl, {
|
|
17932
17909
|
options: [{
|
|
17933
17910
|
label: t2("dovetail.realtime_log"),
|
|
17934
17911
|
value: "realtime"
|
|
@@ -17941,7 +17918,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17941
17918
|
setLogType(value2);
|
|
17942
17919
|
setLogs([]);
|
|
17943
17920
|
}
|
|
17944
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
17921
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Select, {
|
|
17945
17922
|
input: {
|
|
17946
17923
|
onChange: (newValue) => {
|
|
17947
17924
|
stopFetchingLogs();
|
|
@@ -17955,22 +17932,22 @@ var __publicField = (obj, key, value) => {
|
|
|
17955
17932
|
style: {
|
|
17956
17933
|
width: 200
|
|
17957
17934
|
},
|
|
17958
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17935
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(eagle.AntdOption, {
|
|
17959
17936
|
value: "",
|
|
17960
17937
|
disabled: true,
|
|
17961
17938
|
children: t2("dovetail.select_container")
|
|
17962
|
-
}), (((_e = pod2.spec) == null ? void 0 : _e.containers) || []).map((container2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17939
|
+
}), (((_e = pod2.spec) == null ? void 0 : _e.containers) || []).map((container2) => /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.AntdOption, {
|
|
17963
17940
|
value: container2.name,
|
|
17964
17941
|
children: container2.name
|
|
17965
17942
|
}, container2.name))]
|
|
17966
17943
|
})]
|
|
17967
17944
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
|
|
17968
17945
|
className: ToolbarAreaStyle,
|
|
17969
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17946
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Checkbox, {
|
|
17970
17947
|
checked: wrap,
|
|
17971
17948
|
onChange: (e2) => setWrap(e2.target.checked),
|
|
17972
17949
|
children: t2("dovetail.auto_wrap")
|
|
17973
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17950
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, {
|
|
17974
17951
|
onClick: () => setPaused((prev) => !prev),
|
|
17975
17952
|
prefixIcon: paused ? /* @__PURE__ */ jsxRuntimeExports.jsx(iconsReact.RecoverContinue16GradientBlueIcon, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(iconsReact.SuspendedPause16GradientBlueIcon, {}),
|
|
17976
17953
|
size: "middle",
|
|
@@ -18551,7 +18528,6 @@ var __publicField = (obj, key, value) => {
|
|
|
18551
18528
|
const {
|
|
18552
18529
|
saveButtonProps
|
|
18553
18530
|
} = props;
|
|
18554
|
-
const kit = eagle.useUIKit();
|
|
18555
18531
|
const {
|
|
18556
18532
|
resource,
|
|
18557
18533
|
action
|
|
@@ -18564,8 +18540,8 @@ var __publicField = (obj, key, value) => {
|
|
|
18564
18540
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
|
|
18565
18541
|
className: cx_default(eagle.Typo.Display.d2_bold_title, TitleStyle),
|
|
18566
18542
|
children: [(_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.kind, ":", " ", action === "create" ? t2("dovetail.create") : t2("dovetail.edit")]
|
|
18567
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18568
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18543
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Divider, {}), props.children, /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Form.Item, {
|
|
18544
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, {
|
|
18569
18545
|
type: "primary",
|
|
18570
18546
|
...saveButtonProps,
|
|
18571
18547
|
children: t2("dovetail.save")
|
|
@@ -18575,7 +18551,6 @@ var __publicField = (obj, key, value) => {
|
|
|
18575
18551
|
}
|
|
18576
18552
|
function WorkloadDropdown(props) {
|
|
18577
18553
|
const { record, size, children } = props;
|
|
18578
|
-
const kit = eagle.useUIKit();
|
|
18579
18554
|
const { resource } = core.useResource();
|
|
18580
18555
|
const { mutateAsync } = core.useUpdate();
|
|
18581
18556
|
const { t: t2 } = useTranslation();
|
|
@@ -18585,7 +18560,7 @@ var __publicField = (obj, key, value) => {
|
|
|
18585
18560
|
});
|
|
18586
18561
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(K8sDropdown, { record, size, children: [
|
|
18587
18562
|
(canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18588
|
-
|
|
18563
|
+
eagle.Menu.Item,
|
|
18589
18564
|
{
|
|
18590
18565
|
onClick: async () => {
|
|
18591
18566
|
const v = record.redeploy();
|
|
@@ -18629,7 +18604,6 @@ var __publicField = (obj, key, value) => {
|
|
|
18629
18604
|
}
|
|
18630
18605
|
function ReplicasDropdown(props) {
|
|
18631
18606
|
const { record, size, children } = props;
|
|
18632
|
-
const kit = eagle.useUIKit();
|
|
18633
18607
|
const { t: t2 } = useTranslation();
|
|
18634
18608
|
const pushModal = eagle.usePushModal();
|
|
18635
18609
|
const formRef = React.useRef(null);
|
|
@@ -18641,7 +18615,7 @@ var __publicField = (obj, key, value) => {
|
|
|
18641
18615
|
});
|
|
18642
18616
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(WorkloadDropdown, { record, size, children: [
|
|
18643
18617
|
isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18644
|
-
|
|
18618
|
+
eagle.Menu.Item,
|
|
18645
18619
|
{
|
|
18646
18620
|
onClick: () => {
|
|
18647
18621
|
const modalProps = {
|
|
@@ -18831,7 +18805,6 @@ var __publicField = (obj, key, value) => {
|
|
|
18831
18805
|
const NamespacesFilter = ({
|
|
18832
18806
|
className
|
|
18833
18807
|
}) => {
|
|
18834
|
-
const kit = eagle.useUIKit();
|
|
18835
18808
|
const {
|
|
18836
18809
|
t: t2
|
|
18837
18810
|
} = useTranslation();
|
|
@@ -18880,7 +18853,7 @@ var __publicField = (obj, key, value) => {
|
|
|
18880
18853
|
}, [calcTagMaxWidth]);
|
|
18881
18854
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
18882
18855
|
className: WRAPPER_CLASS,
|
|
18883
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
18856
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Select, {
|
|
18884
18857
|
loading: isLoading,
|
|
18885
18858
|
className: cx_default(SelectStyle, SELECT_CLASS, className),
|
|
18886
18859
|
style: {
|
|
@@ -18901,14 +18874,14 @@ var __publicField = (obj, key, value) => {
|
|
|
18901
18874
|
},
|
|
18902
18875
|
dropdownRender: (menu) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
18903
18876
|
className: SelectContentStyle,
|
|
18904
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18877
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(eagle.SearchInput, {
|
|
18905
18878
|
style: {
|
|
18906
18879
|
width: "100%"
|
|
18907
18880
|
},
|
|
18908
18881
|
className: SearchInputStyle,
|
|
18909
18882
|
onChange: debouncedSetSearch,
|
|
18910
18883
|
placeholder: t2("dovetail.please_input")
|
|
18911
|
-
}), menu, isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18884
|
+
}), menu, isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Loading, {}) : null]
|
|
18912
18885
|
}),
|
|
18913
18886
|
tagRender: ({
|
|
18914
18887
|
label: label2,
|
|
@@ -18927,17 +18900,17 @@ var __publicField = (obj, key, value) => {
|
|
|
18927
18900
|
marginLeft: 8
|
|
18928
18901
|
},
|
|
18929
18902
|
children: label2
|
|
18930
|
-
}) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18903
|
+
}) : /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Token, {
|
|
18931
18904
|
className: cx_default(isCountToken ? CountTokenStyle : TokenStyle, isCountToken ? "" : "closable-token"),
|
|
18932
18905
|
closable,
|
|
18933
18906
|
size: "medium",
|
|
18934
18907
|
onClose,
|
|
18935
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18936
|
-
content: isCountToken ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18908
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.OverflowTooltip, {
|
|
18909
|
+
content: isCountToken ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Tooltip, {
|
|
18937
18910
|
title: isCountToken ? value2.slice(MAX_TAG_COUNT).map((namespace2, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
18938
18911
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
18939
18912
|
children: namespace2
|
|
18940
|
-
}), index2 !== value2.length - 1 - MAX_TAG_COUNT ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18913
|
+
}), index2 !== value2.length - 1 - MAX_TAG_COUNT ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Divider, {
|
|
18941
18914
|
style: {
|
|
18942
18915
|
margin: "6px 0",
|
|
18943
18916
|
borderColor: "rgba(107, 128, 167, 0.60)"
|
|
@@ -18962,26 +18935,26 @@ var __publicField = (obj, key, value) => {
|
|
|
18962
18935
|
setOpen(open2);
|
|
18963
18936
|
},
|
|
18964
18937
|
multiple: true,
|
|
18965
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18938
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(eagle.AntdOption, {
|
|
18966
18939
|
value: "_all",
|
|
18967
18940
|
label: t2("dovetail.all_namespaces"),
|
|
18968
18941
|
className: AllNamespaceOptionStyle,
|
|
18969
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18942
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.OverflowTooltip, {
|
|
18970
18943
|
content: t2("dovetail.all_namespaces"),
|
|
18971
18944
|
className: LabelWrapperStyle
|
|
18972
18945
|
})
|
|
18973
|
-
}, "_all"), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18946
|
+
}, "_all"), /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.AntdSelectOptGroup, {
|
|
18974
18947
|
label: "",
|
|
18975
18948
|
className: SelectOptionGroupStyle,
|
|
18976
18949
|
children: data2 == null ? void 0 : data2.data.map((namespace2) => {
|
|
18977
18950
|
const {
|
|
18978
18951
|
name: name2
|
|
18979
18952
|
} = namespace2.metadata;
|
|
18980
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18953
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.AntdOption, {
|
|
18981
18954
|
value: name2,
|
|
18982
18955
|
label: name2,
|
|
18983
18956
|
className: OptionStyle,
|
|
18984
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18957
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.OverflowTooltip, {
|
|
18985
18958
|
content: name2,
|
|
18986
18959
|
className: LabelWrapperStyle
|
|
18987
18960
|
})
|
|
@@ -23124,7 +23097,6 @@ var __publicField = (obj, key, value) => {
|
|
|
23124
23097
|
eleRef,
|
|
23125
23098
|
className
|
|
23126
23099
|
} = props;
|
|
23127
|
-
const kit = eagle.useUIKit();
|
|
23128
23100
|
const { t: t2 } = useTranslation();
|
|
23129
23101
|
const [isCollapsed, setIsCollapsed] = React.useState(
|
|
23130
23102
|
collapsable ? isDefaultCollapsed : false
|
|
@@ -23184,14 +23156,14 @@ var __publicField = (obj, key, value) => {
|
|
|
23184
23156
|
ref: eleRef,
|
|
23185
23157
|
children: [
|
|
23186
23158
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
23187
|
-
|
|
23159
|
+
eagle.Space,
|
|
23188
23160
|
{
|
|
23189
23161
|
className: cx_default(ToolBarStyle, isCollapsed ? "collapsed" : ""),
|
|
23190
23162
|
direction: "vertical",
|
|
23191
23163
|
size: 0,
|
|
23192
23164
|
children: [
|
|
23193
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
23194
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
23165
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, { className: ToolBarHeaderStyle, children: [
|
|
23166
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, { size: 8, children: [
|
|
23195
23167
|
collapsable && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
23196
23168
|
eagle.Icon,
|
|
23197
23169
|
{
|
|
@@ -23205,10 +23177,10 @@ var __publicField = (obj, key, value) => {
|
|
|
23205
23177
|
),
|
|
23206
23178
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cx_default(TitleStyle$1, "yaml-editor-title"), children: title || t2("dovetail.configure_file") })
|
|
23207
23179
|
] }),
|
|
23208
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
23180
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, { size: 14, children: [
|
|
23209
23181
|
isDiff ? void 0 : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
23210
23182
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
23211
|
-
|
|
23183
|
+
eagle.Tooltip,
|
|
23212
23184
|
{
|
|
23213
23185
|
title: isCollapsed ? "" : copyTooltip,
|
|
23214
23186
|
onVisibleChange: (visible) => {
|
|
@@ -23239,7 +23211,7 @@ var __publicField = (obj, key, value) => {
|
|
|
23239
23211
|
),
|
|
23240
23212
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Separator, {}),
|
|
23241
23213
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
23242
|
-
|
|
23214
|
+
eagle.Tooltip,
|
|
23243
23215
|
{
|
|
23244
23216
|
title: isCollapsed ? "" : resetTooltip,
|
|
23245
23217
|
onVisibleChange: (visible) => {
|
|
@@ -23272,7 +23244,7 @@ var __publicField = (obj, key, value) => {
|
|
|
23272
23244
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Separator, {})
|
|
23273
23245
|
] }),
|
|
23274
23246
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
23275
|
-
|
|
23247
|
+
eagle.Tooltip,
|
|
23276
23248
|
{
|
|
23277
23249
|
title: isCollapsed ? "" : isDiff ? t2("dovetail.back_to_edit") : t2("dovetail.view_changes"),
|
|
23278
23250
|
children: isDiff ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -23302,7 +23274,7 @@ var __publicField = (obj, key, value) => {
|
|
|
23302
23274
|
)
|
|
23303
23275
|
] })
|
|
23304
23276
|
] }),
|
|
23305
|
-
errorMsgs.length ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
23277
|
+
errorMsgs.length ? /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, { className: ErrorWrapperStyle, size: 8, align: "start", children: [
|
|
23306
23278
|
/* @__PURE__ */ jsxRuntimeExports.jsx(iconsReact.XmarkFailedSeriousWarningFill16RedIcon, { className: ErrorIconStyle }),
|
|
23307
23279
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: errorMsgs.map((errorMsg, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("pre", { className: ErrorMsgStyle, children: [
|
|
23308
23280
|
errorMsgs.length > 1 ? `${index2 + 1}. ` : "",
|
|
@@ -23489,7 +23461,6 @@ var __publicField = (obj, key, value) => {
|
|
|
23489
23461
|
const [errorResponseBody, setErrorResponseBody] = React.useState(null);
|
|
23490
23462
|
const useResourceResult = core.useResource();
|
|
23491
23463
|
const { globalStore } = useGlobalStore();
|
|
23492
|
-
const kit = eagle.useUIKit();
|
|
23493
23464
|
const {
|
|
23494
23465
|
schema,
|
|
23495
23466
|
loading: isLoadingSchema,
|
|
@@ -23498,7 +23469,7 @@ var __publicField = (obj, key, value) => {
|
|
|
23498
23469
|
} = useSchema({
|
|
23499
23470
|
skip: editorOptions == null ? void 0 : editorOptions.isSkipSchema
|
|
23500
23471
|
});
|
|
23501
|
-
const [formAnt] =
|
|
23472
|
+
const [formAnt] = eagle.Form.useForm();
|
|
23502
23473
|
const formSF = sunflowerAntd.useForm({
|
|
23503
23474
|
form: formAnt
|
|
23504
23475
|
});
|
|
@@ -23732,7 +23703,6 @@ var __publicField = (obj, key, value) => {
|
|
|
23732
23703
|
},
|
|
23733
23704
|
...useFormProps
|
|
23734
23705
|
});
|
|
23735
|
-
const kit = eagle.useUIKit();
|
|
23736
23706
|
const {
|
|
23737
23707
|
t: t2,
|
|
23738
23708
|
i18n: i18n2
|
|
@@ -23768,7 +23738,7 @@ var __publicField = (obj, key, value) => {
|
|
|
23768
23738
|
}, [responseErrors, onErrorsChange]);
|
|
23769
23739
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(FormWrapper, {
|
|
23770
23740
|
...formWrapperProps,
|
|
23771
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
23741
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Form, {
|
|
23772
23742
|
...formProps,
|
|
23773
23743
|
initialValues: formProps.initialValues,
|
|
23774
23744
|
layout: "horizontal",
|
|
@@ -23776,10 +23746,10 @@ var __publicField = (obj, key, value) => {
|
|
|
23776
23746
|
onFinish,
|
|
23777
23747
|
children: (() => {
|
|
23778
23748
|
if (isLoadingSchema || (queryResult == null ? void 0 : queryResult.isLoading) && action === "edit") {
|
|
23779
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
23749
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Loading, {});
|
|
23780
23750
|
}
|
|
23781
23751
|
return editorProps.schema || schemaStrategy !== "Required" ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
23782
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
23752
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Form.Item, {
|
|
23783
23753
|
style: {
|
|
23784
23754
|
flex: 1
|
|
23785
23755
|
},
|
|
@@ -23789,7 +23759,7 @@ var __publicField = (obj, key, value) => {
|
|
|
23789
23759
|
schema,
|
|
23790
23760
|
collapsable: false
|
|
23791
23761
|
})
|
|
23792
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
23762
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Form.Item, {
|
|
23793
23763
|
children: mutationResult.error && /* @__PURE__ */ jsxRuntimeExports.jsx(FormErrorAlert, {
|
|
23794
23764
|
errorMsgs: errorResponseBody ? responseErrors : [mutationResult.error.message],
|
|
23795
23765
|
style: {
|
|
@@ -24013,7 +23983,6 @@ var __publicField = (obj, key, value) => {
|
|
|
24013
23983
|
function CronJobDropdown(props) {
|
|
24014
23984
|
const { record, size } = props;
|
|
24015
23985
|
const { spec } = record;
|
|
24016
|
-
const kit = eagle.useUIKit();
|
|
24017
23986
|
const { resource } = core.useResource();
|
|
24018
23987
|
const { mutateAsync } = core.useUpdate();
|
|
24019
23988
|
const { t: t2 } = useTranslation();
|
|
@@ -24023,7 +23992,7 @@ var __publicField = (obj, key, value) => {
|
|
|
24023
23992
|
});
|
|
24024
23993
|
const suspended2 = Boolean(spec == null ? void 0 : spec.suspend);
|
|
24025
23994
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(K8sDropdown, { record, size, children: (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24026
|
-
|
|
23995
|
+
eagle.Menu.Item,
|
|
24027
23996
|
{
|
|
24028
23997
|
onClick: async () => {
|
|
24029
23998
|
const v = suspended2 ? record.resume() : record.suspend();
|
|
@@ -24129,36 +24098,34 @@ var __publicField = (obj, key, value) => {
|
|
|
24129
24098
|
const DeleteButton = () => {
|
|
24130
24099
|
const { resource } = core.useResource();
|
|
24131
24100
|
const { id } = core.useParsed();
|
|
24132
|
-
const kit = eagle.useUIKit();
|
|
24133
24101
|
const { t: t2 } = useTranslation();
|
|
24134
24102
|
const { modalProps, visible, openDeleteConfirmModal } = useDeleteModal(
|
|
24135
24103
|
(resource == null ? void 0 : resource.name) || ""
|
|
24136
24104
|
);
|
|
24137
24105
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
24138
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24139
|
-
visible ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24106
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, { type: "primary", danger: true, onClick: () => openDeleteConfirmModal(id || ""), children: t2("dovetail.delete") }),
|
|
24107
|
+
visible ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Modal, { ...modalProps }) : null
|
|
24140
24108
|
] });
|
|
24141
24109
|
};
|
|
24142
24110
|
const index_1wt5px2 = "";
|
|
24143
24111
|
const MenuStyle = "mdppgn0";
|
|
24144
24112
|
const Menu = () => {
|
|
24145
|
-
const kit = eagle.useUIKit();
|
|
24146
24113
|
const {
|
|
24147
24114
|
menuItems,
|
|
24148
24115
|
selectedKey
|
|
24149
24116
|
} = core.useMenu();
|
|
24150
24117
|
function renderMenuItems(items) {
|
|
24151
|
-
return items.map((item) => item.list ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24118
|
+
return items.map((item) => item.list ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Menu.Item, {
|
|
24152
24119
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactRouterDom.NavLink, {
|
|
24153
24120
|
to: item.route || "",
|
|
24154
24121
|
children: item.label
|
|
24155
24122
|
})
|
|
24156
|
-
}, item.key) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24123
|
+
}, item.key) : /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.MenuItemGroup, {
|
|
24157
24124
|
title: item.name,
|
|
24158
24125
|
children: renderMenuItems(item.children)
|
|
24159
24126
|
}, item.key));
|
|
24160
24127
|
}
|
|
24161
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24128
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Menu, {
|
|
24162
24129
|
className: MenuStyle,
|
|
24163
24130
|
theme: "light",
|
|
24164
24131
|
selectedKeys: [selectedKey],
|
|
@@ -24173,21 +24140,20 @@ var __publicField = (obj, key, value) => {
|
|
|
24173
24140
|
const Layout = ({
|
|
24174
24141
|
children
|
|
24175
24142
|
}) => {
|
|
24176
|
-
const kit = eagle.useUIKit();
|
|
24177
24143
|
const [collapsed, setCollapsed] = React.useState(false);
|
|
24178
24144
|
const {
|
|
24179
24145
|
Header,
|
|
24180
24146
|
Content,
|
|
24181
24147
|
Sider
|
|
24182
|
-
} =
|
|
24183
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
24148
|
+
} = eagle.Layout;
|
|
24149
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Layout, {
|
|
24184
24150
|
style: {
|
|
24185
24151
|
height: "100%"
|
|
24186
24152
|
},
|
|
24187
24153
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Header, {
|
|
24188
24154
|
className: cx_default(HeaderStyle, eagle.Typo.Heading.h1_bold_title),
|
|
24189
24155
|
children: "Dovetail 2"
|
|
24190
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
24156
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Layout, {
|
|
24191
24157
|
className: ContentLayoutStyle,
|
|
24192
24158
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Sider, {
|
|
24193
24159
|
width: 256,
|
|
@@ -24205,7 +24171,6 @@ var __publicField = (obj, key, value) => {
|
|
|
24205
24171
|
};
|
|
24206
24172
|
const DrawerShow = (props) => {
|
|
24207
24173
|
var _a, _b;
|
|
24208
|
-
const kit = eagle.useUIKit();
|
|
24209
24174
|
const parsed = core.useParsed();
|
|
24210
24175
|
const nav = core.useNavigation();
|
|
24211
24176
|
const { queryResult } = core.useShow({ id: (_a = parsed == null ? void 0 : parsed.params) == null ? void 0 : _a.id });
|
|
@@ -24218,16 +24183,15 @@ var __publicField = (obj, key, value) => {
|
|
|
24218
24183
|
onClose: () => nav.goBack(),
|
|
24219
24184
|
width: "50%",
|
|
24220
24185
|
visible: !!((_b = parsed == null ? void 0 : parsed.params) == null ? void 0 : _b.id),
|
|
24221
|
-
children: isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24186
|
+
children: isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Loading, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(ShowContent, { ...props })
|
|
24222
24187
|
}
|
|
24223
24188
|
);
|
|
24224
24189
|
};
|
|
24225
24190
|
const EditButton = () => {
|
|
24226
24191
|
const { id } = core.useParsed();
|
|
24227
|
-
const kit = eagle.useUIKit();
|
|
24228
24192
|
const { edit: edit2 } = useEdit();
|
|
24229
24193
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24230
|
-
|
|
24194
|
+
eagle.Button,
|
|
24231
24195
|
{
|
|
24232
24196
|
type: "primary",
|
|
24233
24197
|
onClick: () => {
|
|
@@ -24294,11 +24258,10 @@ var __publicField = (obj, key, value) => {
|
|
|
24294
24258
|
);
|
|
24295
24259
|
}
|
|
24296
24260
|
const IngressRulesComponent = ({ ingress }) => {
|
|
24297
|
-
const kit = eagle.useUIKit();
|
|
24298
24261
|
const result = ingress.flattenedRules.map((r2) => {
|
|
24299
24262
|
const divider = " > ";
|
|
24300
24263
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24301
|
-
|
|
24264
|
+
eagle.OverflowTooltip,
|
|
24302
24265
|
{
|
|
24303
24266
|
content: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
24304
24267
|
/* @__PURE__ */ jsxRuntimeExports.jsx(LinkFallback, { fullPath: r2.fullPath }),
|
|
@@ -24335,12 +24298,11 @@ var __publicField = (obj, key, value) => {
|
|
|
24335
24298
|
id,
|
|
24336
24299
|
resource
|
|
24337
24300
|
} = props;
|
|
24338
|
-
const kit = eagle.useUIKit();
|
|
24339
24301
|
const go = core.useGo();
|
|
24340
24302
|
const navigation = core.useNavigation();
|
|
24341
24303
|
const parsed = core.useParsed();
|
|
24342
24304
|
const resourceName = resource || ((_a = parsed.resource) == null ? void 0 : _a.name) || "";
|
|
24343
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24305
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, {
|
|
24344
24306
|
type: "link",
|
|
24345
24307
|
onClick: () => {
|
|
24346
24308
|
go({
|
|
@@ -24485,7 +24447,6 @@ var __publicField = (obj, key, value) => {
|
|
|
24485
24447
|
isRelativeTime = true
|
|
24486
24448
|
} = {}) => {
|
|
24487
24449
|
const dataIndex = ["metadata", "creationTimestamp"];
|
|
24488
|
-
const kit = eagle.useUIKit();
|
|
24489
24450
|
return {
|
|
24490
24451
|
key: "creationTimestamp",
|
|
24491
24452
|
display: true,
|
|
@@ -24497,7 +24458,7 @@ var __publicField = (obj, key, value) => {
|
|
|
24497
24458
|
return isRelativeTime ? /* @__PURE__ */ jsxRuntimeExports.jsx(Time, {
|
|
24498
24459
|
date: new Date(value2)
|
|
24499
24460
|
}) : /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
|
24500
|
-
value: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24461
|
+
value: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Time, {
|
|
24501
24462
|
date: value2,
|
|
24502
24463
|
timeTemplate: "HH:mm:ss",
|
|
24503
24464
|
dateTemplate: "YYYY-MM-DD"
|
|
@@ -24999,25 +24960,27 @@ var __publicField = (obj, key, value) => {
|
|
|
24999
24960
|
}
|
|
25000
24961
|
) }) }) }) });
|
|
25001
24962
|
};
|
|
25002
|
-
const ModelMap = {
|
|
25003
|
-
Deployment: DeploymentModel,
|
|
25004
|
-
DaemonSet: DaemonSetModel,
|
|
25005
|
-
StatefulSet: StatefulSetModel,
|
|
25006
|
-
CronJob: CronJobModel,
|
|
25007
|
-
Job: JobModel,
|
|
25008
|
-
Pod: PodModel,
|
|
25009
|
-
Event: EventModel,
|
|
25010
|
-
Ingress: IngressModel,
|
|
25011
|
-
NetworkPolicy: NetworkPolicyModel,
|
|
25012
|
-
Service: ServiceModel,
|
|
25013
|
-
Node: NodeModel,
|
|
25014
|
-
StorageClass: StorageClassModel,
|
|
25015
|
-
PersistentVolume: PersistentVolumeModel,
|
|
25016
|
-
PersistentVolumeClaim: PersistentVolumeClaimModel
|
|
25017
|
-
};
|
|
25018
24963
|
class ModelPlugin {
|
|
25019
24964
|
constructor() {
|
|
25020
24965
|
__publicField(this, "_globalStore");
|
|
24966
|
+
__publicField(this, "ModelMap", new Map(
|
|
24967
|
+
Object.entries({
|
|
24968
|
+
Deployment: DeploymentModel,
|
|
24969
|
+
DaemonSet: DaemonSetModel,
|
|
24970
|
+
StatefulSet: StatefulSetModel,
|
|
24971
|
+
CronJob: CronJobModel,
|
|
24972
|
+
Job: JobModel,
|
|
24973
|
+
Pod: PodModel,
|
|
24974
|
+
Event: EventModel,
|
|
24975
|
+
Ingress: IngressModel,
|
|
24976
|
+
NetworkPolicy: NetworkPolicyModel,
|
|
24977
|
+
Service: ServiceModel,
|
|
24978
|
+
Node: NodeModel,
|
|
24979
|
+
StorageClass: StorageClassModel,
|
|
24980
|
+
PersistentVolume: PersistentVolumeModel,
|
|
24981
|
+
PersistentVolumeClaim: PersistentVolumeClaimModel
|
|
24982
|
+
})
|
|
24983
|
+
));
|
|
25021
24984
|
}
|
|
25022
24985
|
init(globalStore) {
|
|
25023
24986
|
this._globalStore = globalStore;
|
|
@@ -25038,7 +25001,7 @@ var __publicField = (obj, key, value) => {
|
|
|
25038
25001
|
};
|
|
25039
25002
|
}
|
|
25040
25003
|
async processItem(item) {
|
|
25041
|
-
const Model = ModelMap
|
|
25004
|
+
const Model = this.ModelMap.get(item.kind) || ResourceModel;
|
|
25042
25005
|
const result = new Model(item, this._globalStore);
|
|
25043
25006
|
await result.init();
|
|
25044
25007
|
return result;
|
|
@@ -25051,6 +25014,9 @@ var __publicField = (obj, key, value) => {
|
|
|
25051
25014
|
restoreItem(item) {
|
|
25052
25015
|
return item._rawYaml;
|
|
25053
25016
|
}
|
|
25017
|
+
setModelMap(key2, model) {
|
|
25018
|
+
this.ModelMap.set(key2, model);
|
|
25019
|
+
}
|
|
25054
25020
|
}
|
|
25055
25021
|
const modelPlugin = new ModelPlugin();
|
|
25056
25022
|
class RelationPlugin {
|
|
@@ -25248,6 +25214,7 @@ var __publicField = (obj, key, value) => {
|
|
|
25248
25214
|
exports2.Menu = Menu;
|
|
25249
25215
|
exports2.MetadataForm = MetadataForm;
|
|
25250
25216
|
exports2.ModalStyle = ModalStyle;
|
|
25217
|
+
exports2.ModelPlugin = ModelPlugin;
|
|
25251
25218
|
exports2.NETWORK_POLICY_INIT_VALUE = NETWORK_POLICY_INIT_VALUE;
|
|
25252
25219
|
exports2.NODE_INIT_VALUE = NODE_INIT_VALUE;
|
|
25253
25220
|
exports2.NS_STORE_KEY = NS_STORE_KEY;
|
|
@@ -25295,6 +25262,7 @@ var __publicField = (obj, key, value) => {
|
|
|
25295
25262
|
exports2.ReferenceLink = ReferenceLink;
|
|
25296
25263
|
exports2.RefineFormContent = RefineFormContent;
|
|
25297
25264
|
exports2.RefineFormPage = RefineFormPage;
|
|
25265
|
+
exports2.RelationPlugin = RelationPlugin;
|
|
25298
25266
|
exports2.ReplicaField = ReplicaField;
|
|
25299
25267
|
exports2.ReplicasColumnRenderer = ReplicasColumnRenderer;
|
|
25300
25268
|
exports2.ReplicasDropdown = ReplicasDropdown;
|
|
@@ -25372,7 +25340,9 @@ var __publicField = (obj, key, value) => {
|
|
|
25372
25340
|
exports2.addDefaultRenderToColumns = addDefaultRenderToColumns;
|
|
25373
25341
|
exports2.dnsSubDomainRules = dnsSubDomainRules;
|
|
25374
25342
|
exports2.dovetailRefineI18n = dovetailRefineI18n;
|
|
25343
|
+
exports2.modelPlugin = modelPlugin;
|
|
25375
25344
|
exports2.namespaceRules = namespaceRules;
|
|
25345
|
+
exports2.relationPlugin = relationPlugin;
|
|
25376
25346
|
exports2.rfc1035LabelRules = rfc1035LabelRules;
|
|
25377
25347
|
exports2.rfc1123LabelRules = rfc1123LabelRules;
|
|
25378
25348
|
exports2.routerProvider = routerProvider;
|