@dovetail-v2/refine 0.0.21-beta.0 → 0.0.21

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.
@@ -1,4 +1,4 @@
1
- import { j as jsxRuntimeExports } from "./index-5f7b3e36.js";
1
+ import { j as jsxRuntimeExports } from "./index-21a94e67.js";
2
2
  import * as monaco from "monaco-editor";
3
3
  import { useRef, useEffect } from "react";
4
4
  import "i18next";
@@ -318,6 +318,7 @@ const obtain_data_error$1 = "Having trouble getting data.";
318
318
  const retry$1 = "Retry";
319
319
  const create_resource$1 = "Create {{resource}}";
320
320
  const edit_resource$1 = "Edit {{resource}}";
321
+ const status$1 = "Status";
321
322
  const dovetail$1 = {
322
323
  copy: copy$1,
323
324
  reset_arguments: reset_arguments$1,
@@ -333,7 +334,8 @@ const dovetail$1 = {
333
334
  obtain_data_error: obtain_data_error$1,
334
335
  retry: retry$1,
335
336
  create_resource: create_resource$1,
336
- edit_resource: edit_resource$1
337
+ edit_resource: edit_resource$1,
338
+ status: status$1
337
339
  };
338
340
  const EN = {
339
341
  dovetail: dovetail$1
@@ -9856,7 +9858,7 @@ const ErrorMsgStyle = "eh2qjnl";
9856
9858
  const ErrorWrapperStyle = "e19q2bnp";
9857
9859
  const YamlEditorStyle = "y16u5v3w";
9858
9860
  const MonacoYamlEditor$2 = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$1));
9859
- const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-fd7edf86.js"));
9861
+ const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-4436e990.js"));
9860
9862
  const YamlEditorComponent = forwardRef(
9861
9863
  function YamlEditorComponent2(props, ref) {
9862
9864
  const {
@@ -10663,6 +10665,9 @@ function matchOwner(job, owner) {
10663
10665
  const CronjobJobsTable = ({
10664
10666
  owner
10665
10667
  }) => {
10668
+ const {
10669
+ i18n: i18n2
10670
+ } = useTranslation();
10666
10671
  const kit = useUIKit();
10667
10672
  const [selectedKeys, setSelectedKeys] = useState([]);
10668
10673
  const [currentPage, setCurrentPage] = useState(1);
@@ -10680,7 +10685,7 @@ const CronjobJobsTable = ({
10680
10685
  return owner ? matchOwner(p, owner) : true;
10681
10686
  });
10682
10687
  }, [data2 == null ? void 0 : data2.data, owner]);
10683
- const columns = [NameColumnRenderer("jobs"), StateDisplayColumnRenderer(), NameSpaceColumnRenderer(), WorkloadImageColumnRenderer(), CompletionsCountColumnRenderer(), DurationColumnRenderer(), AgeColumnRenderer()];
10688
+ const columns = [NameColumnRenderer(i18n2, "jobs"), StateDisplayColumnRenderer(i18n2), NameSpaceColumnRenderer(i18n2), WorkloadImageColumnRenderer(i18n2), CompletionsCountColumnRenderer(i18n2), DurationColumnRenderer(i18n2), AgeColumnRenderer(i18n2)];
10684
10689
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
10685
10690
  direction: "vertical",
10686
10691
  className: "c16agr8o",
@@ -10713,7 +10718,7 @@ const EventsTable = ({}) => {
10713
10718
  const parsed = useParsed();
10714
10719
  const columns = useMemo(
10715
10720
  () => [
10716
- NameSpaceColumnRenderer(),
10721
+ NameSpaceColumnRenderer(i18n2),
10717
10722
  {
10718
10723
  key: "type",
10719
10724
  display: true,
@@ -10746,7 +10751,7 @@ const EventsTable = ({}) => {
10746
10751
  sortable: true,
10747
10752
  sorter: CommonSorter(["note"])
10748
10753
  },
10749
- AgeColumnRenderer()
10754
+ AgeColumnRenderer(i18n2)
10750
10755
  ],
10751
10756
  [i18n2]
10752
10757
  );
@@ -10924,6 +10929,9 @@ const WorkloadPodsTable = ({
10924
10929
  selector,
10925
10930
  hideToolbar
10926
10931
  }) => {
10932
+ const {
10933
+ i18n: i18n2
10934
+ } = useTranslation();
10927
10935
  const kit = useUIKit();
10928
10936
  const [selectedKeys, setSelectedKeys] = useState([]);
10929
10937
  const [currentPage, setCurrentPage] = useState(1);
@@ -10944,7 +10952,7 @@ const WorkloadPodsTable = ({
10944
10952
  return selector ? matchSelector(p, selector) : true;
10945
10953
  });
10946
10954
  }, [data2 == null ? void 0 : data2.data, selector]);
10947
- const columns = [StateDisplayColumnRenderer(), NameColumnRenderer("pods"), NodeNameColumnRenderer(), WorkloadImageColumnRenderer(), RestartCountColumnRenderer()];
10955
+ const columns = [StateDisplayColumnRenderer(i18n2), NameColumnRenderer(i18n2, "pods"), NodeNameColumnRenderer(i18n2), WorkloadImageColumnRenderer(i18n2), RestartCountColumnRenderer(i18n2)];
10948
10956
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
10949
10957
  direction: "vertical",
10950
10958
  className: "c1dicff8",
@@ -11141,10 +11149,10 @@ function WorkloadReplicas({ record, label: label2, editable }) {
11141
11149
  )
11142
11150
  ] });
11143
11151
  }
11144
- const ImageField = () => {
11152
+ const ImageField = (i18n2) => {
11145
11153
  return {
11146
11154
  key: "Image",
11147
- title: i18n.t("dovetail.image"),
11155
+ title: i18n2.t("dovetail.image"),
11148
11156
  path: ["imageNames"],
11149
11157
  col: 12,
11150
11158
  renderContent(value) {
@@ -11152,20 +11160,20 @@ const ImageField = () => {
11152
11160
  }
11153
11161
  };
11154
11162
  };
11155
- const ReplicaField = () => {
11163
+ const ReplicaField = (i18n2) => {
11156
11164
  return {
11157
11165
  key: "Replicas",
11158
- title: i18n.t("dovetail.replicas"),
11166
+ title: i18n2.t("dovetail.replicas"),
11159
11167
  path: ["status", "replicas"],
11160
11168
  renderContent: (_, record, field) => {
11161
11169
  return /* @__PURE__ */ jsxRuntimeExports.jsx(WorkloadReplicas, { record, label: field.title, editable: true });
11162
11170
  }
11163
11171
  };
11164
11172
  };
11165
- const ConditionsField = () => {
11173
+ const ConditionsField = (i18n2) => {
11166
11174
  return {
11167
11175
  key: "Conditions",
11168
- title: i18n.t("dovetail.condition"),
11176
+ title: i18n2.t("dovetail.condition"),
11169
11177
  path: ["status", "conditions"],
11170
11178
  renderContent: (value) => {
11171
11179
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ConditionsTable, { conditions: value });
@@ -11213,20 +11221,20 @@ const JobsField = () => {
11213
11221
  }
11214
11222
  };
11215
11223
  };
11216
- const DataField = () => {
11224
+ const DataField = (i18n2) => {
11217
11225
  return {
11218
11226
  key: "data",
11219
- title: i18n.t("dovetail.data"),
11227
+ title: i18n2.t("dovetail.data"),
11220
11228
  path: ["data"],
11221
11229
  renderContent: (val) => {
11222
11230
  return /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValue, { value: val });
11223
11231
  }
11224
11232
  };
11225
11233
  };
11226
- const SecretDataField = () => {
11234
+ const SecretDataField = (i18n2) => {
11227
11235
  return {
11228
11236
  key: "data",
11229
- title: i18n.t("dovetail.data"),
11237
+ title: i18n2.t("dovetail.data"),
11230
11238
  path: ["data"],
11231
11239
  renderContent: (val) => {
11232
11240
  const decodeVal = {};
@@ -11237,10 +11245,10 @@ const SecretDataField = () => {
11237
11245
  }
11238
11246
  };
11239
11247
  };
11240
- const StartTimeField = () => {
11248
+ const StartTimeField = (i18n2) => {
11241
11249
  return {
11242
11250
  key: "started",
11243
- title: i18n.t("dovetail.started"),
11251
+ title: i18n2.t("dovetail.started"),
11244
11252
  path: ["status", "startTime"],
11245
11253
  col: 12,
11246
11254
  renderContent(value) {
@@ -11248,24 +11256,24 @@ const StartTimeField = () => {
11248
11256
  }
11249
11257
  };
11250
11258
  };
11251
- const ServiceTypeField = () => {
11259
+ const ServiceTypeField = (i18n2) => {
11252
11260
  return {
11253
11261
  key: "type",
11254
- title: i18n.t("dovetail.type"),
11262
+ title: i18n2.t("dovetail.type"),
11255
11263
  path: ["spec", "type"]
11256
11264
  };
11257
11265
  };
11258
- const ClusterIpField = () => {
11266
+ const ClusterIpField = (i18n2) => {
11259
11267
  return {
11260
11268
  key: "clusterIp",
11261
- title: i18n.t("dovetail.clusterIp"),
11269
+ title: i18n2.t("dovetail.clusterIp"),
11262
11270
  path: ["spec", "clusterIP"]
11263
11271
  };
11264
11272
  };
11265
- const SessionAffinityField = () => {
11273
+ const SessionAffinityField = (i18n2) => {
11266
11274
  return {
11267
11275
  key: "clusterIp",
11268
- title: i18n.t("dovetail.sessionAffinity"),
11276
+ title: i18n2.t("dovetail.sessionAffinity"),
11269
11277
  path: ["spec", "sessionAffinity"]
11270
11278
  };
11271
11279
  };
@@ -11287,20 +11295,20 @@ const ServicePodsField = () => {
11287
11295
  }
11288
11296
  };
11289
11297
  };
11290
- const IngressRulesTableTabField = () => {
11298
+ const IngressRulesTableTabField = (i18n2) => {
11291
11299
  return {
11292
11300
  key: "rules",
11293
- title: i18n.t("dovetail.rule"),
11301
+ title: i18n2.t("dovetail.rule"),
11294
11302
  path: ["spec", "rules"],
11295
11303
  renderContent: (_, record) => {
11296
11304
  return /* @__PURE__ */ jsxRuntimeExports.jsx(IngressRulesTable, { ingress: record });
11297
11305
  }
11298
11306
  };
11299
11307
  };
11300
- const EventsTableTabField = () => {
11308
+ const EventsTableTabField = (i18n2) => {
11301
11309
  return {
11302
11310
  key: "event",
11303
- title: i18n.t("dovetail.event"),
11311
+ title: i18n2.t("dovetail.event"),
11304
11312
  path: [],
11305
11313
  renderContent: () => {
11306
11314
  return /* @__PURE__ */ jsxRuntimeExports.jsx(EventsTable, {});
@@ -12001,23 +12009,17 @@ function ListPage(props) {
12001
12009
  }
12002
12010
  function ResourceList(props) {
12003
12011
  const { formatter, name: name2, columns, Dropdown } = props;
12012
+ const { i18n: i18n2 } = useTranslation();
12004
12013
  const { tableProps, selectedKeys } = useEagleTable({
12005
12014
  useTableParams: {},
12006
- columns: [NameColumnRenderer(), ...columns],
12015
+ columns: [NameColumnRenderer(i18n2), ...columns],
12007
12016
  tableProps: {
12008
12017
  currentSize: 10
12009
12018
  },
12010
12019
  formatter,
12011
12020
  Dropdown
12012
12021
  });
12013
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
12014
- ListPage,
12015
- {
12016
- title: name2 || "",
12017
- selectedKeys,
12018
- tableProps
12019
- }
12020
- );
12022
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ListPage, { title: name2 || "", selectedKeys, tableProps });
12021
12023
  }
12022
12024
  function ResourceShow(props) {
12023
12025
  const { formatter, showConfig, Dropdown } = props;
@@ -18465,13 +18467,13 @@ const CommonSorter = (dataIndex) => (a, b) => {
18465
18467
  return 1;
18466
18468
  return -1;
18467
18469
  };
18468
- const NameColumnRenderer = (resource = "") => {
18470
+ const NameColumnRenderer = (i18n2, resource = "") => {
18469
18471
  const dataIndex = ["metadata", "name"];
18470
18472
  return {
18471
18473
  key: "name",
18472
18474
  display: true,
18473
18475
  dataIndex,
18474
- title: i18n.t("dovetail.name"),
18476
+ title: i18n2.t("dovetail.name"),
18475
18477
  sortable: true,
18476
18478
  sorter: CommonSorter(dataIndex),
18477
18479
  render: (v, record) => {
@@ -18479,36 +18481,36 @@ const NameColumnRenderer = (resource = "") => {
18479
18481
  }
18480
18482
  };
18481
18483
  };
18482
- const NameSpaceColumnRenderer = () => {
18484
+ const NameSpaceColumnRenderer = (i18n2) => {
18483
18485
  const dataIndex = ["metadata", "namespace"];
18484
18486
  return {
18485
18487
  key: "namespace",
18486
18488
  display: true,
18487
18489
  dataIndex,
18488
- title: i18n.t("dovetail.namespace"),
18490
+ title: i18n2.t("dovetail.namespace"),
18489
18491
  sortable: true,
18490
18492
  sorter: CommonSorter(dataIndex)
18491
18493
  };
18492
18494
  };
18493
- const StateDisplayColumnRenderer = () => {
18495
+ const StateDisplayColumnRenderer = (i18n2) => {
18494
18496
  const dataIndex = ["stateDisplay"];
18495
18497
  return {
18496
18498
  key: "stateDisplay",
18497
18499
  display: true,
18498
18500
  dataIndex,
18499
- title: i18n.t("dovetail.state"),
18501
+ title: i18n2.t("dovetail.state"),
18500
18502
  sortable: true,
18501
18503
  sorter: CommonSorter(dataIndex),
18502
18504
  render: (v) => /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, { state: v })
18503
18505
  };
18504
18506
  };
18505
- const WorkloadImageColumnRenderer = () => {
18507
+ const WorkloadImageColumnRenderer = (i18n2) => {
18506
18508
  const dataIndex = ["imageNames"];
18507
18509
  return {
18508
18510
  key: "image",
18509
18511
  display: true,
18510
18512
  dataIndex,
18511
- title: i18n.t("dovetail.image"),
18513
+ title: i18n2.t("dovetail.image"),
18512
18514
  sortable: true,
18513
18515
  sorter: CommonSorter(dataIndex),
18514
18516
  render(value, record) {
@@ -18516,23 +18518,23 @@ const WorkloadImageColumnRenderer = () => {
18516
18518
  }
18517
18519
  };
18518
18520
  };
18519
- const WorkloadRestartsColumnRenderer = () => {
18521
+ const WorkloadRestartsColumnRenderer = (i18n2) => {
18520
18522
  const dataIndex = ["restarts"];
18521
18523
  return {
18522
18524
  key: "restarts",
18523
18525
  display: true,
18524
18526
  dataIndex,
18525
- title: i18n.t("dovetail.restarts"),
18527
+ title: i18n2.t("dovetail.restarts"),
18526
18528
  sortable: false
18527
18529
  };
18528
18530
  };
18529
- const ReplicasColumnRenderer = () => {
18531
+ const ReplicasColumnRenderer = (i18n2) => {
18530
18532
  const dataIndex = ["status", "replicas"];
18531
18533
  return {
18532
18534
  key: "replicas",
18533
18535
  display: true,
18534
18536
  dataIndex,
18535
- title: i18n.t("dovetail.replicas"),
18537
+ title: i18n2.t("dovetail.replicas"),
18536
18538
  sortable: true,
18537
18539
  sorter: CommonSorter(dataIndex),
18538
18540
  render: (_, record) => {
@@ -18544,13 +18546,13 @@ const ReplicasColumnRenderer = () => {
18544
18546
  }
18545
18547
  };
18546
18548
  };
18547
- const AgeColumnRenderer = () => {
18549
+ const AgeColumnRenderer = (i18n2) => {
18548
18550
  const dataIndex = ["metadata", "creationTimestamp"];
18549
18551
  return {
18550
18552
  key: "creationTimestamp",
18551
18553
  display: true,
18552
18554
  dataIndex,
18553
- title: i18n.t("dovetail.created_time"),
18555
+ title: i18n2.t("dovetail.created_time"),
18554
18556
  sortable: true,
18555
18557
  sorter: (a, b) => {
18556
18558
  const valA = new Date(lodashExports.get(a, dataIndex));
@@ -18566,76 +18568,76 @@ const AgeColumnRenderer = () => {
18566
18568
  }
18567
18569
  };
18568
18570
  };
18569
- const NodeNameColumnRenderer = (options) => {
18571
+ const NodeNameColumnRenderer = (i18n2, options) => {
18570
18572
  const dataIndex = ["spec", "nodeName"];
18571
18573
  return {
18572
18574
  key: "node",
18573
18575
  display: true,
18574
18576
  dataIndex,
18575
- title: i18n.t("dovetail.node_name"),
18577
+ title: i18n2.t("dovetail.node_name"),
18576
18578
  sortable: true,
18577
18579
  sorter: CommonSorter(dataIndex),
18578
18580
  ...options
18579
18581
  };
18580
18582
  };
18581
- const RestartCountColumnRenderer = () => {
18583
+ const RestartCountColumnRenderer = (i18n2) => {
18582
18584
  const dataIndex = ["restartCount"];
18583
18585
  return {
18584
18586
  key: "restartCount",
18585
18587
  display: true,
18586
18588
  dataIndex,
18587
- title: i18n.t("dovetail.restarts"),
18589
+ title: i18n2.t("dovetail.restarts"),
18588
18590
  sortable: true,
18589
18591
  sorter: CommonSorter(dataIndex)
18590
18592
  };
18591
18593
  };
18592
- const CompletionsCountColumnRenderer = () => {
18594
+ const CompletionsCountColumnRenderer = (i18n2) => {
18593
18595
  const dataIndex = ["completionsDisplay"];
18594
18596
  return {
18595
18597
  key: "completions",
18596
18598
  display: true,
18597
18599
  dataIndex,
18598
- title: i18n.t("completions"),
18600
+ title: i18n2.t("completions"),
18599
18601
  sortable: true,
18600
18602
  sorter: CommonSorter(dataIndex)
18601
18603
  };
18602
18604
  };
18603
- const DurationColumnRenderer = () => {
18605
+ const DurationColumnRenderer = (i18n2) => {
18604
18606
  const dataIndex = ["duration"];
18605
18607
  return {
18606
18608
  key: "duration",
18607
18609
  display: true,
18608
18610
  dataIndex,
18609
- title: i18n.t("dovetail.duration"),
18611
+ title: i18n2.t("dovetail.duration"),
18610
18612
  sortable: true,
18611
18613
  sorter: CommonSorter(dataIndex),
18612
18614
  render: (v) => {
18613
18615
  const i18nMap = {
18614
- sec: i18n.t("dovetail.sec"),
18615
- day: i18n.t("dovetail.day"),
18616
- min: i18n.t("dovetail.min"),
18617
- hr: i18n.t("dovetail.hr")
18616
+ sec: i18n2.t("dovetail.sec"),
18617
+ day: i18n2.t("dovetail.day"),
18618
+ min: i18n2.t("dovetail.min"),
18619
+ hr: i18n2.t("dovetail.hr")
18618
18620
  };
18619
18621
  return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: elapsedTime(v, i18nMap).label || "-" });
18620
18622
  }
18621
18623
  };
18622
18624
  };
18623
- const ServiceTypeColumnRenderer = () => {
18625
+ const ServiceTypeColumnRenderer = (i18n2) => {
18624
18626
  const dataIndex = ["spec", "type"];
18625
18627
  return {
18626
18628
  key: "type",
18627
- title: i18n.t("dovetail.type"),
18629
+ title: i18n2.t("dovetail.type"),
18628
18630
  display: true,
18629
18631
  dataIndex,
18630
18632
  sortable: true,
18631
18633
  sorter: CommonSorter(dataIndex)
18632
18634
  };
18633
18635
  };
18634
- const PodWorkloadColumnRenderer = () => {
18636
+ const PodWorkloadColumnRenderer = (i18n2) => {
18635
18637
  const dataIndex = ["metadata", "ownerReferences"];
18636
18638
  return {
18637
18639
  key: "type",
18638
- title: i18n.t("dovetail.workload"),
18640
+ title: i18n2.t("dovetail.workload"),
18639
18641
  display: true,
18640
18642
  dataIndex,
18641
18643
  sortable: true,
@@ -18652,11 +18654,11 @@ const PodWorkloadColumnRenderer = () => {
18652
18654
  }
18653
18655
  };
18654
18656
  };
18655
- const IngressRulesColumnRenderer = () => {
18657
+ const IngressRulesColumnRenderer = (i18n2) => {
18656
18658
  const dataIndex = ["spec", "rules"];
18657
18659
  return {
18658
18660
  key: "type",
18659
- title: i18n.t("dovetail.rule"),
18661
+ title: i18n2.t("dovetail.rule"),
18660
18662
  display: true,
18661
18663
  dataIndex,
18662
18664
  sortable: true,
@@ -18666,13 +18668,13 @@ const IngressRulesColumnRenderer = () => {
18666
18668
  }
18667
18669
  };
18668
18670
  };
18669
- const IngressDefaultBackendColumnRenderer = () => {
18671
+ const IngressDefaultBackendColumnRenderer = (i18n2) => {
18670
18672
  const dataIndex = ["spec", "defaultBackend"];
18671
18673
  return {
18672
18674
  key: "defaultBackend",
18673
18675
  display: true,
18674
18676
  dataIndex,
18675
- title: i18n.t("dovetail.default_backend"),
18677
+ title: i18n2.t("dovetail.default_backend"),
18676
18678
  sortable: true,
18677
18679
  sorter: CommonSorter(["spec", "defaultBackend"]),
18678
18680
  render: (defaultBackend, record) => {
package/dist/refine.js CHANGED
@@ -1,4 +1,4 @@
1
- import { aq, A, ax, B, az, aa, k, C, f, aM, a3, y, aO, F, T, aX, X, aA, ay, a_, a6, $, ah, aZ, aJ, D, ak, g, 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, d, aD, x, z, au, aV, aU, P, a4, b0, aK, an, a2, R, O, L, ao, H, aW, J, U, e, 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, w, t, s, r, a, m, l, n, o, ar, u } from "./index-5f7b3e36.js";
1
+ import { aq, A, ax, B, az, aa, k, C, f, aM, a3, y, aO, F, T, aX, X, aA, ay, a_, a6, $, ah, aZ, aJ, D, ak, g, 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, d, aD, x, z, au, aV, aU, P, a4, b0, aK, an, a2, R, O, L, ao, H, aW, J, U, e, 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, w, t, s, r, a, m, l, n, o, ar, u } from "./index-21a94e67.js";
2
2
  import "@cloudtower/eagle";
3
3
  import "@refinedev/core";
4
4
  import "js-yaml";
@@ -324,6 +324,7 @@ var __publicField = (obj, key, value) => {
324
324
  const retry$1 = "Retry";
325
325
  const create_resource$1 = "Create {{resource}}";
326
326
  const edit_resource$1 = "Edit {{resource}}";
327
+ const status$1 = "Status";
327
328
  const dovetail$1 = {
328
329
  copy: copy$1,
329
330
  reset_arguments: reset_arguments$1,
@@ -339,7 +340,8 @@ var __publicField = (obj, key, value) => {
339
340
  obtain_data_error: obtain_data_error$1,
340
341
  retry: retry$1,
341
342
  create_resource: create_resource$1,
342
- edit_resource: edit_resource$1
343
+ edit_resource: edit_resource$1,
344
+ status: status$1
343
345
  };
344
346
  const EN = {
345
347
  dovetail: dovetail$1
@@ -10669,6 +10671,9 @@ var __publicField = (obj, key, value) => {
10669
10671
  const CronjobJobsTable = ({
10670
10672
  owner
10671
10673
  }) => {
10674
+ const {
10675
+ i18n: i18n2
10676
+ } = useTranslation();
10672
10677
  const kit = eagle.useUIKit();
10673
10678
  const [selectedKeys, setSelectedKeys] = React.useState([]);
10674
10679
  const [currentPage, setCurrentPage] = React.useState(1);
@@ -10686,7 +10691,7 @@ var __publicField = (obj, key, value) => {
10686
10691
  return owner ? matchOwner(p, owner) : true;
10687
10692
  });
10688
10693
  }, [data2 == null ? void 0 : data2.data, owner]);
10689
- const columns = [NameColumnRenderer("jobs"), StateDisplayColumnRenderer(), NameSpaceColumnRenderer(), WorkloadImageColumnRenderer(), CompletionsCountColumnRenderer(), DurationColumnRenderer(), AgeColumnRenderer()];
10694
+ const columns = [NameColumnRenderer(i18n2, "jobs"), StateDisplayColumnRenderer(i18n2), NameSpaceColumnRenderer(i18n2), WorkloadImageColumnRenderer(i18n2), CompletionsCountColumnRenderer(i18n2), DurationColumnRenderer(i18n2), AgeColumnRenderer(i18n2)];
10690
10695
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
10691
10696
  direction: "vertical",
10692
10697
  className: "c16agr8o",
@@ -10719,7 +10724,7 @@ var __publicField = (obj, key, value) => {
10719
10724
  const parsed = core.useParsed();
10720
10725
  const columns = React.useMemo(
10721
10726
  () => [
10722
- NameSpaceColumnRenderer(),
10727
+ NameSpaceColumnRenderer(i18n2),
10723
10728
  {
10724
10729
  key: "type",
10725
10730
  display: true,
@@ -10752,7 +10757,7 @@ var __publicField = (obj, key, value) => {
10752
10757
  sortable: true,
10753
10758
  sorter: CommonSorter(["note"])
10754
10759
  },
10755
- AgeColumnRenderer()
10760
+ AgeColumnRenderer(i18n2)
10756
10761
  ],
10757
10762
  [i18n2]
10758
10763
  );
@@ -10930,6 +10935,9 @@ var __publicField = (obj, key, value) => {
10930
10935
  selector,
10931
10936
  hideToolbar
10932
10937
  }) => {
10938
+ const {
10939
+ i18n: i18n2
10940
+ } = useTranslation();
10933
10941
  const kit = eagle.useUIKit();
10934
10942
  const [selectedKeys, setSelectedKeys] = React.useState([]);
10935
10943
  const [currentPage, setCurrentPage] = React.useState(1);
@@ -10950,7 +10958,7 @@ var __publicField = (obj, key, value) => {
10950
10958
  return selector ? matchSelector(p, selector) : true;
10951
10959
  });
10952
10960
  }, [data2 == null ? void 0 : data2.data, selector]);
10953
- const columns = [StateDisplayColumnRenderer(), NameColumnRenderer("pods"), NodeNameColumnRenderer(), WorkloadImageColumnRenderer(), RestartCountColumnRenderer()];
10961
+ const columns = [StateDisplayColumnRenderer(i18n2), NameColumnRenderer(i18n2, "pods"), NodeNameColumnRenderer(i18n2), WorkloadImageColumnRenderer(i18n2), RestartCountColumnRenderer(i18n2)];
10954
10962
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
10955
10963
  direction: "vertical",
10956
10964
  className: "c1dicff8",
@@ -11147,10 +11155,10 @@ var __publicField = (obj, key, value) => {
11147
11155
  )
11148
11156
  ] });
11149
11157
  }
11150
- const ImageField = () => {
11158
+ const ImageField = (i18n2) => {
11151
11159
  return {
11152
11160
  key: "Image",
11153
- title: i18n.t("dovetail.image"),
11161
+ title: i18n2.t("dovetail.image"),
11154
11162
  path: ["imageNames"],
11155
11163
  col: 12,
11156
11164
  renderContent(value) {
@@ -11158,20 +11166,20 @@ var __publicField = (obj, key, value) => {
11158
11166
  }
11159
11167
  };
11160
11168
  };
11161
- const ReplicaField = () => {
11169
+ const ReplicaField = (i18n2) => {
11162
11170
  return {
11163
11171
  key: "Replicas",
11164
- title: i18n.t("dovetail.replicas"),
11172
+ title: i18n2.t("dovetail.replicas"),
11165
11173
  path: ["status", "replicas"],
11166
11174
  renderContent: (_, record, field) => {
11167
11175
  return /* @__PURE__ */ jsxRuntimeExports.jsx(WorkloadReplicas, { record, label: field.title, editable: true });
11168
11176
  }
11169
11177
  };
11170
11178
  };
11171
- const ConditionsField = () => {
11179
+ const ConditionsField = (i18n2) => {
11172
11180
  return {
11173
11181
  key: "Conditions",
11174
- title: i18n.t("dovetail.condition"),
11182
+ title: i18n2.t("dovetail.condition"),
11175
11183
  path: ["status", "conditions"],
11176
11184
  renderContent: (value) => {
11177
11185
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ConditionsTable, { conditions: value });
@@ -11219,20 +11227,20 @@ var __publicField = (obj, key, value) => {
11219
11227
  }
11220
11228
  };
11221
11229
  };
11222
- const DataField = () => {
11230
+ const DataField = (i18n2) => {
11223
11231
  return {
11224
11232
  key: "data",
11225
- title: i18n.t("dovetail.data"),
11233
+ title: i18n2.t("dovetail.data"),
11226
11234
  path: ["data"],
11227
11235
  renderContent: (val) => {
11228
11236
  return /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValue, { value: val });
11229
11237
  }
11230
11238
  };
11231
11239
  };
11232
- const SecretDataField = () => {
11240
+ const SecretDataField = (i18n2) => {
11233
11241
  return {
11234
11242
  key: "data",
11235
- title: i18n.t("dovetail.data"),
11243
+ title: i18n2.t("dovetail.data"),
11236
11244
  path: ["data"],
11237
11245
  renderContent: (val) => {
11238
11246
  const decodeVal = {};
@@ -11243,10 +11251,10 @@ var __publicField = (obj, key, value) => {
11243
11251
  }
11244
11252
  };
11245
11253
  };
11246
- const StartTimeField = () => {
11254
+ const StartTimeField = (i18n2) => {
11247
11255
  return {
11248
11256
  key: "started",
11249
- title: i18n.t("dovetail.started"),
11257
+ title: i18n2.t("dovetail.started"),
11250
11258
  path: ["status", "startTime"],
11251
11259
  col: 12,
11252
11260
  renderContent(value) {
@@ -11254,24 +11262,24 @@ var __publicField = (obj, key, value) => {
11254
11262
  }
11255
11263
  };
11256
11264
  };
11257
- const ServiceTypeField = () => {
11265
+ const ServiceTypeField = (i18n2) => {
11258
11266
  return {
11259
11267
  key: "type",
11260
- title: i18n.t("dovetail.type"),
11268
+ title: i18n2.t("dovetail.type"),
11261
11269
  path: ["spec", "type"]
11262
11270
  };
11263
11271
  };
11264
- const ClusterIpField = () => {
11272
+ const ClusterIpField = (i18n2) => {
11265
11273
  return {
11266
11274
  key: "clusterIp",
11267
- title: i18n.t("dovetail.clusterIp"),
11275
+ title: i18n2.t("dovetail.clusterIp"),
11268
11276
  path: ["spec", "clusterIP"]
11269
11277
  };
11270
11278
  };
11271
- const SessionAffinityField = () => {
11279
+ const SessionAffinityField = (i18n2) => {
11272
11280
  return {
11273
11281
  key: "clusterIp",
11274
- title: i18n.t("dovetail.sessionAffinity"),
11282
+ title: i18n2.t("dovetail.sessionAffinity"),
11275
11283
  path: ["spec", "sessionAffinity"]
11276
11284
  };
11277
11285
  };
@@ -11293,20 +11301,20 @@ var __publicField = (obj, key, value) => {
11293
11301
  }
11294
11302
  };
11295
11303
  };
11296
- const IngressRulesTableTabField = () => {
11304
+ const IngressRulesTableTabField = (i18n2) => {
11297
11305
  return {
11298
11306
  key: "rules",
11299
- title: i18n.t("dovetail.rule"),
11307
+ title: i18n2.t("dovetail.rule"),
11300
11308
  path: ["spec", "rules"],
11301
11309
  renderContent: (_, record) => {
11302
11310
  return /* @__PURE__ */ jsxRuntimeExports.jsx(IngressRulesTable, { ingress: record });
11303
11311
  }
11304
11312
  };
11305
11313
  };
11306
- const EventsTableTabField = () => {
11314
+ const EventsTableTabField = (i18n2) => {
11307
11315
  return {
11308
11316
  key: "event",
11309
- title: i18n.t("dovetail.event"),
11317
+ title: i18n2.t("dovetail.event"),
11310
11318
  path: [],
11311
11319
  renderContent: () => {
11312
11320
  return /* @__PURE__ */ jsxRuntimeExports.jsx(EventsTable, {});
@@ -12007,23 +12015,17 @@ var __publicField = (obj, key, value) => {
12007
12015
  }
12008
12016
  function ResourceList(props) {
12009
12017
  const { formatter, name: name2, columns, Dropdown } = props;
12018
+ const { i18n: i18n2 } = useTranslation();
12010
12019
  const { tableProps, selectedKeys } = useEagleTable({
12011
12020
  useTableParams: {},
12012
- columns: [NameColumnRenderer(), ...columns],
12021
+ columns: [NameColumnRenderer(i18n2), ...columns],
12013
12022
  tableProps: {
12014
12023
  currentSize: 10
12015
12024
  },
12016
12025
  formatter,
12017
12026
  Dropdown
12018
12027
  });
12019
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
12020
- ListPage,
12021
- {
12022
- title: name2 || "",
12023
- selectedKeys,
12024
- tableProps
12025
- }
12026
- );
12028
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ListPage, { title: name2 || "", selectedKeys, tableProps });
12027
12029
  }
12028
12030
  function ResourceShow(props) {
12029
12031
  const { formatter, showConfig, Dropdown } = props;
@@ -18471,13 +18473,13 @@ var __publicField = (obj, key, value) => {
18471
18473
  return 1;
18472
18474
  return -1;
18473
18475
  };
18474
- const NameColumnRenderer = (resource = "") => {
18476
+ const NameColumnRenderer = (i18n2, resource = "") => {
18475
18477
  const dataIndex = ["metadata", "name"];
18476
18478
  return {
18477
18479
  key: "name",
18478
18480
  display: true,
18479
18481
  dataIndex,
18480
- title: i18n.t("dovetail.name"),
18482
+ title: i18n2.t("dovetail.name"),
18481
18483
  sortable: true,
18482
18484
  sorter: CommonSorter(dataIndex),
18483
18485
  render: (v, record) => {
@@ -18485,36 +18487,36 @@ var __publicField = (obj, key, value) => {
18485
18487
  }
18486
18488
  };
18487
18489
  };
18488
- const NameSpaceColumnRenderer = () => {
18490
+ const NameSpaceColumnRenderer = (i18n2) => {
18489
18491
  const dataIndex = ["metadata", "namespace"];
18490
18492
  return {
18491
18493
  key: "namespace",
18492
18494
  display: true,
18493
18495
  dataIndex,
18494
- title: i18n.t("dovetail.namespace"),
18496
+ title: i18n2.t("dovetail.namespace"),
18495
18497
  sortable: true,
18496
18498
  sorter: CommonSorter(dataIndex)
18497
18499
  };
18498
18500
  };
18499
- const StateDisplayColumnRenderer = () => {
18501
+ const StateDisplayColumnRenderer = (i18n2) => {
18500
18502
  const dataIndex = ["stateDisplay"];
18501
18503
  return {
18502
18504
  key: "stateDisplay",
18503
18505
  display: true,
18504
18506
  dataIndex,
18505
- title: i18n.t("dovetail.state"),
18507
+ title: i18n2.t("dovetail.state"),
18506
18508
  sortable: true,
18507
18509
  sorter: CommonSorter(dataIndex),
18508
18510
  render: (v) => /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, { state: v })
18509
18511
  };
18510
18512
  };
18511
- const WorkloadImageColumnRenderer = () => {
18513
+ const WorkloadImageColumnRenderer = (i18n2) => {
18512
18514
  const dataIndex = ["imageNames"];
18513
18515
  return {
18514
18516
  key: "image",
18515
18517
  display: true,
18516
18518
  dataIndex,
18517
- title: i18n.t("dovetail.image"),
18519
+ title: i18n2.t("dovetail.image"),
18518
18520
  sortable: true,
18519
18521
  sorter: CommonSorter(dataIndex),
18520
18522
  render(value, record) {
@@ -18522,23 +18524,23 @@ var __publicField = (obj, key, value) => {
18522
18524
  }
18523
18525
  };
18524
18526
  };
18525
- const WorkloadRestartsColumnRenderer = () => {
18527
+ const WorkloadRestartsColumnRenderer = (i18n2) => {
18526
18528
  const dataIndex = ["restarts"];
18527
18529
  return {
18528
18530
  key: "restarts",
18529
18531
  display: true,
18530
18532
  dataIndex,
18531
- title: i18n.t("dovetail.restarts"),
18533
+ title: i18n2.t("dovetail.restarts"),
18532
18534
  sortable: false
18533
18535
  };
18534
18536
  };
18535
- const ReplicasColumnRenderer = () => {
18537
+ const ReplicasColumnRenderer = (i18n2) => {
18536
18538
  const dataIndex = ["status", "replicas"];
18537
18539
  return {
18538
18540
  key: "replicas",
18539
18541
  display: true,
18540
18542
  dataIndex,
18541
- title: i18n.t("dovetail.replicas"),
18543
+ title: i18n2.t("dovetail.replicas"),
18542
18544
  sortable: true,
18543
18545
  sorter: CommonSorter(dataIndex),
18544
18546
  render: (_, record) => {
@@ -18550,13 +18552,13 @@ var __publicField = (obj, key, value) => {
18550
18552
  }
18551
18553
  };
18552
18554
  };
18553
- const AgeColumnRenderer = () => {
18555
+ const AgeColumnRenderer = (i18n2) => {
18554
18556
  const dataIndex = ["metadata", "creationTimestamp"];
18555
18557
  return {
18556
18558
  key: "creationTimestamp",
18557
18559
  display: true,
18558
18560
  dataIndex,
18559
- title: i18n.t("dovetail.created_time"),
18561
+ title: i18n2.t("dovetail.created_time"),
18560
18562
  sortable: true,
18561
18563
  sorter: (a, b) => {
18562
18564
  const valA = new Date(lodashExports.get(a, dataIndex));
@@ -18572,76 +18574,76 @@ var __publicField = (obj, key, value) => {
18572
18574
  }
18573
18575
  };
18574
18576
  };
18575
- const NodeNameColumnRenderer = (options) => {
18577
+ const NodeNameColumnRenderer = (i18n2, options) => {
18576
18578
  const dataIndex = ["spec", "nodeName"];
18577
18579
  return {
18578
18580
  key: "node",
18579
18581
  display: true,
18580
18582
  dataIndex,
18581
- title: i18n.t("dovetail.node_name"),
18583
+ title: i18n2.t("dovetail.node_name"),
18582
18584
  sortable: true,
18583
18585
  sorter: CommonSorter(dataIndex),
18584
18586
  ...options
18585
18587
  };
18586
18588
  };
18587
- const RestartCountColumnRenderer = () => {
18589
+ const RestartCountColumnRenderer = (i18n2) => {
18588
18590
  const dataIndex = ["restartCount"];
18589
18591
  return {
18590
18592
  key: "restartCount",
18591
18593
  display: true,
18592
18594
  dataIndex,
18593
- title: i18n.t("dovetail.restarts"),
18595
+ title: i18n2.t("dovetail.restarts"),
18594
18596
  sortable: true,
18595
18597
  sorter: CommonSorter(dataIndex)
18596
18598
  };
18597
18599
  };
18598
- const CompletionsCountColumnRenderer = () => {
18600
+ const CompletionsCountColumnRenderer = (i18n2) => {
18599
18601
  const dataIndex = ["completionsDisplay"];
18600
18602
  return {
18601
18603
  key: "completions",
18602
18604
  display: true,
18603
18605
  dataIndex,
18604
- title: i18n.t("completions"),
18606
+ title: i18n2.t("completions"),
18605
18607
  sortable: true,
18606
18608
  sorter: CommonSorter(dataIndex)
18607
18609
  };
18608
18610
  };
18609
- const DurationColumnRenderer = () => {
18611
+ const DurationColumnRenderer = (i18n2) => {
18610
18612
  const dataIndex = ["duration"];
18611
18613
  return {
18612
18614
  key: "duration",
18613
18615
  display: true,
18614
18616
  dataIndex,
18615
- title: i18n.t("dovetail.duration"),
18617
+ title: i18n2.t("dovetail.duration"),
18616
18618
  sortable: true,
18617
18619
  sorter: CommonSorter(dataIndex),
18618
18620
  render: (v) => {
18619
18621
  const i18nMap = {
18620
- sec: i18n.t("dovetail.sec"),
18621
- day: i18n.t("dovetail.day"),
18622
- min: i18n.t("dovetail.min"),
18623
- hr: i18n.t("dovetail.hr")
18622
+ sec: i18n2.t("dovetail.sec"),
18623
+ day: i18n2.t("dovetail.day"),
18624
+ min: i18n2.t("dovetail.min"),
18625
+ hr: i18n2.t("dovetail.hr")
18624
18626
  };
18625
18627
  return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: elapsedTime(v, i18nMap).label || "-" });
18626
18628
  }
18627
18629
  };
18628
18630
  };
18629
- const ServiceTypeColumnRenderer = () => {
18631
+ const ServiceTypeColumnRenderer = (i18n2) => {
18630
18632
  const dataIndex = ["spec", "type"];
18631
18633
  return {
18632
18634
  key: "type",
18633
- title: i18n.t("dovetail.type"),
18635
+ title: i18n2.t("dovetail.type"),
18634
18636
  display: true,
18635
18637
  dataIndex,
18636
18638
  sortable: true,
18637
18639
  sorter: CommonSorter(dataIndex)
18638
18640
  };
18639
18641
  };
18640
- const PodWorkloadColumnRenderer = () => {
18642
+ const PodWorkloadColumnRenderer = (i18n2) => {
18641
18643
  const dataIndex = ["metadata", "ownerReferences"];
18642
18644
  return {
18643
18645
  key: "type",
18644
- title: i18n.t("dovetail.workload"),
18646
+ title: i18n2.t("dovetail.workload"),
18645
18647
  display: true,
18646
18648
  dataIndex,
18647
18649
  sortable: true,
@@ -18658,11 +18660,11 @@ var __publicField = (obj, key, value) => {
18658
18660
  }
18659
18661
  };
18660
18662
  };
18661
- const IngressRulesColumnRenderer = () => {
18663
+ const IngressRulesColumnRenderer = (i18n2) => {
18662
18664
  const dataIndex = ["spec", "rules"];
18663
18665
  return {
18664
18666
  key: "type",
18665
- title: i18n.t("dovetail.rule"),
18667
+ title: i18n2.t("dovetail.rule"),
18666
18668
  display: true,
18667
18669
  dataIndex,
18668
18670
  sortable: true,
@@ -18672,13 +18674,13 @@ var __publicField = (obj, key, value) => {
18672
18674
  }
18673
18675
  };
18674
18676
  };
18675
- const IngressDefaultBackendColumnRenderer = () => {
18677
+ const IngressDefaultBackendColumnRenderer = (i18n2) => {
18676
18678
  const dataIndex = ["spec", "defaultBackend"];
18677
18679
  return {
18678
18680
  key: "defaultBackend",
18679
18681
  display: true,
18680
18682
  dataIndex,
18681
- title: i18n.t("dovetail.default_backend"),
18683
+ title: i18n2.t("dovetail.default_backend"),
18682
18684
  sortable: true,
18683
18685
  sorter: CommonSorter(["spec", "defaultBackend"]),
18684
18686
  render: (defaultBackend, record) => {
@@ -1,4 +1,3 @@
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';
@@ -9,7 +8,6 @@ type Props = {
9
8
  resourcesConfig: ResourceConfig[];
10
9
  useHashUrl?: boolean;
11
10
  urlPrefix?: string;
12
- refineResources?: ResourceProps[];
13
11
  Layout?: React.FC<unknown>;
14
12
  history: History;
15
13
  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
@@ -17,6 +17,7 @@ export declare const resources: {
17
17
  retry: string;
18
18
  create_resource: string;
19
19
  edit_resource: string;
20
+ status: string;
20
21
  };
21
22
  };
22
23
  'zh-CN': {
@@ -15,6 +15,7 @@ declare const _default: {
15
15
  retry: string;
16
16
  create_resource: string;
17
17
  edit_resource: string;
18
+ status: string;
18
19
  };
19
20
  };
20
21
  export default _default;
@@ -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 { JobModel } from '../../models';
2
3
  import { ResourceConfig } from '../../types';
3
- export declare const JobConfig: ResourceConfig<JobModel>;
4
+ export declare const JobConfig: (i18n: i18n) => ResourceConfig<JobModel>;
@@ -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>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dovetail-v2/refine",
3
- "version": "0.0.21-beta.0",
3
+ "version": "0.0.21",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",