@dovetail-v2/refine 0.0.21-beta.0 → 0.0.22
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-fd7edf86.js → MonacoYamlDiffEditor-a37a0ec8.js} +1 -1
- package/dist/{index-5f7b3e36.js → index-4e04c7fb.js} +96 -80
- package/dist/refine.js +6 -6
- package/dist/refine.umd.cjs +90 -74
- package/lib/src/Dovetail.d.ts +1 -4
- package/lib/src/components/ShowContent/fields.d.ts +12 -11
- package/lib/src/hooks/useEagleTable/columns.d.ts +16 -15
- package/lib/src/i18n.d.ts +1 -0
- package/lib/src/index.d.ts +1 -1
- package/lib/src/locales/en-US/index.d.ts +1 -0
- package/lib/src/pages/configmaps/index.d.ts +2 -1
- package/lib/src/pages/ingresses/index.d.ts +2 -1
- package/lib/src/pages/jobs/index.d.ts +2 -1
- package/lib/src/pages/networkPolicies/index.d.ts +2 -1
- package/lib/src/pages/secrets/index.d.ts +2 -1
- package/lib/src/pages/services/index.d.ts +2 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6
6
|
};
|
|
7
7
|
import i18n from "i18next";
|
|
8
8
|
import * as React from "react";
|
|
9
|
-
import React__default, { createContext, useContext, useState, useRef, useEffect,
|
|
9
|
+
import React__default, { createContext, useContext, useState, useRef, useEffect, useMemo, createElement, useCallback, forwardRef, useImperativeHandle, Suspense, useLayoutEffect, memo, PureComponent } from "react";
|
|
10
10
|
import { ResourceContext, matchResourceFromRoute, useResource, useForm as useForm$1, pickNotDeprecated, useWarnAboutChange, useDelete, useNavigation, useBreadcrumb, useList, useParsed, useGo, useDeleteMany, useUpdate, useShow, useMenu, useDataProvider, useTable, Refine } from "@refinedev/core";
|
|
11
11
|
import { parse, stringify } from "qs";
|
|
12
12
|
import { useLocation, useHistory, useParams, matchPath, Link, Route, NavLink, Router } from "react-router-dom";
|
|
@@ -303,6 +303,20 @@ function useTranslation(ns) {
|
|
|
303
303
|
}
|
|
304
304
|
});
|
|
305
305
|
}
|
|
306
|
+
function I18nextProvider(_ref) {
|
|
307
|
+
let {
|
|
308
|
+
i18n: i18n2,
|
|
309
|
+
defaultNS,
|
|
310
|
+
children
|
|
311
|
+
} = _ref;
|
|
312
|
+
const value = useMemo(() => ({
|
|
313
|
+
i18n: i18n2,
|
|
314
|
+
defaultNS
|
|
315
|
+
}), [i18n2, defaultNS]);
|
|
316
|
+
return createElement(I18nContext.Provider, {
|
|
317
|
+
value
|
|
318
|
+
}, children);
|
|
319
|
+
}
|
|
306
320
|
const copy$1 = "Copy";
|
|
307
321
|
const reset_arguments$1 = "Reset";
|
|
308
322
|
const view_changes$1 = "Show Diff";
|
|
@@ -318,6 +332,7 @@ const obtain_data_error$1 = "Having trouble getting data.";
|
|
|
318
332
|
const retry$1 = "Retry";
|
|
319
333
|
const create_resource$1 = "Create {{resource}}";
|
|
320
334
|
const edit_resource$1 = "Edit {{resource}}";
|
|
335
|
+
const status$1 = "Status";
|
|
321
336
|
const dovetail$1 = {
|
|
322
337
|
copy: copy$1,
|
|
323
338
|
reset_arguments: reset_arguments$1,
|
|
@@ -333,7 +348,8 @@ const dovetail$1 = {
|
|
|
333
348
|
obtain_data_error: obtain_data_error$1,
|
|
334
349
|
retry: retry$1,
|
|
335
350
|
create_resource: create_resource$1,
|
|
336
|
-
edit_resource: edit_resource$1
|
|
351
|
+
edit_resource: edit_resource$1,
|
|
352
|
+
status: status$1
|
|
337
353
|
};
|
|
338
354
|
const EN = {
|
|
339
355
|
dovetail: dovetail$1
|
|
@@ -9856,7 +9872,7 @@ const ErrorMsgStyle = "eh2qjnl";
|
|
|
9856
9872
|
const ErrorWrapperStyle = "e19q2bnp";
|
|
9857
9873
|
const YamlEditorStyle = "y16u5v3w";
|
|
9858
9874
|
const MonacoYamlEditor$2 = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$1));
|
|
9859
|
-
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-
|
|
9875
|
+
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-a37a0ec8.js"));
|
|
9860
9876
|
const YamlEditorComponent = forwardRef(
|
|
9861
9877
|
function YamlEditorComponent2(props, ref) {
|
|
9862
9878
|
const {
|
|
@@ -10663,6 +10679,9 @@ function matchOwner(job, owner) {
|
|
|
10663
10679
|
const CronjobJobsTable = ({
|
|
10664
10680
|
owner
|
|
10665
10681
|
}) => {
|
|
10682
|
+
const {
|
|
10683
|
+
i18n: i18n2
|
|
10684
|
+
} = useTranslation();
|
|
10666
10685
|
const kit = useUIKit();
|
|
10667
10686
|
const [selectedKeys, setSelectedKeys] = useState([]);
|
|
10668
10687
|
const [currentPage, setCurrentPage] = useState(1);
|
|
@@ -10680,7 +10699,7 @@ const CronjobJobsTable = ({
|
|
|
10680
10699
|
return owner ? matchOwner(p, owner) : true;
|
|
10681
10700
|
});
|
|
10682
10701
|
}, [data2 == null ? void 0 : data2.data, owner]);
|
|
10683
|
-
const columns = [NameColumnRenderer("jobs"), StateDisplayColumnRenderer(), NameSpaceColumnRenderer(), WorkloadImageColumnRenderer(), CompletionsCountColumnRenderer(), DurationColumnRenderer(), AgeColumnRenderer()];
|
|
10702
|
+
const columns = [NameColumnRenderer(i18n2, "jobs"), StateDisplayColumnRenderer(i18n2), NameSpaceColumnRenderer(i18n2), WorkloadImageColumnRenderer(i18n2), CompletionsCountColumnRenderer(i18n2), DurationColumnRenderer(i18n2), AgeColumnRenderer(i18n2)];
|
|
10684
10703
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
|
|
10685
10704
|
direction: "vertical",
|
|
10686
10705
|
className: "c16agr8o",
|
|
@@ -10713,7 +10732,7 @@ const EventsTable = ({}) => {
|
|
|
10713
10732
|
const parsed = useParsed();
|
|
10714
10733
|
const columns = useMemo(
|
|
10715
10734
|
() => [
|
|
10716
|
-
NameSpaceColumnRenderer(),
|
|
10735
|
+
NameSpaceColumnRenderer(i18n2),
|
|
10717
10736
|
{
|
|
10718
10737
|
key: "type",
|
|
10719
10738
|
display: true,
|
|
@@ -10746,7 +10765,7 @@ const EventsTable = ({}) => {
|
|
|
10746
10765
|
sortable: true,
|
|
10747
10766
|
sorter: CommonSorter(["note"])
|
|
10748
10767
|
},
|
|
10749
|
-
AgeColumnRenderer()
|
|
10768
|
+
AgeColumnRenderer(i18n2)
|
|
10750
10769
|
],
|
|
10751
10770
|
[i18n2]
|
|
10752
10771
|
);
|
|
@@ -10924,6 +10943,9 @@ const WorkloadPodsTable = ({
|
|
|
10924
10943
|
selector,
|
|
10925
10944
|
hideToolbar
|
|
10926
10945
|
}) => {
|
|
10946
|
+
const {
|
|
10947
|
+
i18n: i18n2
|
|
10948
|
+
} = useTranslation();
|
|
10927
10949
|
const kit = useUIKit();
|
|
10928
10950
|
const [selectedKeys, setSelectedKeys] = useState([]);
|
|
10929
10951
|
const [currentPage, setCurrentPage] = useState(1);
|
|
@@ -10944,7 +10966,7 @@ const WorkloadPodsTable = ({
|
|
|
10944
10966
|
return selector ? matchSelector(p, selector) : true;
|
|
10945
10967
|
});
|
|
10946
10968
|
}, [data2 == null ? void 0 : data2.data, selector]);
|
|
10947
|
-
const columns = [StateDisplayColumnRenderer(), NameColumnRenderer("pods"), NodeNameColumnRenderer(), WorkloadImageColumnRenderer(), RestartCountColumnRenderer()];
|
|
10969
|
+
const columns = [StateDisplayColumnRenderer(i18n2), NameColumnRenderer(i18n2, "pods"), NodeNameColumnRenderer(i18n2), WorkloadImageColumnRenderer(i18n2), RestartCountColumnRenderer(i18n2)];
|
|
10948
10970
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
|
|
10949
10971
|
direction: "vertical",
|
|
10950
10972
|
className: "c1dicff8",
|
|
@@ -11141,10 +11163,10 @@ function WorkloadReplicas({ record, label: label2, editable }) {
|
|
|
11141
11163
|
)
|
|
11142
11164
|
] });
|
|
11143
11165
|
}
|
|
11144
|
-
const ImageField = () => {
|
|
11166
|
+
const ImageField = (i18n2) => {
|
|
11145
11167
|
return {
|
|
11146
11168
|
key: "Image",
|
|
11147
|
-
title:
|
|
11169
|
+
title: i18n2.t("dovetail.image"),
|
|
11148
11170
|
path: ["imageNames"],
|
|
11149
11171
|
col: 12,
|
|
11150
11172
|
renderContent(value) {
|
|
@@ -11152,20 +11174,20 @@ const ImageField = () => {
|
|
|
11152
11174
|
}
|
|
11153
11175
|
};
|
|
11154
11176
|
};
|
|
11155
|
-
const ReplicaField = () => {
|
|
11177
|
+
const ReplicaField = (i18n2) => {
|
|
11156
11178
|
return {
|
|
11157
11179
|
key: "Replicas",
|
|
11158
|
-
title:
|
|
11180
|
+
title: i18n2.t("dovetail.replicas"),
|
|
11159
11181
|
path: ["status", "replicas"],
|
|
11160
11182
|
renderContent: (_, record, field) => {
|
|
11161
11183
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(WorkloadReplicas, { record, label: field.title, editable: true });
|
|
11162
11184
|
}
|
|
11163
11185
|
};
|
|
11164
11186
|
};
|
|
11165
|
-
const ConditionsField = () => {
|
|
11187
|
+
const ConditionsField = (i18n2) => {
|
|
11166
11188
|
return {
|
|
11167
11189
|
key: "Conditions",
|
|
11168
|
-
title:
|
|
11190
|
+
title: i18n2.t("dovetail.condition"),
|
|
11169
11191
|
path: ["status", "conditions"],
|
|
11170
11192
|
renderContent: (value) => {
|
|
11171
11193
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ConditionsTable, { conditions: value });
|
|
@@ -11213,20 +11235,20 @@ const JobsField = () => {
|
|
|
11213
11235
|
}
|
|
11214
11236
|
};
|
|
11215
11237
|
};
|
|
11216
|
-
const DataField = () => {
|
|
11238
|
+
const DataField = (i18n2) => {
|
|
11217
11239
|
return {
|
|
11218
11240
|
key: "data",
|
|
11219
|
-
title:
|
|
11241
|
+
title: i18n2.t("dovetail.data"),
|
|
11220
11242
|
path: ["data"],
|
|
11221
11243
|
renderContent: (val) => {
|
|
11222
11244
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValue, { value: val });
|
|
11223
11245
|
}
|
|
11224
11246
|
};
|
|
11225
11247
|
};
|
|
11226
|
-
const SecretDataField = () => {
|
|
11248
|
+
const SecretDataField = (i18n2) => {
|
|
11227
11249
|
return {
|
|
11228
11250
|
key: "data",
|
|
11229
|
-
title:
|
|
11251
|
+
title: i18n2.t("dovetail.data"),
|
|
11230
11252
|
path: ["data"],
|
|
11231
11253
|
renderContent: (val) => {
|
|
11232
11254
|
const decodeVal = {};
|
|
@@ -11237,10 +11259,10 @@ const SecretDataField = () => {
|
|
|
11237
11259
|
}
|
|
11238
11260
|
};
|
|
11239
11261
|
};
|
|
11240
|
-
const StartTimeField = () => {
|
|
11262
|
+
const StartTimeField = (i18n2) => {
|
|
11241
11263
|
return {
|
|
11242
11264
|
key: "started",
|
|
11243
|
-
title:
|
|
11265
|
+
title: i18n2.t("dovetail.started"),
|
|
11244
11266
|
path: ["status", "startTime"],
|
|
11245
11267
|
col: 12,
|
|
11246
11268
|
renderContent(value) {
|
|
@@ -11248,24 +11270,24 @@ const StartTimeField = () => {
|
|
|
11248
11270
|
}
|
|
11249
11271
|
};
|
|
11250
11272
|
};
|
|
11251
|
-
const ServiceTypeField = () => {
|
|
11273
|
+
const ServiceTypeField = (i18n2) => {
|
|
11252
11274
|
return {
|
|
11253
11275
|
key: "type",
|
|
11254
|
-
title:
|
|
11276
|
+
title: i18n2.t("dovetail.type"),
|
|
11255
11277
|
path: ["spec", "type"]
|
|
11256
11278
|
};
|
|
11257
11279
|
};
|
|
11258
|
-
const ClusterIpField = () => {
|
|
11280
|
+
const ClusterIpField = (i18n2) => {
|
|
11259
11281
|
return {
|
|
11260
11282
|
key: "clusterIp",
|
|
11261
|
-
title:
|
|
11283
|
+
title: i18n2.t("dovetail.clusterIp"),
|
|
11262
11284
|
path: ["spec", "clusterIP"]
|
|
11263
11285
|
};
|
|
11264
11286
|
};
|
|
11265
|
-
const SessionAffinityField = () => {
|
|
11287
|
+
const SessionAffinityField = (i18n2) => {
|
|
11266
11288
|
return {
|
|
11267
11289
|
key: "clusterIp",
|
|
11268
|
-
title:
|
|
11290
|
+
title: i18n2.t("dovetail.sessionAffinity"),
|
|
11269
11291
|
path: ["spec", "sessionAffinity"]
|
|
11270
11292
|
};
|
|
11271
11293
|
};
|
|
@@ -11287,20 +11309,20 @@ const ServicePodsField = () => {
|
|
|
11287
11309
|
}
|
|
11288
11310
|
};
|
|
11289
11311
|
};
|
|
11290
|
-
const IngressRulesTableTabField = () => {
|
|
11312
|
+
const IngressRulesTableTabField = (i18n2) => {
|
|
11291
11313
|
return {
|
|
11292
11314
|
key: "rules",
|
|
11293
|
-
title:
|
|
11315
|
+
title: i18n2.t("dovetail.rule"),
|
|
11294
11316
|
path: ["spec", "rules"],
|
|
11295
11317
|
renderContent: (_, record) => {
|
|
11296
11318
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(IngressRulesTable, { ingress: record });
|
|
11297
11319
|
}
|
|
11298
11320
|
};
|
|
11299
11321
|
};
|
|
11300
|
-
const EventsTableTabField = () => {
|
|
11322
|
+
const EventsTableTabField = (i18n2) => {
|
|
11301
11323
|
return {
|
|
11302
11324
|
key: "event",
|
|
11303
|
-
title:
|
|
11325
|
+
title: i18n2.t("dovetail.event"),
|
|
11304
11326
|
path: [],
|
|
11305
11327
|
renderContent: () => {
|
|
11306
11328
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(EventsTable, {});
|
|
@@ -12001,23 +12023,17 @@ function ListPage(props) {
|
|
|
12001
12023
|
}
|
|
12002
12024
|
function ResourceList(props) {
|
|
12003
12025
|
const { formatter, name: name2, columns, Dropdown } = props;
|
|
12026
|
+
const { i18n: i18n2 } = useTranslation();
|
|
12004
12027
|
const { tableProps, selectedKeys } = useEagleTable({
|
|
12005
12028
|
useTableParams: {},
|
|
12006
|
-
columns: [NameColumnRenderer(), ...columns],
|
|
12029
|
+
columns: [NameColumnRenderer(i18n2), ...columns],
|
|
12007
12030
|
tableProps: {
|
|
12008
12031
|
currentSize: 10
|
|
12009
12032
|
},
|
|
12010
12033
|
formatter,
|
|
12011
12034
|
Dropdown
|
|
12012
12035
|
});
|
|
12013
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12014
|
-
ListPage,
|
|
12015
|
-
{
|
|
12016
|
-
title: name2 || "",
|
|
12017
|
-
selectedKeys,
|
|
12018
|
-
tableProps
|
|
12019
|
-
}
|
|
12020
|
-
);
|
|
12036
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ListPage, { title: name2 || "", selectedKeys, tableProps });
|
|
12021
12037
|
}
|
|
12022
12038
|
function ResourceShow(props) {
|
|
12023
12039
|
const { formatter, showConfig, Dropdown } = props;
|
|
@@ -18465,13 +18481,13 @@ const CommonSorter = (dataIndex) => (a, b) => {
|
|
|
18465
18481
|
return 1;
|
|
18466
18482
|
return -1;
|
|
18467
18483
|
};
|
|
18468
|
-
const NameColumnRenderer = (resource = "") => {
|
|
18484
|
+
const NameColumnRenderer = (i18n2, resource = "") => {
|
|
18469
18485
|
const dataIndex = ["metadata", "name"];
|
|
18470
18486
|
return {
|
|
18471
18487
|
key: "name",
|
|
18472
18488
|
display: true,
|
|
18473
18489
|
dataIndex,
|
|
18474
|
-
title:
|
|
18490
|
+
title: i18n2.t("dovetail.name"),
|
|
18475
18491
|
sortable: true,
|
|
18476
18492
|
sorter: CommonSorter(dataIndex),
|
|
18477
18493
|
render: (v, record) => {
|
|
@@ -18479,36 +18495,36 @@ const NameColumnRenderer = (resource = "") => {
|
|
|
18479
18495
|
}
|
|
18480
18496
|
};
|
|
18481
18497
|
};
|
|
18482
|
-
const NameSpaceColumnRenderer = () => {
|
|
18498
|
+
const NameSpaceColumnRenderer = (i18n2) => {
|
|
18483
18499
|
const dataIndex = ["metadata", "namespace"];
|
|
18484
18500
|
return {
|
|
18485
18501
|
key: "namespace",
|
|
18486
18502
|
display: true,
|
|
18487
18503
|
dataIndex,
|
|
18488
|
-
title:
|
|
18504
|
+
title: i18n2.t("dovetail.namespace"),
|
|
18489
18505
|
sortable: true,
|
|
18490
18506
|
sorter: CommonSorter(dataIndex)
|
|
18491
18507
|
};
|
|
18492
18508
|
};
|
|
18493
|
-
const StateDisplayColumnRenderer = () => {
|
|
18509
|
+
const StateDisplayColumnRenderer = (i18n2) => {
|
|
18494
18510
|
const dataIndex = ["stateDisplay"];
|
|
18495
18511
|
return {
|
|
18496
18512
|
key: "stateDisplay",
|
|
18497
18513
|
display: true,
|
|
18498
18514
|
dataIndex,
|
|
18499
|
-
title:
|
|
18515
|
+
title: i18n2.t("dovetail.state"),
|
|
18500
18516
|
sortable: true,
|
|
18501
18517
|
sorter: CommonSorter(dataIndex),
|
|
18502
18518
|
render: (v) => /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, { state: v })
|
|
18503
18519
|
};
|
|
18504
18520
|
};
|
|
18505
|
-
const WorkloadImageColumnRenderer = () => {
|
|
18521
|
+
const WorkloadImageColumnRenderer = (i18n2) => {
|
|
18506
18522
|
const dataIndex = ["imageNames"];
|
|
18507
18523
|
return {
|
|
18508
18524
|
key: "image",
|
|
18509
18525
|
display: true,
|
|
18510
18526
|
dataIndex,
|
|
18511
|
-
title:
|
|
18527
|
+
title: i18n2.t("dovetail.image"),
|
|
18512
18528
|
sortable: true,
|
|
18513
18529
|
sorter: CommonSorter(dataIndex),
|
|
18514
18530
|
render(value, record) {
|
|
@@ -18516,23 +18532,23 @@ const WorkloadImageColumnRenderer = () => {
|
|
|
18516
18532
|
}
|
|
18517
18533
|
};
|
|
18518
18534
|
};
|
|
18519
|
-
const WorkloadRestartsColumnRenderer = () => {
|
|
18535
|
+
const WorkloadRestartsColumnRenderer = (i18n2) => {
|
|
18520
18536
|
const dataIndex = ["restarts"];
|
|
18521
18537
|
return {
|
|
18522
18538
|
key: "restarts",
|
|
18523
18539
|
display: true,
|
|
18524
18540
|
dataIndex,
|
|
18525
|
-
title:
|
|
18541
|
+
title: i18n2.t("dovetail.restarts"),
|
|
18526
18542
|
sortable: false
|
|
18527
18543
|
};
|
|
18528
18544
|
};
|
|
18529
|
-
const ReplicasColumnRenderer = () => {
|
|
18545
|
+
const ReplicasColumnRenderer = (i18n2) => {
|
|
18530
18546
|
const dataIndex = ["status", "replicas"];
|
|
18531
18547
|
return {
|
|
18532
18548
|
key: "replicas",
|
|
18533
18549
|
display: true,
|
|
18534
18550
|
dataIndex,
|
|
18535
|
-
title:
|
|
18551
|
+
title: i18n2.t("dovetail.replicas"),
|
|
18536
18552
|
sortable: true,
|
|
18537
18553
|
sorter: CommonSorter(dataIndex),
|
|
18538
18554
|
render: (_, record) => {
|
|
@@ -18544,13 +18560,13 @@ const ReplicasColumnRenderer = () => {
|
|
|
18544
18560
|
}
|
|
18545
18561
|
};
|
|
18546
18562
|
};
|
|
18547
|
-
const AgeColumnRenderer = () => {
|
|
18563
|
+
const AgeColumnRenderer = (i18n2) => {
|
|
18548
18564
|
const dataIndex = ["metadata", "creationTimestamp"];
|
|
18549
18565
|
return {
|
|
18550
18566
|
key: "creationTimestamp",
|
|
18551
18567
|
display: true,
|
|
18552
18568
|
dataIndex,
|
|
18553
|
-
title:
|
|
18569
|
+
title: i18n2.t("dovetail.created_time"),
|
|
18554
18570
|
sortable: true,
|
|
18555
18571
|
sorter: (a, b) => {
|
|
18556
18572
|
const valA = new Date(lodashExports.get(a, dataIndex));
|
|
@@ -18566,76 +18582,76 @@ const AgeColumnRenderer = () => {
|
|
|
18566
18582
|
}
|
|
18567
18583
|
};
|
|
18568
18584
|
};
|
|
18569
|
-
const NodeNameColumnRenderer = (options) => {
|
|
18585
|
+
const NodeNameColumnRenderer = (i18n2, options) => {
|
|
18570
18586
|
const dataIndex = ["spec", "nodeName"];
|
|
18571
18587
|
return {
|
|
18572
18588
|
key: "node",
|
|
18573
18589
|
display: true,
|
|
18574
18590
|
dataIndex,
|
|
18575
|
-
title:
|
|
18591
|
+
title: i18n2.t("dovetail.node_name"),
|
|
18576
18592
|
sortable: true,
|
|
18577
18593
|
sorter: CommonSorter(dataIndex),
|
|
18578
18594
|
...options
|
|
18579
18595
|
};
|
|
18580
18596
|
};
|
|
18581
|
-
const RestartCountColumnRenderer = () => {
|
|
18597
|
+
const RestartCountColumnRenderer = (i18n2) => {
|
|
18582
18598
|
const dataIndex = ["restartCount"];
|
|
18583
18599
|
return {
|
|
18584
18600
|
key: "restartCount",
|
|
18585
18601
|
display: true,
|
|
18586
18602
|
dataIndex,
|
|
18587
|
-
title:
|
|
18603
|
+
title: i18n2.t("dovetail.restarts"),
|
|
18588
18604
|
sortable: true,
|
|
18589
18605
|
sorter: CommonSorter(dataIndex)
|
|
18590
18606
|
};
|
|
18591
18607
|
};
|
|
18592
|
-
const CompletionsCountColumnRenderer = () => {
|
|
18608
|
+
const CompletionsCountColumnRenderer = (i18n2) => {
|
|
18593
18609
|
const dataIndex = ["completionsDisplay"];
|
|
18594
18610
|
return {
|
|
18595
18611
|
key: "completions",
|
|
18596
18612
|
display: true,
|
|
18597
18613
|
dataIndex,
|
|
18598
|
-
title:
|
|
18614
|
+
title: i18n2.t("completions"),
|
|
18599
18615
|
sortable: true,
|
|
18600
18616
|
sorter: CommonSorter(dataIndex)
|
|
18601
18617
|
};
|
|
18602
18618
|
};
|
|
18603
|
-
const DurationColumnRenderer = () => {
|
|
18619
|
+
const DurationColumnRenderer = (i18n2) => {
|
|
18604
18620
|
const dataIndex = ["duration"];
|
|
18605
18621
|
return {
|
|
18606
18622
|
key: "duration",
|
|
18607
18623
|
display: true,
|
|
18608
18624
|
dataIndex,
|
|
18609
|
-
title:
|
|
18625
|
+
title: i18n2.t("dovetail.duration"),
|
|
18610
18626
|
sortable: true,
|
|
18611
18627
|
sorter: CommonSorter(dataIndex),
|
|
18612
18628
|
render: (v) => {
|
|
18613
18629
|
const i18nMap = {
|
|
18614
|
-
sec:
|
|
18615
|
-
day:
|
|
18616
|
-
min:
|
|
18617
|
-
hr:
|
|
18630
|
+
sec: i18n2.t("dovetail.sec"),
|
|
18631
|
+
day: i18n2.t("dovetail.day"),
|
|
18632
|
+
min: i18n2.t("dovetail.min"),
|
|
18633
|
+
hr: i18n2.t("dovetail.hr")
|
|
18618
18634
|
};
|
|
18619
18635
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: elapsedTime(v, i18nMap).label || "-" });
|
|
18620
18636
|
}
|
|
18621
18637
|
};
|
|
18622
18638
|
};
|
|
18623
|
-
const ServiceTypeColumnRenderer = () => {
|
|
18639
|
+
const ServiceTypeColumnRenderer = (i18n2) => {
|
|
18624
18640
|
const dataIndex = ["spec", "type"];
|
|
18625
18641
|
return {
|
|
18626
18642
|
key: "type",
|
|
18627
|
-
title:
|
|
18643
|
+
title: i18n2.t("dovetail.type"),
|
|
18628
18644
|
display: true,
|
|
18629
18645
|
dataIndex,
|
|
18630
18646
|
sortable: true,
|
|
18631
18647
|
sorter: CommonSorter(dataIndex)
|
|
18632
18648
|
};
|
|
18633
18649
|
};
|
|
18634
|
-
const PodWorkloadColumnRenderer = () => {
|
|
18650
|
+
const PodWorkloadColumnRenderer = (i18n2) => {
|
|
18635
18651
|
const dataIndex = ["metadata", "ownerReferences"];
|
|
18636
18652
|
return {
|
|
18637
18653
|
key: "type",
|
|
18638
|
-
title:
|
|
18654
|
+
title: i18n2.t("dovetail.workload"),
|
|
18639
18655
|
display: true,
|
|
18640
18656
|
dataIndex,
|
|
18641
18657
|
sortable: true,
|
|
@@ -18652,11 +18668,11 @@ const PodWorkloadColumnRenderer = () => {
|
|
|
18652
18668
|
}
|
|
18653
18669
|
};
|
|
18654
18670
|
};
|
|
18655
|
-
const IngressRulesColumnRenderer = () => {
|
|
18671
|
+
const IngressRulesColumnRenderer = (i18n2) => {
|
|
18656
18672
|
const dataIndex = ["spec", "rules"];
|
|
18657
18673
|
return {
|
|
18658
18674
|
key: "type",
|
|
18659
|
-
title:
|
|
18675
|
+
title: i18n2.t("dovetail.rule"),
|
|
18660
18676
|
display: true,
|
|
18661
18677
|
dataIndex,
|
|
18662
18678
|
sortable: true,
|
|
@@ -18666,13 +18682,13 @@ const IngressRulesColumnRenderer = () => {
|
|
|
18666
18682
|
}
|
|
18667
18683
|
};
|
|
18668
18684
|
};
|
|
18669
|
-
const IngressDefaultBackendColumnRenderer = () => {
|
|
18685
|
+
const IngressDefaultBackendColumnRenderer = (i18n2) => {
|
|
18670
18686
|
const dataIndex = ["spec", "defaultBackend"];
|
|
18671
18687
|
return {
|
|
18672
18688
|
key: "defaultBackend",
|
|
18673
18689
|
display: true,
|
|
18674
18690
|
dataIndex,
|
|
18675
|
-
title:
|
|
18691
|
+
title: i18n2.t("dovetail.default_backend"),
|
|
18676
18692
|
sortable: true,
|
|
18677
18693
|
sorter: CommonSorter(["spec", "defaultBackend"]),
|
|
18678
18694
|
render: (defaultBackend, record) => {
|
|
@@ -18772,7 +18788,7 @@ const Dovetail = (props) => {
|
|
|
18772
18788
|
}
|
|
18773
18789
|
return _content;
|
|
18774
18790
|
}, [Layout2, notCustomResources, props.children, urlPrefix]);
|
|
18775
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Router, { history, children: /* @__PURE__ */ jsxRuntimeExports.jsx(KitStoreProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStoreContext.Provider, { value: { globalStore }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ConfigsContext.Provider, { value: keyBy(resourcesConfig, "name"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18791
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Router, { history, children: /* @__PURE__ */ jsxRuntimeExports.jsx(I18nextProvider, { i18n, children: /* @__PURE__ */ jsxRuntimeExports.jsx(KitStoreProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStoreContext.Provider, { value: { globalStore }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ConfigsContext.Provider, { value: keyBy(resourcesConfig, "name"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18776
18792
|
Refine,
|
|
18777
18793
|
{
|
|
18778
18794
|
dataProvider: {
|
|
@@ -18801,7 +18817,7 @@ const Dovetail = (props) => {
|
|
|
18801
18817
|
}),
|
|
18802
18818
|
children: content
|
|
18803
18819
|
}
|
|
18804
|
-
) }) }) }) });
|
|
18820
|
+
) }) }) }) }) });
|
|
18805
18821
|
};
|
|
18806
18822
|
class ResourceModel {
|
|
18807
18823
|
constructor(_rawYaml, _globalStore) {
|
|
@@ -19319,13 +19335,13 @@ class RelationPlugin {
|
|
|
19319
19335
|
}
|
|
19320
19336
|
const relationPlugin = new RelationPlugin();
|
|
19321
19337
|
const ProviderPlugins = [relationPlugin, modelPlugin];
|
|
19322
|
-
const
|
|
19338
|
+
const dovetailRefineI18n = i18n;
|
|
19323
19339
|
export {
|
|
19324
19340
|
DeleteButton as $,
|
|
19325
19341
|
AgeColumnRenderer as A,
|
|
19326
19342
|
Breadcrumb as B,
|
|
19327
19343
|
CommonSorter as C,
|
|
19328
|
-
|
|
19344
|
+
DurationColumnRenderer as D,
|
|
19329
19345
|
WorkloadDropdown as E,
|
|
19330
19346
|
CreateButton as F,
|
|
19331
19347
|
ImageNames as G,
|
|
@@ -19417,10 +19433,10 @@ export {
|
|
|
19417
19433
|
NameSpaceColumnRenderer as b,
|
|
19418
19434
|
ProviderPlugins as b0,
|
|
19419
19435
|
WorkloadRestartsColumnRenderer as c,
|
|
19420
|
-
|
|
19421
|
-
|
|
19422
|
-
|
|
19423
|
-
|
|
19436
|
+
dovetailRefineI18n as d,
|
|
19437
|
+
NodeNameColumnRenderer as e,
|
|
19438
|
+
RestartCountColumnRenderer as f,
|
|
19439
|
+
CompletionsCountColumnRenderer as g,
|
|
19424
19440
|
ServiceTypeColumnRenderer as h,
|
|
19425
19441
|
IngressDefaultBackendColumnRenderer as i,
|
|
19426
19442
|
jsxRuntimeExports as j,
|
package/dist/refine.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aq, A, ax, B, az, aa, k, C,
|
|
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-4e04c7fb.js";
|
|
2
2
|
import "@cloudtower/eagle";
|
|
3
3
|
import "@refinedev/core";
|
|
4
4
|
import "js-yaml";
|
|
@@ -23,7 +23,7 @@ export {
|
|
|
23
23
|
aa as ClusterIpField,
|
|
24
24
|
k as ColumnKeys,
|
|
25
25
|
C as CommonSorter,
|
|
26
|
-
|
|
26
|
+
g as CompletionsCountColumnRenderer,
|
|
27
27
|
aM as ComponentContext,
|
|
28
28
|
a3 as ConditionsField,
|
|
29
29
|
y as ConditionsTable,
|
|
@@ -40,9 +40,8 @@ export {
|
|
|
40
40
|
ah as DeleteManyButton,
|
|
41
41
|
aZ as DeploymentModel,
|
|
42
42
|
aJ as Dovetail,
|
|
43
|
-
D as DovetailRefineI18n,
|
|
44
43
|
ak as DrawerShow,
|
|
45
|
-
|
|
44
|
+
D as DurationColumnRenderer,
|
|
46
45
|
am as EditButton,
|
|
47
46
|
aY as EventModel,
|
|
48
47
|
ae as EventsTableTabField,
|
|
@@ -74,7 +73,7 @@ export {
|
|
|
74
73
|
as as NamespacesFilter,
|
|
75
74
|
aQ as NetworkPolicyModel,
|
|
76
75
|
aw as NetworkPolicyRulesTable,
|
|
77
|
-
|
|
76
|
+
e as NodeNameColumnRenderer,
|
|
78
77
|
aD as POD_INIT_VALUE,
|
|
79
78
|
x as PageShow,
|
|
80
79
|
z as PodContainersTable,
|
|
@@ -95,7 +94,7 @@ export {
|
|
|
95
94
|
aW as ResourceModel,
|
|
96
95
|
J as ResourceShow,
|
|
97
96
|
U as ResourceUsageBar,
|
|
98
|
-
|
|
97
|
+
f as RestartCountColumnRenderer,
|
|
99
98
|
aE as SERVICE_INIT_VALUE,
|
|
100
99
|
aC as STATEFULSET_INIT_VALUE,
|
|
101
100
|
ag as SchemaStrategy,
|
|
@@ -122,6 +121,7 @@ export {
|
|
|
122
121
|
aI as WorkloadState,
|
|
123
122
|
_ as YamlEditorComponent,
|
|
124
123
|
q as dnsSubDomainRules,
|
|
124
|
+
d as dovetailRefineI18n,
|
|
125
125
|
w as namespaceRules,
|
|
126
126
|
t as rfc1035LabelRules,
|
|
127
127
|
s as rfc1123LabelRules,
|
package/dist/refine.umd.cjs
CHANGED
|
@@ -309,6 +309,20 @@ var __publicField = (obj, key, value) => {
|
|
|
309
309
|
}
|
|
310
310
|
});
|
|
311
311
|
}
|
|
312
|
+
function I18nextProvider(_ref) {
|
|
313
|
+
let {
|
|
314
|
+
i18n: i18n2,
|
|
315
|
+
defaultNS,
|
|
316
|
+
children
|
|
317
|
+
} = _ref;
|
|
318
|
+
const value = React.useMemo(() => ({
|
|
319
|
+
i18n: i18n2,
|
|
320
|
+
defaultNS
|
|
321
|
+
}), [i18n2, defaultNS]);
|
|
322
|
+
return React.createElement(I18nContext.Provider, {
|
|
323
|
+
value
|
|
324
|
+
}, children);
|
|
325
|
+
}
|
|
312
326
|
const copy$1 = "Copy";
|
|
313
327
|
const reset_arguments$1 = "Reset";
|
|
314
328
|
const view_changes$1 = "Show Diff";
|
|
@@ -324,6 +338,7 @@ var __publicField = (obj, key, value) => {
|
|
|
324
338
|
const retry$1 = "Retry";
|
|
325
339
|
const create_resource$1 = "Create {{resource}}";
|
|
326
340
|
const edit_resource$1 = "Edit {{resource}}";
|
|
341
|
+
const status$1 = "Status";
|
|
327
342
|
const dovetail$1 = {
|
|
328
343
|
copy: copy$1,
|
|
329
344
|
reset_arguments: reset_arguments$1,
|
|
@@ -339,7 +354,8 @@ var __publicField = (obj, key, value) => {
|
|
|
339
354
|
obtain_data_error: obtain_data_error$1,
|
|
340
355
|
retry: retry$1,
|
|
341
356
|
create_resource: create_resource$1,
|
|
342
|
-
edit_resource: edit_resource$1
|
|
357
|
+
edit_resource: edit_resource$1,
|
|
358
|
+
status: status$1
|
|
343
359
|
};
|
|
344
360
|
const EN = {
|
|
345
361
|
dovetail: dovetail$1
|
|
@@ -10669,6 +10685,9 @@ var __publicField = (obj, key, value) => {
|
|
|
10669
10685
|
const CronjobJobsTable = ({
|
|
10670
10686
|
owner
|
|
10671
10687
|
}) => {
|
|
10688
|
+
const {
|
|
10689
|
+
i18n: i18n2
|
|
10690
|
+
} = useTranslation();
|
|
10672
10691
|
const kit = eagle.useUIKit();
|
|
10673
10692
|
const [selectedKeys, setSelectedKeys] = React.useState([]);
|
|
10674
10693
|
const [currentPage, setCurrentPage] = React.useState(1);
|
|
@@ -10686,7 +10705,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10686
10705
|
return owner ? matchOwner(p, owner) : true;
|
|
10687
10706
|
});
|
|
10688
10707
|
}, [data2 == null ? void 0 : data2.data, owner]);
|
|
10689
|
-
const columns = [NameColumnRenderer("jobs"), StateDisplayColumnRenderer(), NameSpaceColumnRenderer(), WorkloadImageColumnRenderer(), CompletionsCountColumnRenderer(), DurationColumnRenderer(), AgeColumnRenderer()];
|
|
10708
|
+
const columns = [NameColumnRenderer(i18n2, "jobs"), StateDisplayColumnRenderer(i18n2), NameSpaceColumnRenderer(i18n2), WorkloadImageColumnRenderer(i18n2), CompletionsCountColumnRenderer(i18n2), DurationColumnRenderer(i18n2), AgeColumnRenderer(i18n2)];
|
|
10690
10709
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
|
|
10691
10710
|
direction: "vertical",
|
|
10692
10711
|
className: "c16agr8o",
|
|
@@ -10719,7 +10738,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10719
10738
|
const parsed = core.useParsed();
|
|
10720
10739
|
const columns = React.useMemo(
|
|
10721
10740
|
() => [
|
|
10722
|
-
NameSpaceColumnRenderer(),
|
|
10741
|
+
NameSpaceColumnRenderer(i18n2),
|
|
10723
10742
|
{
|
|
10724
10743
|
key: "type",
|
|
10725
10744
|
display: true,
|
|
@@ -10752,7 +10771,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10752
10771
|
sortable: true,
|
|
10753
10772
|
sorter: CommonSorter(["note"])
|
|
10754
10773
|
},
|
|
10755
|
-
AgeColumnRenderer()
|
|
10774
|
+
AgeColumnRenderer(i18n2)
|
|
10756
10775
|
],
|
|
10757
10776
|
[i18n2]
|
|
10758
10777
|
);
|
|
@@ -10930,6 +10949,9 @@ var __publicField = (obj, key, value) => {
|
|
|
10930
10949
|
selector,
|
|
10931
10950
|
hideToolbar
|
|
10932
10951
|
}) => {
|
|
10952
|
+
const {
|
|
10953
|
+
i18n: i18n2
|
|
10954
|
+
} = useTranslation();
|
|
10933
10955
|
const kit = eagle.useUIKit();
|
|
10934
10956
|
const [selectedKeys, setSelectedKeys] = React.useState([]);
|
|
10935
10957
|
const [currentPage, setCurrentPage] = React.useState(1);
|
|
@@ -10950,7 +10972,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10950
10972
|
return selector ? matchSelector(p, selector) : true;
|
|
10951
10973
|
});
|
|
10952
10974
|
}, [data2 == null ? void 0 : data2.data, selector]);
|
|
10953
|
-
const columns = [StateDisplayColumnRenderer(), NameColumnRenderer("pods"), NodeNameColumnRenderer(), WorkloadImageColumnRenderer(), RestartCountColumnRenderer()];
|
|
10975
|
+
const columns = [StateDisplayColumnRenderer(i18n2), NameColumnRenderer(i18n2, "pods"), NodeNameColumnRenderer(i18n2), WorkloadImageColumnRenderer(i18n2), RestartCountColumnRenderer(i18n2)];
|
|
10954
10976
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
|
|
10955
10977
|
direction: "vertical",
|
|
10956
10978
|
className: "c1dicff8",
|
|
@@ -11147,10 +11169,10 @@ var __publicField = (obj, key, value) => {
|
|
|
11147
11169
|
)
|
|
11148
11170
|
] });
|
|
11149
11171
|
}
|
|
11150
|
-
const ImageField = () => {
|
|
11172
|
+
const ImageField = (i18n2) => {
|
|
11151
11173
|
return {
|
|
11152
11174
|
key: "Image",
|
|
11153
|
-
title:
|
|
11175
|
+
title: i18n2.t("dovetail.image"),
|
|
11154
11176
|
path: ["imageNames"],
|
|
11155
11177
|
col: 12,
|
|
11156
11178
|
renderContent(value) {
|
|
@@ -11158,20 +11180,20 @@ var __publicField = (obj, key, value) => {
|
|
|
11158
11180
|
}
|
|
11159
11181
|
};
|
|
11160
11182
|
};
|
|
11161
|
-
const ReplicaField = () => {
|
|
11183
|
+
const ReplicaField = (i18n2) => {
|
|
11162
11184
|
return {
|
|
11163
11185
|
key: "Replicas",
|
|
11164
|
-
title:
|
|
11186
|
+
title: i18n2.t("dovetail.replicas"),
|
|
11165
11187
|
path: ["status", "replicas"],
|
|
11166
11188
|
renderContent: (_, record, field) => {
|
|
11167
11189
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(WorkloadReplicas, { record, label: field.title, editable: true });
|
|
11168
11190
|
}
|
|
11169
11191
|
};
|
|
11170
11192
|
};
|
|
11171
|
-
const ConditionsField = () => {
|
|
11193
|
+
const ConditionsField = (i18n2) => {
|
|
11172
11194
|
return {
|
|
11173
11195
|
key: "Conditions",
|
|
11174
|
-
title:
|
|
11196
|
+
title: i18n2.t("dovetail.condition"),
|
|
11175
11197
|
path: ["status", "conditions"],
|
|
11176
11198
|
renderContent: (value) => {
|
|
11177
11199
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ConditionsTable, { conditions: value });
|
|
@@ -11219,20 +11241,20 @@ var __publicField = (obj, key, value) => {
|
|
|
11219
11241
|
}
|
|
11220
11242
|
};
|
|
11221
11243
|
};
|
|
11222
|
-
const DataField = () => {
|
|
11244
|
+
const DataField = (i18n2) => {
|
|
11223
11245
|
return {
|
|
11224
11246
|
key: "data",
|
|
11225
|
-
title:
|
|
11247
|
+
title: i18n2.t("dovetail.data"),
|
|
11226
11248
|
path: ["data"],
|
|
11227
11249
|
renderContent: (val) => {
|
|
11228
11250
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValue, { value: val });
|
|
11229
11251
|
}
|
|
11230
11252
|
};
|
|
11231
11253
|
};
|
|
11232
|
-
const SecretDataField = () => {
|
|
11254
|
+
const SecretDataField = (i18n2) => {
|
|
11233
11255
|
return {
|
|
11234
11256
|
key: "data",
|
|
11235
|
-
title:
|
|
11257
|
+
title: i18n2.t("dovetail.data"),
|
|
11236
11258
|
path: ["data"],
|
|
11237
11259
|
renderContent: (val) => {
|
|
11238
11260
|
const decodeVal = {};
|
|
@@ -11243,10 +11265,10 @@ var __publicField = (obj, key, value) => {
|
|
|
11243
11265
|
}
|
|
11244
11266
|
};
|
|
11245
11267
|
};
|
|
11246
|
-
const StartTimeField = () => {
|
|
11268
|
+
const StartTimeField = (i18n2) => {
|
|
11247
11269
|
return {
|
|
11248
11270
|
key: "started",
|
|
11249
|
-
title:
|
|
11271
|
+
title: i18n2.t("dovetail.started"),
|
|
11250
11272
|
path: ["status", "startTime"],
|
|
11251
11273
|
col: 12,
|
|
11252
11274
|
renderContent(value) {
|
|
@@ -11254,24 +11276,24 @@ var __publicField = (obj, key, value) => {
|
|
|
11254
11276
|
}
|
|
11255
11277
|
};
|
|
11256
11278
|
};
|
|
11257
|
-
const ServiceTypeField = () => {
|
|
11279
|
+
const ServiceTypeField = (i18n2) => {
|
|
11258
11280
|
return {
|
|
11259
11281
|
key: "type",
|
|
11260
|
-
title:
|
|
11282
|
+
title: i18n2.t("dovetail.type"),
|
|
11261
11283
|
path: ["spec", "type"]
|
|
11262
11284
|
};
|
|
11263
11285
|
};
|
|
11264
|
-
const ClusterIpField = () => {
|
|
11286
|
+
const ClusterIpField = (i18n2) => {
|
|
11265
11287
|
return {
|
|
11266
11288
|
key: "clusterIp",
|
|
11267
|
-
title:
|
|
11289
|
+
title: i18n2.t("dovetail.clusterIp"),
|
|
11268
11290
|
path: ["spec", "clusterIP"]
|
|
11269
11291
|
};
|
|
11270
11292
|
};
|
|
11271
|
-
const SessionAffinityField = () => {
|
|
11293
|
+
const SessionAffinityField = (i18n2) => {
|
|
11272
11294
|
return {
|
|
11273
11295
|
key: "clusterIp",
|
|
11274
|
-
title:
|
|
11296
|
+
title: i18n2.t("dovetail.sessionAffinity"),
|
|
11275
11297
|
path: ["spec", "sessionAffinity"]
|
|
11276
11298
|
};
|
|
11277
11299
|
};
|
|
@@ -11293,20 +11315,20 @@ var __publicField = (obj, key, value) => {
|
|
|
11293
11315
|
}
|
|
11294
11316
|
};
|
|
11295
11317
|
};
|
|
11296
|
-
const IngressRulesTableTabField = () => {
|
|
11318
|
+
const IngressRulesTableTabField = (i18n2) => {
|
|
11297
11319
|
return {
|
|
11298
11320
|
key: "rules",
|
|
11299
|
-
title:
|
|
11321
|
+
title: i18n2.t("dovetail.rule"),
|
|
11300
11322
|
path: ["spec", "rules"],
|
|
11301
11323
|
renderContent: (_, record) => {
|
|
11302
11324
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(IngressRulesTable, { ingress: record });
|
|
11303
11325
|
}
|
|
11304
11326
|
};
|
|
11305
11327
|
};
|
|
11306
|
-
const EventsTableTabField = () => {
|
|
11328
|
+
const EventsTableTabField = (i18n2) => {
|
|
11307
11329
|
return {
|
|
11308
11330
|
key: "event",
|
|
11309
|
-
title:
|
|
11331
|
+
title: i18n2.t("dovetail.event"),
|
|
11310
11332
|
path: [],
|
|
11311
11333
|
renderContent: () => {
|
|
11312
11334
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(EventsTable, {});
|
|
@@ -12007,23 +12029,17 @@ var __publicField = (obj, key, value) => {
|
|
|
12007
12029
|
}
|
|
12008
12030
|
function ResourceList(props) {
|
|
12009
12031
|
const { formatter, name: name2, columns, Dropdown } = props;
|
|
12032
|
+
const { i18n: i18n2 } = useTranslation();
|
|
12010
12033
|
const { tableProps, selectedKeys } = useEagleTable({
|
|
12011
12034
|
useTableParams: {},
|
|
12012
|
-
columns: [NameColumnRenderer(), ...columns],
|
|
12035
|
+
columns: [NameColumnRenderer(i18n2), ...columns],
|
|
12013
12036
|
tableProps: {
|
|
12014
12037
|
currentSize: 10
|
|
12015
12038
|
},
|
|
12016
12039
|
formatter,
|
|
12017
12040
|
Dropdown
|
|
12018
12041
|
});
|
|
12019
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12020
|
-
ListPage,
|
|
12021
|
-
{
|
|
12022
|
-
title: name2 || "",
|
|
12023
|
-
selectedKeys,
|
|
12024
|
-
tableProps
|
|
12025
|
-
}
|
|
12026
|
-
);
|
|
12042
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ListPage, { title: name2 || "", selectedKeys, tableProps });
|
|
12027
12043
|
}
|
|
12028
12044
|
function ResourceShow(props) {
|
|
12029
12045
|
const { formatter, showConfig, Dropdown } = props;
|
|
@@ -18471,13 +18487,13 @@ var __publicField = (obj, key, value) => {
|
|
|
18471
18487
|
return 1;
|
|
18472
18488
|
return -1;
|
|
18473
18489
|
};
|
|
18474
|
-
const NameColumnRenderer = (resource = "") => {
|
|
18490
|
+
const NameColumnRenderer = (i18n2, resource = "") => {
|
|
18475
18491
|
const dataIndex = ["metadata", "name"];
|
|
18476
18492
|
return {
|
|
18477
18493
|
key: "name",
|
|
18478
18494
|
display: true,
|
|
18479
18495
|
dataIndex,
|
|
18480
|
-
title:
|
|
18496
|
+
title: i18n2.t("dovetail.name"),
|
|
18481
18497
|
sortable: true,
|
|
18482
18498
|
sorter: CommonSorter(dataIndex),
|
|
18483
18499
|
render: (v, record) => {
|
|
@@ -18485,36 +18501,36 @@ var __publicField = (obj, key, value) => {
|
|
|
18485
18501
|
}
|
|
18486
18502
|
};
|
|
18487
18503
|
};
|
|
18488
|
-
const NameSpaceColumnRenderer = () => {
|
|
18504
|
+
const NameSpaceColumnRenderer = (i18n2) => {
|
|
18489
18505
|
const dataIndex = ["metadata", "namespace"];
|
|
18490
18506
|
return {
|
|
18491
18507
|
key: "namespace",
|
|
18492
18508
|
display: true,
|
|
18493
18509
|
dataIndex,
|
|
18494
|
-
title:
|
|
18510
|
+
title: i18n2.t("dovetail.namespace"),
|
|
18495
18511
|
sortable: true,
|
|
18496
18512
|
sorter: CommonSorter(dataIndex)
|
|
18497
18513
|
};
|
|
18498
18514
|
};
|
|
18499
|
-
const StateDisplayColumnRenderer = () => {
|
|
18515
|
+
const StateDisplayColumnRenderer = (i18n2) => {
|
|
18500
18516
|
const dataIndex = ["stateDisplay"];
|
|
18501
18517
|
return {
|
|
18502
18518
|
key: "stateDisplay",
|
|
18503
18519
|
display: true,
|
|
18504
18520
|
dataIndex,
|
|
18505
|
-
title:
|
|
18521
|
+
title: i18n2.t("dovetail.state"),
|
|
18506
18522
|
sortable: true,
|
|
18507
18523
|
sorter: CommonSorter(dataIndex),
|
|
18508
18524
|
render: (v) => /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, { state: v })
|
|
18509
18525
|
};
|
|
18510
18526
|
};
|
|
18511
|
-
const WorkloadImageColumnRenderer = () => {
|
|
18527
|
+
const WorkloadImageColumnRenderer = (i18n2) => {
|
|
18512
18528
|
const dataIndex = ["imageNames"];
|
|
18513
18529
|
return {
|
|
18514
18530
|
key: "image",
|
|
18515
18531
|
display: true,
|
|
18516
18532
|
dataIndex,
|
|
18517
|
-
title:
|
|
18533
|
+
title: i18n2.t("dovetail.image"),
|
|
18518
18534
|
sortable: true,
|
|
18519
18535
|
sorter: CommonSorter(dataIndex),
|
|
18520
18536
|
render(value, record) {
|
|
@@ -18522,23 +18538,23 @@ var __publicField = (obj, key, value) => {
|
|
|
18522
18538
|
}
|
|
18523
18539
|
};
|
|
18524
18540
|
};
|
|
18525
|
-
const WorkloadRestartsColumnRenderer = () => {
|
|
18541
|
+
const WorkloadRestartsColumnRenderer = (i18n2) => {
|
|
18526
18542
|
const dataIndex = ["restarts"];
|
|
18527
18543
|
return {
|
|
18528
18544
|
key: "restarts",
|
|
18529
18545
|
display: true,
|
|
18530
18546
|
dataIndex,
|
|
18531
|
-
title:
|
|
18547
|
+
title: i18n2.t("dovetail.restarts"),
|
|
18532
18548
|
sortable: false
|
|
18533
18549
|
};
|
|
18534
18550
|
};
|
|
18535
|
-
const ReplicasColumnRenderer = () => {
|
|
18551
|
+
const ReplicasColumnRenderer = (i18n2) => {
|
|
18536
18552
|
const dataIndex = ["status", "replicas"];
|
|
18537
18553
|
return {
|
|
18538
18554
|
key: "replicas",
|
|
18539
18555
|
display: true,
|
|
18540
18556
|
dataIndex,
|
|
18541
|
-
title:
|
|
18557
|
+
title: i18n2.t("dovetail.replicas"),
|
|
18542
18558
|
sortable: true,
|
|
18543
18559
|
sorter: CommonSorter(dataIndex),
|
|
18544
18560
|
render: (_, record) => {
|
|
@@ -18550,13 +18566,13 @@ var __publicField = (obj, key, value) => {
|
|
|
18550
18566
|
}
|
|
18551
18567
|
};
|
|
18552
18568
|
};
|
|
18553
|
-
const AgeColumnRenderer = () => {
|
|
18569
|
+
const AgeColumnRenderer = (i18n2) => {
|
|
18554
18570
|
const dataIndex = ["metadata", "creationTimestamp"];
|
|
18555
18571
|
return {
|
|
18556
18572
|
key: "creationTimestamp",
|
|
18557
18573
|
display: true,
|
|
18558
18574
|
dataIndex,
|
|
18559
|
-
title:
|
|
18575
|
+
title: i18n2.t("dovetail.created_time"),
|
|
18560
18576
|
sortable: true,
|
|
18561
18577
|
sorter: (a, b) => {
|
|
18562
18578
|
const valA = new Date(lodashExports.get(a, dataIndex));
|
|
@@ -18572,76 +18588,76 @@ var __publicField = (obj, key, value) => {
|
|
|
18572
18588
|
}
|
|
18573
18589
|
};
|
|
18574
18590
|
};
|
|
18575
|
-
const NodeNameColumnRenderer = (options) => {
|
|
18591
|
+
const NodeNameColumnRenderer = (i18n2, options) => {
|
|
18576
18592
|
const dataIndex = ["spec", "nodeName"];
|
|
18577
18593
|
return {
|
|
18578
18594
|
key: "node",
|
|
18579
18595
|
display: true,
|
|
18580
18596
|
dataIndex,
|
|
18581
|
-
title:
|
|
18597
|
+
title: i18n2.t("dovetail.node_name"),
|
|
18582
18598
|
sortable: true,
|
|
18583
18599
|
sorter: CommonSorter(dataIndex),
|
|
18584
18600
|
...options
|
|
18585
18601
|
};
|
|
18586
18602
|
};
|
|
18587
|
-
const RestartCountColumnRenderer = () => {
|
|
18603
|
+
const RestartCountColumnRenderer = (i18n2) => {
|
|
18588
18604
|
const dataIndex = ["restartCount"];
|
|
18589
18605
|
return {
|
|
18590
18606
|
key: "restartCount",
|
|
18591
18607
|
display: true,
|
|
18592
18608
|
dataIndex,
|
|
18593
|
-
title:
|
|
18609
|
+
title: i18n2.t("dovetail.restarts"),
|
|
18594
18610
|
sortable: true,
|
|
18595
18611
|
sorter: CommonSorter(dataIndex)
|
|
18596
18612
|
};
|
|
18597
18613
|
};
|
|
18598
|
-
const CompletionsCountColumnRenderer = () => {
|
|
18614
|
+
const CompletionsCountColumnRenderer = (i18n2) => {
|
|
18599
18615
|
const dataIndex = ["completionsDisplay"];
|
|
18600
18616
|
return {
|
|
18601
18617
|
key: "completions",
|
|
18602
18618
|
display: true,
|
|
18603
18619
|
dataIndex,
|
|
18604
|
-
title:
|
|
18620
|
+
title: i18n2.t("completions"),
|
|
18605
18621
|
sortable: true,
|
|
18606
18622
|
sorter: CommonSorter(dataIndex)
|
|
18607
18623
|
};
|
|
18608
18624
|
};
|
|
18609
|
-
const DurationColumnRenderer = () => {
|
|
18625
|
+
const DurationColumnRenderer = (i18n2) => {
|
|
18610
18626
|
const dataIndex = ["duration"];
|
|
18611
18627
|
return {
|
|
18612
18628
|
key: "duration",
|
|
18613
18629
|
display: true,
|
|
18614
18630
|
dataIndex,
|
|
18615
|
-
title:
|
|
18631
|
+
title: i18n2.t("dovetail.duration"),
|
|
18616
18632
|
sortable: true,
|
|
18617
18633
|
sorter: CommonSorter(dataIndex),
|
|
18618
18634
|
render: (v) => {
|
|
18619
18635
|
const i18nMap = {
|
|
18620
|
-
sec:
|
|
18621
|
-
day:
|
|
18622
|
-
min:
|
|
18623
|
-
hr:
|
|
18636
|
+
sec: i18n2.t("dovetail.sec"),
|
|
18637
|
+
day: i18n2.t("dovetail.day"),
|
|
18638
|
+
min: i18n2.t("dovetail.min"),
|
|
18639
|
+
hr: i18n2.t("dovetail.hr")
|
|
18624
18640
|
};
|
|
18625
18641
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: elapsedTime(v, i18nMap).label || "-" });
|
|
18626
18642
|
}
|
|
18627
18643
|
};
|
|
18628
18644
|
};
|
|
18629
|
-
const ServiceTypeColumnRenderer = () => {
|
|
18645
|
+
const ServiceTypeColumnRenderer = (i18n2) => {
|
|
18630
18646
|
const dataIndex = ["spec", "type"];
|
|
18631
18647
|
return {
|
|
18632
18648
|
key: "type",
|
|
18633
|
-
title:
|
|
18649
|
+
title: i18n2.t("dovetail.type"),
|
|
18634
18650
|
display: true,
|
|
18635
18651
|
dataIndex,
|
|
18636
18652
|
sortable: true,
|
|
18637
18653
|
sorter: CommonSorter(dataIndex)
|
|
18638
18654
|
};
|
|
18639
18655
|
};
|
|
18640
|
-
const PodWorkloadColumnRenderer = () => {
|
|
18656
|
+
const PodWorkloadColumnRenderer = (i18n2) => {
|
|
18641
18657
|
const dataIndex = ["metadata", "ownerReferences"];
|
|
18642
18658
|
return {
|
|
18643
18659
|
key: "type",
|
|
18644
|
-
title:
|
|
18660
|
+
title: i18n2.t("dovetail.workload"),
|
|
18645
18661
|
display: true,
|
|
18646
18662
|
dataIndex,
|
|
18647
18663
|
sortable: true,
|
|
@@ -18658,11 +18674,11 @@ var __publicField = (obj, key, value) => {
|
|
|
18658
18674
|
}
|
|
18659
18675
|
};
|
|
18660
18676
|
};
|
|
18661
|
-
const IngressRulesColumnRenderer = () => {
|
|
18677
|
+
const IngressRulesColumnRenderer = (i18n2) => {
|
|
18662
18678
|
const dataIndex = ["spec", "rules"];
|
|
18663
18679
|
return {
|
|
18664
18680
|
key: "type",
|
|
18665
|
-
title:
|
|
18681
|
+
title: i18n2.t("dovetail.rule"),
|
|
18666
18682
|
display: true,
|
|
18667
18683
|
dataIndex,
|
|
18668
18684
|
sortable: true,
|
|
@@ -18672,13 +18688,13 @@ var __publicField = (obj, key, value) => {
|
|
|
18672
18688
|
}
|
|
18673
18689
|
};
|
|
18674
18690
|
};
|
|
18675
|
-
const IngressDefaultBackendColumnRenderer = () => {
|
|
18691
|
+
const IngressDefaultBackendColumnRenderer = (i18n2) => {
|
|
18676
18692
|
const dataIndex = ["spec", "defaultBackend"];
|
|
18677
18693
|
return {
|
|
18678
18694
|
key: "defaultBackend",
|
|
18679
18695
|
display: true,
|
|
18680
18696
|
dataIndex,
|
|
18681
|
-
title:
|
|
18697
|
+
title: i18n2.t("dovetail.default_backend"),
|
|
18682
18698
|
sortable: true,
|
|
18683
18699
|
sorter: CommonSorter(["spec", "defaultBackend"]),
|
|
18684
18700
|
render: (defaultBackend, record) => {
|
|
@@ -18778,7 +18794,7 @@ var __publicField = (obj, key, value) => {
|
|
|
18778
18794
|
}
|
|
18779
18795
|
return _content;
|
|
18780
18796
|
}, [Layout2, notCustomResources, props.children, urlPrefix]);
|
|
18781
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactRouterDom.Router, { history, children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.KitStoreProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStoreContext.Provider, { value: { globalStore }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ConfigsContext.Provider, { value: lodashEs.keyBy(resourcesConfig, "name"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18797
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactRouterDom.Router, { history, children: /* @__PURE__ */ jsxRuntimeExports.jsx(I18nextProvider, { i18n, children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.KitStoreProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStoreContext.Provider, { value: { globalStore }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ConfigsContext.Provider, { value: lodashEs.keyBy(resourcesConfig, "name"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18782
18798
|
core.Refine,
|
|
18783
18799
|
{
|
|
18784
18800
|
dataProvider: {
|
|
@@ -18807,7 +18823,7 @@ var __publicField = (obj, key, value) => {
|
|
|
18807
18823
|
}),
|
|
18808
18824
|
children: content
|
|
18809
18825
|
}
|
|
18810
|
-
) }) }) }) });
|
|
18826
|
+
) }) }) }) }) });
|
|
18811
18827
|
};
|
|
18812
18828
|
class ResourceModel {
|
|
18813
18829
|
constructor(_rawYaml, _globalStore) {
|
|
@@ -19325,7 +19341,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19325
19341
|
}
|
|
19326
19342
|
const relationPlugin = new RelationPlugin();
|
|
19327
19343
|
const ProviderPlugins = [relationPlugin, modelPlugin];
|
|
19328
|
-
const
|
|
19344
|
+
const dovetailRefineI18n = i18n;
|
|
19329
19345
|
const MonacoYamlDiffEditor = (props) => {
|
|
19330
19346
|
const ref = React.useRef(null);
|
|
19331
19347
|
const { origin, modified, id, height } = props;
|
|
@@ -19391,7 +19407,6 @@ var __publicField = (obj, key, value) => {
|
|
|
19391
19407
|
exports2.DeleteManyButton = DeleteManyButton;
|
|
19392
19408
|
exports2.DeploymentModel = DeploymentModel;
|
|
19393
19409
|
exports2.Dovetail = Dovetail;
|
|
19394
|
-
exports2.DovetailRefineI18n = DovetailRefineI18n;
|
|
19395
19410
|
exports2.DrawerShow = DrawerShow;
|
|
19396
19411
|
exports2.DurationColumnRenderer = DurationColumnRenderer;
|
|
19397
19412
|
exports2.EditButton = EditButton;
|
|
@@ -19473,6 +19488,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19473
19488
|
exports2.WorkloadState = WorkloadState;
|
|
19474
19489
|
exports2.YamlEditorComponent = YamlEditorComponent;
|
|
19475
19490
|
exports2.dnsSubDomainRules = dnsSubDomainRules;
|
|
19491
|
+
exports2.dovetailRefineI18n = dovetailRefineI18n;
|
|
19476
19492
|
exports2.namespaceRules = namespaceRules;
|
|
19477
19493
|
exports2.rfc1035LabelRules = rfc1035LabelRules;
|
|
19478
19494
|
exports2.rfc1123LabelRules = rfc1123LabelRules;
|
package/lib/src/Dovetail.d.ts
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import { ResourceProps } from '@refinedev/core';
|
|
2
1
|
import { History } from 'history';
|
|
3
2
|
import { GlobalStore } from 'k8s-api-provider';
|
|
4
3
|
import React from 'react';
|
|
5
|
-
import './i18n';
|
|
6
|
-
import './styles.css';
|
|
7
4
|
import { ResourceConfig } from './types';
|
|
5
|
+
import './styles.css';
|
|
8
6
|
type Props = {
|
|
9
7
|
resourcesConfig: ResourceConfig[];
|
|
10
8
|
useHashUrl?: boolean;
|
|
11
9
|
urlPrefix?: string;
|
|
12
|
-
refineResources?: ResourceProps[];
|
|
13
10
|
Layout?: React.FC<unknown>;
|
|
14
11
|
history: History;
|
|
15
12
|
globalStore: GlobalStore;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { i18n as I18nType } from 'i18next';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { JobModel, ResourceModel, WorkloadModel, WorkloadBaseModel, CronJobModel, IngressModel } from '../../models';
|
|
3
4
|
export type ShowField<Model extends ResourceModel> = {
|
|
@@ -23,17 +24,17 @@ export interface ShowConfig<Model extends ResourceModel = ResourceModel> {
|
|
|
23
24
|
}[];
|
|
24
25
|
tabs?: ShowTabField<Model>[];
|
|
25
26
|
}
|
|
26
|
-
export declare const ImageField: <Model extends WorkloadBaseModel>() => ShowField<Model>;
|
|
27
|
-
export declare const ReplicaField: () => ShowField<WorkloadModel>;
|
|
28
|
-
export declare const ConditionsField: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>() => ShowTabField<Model>;
|
|
27
|
+
export declare const ImageField: <Model extends WorkloadBaseModel>(i18n: I18nType) => ShowField<Model>;
|
|
28
|
+
export declare const ReplicaField: (i18n: I18nType) => ShowField<WorkloadModel>;
|
|
29
|
+
export declare const ConditionsField: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType) => ShowTabField<Model>;
|
|
29
30
|
export declare const PodsField: <Model extends WorkloadBaseModel>() => ShowTabField<Model>;
|
|
30
31
|
export declare const JobsField: <Model extends JobModel | CronJobModel>() => ShowTabField<Model>;
|
|
31
|
-
export declare const DataField: () => ShowField<ResourceModel>;
|
|
32
|
-
export declare const SecretDataField: () => ShowField<ResourceModel>;
|
|
33
|
-
export declare const StartTimeField: () => ShowField<JobModel>;
|
|
34
|
-
export declare const ServiceTypeField: () => ShowField<ResourceModel>;
|
|
35
|
-
export declare const ClusterIpField: () => ShowField<ResourceModel>;
|
|
36
|
-
export declare const SessionAffinityField: () => ShowField<ResourceModel>;
|
|
32
|
+
export declare const DataField: (i18n: I18nType) => ShowField<ResourceModel>;
|
|
33
|
+
export declare const SecretDataField: (i18n: I18nType) => ShowField<ResourceModel>;
|
|
34
|
+
export declare const StartTimeField: (i18n: I18nType) => ShowField<JobModel>;
|
|
35
|
+
export declare const ServiceTypeField: (i18n: I18nType) => ShowField<ResourceModel>;
|
|
36
|
+
export declare const ClusterIpField: (i18n: I18nType) => ShowField<ResourceModel>;
|
|
37
|
+
export declare const SessionAffinityField: (i18n: I18nType) => ShowField<ResourceModel>;
|
|
37
38
|
export declare const ServicePodsField: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>() => ShowTabField<Model>;
|
|
38
|
-
export declare const IngressRulesTableTabField: <Model extends IngressModel>() => ShowTabField<Model>;
|
|
39
|
-
export declare const EventsTableTabField: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>() => ShowTabField<Model>;
|
|
39
|
+
export declare const IngressRulesTableTabField: <Model extends IngressModel>(i18n: I18nType) => ShowTabField<Model>;
|
|
40
|
+
export declare const EventsTableTabField: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType) => ShowTabField<Model>;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
import { i18n as I18nType } from 'i18next';
|
|
1
2
|
import { Column } from '../../components/Table';
|
|
2
3
|
import { JobModel, PodModel, ResourceModel, WorkloadModel, WorkloadBaseModel, CronJobModel, IngressModel } from '../../models';
|
|
3
4
|
export declare const CommonSorter: (dataIndex: string[]) => (a: unknown, b: unknown) => 0 | 1 | -1;
|
|
4
|
-
export declare const NameColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(resource?: string) => Column<Model>;
|
|
5
|
-
export declare const NameSpaceColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>() => Column<Model>;
|
|
6
|
-
export declare const StateDisplayColumnRenderer: <Model extends PodModel | WorkloadModel | CronJobModel>() => Column<Model>;
|
|
7
|
-
export declare const WorkloadImageColumnRenderer: <Model extends WorkloadBaseModel>() => Column<Model>;
|
|
8
|
-
export declare const WorkloadRestartsColumnRenderer: <Model extends WorkloadModel>() => Column<Model>;
|
|
9
|
-
export declare const ReplicasColumnRenderer: <Model extends WorkloadModel>() => Column<Model>;
|
|
10
|
-
export declare const AgeColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>() => Column<Model>;
|
|
11
|
-
export declare const NodeNameColumnRenderer: <Model extends PodModel>(options?: Partial<Column<Model>> | undefined) => Column<Model>;
|
|
12
|
-
export declare const RestartCountColumnRenderer: <Model extends PodModel>() => Column<Model>;
|
|
13
|
-
export declare const CompletionsCountColumnRenderer: <Model extends JobModel | CronJobModel>() => Column<Model>;
|
|
14
|
-
export declare const DurationColumnRenderer: <Model extends JobModel | CronJobModel>() => Column<Model>;
|
|
15
|
-
export declare const ServiceTypeColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>() => Column<Model>;
|
|
16
|
-
export declare const PodWorkloadColumnRenderer: <Model extends PodModel>() => Column<Model>;
|
|
17
|
-
export declare const IngressRulesColumnRenderer: <Model extends IngressModel>() => Column<Model>;
|
|
18
|
-
export declare const IngressDefaultBackendColumnRenderer: <Model extends IngressModel>() => Column<Model>;
|
|
5
|
+
export declare const NameColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType, resource?: string) => Column<Model>;
|
|
6
|
+
export declare const NameSpaceColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType) => Column<Model>;
|
|
7
|
+
export declare const StateDisplayColumnRenderer: <Model extends PodModel | WorkloadModel | CronJobModel>(i18n: I18nType) => Column<Model>;
|
|
8
|
+
export declare const WorkloadImageColumnRenderer: <Model extends WorkloadBaseModel>(i18n: I18nType) => Column<Model>;
|
|
9
|
+
export declare const WorkloadRestartsColumnRenderer: <Model extends WorkloadModel>(i18n: I18nType) => Column<Model>;
|
|
10
|
+
export declare const ReplicasColumnRenderer: <Model extends WorkloadModel>(i18n: I18nType) => Column<Model>;
|
|
11
|
+
export declare const AgeColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType) => Column<Model>;
|
|
12
|
+
export declare const NodeNameColumnRenderer: <Model extends PodModel>(i18n: I18nType, options?: Partial<Column<Model>> | undefined) => Column<Model>;
|
|
13
|
+
export declare const RestartCountColumnRenderer: <Model extends PodModel>(i18n: I18nType) => Column<Model>;
|
|
14
|
+
export declare const CompletionsCountColumnRenderer: <Model extends JobModel | CronJobModel>(i18n: I18nType) => Column<Model>;
|
|
15
|
+
export declare const DurationColumnRenderer: <Model extends JobModel | CronJobModel>(i18n: I18nType) => Column<Model>;
|
|
16
|
+
export declare const ServiceTypeColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType) => Column<Model>;
|
|
17
|
+
export declare const PodWorkloadColumnRenderer: <Model extends PodModel>(i18n: I18nType) => Column<Model>;
|
|
18
|
+
export declare const IngressRulesColumnRenderer: <Model extends IngressModel>(i18n: I18nType) => Column<Model>;
|
|
19
|
+
export declare const IngressDefaultBackendColumnRenderer: <Model extends IngressModel>(i18n: I18nType) => Column<Model>;
|
package/lib/src/i18n.d.ts
CHANGED
package/lib/src/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { i18n } from 'i18next';
|
|
1
2
|
import { ResourceModel } from '../../models';
|
|
2
3
|
import { ResourceConfig } from '../../types';
|
|
3
|
-
export declare const ConfigMapConfig: ResourceConfig<ResourceModel>;
|
|
4
|
+
export declare const ConfigMapConfig: (i18n: i18n) => ResourceConfig<ResourceModel>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { i18n } from 'i18next';
|
|
1
2
|
import { IngressModel } from '../../models';
|
|
2
3
|
import { ResourceConfig } from '../../types';
|
|
3
|
-
export declare const IngressConfig: ResourceConfig<IngressModel>;
|
|
4
|
+
export declare const IngressConfig: (i18n: i18n) => ResourceConfig<IngressModel>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { i18n } from 'i18next';
|
|
1
2
|
import { NetworkPolicyModel } from '../../models';
|
|
2
3
|
import { ResourceConfig } from '../../types';
|
|
3
|
-
export declare const NetworkPolicyConfig: ResourceConfig<NetworkPolicyModel>;
|
|
4
|
+
export declare const NetworkPolicyConfig: (i18n: i18n) => ResourceConfig<NetworkPolicyModel>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { i18n } from 'i18next';
|
|
1
2
|
import { ResourceModel } from '../../models';
|
|
2
3
|
import { ResourceConfig } from '../../types';
|
|
3
|
-
export declare const SecretsConfig: ResourceConfig<ResourceModel>;
|
|
4
|
+
export declare const SecretsConfig: (i18n: i18n) => ResourceConfig<ResourceModel>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { i18n } from 'i18next';
|
|
1
2
|
import { ResourceModel } from '../../models';
|
|
2
3
|
import { ResourceConfig } from '../../types';
|
|
3
|
-
export declare const ServicesConfig: ResourceConfig<ResourceModel>;
|
|
4
|
+
export declare const ServicesConfig: (i18n: i18n) => ResourceConfig<ResourceModel>;
|