@dovetail-v2/refine 0.0.35-beta.3 → 0.0.35-beta.4

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-83577f15.js";
1
+ import { j as jsxRuntimeExports } from "./index-8f13370f.js";
2
2
  import * as monaco from "monaco-editor";
3
3
  import { useRef, useEffect } from "react";
4
4
  import "i18next";
@@ -1322,6 +1322,7 @@ const default_backend = "默认后端";
1322
1322
  const ingress_class = "Ingress 类";
1323
1323
  const port = "端口";
1324
1324
  const pod_ready_num = "Pod 就绪数量";
1325
+ const pod_complete_num = "Pod 完成数量";
1325
1326
  const pod_replicas_num = "Pod 预期数量";
1326
1327
  const edit_replicas = "编辑预期副本数";
1327
1328
  const cert = "证书";
@@ -1472,6 +1473,7 @@ const dovetail = {
1472
1473
  ingress_class,
1473
1474
  port,
1474
1475
  pod_ready_num,
1476
+ pod_complete_num,
1475
1477
  pod_replicas_num,
1476
1478
  edit_replicas,
1477
1479
  cert,
@@ -8115,7 +8117,7 @@ const useDeleteModal = (resource) => {
8115
8117
  openDeleteConfirmModal
8116
8118
  };
8117
8119
  };
8118
- const index_r5625l = "";
8120
+ const index_wrn16i = "";
8119
8121
  const EMPTY_VALUES = [void 0, null, "", "-"];
8120
8122
  const EmptyStyle = "e5223w8";
8121
8123
  const ContentStyle$2 = "cdjsw14";
@@ -10416,7 +10418,7 @@ const EventsTable = ({}) => {
10416
10418
  sortable: true,
10417
10419
  sorter: CommonSorter(["note"])
10418
10420
  },
10419
- AgeColumnRenderer(i18n2, { title: i18n2.t("dovetail.last_seen") })
10421
+ AgeColumnRenderer(i18n2, { title: i18n2.t("dovetail.last_seen"), width: 160 }, { isRelativeTime: false })
10420
10422
  ],
10421
10423
  [i18n2]
10422
10424
  );
@@ -10747,7 +10749,7 @@ function Tabs(props) {
10747
10749
  return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.tabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
10748
10750
  }) });
10749
10751
  }
10750
- const ShowContent_1iepja4 = "";
10752
+ const ShowContent_1947rqs = "";
10751
10753
  const ShowContentWrapperStyle = "s9agep2";
10752
10754
  const BackButton = "bo89gfi";
10753
10755
  const ToolBarWrapper = "t1ohe42f";
@@ -10997,7 +10999,7 @@ const WorkloadPodsTable = ({
10997
10999
  if ((dataSource == null ? void 0 : dataSource.length) === 0) {
10998
11000
  return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, {
10999
11001
  errorText: i18n2.t("dovetail.no_resource", {
11000
- kind: i18n2.t("dovetail.pod")
11002
+ kind: ` ${i18n2.t("dovetail.pod")}`
11001
11003
  }),
11002
11004
  style: {
11003
11005
  padding: "15px 0"
@@ -11337,7 +11339,7 @@ function WorkloadReplicas({
11337
11339
  children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("tr", {
11338
11340
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx("td", {
11339
11341
  className: cx_default(LabelStyle, Typo.Label.l3_regular),
11340
- children: t2("dovetail.pod_ready_num")
11342
+ children: record.kind === "Job" ? t2("dovetail.pod_complete_num") : t2("dovetail.pod_ready_num")
11341
11343
  }), /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
11342
11344
  className: cx_default(ValueStyle, Typo.Label.l3_regular),
11343
11345
  children: readyReplicas
@@ -11527,7 +11529,7 @@ const EventsTableTabField = () => {
11527
11529
  key: "event",
11528
11530
  path: [],
11529
11531
  renderContent: () => {
11530
- return /* @__PURE__ */ jsxRuntimeExports.jsx(EventsTable, {});
11532
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { padding: "0 24px", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(EventsTable, {}) });
11531
11533
  }
11532
11534
  };
11533
11535
  };
@@ -18319,7 +18321,7 @@ function ResourceList(props) {
18319
18321
  useTableParams: {},
18320
18322
  columns: [nameRenderer, ...(columns == null ? void 0 : columns()) || []],
18321
18323
  tableProps: {
18322
- currentSize: 10
18324
+ currentSize: 50
18323
18325
  },
18324
18326
  formatter,
18325
18327
  Dropdown
@@ -22182,7 +22184,7 @@ const Separator = () => {
22182
22184
  });
22183
22185
  };
22184
22186
  const MonacoYamlEditor = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
22185
- const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-bbf8d9dd.js"));
22187
+ const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-68b40e77.js"));
22186
22188
  const YamlEditorComponent = forwardRef(
22187
22189
  function YamlEditorComponent2(props, ref) {
22188
22190
  const {
@@ -23439,6 +23441,7 @@ const WorkloadRestartsColumnRenderer = (i18n2) => {
23439
23441
  display: true,
23440
23442
  width: 120,
23441
23443
  dataIndex,
23444
+ align: "right",
23442
23445
  title: i18n2.t("dovetail.restarts"),
23443
23446
  sortable: false
23444
23447
  };
@@ -23467,7 +23470,9 @@ const ReplicasColumnRenderer = (i18n2) => {
23467
23470
  }
23468
23471
  };
23469
23472
  };
23470
- const AgeColumnRenderer = (i18n2, config) => {
23473
+ const AgeColumnRenderer = (i18n2, config, {
23474
+ isRelativeTime = true
23475
+ } = {}) => {
23471
23476
  const dataIndex = ["metadata", "creationTimestamp"];
23472
23477
  return {
23473
23478
  key: "creationTimestamp",
@@ -23486,8 +23491,10 @@ const AgeColumnRenderer = (i18n2, config) => {
23486
23491
  return -1;
23487
23492
  },
23488
23493
  render: (value2) => {
23489
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Time, {
23494
+ return isRelativeTime ? /* @__PURE__ */ jsxRuntimeExports.jsx(Time, {
23490
23495
  date: new Date(value2)
23496
+ }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
23497
+ value: dayjs(value2).format("YYYY-MM-DD hh:mm:ss")
23491
23498
  });
23492
23499
  },
23493
23500
  ...config
@@ -23548,6 +23555,7 @@ const DurationColumnRenderer = (i18n2) => {
23548
23555
  sortable: true,
23549
23556
  sorter: CommonSorter(dataIndex),
23550
23557
  width: 120,
23558
+ align: "right",
23551
23559
  render: (v) => {
23552
23560
  return /* @__PURE__ */ jsxRuntimeExports.jsx(DurationTime, {
23553
23561
  value: v
package/dist/refine.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b3, A, aw, ay, ag, bj, aG, E, bx, bl, aq, t, C, g, bK, aj, aK, U, bM, Z, a4, bV, a8, bm, bk, bY, am, aQ, q, ae, aV, bX, bH, aZ, D, aD, a$, bW, aE, au, b6, bJ, bL, bv, ah, _, n, m, bN, I, aN, at, o, bn, bP, al, aM, a9, aa, M, ab, ax, af, aW, a_, O, bw, b2, N, F, b, av, K, b5, aS, aR, bO, bh, e, bp, Q, P, aI, p, V, bg, aF, bT, bS, aB, aO, l, ak, aH, s, aP, aC, c0, bI, b0, b7, b8, ai, R, Y, a2, a1, b1, $, bU, a0, a5, f, bC, bF, bB, bA, bD, bE, by, bq, bt, bu, bs, br, bo, b9, an, aL, ac, i, bc, az, b$, k, bd, aA, as, aJ, h, b_, ap, ar, aU, aT, ao, S, aY, aX, bZ, bz, bi, be, bf, T, bR, X, W, bQ, a3, a7, a6, c, bG, ad, ba, v, G, d, L, J, H, r, a, x, w, y, z, b4, B, bb, u } from "./index-83577f15.js";
1
+ import { b3, A, aw, ay, ag, bj, aG, E, bx, bl, aq, t, C, g, bK, aj, aK, U, bM, Z, a4, bV, a8, bm, bk, bY, am, aQ, q, ae, aV, bX, bH, aZ, D, aD, a$, bW, aE, au, b6, bJ, bL, bv, ah, _, n, m, bN, I, aN, at, o, bn, bP, al, aM, a9, aa, M, ab, ax, af, aW, a_, O, bw, b2, N, F, b, av, K, b5, aS, aR, bO, bh, e, bp, Q, P, aI, p, V, bg, aF, bT, bS, aB, aO, l, ak, aH, s, aP, aC, c0, bI, b0, b7, b8, ai, R, Y, a2, a1, b1, $, bU, a0, a5, f, bC, bF, bB, bA, bD, bE, by, bq, bt, bu, bs, br, bo, b9, an, aL, ac, i, bc, az, b$, k, bd, aA, as, aJ, h, b_, ap, ar, aU, aT, ao, S, aY, aX, bZ, bz, bi, be, bf, T, bR, X, W, bQ, a3, a7, a6, c, bG, ad, ba, v, G, d, L, J, H, r, a, x, w, y, z, b4, B, bb, u } from "./index-8f13370f.js";
2
2
  import "@cloudtower/eagle";
3
3
  import "@refinedev/core";
4
4
  import "@cloudtower/icons-react";
@@ -1328,6 +1328,7 @@ var __publicField = (obj, key, value) => {
1328
1328
  const ingress_class = "Ingress 类";
1329
1329
  const port = "端口";
1330
1330
  const pod_ready_num = "Pod 就绪数量";
1331
+ const pod_complete_num = "Pod 完成数量";
1331
1332
  const pod_replicas_num = "Pod 预期数量";
1332
1333
  const edit_replicas = "编辑预期副本数";
1333
1334
  const cert = "证书";
@@ -1478,6 +1479,7 @@ var __publicField = (obj, key, value) => {
1478
1479
  ingress_class,
1479
1480
  port,
1480
1481
  pod_ready_num,
1482
+ pod_complete_num,
1481
1483
  pod_replicas_num,
1482
1484
  edit_replicas,
1483
1485
  cert,
@@ -8121,7 +8123,7 @@ var __publicField = (obj, key, value) => {
8121
8123
  openDeleteConfirmModal
8122
8124
  };
8123
8125
  };
8124
- const index_r5625l = "";
8126
+ const index_wrn16i = "";
8125
8127
  const EMPTY_VALUES = [void 0, null, "", "-"];
8126
8128
  const EmptyStyle = "e5223w8";
8127
8129
  const ContentStyle$2 = "cdjsw14";
@@ -10422,7 +10424,7 @@ var __publicField = (obj, key, value) => {
10422
10424
  sortable: true,
10423
10425
  sorter: CommonSorter(["note"])
10424
10426
  },
10425
- AgeColumnRenderer(i18n2, { title: i18n2.t("dovetail.last_seen") })
10427
+ AgeColumnRenderer(i18n2, { title: i18n2.t("dovetail.last_seen"), width: 160 }, { isRelativeTime: false })
10426
10428
  ],
10427
10429
  [i18n2]
10428
10430
  );
@@ -10753,7 +10755,7 @@ var __publicField = (obj, key, value) => {
10753
10755
  return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.tabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
10754
10756
  }) });
10755
10757
  }
10756
- const ShowContent_1iepja4 = "";
10758
+ const ShowContent_1947rqs = "";
10757
10759
  const ShowContentWrapperStyle = "s9agep2";
10758
10760
  const BackButton = "bo89gfi";
10759
10761
  const ToolBarWrapper = "t1ohe42f";
@@ -11003,7 +11005,7 @@ var __publicField = (obj, key, value) => {
11003
11005
  if ((dataSource == null ? void 0 : dataSource.length) === 0) {
11004
11006
  return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, {
11005
11007
  errorText: i18n2.t("dovetail.no_resource", {
11006
- kind: i18n2.t("dovetail.pod")
11008
+ kind: ` ${i18n2.t("dovetail.pod")}`
11007
11009
  }),
11008
11010
  style: {
11009
11011
  padding: "15px 0"
@@ -11343,7 +11345,7 @@ var __publicField = (obj, key, value) => {
11343
11345
  children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("tr", {
11344
11346
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx("td", {
11345
11347
  className: cx_default(LabelStyle, eagle.Typo.Label.l3_regular),
11346
- children: t2("dovetail.pod_ready_num")
11348
+ children: record.kind === "Job" ? t2("dovetail.pod_complete_num") : t2("dovetail.pod_ready_num")
11347
11349
  }), /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
11348
11350
  className: cx_default(ValueStyle, eagle.Typo.Label.l3_regular),
11349
11351
  children: readyReplicas
@@ -11533,7 +11535,7 @@ var __publicField = (obj, key, value) => {
11533
11535
  key: "event",
11534
11536
  path: [],
11535
11537
  renderContent: () => {
11536
- return /* @__PURE__ */ jsxRuntimeExports.jsx(EventsTable, {});
11538
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { padding: "0 24px", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(EventsTable, {}) });
11537
11539
  }
11538
11540
  };
11539
11541
  };
@@ -18325,7 +18327,7 @@ var __publicField = (obj, key, value) => {
18325
18327
  useTableParams: {},
18326
18328
  columns: [nameRenderer, ...(columns == null ? void 0 : columns()) || []],
18327
18329
  tableProps: {
18328
- currentSize: 10
18330
+ currentSize: 50
18329
18331
  },
18330
18332
  formatter,
18331
18333
  Dropdown
@@ -23445,6 +23447,7 @@ var __publicField = (obj, key, value) => {
23445
23447
  display: true,
23446
23448
  width: 120,
23447
23449
  dataIndex,
23450
+ align: "right",
23448
23451
  title: i18n2.t("dovetail.restarts"),
23449
23452
  sortable: false
23450
23453
  };
@@ -23473,7 +23476,9 @@ var __publicField = (obj, key, value) => {
23473
23476
  }
23474
23477
  };
23475
23478
  };
23476
- const AgeColumnRenderer = (i18n2, config) => {
23479
+ const AgeColumnRenderer = (i18n2, config, {
23480
+ isRelativeTime = true
23481
+ } = {}) => {
23477
23482
  const dataIndex = ["metadata", "creationTimestamp"];
23478
23483
  return {
23479
23484
  key: "creationTimestamp",
@@ -23492,8 +23497,10 @@ var __publicField = (obj, key, value) => {
23492
23497
  return -1;
23493
23498
  },
23494
23499
  render: (value2) => {
23495
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Time, {
23500
+ return isRelativeTime ? /* @__PURE__ */ jsxRuntimeExports.jsx(Time, {
23496
23501
  date: new Date(value2)
23502
+ }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
23503
+ value: dayjs(value2).format("YYYY-MM-DD hh:mm:ss")
23497
23504
  });
23498
23505
  },
23499
23506
  ...config
@@ -23554,6 +23561,7 @@ var __publicField = (obj, key, value) => {
23554
23561
  sortable: true,
23555
23562
  sorter: CommonSorter(dataIndex),
23556
23563
  width: 120,
23564
+ align: "right",
23557
23565
  render: (v) => {
23558
23566
  return /* @__PURE__ */ jsxRuntimeExports.jsx(DurationTime, {
23559
23567
  value: v
package/dist/style.css CHANGED
@@ -1,7 +1,7 @@
1
1
  .t1vq0ett{margin-bottom:4px;}
2
2
  .t139onst{color:rgba(44,56,82,0.60);}
3
3
  .m18lzor8.ant-modal .ant-modal-content{border-radius:16px;}.m18lzor8.ant-modal .ant-modal-header{border-radius:16px 16px 0 0;}
4
- .e5223w8{color:rgba(0,21,64,.3);}
4
+ .e5223w8.e5223w8{color:rgba(0,21,64,.3);}
5
5
  .cdjsw14{width:100%;}.cdjsw14.overflow{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
6
6
  .b142d7q8{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}.b142d7q8 .breadcrumb-item:not(:last-of-type):after{content:'>';margin:0 8px;}
7
7
  .egn3dbn{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;}
@@ -34,7 +34,7 @@
34
34
  .nqm4qz0{color:#00122E;margin-right:8px;}
35
35
  .ticl0qc{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;width:100%;}
36
36
  .so9uwk1{width:100%;}
37
- .ge26ou0{padding:12px 16px;border-radius:8px;border:1px solid rgba(211,218,235,0.6);box-shadow: 0px 0px 2.003px 0px rgba(107,125,153,0.15), 0px 0px 16px 0px rgba(107,125,153,0.08);background-color:#fff;margin:16px 24px;overflow:auto;margin-bottom:0;width:calc(100% - 48px);max-width:1592px;}.ge26ou0:not(:last-of-type){margin-bottom:24px;}
37
+ .ge26ou0{padding:12px 16px;border-radius:8px;border:1px solid rgba(211,218,235,0.6);box-shadow: 0px 0px 2.003px 0px rgba(107,125,153,0.15), 0px 0px 16px 0px rgba(107,125,153,0.08);background-color:#fff;margin:0 24px;overflow:auto;margin-bottom:0;width:calc(100% - 48px);max-width:1592px;}.ge26ou0:first-of-type{margin-top:16px;}.ge26ou0:not(:last-of-type){margin-bottom:24px;}
38
38
  .g17f8vl9{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;color:#1d326c;margin-bottom:12px;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}
39
39
  .fykgn2i{background-color:#fff;height:100%;}
40
40
  .fngr745{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;}
@@ -11,6 +11,9 @@ export declare const WorkloadRestartsColumnRenderer: <Model extends WorkloadMode
11
11
  export declare const ReplicasColumnRenderer: <Model extends WorkloadModel>(i18n: I18nType) => Column<Model>;
12
12
  export declare const AgeColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType, config?: {
13
13
  title?: string;
14
+ width: number;
15
+ }, { isRelativeTime }?: {
16
+ isRelativeTime?: boolean | undefined;
14
17
  }) => Column<Model>;
15
18
  export declare const NodeNameColumnRenderer: <Model extends PodModel>(i18n: I18nType, options?: Partial<Column<Model>> | undefined) => Column<Model>;
16
19
  export declare const RestartCountColumnRenderer: <Model extends PodModel>(i18n: I18nType) => Column<Model>;
package/lib/src/i18n.d.ts CHANGED
@@ -208,6 +208,7 @@ export declare const resources: {
208
208
  ingress_class: string;
209
209
  port: string;
210
210
  pod_ready_num: string;
211
+ pod_complete_num: string;
211
212
  pod_replicas_num: string;
212
213
  edit_replicas: string;
213
214
  cert: string;
@@ -82,6 +82,7 @@ declare const _default: {
82
82
  ingress_class: string;
83
83
  port: string;
84
84
  pod_ready_num: string;
85
+ pod_complete_num: string;
85
86
  pod_replicas_num: string;
86
87
  edit_replicas: string;
87
88
  cert: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dovetail-v2/refine",
3
- "version": "0.0.35-beta.3",
3
+ "version": "0.0.35-beta.4",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",