@dovetail-v2/refine 0.0.35-beta.2 → 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-a91f5f0f.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";
@@ -8387,36 +8389,6 @@ function MetadataForm() {
8387
8389
  /* @__PURE__ */ jsxRuntimeExports.jsx(kit.form.Item, { name: ["metadata", "annotations"], label: "Annotations", children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValueListWidget, {}) })
8388
8390
  ] });
8389
8391
  }
8390
- const ErrorContent_1t51xnx = "";
8391
- const ErrorWrapper$1 = "eckm4od";
8392
- const ErrorContent$1 = "e1hl982n";
8393
- const WidgetErrorContent$1 = (props) => {
8394
- const {
8395
- refetch
8396
- } = props;
8397
- const kit = useContext(kitContext);
8398
- const {
8399
- t: t2
8400
- } = useTranslation();
8401
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
8402
- className: ErrorWrapper$1,
8403
- style: props.style,
8404
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
8405
- className: ErrorContent$1,
8406
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("p", {
8407
- className: cx_default(Typo.Label.l1_regular_title, "title"),
8408
- children: props.errorText || t2("dovetail.obtain_data_error")
8409
- }), refetch ? /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
8410
- type: "ordinary",
8411
- onClick: (e2) => {
8412
- e2.stopPropagation();
8413
- refetch == null ? void 0 : refetch();
8414
- },
8415
- children: t2("dovetail.retry")
8416
- }) : null]
8417
- })
8418
- });
8419
- };
8420
8392
  function memoize$1(fn) {
8421
8393
  var cache = /* @__PURE__ */ Object.create(null);
8422
8394
  return function(arg) {
@@ -8534,6 +8506,76 @@ var styled_default = process.env.NODE_ENV !== "production" ? new Proxy(styled, {
8534
8506
  return o(prop);
8535
8507
  }
8536
8508
  }) : styled;
8509
+ const index_1kmu85y = "";
8510
+ const ErrorWrapper$1 = /* @__PURE__ */ styled_default("div")({
8511
+ name: "ErrorWrapper",
8512
+ class: "egn3dbn",
8513
+ propsAsIs: false
8514
+ });
8515
+ const ErrorContent$1 = /* @__PURE__ */ styled_default("div")({
8516
+ name: "ErrorContent",
8517
+ class: "e136jgy8",
8518
+ propsAsIs: false
8519
+ });
8520
+ const WidgetErrorContent$1 = (props) => {
8521
+ const {
8522
+ refetch,
8523
+ errorText,
8524
+ hiddenRetry
8525
+ } = props;
8526
+ const kit = useContext(kitContext);
8527
+ const {
8528
+ t: t2
8529
+ } = useTranslation();
8530
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorWrapper$1, {
8531
+ className: props.className,
8532
+ style: props.style,
8533
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ErrorContent$1, {
8534
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("p", {
8535
+ className: cx_default(Typo.Label.l1_regular_title, "title"),
8536
+ children: errorText || t2("dovetail.obtain_data_error")
8537
+ }), hiddenRetry ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
8538
+ size: "small",
8539
+ type: "ordinary",
8540
+ onClick: (e2) => {
8541
+ e2.stopPropagation();
8542
+ refetch == null ? void 0 : refetch();
8543
+ },
8544
+ children: t2("dovetail.retry")
8545
+ })]
8546
+ })
8547
+ });
8548
+ };
8549
+ const ErrorContent_1t51xnx = "";
8550
+ const ErrorWrapper = "eckm4od";
8551
+ const ErrorContent = "e1hl982n";
8552
+ const WidgetErrorContent = (props) => {
8553
+ const {
8554
+ refetch
8555
+ } = props;
8556
+ const kit = useContext(kitContext);
8557
+ const {
8558
+ t: t2
8559
+ } = useTranslation();
8560
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
8561
+ className: ErrorWrapper,
8562
+ style: props.style,
8563
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
8564
+ className: ErrorContent,
8565
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("p", {
8566
+ className: cx_default(Typo.Label.l1_regular_title, "title"),
8567
+ children: props.errorText || t2("dovetail.obtain_data_error")
8568
+ }), refetch ? /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
8569
+ type: "ordinary",
8570
+ onClick: (e2) => {
8571
+ e2.stopPropagation();
8572
+ refetch == null ? void 0 : refetch();
8573
+ },
8574
+ children: t2("dovetail.retry")
8575
+ }) : null]
8576
+ })
8577
+ });
8578
+ };
8537
8579
  const TableWidgets_ny30pi = "";
8538
8580
  const AuxiliaryLine = /* @__PURE__ */ styled_default("div")({
8539
8581
  name: "AuxiliaryLine",
@@ -8589,7 +8631,7 @@ function Table(props) {
8589
8631
  if (loading) {
8590
8632
  return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.loading, {});
8591
8633
  } else if (error) {
8592
- return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, {
8634
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
8593
8635
  errorText: t2("dovetail.retry_when_access_data_failed"),
8594
8636
  refetch,
8595
8637
  style: {
@@ -8597,7 +8639,7 @@ function Table(props) {
8597
8639
  }
8598
8640
  });
8599
8641
  } else if (dataSource.length === 0) {
8600
- return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, {
8642
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
8601
8643
  errorText: empty2 || t2("dovetail.empty"),
8602
8644
  style: {
8603
8645
  padding: "15px 0"
@@ -8660,7 +8702,8 @@ const PodSelectorTable = ({ podSelectors = {} }) => {
8660
8702
  WidgetErrorContent$1,
8661
8703
  {
8662
8704
  errorText: t2("dovetail.no_resource", { kind: ` ${t2("dovetail.pod_selector")}` }),
8663
- style: { padding: "15px 0" }
8705
+ style: { padding: "15px 0" },
8706
+ hiddenRetry: true
8664
8707
  }
8665
8708
  );
8666
8709
  }
@@ -8727,7 +8770,7 @@ const PortsTable = ({ service }) => {
8727
8770
  id: port2.name || ""
8728
8771
  }));
8729
8772
  if ((ports == null ? void 0 : ports.length) === 0) {
8730
- return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: t2("dovetail.no_resource", { kind: t2("dovetail.port") }), style: { padding: "15px 0" } });
8773
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: t2("dovetail.no_resource", { kind: t2("dovetail.port") }), style: { padding: "15px 0" }, hiddenRetry: true });
8731
8774
  }
8732
8775
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
8733
8776
  Table$1,
@@ -9857,7 +9900,7 @@ const ServiceOutClusterAccessComponent = ({
9857
9900
  children: content || "-"
9858
9901
  });
9859
9902
  };
9860
- const index_1l7lkk4 = "";
9903
+ const index_1ce2deq = "";
9861
9904
  const TagWrapper = "t13a6vox";
9862
9905
  const TagStyle = "t12ikbmp";
9863
9906
  const Tags = (props) => {
@@ -9866,8 +9909,8 @@ const Tags = (props) => {
9866
9909
  } = props;
9867
9910
  const kit = useUIKit();
9868
9911
  if (!value2) {
9869
- return /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
9870
- children: "-"
9912
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
9913
+ value: ""
9871
9914
  });
9872
9915
  }
9873
9916
  const tags = Object.keys(value2).map((key2) => {
@@ -10334,46 +10377,6 @@ const CronjobJobsTable = ({
10334
10377
  })]
10335
10378
  });
10336
10379
  };
10337
- const index_1kmu85y = "";
10338
- const ErrorWrapper = /* @__PURE__ */ styled_default("div")({
10339
- name: "ErrorWrapper",
10340
- class: "egn3dbn",
10341
- propsAsIs: false
10342
- });
10343
- const ErrorContent = /* @__PURE__ */ styled_default("div")({
10344
- name: "ErrorContent",
10345
- class: "e136jgy8",
10346
- propsAsIs: false
10347
- });
10348
- const WidgetErrorContent = (props) => {
10349
- const {
10350
- refetch,
10351
- errorText,
10352
- hiddenRetry
10353
- } = props;
10354
- const kit = useContext(kitContext);
10355
- const {
10356
- t: t2
10357
- } = useTranslation();
10358
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorWrapper, {
10359
- className: props.className,
10360
- style: props.style,
10361
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ErrorContent, {
10362
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("p", {
10363
- className: cx_default(Typo.Label.l1_regular_title, "title"),
10364
- children: errorText || t2("dovetail.obtain_data_error")
10365
- }), hiddenRetry ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
10366
- size: "small",
10367
- type: "ordinary",
10368
- onClick: (e2) => {
10369
- e2.stopPropagation();
10370
- refetch == null ? void 0 : refetch();
10371
- },
10372
- children: t2("dovetail.retry")
10373
- })]
10374
- })
10375
- });
10376
- };
10377
10380
  const EventsTable = ({}) => {
10378
10381
  const { i18n: i18n2 } = useTranslation();
10379
10382
  const [currentPage, setCurrentPage] = useState(1);
@@ -10415,7 +10418,7 @@ const EventsTable = ({}) => {
10415
10418
  sortable: true,
10416
10419
  sorter: CommonSorter(["note"])
10417
10420
  },
10418
- AgeColumnRenderer(i18n2, { title: i18n2.t("dovetail.last_seen") })
10421
+ AgeColumnRenderer(i18n2, { title: i18n2.t("dovetail.last_seen"), width: 160 }, { isRelativeTime: false })
10419
10422
  ],
10420
10423
  [i18n2]
10421
10424
  );
@@ -10429,7 +10432,7 @@ const EventsTable = ({}) => {
10429
10432
  }, [data2 == null ? void 0 : data2.data, parsed]);
10430
10433
  if (!(dataSource == null ? void 0 : dataSource.length) && !isLoading) {
10431
10434
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
10432
- WidgetErrorContent,
10435
+ WidgetErrorContent$1,
10433
10436
  {
10434
10437
  errorText: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.event") }),
10435
10438
  hiddenRetry: true
@@ -10553,7 +10556,7 @@ const IngressRulesTable = ({ ingress }) => {
10553
10556
  }
10554
10557
  ];
10555
10558
  if ((rows == null ? void 0 : rows.length) === 0) {
10556
- return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: t2("dovetail.no_resource", { kind: t2("dovetail.rule") }), style: { padding: "15px 0" } });
10559
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: t2("dovetail.no_resource", { kind: t2("dovetail.rule") }), style: { padding: "15px 0" }, hiddenRetry: true });
10557
10560
  }
10558
10561
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
10559
10562
  Table$1,
@@ -10574,7 +10577,7 @@ const IngressRulesTable = ({ ingress }) => {
10574
10577
  const KeyValue_1vkf5y2 = "";
10575
10578
  const ContentBlockStyle = "c8jy7dc";
10576
10579
  const KeyStyle = "k2sddxl";
10577
- const ValueStyle = "v16vicsr";
10580
+ const ValueStyle$2 = "v16vicsr";
10578
10581
  const KeyValue = (props) => {
10579
10582
  const {
10580
10583
  data: data2 = {},
@@ -10590,12 +10593,12 @@ const KeyValue = (props) => {
10590
10593
  className: cx_default(KeyStyle, Typo.Label.l4_regular),
10591
10594
  children: key2
10592
10595
  }), /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
10593
- className: cx_default(Typo.Label.l4_regular, ValueStyle),
10596
+ className: cx_default(Typo.Label.l4_regular, ValueStyle$2),
10594
10597
  children: hideSecret ? toAsterisk(data2[key2]) : data2[key2]
10595
10598
  })]
10596
10599
  }, key2));
10597
10600
  if (!result.length) {
10598
- return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
10601
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, {
10599
10602
  errorText: empty2 || t2("dovetail.empty"),
10600
10603
  hiddenRetry: true
10601
10604
  });
@@ -10746,7 +10749,7 @@ function Tabs(props) {
10746
10749
  return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.tabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
10747
10750
  }) });
10748
10751
  }
10749
- const ShowContent_eym19u = "";
10752
+ const ShowContent_1947rqs = "";
10750
10753
  const ShowContentWrapperStyle = "s9agep2";
10751
10754
  const BackButton = "bo89gfi";
10752
10755
  const ToolBarWrapper = "t1ohe42f";
@@ -10758,7 +10761,8 @@ const GroupTitleStyle = "g17f8vl9";
10758
10761
  const FullTabContentStyle = "fykgn2i";
10759
10762
  const FieldWrapperStyle = "fngr745";
10760
10763
  const TabContentStyle = "t11wg61l";
10761
- const TabsStyle = "t1x3rivf";
10764
+ const ValueStyle$1 = "v1x3rivf";
10765
+ const TabsStyle = "tf5s6s";
10762
10766
  function ShowGroupComponent(props) {
10763
10767
  const {
10764
10768
  title,
@@ -10842,7 +10846,7 @@ const ShowContent = (props) => {
10842
10846
  minWidth: 0
10843
10847
  },
10844
10848
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
10845
- className: Typo.Label.l4_regular_title,
10849
+ className: cx_default(Typo.Label.l4_regular_title, ValueStyle$1),
10846
10850
  value: content,
10847
10851
  useOverflow: false
10848
10852
  })
@@ -10993,13 +10997,14 @@ const WorkloadPodsTable = ({
10993
10997
  sortable: true
10994
10998
  }, NodeNameColumnRenderer(i18n2), WorkloadImageColumnRenderer(i18n2), PodContainersNumColumnRenderer(i18n2), RestartCountColumnRenderer(i18n2), AgeColumnRenderer(i18n2)];
10995
10999
  if ((dataSource == null ? void 0 : dataSource.length) === 0) {
10996
- return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
11000
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, {
10997
11001
  errorText: i18n2.t("dovetail.no_resource", {
10998
- kind: i18n2.t("dovetail.pod")
11002
+ kind: ` ${i18n2.t("dovetail.pod")}`
10999
11003
  }),
11000
11004
  style: {
11001
11005
  padding: "15px 0"
11002
- }
11006
+ },
11007
+ hiddenRetry: true
11003
11008
  });
11004
11009
  }
11005
11010
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
@@ -11170,7 +11175,8 @@ function EditFieldModal(props) {
11170
11175
  style: {
11171
11176
  marginTop: 16
11172
11177
  },
11173
- errorMsgs
11178
+ errorMsgs,
11179
+ isEdit: true
11174
11180
  })]
11175
11181
  });
11176
11182
  }
@@ -11194,7 +11200,7 @@ function EditField(props) {
11194
11200
  children: i18n2.t("dovetail.edit")
11195
11201
  });
11196
11202
  }
11197
- const index_psn0hb = "";
11203
+ const index_c9frt4 = "";
11198
11204
  const WorkloadReplicasWrapperStyle = "w8ychfk";
11199
11205
  const DonutChartWrapperStyle = "d1o004do";
11200
11206
  const DonutChartStyle = "dfo80qq";
@@ -11203,6 +11209,7 @@ const ReadyValueStyle = "r1bm8olw";
11203
11209
  const ReplicasValueStyle = "r1oqudbh";
11204
11210
  const ContentWrapperStyle = "c18i6jtg";
11205
11211
  const LabelStyle = "lpm22il";
11212
+ const ValueStyle = "v1ixr1me";
11206
11213
  const WorkloadReplicasForm = React__default.forwardRef(function WorkloadReplicasForm2(props, ref) {
11207
11214
  const {
11208
11215
  defaultValue,
@@ -11331,16 +11338,18 @@ function WorkloadReplicas({
11331
11338
  className: ContentWrapperStyle,
11332
11339
  children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("tr", {
11333
11340
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx("td", {
11334
- className: LabelStyle,
11335
- children: t2("dovetail.pod_ready_num")
11341
+ className: cx_default(LabelStyle, Typo.Label.l3_regular),
11342
+ children: record.kind === "Job" ? t2("dovetail.pod_complete_num") : t2("dovetail.pod_ready_num")
11336
11343
  }), /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
11344
+ className: cx_default(ValueStyle, Typo.Label.l3_regular),
11337
11345
  children: readyReplicas
11338
11346
  })]
11339
11347
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", {
11340
11348
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx("td", {
11341
- className: LabelStyle,
11349
+ className: cx_default(LabelStyle, Typo.Label.l3_regular),
11342
11350
  children: t2("dovetail.pod_replicas_num")
11343
11351
  }), /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
11352
+ className: cx_default(ValueStyle, Typo.Label.l3_regular),
11344
11353
  children: replicas
11345
11354
  }), /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
11346
11355
  children: editable && canScale && /* @__PURE__ */ jsxRuntimeExports.jsx(EditField, {
@@ -11520,7 +11529,7 @@ const EventsTableTabField = () => {
11520
11529
  key: "event",
11521
11530
  path: [],
11522
11531
  renderContent: () => {
11523
- return /* @__PURE__ */ jsxRuntimeExports.jsx(EventsTable, {});
11532
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { padding: "0 24px", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(EventsTable, {}) });
11524
11533
  }
11525
11534
  };
11526
11535
  };
@@ -17360,7 +17369,7 @@ const PodLog = ({
17360
17369
  })]
17361
17370
  }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
17362
17371
  className: ContentStyle$1,
17363
- children: logType === "previous" && !logs.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
17372
+ children: logType === "previous" && !logs.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, {
17364
17373
  style: {
17365
17374
  height: "100%"
17366
17375
  },
@@ -17593,7 +17602,8 @@ const NetworkPolicyRulesViewer = ({
17593
17602
  }),
17594
17603
  style: {
17595
17604
  padding: "15px 0"
17596
- }
17605
+ },
17606
+ hiddenRetry: true
17597
17607
  });
17598
17608
  }
17599
17609
  return /* @__PURE__ */ jsxRuntimeExports.jsx(MonacoYamlEditor$1, {
@@ -17674,7 +17684,7 @@ const PodContainersTable = ({
17674
17684
  [containerStatuses, initContainerStatuses]
17675
17685
  );
17676
17686
  if (dataSource.length === 0) {
17677
- return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, { errorText: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.container") }), style: { padding: "15px 0" } });
17687
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.container") }), style: { padding: "15px 0" }, hiddenRetry: true });
17678
17688
  }
17679
17689
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
17680
17690
  Table$1,
@@ -18284,7 +18294,7 @@ function ListPage(props) {
18284
18294
  className: NamespaceFilterStyle
18285
18295
  }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
18286
18296
  className: TableStyle,
18287
- children: !(tableProps.data.length || tableProps.loading) ? /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
18297
+ children: !(tableProps.data.length || tableProps.loading) ? /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, {
18288
18298
  errorText: tableProps.empty || t2("dovetail.no_resource", {
18289
18299
  kind: ` ${config.kind}`
18290
18300
  }),
@@ -18311,7 +18321,7 @@ function ResourceList(props) {
18311
18321
  useTableParams: {},
18312
18322
  columns: [nameRenderer, ...(columns == null ? void 0 : columns()) || []],
18313
18323
  tableProps: {
18314
- currentSize: 10
18324
+ currentSize: 50
18315
18325
  },
18316
18326
  formatter,
18317
18327
  Dropdown
@@ -22174,7 +22184,7 @@ const Separator = () => {
22174
22184
  });
22175
22185
  };
22176
22186
  const MonacoYamlEditor = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
22177
- const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-d8d76ced.js"));
22187
+ const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-68b40e77.js"));
22178
22188
  const YamlEditorComponent = forwardRef(
22179
22189
  function YamlEditorComponent2(props, ref) {
22180
22190
  const {
@@ -22836,7 +22846,7 @@ function YamlForm(props) {
22836
22846
  isEdit: action === "edit"
22837
22847
  })
22838
22848
  })]
22839
- }) : /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
22849
+ }) : /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, {
22840
22850
  errorText: t2("dovetail.fetch_schema_fail"),
22841
22851
  refetch: fetchSchema
22842
22852
  });
@@ -23431,6 +23441,7 @@ const WorkloadRestartsColumnRenderer = (i18n2) => {
23431
23441
  display: true,
23432
23442
  width: 120,
23433
23443
  dataIndex,
23444
+ align: "right",
23434
23445
  title: i18n2.t("dovetail.restarts"),
23435
23446
  sortable: false
23436
23447
  };
@@ -23459,7 +23470,9 @@ const ReplicasColumnRenderer = (i18n2) => {
23459
23470
  }
23460
23471
  };
23461
23472
  };
23462
- const AgeColumnRenderer = (i18n2, config) => {
23473
+ const AgeColumnRenderer = (i18n2, config, {
23474
+ isRelativeTime = true
23475
+ } = {}) => {
23463
23476
  const dataIndex = ["metadata", "creationTimestamp"];
23464
23477
  return {
23465
23478
  key: "creationTimestamp",
@@ -23478,8 +23491,10 @@ const AgeColumnRenderer = (i18n2, config) => {
23478
23491
  return -1;
23479
23492
  },
23480
23493
  render: (value2) => {
23481
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Time, {
23494
+ return isRelativeTime ? /* @__PURE__ */ jsxRuntimeExports.jsx(Time, {
23482
23495
  date: new Date(value2)
23496
+ }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
23497
+ value: dayjs(value2).format("YYYY-MM-DD hh:mm:ss")
23483
23498
  });
23484
23499
  },
23485
23500
  ...config
@@ -23540,6 +23555,7 @@ const DurationColumnRenderer = (i18n2) => {
23540
23555
  sortable: true,
23541
23556
  sorter: CommonSorter(dataIndex),
23542
23557
  width: 120,
23558
+ align: "right",
23543
23559
  render: (v) => {
23544
23560
  return /* @__PURE__ */ jsxRuntimeExports.jsx(DurationTime, {
23545
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-a91f5f0f.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";
@@ -8393,36 +8395,6 @@ var __publicField = (obj, key, value) => {
8393
8395
  /* @__PURE__ */ jsxRuntimeExports.jsx(kit.form.Item, { name: ["metadata", "annotations"], label: "Annotations", children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValueListWidget, {}) })
8394
8396
  ] });
8395
8397
  }
8396
- const ErrorContent_1t51xnx = "";
8397
- const ErrorWrapper$1 = "eckm4od";
8398
- const ErrorContent$1 = "e1hl982n";
8399
- const WidgetErrorContent$1 = (props) => {
8400
- const {
8401
- refetch
8402
- } = props;
8403
- const kit = React.useContext(eagle.kitContext);
8404
- const {
8405
- t: t2
8406
- } = useTranslation();
8407
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
8408
- className: ErrorWrapper$1,
8409
- style: props.style,
8410
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
8411
- className: ErrorContent$1,
8412
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("p", {
8413
- className: cx_default(eagle.Typo.Label.l1_regular_title, "title"),
8414
- children: props.errorText || t2("dovetail.obtain_data_error")
8415
- }), refetch ? /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
8416
- type: "ordinary",
8417
- onClick: (e2) => {
8418
- e2.stopPropagation();
8419
- refetch == null ? void 0 : refetch();
8420
- },
8421
- children: t2("dovetail.retry")
8422
- }) : null]
8423
- })
8424
- });
8425
- };
8426
8398
  function memoize$1(fn) {
8427
8399
  var cache = /* @__PURE__ */ Object.create(null);
8428
8400
  return function(arg) {
@@ -8540,6 +8512,76 @@ var __publicField = (obj, key, value) => {
8540
8512
  return o(prop);
8541
8513
  }
8542
8514
  }) : styled;
8515
+ const index_1kmu85y = "";
8516
+ const ErrorWrapper$1 = /* @__PURE__ */ styled_default("div")({
8517
+ name: "ErrorWrapper",
8518
+ class: "egn3dbn",
8519
+ propsAsIs: false
8520
+ });
8521
+ const ErrorContent$1 = /* @__PURE__ */ styled_default("div")({
8522
+ name: "ErrorContent",
8523
+ class: "e136jgy8",
8524
+ propsAsIs: false
8525
+ });
8526
+ const WidgetErrorContent$1 = (props) => {
8527
+ const {
8528
+ refetch,
8529
+ errorText,
8530
+ hiddenRetry
8531
+ } = props;
8532
+ const kit = React.useContext(eagle.kitContext);
8533
+ const {
8534
+ t: t2
8535
+ } = useTranslation();
8536
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorWrapper$1, {
8537
+ className: props.className,
8538
+ style: props.style,
8539
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ErrorContent$1, {
8540
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("p", {
8541
+ className: cx_default(eagle.Typo.Label.l1_regular_title, "title"),
8542
+ children: errorText || t2("dovetail.obtain_data_error")
8543
+ }), hiddenRetry ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
8544
+ size: "small",
8545
+ type: "ordinary",
8546
+ onClick: (e2) => {
8547
+ e2.stopPropagation();
8548
+ refetch == null ? void 0 : refetch();
8549
+ },
8550
+ children: t2("dovetail.retry")
8551
+ })]
8552
+ })
8553
+ });
8554
+ };
8555
+ const ErrorContent_1t51xnx = "";
8556
+ const ErrorWrapper = "eckm4od";
8557
+ const ErrorContent = "e1hl982n";
8558
+ const WidgetErrorContent = (props) => {
8559
+ const {
8560
+ refetch
8561
+ } = props;
8562
+ const kit = React.useContext(eagle.kitContext);
8563
+ const {
8564
+ t: t2
8565
+ } = useTranslation();
8566
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
8567
+ className: ErrorWrapper,
8568
+ style: props.style,
8569
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
8570
+ className: ErrorContent,
8571
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("p", {
8572
+ className: cx_default(eagle.Typo.Label.l1_regular_title, "title"),
8573
+ children: props.errorText || t2("dovetail.obtain_data_error")
8574
+ }), refetch ? /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
8575
+ type: "ordinary",
8576
+ onClick: (e2) => {
8577
+ e2.stopPropagation();
8578
+ refetch == null ? void 0 : refetch();
8579
+ },
8580
+ children: t2("dovetail.retry")
8581
+ }) : null]
8582
+ })
8583
+ });
8584
+ };
8543
8585
  const TableWidgets_ny30pi = "";
8544
8586
  const AuxiliaryLine = /* @__PURE__ */ styled_default("div")({
8545
8587
  name: "AuxiliaryLine",
@@ -8595,7 +8637,7 @@ var __publicField = (obj, key, value) => {
8595
8637
  if (loading) {
8596
8638
  return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.loading, {});
8597
8639
  } else if (error) {
8598
- return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, {
8640
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
8599
8641
  errorText: t2("dovetail.retry_when_access_data_failed"),
8600
8642
  refetch,
8601
8643
  style: {
@@ -8603,7 +8645,7 @@ var __publicField = (obj, key, value) => {
8603
8645
  }
8604
8646
  });
8605
8647
  } else if (dataSource.length === 0) {
8606
- return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, {
8648
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
8607
8649
  errorText: empty2 || t2("dovetail.empty"),
8608
8650
  style: {
8609
8651
  padding: "15px 0"
@@ -8666,7 +8708,8 @@ var __publicField = (obj, key, value) => {
8666
8708
  WidgetErrorContent$1,
8667
8709
  {
8668
8710
  errorText: t2("dovetail.no_resource", { kind: ` ${t2("dovetail.pod_selector")}` }),
8669
- style: { padding: "15px 0" }
8711
+ style: { padding: "15px 0" },
8712
+ hiddenRetry: true
8670
8713
  }
8671
8714
  );
8672
8715
  }
@@ -8733,7 +8776,7 @@ var __publicField = (obj, key, value) => {
8733
8776
  id: port2.name || ""
8734
8777
  }));
8735
8778
  if ((ports == null ? void 0 : ports.length) === 0) {
8736
- return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: t2("dovetail.no_resource", { kind: t2("dovetail.port") }), style: { padding: "15px 0" } });
8779
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: t2("dovetail.no_resource", { kind: t2("dovetail.port") }), style: { padding: "15px 0" }, hiddenRetry: true });
8737
8780
  }
8738
8781
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
8739
8782
  Table$1,
@@ -9863,7 +9906,7 @@ var __publicField = (obj, key, value) => {
9863
9906
  children: content || "-"
9864
9907
  });
9865
9908
  };
9866
- const index_1l7lkk4 = "";
9909
+ const index_1ce2deq = "";
9867
9910
  const TagWrapper = "t13a6vox";
9868
9911
  const TagStyle = "t12ikbmp";
9869
9912
  const Tags = (props) => {
@@ -9872,8 +9915,8 @@ var __publicField = (obj, key, value) => {
9872
9915
  } = props;
9873
9916
  const kit = eagle.useUIKit();
9874
9917
  if (!value2) {
9875
- return /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
9876
- children: "-"
9918
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
9919
+ value: ""
9877
9920
  });
9878
9921
  }
9879
9922
  const tags = Object.keys(value2).map((key2) => {
@@ -10340,46 +10383,6 @@ var __publicField = (obj, key, value) => {
10340
10383
  })]
10341
10384
  });
10342
10385
  };
10343
- const index_1kmu85y = "";
10344
- const ErrorWrapper = /* @__PURE__ */ styled_default("div")({
10345
- name: "ErrorWrapper",
10346
- class: "egn3dbn",
10347
- propsAsIs: false
10348
- });
10349
- const ErrorContent = /* @__PURE__ */ styled_default("div")({
10350
- name: "ErrorContent",
10351
- class: "e136jgy8",
10352
- propsAsIs: false
10353
- });
10354
- const WidgetErrorContent = (props) => {
10355
- const {
10356
- refetch,
10357
- errorText,
10358
- hiddenRetry
10359
- } = props;
10360
- const kit = React.useContext(eagle.kitContext);
10361
- const {
10362
- t: t2
10363
- } = useTranslation();
10364
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorWrapper, {
10365
- className: props.className,
10366
- style: props.style,
10367
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ErrorContent, {
10368
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("p", {
10369
- className: cx_default(eagle.Typo.Label.l1_regular_title, "title"),
10370
- children: errorText || t2("dovetail.obtain_data_error")
10371
- }), hiddenRetry ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
10372
- size: "small",
10373
- type: "ordinary",
10374
- onClick: (e2) => {
10375
- e2.stopPropagation();
10376
- refetch == null ? void 0 : refetch();
10377
- },
10378
- children: t2("dovetail.retry")
10379
- })]
10380
- })
10381
- });
10382
- };
10383
10386
  const EventsTable = ({}) => {
10384
10387
  const { i18n: i18n2 } = useTranslation();
10385
10388
  const [currentPage, setCurrentPage] = React.useState(1);
@@ -10421,7 +10424,7 @@ var __publicField = (obj, key, value) => {
10421
10424
  sortable: true,
10422
10425
  sorter: CommonSorter(["note"])
10423
10426
  },
10424
- AgeColumnRenderer(i18n2, { title: i18n2.t("dovetail.last_seen") })
10427
+ AgeColumnRenderer(i18n2, { title: i18n2.t("dovetail.last_seen"), width: 160 }, { isRelativeTime: false })
10425
10428
  ],
10426
10429
  [i18n2]
10427
10430
  );
@@ -10435,7 +10438,7 @@ var __publicField = (obj, key, value) => {
10435
10438
  }, [data2 == null ? void 0 : data2.data, parsed]);
10436
10439
  if (!(dataSource == null ? void 0 : dataSource.length) && !isLoading) {
10437
10440
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
10438
- WidgetErrorContent,
10441
+ WidgetErrorContent$1,
10439
10442
  {
10440
10443
  errorText: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.event") }),
10441
10444
  hiddenRetry: true
@@ -10559,7 +10562,7 @@ var __publicField = (obj, key, value) => {
10559
10562
  }
10560
10563
  ];
10561
10564
  if ((rows == null ? void 0 : rows.length) === 0) {
10562
- return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: t2("dovetail.no_resource", { kind: t2("dovetail.rule") }), style: { padding: "15px 0" } });
10565
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: t2("dovetail.no_resource", { kind: t2("dovetail.rule") }), style: { padding: "15px 0" }, hiddenRetry: true });
10563
10566
  }
10564
10567
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
10565
10568
  Table$1,
@@ -10580,7 +10583,7 @@ var __publicField = (obj, key, value) => {
10580
10583
  const KeyValue_1vkf5y2 = "";
10581
10584
  const ContentBlockStyle = "c8jy7dc";
10582
10585
  const KeyStyle = "k2sddxl";
10583
- const ValueStyle = "v16vicsr";
10586
+ const ValueStyle$2 = "v16vicsr";
10584
10587
  const KeyValue = (props) => {
10585
10588
  const {
10586
10589
  data: data2 = {},
@@ -10596,12 +10599,12 @@ var __publicField = (obj, key, value) => {
10596
10599
  className: cx_default(KeyStyle, eagle.Typo.Label.l4_regular),
10597
10600
  children: key2
10598
10601
  }), /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
10599
- className: cx_default(eagle.Typo.Label.l4_regular, ValueStyle),
10602
+ className: cx_default(eagle.Typo.Label.l4_regular, ValueStyle$2),
10600
10603
  children: hideSecret ? toAsterisk(data2[key2]) : data2[key2]
10601
10604
  })]
10602
10605
  }, key2));
10603
10606
  if (!result.length) {
10604
- return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
10607
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, {
10605
10608
  errorText: empty2 || t2("dovetail.empty"),
10606
10609
  hiddenRetry: true
10607
10610
  });
@@ -10752,7 +10755,7 @@ var __publicField = (obj, key, value) => {
10752
10755
  return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.tabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
10753
10756
  }) });
10754
10757
  }
10755
- const ShowContent_eym19u = "";
10758
+ const ShowContent_1947rqs = "";
10756
10759
  const ShowContentWrapperStyle = "s9agep2";
10757
10760
  const BackButton = "bo89gfi";
10758
10761
  const ToolBarWrapper = "t1ohe42f";
@@ -10764,7 +10767,8 @@ var __publicField = (obj, key, value) => {
10764
10767
  const FullTabContentStyle = "fykgn2i";
10765
10768
  const FieldWrapperStyle = "fngr745";
10766
10769
  const TabContentStyle = "t11wg61l";
10767
- const TabsStyle = "t1x3rivf";
10770
+ const ValueStyle$1 = "v1x3rivf";
10771
+ const TabsStyle = "tf5s6s";
10768
10772
  function ShowGroupComponent(props) {
10769
10773
  const {
10770
10774
  title,
@@ -10848,7 +10852,7 @@ var __publicField = (obj, key, value) => {
10848
10852
  minWidth: 0
10849
10853
  },
10850
10854
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
10851
- className: eagle.Typo.Label.l4_regular_title,
10855
+ className: cx_default(eagle.Typo.Label.l4_regular_title, ValueStyle$1),
10852
10856
  value: content,
10853
10857
  useOverflow: false
10854
10858
  })
@@ -10999,13 +11003,14 @@ var __publicField = (obj, key, value) => {
10999
11003
  sortable: true
11000
11004
  }, NodeNameColumnRenderer(i18n2), WorkloadImageColumnRenderer(i18n2), PodContainersNumColumnRenderer(i18n2), RestartCountColumnRenderer(i18n2), AgeColumnRenderer(i18n2)];
11001
11005
  if ((dataSource == null ? void 0 : dataSource.length) === 0) {
11002
- return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
11006
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, {
11003
11007
  errorText: i18n2.t("dovetail.no_resource", {
11004
- kind: i18n2.t("dovetail.pod")
11008
+ kind: ` ${i18n2.t("dovetail.pod")}`
11005
11009
  }),
11006
11010
  style: {
11007
11011
  padding: "15px 0"
11008
- }
11012
+ },
11013
+ hiddenRetry: true
11009
11014
  });
11010
11015
  }
11011
11016
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
@@ -11176,7 +11181,8 @@ var __publicField = (obj, key, value) => {
11176
11181
  style: {
11177
11182
  marginTop: 16
11178
11183
  },
11179
- errorMsgs
11184
+ errorMsgs,
11185
+ isEdit: true
11180
11186
  })]
11181
11187
  });
11182
11188
  }
@@ -11200,7 +11206,7 @@ var __publicField = (obj, key, value) => {
11200
11206
  children: i18n2.t("dovetail.edit")
11201
11207
  });
11202
11208
  }
11203
- const index_psn0hb = "";
11209
+ const index_c9frt4 = "";
11204
11210
  const WorkloadReplicasWrapperStyle = "w8ychfk";
11205
11211
  const DonutChartWrapperStyle = "d1o004do";
11206
11212
  const DonutChartStyle = "dfo80qq";
@@ -11209,6 +11215,7 @@ var __publicField = (obj, key, value) => {
11209
11215
  const ReplicasValueStyle = "r1oqudbh";
11210
11216
  const ContentWrapperStyle = "c18i6jtg";
11211
11217
  const LabelStyle = "lpm22il";
11218
+ const ValueStyle = "v1ixr1me";
11212
11219
  const WorkloadReplicasForm = React.forwardRef(function WorkloadReplicasForm2(props, ref) {
11213
11220
  const {
11214
11221
  defaultValue,
@@ -11337,16 +11344,18 @@ var __publicField = (obj, key, value) => {
11337
11344
  className: ContentWrapperStyle,
11338
11345
  children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("tr", {
11339
11346
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx("td", {
11340
- className: LabelStyle,
11341
- children: t2("dovetail.pod_ready_num")
11347
+ className: cx_default(LabelStyle, eagle.Typo.Label.l3_regular),
11348
+ children: record.kind === "Job" ? t2("dovetail.pod_complete_num") : t2("dovetail.pod_ready_num")
11342
11349
  }), /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
11350
+ className: cx_default(ValueStyle, eagle.Typo.Label.l3_regular),
11343
11351
  children: readyReplicas
11344
11352
  })]
11345
11353
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", {
11346
11354
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx("td", {
11347
- className: LabelStyle,
11355
+ className: cx_default(LabelStyle, eagle.Typo.Label.l3_regular),
11348
11356
  children: t2("dovetail.pod_replicas_num")
11349
11357
  }), /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
11358
+ className: cx_default(ValueStyle, eagle.Typo.Label.l3_regular),
11350
11359
  children: replicas
11351
11360
  }), /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
11352
11361
  children: editable && canScale && /* @__PURE__ */ jsxRuntimeExports.jsx(EditField, {
@@ -11526,7 +11535,7 @@ var __publicField = (obj, key, value) => {
11526
11535
  key: "event",
11527
11536
  path: [],
11528
11537
  renderContent: () => {
11529
- return /* @__PURE__ */ jsxRuntimeExports.jsx(EventsTable, {});
11538
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { padding: "0 24px", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(EventsTable, {}) });
11530
11539
  }
11531
11540
  };
11532
11541
  };
@@ -17366,7 +17375,7 @@ var __publicField = (obj, key, value) => {
17366
17375
  })]
17367
17376
  }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
17368
17377
  className: ContentStyle$1,
17369
- children: logType === "previous" && !logs.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
17378
+ children: logType === "previous" && !logs.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, {
17370
17379
  style: {
17371
17380
  height: "100%"
17372
17381
  },
@@ -17599,7 +17608,8 @@ var __publicField = (obj, key, value) => {
17599
17608
  }),
17600
17609
  style: {
17601
17610
  padding: "15px 0"
17602
- }
17611
+ },
17612
+ hiddenRetry: true
17603
17613
  });
17604
17614
  }
17605
17615
  return /* @__PURE__ */ jsxRuntimeExports.jsx(MonacoYamlEditor$1, {
@@ -17680,7 +17690,7 @@ var __publicField = (obj, key, value) => {
17680
17690
  [containerStatuses, initContainerStatuses]
17681
17691
  );
17682
17692
  if (dataSource.length === 0) {
17683
- return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, { errorText: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.container") }), style: { padding: "15px 0" } });
17693
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, { errorText: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.container") }), style: { padding: "15px 0" }, hiddenRetry: true });
17684
17694
  }
17685
17695
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
17686
17696
  Table$1,
@@ -18290,7 +18300,7 @@ var __publicField = (obj, key, value) => {
18290
18300
  className: NamespaceFilterStyle
18291
18301
  }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
18292
18302
  className: TableStyle,
18293
- children: !(tableProps.data.length || tableProps.loading) ? /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
18303
+ children: !(tableProps.data.length || tableProps.loading) ? /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, {
18294
18304
  errorText: tableProps.empty || t2("dovetail.no_resource", {
18295
18305
  kind: ` ${config.kind}`
18296
18306
  }),
@@ -18317,7 +18327,7 @@ var __publicField = (obj, key, value) => {
18317
18327
  useTableParams: {},
18318
18328
  columns: [nameRenderer, ...(columns == null ? void 0 : columns()) || []],
18319
18329
  tableProps: {
18320
- currentSize: 10
18330
+ currentSize: 50
18321
18331
  },
18322
18332
  formatter,
18323
18333
  Dropdown
@@ -22842,7 +22852,7 @@ var __publicField = (obj, key, value) => {
22842
22852
  isEdit: action === "edit"
22843
22853
  })
22844
22854
  })]
22845
- }) : /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
22855
+ }) : /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent$1, {
22846
22856
  errorText: t2("dovetail.fetch_schema_fail"),
22847
22857
  refetch: fetchSchema
22848
22858
  });
@@ -23437,6 +23447,7 @@ var __publicField = (obj, key, value) => {
23437
23447
  display: true,
23438
23448
  width: 120,
23439
23449
  dataIndex,
23450
+ align: "right",
23440
23451
  title: i18n2.t("dovetail.restarts"),
23441
23452
  sortable: false
23442
23453
  };
@@ -23465,7 +23476,9 @@ var __publicField = (obj, key, value) => {
23465
23476
  }
23466
23477
  };
23467
23478
  };
23468
- const AgeColumnRenderer = (i18n2, config) => {
23479
+ const AgeColumnRenderer = (i18n2, config, {
23480
+ isRelativeTime = true
23481
+ } = {}) => {
23469
23482
  const dataIndex = ["metadata", "creationTimestamp"];
23470
23483
  return {
23471
23484
  key: "creationTimestamp",
@@ -23484,8 +23497,10 @@ var __publicField = (obj, key, value) => {
23484
23497
  return -1;
23485
23498
  },
23486
23499
  render: (value2) => {
23487
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Time, {
23500
+ return isRelativeTime ? /* @__PURE__ */ jsxRuntimeExports.jsx(Time, {
23488
23501
  date: new Date(value2)
23502
+ }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
23503
+ value: dayjs(value2).format("YYYY-MM-DD hh:mm:ss")
23489
23504
  });
23490
23505
  },
23491
23506
  ...config
@@ -23546,6 +23561,7 @@ var __publicField = (obj, key, value) => {
23546
23561
  sortable: true,
23547
23562
  sorter: CommonSorter(dataIndex),
23548
23563
  width: 120,
23564
+ align: "right",
23549
23565
  render: (v) => {
23550
23566
  return /* @__PURE__ */ jsxRuntimeExports.jsx(DurationTime, {
23551
23567
  value: v
package/dist/style.css CHANGED
@@ -1,16 +1,18 @@
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
+ .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%;}
8
+ .e136jgy8{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.e136jgy8 .title{margin-bottom:8px;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-image:linear-gradient(211.41deg,#929dad 0%,#d3dbe3 100%);}
7
9
  .eckm4od{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%;}
8
10
  .e1hl982n{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.e1hl982n .title{margin-bottom:8px;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-image:linear-gradient(211.41deg,#929dad 0%,#d3dbe3 100%);}
9
11
  .ax1qopv{position:absolute;top:0;left:0;bottom:0;width:1px;background:$blue-60;-webkit-transform:translateX(-9999px);-ms-transform:translateX(-9999px);transform:translateX(-9999px);z-index:999;}.ax1qopv::before{content:'';position:absolute;height:34px;width:3px;top:0;left:-1px;background:$blue-60;}
10
12
  .t1upn1sz{width:100%;border-top:1px solid rgba(211,218,235,0.6);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.t1upn1sz .ant-table-pagination{display:none;}.t1upn1sz .table-container{min-height:0;}
11
13
  .b1vtjd4k.ant-btn.ant-btn-link{display:block;}
12
- .t13a6vox{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;max-width:100%;}
13
- .t12ikbmp{overflow:hidden;text-overflow:ellipsis;}
14
+ .t13a6vox{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;max-width:100%;gap:8px 8px;}
15
+ .t12ikbmp{overflow:hidden;text-overflow:ellipsis;color:#1D326C;}.t12ikbmp .outside-tag{background:rgba(211,218,235,0.60);}.t12ikbmp .inside-tag{background:rgba(192,203,224,0.60);}
14
16
  .s8qkbck.ant-tag{padding:3px 16px;height:24px;}.s8qkbck.no-background{background-color:transparent !important;padding:0;}
15
17
  .t19ustft{padding-bottom:3px;border-bottom:1px dashed rgba(107,128,167,0.6);}
16
18
  .t1v3ienx{padding:12px 24px;}
@@ -18,8 +20,6 @@
18
20
  .tq6dc79{color:#00122E;}
19
21
  .d1wqyhgc{color:rgba(44,56,82,0.75);}
20
22
  .w16agr8o.ant-space{width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}
21
- .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%;}
22
- .e136jgy8{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.e136jgy8 .title{margin-bottom:8px;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-image:linear-gradient(211.41deg,#929dad 0%,#d3dbe3 100%);}
23
23
  .i1u1f5zp{white-space:pre-line;}
24
24
  .c8jy7dc{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding:8px 10px;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;gap:8px;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;border-radius:4px;background:rgba(237,241,250,0.6);}.c8jy7dc:not(:last-of-type){margin-bottom:8px;}
25
25
  .k2sddxl{color:rgba(44,56,82,0.6);width:calc(30% - 4px);margin-right:8px;}
@@ -31,15 +31,16 @@
31
31
  .s9agep2{height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;background:linear-gradient(180deg,#fff 0%,#edf0f7 100%);}.s9agep2 .ant-row{margin-right:0 !important;}
32
32
  .bo89gfi{color:rgba(0,21,64,0.3);line-height:18px;cursor:pointer;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start;}.bo89gfi:hover{color:#0080FF;}
33
33
  .t1ohe42f{padding:16px 24px 8px 24px;background-color:#fff;}
34
- .nqm4qz0{margin-right:8px;}
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;}
41
41
  .t11wg61l{padding-bottom:16px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-width:952px;}
42
- .t1x3rivf.ant-tabs{-webkit-flex:1;-ms-flex:1;flex:1;min-height:0;}.t1x3rivf.ant-tabs .ant-tabs-nav{margin-bottom:0;}.t1x3rivf.ant-tabs .ant-tabs-nav-list{margin-left:24px;}.t1x3rivf.ant-tabs .ant-tabs-content-holder{overflow:auto;}.t1x3rivf.ant-tabs .ant-tabs-content-holder .ant-tabs-content,.t1x3rivf.ant-tabs .ant-tabs-content-holder .ant-tabs-tabpane-active{height:100%;}
42
+ .v1x3rivf{color:#00122E;}
43
+ .tf5s6s.ant-tabs{-webkit-flex:1;-ms-flex:1;flex:1;min-height:0;}.tf5s6s.ant-tabs .ant-tabs-nav{margin-bottom:0;}.tf5s6s.ant-tabs .ant-tabs-nav-list{margin-left:24px;}.tf5s6s.ant-tabs .ant-tabs-content-holder{overflow:auto;}.tf5s6s.ant-tabs .ant-tabs-content-holder .ant-tabs-content,.tf5s6s.ant-tabs .ant-tabs-content-holder .ant-tabs-tabpane-active{height:100%;}
43
44
  .c1dicff8{width:100%;vertical-align:top;}
44
45
  .esoz3jw .ant-modal-content{border-radius:16px;}.esoz3jw .ant-modal-header{border-radius:16px 16px 0 0;}
45
46
  .e1m0bgls.ant-btn.ant-btn-link{height:22px;margin-left:8px;}
@@ -50,7 +51,8 @@
50
51
  .r1bm8olw{color:#00122E;}
51
52
  .r1oqudbh{color:rgba(44,56,82,0.60);}
52
53
  .c18i6jtg{display:table;margin:auto 0;position:relative;}
53
- .lpm22il{padding-right:40px;}
54
+ .lpm22il{padding-right:40px;color:rgba(44,56,82,0.75);}
55
+ .v1ixr1me{color:#00122E;}
54
56
  .pf-v5-c-log-viewer.pf-m-dark .pf-v5-c-log-viewer__main {
55
57
  --pf-v5-global--Color--100: var(--pf-v5-global--Color--light-100);
56
58
  --pf-v5-global--Color--200: var(--pf-v5-global--Color--light-200);
@@ -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.2",
3
+ "version": "0.0.35-beta.4",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",