@dovetail-v2/refine 0.3.12-alpha.0 → 0.3.12-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/refine.js CHANGED
@@ -11,8 +11,8 @@ import { ResourceContext, matchResourceFromRoute, useResource, useDelete, useNav
11
11
  import { parse, stringify } from "qs";
12
12
  import React, { createElement, isValidElement, cloneElement, Children, useContext, useCallback, createContext, useState, useEffect, useMemo, useRef, useImperativeHandle, lazy, Suspense, memo, forwardRef } from "react";
13
13
  import { useLocation, useHistory, useParams, matchPath, Link, Route, NavLink, Router } from "react-router-dom";
14
- import { usePushModal, usePopModal, DeleteDialog, Tag, RejectDialog, RejectDialogType, Typo, Input, Select, AntdOption, Button, Form, Space, TextArea, kitContext, Loading, Table as Table$2, Pagination, Alert, ImmersiveDialog, SmallDialog, Fields, Units, Link as Link$1, OverflowTooltip, Tooltip, Dropdown, Menu as Menu$1, Icon, Divider, Modal, StatusCapsule, Popover, AntdTable, TableForm, Upload, AutoComplete, getOptions, DonutChart, SegmentControl, Checkbox, Tabs as Tabs$1, TabsTabPane, Col, Row, useMessage, SearchInput, Token, AntdSelectOptGroup, WizardDialog, MenuItemGroup, Layout as Layout$1, InputGroup, InputInteger, Time as Time$1, ModalStack, KitStoreProvider, ConfigProvider } from "@cloudtower/eagle";
15
- import { EditPen16PrimaryIcon, Download16GradientBlueIcon, TrashBinDelete16Icon, MoreEllipsis324BoldSecondaryIcon, MoreEllipsis324BoldBlueIcon, MoreEllipsis316BoldBlueIcon, PlusAddCreateNew16BoldOntintIcon, ViewEye16GradientGrayIcon, EntityFilterIgnoreGradient16GrayIcon, InfoICircleFill16GrayIcon, InfoICircleFill16Gray70Icon, RecoverContinue16GradientBlueIcon, SuspendedPause16GradientBlueIcon, ArrowChevronLeft16BoldTertiaryIcon, ArrowChevronLeftSmall16BoldBlueIcon, ArrowChevronDownSmall16BlueIcon, ArrowChevronUpSmall16BlueIcon, Retry16GradientBlueIcon, OpenTerminal16GradientBlueIcon, ArrowChevronDown16BlueIcon, ArrowChevronUp16BlueIcon, HierarchyTriangleRight16GrayIcon, HierarchyTriangleRight16BlueIcon, ClipboardCopy16GradientGrayIcon, ClipboardCopy16GradientBlueIcon, Retry16GradientGrayIcon, EditPen16GradientGrayIcon, EditPen16GradientBlueIcon, Showdiff16GradientGrayIcon, Showdiff16GradientBlueIcon, XmarkFailedSeriousWarningFill16RedIcon, Pause16GradientBlueIcon, EditPen16BlueIcon } from "@cloudtower/icons-react";
14
+ import { usePushModal, usePopModal, DeleteDialog, Tag, RejectDialog, RejectDialogType, Input, Select, AntdOption, Button, Form, Space, TextArea, kitContext, Typo, Loading, Table as Table$2, Pagination, Alert, ImmersiveDialog, SmallDialog, Fields, Units, Link as Link$1, OverflowTooltip, Tooltip, Dropdown, Menu as Menu$1, Icon, Divider, Modal, StatusCapsule, Popover, AntdTable, TableForm, Upload, AutoComplete, getOptions, DonutChart, SegmentControl, Checkbox, Tabs as Tabs$1, TabsTabPane, Col, Row, useMessage, SearchInput, Token, AntdSelectOptGroup, WizardDialog, MenuItemGroup, Layout as Layout$1, InputGroup, InputInteger, Time as Time$1, ModalStack, KitStoreProvider, ConfigProvider } from "@cloudtower/eagle";
15
+ import { EditPen16PrimaryIcon, Download16GradientBlueIcon, TrashBinDelete16Icon, MoreEllipsis324BoldSecondaryIcon, MoreEllipsis324BoldBlueIcon, MoreEllipsis316BoldBlueIcon, PlusAddCreateNew16BoldOntintIcon, ViewEye16GradientGrayIcon, EntityFilterIgnoreGradient16GrayIcon, InfoICircleFill16GrayIcon, InfoICircleFill16Gray70Icon, RecoverContinue16GradientBlueIcon, SuspendedPause16GradientBlueIcon, ArrowChevronLeft16BoldTertiaryIcon, ArrowChevronLeftSmall16BoldBlueIcon, ArrowChevronUpSmall16BlueIcon, ArrowChevronDownSmall16BlueIcon, Retry16GradientBlueIcon, OpenTerminal16GradientBlueIcon, ArrowChevronDown16BlueIcon, ArrowChevronUp16BlueIcon, HierarchyTriangleRight16GrayIcon, HierarchyTriangleRight16BlueIcon, ClipboardCopy16GradientGrayIcon, ClipboardCopy16GradientBlueIcon, Retry16GradientGrayIcon, EditPen16GradientGrayIcon, EditPen16GradientBlueIcon, Showdiff16GradientGrayIcon, Showdiff16GradientBlueIcon, XmarkFailedSeriousWarningFill16RedIcon, Pause16GradientBlueIcon, EditPen16BlueIcon } from "@cloudtower/icons-react";
16
16
  import { first, get as get$2, cloneDeep, set, omit as omit$1, merge, isEqual as isEqual$1, debounce, last, setWith, clone, isObject as isObject$4, uniq, keyBy } from "lodash-es";
17
17
  import yaml$2 from "js-yaml";
18
18
  import { useLocalStorage } from "usehooks-ts";
@@ -544,6 +544,7 @@ const create_failed$1 = "Creation failed.";
544
544
  const create_failed_tip$1 = "Please address the following issues and try again: ";
545
545
  const save_failed$1 = "Failed to save.";
546
546
  const save_failed_tip$1 = "Please address the following issues and try again: ";
547
+ const completion_num_tooltip$1 = "Completed/Expected";
547
548
  const ready_num_tooltip$1 = "Ready/Expected";
548
549
  const realtime_log$1 = "Real-time logs";
549
550
  const previous_log$1 = "Last startup logs";
@@ -794,6 +795,7 @@ const dovetail$1 = {
794
795
  create_failed_tip: create_failed_tip$1,
795
796
  save_failed: save_failed$1,
796
797
  save_failed_tip: save_failed_tip$1,
798
+ completion_num_tooltip: completion_num_tooltip$1,
797
799
  ready_num_tooltip: ready_num_tooltip$1,
798
800
  realtime_log: realtime_log$1,
799
801
  previous_log: previous_log$1,
@@ -1059,7 +1061,7 @@ const create_failed = "创建失败。";
1059
1061
  const create_failed_tip = "请解决如下问题后,再创建:";
1060
1062
  const save_failed = "保存失败。";
1061
1063
  const save_failed_tip = "请解决如下问题后,再保存:";
1062
- const job_pod_count_tooltip = "完成数量/全部数量";
1064
+ const completion_num_tooltip = "已完成数量/预期数量";
1063
1065
  const ready_num_tooltip = "就绪数量/预期数量";
1064
1066
  const warning = "警告";
1065
1067
  const normal = "正常";
@@ -1323,7 +1325,7 @@ const dovetail = {
1323
1325
  create_failed_tip,
1324
1326
  save_failed,
1325
1327
  save_failed_tip,
1326
- job_pod_count_tooltip,
1328
+ completion_num_tooltip,
1327
1329
  ready_num_tooltip,
1328
1330
  "true": "是",
1329
1331
  "false": "否",
@@ -7607,9 +7609,6 @@ function DurationTime(props) {
7607
7609
  };
7608
7610
  return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: elapsedTime(value2, i18nMap).label || /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, { value: "" }) });
7609
7611
  }
7610
- const show_1mm8a0w = "";
7611
- const SmallSectionTitleStyle = cx_default(Typo.Label.l4_bold, "smzfpl7");
7612
- const DashedTitleStyle = "d85h4vb";
7613
7612
  const index_1xaw1mq = "";
7614
7613
  const BreadcrumbStyle = "b142d7q8";
7615
7614
  function Breadcrumb(props) {
@@ -9387,11 +9386,6 @@ class JobModel extends WorkloadBaseModel {
9387
9386
  }
9388
9387
  return `${((_a = this._rawYaml.status) == null ? void 0 : _a.succeeded) || 0}/${(_b = this._rawYaml.spec) == null ? void 0 : _b.completions}`;
9389
9388
  }
9390
- get podCountDisplay() {
9391
- var _a, _b, _c;
9392
- const count = (((_a = this.status) == null ? void 0 : _a.active) || 0) + (((_b = this.status) == null ? void 0 : _b.succeeded) || 0) + (((_c = this.status) == null ? void 0 : _c.failed) || 0);
9393
- return `${this.succeeded}/${count}`;
9394
- }
9395
9389
  get succeeded() {
9396
9390
  var _a;
9397
9391
  return ((_a = this._rawYaml.status) == null ? void 0 : _a.succeeded) || 0;
@@ -9708,12 +9702,6 @@ class CronJobModel extends WorkloadBaseModel {
9708
9702
  }
9709
9703
  return newOne;
9710
9704
  }
9711
- getJobsCountDisplay(jobs) {
9712
- const completed = jobs.filter(
9713
- (job) => job.stateDisplay === ResourceState.COMPLETED
9714
- ).length;
9715
- return `${completed}/${jobs.length}`;
9716
- }
9717
9705
  }
9718
9706
  class EventModel extends ResourceModel {
9719
9707
  constructor(_rawYaml, _globalStore) {
@@ -10640,7 +10628,7 @@ function validateNodePort(nodePort, allNodePorts, i18n2) {
10640
10628
  }
10641
10629
  function K8sDropdown(props) {
10642
10630
  var _a;
10643
- const { record, size = "normal" } = props;
10631
+ const { record, size = "normal", customButton } = props;
10644
10632
  const globalStore = useGlobalStore();
10645
10633
  const useResourceResult = useResource();
10646
10634
  const configs = useContext(ConfigsContext);
@@ -10700,7 +10688,7 @@ function K8sDropdown(props) {
10700
10688
  ) : null
10701
10689
  ] }),
10702
10690
  trigger: ["click"],
10703
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
10691
+ children: customButton || /* @__PURE__ */ jsxRuntimeExports.jsx(
10704
10692
  Button,
10705
10693
  {
10706
10694
  type: "quiet",
@@ -10943,7 +10931,7 @@ const CronjobJobsTable = ({
10943
10931
  const columns = useMemo(() => [NameColumnRenderer(i18n2, "jobs"), StateDisplayColumnRenderer(i18n2), NameSpaceColumnRenderer(i18n2), {
10944
10932
  ...WorkloadImageColumnRenderer(i18n2),
10945
10933
  width: 238
10946
- }, PodCountOfJobColumnRenderer(i18n2), DurationColumnRenderer(i18n2), AgeColumnRenderer(i18n2)], [i18n2]);
10934
+ }, CompletionsCountColumnRenderer(i18n2), DurationColumnRenderer(i18n2), AgeColumnRenderer(i18n2)], [i18n2]);
10947
10935
  const params = useMemo(() => ({
10948
10936
  columns,
10949
10937
  useTableParams: {
@@ -11110,7 +11098,7 @@ const ResourceLink = (props) => {
11110
11098
  resourceName,
11111
11099
  namespace: namespace2,
11112
11100
  name: name2,
11113
- uid,
11101
+ query,
11114
11102
  displayName
11115
11103
  } = props;
11116
11104
  const navigation = useNavigation();
@@ -11135,7 +11123,9 @@ const ResourceLink = (props) => {
11135
11123
  to: navigation.showUrl(resourceName, ""),
11136
11124
  query: {
11137
11125
  id: namespace2 ? `${namespace2}/${name2}` : name2,
11138
- uid
11126
+ // from is current resource by default
11127
+ from: resourceName,
11128
+ ...query
11139
11129
  },
11140
11130
  options: {
11141
11131
  keepQuery: true
@@ -12474,15 +12464,13 @@ const IngressRulesTableTabField = () => {
12474
12464
  }
12475
12465
  };
12476
12466
  };
12477
- const EventsTableTabField = ({
12478
- size
12479
- }) => {
12467
+ const EventsTableTabField = () => {
12480
12468
  return {
12481
12469
  key: "event",
12482
12470
  path: [],
12483
12471
  renderContent: (_, record) => {
12484
12472
  var _a;
12485
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { padding: size === "small" ? "0 12px" : "0 24px", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(EventsTable, { uid: (_a = record.metadata) == null ? void 0 : _a.uid }) });
12473
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { padding: "0 24px", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(EventsTable, { uid: (_a = record.metadata) == null ? void 0 : _a.uid }) });
12486
12474
  }
12487
12475
  };
12488
12476
  };
@@ -12730,7 +12718,7 @@ const PVCRefField = (i18n2) => {
12730
12718
  resourceName: "persistentvolumeclaims",
12731
12719
  namespace: pv2.pvcNamespace || "default",
12732
12720
  name: value2,
12733
- uid: pv2.pvcUid
12721
+ query: { uid: pv2.pvcUid }
12734
12722
  }
12735
12723
  );
12736
12724
  }
@@ -12790,52 +12778,6 @@ const ResourceTableField = (resource, useTableParams) => {
12790
12778
  }
12791
12779
  };
12792
12780
  };
12793
- const PodCountOfJobField = (i18n2) => {
12794
- return {
12795
- key: "podCount",
12796
- path: [],
12797
- col: 12,
12798
- title: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: i18n2.t("dovetail.job_pod_count_tooltip"), children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: DashedTitleStyle, children: i18n2.t("dovetail.pod_num") }) }),
12799
- renderContent: (_, record) => {
12800
- return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: record.podCountDisplay });
12801
- }
12802
- };
12803
- };
12804
- const index_15s69c5 = "";
12805
- const ItemWrapperStyle = "i1hk9uwu";
12806
- const LabelsAndAnnotationsShow = ({
12807
- labels,
12808
- annotations,
12809
- size = "medium"
12810
- }) => {
12811
- const {
12812
- i18n: sksI18n
12813
- } = useTranslation();
12814
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
12815
- className: "c1wn08fn",
12816
- style: {
12817
- padding: size === "small" ? "12px" : "16px 24px",
12818
- gap: size === "small" ? "12px" : "16px"
12819
- },
12820
- children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
12821
- className: ItemWrapperStyle,
12822
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
12823
- className: SmallSectionTitleStyle,
12824
- children: sksI18n.t("dovetail.label")
12825
- }), /* @__PURE__ */ jsxRuntimeExports.jsx(Tags, {
12826
- value: labels
12827
- })]
12828
- }), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
12829
- className: ItemWrapperStyle,
12830
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
12831
- className: SmallSectionTitleStyle,
12832
- children: sksI18n.t("dovetail.annotation")
12833
- }), /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValue, {
12834
- data: annotations
12835
- })]
12836
- })]
12837
- });
12838
- };
12839
12781
  const baseNoReset = "";
12840
12782
  const index_14irc29 = "";
12841
12783
  const WrapperStyle$3 = "wve7dfm";
@@ -13031,30 +12973,22 @@ const PodLog = ({
13031
12973
  })]
13032
12974
  });
13033
12975
  };
13034
- const EventsTab = ({
13035
- i18n: i18n2,
13036
- size
13037
- }) => ({
12976
+ const EventsTab = (i18n2) => ({
13038
12977
  title: i18n2.t("dovetail.event"),
13039
12978
  key: "events",
13040
- background: "white",
13041
12979
  groups: [
13042
12980
  {
13043
12981
  areas: [
13044
12982
  {
13045
- fields: [EventsTableTabField({ size })]
12983
+ fields: [EventsTableTabField()]
13046
12984
  }
13047
12985
  ]
13048
12986
  }
13049
12987
  ]
13050
12988
  });
13051
- const ConditionsTab = ({
13052
- i18n: i18n2,
13053
- size
13054
- }) => ({
12989
+ const ConditionsTab = (i18n2) => ({
13055
12990
  title: i18n2.t("dovetail.condition"),
13056
12991
  key: "conditions",
13057
- background: "white",
13058
12992
  groups: [
13059
12993
  {
13060
12994
  areas: [
@@ -13064,16 +12998,10 @@ const ConditionsTab = ({
13064
12998
  key: "Conditions",
13065
12999
  path: ["status", "conditions"],
13066
13000
  renderContent: (value2) => {
13067
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
13068
- "div",
13069
- {
13070
- style: {
13071
- padding: size === "small" ? "0 12px" : "0 24px",
13072
- height: "100%"
13073
- },
13074
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(ConditionsTable, { conditions: value2 })
13075
- }
13076
- );
13001
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { padding: "0 24px", height: "100%" }, children: [
13002
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ConditionsTable, { conditions: value2 }),
13003
+ ";"
13004
+ ] });
13077
13005
  }
13078
13006
  }
13079
13007
  ]
@@ -13082,31 +13010,41 @@ const ConditionsTab = ({
13082
13010
  }
13083
13011
  ]
13084
13012
  });
13085
- const LabelAnnotationsTab = ({
13086
- i18n: i18n2,
13087
- size
13088
- }) => ({
13013
+ const LabelAnnotationsTab = (i18n2) => ({
13089
13014
  title: i18n2.t("dovetail.label_annotations"),
13090
13015
  key: "label-annotations",
13091
- background: "white",
13092
13016
  groups: [
13093
13017
  {
13018
+ title: i18n2.t("dovetail.label"),
13094
13019
  areas: [
13095
13020
  {
13096
13021
  fields: [
13097
13022
  {
13098
- key: "label-annotations",
13099
- path: [],
13100
- renderContent: (_, record) => {
13101
- var _a, _b;
13102
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
13103
- LabelsAndAnnotationsShow,
13104
- {
13105
- labels: (_a = record.metadata) == null ? void 0 : _a.labels,
13106
- annotations: (_b = record.metadata) == null ? void 0 : _b.annotations,
13107
- size
13108
- }
13109
- );
13023
+ key: "Labels",
13024
+ title: i18n2.t("dovetail.label"),
13025
+ path: ["metadata", "labels"],
13026
+ render: (value2) => {
13027
+ if (!value2) {
13028
+ return "-";
13029
+ }
13030
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Tags, { value: value2 });
13031
+ }
13032
+ }
13033
+ ]
13034
+ }
13035
+ ]
13036
+ },
13037
+ {
13038
+ title: i18n2.t("dovetail.annotation"),
13039
+ areas: [
13040
+ {
13041
+ fields: [
13042
+ {
13043
+ key: "Annotations",
13044
+ title: i18n2.t("dovetail.annotation"),
13045
+ path: ["metadata", "annotations"],
13046
+ render: (value2) => {
13047
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValue, { data: value2 });
13110
13048
  }
13111
13049
  }
13112
13050
  ]
@@ -13118,7 +13056,6 @@ const LabelAnnotationsTab = ({
13118
13056
  const PodLogTab = (i18n2, apiUrl) => ({
13119
13057
  title: i18n2.t("dovetail.log"),
13120
13058
  key: "pod-log",
13121
- background: "white",
13122
13059
  groups: [
13123
13060
  {
13124
13061
  areas: [
@@ -13298,6 +13235,8 @@ const BasicGroup = (i18n2, {
13298
13235
  {
13299
13236
  fields: (isShowNamespace ? [NamespaceField(i18n2)] : []).concat([
13300
13237
  ...basicFields,
13238
+ LabelsField(i18n2),
13239
+ AnnotationsField(i18n2),
13301
13240
  AgeField(i18n2)
13302
13241
  ])
13303
13242
  },
@@ -13480,7 +13419,7 @@ function Tabs(props) {
13480
13419
  return /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
13481
13420
  }) });
13482
13421
  }
13483
- const ShowContentView_m77hzs = "";
13422
+ const ShowContentView_1aeomp8 = "";
13484
13423
  const ShowContentWrapperStyle = "soapvs9";
13485
13424
  const BackButton = "b13d603q";
13486
13425
  const ToolBarWrapper = "tm8eaia";
@@ -13495,8 +13434,7 @@ const FieldWrapperStyle = "f1c7cta8";
13495
13434
  const TabContentStyle = "t1pt61xk";
13496
13435
  const ValueStyle = "v1to6fie";
13497
13436
  const TabsStyle = "tca5959";
13498
- const SmallTabsStyle = "s3dcesi";
13499
- const KindTagStyle = "kzyzuo8";
13437
+ const KindTagStyle = "k3dcesi";
13500
13438
  function ShowGroupWithTitleComponent(props) {
13501
13439
  const {
13502
13440
  title,
@@ -13516,19 +13454,15 @@ function ShowGroupWithTitleComponent(props) {
13516
13454
  }
13517
13455
  function BasicShowGroupComponent(props) {
13518
13456
  const {
13519
- children,
13520
- size = "medium"
13457
+ children
13521
13458
  } = props;
13522
13459
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
13523
13460
  className: cx_default(BasicGroupStyle, "basic-group"),
13524
- style: {
13525
- margin: size === "small" ? "12px 8px 0px 12px" : void 0
13526
- },
13527
13461
  children
13528
13462
  });
13529
13463
  }
13530
13464
  const ShowContentView = (props) => {
13531
- var _a, _b, _c, _d;
13465
+ var _a, _b, _c, _d, _e;
13532
13466
  const {
13533
13467
  id,
13534
13468
  resourceName,
@@ -13539,8 +13473,7 @@ const ShowContentView = (props) => {
13539
13473
  hideBackButton = false,
13540
13474
  canCollapseTabs = false,
13541
13475
  className,
13542
- hideTopBar = false,
13543
- size = "medium"
13476
+ hideTopBar = false
13544
13477
  } = props;
13545
13478
  const {
13546
13479
  queryResult
@@ -13577,41 +13510,38 @@ const ShowContentView = (props) => {
13577
13510
  let content;
13578
13511
  const value2 = get$2(record, field.path);
13579
13512
  if (field.renderContent) {
13580
- content = field.renderContent(value2, record, field, size);
13513
+ content = field.renderContent(value2, record, field);
13581
13514
  } else {
13582
13515
  content = get$2(record, field.path);
13583
13516
  }
13584
- if (hasCol) {
13585
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Col, {
13586
- flex: areaType === AreaType.Inline ? "none" : "",
13587
- span: field.col || 24,
13588
- className: "cxd8k68",
13589
- children: field.render ? field.render(value2, record, field, size) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
13590
- className: FieldWrapperStyle,
13591
- children: [field.title && /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
13592
- className: Typo.Label.l4_regular_title,
13593
- style: {
13594
- width: field.labelWidth || "165px",
13595
- marginRight: 8,
13596
- flexShrink: 0,
13597
- color: "#2C385299"
13598
- },
13599
- children: field.title
13600
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
13601
- style: {
13602
- flex: 1,
13603
- minWidth: 0
13604
- },
13605
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
13606
- className: cx_default(Typo.Label.l4_regular_title, ValueStyle),
13607
- value: content,
13608
- useOverflow: false
13609
- })
13610
- })]
13611
- })
13612
- }, field.key);
13613
- }
13614
- return field.render ? field.render(value2, record, field, size) : /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
13517
+ return hasCol ? /* @__PURE__ */ jsxRuntimeExports.jsx(Col, {
13518
+ flex: areaType === AreaType.Inline ? "none" : "",
13519
+ span: field.col || 24,
13520
+ className: "czyzuo8",
13521
+ children: field.render ? field.render(value2, record, field) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
13522
+ className: FieldWrapperStyle,
13523
+ children: [field.title && /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
13524
+ className: Typo.Label.l4_regular_title,
13525
+ style: {
13526
+ width: field.labelWidth || "165px",
13527
+ marginRight: 8,
13528
+ flexShrink: 0,
13529
+ color: "#2C385299"
13530
+ },
13531
+ children: field.title
13532
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
13533
+ style: {
13534
+ flex: 1,
13535
+ minWidth: 0
13536
+ },
13537
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
13538
+ className: cx_default(Typo.Label.l4_regular_title, ValueStyle),
13539
+ value: content,
13540
+ useOverflow: false
13541
+ })
13542
+ })]
13543
+ })
13544
+ }, field.key) : /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
13615
13545
  style: {
13616
13546
  height: "100%"
13617
13547
  },
@@ -13623,10 +13553,7 @@ const ShowContentView = (props) => {
13623
13553
  function renderGroup(group, isBasicGroup = false) {
13624
13554
  let GroupContainer = React.Fragment;
13625
13555
  let FieldContainer = React.Fragment;
13626
- const groupContainerProps = {
13627
- title: group.title || "",
13628
- size
13629
- };
13556
+ let groupContainerProps = {};
13630
13557
  let fieldContainerProps = {};
13631
13558
  if (isBasicGroup) {
13632
13559
  GroupContainer = BasicShowGroupComponent;
@@ -13636,6 +13563,9 @@ const ShowContentView = (props) => {
13636
13563
  const shouldRenderRow = !!(isBasicGroup || group.title);
13637
13564
  if (shouldRenderRow) {
13638
13565
  FieldContainer = Row;
13566
+ groupContainerProps = {
13567
+ title: group.title || ""
13568
+ };
13639
13569
  fieldContainerProps = {
13640
13570
  gutter: [24, 8]
13641
13571
  };
@@ -13657,10 +13587,7 @@ const ShowContentView = (props) => {
13657
13587
  const stateDisplay = get$2(record, "stateDisplay");
13658
13588
  const topBar = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
13659
13589
  className: ToolBarWrapper,
13660
- style: {
13661
- padding: size === "small" ? "8px 16px" : void 0
13662
- },
13663
- children: [!hideBackButton && /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
13590
+ children: [!hideBackButton && !showConfig.renderCustomBackButton && /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
13664
13591
  className: cx_default(Typo.Label.l4_bold, BackButton),
13665
13592
  onClick: () => {
13666
13593
  go({
@@ -13678,7 +13605,7 @@ const ShowContentView = (props) => {
13678
13605
  children: (config == null ? void 0 : config.displayName) || resourceName
13679
13606
  })
13680
13607
  })
13681
- }), /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
13608
+ }), (_a = showConfig.renderCustomBackButton) == null ? void 0 : _a.call(showConfig, record), /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
13682
13609
  className: TopBarStyle,
13683
13610
  children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
13684
13611
  style: {
@@ -13689,13 +13616,13 @@ const ShowContentView = (props) => {
13689
13616
  children: config.kind
13690
13617
  }), /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
13691
13618
  className: cx_default(Typo.Display.d2_regular_title, NameStyle),
13692
- children: ((_a = showConfig.displayName) == null ? void 0 : _a.call(showConfig, record)) || ((_b = record == null ? void 0 : record.metadata) == null ? void 0 : _b.name)
13619
+ children: ((_b = showConfig.displayName) == null ? void 0 : _b.call(showConfig, record)) || ((_c = record == null ? void 0 : record.metadata) == null ? void 0 : _c.name)
13693
13620
  }), stateDisplay ? /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
13694
13621
  state: stateDisplay,
13695
13622
  customResourceStateMap: showConfig.resourceStateMap
13696
13623
  }) : void 0]
13697
13624
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
13698
- children: [(_c = showConfig.renderExtraButton) == null ? void 0 : _c.call(showConfig, record), !config.hideEdit ? /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
13625
+ children: [(_d = showConfig.renderExtraButton) == null ? void 0 : _d.call(showConfig, record), !config.hideEdit ? /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
13699
13626
  resource: resourceName,
13700
13627
  action: AccessControlAuth.Edit,
13701
13628
  params: {
@@ -13708,7 +13635,7 @@ const ShowContentView = (props) => {
13708
13635
  onClick: () => openForm({
13709
13636
  id
13710
13637
  }),
13711
- children: ((_d = config.formConfig) == null ? void 0 : _d.formType) === FormType.FORM ? `${t2("dovetail.edit")}${transformResourceKindInSentence(config.displayName || config.kind, i18n2.language)}` : t2("dovetail.edit_yaml")
13638
+ children: ((_e = config.formConfig) == null ? void 0 : _e.formType) === FormType.FORM ? `${t2("dovetail.edit")}${transformResourceKindInSentence(config.displayName || config.kind, i18n2.language)}` : t2("dovetail.edit_yaml")
13712
13639
  })
13713
13640
  }) : null, /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown2, {
13714
13641
  record,
@@ -13718,28 +13645,22 @@ const ShowContentView = (props) => {
13718
13645
  })]
13719
13646
  });
13720
13647
  const tabs = /* @__PURE__ */ jsxRuntimeExports.jsx(Tabs$12, {
13721
- tabs: (showConfig.tabs || []).map((tab) => {
13648
+ tabs: (showConfig.tabs || []).map((tab, tabIndex) => {
13722
13649
  var _a2;
13723
13650
  return {
13724
13651
  title: tab.title,
13725
13652
  key: tab.key,
13726
13653
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
13727
- className: cx_default(TabContentStyle, tab.groups.length <= 1 && FullTabContentStyle),
13728
- style: {
13729
- background: tab.background === "white" ? "#fff" : void 0
13730
- },
13654
+ className: cx_default(TabContentStyle, tab.groups.length <= 1 && tabIndex !== 0 && FullTabContentStyle),
13731
13655
  children: (_a2 = tab.groups) == null ? void 0 : _a2.map((group) => renderGroup(group, false))
13732
13656
  })
13733
13657
  };
13734
13658
  }),
13735
- className: cx_default(TabsStyle, size === "small" && SmallTabsStyle)
13659
+ className: TabsStyle
13736
13660
  });
13737
13661
  const basicInfo = showConfig.basicGroup ? renderGroup(showConfig.basicGroup, true) : null;
13738
13662
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
13739
13663
  className: cx_default(ShowContentWrapperStyle, className),
13740
- style: {
13741
- background: size === "small" ? "#fff" : void 0
13742
- },
13743
13664
  children: [hideTopBar ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(Space, {
13744
13665
  direction: "vertical",
13745
13666
  className: ShowContentHeaderStyle,
@@ -13768,9 +13689,9 @@ const CollapseTabs = (props) => {
13768
13689
  type: "link",
13769
13690
  onClick: () => setIsCollapsed((v) => !v),
13770
13691
  suffixIcon: isCollapsed ? /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, {
13771
- src: ArrowChevronDownSmall16BlueIcon
13772
- }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, {
13773
13692
  src: ArrowChevronUpSmall16BlueIcon
13693
+ }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, {
13694
+ src: ArrowChevronDownSmall16BlueIcon
13774
13695
  }),
13775
13696
  children: isCollapsed ? t2("dovetail.view_all_info") : t2("dovetail.collapse")
13776
13697
  })
@@ -18607,8 +18528,9 @@ const IngressRulesComponent = ({ ingress }) => {
18607
18528
  });
18608
18529
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: result });
18609
18530
  };
18610
- const columns_gm9kgl = "";
18611
- const ServiceClusterTooltipStyle = "sh5j833";
18531
+ const columns_j8358c = "";
18532
+ const DashedTitleStyle = "dh5j833";
18533
+ const ServiceClusterTooltipStyle = "s1fcgan";
18612
18534
  const NameLink = (props) => {
18613
18535
  var _a;
18614
18536
  const {
@@ -18817,14 +18739,14 @@ const NodeNameColumnRenderer = (i18n2, options) => {
18817
18739
  ...options
18818
18740
  };
18819
18741
  };
18820
- const PodCountOfJobColumnRenderer = (i18n2) => {
18742
+ const CompletionsCountColumnRenderer = (i18n2) => {
18821
18743
  const dataIndex = ["succeeded"];
18822
18744
  return {
18823
18745
  key: "completions",
18824
18746
  display: true,
18825
18747
  dataIndex,
18826
18748
  title: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, {
18827
- title: i18n2.t("dovetail.job_pod_count_tooltip"),
18749
+ title: i18n2.t("dovetail.completion_num_tooltip"),
18828
18750
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
18829
18751
  className: DashedTitleStyle,
18830
18752
  children: i18n2.t("dovetail.pod_num")
@@ -18836,7 +18758,7 @@ const PodCountOfJobColumnRenderer = (i18n2) => {
18836
18758
  sorter: CommonSorter(dataIndex),
18837
18759
  render: (_, record) => {
18838
18760
  return /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
18839
- children: record.podCountDisplay
18761
+ children: record.completionsDisplay
18840
18762
  });
18841
18763
  }
18842
18764
  };
@@ -19239,7 +19161,9 @@ const PVCRefColumnRenderer = (i18n2) => {
19239
19161
  resourceName: "persistentvolumeclaims",
19240
19162
  namespace: pv2.pvcNamespace || "default",
19241
19163
  name: value2,
19242
- uid: pv2.pvcUid
19164
+ query: {
19165
+ uid: pv2.pvcUid
19166
+ }
19243
19167
  });
19244
19168
  }
19245
19169
  };
@@ -19583,6 +19507,7 @@ export {
19583
19507
  ClusterIpField,
19584
19508
  ColumnKeys,
19585
19509
  CommonSorter,
19510
+ CompletionsCountColumnRenderer,
19586
19511
  ComponentContext,
19587
19512
  ConditionsField,
19588
19513
  ConditionsGroup,
@@ -19652,7 +19577,6 @@ export {
19652
19577
  KeyValueSecret,
19653
19578
  KeyValueTableForm,
19654
19579
  LabelAnnotationsTab,
19655
- LabelsAndAnnotationsShow,
19656
19580
  LabelsField,
19657
19581
  Layout,
19658
19582
  ListPage,
@@ -19714,8 +19638,6 @@ export {
19714
19638
  PodContainersGroup,
19715
19639
  PodContainersNumColumnRenderer,
19716
19640
  PodContainersTable,
19717
- PodCountOfJobColumnRenderer,
19718
- PodCountOfJobField,
19719
19641
  PodDropdown,
19720
19642
  PodLog,
19721
19643
  PodLogTab,