@dovetail-v2/refine 0.0.29 → 0.0.30
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-37f2db86.js → MonacoYamlDiffEditor-7505595f.js} +1 -1
- package/dist/{index-3716ce7b.js → index-d02782c8.js} +137 -144
- package/dist/refine.js +99 -100
- package/dist/refine.umd.cjs +40 -47
- package/lib/src/i18n.d.ts +0 -1
- package/lib/src/index.d.ts +0 -1
- package/lib/src/locales/index.d.ts +2 -115
- package/package.json +2 -2
|
@@ -337,7 +337,7 @@ const dovetail$1 = {
|
|
|
337
337
|
edit_resource: edit_resource$1,
|
|
338
338
|
status: status$1
|
|
339
339
|
};
|
|
340
|
-
const
|
|
340
|
+
const EN = {
|
|
341
341
|
dovetail: dovetail$1
|
|
342
342
|
};
|
|
343
343
|
const copy = "复制";
|
|
@@ -519,14 +519,13 @@ const dovetail = {
|
|
|
519
519
|
ingress_rule_type,
|
|
520
520
|
port
|
|
521
521
|
};
|
|
522
|
-
const
|
|
522
|
+
const ZH = {
|
|
523
523
|
dovetail
|
|
524
524
|
};
|
|
525
|
-
const
|
|
526
|
-
"en-US":
|
|
527
|
-
"zh-CN":
|
|
525
|
+
const resources = {
|
|
526
|
+
"en-US": EN,
|
|
527
|
+
"zh-CN": ZH
|
|
528
528
|
};
|
|
529
|
-
const resources = D2Locales;
|
|
530
529
|
i18n.use(initReactI18next).init({
|
|
531
530
|
supportedLngs: ["en-US", "zh-CN"],
|
|
532
531
|
resources,
|
|
@@ -536,11 +535,6 @@ i18n.use(initReactI18next).init({
|
|
|
536
535
|
lng: "zh-CN",
|
|
537
536
|
nsSeparator: "."
|
|
538
537
|
});
|
|
539
|
-
const useD2Translation = () => {
|
|
540
|
-
return useTranslation(void 0, {
|
|
541
|
-
i18n
|
|
542
|
-
});
|
|
543
|
-
};
|
|
544
538
|
var jsxRuntime = { exports: {} };
|
|
545
539
|
var reactJsxRuntime_production_min = {};
|
|
546
540
|
/** @license React v16.14.0
|
|
@@ -7093,7 +7087,7 @@ const useEagleForm = ({
|
|
|
7093
7087
|
var _a, _b, _c;
|
|
7094
7088
|
const editor = useRef(null);
|
|
7095
7089
|
const isFoldRef = useRef(false);
|
|
7096
|
-
const { t } =
|
|
7090
|
+
const { t } = useTranslation();
|
|
7097
7091
|
const [enableEditor, setEnableEditor] = useState(false);
|
|
7098
7092
|
const [isYamlValid, setIsYamlValid] = useState(true);
|
|
7099
7093
|
const [isSchemaValid, setIsSchemaValid] = useState(true);
|
|
@@ -7266,7 +7260,7 @@ const useDeleteModal = (resource) => {
|
|
|
7266
7260
|
const [visible, setVisible] = useState(false);
|
|
7267
7261
|
const navigation = useNavigation();
|
|
7268
7262
|
const [id, setId] = useState("");
|
|
7269
|
-
const { t } =
|
|
7263
|
+
const { t } = useTranslation();
|
|
7270
7264
|
const modalProps = {
|
|
7271
7265
|
title: t("dovetail.delete"),
|
|
7272
7266
|
okText: t("dovetail.delete"),
|
|
@@ -7532,7 +7526,7 @@ const WidgetErrorContent$1 = (props) => {
|
|
|
7532
7526
|
const kit = useContext(kitContext);
|
|
7533
7527
|
const {
|
|
7534
7528
|
t
|
|
7535
|
-
} =
|
|
7529
|
+
} = useTranslation();
|
|
7536
7530
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
7537
7531
|
className: ErrorWrapper$1,
|
|
7538
7532
|
style: props.style,
|
|
@@ -7875,7 +7869,7 @@ const Time = (props) => {
|
|
|
7875
7869
|
};
|
|
7876
7870
|
const ConditionsTable = ({ conditions = [] }) => {
|
|
7877
7871
|
const kit = useUIKit();
|
|
7878
|
-
const { t } =
|
|
7872
|
+
const { t } = useTranslation();
|
|
7879
7873
|
const conditionsWithId = addId(conditions, "type");
|
|
7880
7874
|
const columns = [
|
|
7881
7875
|
{
|
|
@@ -8061,7 +8055,7 @@ function Table(props) {
|
|
|
8061
8055
|
const kit = useUIKit();
|
|
8062
8056
|
const {
|
|
8063
8057
|
t
|
|
8064
|
-
} =
|
|
8058
|
+
} = useTranslation();
|
|
8065
8059
|
const {
|
|
8066
8060
|
loading,
|
|
8067
8061
|
error,
|
|
@@ -9778,7 +9772,7 @@ const WidgetErrorContent = (props) => {
|
|
|
9778
9772
|
const kit = useContext(kitContext);
|
|
9779
9773
|
const {
|
|
9780
9774
|
t
|
|
9781
|
-
} =
|
|
9775
|
+
} = useTranslation();
|
|
9782
9776
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorWrapper, {
|
|
9783
9777
|
className: props.className,
|
|
9784
9778
|
style: props.style,
|
|
@@ -9830,7 +9824,7 @@ function FormLayout(props) {
|
|
|
9830
9824
|
} = useResource();
|
|
9831
9825
|
const {
|
|
9832
9826
|
t
|
|
9833
|
-
} =
|
|
9827
|
+
} = useTranslation();
|
|
9834
9828
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
9835
9829
|
className: WrapperStyle$3,
|
|
9836
9830
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
|
|
@@ -9864,7 +9858,7 @@ const ErrorMsgStyle = "eh2qjnl";
|
|
|
9864
9858
|
const ErrorWrapperStyle = "e19q2bnp";
|
|
9865
9859
|
const YamlEditorStyle = "y16u5v3w";
|
|
9866
9860
|
const MonacoYamlEditor$2 = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$1));
|
|
9867
|
-
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-
|
|
9861
|
+
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-7505595f.js"));
|
|
9868
9862
|
const YamlEditorComponent = forwardRef(
|
|
9869
9863
|
function YamlEditorComponent2(props, ref) {
|
|
9870
9864
|
const {
|
|
@@ -9880,7 +9874,7 @@ const YamlEditorComponent = forwardRef(
|
|
|
9880
9874
|
className
|
|
9881
9875
|
} = props;
|
|
9882
9876
|
const kit = useUIKit();
|
|
9883
|
-
const { t } =
|
|
9877
|
+
const { t } = useTranslation();
|
|
9884
9878
|
const [isCollapsed, setIsCollapsed] = useState(
|
|
9885
9879
|
collapsable ? isDefaultCollapsed : false
|
|
9886
9880
|
);
|
|
@@ -10402,7 +10396,7 @@ function YamlForm(props) {
|
|
|
10402
10396
|
const {
|
|
10403
10397
|
t,
|
|
10404
10398
|
i18n: i18n2
|
|
10405
|
-
} =
|
|
10399
|
+
} = useTranslation();
|
|
10406
10400
|
const responseErrors = errorResponseBody ? getCommonErrors(errorResponseBody, i18n2) : [];
|
|
10407
10401
|
const FormWrapper = isShowLayout ? FormLayout : React__default.Fragment;
|
|
10408
10402
|
const schema = useMemo(() => {
|
|
@@ -10467,7 +10461,7 @@ function FormModal(props) {
|
|
|
10467
10461
|
} = props;
|
|
10468
10462
|
const {
|
|
10469
10463
|
i18n: i18n2
|
|
10470
|
-
} =
|
|
10464
|
+
} = useTranslation();
|
|
10471
10465
|
const {
|
|
10472
10466
|
resource
|
|
10473
10467
|
} = useResource();
|
|
@@ -10589,14 +10583,14 @@ function useOpenForm(options) {
|
|
|
10589
10583
|
}
|
|
10590
10584
|
function CreateButton() {
|
|
10591
10585
|
const kit = useUIKit();
|
|
10592
|
-
const { t } =
|
|
10586
|
+
const { t } = useTranslation();
|
|
10593
10587
|
const openForm = useOpenForm();
|
|
10594
10588
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, { type: "primary", onClick: openForm, children: t("dovetail.create") });
|
|
10595
10589
|
}
|
|
10596
10590
|
const useDeleteManyModal = (resource, ids) => {
|
|
10597
10591
|
const { mutate } = useDeleteMany();
|
|
10598
10592
|
const [visible, setVisible] = useState(false);
|
|
10599
|
-
const { t } =
|
|
10593
|
+
const { t } = useTranslation();
|
|
10600
10594
|
const modalProps = {
|
|
10601
10595
|
title: t("dovetail.delete"),
|
|
10602
10596
|
okText: t("dovetail.delete"),
|
|
@@ -10624,7 +10618,7 @@ const useDeleteManyModal = (resource, ids) => {
|
|
|
10624
10618
|
const DeleteManyButton = (props) => {
|
|
10625
10619
|
const { resource } = useResource();
|
|
10626
10620
|
const kit = useUIKit();
|
|
10627
|
-
const { t } =
|
|
10621
|
+
const { t } = useTranslation();
|
|
10628
10622
|
const { modalProps, visible, setVisible } = useDeleteManyModal(
|
|
10629
10623
|
(resource == null ? void 0 : resource.name) || "",
|
|
10630
10624
|
props.ids
|
|
@@ -10673,7 +10667,7 @@ const CronjobJobsTable = ({
|
|
|
10673
10667
|
}) => {
|
|
10674
10668
|
const {
|
|
10675
10669
|
i18n: i18n2
|
|
10676
|
-
} =
|
|
10670
|
+
} = useTranslation();
|
|
10677
10671
|
const kit = useUIKit();
|
|
10678
10672
|
const [selectedKeys, setSelectedKeys] = useState([]);
|
|
10679
10673
|
const [currentPage, setCurrentPage] = useState(1);
|
|
@@ -10715,7 +10709,7 @@ const CronjobJobsTable = ({
|
|
|
10715
10709
|
});
|
|
10716
10710
|
};
|
|
10717
10711
|
const EventsTable = ({}) => {
|
|
10718
|
-
const { i18n: i18n2 } =
|
|
10712
|
+
const { i18n: i18n2 } = useTranslation();
|
|
10719
10713
|
const [currentPage, setCurrentPage] = useState(1);
|
|
10720
10714
|
const { data: data2, isLoading } = useList({
|
|
10721
10715
|
resource: "events",
|
|
@@ -10791,7 +10785,7 @@ const ImageNames = ({
|
|
|
10791
10785
|
const kit = useUIKit();
|
|
10792
10786
|
const {
|
|
10793
10787
|
t
|
|
10794
|
-
} =
|
|
10788
|
+
} = useTranslation();
|
|
10795
10789
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
|
|
10796
10790
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
10797
10791
|
children: value[0]
|
|
@@ -10830,7 +10824,7 @@ const ResourceLink = (props) => {
|
|
|
10830
10824
|
};
|
|
10831
10825
|
const IngressRulesTable = ({ ingress }) => {
|
|
10832
10826
|
const kit = useUIKit();
|
|
10833
|
-
const { t } =
|
|
10827
|
+
const { t } = useTranslation();
|
|
10834
10828
|
const rows = useMemo(() => {
|
|
10835
10829
|
return addId(ingress.flattenedRules, "fullPath");
|
|
10836
10830
|
}, [ingress.flattenedRules]);
|
|
@@ -10937,7 +10931,7 @@ const WorkloadPodsTable = ({
|
|
|
10937
10931
|
}) => {
|
|
10938
10932
|
const {
|
|
10939
10933
|
i18n: i18n2
|
|
10940
|
-
} =
|
|
10934
|
+
} = useTranslation();
|
|
10941
10935
|
const kit = useUIKit();
|
|
10942
10936
|
const [selectedKeys, setSelectedKeys] = useState([]);
|
|
10943
10937
|
const [currentPage, setCurrentPage] = useState(1);
|
|
@@ -10983,7 +10977,7 @@ const WorkloadPodsTable = ({
|
|
|
10983
10977
|
};
|
|
10984
10978
|
function useSubmitForm(options) {
|
|
10985
10979
|
const { formRef, onSubmitSuccess } = options;
|
|
10986
|
-
const { i18n: i18n2 } =
|
|
10980
|
+
const { i18n: i18n2 } = useTranslation();
|
|
10987
10981
|
const [submitting, setSubmitting] = useState(false);
|
|
10988
10982
|
const [errorMsgs, setErrorMsgs] = useState([]);
|
|
10989
10983
|
const reset = useCallback(() => {
|
|
@@ -11030,7 +11024,7 @@ function EditFieldModal(props) {
|
|
|
11030
11024
|
const kit = useUIKit();
|
|
11031
11025
|
const {
|
|
11032
11026
|
i18n: i18n2
|
|
11033
|
-
} =
|
|
11027
|
+
} = useTranslation();
|
|
11034
11028
|
const {
|
|
11035
11029
|
submitting,
|
|
11036
11030
|
errorMsgs,
|
|
@@ -11067,7 +11061,7 @@ function EditField(props) {
|
|
|
11067
11061
|
const kit = useUIKit();
|
|
11068
11062
|
const {
|
|
11069
11063
|
i18n: i18n2
|
|
11070
|
-
} =
|
|
11064
|
+
} = useTranslation();
|
|
11071
11065
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
|
|
11072
11066
|
className: EditButtonStyle,
|
|
11073
11067
|
type: "link",
|
|
@@ -11351,7 +11345,7 @@ function K8sDropdown(props) {
|
|
|
11351
11345
|
(resource == null ? void 0 : resource.name) || ""
|
|
11352
11346
|
);
|
|
11353
11347
|
const download2 = useDownloadYAML();
|
|
11354
|
-
const { t } =
|
|
11348
|
+
const { t } = useTranslation();
|
|
11355
11349
|
const openForm = useOpenForm({ id: record.id });
|
|
11356
11350
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
11357
11351
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -11414,7 +11408,7 @@ function KeyValueData(props) {
|
|
|
11414
11408
|
const kit = useUIKit();
|
|
11415
11409
|
const {
|
|
11416
11410
|
t
|
|
11417
|
-
} =
|
|
11411
|
+
} = useTranslation();
|
|
11418
11412
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
11419
11413
|
className: WrapperStyle$1,
|
|
11420
11414
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
@@ -11610,7 +11604,7 @@ var WorkloadState = /* @__PURE__ */ ((WorkloadState2) => {
|
|
|
11610
11604
|
})(WorkloadState || {});
|
|
11611
11605
|
const StateTag = ({ state: state2 = WorkloadState.UPDATEING, className }) => {
|
|
11612
11606
|
const kit = useUIKit();
|
|
11613
|
-
const { t } =
|
|
11607
|
+
const { t } = useTranslation();
|
|
11614
11608
|
const colorMap = {
|
|
11615
11609
|
updating: "blue",
|
|
11616
11610
|
ready: "green",
|
|
@@ -11689,7 +11683,7 @@ const ShowContent = (props) => {
|
|
|
11689
11683
|
});
|
|
11690
11684
|
const {
|
|
11691
11685
|
t
|
|
11692
|
-
} =
|
|
11686
|
+
} = useTranslation();
|
|
11693
11687
|
const {
|
|
11694
11688
|
fold: fold2
|
|
11695
11689
|
} = useK8sYamlEditor();
|
|
@@ -11873,7 +11867,7 @@ const PodContainersTable = ({
|
|
|
11873
11867
|
initContainerStatuses
|
|
11874
11868
|
}) => {
|
|
11875
11869
|
const kit = useUIKit();
|
|
11876
|
-
const { i18n: i18n2 } =
|
|
11870
|
+
const { i18n: i18n2 } = useTranslation();
|
|
11877
11871
|
const columns = useMemo(
|
|
11878
11872
|
() => [
|
|
11879
11873
|
{
|
|
@@ -11967,7 +11961,7 @@ function WorkloadDropdown(props) {
|
|
|
11967
11961
|
const kit = useUIKit();
|
|
11968
11962
|
const { resource } = useResource();
|
|
11969
11963
|
const { mutate } = useUpdate();
|
|
11970
|
-
const { t } =
|
|
11964
|
+
const { t } = useTranslation();
|
|
11971
11965
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(K8sDropdown, { record, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11972
11966
|
kit.menu.Item,
|
|
11973
11967
|
{
|
|
@@ -12015,7 +12009,7 @@ function ListPage(props) {
|
|
|
12015
12009
|
}
|
|
12016
12010
|
function ResourceList(props) {
|
|
12017
12011
|
const { formatter, name: name2, columns, Dropdown } = props;
|
|
12018
|
-
const { i18n: i18n2 } =
|
|
12012
|
+
const { i18n: i18n2 } = useTranslation();
|
|
12019
12013
|
const { tableProps, selectedKeys } = useEagleTable({
|
|
12020
12014
|
useTableParams: {},
|
|
12021
12015
|
columns: [NameColumnRenderer(i18n2), ...columns],
|
|
@@ -12088,7 +12082,7 @@ function CronJobDropdown(props) {
|
|
|
12088
12082
|
const kit = useUIKit();
|
|
12089
12083
|
const { resource } = useResource();
|
|
12090
12084
|
const { mutate } = useUpdate();
|
|
12091
|
-
const { t } =
|
|
12085
|
+
const { t } = useTranslation();
|
|
12092
12086
|
const suspended2 = Boolean(spec == null ? void 0 : spec.suspend);
|
|
12093
12087
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(K8sDropdown, { record, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12094
12088
|
kit.menu.Item,
|
|
@@ -12243,7 +12237,7 @@ const DeleteButton = () => {
|
|
|
12243
12237
|
const { resource } = useResource();
|
|
12244
12238
|
const { id } = useParsed();
|
|
12245
12239
|
const kit = useUIKit();
|
|
12246
|
-
const { t } =
|
|
12240
|
+
const { t } = useTranslation();
|
|
12247
12241
|
const { modalProps, visible, openDeleteConfirmModal } = useDeleteModal(
|
|
12248
12242
|
(resource == null ? void 0 : resource.name) || ""
|
|
12249
12243
|
);
|
|
@@ -12417,7 +12411,7 @@ const useNamespacesFilter = () => {
|
|
|
12417
12411
|
};
|
|
12418
12412
|
const NamespacesFilter = () => {
|
|
12419
12413
|
const kit = useUIKit();
|
|
12420
|
-
const { t } =
|
|
12414
|
+
const { t } = useTranslation();
|
|
12421
12415
|
const { data: data2 } = useList({
|
|
12422
12416
|
resource: "namespaces",
|
|
12423
12417
|
meta: {
|
|
@@ -18153,7 +18147,7 @@ const PodLog = ({
|
|
|
18153
18147
|
const apiUrl = dataProvider2()["getApiUrl"]();
|
|
18154
18148
|
const {
|
|
18155
18149
|
t
|
|
18156
|
-
} =
|
|
18150
|
+
} = useTranslation();
|
|
18157
18151
|
useEffect(() => {
|
|
18158
18152
|
if (!paused && logs.length > 0) {
|
|
18159
18153
|
setCurrentItemCount(logs.length);
|
|
@@ -18305,7 +18299,7 @@ const NetworkPolicyRulesTable = ({ ingressOrEgress }) => {
|
|
|
18305
18299
|
};
|
|
18306
18300
|
const IngressRuleTable = ({ peers }) => {
|
|
18307
18301
|
const kit = useUIKit();
|
|
18308
|
-
const { t } =
|
|
18302
|
+
const { t } = useTranslation();
|
|
18309
18303
|
const rows = useMemo(() => {
|
|
18310
18304
|
const rows2 = (peers == null ? void 0 : peers.map((p) => {
|
|
18311
18305
|
return Object.keys(p).map((key) => {
|
|
@@ -19329,124 +19323,123 @@ const relationPlugin = new RelationPlugin();
|
|
|
19329
19323
|
const ProviderPlugins = [relationPlugin, modelPlugin];
|
|
19330
19324
|
const dovetailRefineI18n = i18n;
|
|
19331
19325
|
export {
|
|
19332
|
-
|
|
19326
|
+
DeleteButton as $,
|
|
19333
19327
|
AgeColumnRenderer as A,
|
|
19334
19328
|
Breadcrumb as B,
|
|
19335
19329
|
CommonSorter as C,
|
|
19336
|
-
|
|
19337
|
-
|
|
19338
|
-
|
|
19339
|
-
|
|
19340
|
-
|
|
19330
|
+
DurationColumnRenderer as D,
|
|
19331
|
+
WorkloadDropdown as E,
|
|
19332
|
+
CreateButton as F,
|
|
19333
|
+
ImageNames as G,
|
|
19334
|
+
ResourceList as H,
|
|
19341
19335
|
IngressRulesColumnRenderer as I,
|
|
19342
|
-
|
|
19336
|
+
ResourceShow as J,
|
|
19343
19337
|
KeyValueListWidget as K,
|
|
19344
|
-
|
|
19338
|
+
ResourceForm as L,
|
|
19345
19339
|
MetadataForm as M,
|
|
19346
19340
|
NameColumnRenderer as N,
|
|
19347
|
-
|
|
19341
|
+
ResourceCRUD as O,
|
|
19348
19342
|
PodWorkloadColumnRenderer as P,
|
|
19349
|
-
|
|
19343
|
+
WorkloadPodsTable as Q,
|
|
19350
19344
|
ReplicasColumnRenderer as R,
|
|
19351
19345
|
StateDisplayColumnRenderer as S,
|
|
19352
|
-
|
|
19353
|
-
|
|
19354
|
-
|
|
19346
|
+
CronJobDropdown as T,
|
|
19347
|
+
ResourceUsageBar as U,
|
|
19348
|
+
WorkloadReplicas as V,
|
|
19355
19349
|
WorkloadImageColumnRenderer as W,
|
|
19356
|
-
|
|
19357
|
-
|
|
19358
|
-
|
|
19359
|
-
|
|
19350
|
+
CronjobJobsTable as X,
|
|
19351
|
+
KeyValue as Y,
|
|
19352
|
+
Separator as Z,
|
|
19353
|
+
YamlEditorComponent as _,
|
|
19360
19354
|
useDeleteModal as a,
|
|
19361
|
-
|
|
19362
|
-
|
|
19363
|
-
|
|
19364
|
-
|
|
19365
|
-
|
|
19366
|
-
|
|
19367
|
-
|
|
19368
|
-
|
|
19369
|
-
|
|
19370
|
-
|
|
19371
|
-
|
|
19372
|
-
|
|
19373
|
-
|
|
19374
|
-
|
|
19375
|
-
|
|
19376
|
-
|
|
19377
|
-
|
|
19378
|
-
|
|
19379
|
-
|
|
19380
|
-
|
|
19381
|
-
|
|
19382
|
-
|
|
19383
|
-
|
|
19384
|
-
|
|
19385
|
-
|
|
19386
|
-
|
|
19387
|
-
|
|
19388
|
-
|
|
19389
|
-
|
|
19390
|
-
|
|
19391
|
-
|
|
19392
|
-
|
|
19393
|
-
|
|
19394
|
-
|
|
19395
|
-
|
|
19396
|
-
|
|
19397
|
-
|
|
19398
|
-
|
|
19399
|
-
|
|
19400
|
-
|
|
19401
|
-
|
|
19402
|
-
|
|
19403
|
-
|
|
19404
|
-
|
|
19405
|
-
|
|
19406
|
-
|
|
19407
|
-
|
|
19408
|
-
|
|
19409
|
-
|
|
19410
|
-
|
|
19411
|
-
|
|
19412
|
-
|
|
19413
|
-
|
|
19414
|
-
|
|
19415
|
-
|
|
19416
|
-
|
|
19417
|
-
|
|
19418
|
-
|
|
19419
|
-
|
|
19420
|
-
|
|
19421
|
-
|
|
19422
|
-
|
|
19423
|
-
|
|
19424
|
-
|
|
19355
|
+
StatefulSetModel as a$,
|
|
19356
|
+
Layout as a0,
|
|
19357
|
+
ImageField as a1,
|
|
19358
|
+
ReplicaField as a2,
|
|
19359
|
+
ConditionsField as a3,
|
|
19360
|
+
PodsField as a4,
|
|
19361
|
+
JobsField as a5,
|
|
19362
|
+
DataField as a6,
|
|
19363
|
+
SecretDataField as a7,
|
|
19364
|
+
StartTimeField as a8,
|
|
19365
|
+
ServiceTypeField as a9,
|
|
19366
|
+
DAEMONSET_INIT_VALUE as aA,
|
|
19367
|
+
JOB_INIT_VALUE as aB,
|
|
19368
|
+
STATEFULSET_INIT_VALUE as aC,
|
|
19369
|
+
POD_INIT_VALUE as aD,
|
|
19370
|
+
SERVICE_INIT_VALUE as aE,
|
|
19371
|
+
INGRESS_INIT_VALUE as aF,
|
|
19372
|
+
NETWORK_POLICY_INIT_VALUE as aG,
|
|
19373
|
+
TIMESTAMP_LABEL as aH,
|
|
19374
|
+
WorkloadState as aI,
|
|
19375
|
+
Dovetail as aJ,
|
|
19376
|
+
RESOURCE_GROUP as aK,
|
|
19377
|
+
FormType as aL,
|
|
19378
|
+
ComponentContext as aM,
|
|
19379
|
+
GlobalStoreContext as aN,
|
|
19380
|
+
ConfigsContext as aO,
|
|
19381
|
+
IngressModel as aP,
|
|
19382
|
+
NetworkPolicyModel as aQ,
|
|
19383
|
+
JobModel as aR,
|
|
19384
|
+
WorkloadModel as aS,
|
|
19385
|
+
WorkloadBaseModel as aT,
|
|
19386
|
+
PodModel as aU,
|
|
19387
|
+
PodMetricsModel as aV,
|
|
19388
|
+
ResourceModel as aW,
|
|
19389
|
+
CronJobModel as aX,
|
|
19390
|
+
EventModel as aY,
|
|
19391
|
+
DeploymentModel as aZ,
|
|
19392
|
+
DaemonSetModel as a_,
|
|
19393
|
+
ClusterIpField as aa,
|
|
19394
|
+
SessionAffinityField as ab,
|
|
19395
|
+
ServicePodsField as ac,
|
|
19396
|
+
IngressRulesTableTabField as ad,
|
|
19397
|
+
EventsTableTabField as ae,
|
|
19398
|
+
ShowContent as af,
|
|
19399
|
+
SchemaStrategy as ag,
|
|
19400
|
+
DeleteManyButton as ah,
|
|
19401
|
+
ListPage as ai,
|
|
19402
|
+
StateTag as aj,
|
|
19403
|
+
DrawerShow as ak,
|
|
19404
|
+
Menu as al,
|
|
19405
|
+
EditButton as am,
|
|
19406
|
+
ReferenceLink as an,
|
|
19407
|
+
ResourceLink as ao,
|
|
19408
|
+
NS_STORE_KEY as ap,
|
|
19409
|
+
ALL_NS as aq,
|
|
19410
|
+
useNamespacesFilter as ar,
|
|
19411
|
+
NamespacesFilter as as,
|
|
19412
|
+
Tags as at,
|
|
19413
|
+
PodLog as au,
|
|
19414
|
+
FormModal as av,
|
|
19415
|
+
NetworkPolicyRulesTable as aw,
|
|
19416
|
+
BASE_INIT_VALUE as ax,
|
|
19417
|
+
DEPLOYMENT_INIT_VALUE as ay,
|
|
19418
|
+
CRONJOB_INIT_VALUE as az,
|
|
19425
19419
|
NameSpaceColumnRenderer as b,
|
|
19426
|
-
|
|
19427
|
-
ProviderPlugins as b1,
|
|
19420
|
+
ProviderPlugins as b0,
|
|
19428
19421
|
WorkloadRestartsColumnRenderer as c,
|
|
19429
19422
|
dovetailRefineI18n as d,
|
|
19430
19423
|
NodeNameColumnRenderer as e,
|
|
19431
19424
|
RestartCountColumnRenderer as f,
|
|
19432
19425
|
CompletionsCountColumnRenderer as g,
|
|
19433
|
-
|
|
19434
|
-
|
|
19426
|
+
ServiceTypeColumnRenderer as h,
|
|
19427
|
+
IngressDefaultBackendColumnRenderer as i,
|
|
19435
19428
|
jsxRuntimeExports as j,
|
|
19436
|
-
|
|
19437
|
-
|
|
19438
|
-
|
|
19439
|
-
|
|
19440
|
-
|
|
19441
|
-
|
|
19442
|
-
|
|
19429
|
+
ColumnKeys as k,
|
|
19430
|
+
useEagleTable as l,
|
|
19431
|
+
useDownloadYAML as m,
|
|
19432
|
+
useEdit as n,
|
|
19433
|
+
useGlobalStore as o,
|
|
19434
|
+
NameInputWidget as p,
|
|
19435
|
+
dnsSubDomainRules as q,
|
|
19443
19436
|
routerProvider as r,
|
|
19444
|
-
|
|
19445
|
-
|
|
19437
|
+
rfc1123LabelRules as s,
|
|
19438
|
+
rfc1035LabelRules as t,
|
|
19446
19439
|
useSchema as u,
|
|
19447
|
-
|
|
19448
|
-
|
|
19449
|
-
|
|
19450
|
-
|
|
19451
|
-
|
|
19440
|
+
NamespaceSelectWidget as v,
|
|
19441
|
+
namespaceRules as w,
|
|
19442
|
+
PageShow as x,
|
|
19443
|
+
ConditionsTable as y,
|
|
19444
|
+
PodContainersTable as z
|
|
19452
19445
|
};
|
package/dist/refine.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aq, A, ax, B, az, aa, k, C, g, aM, a3, y, aO, F, T, aX, X, aA, ay, a_, a6, $, ah, aZ, aJ, ak, D, am, aY, ae, av, aL, aN, aF, a1, G, i, aP, I, ad, aB, aR, a5, Y, K, a0, ai, al, M, aG, ap, N, p, b, v, as, aQ, aw, e, aD, x, z, au, aV, aU, P, a4, b0, aK, an, a2, R, O, L, ao, H, aW, J, U, f, aE, aC, ag, a7, Z, ac, h, a9, ab, af, a8, S, aj, a$, aH, at, aT, E, W, aS, Q, V, c, aI, _, q, d, w, t, s, r, a, m, l, n, o, ar, u } from "./index-d02782c8.js";
|
|
2
2
|
import "@cloudtower/eagle";
|
|
3
3
|
import "@refinedev/core";
|
|
4
4
|
import "js-yaml";
|
|
@@ -15,123 +15,122 @@ import "react-dom";
|
|
|
15
15
|
import "antd";
|
|
16
16
|
import "k8s-api-provider";
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
aq as ALL_NS,
|
|
19
19
|
A as AgeColumnRenderer,
|
|
20
|
-
|
|
20
|
+
ax as BASE_INIT_VALUE,
|
|
21
21
|
B as Breadcrumb,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
az as CRONJOB_INIT_VALUE,
|
|
23
|
+
aa as ClusterIpField,
|
|
24
|
+
k as ColumnKeys,
|
|
25
25
|
C as CommonSorter,
|
|
26
26
|
g as CompletionsCountColumnRenderer,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
aQ as IngressModel,
|
|
27
|
+
aM as ComponentContext,
|
|
28
|
+
a3 as ConditionsField,
|
|
29
|
+
y as ConditionsTable,
|
|
30
|
+
aO as ConfigsContext,
|
|
31
|
+
F as CreateButton,
|
|
32
|
+
T as CronJobDropdown,
|
|
33
|
+
aX as CronJobModel,
|
|
34
|
+
X as CronjobJobsTable,
|
|
35
|
+
aA as DAEMONSET_INIT_VALUE,
|
|
36
|
+
ay as DEPLOYMENT_INIT_VALUE,
|
|
37
|
+
a_ as DaemonSetModel,
|
|
38
|
+
a6 as DataField,
|
|
39
|
+
$ as DeleteButton,
|
|
40
|
+
ah as DeleteManyButton,
|
|
41
|
+
aZ as DeploymentModel,
|
|
42
|
+
aJ as Dovetail,
|
|
43
|
+
ak as DrawerShow,
|
|
44
|
+
D as DurationColumnRenderer,
|
|
45
|
+
am as EditButton,
|
|
46
|
+
aY as EventModel,
|
|
47
|
+
ae as EventsTableTabField,
|
|
48
|
+
av as FormModal,
|
|
49
|
+
aL as FormType,
|
|
50
|
+
aN as GlobalStoreContext,
|
|
51
|
+
aF as INGRESS_INIT_VALUE,
|
|
52
|
+
a1 as ImageField,
|
|
53
|
+
G as ImageNames,
|
|
54
|
+
i as IngressDefaultBackendColumnRenderer,
|
|
55
|
+
aP as IngressModel,
|
|
57
56
|
I as IngressRulesColumnRenderer,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
ad as IngressRulesTableTabField,
|
|
58
|
+
aB as JOB_INIT_VALUE,
|
|
59
|
+
aR as JobModel,
|
|
60
|
+
a5 as JobsField,
|
|
61
|
+
Y as KeyValue,
|
|
63
62
|
K as KeyValueListWidget,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
a0 as Layout,
|
|
64
|
+
ai as ListPage,
|
|
65
|
+
al as Menu,
|
|
67
66
|
M as MetadataForm,
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
aG as NETWORK_POLICY_INIT_VALUE,
|
|
68
|
+
ap as NS_STORE_KEY,
|
|
70
69
|
N as NameColumnRenderer,
|
|
71
|
-
|
|
70
|
+
p as NameInputWidget,
|
|
72
71
|
b as NameSpaceColumnRenderer,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
v as NamespaceSelectWidget,
|
|
73
|
+
as as NamespacesFilter,
|
|
74
|
+
aQ as NetworkPolicyModel,
|
|
75
|
+
aw as NetworkPolicyRulesTable,
|
|
77
76
|
e as NodeNameColumnRenderer,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
77
|
+
aD as POD_INIT_VALUE,
|
|
78
|
+
x as PageShow,
|
|
79
|
+
z as PodContainersTable,
|
|
80
|
+
au as PodLog,
|
|
81
|
+
aV as PodMetricsModel,
|
|
82
|
+
aU as PodModel,
|
|
84
83
|
P as PodWorkloadColumnRenderer,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
a4 as PodsField,
|
|
85
|
+
b0 as ProviderPlugins,
|
|
86
|
+
aK as RESOURCE_GROUP,
|
|
87
|
+
an as ReferenceLink,
|
|
88
|
+
a2 as ReplicaField,
|
|
90
89
|
R as ReplicasColumnRenderer,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
90
|
+
O as ResourceCRUD,
|
|
91
|
+
L as ResourceForm,
|
|
92
|
+
ao as ResourceLink,
|
|
93
|
+
H as ResourceList,
|
|
94
|
+
aW as ResourceModel,
|
|
95
|
+
J as ResourceShow,
|
|
96
|
+
U as ResourceUsageBar,
|
|
98
97
|
f as RestartCountColumnRenderer,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
98
|
+
aE as SERVICE_INIT_VALUE,
|
|
99
|
+
aC as STATEFULSET_INIT_VALUE,
|
|
100
|
+
ag as SchemaStrategy,
|
|
101
|
+
a7 as SecretDataField,
|
|
102
|
+
Z as Separator,
|
|
103
|
+
ac as ServicePodsField,
|
|
104
|
+
h as ServiceTypeColumnRenderer,
|
|
105
|
+
a9 as ServiceTypeField,
|
|
106
|
+
ab as SessionAffinityField,
|
|
107
|
+
af as ShowContent,
|
|
108
|
+
a8 as StartTimeField,
|
|
110
109
|
S as StateDisplayColumnRenderer,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
110
|
+
aj as StateTag,
|
|
111
|
+
a$ as StatefulSetModel,
|
|
112
|
+
aH as TIMESTAMP_LABEL,
|
|
113
|
+
at as Tags,
|
|
114
|
+
aT as WorkloadBaseModel,
|
|
115
|
+
E as WorkloadDropdown,
|
|
117
116
|
W as WorkloadImageColumnRenderer,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
aS as WorkloadModel,
|
|
118
|
+
Q as WorkloadPodsTable,
|
|
119
|
+
V as WorkloadReplicas,
|
|
121
120
|
c as WorkloadRestartsColumnRenderer,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
aI as WorkloadState,
|
|
122
|
+
_ as YamlEditorComponent,
|
|
123
|
+
q as dnsSubDomainRules,
|
|
125
124
|
d as dovetailRefineI18n,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
125
|
+
w as namespaceRules,
|
|
126
|
+
t as rfc1035LabelRules,
|
|
127
|
+
s as rfc1123LabelRules,
|
|
129
128
|
r as routerProvider,
|
|
130
129
|
a as useDeleteModal,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
130
|
+
m as useDownloadYAML,
|
|
131
|
+
l as useEagleTable,
|
|
132
|
+
n as useEdit,
|
|
133
|
+
o as useGlobalStore,
|
|
134
|
+
ar as useNamespacesFilter,
|
|
136
135
|
u as useSchema
|
|
137
136
|
};
|
package/dist/refine.umd.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(global2, factory) {
|
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("i18next"), require("
|
|
3
|
-
})(this, function(exports2, i18n,
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("i18next"), require("@refinedev/core"), require("qs"), require("react"), require("react-router-dom"), require("@cloudtower/eagle"), require("js-yaml"), require("lodash-es"), require("sunflower-antd"), require("@cloudtower/icons-react"), require("monaco-editor"), require("monaco-yaml"), require("react-dom"), require("antd"), require("k8s-api-provider")) : typeof define === "function" && define.amd ? define(["exports", "i18next", "@refinedev/core", "qs", "react", "react-router-dom", "@cloudtower/eagle", "js-yaml", "lodash-es", "sunflower-antd", "@cloudtower/icons-react", "monaco-editor", "monaco-yaml", "react-dom", "antd", "k8s-api-provider"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.dovetail = {}, global2.i18n, global2.core, global2.qs, global2.React, global2.reactRouterDom, global2.eagle, global2.yaml, global2.lodashEs, global2.sunflowerAntd, global2.iconsReact, global2.monaco, global2.monacoYaml, global2.ReactDOM, global2.antd, global2.k8sApiProvider));
|
|
3
|
+
})(this, function(exports2, i18n, core, qs, React, reactRouterDom, eagle, yaml, lodashEs, sunflowerAntd, iconsReact, monaco, monacoYaml, ReactDOM, antd, k8sApiProvider) {
|
|
4
4
|
"use strict";var __defProp = Object.defineProperty;
|
|
5
5
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
6
|
var __publicField = (obj, key, value) => {
|
|
@@ -343,7 +343,7 @@ var __publicField = (obj, key, value) => {
|
|
|
343
343
|
edit_resource: edit_resource$1,
|
|
344
344
|
status: status$1
|
|
345
345
|
};
|
|
346
|
-
const
|
|
346
|
+
const EN = {
|
|
347
347
|
dovetail: dovetail$1
|
|
348
348
|
};
|
|
349
349
|
const copy = "复制";
|
|
@@ -525,14 +525,13 @@ var __publicField = (obj, key, value) => {
|
|
|
525
525
|
ingress_rule_type,
|
|
526
526
|
port
|
|
527
527
|
};
|
|
528
|
-
const
|
|
528
|
+
const ZH = {
|
|
529
529
|
dovetail
|
|
530
530
|
};
|
|
531
|
-
const
|
|
532
|
-
"en-US":
|
|
533
|
-
"zh-CN":
|
|
531
|
+
const resources = {
|
|
532
|
+
"en-US": EN,
|
|
533
|
+
"zh-CN": ZH
|
|
534
534
|
};
|
|
535
|
-
const resources = D2Locales;
|
|
536
535
|
i18n.use(initReactI18next).init({
|
|
537
536
|
supportedLngs: ["en-US", "zh-CN"],
|
|
538
537
|
resources,
|
|
@@ -542,11 +541,6 @@ var __publicField = (obj, key, value) => {
|
|
|
542
541
|
lng: "zh-CN",
|
|
543
542
|
nsSeparator: "."
|
|
544
543
|
});
|
|
545
|
-
const useD2Translation = () => {
|
|
546
|
-
return useTranslation(void 0, {
|
|
547
|
-
i18n
|
|
548
|
-
});
|
|
549
|
-
};
|
|
550
544
|
var jsxRuntime = { exports: {} };
|
|
551
545
|
var reactJsxRuntime_production_min = {};
|
|
552
546
|
/** @license React v16.14.0
|
|
@@ -7099,7 +7093,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7099
7093
|
var _a, _b, _c;
|
|
7100
7094
|
const editor = React.useRef(null);
|
|
7101
7095
|
const isFoldRef = React.useRef(false);
|
|
7102
|
-
const { t } =
|
|
7096
|
+
const { t } = useTranslation();
|
|
7103
7097
|
const [enableEditor, setEnableEditor] = React.useState(false);
|
|
7104
7098
|
const [isYamlValid, setIsYamlValid] = React.useState(true);
|
|
7105
7099
|
const [isSchemaValid, setIsSchemaValid] = React.useState(true);
|
|
@@ -7272,7 +7266,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7272
7266
|
const [visible, setVisible] = React.useState(false);
|
|
7273
7267
|
const navigation = core.useNavigation();
|
|
7274
7268
|
const [id, setId] = React.useState("");
|
|
7275
|
-
const { t } =
|
|
7269
|
+
const { t } = useTranslation();
|
|
7276
7270
|
const modalProps = {
|
|
7277
7271
|
title: t("dovetail.delete"),
|
|
7278
7272
|
okText: t("dovetail.delete"),
|
|
@@ -7538,7 +7532,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7538
7532
|
const kit = React.useContext(eagle.kitContext);
|
|
7539
7533
|
const {
|
|
7540
7534
|
t
|
|
7541
|
-
} =
|
|
7535
|
+
} = useTranslation();
|
|
7542
7536
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
7543
7537
|
className: ErrorWrapper$1,
|
|
7544
7538
|
style: props.style,
|
|
@@ -7881,7 +7875,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7881
7875
|
};
|
|
7882
7876
|
const ConditionsTable = ({ conditions = [] }) => {
|
|
7883
7877
|
const kit = eagle.useUIKit();
|
|
7884
|
-
const { t } =
|
|
7878
|
+
const { t } = useTranslation();
|
|
7885
7879
|
const conditionsWithId = addId(conditions, "type");
|
|
7886
7880
|
const columns = [
|
|
7887
7881
|
{
|
|
@@ -8067,7 +8061,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8067
8061
|
const kit = eagle.useUIKit();
|
|
8068
8062
|
const {
|
|
8069
8063
|
t
|
|
8070
|
-
} =
|
|
8064
|
+
} = useTranslation();
|
|
8071
8065
|
const {
|
|
8072
8066
|
loading,
|
|
8073
8067
|
error,
|
|
@@ -9784,7 +9778,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9784
9778
|
const kit = React.useContext(eagle.kitContext);
|
|
9785
9779
|
const {
|
|
9786
9780
|
t
|
|
9787
|
-
} =
|
|
9781
|
+
} = useTranslation();
|
|
9788
9782
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorWrapper, {
|
|
9789
9783
|
className: props.className,
|
|
9790
9784
|
style: props.style,
|
|
@@ -9836,7 +9830,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9836
9830
|
} = core.useResource();
|
|
9837
9831
|
const {
|
|
9838
9832
|
t
|
|
9839
|
-
} =
|
|
9833
|
+
} = useTranslation();
|
|
9840
9834
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
9841
9835
|
className: WrapperStyle$3,
|
|
9842
9836
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
|
|
@@ -9886,7 +9880,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9886
9880
|
className
|
|
9887
9881
|
} = props;
|
|
9888
9882
|
const kit = eagle.useUIKit();
|
|
9889
|
-
const { t } =
|
|
9883
|
+
const { t } = useTranslation();
|
|
9890
9884
|
const [isCollapsed, setIsCollapsed] = React.useState(
|
|
9891
9885
|
collapsable ? isDefaultCollapsed : false
|
|
9892
9886
|
);
|
|
@@ -10408,7 +10402,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10408
10402
|
const {
|
|
10409
10403
|
t,
|
|
10410
10404
|
i18n: i18n2
|
|
10411
|
-
} =
|
|
10405
|
+
} = useTranslation();
|
|
10412
10406
|
const responseErrors = errorResponseBody ? getCommonErrors(errorResponseBody, i18n2) : [];
|
|
10413
10407
|
const FormWrapper = isShowLayout ? FormLayout : React.Fragment;
|
|
10414
10408
|
const schema = React.useMemo(() => {
|
|
@@ -10473,7 +10467,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10473
10467
|
} = props;
|
|
10474
10468
|
const {
|
|
10475
10469
|
i18n: i18n2
|
|
10476
|
-
} =
|
|
10470
|
+
} = useTranslation();
|
|
10477
10471
|
const {
|
|
10478
10472
|
resource
|
|
10479
10473
|
} = core.useResource();
|
|
@@ -10595,14 +10589,14 @@ var __publicField = (obj, key, value) => {
|
|
|
10595
10589
|
}
|
|
10596
10590
|
function CreateButton() {
|
|
10597
10591
|
const kit = eagle.useUIKit();
|
|
10598
|
-
const { t } =
|
|
10592
|
+
const { t } = useTranslation();
|
|
10599
10593
|
const openForm = useOpenForm();
|
|
10600
10594
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, { type: "primary", onClick: openForm, children: t("dovetail.create") });
|
|
10601
10595
|
}
|
|
10602
10596
|
const useDeleteManyModal = (resource, ids) => {
|
|
10603
10597
|
const { mutate } = core.useDeleteMany();
|
|
10604
10598
|
const [visible, setVisible] = React.useState(false);
|
|
10605
|
-
const { t } =
|
|
10599
|
+
const { t } = useTranslation();
|
|
10606
10600
|
const modalProps = {
|
|
10607
10601
|
title: t("dovetail.delete"),
|
|
10608
10602
|
okText: t("dovetail.delete"),
|
|
@@ -10630,7 +10624,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10630
10624
|
const DeleteManyButton = (props) => {
|
|
10631
10625
|
const { resource } = core.useResource();
|
|
10632
10626
|
const kit = eagle.useUIKit();
|
|
10633
|
-
const { t } =
|
|
10627
|
+
const { t } = useTranslation();
|
|
10634
10628
|
const { modalProps, visible, setVisible } = useDeleteManyModal(
|
|
10635
10629
|
(resource == null ? void 0 : resource.name) || "",
|
|
10636
10630
|
props.ids
|
|
@@ -10679,7 +10673,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10679
10673
|
}) => {
|
|
10680
10674
|
const {
|
|
10681
10675
|
i18n: i18n2
|
|
10682
|
-
} =
|
|
10676
|
+
} = useTranslation();
|
|
10683
10677
|
const kit = eagle.useUIKit();
|
|
10684
10678
|
const [selectedKeys, setSelectedKeys] = React.useState([]);
|
|
10685
10679
|
const [currentPage, setCurrentPage] = React.useState(1);
|
|
@@ -10721,7 +10715,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10721
10715
|
});
|
|
10722
10716
|
};
|
|
10723
10717
|
const EventsTable = ({}) => {
|
|
10724
|
-
const { i18n: i18n2 } =
|
|
10718
|
+
const { i18n: i18n2 } = useTranslation();
|
|
10725
10719
|
const [currentPage, setCurrentPage] = React.useState(1);
|
|
10726
10720
|
const { data: data2, isLoading } = core.useList({
|
|
10727
10721
|
resource: "events",
|
|
@@ -10797,7 +10791,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10797
10791
|
const kit = eagle.useUIKit();
|
|
10798
10792
|
const {
|
|
10799
10793
|
t
|
|
10800
|
-
} =
|
|
10794
|
+
} = useTranslation();
|
|
10801
10795
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
|
|
10802
10796
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
10803
10797
|
children: value[0]
|
|
@@ -10836,7 +10830,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10836
10830
|
};
|
|
10837
10831
|
const IngressRulesTable = ({ ingress }) => {
|
|
10838
10832
|
const kit = eagle.useUIKit();
|
|
10839
|
-
const { t } =
|
|
10833
|
+
const { t } = useTranslation();
|
|
10840
10834
|
const rows = React.useMemo(() => {
|
|
10841
10835
|
return addId(ingress.flattenedRules, "fullPath");
|
|
10842
10836
|
}, [ingress.flattenedRules]);
|
|
@@ -10943,7 +10937,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10943
10937
|
}) => {
|
|
10944
10938
|
const {
|
|
10945
10939
|
i18n: i18n2
|
|
10946
|
-
} =
|
|
10940
|
+
} = useTranslation();
|
|
10947
10941
|
const kit = eagle.useUIKit();
|
|
10948
10942
|
const [selectedKeys, setSelectedKeys] = React.useState([]);
|
|
10949
10943
|
const [currentPage, setCurrentPage] = React.useState(1);
|
|
@@ -10989,7 +10983,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10989
10983
|
};
|
|
10990
10984
|
function useSubmitForm(options) {
|
|
10991
10985
|
const { formRef, onSubmitSuccess } = options;
|
|
10992
|
-
const { i18n: i18n2 } =
|
|
10986
|
+
const { i18n: i18n2 } = useTranslation();
|
|
10993
10987
|
const [submitting, setSubmitting] = React.useState(false);
|
|
10994
10988
|
const [errorMsgs, setErrorMsgs] = React.useState([]);
|
|
10995
10989
|
const reset = React.useCallback(() => {
|
|
@@ -11036,7 +11030,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11036
11030
|
const kit = eagle.useUIKit();
|
|
11037
11031
|
const {
|
|
11038
11032
|
i18n: i18n2
|
|
11039
|
-
} =
|
|
11033
|
+
} = useTranslation();
|
|
11040
11034
|
const {
|
|
11041
11035
|
submitting,
|
|
11042
11036
|
errorMsgs,
|
|
@@ -11073,7 +11067,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11073
11067
|
const kit = eagle.useUIKit();
|
|
11074
11068
|
const {
|
|
11075
11069
|
i18n: i18n2
|
|
11076
|
-
} =
|
|
11070
|
+
} = useTranslation();
|
|
11077
11071
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
|
|
11078
11072
|
className: EditButtonStyle,
|
|
11079
11073
|
type: "link",
|
|
@@ -11357,7 +11351,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11357
11351
|
(resource == null ? void 0 : resource.name) || ""
|
|
11358
11352
|
);
|
|
11359
11353
|
const download2 = useDownloadYAML();
|
|
11360
|
-
const { t } =
|
|
11354
|
+
const { t } = useTranslation();
|
|
11361
11355
|
const openForm = useOpenForm({ id: record.id });
|
|
11362
11356
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
11363
11357
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -11420,7 +11414,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11420
11414
|
const kit = eagle.useUIKit();
|
|
11421
11415
|
const {
|
|
11422
11416
|
t
|
|
11423
|
-
} =
|
|
11417
|
+
} = useTranslation();
|
|
11424
11418
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
11425
11419
|
className: WrapperStyle$1,
|
|
11426
11420
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
@@ -11616,7 +11610,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11616
11610
|
})(WorkloadState || {});
|
|
11617
11611
|
const StateTag = ({ state: state2 = WorkloadState.UPDATEING, className }) => {
|
|
11618
11612
|
const kit = eagle.useUIKit();
|
|
11619
|
-
const { t } =
|
|
11613
|
+
const { t } = useTranslation();
|
|
11620
11614
|
const colorMap = {
|
|
11621
11615
|
updating: "blue",
|
|
11622
11616
|
ready: "green",
|
|
@@ -11695,7 +11689,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11695
11689
|
});
|
|
11696
11690
|
const {
|
|
11697
11691
|
t
|
|
11698
|
-
} =
|
|
11692
|
+
} = useTranslation();
|
|
11699
11693
|
const {
|
|
11700
11694
|
fold: fold2
|
|
11701
11695
|
} = useK8sYamlEditor();
|
|
@@ -11879,7 +11873,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11879
11873
|
initContainerStatuses
|
|
11880
11874
|
}) => {
|
|
11881
11875
|
const kit = eagle.useUIKit();
|
|
11882
|
-
const { i18n: i18n2 } =
|
|
11876
|
+
const { i18n: i18n2 } = useTranslation();
|
|
11883
11877
|
const columns = React.useMemo(
|
|
11884
11878
|
() => [
|
|
11885
11879
|
{
|
|
@@ -11973,7 +11967,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11973
11967
|
const kit = eagle.useUIKit();
|
|
11974
11968
|
const { resource } = core.useResource();
|
|
11975
11969
|
const { mutate } = core.useUpdate();
|
|
11976
|
-
const { t } =
|
|
11970
|
+
const { t } = useTranslation();
|
|
11977
11971
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(K8sDropdown, { record, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11978
11972
|
kit.menu.Item,
|
|
11979
11973
|
{
|
|
@@ -12021,7 +12015,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12021
12015
|
}
|
|
12022
12016
|
function ResourceList(props) {
|
|
12023
12017
|
const { formatter, name: name2, columns, Dropdown } = props;
|
|
12024
|
-
const { i18n: i18n2 } =
|
|
12018
|
+
const { i18n: i18n2 } = useTranslation();
|
|
12025
12019
|
const { tableProps, selectedKeys } = useEagleTable({
|
|
12026
12020
|
useTableParams: {},
|
|
12027
12021
|
columns: [NameColumnRenderer(i18n2), ...columns],
|
|
@@ -12094,7 +12088,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12094
12088
|
const kit = eagle.useUIKit();
|
|
12095
12089
|
const { resource } = core.useResource();
|
|
12096
12090
|
const { mutate } = core.useUpdate();
|
|
12097
|
-
const { t } =
|
|
12091
|
+
const { t } = useTranslation();
|
|
12098
12092
|
const suspended2 = Boolean(spec == null ? void 0 : spec.suspend);
|
|
12099
12093
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(K8sDropdown, { record, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12100
12094
|
kit.menu.Item,
|
|
@@ -12249,7 +12243,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12249
12243
|
const { resource } = core.useResource();
|
|
12250
12244
|
const { id } = core.useParsed();
|
|
12251
12245
|
const kit = eagle.useUIKit();
|
|
12252
|
-
const { t } =
|
|
12246
|
+
const { t } = useTranslation();
|
|
12253
12247
|
const { modalProps, visible, openDeleteConfirmModal } = useDeleteModal(
|
|
12254
12248
|
(resource == null ? void 0 : resource.name) || ""
|
|
12255
12249
|
);
|
|
@@ -12423,7 +12417,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12423
12417
|
};
|
|
12424
12418
|
const NamespacesFilter = () => {
|
|
12425
12419
|
const kit = eagle.useUIKit();
|
|
12426
|
-
const { t } =
|
|
12420
|
+
const { t } = useTranslation();
|
|
12427
12421
|
const { data: data2 } = core.useList({
|
|
12428
12422
|
resource: "namespaces",
|
|
12429
12423
|
meta: {
|
|
@@ -18159,7 +18153,7 @@ var __publicField = (obj, key, value) => {
|
|
|
18159
18153
|
const apiUrl = dataProvider()["getApiUrl"]();
|
|
18160
18154
|
const {
|
|
18161
18155
|
t
|
|
18162
|
-
} =
|
|
18156
|
+
} = useTranslation();
|
|
18163
18157
|
React.useEffect(() => {
|
|
18164
18158
|
if (!paused && logs.length > 0) {
|
|
18165
18159
|
setCurrentItemCount(logs.length);
|
|
@@ -18311,7 +18305,7 @@ var __publicField = (obj, key, value) => {
|
|
|
18311
18305
|
};
|
|
18312
18306
|
const IngressRuleTable = ({ peers }) => {
|
|
18313
18307
|
const kit = eagle.useUIKit();
|
|
18314
|
-
const { t } =
|
|
18308
|
+
const { t } = useTranslation();
|
|
18315
18309
|
const rows = React.useMemo(() => {
|
|
18316
18310
|
const rows2 = (peers == null ? void 0 : peers.map((p) => {
|
|
18317
18311
|
return Object.keys(p).map((key) => {
|
|
@@ -19391,7 +19385,6 @@ var __publicField = (obj, key, value) => {
|
|
|
19391
19385
|
exports2.CronJobDropdown = CronJobDropdown;
|
|
19392
19386
|
exports2.CronJobModel = CronJobModel;
|
|
19393
19387
|
exports2.CronjobJobsTable = CronjobJobsTable;
|
|
19394
|
-
exports2.D2Locales = D2Locales;
|
|
19395
19388
|
exports2.DAEMONSET_INIT_VALUE = DAEMONSET_INIT_VALUE;
|
|
19396
19389
|
exports2.DEPLOYMENT_INIT_VALUE = DEPLOYMENT_INIT_VALUE;
|
|
19397
19390
|
exports2.DaemonSetModel = DaemonSetModel;
|
package/lib/src/i18n.d.ts
CHANGED
package/lib/src/index.d.ts
CHANGED
|
@@ -1,115 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
dovetail: {
|
|
4
|
-
copy: string;
|
|
5
|
-
reset_arguments: string;
|
|
6
|
-
view_changes: string;
|
|
7
|
-
back_to_edit: string;
|
|
8
|
-
configure_file: string;
|
|
9
|
-
yaml_format_wrong: string;
|
|
10
|
-
yaml_value_wrong: string;
|
|
11
|
-
edit_yaml: string;
|
|
12
|
-
copied: string;
|
|
13
|
-
already_reset: string;
|
|
14
|
-
fetch_schema_fail: string;
|
|
15
|
-
obtain_data_error: string;
|
|
16
|
-
retry: string;
|
|
17
|
-
create_resource: string;
|
|
18
|
-
edit_resource: string;
|
|
19
|
-
status: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
'zh-CN': {
|
|
23
|
-
dovetail: {
|
|
24
|
-
copy: string;
|
|
25
|
-
reset_arguments: string;
|
|
26
|
-
view_changes: string;
|
|
27
|
-
back_to_edit: string;
|
|
28
|
-
configure_file: string;
|
|
29
|
-
yaml_format_wrong: string;
|
|
30
|
-
yaml_value_wrong: string;
|
|
31
|
-
edit_yaml: string;
|
|
32
|
-
copied: string;
|
|
33
|
-
already_reset: string;
|
|
34
|
-
cancel: string;
|
|
35
|
-
delete: string;
|
|
36
|
-
create: string;
|
|
37
|
-
confirm_delete_text: string;
|
|
38
|
-
edit: string;
|
|
39
|
-
namespace: string;
|
|
40
|
-
name: string;
|
|
41
|
-
state: string;
|
|
42
|
-
status: string;
|
|
43
|
-
phase: string;
|
|
44
|
-
image: string;
|
|
45
|
-
replicas: string;
|
|
46
|
-
created_time: string;
|
|
47
|
-
label: string;
|
|
48
|
-
annotation: string;
|
|
49
|
-
type: string;
|
|
50
|
-
event: string;
|
|
51
|
-
reason: string;
|
|
52
|
-
object: string;
|
|
53
|
-
note: string;
|
|
54
|
-
condition: string;
|
|
55
|
-
download_yaml: string;
|
|
56
|
-
detail: string;
|
|
57
|
-
node_name: string;
|
|
58
|
-
restarts: string;
|
|
59
|
-
updated_time: string;
|
|
60
|
-
message: string;
|
|
61
|
-
save: string;
|
|
62
|
-
more: string;
|
|
63
|
-
workload: string;
|
|
64
|
-
all_namespaces: string;
|
|
65
|
-
empty: string;
|
|
66
|
-
schedule: string;
|
|
67
|
-
lastScheduleTime: string;
|
|
68
|
-
duration: string;
|
|
69
|
-
completions: string;
|
|
70
|
-
started: string;
|
|
71
|
-
init_container: string;
|
|
72
|
-
container: string;
|
|
73
|
-
redeploy: string;
|
|
74
|
-
data: string;
|
|
75
|
-
suspend: string;
|
|
76
|
-
resume: string;
|
|
77
|
-
cluster: string;
|
|
78
|
-
storage: string;
|
|
79
|
-
network: string;
|
|
80
|
-
clusterIp: string;
|
|
81
|
-
sessionAffinity: string;
|
|
82
|
-
log: string;
|
|
83
|
-
select_container: string;
|
|
84
|
-
wrap: string;
|
|
85
|
-
resume_log: string;
|
|
86
|
-
log_new_lines: string;
|
|
87
|
-
fetch_schema_fail: string;
|
|
88
|
-
obtain_data_error: string;
|
|
89
|
-
retry: string;
|
|
90
|
-
ready: string;
|
|
91
|
-
updating: string;
|
|
92
|
-
completed: string;
|
|
93
|
-
failed: string;
|
|
94
|
-
suspended: string;
|
|
95
|
-
running: string;
|
|
96
|
-
terminating: string;
|
|
97
|
-
succeeded: string;
|
|
98
|
-
unknown: string;
|
|
99
|
-
pending: string;
|
|
100
|
-
waiting: string;
|
|
101
|
-
create_resource: string;
|
|
102
|
-
edit_resource: string;
|
|
103
|
-
sec: string;
|
|
104
|
-
min: string;
|
|
105
|
-
hr: string;
|
|
106
|
-
day: string;
|
|
107
|
-
expand: string;
|
|
108
|
-
fold: string;
|
|
109
|
-
rule: string;
|
|
110
|
-
default_backend: string;
|
|
111
|
-
ingress_rule_type: string;
|
|
112
|
-
port: string;
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
|
-
};
|
|
1
|
+
import './en-US';
|
|
2
|
+
import './zh-CN';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dovetail-v2/refine",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.30",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"scripts": {
|
|
80
80
|
"dev": "refine dev",
|
|
81
81
|
"dev:test": "VITE_IS_TEST=true refine dev",
|
|
82
|
-
"build": "tsc && vite build",
|
|
82
|
+
"build": "tsc --emitDeclarationOnly && vite build",
|
|
83
83
|
"preview": "refine start",
|
|
84
84
|
"refine": "refine",
|
|
85
85
|
"unit-test": "jest",
|