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

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.cjs CHANGED
@@ -563,13 +563,12 @@ const create_failed$1 = "Creation failed.";
563
563
  const create_failed_tip$1 = "Please address the following issues and try again: ";
564
564
  const save_failed$1 = "Failed to save.";
565
565
  const save_failed_tip$1 = "Please address the following issues and try again: ";
566
- const completion_num_tooltip$1 = "Completed/Expected";
567
566
  const ready_num_tooltip$1 = "Ready/Expected";
568
567
  const realtime_log$1 = "Real-time logs";
569
568
  const previous_log$1 = "Last startup logs";
570
569
  const auto_wrap$1 = "Auto wrap";
571
570
  const container_num$1 = "Containers";
572
- const edit_resource_success$1 = "{{resource}} {{name}} was edited successfully";
571
+ const edit_resource_success$1 = "{{kind}} {{name}} was edited successfully";
573
572
  const redeploy_success_toast$1 = "{{kind}} {{name}} was redeployed successfully";
574
573
  const redeploy_failed_toast$1 = "Failed to redeploy {{kind}} {{name}}";
575
574
  const pause_success_toast$1 = "Successfully suspended";
@@ -814,7 +813,6 @@ const dovetail$1 = {
814
813
  create_failed_tip: create_failed_tip$1,
815
814
  save_failed: save_failed$1,
816
815
  save_failed_tip: save_failed_tip$1,
817
- completion_num_tooltip: completion_num_tooltip$1,
818
816
  ready_num_tooltip: ready_num_tooltip$1,
819
817
  realtime_log: realtime_log$1,
820
818
  previous_log: previous_log$1,
@@ -1042,7 +1040,7 @@ const expand = "展开";
1042
1040
  const fold = "收起";
1043
1041
  const rule = "规则";
1044
1042
  const default_backend = "默认后端";
1045
- const ingress_class = "Ingress 类";
1043
+ const ingress_class = "IngressClass";
1046
1044
  const port = "端口";
1047
1045
  const pod_ready_num = "Pod 就绪数量";
1048
1046
  const pod_complete_num = "Pod 完成数量";
@@ -1080,7 +1078,7 @@ const create_failed = "创建失败。";
1080
1078
  const create_failed_tip = "请解决如下问题后,再创建:";
1081
1079
  const save_failed = "保存失败。";
1082
1080
  const save_failed_tip = "请解决如下问题后,再保存:";
1083
- const completion_num_tooltip = "已完成数量/预期数量";
1081
+ const job_pod_count_tooltip = "完成数量/全部数量";
1084
1082
  const ready_num_tooltip = "就绪数量/预期数量";
1085
1083
  const warning = "警告";
1086
1084
  const normal = "正常";
@@ -1224,6 +1222,9 @@ const node_port_duplicated = "端口已被占用。";
1224
1222
  const all = "全部";
1225
1223
  const optional_with_bracket = "(选填)";
1226
1224
  const label_annotations = "标签与注解";
1225
+ const target_service = "目标服务";
1226
+ const target_service_port = "目标服务端口";
1227
+ const select_workload = "选择工作负载";
1227
1228
  const dovetail = {
1228
1229
  copy,
1229
1230
  reset_arguments,
@@ -1344,7 +1345,7 @@ const dovetail = {
1344
1345
  create_failed_tip,
1345
1346
  save_failed,
1346
1347
  save_failed_tip,
1347
- completion_num_tooltip,
1348
+ job_pod_count_tooltip,
1348
1349
  ready_num_tooltip,
1349
1350
  "true": "是",
1350
1351
  "false": "否",
@@ -1489,7 +1490,10 @@ const dovetail = {
1489
1490
  node_port_duplicated,
1490
1491
  all,
1491
1492
  optional_with_bracket,
1492
- label_annotations
1493
+ label_annotations,
1494
+ target_service,
1495
+ target_service_port,
1496
+ select_workload
1493
1497
  };
1494
1498
  const ZH = {
1495
1499
  dovetail
@@ -7628,6 +7632,9 @@ function DurationTime(props) {
7628
7632
  };
7629
7633
  return /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", { children: elapsedTime(value2, i18nMap).label || /* @__PURE__ */ common.jsxRuntimeExports.jsx(ValueDisplay, { value: "" }) });
7630
7634
  }
7635
+ const show_1mm8a0w = "";
7636
+ const SmallSectionTitleStyle = common.cx_default(eagle.Typo.Label.l4_bold, "smzfpl7");
7637
+ const DashedTitleStyle = "d85h4vb";
7631
7638
  const index_1xaw1mq = "";
7632
7639
  const BreadcrumbStyle = "b142d7q8";
7633
7640
  function Breadcrumb(props) {
@@ -8702,7 +8709,7 @@ class IngressModel extends ResourceModel {
8702
8709
  getFlattenedRules(services) {
8703
8710
  var _a, _b, _c, _d;
8704
8711
  const protocal = !!this._rawYaml.spec.tls ? "https" : "http";
8705
- const servicePort = (_c = (_b = (_a = services.find((s2) => {
8712
+ const servicePort = (_c = (_b = (_a = services == null ? void 0 : services.find((s2) => {
8706
8713
  var _a2, _b2;
8707
8714
  return ((_a2 = s2.metadata) == null ? void 0 : _a2.name) === "contour-envoy" && ((_b2 = s2.spec) == null ? void 0 : _b2.type) === "NodePort";
8708
8715
  })) == null ? void 0 : _a.spec) == null ? void 0 : _b.ports) == null ? void 0 : _c.find((p) => p.name === protocal);
@@ -9334,17 +9341,70 @@ var ResourceState = /* @__PURE__ */ ((ResourceState2) => {
9334
9341
  ResourceState2["DELETING"] = "deleting";
9335
9342
  return ResourceState2;
9336
9343
  })(ResourceState || {});
9344
+ function isLabelSelector(selector) {
9345
+ if (!selector || typeof selector !== "object") {
9346
+ return false;
9347
+ }
9348
+ const s2 = selector;
9349
+ if ("matchExpressions" in s2) {
9350
+ return true;
9351
+ }
9352
+ if ("matchLabels" in s2) {
9353
+ const ml = s2.matchLabels;
9354
+ return typeof ml === "object" && ml !== null;
9355
+ }
9356
+ return false;
9357
+ }
9337
9358
  function matchSelector(pod2, selector, namespace2 = "default") {
9338
- var _a, _b, _c, _d;
9339
- let match = true;
9340
- if (selector) {
9341
- for (const key2 in selector.matchLabels) {
9342
- if (!((_b = (_a = pod2.metadata) == null ? void 0 : _a.labels) == null ? void 0 : _b[key2]) || ((_c = pod2.metadata.labels) == null ? void 0 : _c[key2]) !== selector.matchLabels[key2]) {
9343
- match = false;
9359
+ var _a, _b;
9360
+ if (((_a = pod2.metadata) == null ? void 0 : _a.namespace) !== namespace2) {
9361
+ return false;
9362
+ }
9363
+ if (!selector || Object.keys(selector).length === 0) {
9364
+ return true;
9365
+ }
9366
+ const podLabels = ((_b = pod2.metadata) == null ? void 0 : _b.labels) || {};
9367
+ let matchLabels;
9368
+ let matchExpressions;
9369
+ if (isLabelSelector(selector)) {
9370
+ matchLabels = selector.matchLabels;
9371
+ matchExpressions = selector.matchExpressions;
9372
+ } else {
9373
+ matchLabels = selector;
9374
+ }
9375
+ if (matchLabels) {
9376
+ for (const key2 in matchLabels) {
9377
+ if (podLabels[key2] !== matchLabels[key2]) {
9378
+ return false;
9379
+ }
9380
+ }
9381
+ }
9382
+ if (matchExpressions) {
9383
+ for (const req of matchExpressions) {
9384
+ const { key: key2, operator, values } = req;
9385
+ const labelValue = podLabels[key2];
9386
+ const hasLabel = Object.prototype.hasOwnProperty.call(podLabels, key2);
9387
+ switch (operator) {
9388
+ case "In":
9389
+ if (!hasLabel || !(values == null ? void 0 : values.includes(labelValue)))
9390
+ return false;
9391
+ break;
9392
+ case "NotIn":
9393
+ if (hasLabel && (values == null ? void 0 : values.includes(labelValue)))
9394
+ return false;
9395
+ break;
9396
+ case "Exists":
9397
+ if (!hasLabel)
9398
+ return false;
9399
+ break;
9400
+ case "DoesNotExist":
9401
+ if (hasLabel)
9402
+ return false;
9403
+ break;
9344
9404
  }
9345
9405
  }
9346
9406
  }
9347
- return match && ((_d = pod2.metadata) == null ? void 0 : _d.namespace) === namespace2;
9407
+ return true;
9348
9408
  }
9349
9409
  class WorkloadBaseModel extends ResourceModel {
9350
9410
  constructor(_rawYaml, _globalStore) {
@@ -9405,6 +9465,11 @@ class JobModel extends WorkloadBaseModel {
9405
9465
  }
9406
9466
  return `${((_a = this._rawYaml.status) == null ? void 0 : _a.succeeded) || 0}/${(_b = this._rawYaml.spec) == null ? void 0 : _b.completions}`;
9407
9467
  }
9468
+ get podCountDisplay() {
9469
+ var _a, _b, _c;
9470
+ 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);
9471
+ return `${this.succeeded}/${count}`;
9472
+ }
9408
9473
  get succeeded() {
9409
9474
  var _a;
9410
9475
  return ((_a = this._rawYaml.status) == null ? void 0 : _a.succeeded) || 0;
@@ -9721,6 +9786,12 @@ class CronJobModel extends WorkloadBaseModel {
9721
9786
  }
9722
9787
  return newOne;
9723
9788
  }
9789
+ getJobsCountDisplay(jobs) {
9790
+ const completed = jobs.filter(
9791
+ (job) => job.stateDisplay === ResourceState.COMPLETED
9792
+ ).length;
9793
+ return `${completed}/${jobs.length}`;
9794
+ }
9724
9795
  }
9725
9796
  class EventModel extends ResourceModel {
9726
9797
  constructor(_rawYaml, _globalStore) {
@@ -10294,13 +10365,20 @@ const ConditionsTable = ({ conditions = [] }) => {
10294
10365
  width: 403
10295
10366
  }
10296
10367
  ];
10297
- const { data: finalData, currentPage, onPageChange, onSorterChange } = useTableData({
10368
+ const {
10369
+ data: finalData,
10370
+ currentPage,
10371
+ onPageChange,
10372
+ onSorterChange
10373
+ } = useTableData({
10298
10374
  data: conditionsWithId,
10299
10375
  columns,
10300
- defaultSorters: [{
10301
- field: "lastUpdateTime",
10302
- order: "desc"
10303
- }]
10376
+ defaultSorters: [
10377
+ {
10378
+ field: "lastUpdateTime",
10379
+ order: "desc"
10380
+ }
10381
+ ]
10304
10382
  });
10305
10383
  const currentSize = 10;
10306
10384
  if (conditionsWithId.length === 0) {
@@ -10308,7 +10386,7 @@ const ConditionsTable = ({ conditions = [] }) => {
10308
10386
  WidgetErrorContent,
10309
10387
  {
10310
10388
  errorText: t2("dovetail.no_resource", { kind: t2("dovetail.condition") }),
10311
- type: ErrorContentType.Card
10389
+ type: ErrorContentType.List
10312
10390
  }
10313
10391
  );
10314
10392
  }
@@ -10653,7 +10731,7 @@ function K8sDropdown(props) {
10653
10731
  const configs = React.useContext(ConfigsContext);
10654
10732
  const resourceName = getResourceNameByKind(record.kind || "", configs);
10655
10733
  const config = configs[resourceName || ""];
10656
- const { t: t2 } = common.useTranslation();
10734
+ const { t: t2, i18n: i18n2 } = common.useTranslation();
10657
10735
  const { openDeleteConfirmModal } = useDeleteModal({ resourceName: resourceName || "" });
10658
10736
  const download2 = useDownloadYAML();
10659
10737
  const openForm = useOpenForm();
@@ -10677,7 +10755,10 @@ function K8sDropdown(props) {
10677
10755
  eagle.Dropdown,
10678
10756
  {
10679
10757
  overlay: /* @__PURE__ */ common.jsxRuntimeExports.jsxs(eagle.Menu, { children: [
10680
- isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false || config.hideEdit ? null : /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Menu.Item, { onClick: () => openForm({ id: record.id, resourceName }), children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, { src: iconsReact.EditPen16PrimaryIcon, children: formType === FormType.FORM ? t2("dovetail.edit") : t2("dovetail.edit_yaml") }) }),
10758
+ isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false || config.hideEdit ? null : /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Menu.Item, { onClick: () => openForm({ id: record.id, resourceName }), children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, { src: iconsReact.EditPen16PrimaryIcon, children: formType === FormType.FORM ? `${t2("dovetail.edit")}${transformResourceKindInSentence(
10759
+ (config == null ? void 0 : config.displayName) || record.kind || "",
10760
+ i18n2.language
10761
+ )}` : t2("dovetail.edit_yaml") }) }),
10681
10762
  /* @__PURE__ */ common.jsxRuntimeExports.jsx(
10682
10763
  eagle.Menu.Item,
10683
10764
  {
@@ -10950,7 +11031,7 @@ const CronjobJobsTable = ({
10950
11031
  const columns = React.useMemo(() => [NameColumnRenderer(i18n2, "jobs"), StateDisplayColumnRenderer(i18n2), NameSpaceColumnRenderer(i18n2), {
10951
11032
  ...WorkloadImageColumnRenderer(i18n2),
10952
11033
  width: 238
10953
- }, CompletionsCountColumnRenderer(i18n2), DurationColumnRenderer(i18n2), AgeColumnRenderer(i18n2)], [i18n2]);
11034
+ }, PodCountOfJobColumnRenderer(i18n2), DurationColumnRenderer(i18n2), AgeColumnRenderer(i18n2)], [i18n2]);
10954
11035
  const params = React.useMemo(() => ({
10955
11036
  columns,
10956
11037
  useTableParams: {
@@ -11008,10 +11089,17 @@ const EventsTable = ({ uid }) => {
11008
11089
  width: 120,
11009
11090
  render(value2) {
11010
11091
  const colorMap = {
11011
- "Warning": "warning",
11012
- "Normal": "green"
11092
+ Warning: "warning",
11093
+ Normal: "green"
11013
11094
  };
11014
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.StatusCapsule, { color: colorMap[value2], className: common.cx_default(StateTagStyle, "no-background"), children: i18n2.t(`dovetail.${value2.toLowerCase()}`) });
11095
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
11096
+ eagle.StatusCapsule,
11097
+ {
11098
+ color: colorMap[value2],
11099
+ className: common.cx_default(StateTagStyle, "no-background"),
11100
+ children: i18n2.t(`dovetail.${value2.toLowerCase()}`)
11101
+ }
11102
+ );
11015
11103
  },
11016
11104
  sorter: CommonSorter(["type"])
11017
11105
  },
@@ -11033,32 +11121,41 @@ const EventsTable = ({ uid }) => {
11033
11121
  width: 723,
11034
11122
  sorter: CommonSorter(["note"])
11035
11123
  },
11036
- AgeColumnRenderer(i18n2, { title: i18n2.t("dovetail.last_seen"), width: 160 }, { isRelativeTime: false })
11124
+ AgeColumnRenderer(
11125
+ i18n2,
11126
+ { title: i18n2.t("dovetail.last_seen"), width: 160 },
11127
+ { isRelativeTime: false }
11128
+ )
11037
11129
  ],
11038
11130
  [i18n2]
11039
11131
  );
11040
- const params = React.useMemo(() => ({
11041
- columns,
11042
- tableProps: {
11043
- defaultSize: 50
11044
- },
11045
- useTableParams: {
11046
- resource: "events",
11047
- meta: { resourceBasePath: "/apis/events.k8s.io/v1", kind: "Event" },
11048
- filters: {
11049
- permanent: [{
11050
- operator: "and",
11051
- value: [
11132
+ const params = React.useMemo(
11133
+ () => ({
11134
+ columns,
11135
+ tableProps: {
11136
+ defaultSize: 50
11137
+ },
11138
+ useTableParams: {
11139
+ resource: "events",
11140
+ meta: { resourceBasePath: "/apis/events.k8s.io/v1", kind: "Event" },
11141
+ filters: {
11142
+ permanent: [
11052
11143
  {
11053
- field: "regarding.uid",
11054
- operator: "eq",
11055
- value: uid
11144
+ operator: "and",
11145
+ value: [
11146
+ {
11147
+ field: "regarding.uid",
11148
+ operator: "eq",
11149
+ value: uid
11150
+ }
11151
+ ]
11056
11152
  }
11057
11153
  ]
11058
- }]
11154
+ }
11059
11155
  }
11060
- }
11061
- }), [columns, uid]);
11156
+ }),
11157
+ [columns, uid]
11158
+ );
11062
11159
  const { tableProps } = useEagleTable(params);
11063
11160
  const component = React.useContext(ComponentContext);
11064
11161
  const Table2 = component.Table || Table$1;
@@ -11066,18 +11163,12 @@ const EventsTable = ({ uid }) => {
11066
11163
  return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
11067
11164
  WidgetErrorContent,
11068
11165
  {
11069
- errorText: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.event") })
11166
+ errorText: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.event") }),
11167
+ type: ErrorContentType.List
11070
11168
  }
11071
11169
  );
11072
11170
  }
11073
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
11074
- Table2,
11075
- {
11076
- ...tableProps,
11077
- tableKey: "events",
11078
- showMenuColumn: false
11079
- }
11080
- );
11171
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(Table2, { ...tableProps, tableKey: "events", showMenuColumn: false });
11081
11172
  };
11082
11173
  const index_mvy4dx = "";
11083
11174
  const ImageWrapperStyle = "i1u1f5zp";
@@ -11169,7 +11260,10 @@ const IngressRulesTable = ({ ingress }) => {
11169
11260
  apiVersion: "v1"
11170
11261
  }
11171
11262
  });
11172
- const flattenedRules = React.useMemo(() => (serviceData == null ? void 0 : serviceData.data) ? ingress.getFlattenedRules(serviceData == null ? void 0 : serviceData.data) : [], [serviceData == null ? void 0 : serviceData.data, ingress]);
11263
+ const flattenedRules = React.useMemo(
11264
+ () => (serviceData == null ? void 0 : serviceData.data) ? ingress.getFlattenedRules(serviceData == null ? void 0 : serviceData.data) : [],
11265
+ [serviceData == null ? void 0 : serviceData.data, ingress]
11266
+ );
11173
11267
  const rows = React.useMemo(() => {
11174
11268
  return addId(flattenedRules || [], "fullPath");
11175
11269
  }, [flattenedRules]);
@@ -11200,7 +11294,7 @@ const IngressRulesTable = ({ ingress }) => {
11200
11294
  key: "serviceName",
11201
11295
  display: true,
11202
11296
  dataIndex: "serviceName",
11203
- title: t2("dovetail.backend"),
11297
+ title: t2("dovetail.target_service"),
11204
11298
  sortable: true,
11205
11299
  width: 160,
11206
11300
  render: (serviceName, record) => {
@@ -11211,14 +11305,14 @@ const IngressRulesTable = ({ ingress }) => {
11211
11305
  namespace: ingress.metadata.namespace || "default",
11212
11306
  name: serviceName
11213
11307
  }
11214
- ) : record.resourceName;
11308
+ ) : /* @__PURE__ */ common.jsxRuntimeExports.jsx(ValueDisplay, { value: "" });
11215
11309
  }
11216
11310
  },
11217
11311
  {
11218
11312
  key: "servicePort",
11219
11313
  display: true,
11220
11314
  dataIndex: "servicePort",
11221
- title: t2("dovetail.port"),
11315
+ title: t2("dovetail.target_service_port"),
11222
11316
  width: 120,
11223
11317
  sortable: true
11224
11318
  },
@@ -11226,11 +11320,13 @@ const IngressRulesTable = ({ ingress }) => {
11226
11320
  key: "secret",
11227
11321
  display: true,
11228
11322
  dataIndex: "host",
11229
- title: "Secret",
11323
+ title: t2("dovetail.cert"),
11230
11324
  width: 160,
11231
11325
  render(host2) {
11232
11326
  var _a, _b;
11233
- const secretName = (_b = (_a = ingress._rawYaml.spec.tls) == null ? void 0 : _a.find(({ hosts }) => hosts == null ? void 0 : hosts.includes(host2))) == null ? void 0 : _b.secretName;
11327
+ const secretName = (_b = (_a = ingress._rawYaml.spec.tls) == null ? void 0 : _a.find(
11328
+ ({ hosts }) => hosts == null ? void 0 : hosts.includes(host2)
11329
+ )) == null ? void 0 : _b.secretName;
11234
11330
  return secretName ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(
11235
11331
  ResourceLink,
11236
11332
  {
@@ -11257,7 +11353,7 @@ const IngressRulesTable = ({ ingress }) => {
11257
11353
  WidgetErrorContent,
11258
11354
  {
11259
11355
  errorText: t2("dovetail.no_resource", { kind: t2("dovetail.rule") }),
11260
- type: ErrorContentType.Card
11356
+ type: ErrorContentType.List
11261
11357
  }
11262
11358
  );
11263
11359
  }
@@ -11287,7 +11383,8 @@ const KeyValue = (props) => {
11287
11383
  const {
11288
11384
  data: data2 = {},
11289
11385
  hideSecret,
11290
- empty: empty2
11386
+ empty: empty2,
11387
+ errorContent = ErrorContentType.List
11291
11388
  } = props;
11292
11389
  const {
11293
11390
  t: t2
@@ -11305,7 +11402,7 @@ const KeyValue = (props) => {
11305
11402
  if (!result.length) {
11306
11403
  return /* @__PURE__ */ common.jsxRuntimeExports.jsx(WidgetErrorContent, {
11307
11404
  errorText: empty2 || t2("dovetail.empty"),
11308
- type: ErrorContentType.Card
11405
+ type: errorContent
11309
11406
  });
11310
11407
  }
11311
11408
  return /* @__PURE__ */ common.jsxRuntimeExports.jsx(common.jsxRuntimeExports.Fragment, {
@@ -11353,9 +11450,7 @@ function KeyValueAnnotation(props) {
11353
11450
  }) : null]
11354
11451
  });
11355
11452
  }
11356
- const KeyValueSecret_c3ji18 = "";
11357
- const ButtonStyle$1 = "b11tbgf7";
11358
- const GroupStyle$1 = "gtbyh5g";
11453
+ const KeyValueSecret_ltbqs = "";
11359
11454
  function KeyValueSecret(props) {
11360
11455
  const {
11361
11456
  data: data2 = {}
@@ -11365,26 +11460,23 @@ function KeyValueSecret(props) {
11365
11460
  } = common.useTranslation();
11366
11461
  const [hideSecret, setHideSecret] = React.useState(true);
11367
11462
  const toggleButton = Object.keys(data2).length ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Button, {
11368
- type: "quiet",
11369
11463
  prefixIcon: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, {
11370
11464
  src: hideSecret ? iconsReact.ViewEye16GradientGrayIcon : iconsReact.EntityFilterIgnoreGradient16GrayIcon
11371
11465
  }),
11372
11466
  onClick: () => setHideSecret((v) => !v),
11373
- className: ButtonStyle$1,
11374
11467
  size: "small",
11468
+ className: "c11tbgf7",
11375
11469
  children: hideSecret ? i18n2.t("dovetail.show_data_value") : i18n2.t("dovetail.hide_data_value")
11376
11470
  }) : null;
11377
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(ShowGroupWithTitleComponent, {
11378
- title: i18n2.t("dovetail.data"),
11379
- operationEle: toggleButton,
11380
- className: GroupStyle$1,
11381
- children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(KeyValue, {
11471
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
11472
+ className: "ctbyh5g",
11473
+ children: [toggleButton, /* @__PURE__ */ common.jsxRuntimeExports.jsx(KeyValue, {
11382
11474
  data: data2,
11383
11475
  hideSecret,
11384
11476
  empty: i18n2.t("dovetail.no_resource", {
11385
11477
  kind: i18n2.t("dovetail.data")
11386
11478
  })
11387
- })
11479
+ })]
11388
11480
  });
11389
11481
  }
11390
11482
  function isUtf8(buffer) {
@@ -11531,6 +11623,37 @@ function _KeyValueTableForm(props, ref) {
11531
11623
  const tableFormRef = React.useRef(null);
11532
11624
  const [_value, _setValue] = React.useState(value2 || defaultValue);
11533
11625
  const [forceUpdateCount, setForceUpdateCount] = React.useState(0);
11626
+ const finalExtraAction = React.useMemo(() => {
11627
+ if (extraAction) {
11628
+ return extraAction;
11629
+ }
11630
+ if (canImportFromFile) {
11631
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Upload, {
11632
+ multiple: true,
11633
+ showUploadList: false,
11634
+ onChange: async (e2) => {
11635
+ var _a;
11636
+ const fileValue = {
11637
+ key: e2.file.name,
11638
+ value: await readFileAsBase64(e2.file.originFileObj)
11639
+ };
11640
+ let newValue = [..._value, fileValue];
11641
+ if (_value.some((v) => v.key === fileValue.key)) {
11642
+ newValue = _value.map((v) => v.key === fileValue.key ? fileValue : v);
11643
+ }
11644
+ _setValue(newValue);
11645
+ (_a = tableFormRef.current) == null ? void 0 : _a.setData(newValue);
11646
+ onChange == null ? void 0 : onChange(newValue);
11647
+ },
11648
+ children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Button, {
11649
+ type: "link",
11650
+ size: "small",
11651
+ children: t2("dovetail.import_from_file")
11652
+ })
11653
+ });
11654
+ }
11655
+ return null;
11656
+ }, [canImportFromFile, t2, _value, onChange, extraAction]);
11534
11657
  const validate = React.useCallback(() => {
11535
11658
  return new Promise((resolve) => {
11536
11659
  var _a;
@@ -11651,7 +11774,7 @@ function _KeyValueTableForm(props, ref) {
11651
11774
  rowAddConfig: {
11652
11775
  addible: true,
11653
11776
  text: () => addButtonText,
11654
- extraAction
11777
+ extraAction: finalExtraAction
11655
11778
  },
11656
11779
  defaultData: _value,
11657
11780
  row: {
@@ -11666,29 +11789,7 @@ function _KeyValueTableForm(props, ref) {
11666
11789
  hideEmptyTable: true
11667
11790
  }), isHideLabelFormatPopover ? null : /* @__PURE__ */ common.jsxRuntimeExports.jsx(LabelFormatPopover, {
11668
11791
  noValueValidation
11669
- }), canImportFromFile ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Upload, {
11670
- multiple: false,
11671
- showUploadList: false,
11672
- onChange: async (e2) => {
11673
- var _a;
11674
- const fileValue = {
11675
- key: e2.file.name,
11676
- value: await readFileAsBase64(e2.file.originFileObj)
11677
- };
11678
- let newValue = [..._value, fileValue];
11679
- if (_value.some((v) => v.key === fileValue.key)) {
11680
- newValue = _value.map((v) => v.key === fileValue.key ? fileValue : v);
11681
- }
11682
- _setValue(newValue);
11683
- (_a = tableFormRef.current) == null ? void 0 : _a.setData(newValue);
11684
- onChange == null ? void 0 : onChange(newValue);
11685
- },
11686
- children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Button, {
11687
- type: "link",
11688
- size: "small",
11689
- children: t2("dovetail.import_from_file")
11690
- })
11691
- }) : null]
11792
+ })]
11692
11793
  });
11693
11794
  }
11694
11795
  const KeyValueTableForm = React.forwardRef(_KeyValueTableForm);
@@ -12308,6 +12409,7 @@ function WorkloadReplicas({
12308
12409
  })]
12309
12410
  });
12310
12411
  }
12412
+ const fields_1lap7d5 = "";
12311
12413
  var AreaType = /* @__PURE__ */ ((AreaType2) => {
12312
12414
  AreaType2["Inline"] = "Inline";
12313
12415
  AreaType2["Grid"] = "Grid";
@@ -12320,7 +12422,10 @@ const ImageField = (i18n2) => {
12320
12422
  title: i18n2.t("dovetail.image"),
12321
12423
  path: ["imageNames"],
12322
12424
  renderContent(value2) {
12323
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(ImageNames, { value: value2, breakLine: false });
12425
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(ImageNames, {
12426
+ value: value2,
12427
+ breakLine: false
12428
+ });
12324
12429
  }
12325
12430
  };
12326
12431
  };
@@ -12329,7 +12434,10 @@ const ReplicaField = () => {
12329
12434
  key: "Replicas",
12330
12435
  path: [],
12331
12436
  renderContent: (_, record) => {
12332
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(WorkloadReplicas, { record, editable: true });
12437
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(WorkloadReplicas, {
12438
+ record,
12439
+ editable: true
12440
+ });
12333
12441
  }
12334
12442
  };
12335
12443
  };
@@ -12338,7 +12446,9 @@ const ConditionsField = () => {
12338
12446
  key: "Conditions",
12339
12447
  path: ["status", "conditions"],
12340
12448
  renderContent: (value2) => {
12341
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(ConditionsTable, { conditions: value2 });
12449
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(ConditionsTable, {
12450
+ conditions: value2
12451
+ });
12342
12452
  }
12343
12453
  };
12344
12454
  };
@@ -12347,7 +12457,9 @@ const NodeTaintsField = () => {
12347
12457
  key: "NodeTaints",
12348
12458
  path: ["spec", "taints"],
12349
12459
  renderContent: (value2) => {
12350
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(NodeTaintsTable, { taints: value2 });
12460
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(NodeTaintsTable, {
12461
+ taints: value2
12462
+ });
12351
12463
  }
12352
12464
  };
12353
12465
  };
@@ -12357,16 +12469,13 @@ const PodsField = () => {
12357
12469
  path: [],
12358
12470
  renderContent: (_, record) => {
12359
12471
  var _a, _b;
12360
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
12361
- WorkloadPodsTable,
12362
- {
12363
- selector: (_b = (_a = record.metadata.relations) == null ? void 0 : _a.find((r2) => {
12364
- return r2.kind === "Pod" && r2.type === "creates";
12365
- })) == null ? void 0 : _b.selector,
12366
- namespace: record.metadata.namespace,
12367
- hideToolbar: true
12368
- }
12369
- );
12472
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(WorkloadPodsTable, {
12473
+ selector: (_b = (_a = record.metadata.relations) == null ? void 0 : _a.find((r2) => {
12474
+ return r2.kind === "Pod" && r2.type === "creates";
12475
+ })) == null ? void 0 : _b.selector,
12476
+ namespace: record.metadata.namespace,
12477
+ hideToolbar: true
12478
+ });
12370
12479
  }
12371
12480
  };
12372
12481
  };
@@ -12376,19 +12485,16 @@ const JobsField = () => {
12376
12485
  path: [],
12377
12486
  renderContent: (_, record) => {
12378
12487
  var _a, _b, _c;
12379
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
12380
- CronjobJobsTable,
12381
- {
12382
- owner: {
12383
- apiVersion: record.apiVersion || "",
12384
- kind: record.kind || "",
12385
- name: ((_a = record.metadata) == null ? void 0 : _a.name) || "",
12386
- namespace: ((_b = record.metadata) == null ? void 0 : _b.namespace) || "",
12387
- uid: ((_c = record.metadata) == null ? void 0 : _c.uid) || ""
12388
- },
12389
- hideToolBar: true
12390
- }
12391
- );
12488
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(CronjobJobsTable, {
12489
+ owner: {
12490
+ apiVersion: record.apiVersion || "",
12491
+ kind: record.kind || "",
12492
+ name: ((_a = record.metadata) == null ? void 0 : _a.name) || "",
12493
+ namespace: ((_b = record.metadata) == null ? void 0 : _b.namespace) || "",
12494
+ uid: ((_c = record.metadata) == null ? void 0 : _c.uid) || ""
12495
+ },
12496
+ hideToolBar: true
12497
+ });
12392
12498
  }
12393
12499
  };
12394
12500
  };
@@ -12397,13 +12503,15 @@ const DataField = (i18n2) => {
12397
12503
  key: "data",
12398
12504
  path: ["data"],
12399
12505
  renderContent: (val) => {
12400
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
12401
- KeyValue,
12402
- {
12506
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
12507
+ className: "c91cpym",
12508
+ children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(KeyValue, {
12403
12509
  data: val,
12404
- empty: i18n2.t("dovetail.no_resource", { kind: i18n2.t("dovetail.data") })
12405
- }
12406
- );
12510
+ empty: i18n2.t("dovetail.no_resource", {
12511
+ kind: i18n2.t("dovetail.data")
12512
+ })
12513
+ })
12514
+ });
12407
12515
  }
12408
12516
  };
12409
12517
  };
@@ -12416,7 +12524,12 @@ const SecretDataField = () => {
12416
12524
  for (const key2 in val) {
12417
12525
  decodeVal[key2] = atob(val[key2]);
12418
12526
  }
12419
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(KeyValueSecret, { data: decodeVal });
12527
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
12528
+ className: "ca9k82k",
12529
+ children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(KeyValueSecret, {
12530
+ data: decodeVal
12531
+ })
12532
+ });
12420
12533
  }
12421
12534
  };
12422
12535
  };
@@ -12427,7 +12540,9 @@ const StartTimeField = (i18n2) => {
12427
12540
  title: i18n2.t("dovetail.started"),
12428
12541
  path: ["status", "startTime"],
12429
12542
  renderContent(value2) {
12430
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(Time, { date: value2 });
12543
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(Time, {
12544
+ date: value2
12545
+ });
12431
12546
  }
12432
12547
  };
12433
12548
  };
@@ -12461,16 +12576,13 @@ const ServicePodsField = () => {
12461
12576
  path: [],
12462
12577
  renderContent: (_, record) => {
12463
12578
  var _a, _b, _c;
12464
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
12465
- WorkloadPodsTable,
12466
- {
12467
- selector: (_b = (_a = record.metadata.relations) == null ? void 0 : _a.find((r2) => {
12468
- return r2.kind === "Pod" && r2.type === "selects";
12469
- })) == null ? void 0 : _b.selector,
12470
- namespace: (_c = record.metadata) == null ? void 0 : _c.namespace,
12471
- hideToolbar: true
12472
- }
12473
- );
12579
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(WorkloadPodsTable, {
12580
+ selector: (_b = (_a = record.metadata.relations) == null ? void 0 : _a.find((r2) => {
12581
+ return r2.kind === "Pod" && r2.type === "selects";
12582
+ })) == null ? void 0 : _b.selector,
12583
+ namespace: (_c = record.metadata) == null ? void 0 : _c.namespace,
12584
+ hideToolbar: true
12585
+ });
12474
12586
  }
12475
12587
  };
12476
12588
  };
@@ -12479,17 +12591,32 @@ const IngressRulesTableTabField = () => {
12479
12591
  key: "rules",
12480
12592
  path: ["spec", "rules"],
12481
12593
  renderContent: (_, record) => {
12482
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(IngressRulesTable, { ingress: record });
12594
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
12595
+ className: "c1k4htrr",
12596
+ children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(IngressRulesTable, {
12597
+ ingress: record
12598
+ })
12599
+ });
12483
12600
  }
12484
12601
  };
12485
12602
  };
12486
- const EventsTableTabField = () => {
12603
+ const EventsTableTabField = ({
12604
+ size
12605
+ }) => {
12487
12606
  return {
12488
12607
  key: "event",
12489
12608
  path: [],
12490
12609
  renderContent: (_, record) => {
12491
12610
  var _a;
12492
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", { style: { padding: "0 24px", height: "100%" }, children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(EventsTable, { uid: (_a = record.metadata) == null ? void 0 : _a.uid }) });
12611
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
12612
+ style: {
12613
+ padding: size === "small" ? "0 12px" : "0 24px",
12614
+ height: "100%"
12615
+ },
12616
+ children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(EventsTable, {
12617
+ uid: (_a = record.metadata) == null ? void 0 : _a.uid
12618
+ })
12619
+ });
12493
12620
  }
12494
12621
  };
12495
12622
  };
@@ -12505,7 +12632,9 @@ const AgeField = (i18n2) => ({
12505
12632
  title: i18n2.t("dovetail.created_time"),
12506
12633
  path: ["metadata", "creationTimestamp"],
12507
12634
  renderContent(value2) {
12508
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(Time, { date: new Date(value2) });
12635
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(Time, {
12636
+ date: new Date(value2)
12637
+ });
12509
12638
  }
12510
12639
  });
12511
12640
  const LabelsField = (i18n2) => ({
@@ -12516,7 +12645,9 @@ const LabelsField = (i18n2) => ({
12516
12645
  if (!value2) {
12517
12646
  return "-";
12518
12647
  }
12519
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(Tags, { value: value2 });
12648
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(Tags, {
12649
+ value: value2
12650
+ });
12520
12651
  }
12521
12652
  });
12522
12653
  const AnnotationsField = (i18n2) => ({
@@ -12524,7 +12655,10 @@ const AnnotationsField = (i18n2) => ({
12524
12655
  title: i18n2.t("dovetail.annotation"),
12525
12656
  path: ["metadata", "annotations"],
12526
12657
  renderContent: (value2) => {
12527
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(KeyValueAnnotation, { data: value2, expandable: true });
12658
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(KeyValueAnnotation, {
12659
+ data: value2,
12660
+ expandable: true
12661
+ });
12528
12662
  }
12529
12663
  });
12530
12664
  const ServiceInnerClusterAccessField = () => ({
@@ -12533,23 +12667,22 @@ const ServiceInnerClusterAccessField = () => ({
12533
12667
  title: /* @__PURE__ */ common.jsxRuntimeExports.jsx(ServiceInClusterAccessTitle, {}),
12534
12668
  path: [],
12535
12669
  renderContent: (_, record) => {
12536
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(ServiceInClusterAccessComponent, { service: record });
12670
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(ServiceInClusterAccessComponent, {
12671
+ service: record
12672
+ });
12537
12673
  }
12538
12674
  });
12539
12675
  const ServiceOutClusterAccessField = (clusterVip) => ({
12540
- key: "innerClusterAccess",
12676
+ key: "outClusterAccess",
12541
12677
  col: 12,
12542
12678
  title: /* @__PURE__ */ common.jsxRuntimeExports.jsx(ServiceOutClusterAccessTitle, {}),
12543
12679
  path: [],
12544
12680
  renderContent: (_, record) => {
12545
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
12546
- ServiceOutClusterAccessComponent,
12547
- {
12548
- service: record,
12549
- breakLine: false,
12550
- clusterVip
12551
- }
12552
- );
12681
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(ServiceOutClusterAccessComponent, {
12682
+ service: record,
12683
+ breakLine: false,
12684
+ clusterVip
12685
+ });
12553
12686
  }
12554
12687
  });
12555
12688
  const PodSelectorField = () => ({
@@ -12558,14 +12691,24 @@ const PodSelectorField = () => ({
12558
12691
  renderContent: (_, resource) => {
12559
12692
  const spec = resource._rawYaml.spec;
12560
12693
  const selector = spec && ("selector" in spec && spec.selector || "podSelector" in spec && spec.podSelector.matchLabels);
12561
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(PodSelectorTable, { podSelectors: selector || {} });
12694
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(PodSelectorTable, {
12695
+ podSelectors: selector || {}
12696
+ });
12562
12697
  }
12563
12698
  });
12564
12699
  const PortsTableField = () => ({
12565
12700
  key: "ports",
12566
12701
  path: [],
12567
12702
  renderContent: (_, service) => {
12568
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(PortsTable, { service });
12703
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
12704
+ style: {
12705
+ padding: "0 24px",
12706
+ height: "100%"
12707
+ },
12708
+ children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(PortsTable, {
12709
+ service
12710
+ })
12711
+ });
12569
12712
  }
12570
12713
  });
12571
12714
  const DurationField = (i18n2) => {
@@ -12575,7 +12718,9 @@ const DurationField = (i18n2) => {
12575
12718
  path: ["duration"],
12576
12719
  title: i18n2.t("dovetail.duration"),
12577
12720
  renderContent: (v) => {
12578
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(DurationTime, { value: v });
12721
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(DurationTime, {
12722
+ value: v
12723
+ });
12579
12724
  }
12580
12725
  };
12581
12726
  };
@@ -12592,26 +12737,21 @@ const StorageClassPvField = () => {
12592
12737
  key: "pvs",
12593
12738
  path: ["pvs"],
12594
12739
  renderContent: (_, sc) => {
12595
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
12596
- ResourceTable,
12597
- {
12598
- resource: "persistentvolumes",
12599
- useTableParams: {
12600
- filters: {
12601
- permanent: [
12602
- {
12603
- field: "",
12604
- value: "",
12605
- fn(pv2) {
12606
- var _a;
12607
- return sc.filterPV(pv2, (_a = sc.metadata) == null ? void 0 : _a.name);
12608
- }
12609
- }
12610
- ]
12611
- }
12740
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(ResourceTable, {
12741
+ resource: "persistentvolumes",
12742
+ useTableParams: {
12743
+ filters: {
12744
+ permanent: [{
12745
+ field: "",
12746
+ value: "",
12747
+ fn(pv2) {
12748
+ var _a;
12749
+ return sc.filterPV(pv2, (_a = sc.metadata) == null ? void 0 : _a.name);
12750
+ }
12751
+ }]
12612
12752
  }
12613
12753
  }
12614
- );
12754
+ });
12615
12755
  }
12616
12756
  };
12617
12757
  };
@@ -12622,7 +12762,10 @@ const PVCapacityField = (i18n2) => {
12622
12762
  path: ["spec", "capacity", "storage"],
12623
12763
  title: i18n2.t("dovetail.capacity"),
12624
12764
  renderContent(value2) {
12625
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Units.Byte, { rawValue: parseSi(value2), decimals: 2 });
12765
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Units.Byte, {
12766
+ rawValue: parseSi(value2),
12767
+ decimals: 2
12768
+ });
12626
12769
  }
12627
12770
  };
12628
12771
  };
@@ -12633,7 +12776,10 @@ const PVCStorageField = (i18n2) => {
12633
12776
  path: ["spec", "resources", "requests", "storage"],
12634
12777
  title: i18n2.t("dovetail.distributed"),
12635
12778
  renderContent(value2, pvc2) {
12636
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(PVCDistributeStorage, { pvc: pvc2, editable: true });
12779
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(PVCDistributeStorage, {
12780
+ pvc: pvc2,
12781
+ editable: true
12782
+ });
12637
12783
  }
12638
12784
  };
12639
12785
  };
@@ -12644,14 +12790,11 @@ const PVRefField = (i18n2) => {
12644
12790
  path: ["pv"],
12645
12791
  title: i18n2.t("dovetail.pv"),
12646
12792
  renderContent(value2) {
12647
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
12648
- ResourceLink,
12649
- {
12650
- resourceName: "persistentvolumes",
12651
- namespace: "",
12652
- name: value2
12653
- }
12654
- );
12793
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(ResourceLink, {
12794
+ resourceName: "persistentvolumes",
12795
+ namespace: "",
12796
+ name: value2
12797
+ });
12655
12798
  }
12656
12799
  };
12657
12800
  };
@@ -12662,7 +12805,11 @@ const PVStorageClassField = (i18n2) => {
12662
12805
  path: ["spec", "storageClassName"],
12663
12806
  title: i18n2.t("dovetail.storage_class"),
12664
12807
  renderContent(value2) {
12665
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(ResourceLink, { resourceName: "storageclasses", namespace: "", name: value2 });
12808
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(ResourceLink, {
12809
+ resourceName: "storageclasses",
12810
+ namespace: "",
12811
+ name: value2
12812
+ });
12666
12813
  }
12667
12814
  };
12668
12815
  };
@@ -12673,7 +12820,10 @@ const PVPhaseField = (i18n2) => {
12673
12820
  path: ["stateDisplay"],
12674
12821
  title: i18n2.t("dovetail.state"),
12675
12822
  renderContent(value2) {
12676
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(StateTag, { state: value2, hideBackground: true });
12823
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(StateTag, {
12824
+ state: value2,
12825
+ hideBackground: true
12826
+ });
12677
12827
  }
12678
12828
  };
12679
12829
  };
@@ -12684,7 +12834,9 @@ const PVVolumeModeField = (i18n2) => {
12684
12834
  path: ["spec", "volumeMode"],
12685
12835
  title: i18n2.t("dovetail.volume_mode"),
12686
12836
  renderContent(value2) {
12687
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(PVVolumeModeDisplay, { value: value2 });
12837
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(PVVolumeModeDisplay, {
12838
+ value: value2
12839
+ });
12688
12840
  }
12689
12841
  };
12690
12842
  };
@@ -12705,22 +12857,17 @@ const PVCPodsField = () => {
12705
12857
  path: [],
12706
12858
  renderContent: (_, record) => {
12707
12859
  var _a;
12708
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
12709
- WorkloadPodsTable,
12710
- {
12711
- filter: (item) => {
12712
- var _a2, _b;
12713
- return !!((_b = (_a2 = item.spec) == null ? void 0 : _a2.volumes) == null ? void 0 : _b.some(
12714
- (v) => {
12715
- var _a3, _b2;
12716
- return ((_a3 = v.persistentVolumeClaim) == null ? void 0 : _a3.claimName) === ((_b2 = record.metadata) == null ? void 0 : _b2.name);
12717
- }
12718
- ));
12719
- },
12720
- namespace: (_a = record.metadata) == null ? void 0 : _a.namespace,
12721
- hideToolbar: true
12722
- }
12723
- );
12860
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(WorkloadPodsTable, {
12861
+ filter: (item) => {
12862
+ var _a2, _b;
12863
+ return !!((_b = (_a2 = item.spec) == null ? void 0 : _a2.volumes) == null ? void 0 : _b.some((v) => {
12864
+ var _a3, _b2;
12865
+ return ((_a3 = v.persistentVolumeClaim) == null ? void 0 : _a3.claimName) === ((_b2 = record.metadata) == null ? void 0 : _b2.name);
12866
+ }));
12867
+ },
12868
+ namespace: (_a = record.metadata) == null ? void 0 : _a.namespace,
12869
+ hideToolbar: true
12870
+ });
12724
12871
  }
12725
12872
  };
12726
12873
  };
@@ -12731,15 +12878,14 @@ const PVCRefField = (i18n2) => {
12731
12878
  path: ["pvc"],
12732
12879
  title: i18n2.t("dovetail.pvc"),
12733
12880
  renderContent(value2, pv2) {
12734
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
12735
- ResourceLink,
12736
- {
12737
- resourceName: "persistentvolumeclaims",
12738
- namespace: pv2.pvcNamespace || "default",
12739
- name: value2,
12740
- query: { uid: pv2.pvcUid }
12881
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(ResourceLink, {
12882
+ resourceName: "persistentvolumeclaims",
12883
+ namespace: pv2.pvcNamespace || "default",
12884
+ name: value2,
12885
+ query: {
12886
+ uid: pv2.pvcUid
12741
12887
  }
12742
- );
12888
+ });
12743
12889
  }
12744
12890
  };
12745
12891
  };
@@ -12793,10 +12939,71 @@ const ResourceTableField = (resource, useTableParams) => {
12793
12939
  key: resource,
12794
12940
  path: [],
12795
12941
  renderContent() {
12796
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(ResourceTable, { resource, useTableParams });
12942
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(ResourceTable, {
12943
+ resource,
12944
+ useTableParams
12945
+ });
12797
12946
  }
12798
12947
  };
12799
12948
  };
12949
+ const PodCountOfJobField = (i18n2) => {
12950
+ return {
12951
+ key: "podCount",
12952
+ path: [],
12953
+ col: 12,
12954
+ title: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Tooltip, {
12955
+ title: i18n2.t("dovetail.job_pod_count_tooltip"),
12956
+ children: /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
12957
+ className: DashedTitleStyle,
12958
+ children: i18n2.t("dovetail.pod_num")
12959
+ })
12960
+ }),
12961
+ renderContent: (_, record) => {
12962
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
12963
+ children: record.podCountDisplay
12964
+ });
12965
+ }
12966
+ };
12967
+ };
12968
+ const index_15s69c5 = "";
12969
+ const ItemWrapperStyle = "i1hk9uwu";
12970
+ const LabelsAndAnnotationsShow = ({
12971
+ labels,
12972
+ annotations,
12973
+ size = "medium"
12974
+ }) => {
12975
+ const {
12976
+ i18n: sksI18n
12977
+ } = common.useTranslation();
12978
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
12979
+ className: "c1wn08fn",
12980
+ style: {
12981
+ padding: size === "small" ? "12px" : "16px 24px",
12982
+ gap: size === "small" ? "12px" : "16px"
12983
+ },
12984
+ children: [/* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
12985
+ className: ItemWrapperStyle,
12986
+ children: [/* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
12987
+ className: SmallSectionTitleStyle,
12988
+ children: sksI18n.t("dovetail.label")
12989
+ }), Object.keys(labels || {}).length ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(Tags, {
12990
+ value: labels
12991
+ }) : /* @__PURE__ */ common.jsxRuntimeExports.jsx(WidgetErrorContent, {
12992
+ errorText: sksI18n.t("dovetail.empty"),
12993
+ type: ErrorContentType.Card
12994
+ })]
12995
+ }), /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
12996
+ className: ItemWrapperStyle,
12997
+ children: [/* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
12998
+ className: SmallSectionTitleStyle,
12999
+ children: sksI18n.t("dovetail.annotation")
13000
+ }), /* @__PURE__ */ common.jsxRuntimeExports.jsx(KeyValue, {
13001
+ data: annotations,
13002
+ errorContent: ErrorContentType.Card
13003
+ })]
13004
+ })]
13005
+ });
13006
+ };
12800
13007
  const baseNoReset = "";
12801
13008
  const index_14irc29 = "";
12802
13009
  const WrapperStyle$3 = "wve7dfm";
@@ -12992,22 +13199,30 @@ const PodLog = ({
12992
13199
  })]
12993
13200
  });
12994
13201
  };
12995
- const EventsTab = (i18n2) => ({
13202
+ const EventsTab = ({
13203
+ i18n: i18n2,
13204
+ size
13205
+ }) => ({
12996
13206
  title: i18n2.t("dovetail.event"),
12997
13207
  key: "events",
13208
+ background: "white",
12998
13209
  groups: [
12999
13210
  {
13000
13211
  areas: [
13001
13212
  {
13002
- fields: [EventsTableTabField()]
13213
+ fields: [EventsTableTabField({ size })]
13003
13214
  }
13004
13215
  ]
13005
13216
  }
13006
13217
  ]
13007
13218
  });
13008
- const ConditionsTab = (i18n2) => ({
13219
+ const ConditionsTab = ({
13220
+ i18n: i18n2,
13221
+ size
13222
+ }) => ({
13009
13223
  title: i18n2.t("dovetail.condition"),
13010
13224
  key: "conditions",
13225
+ background: "white",
13011
13226
  groups: [
13012
13227
  {
13013
13228
  areas: [
@@ -13017,10 +13232,16 @@ const ConditionsTab = (i18n2) => ({
13017
13232
  key: "Conditions",
13018
13233
  path: ["status", "conditions"],
13019
13234
  renderContent: (value2) => {
13020
- return /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", { style: { padding: "0 24px", height: "100%" }, children: [
13021
- /* @__PURE__ */ common.jsxRuntimeExports.jsx(ConditionsTable, { conditions: value2 }),
13022
- ";"
13023
- ] });
13235
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
13236
+ "div",
13237
+ {
13238
+ style: {
13239
+ padding: size === "small" ? "0 12px" : "0 24px",
13240
+ height: "100%"
13241
+ },
13242
+ children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(ConditionsTable, { conditions: value2 })
13243
+ }
13244
+ );
13024
13245
  }
13025
13246
  }
13026
13247
  ]
@@ -13029,41 +13250,31 @@ const ConditionsTab = (i18n2) => ({
13029
13250
  }
13030
13251
  ]
13031
13252
  });
13032
- const LabelAnnotationsTab = (i18n2) => ({
13253
+ const LabelAnnotationsTab = ({
13254
+ i18n: i18n2,
13255
+ size
13256
+ }) => ({
13033
13257
  title: i18n2.t("dovetail.label_annotations"),
13034
13258
  key: "label-annotations",
13259
+ background: "white",
13035
13260
  groups: [
13036
13261
  {
13037
- title: i18n2.t("dovetail.label"),
13038
13262
  areas: [
13039
13263
  {
13040
13264
  fields: [
13041
13265
  {
13042
- key: "Labels",
13043
- title: i18n2.t("dovetail.label"),
13044
- path: ["metadata", "labels"],
13045
- render: (value2) => {
13046
- if (!value2) {
13047
- return "-";
13048
- }
13049
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(Tags, { value: value2 });
13050
- }
13051
- }
13052
- ]
13053
- }
13054
- ]
13055
- },
13056
- {
13057
- title: i18n2.t("dovetail.annotation"),
13058
- areas: [
13059
- {
13060
- fields: [
13061
- {
13062
- key: "Annotations",
13063
- title: i18n2.t("dovetail.annotation"),
13064
- path: ["metadata", "annotations"],
13065
- render: (value2) => {
13066
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(KeyValue, { data: value2 });
13266
+ key: "label-annotations",
13267
+ path: [],
13268
+ renderContent: (_, record) => {
13269
+ var _a, _b;
13270
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
13271
+ LabelsAndAnnotationsShow,
13272
+ {
13273
+ labels: (_a = record.metadata) == null ? void 0 : _a.labels,
13274
+ annotations: (_b = record.metadata) == null ? void 0 : _b.annotations,
13275
+ size
13276
+ }
13277
+ );
13067
13278
  }
13068
13279
  }
13069
13280
  ]
@@ -13075,6 +13286,7 @@ const LabelAnnotationsTab = (i18n2) => ({
13075
13286
  const PodLogTab = (i18n2, apiUrl) => ({
13076
13287
  title: i18n2.t("dovetail.log"),
13077
13288
  key: "pod-log",
13289
+ background: "white",
13078
13290
  groups: [
13079
13291
  {
13080
13292
  areas: [
@@ -13093,6 +13305,58 @@ const PodLogTab = (i18n2, apiUrl) => ({
13093
13305
  }
13094
13306
  ]
13095
13307
  });
13308
+ const PortsTab = ({
13309
+ i18n: i18n2
13310
+ }) => ({
13311
+ title: i18n2.t("dovetail.port"),
13312
+ key: "ports",
13313
+ background: "white",
13314
+ groups: [
13315
+ {
13316
+ areas: [
13317
+ {
13318
+ fields: [PortsTableField()]
13319
+ }
13320
+ ]
13321
+ }
13322
+ ]
13323
+ });
13324
+ const IngressRulesTab = ({
13325
+ i18n: i18n2
13326
+ }) => ({
13327
+ title: i18n2.t("dovetail.rule"),
13328
+ key: "ingress-rules",
13329
+ background: "white",
13330
+ groups: [
13331
+ {
13332
+ areas: [{ fields: [IngressRulesTableTabField()] }]
13333
+ }
13334
+ ]
13335
+ });
13336
+ const DataTab = ({
13337
+ i18n: i18n2
13338
+ }) => ({
13339
+ title: i18n2.t("dovetail.data"),
13340
+ key: "data",
13341
+ background: "white",
13342
+ groups: [
13343
+ {
13344
+ areas: [{ fields: [DataField(i18n2)] }]
13345
+ }
13346
+ ]
13347
+ });
13348
+ const SecretDataTab = ({
13349
+ i18n: i18n2
13350
+ }) => ({
13351
+ title: i18n2.t("dovetail.data"),
13352
+ key: "secret-data",
13353
+ background: "white",
13354
+ groups: [
13355
+ {
13356
+ areas: [{ fields: [SecretDataField()] }]
13357
+ }
13358
+ ]
13359
+ });
13096
13360
  const NetworkPolicyRulesViewer_r6jity = "";
13097
13361
  const MonacoYamlEditor$3 = React.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$1));
13098
13362
  const EditorStyle$1 = "e1cjl2b8";
@@ -13254,8 +13518,6 @@ const BasicGroup = (i18n2, {
13254
13518
  {
13255
13519
  fields: (isShowNamespace ? [NamespaceField(i18n2)] : []).concat([
13256
13520
  ...basicFields,
13257
- LabelsField(i18n2),
13258
- AnnotationsField(i18n2),
13259
13521
  AgeField(i18n2)
13260
13522
  ])
13261
13523
  },
@@ -13325,13 +13587,6 @@ const NodeTaintsGroup = (i18n2) => ({
13325
13587
  }
13326
13588
  ]
13327
13589
  });
13328
- const SecretDataGroup = () => ({
13329
- areas: [
13330
- {
13331
- fields: [SecretDataField()]
13332
- }
13333
- ]
13334
- });
13335
13590
  const JobsGroup = () => ({
13336
13591
  title: "Job",
13337
13592
  areas: [
@@ -13340,14 +13595,6 @@ const JobsGroup = () => ({
13340
13595
  }
13341
13596
  ]
13342
13597
  });
13343
- const IngressRulesGroup = (i18n2) => ({
13344
- title: i18n2.t("dovetail.rule"),
13345
- areas: [
13346
- {
13347
- fields: [IngressRulesTableTabField()]
13348
- }
13349
- ]
13350
- });
13351
13598
  const PodSelectorGroup = (i18n2) => ({
13352
13599
  title: i18n2.t("dovetail.pod_selector"),
13353
13600
  areas: [
@@ -13364,14 +13611,6 @@ const PortsGroup = (i18n2) => ({
13364
13611
  }
13365
13612
  ]
13366
13613
  });
13367
- const DataGroup = (i18n2) => ({
13368
- title: i18n2.t("dovetail.data"),
13369
- areas: [
13370
- {
13371
- fields: [DataField(i18n2)]
13372
- }
13373
- ]
13374
- });
13375
13614
  const NetworkPolicyIngressRulesGroup = (i18n2) => ({
13376
13615
  title: i18n2.t("dovetail.ingress_rule"),
13377
13616
  areas: [
@@ -13438,7 +13677,7 @@ function Tabs(props) {
13438
13677
  return /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.TabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
13439
13678
  }) });
13440
13679
  }
13441
- const ShowContentView_1aeomp8 = "";
13680
+ const ShowContentView_m77hzs = "";
13442
13681
  const ShowContentWrapperStyle = "soapvs9";
13443
13682
  const BackButton = "b13d603q";
13444
13683
  const ToolBarWrapper = "tm8eaia";
@@ -13453,7 +13692,8 @@ const FieldWrapperStyle = "f1c7cta8";
13453
13692
  const TabContentStyle = "t1pt61xk";
13454
13693
  const ValueStyle = "v1to6fie";
13455
13694
  const TabsStyle = "tca5959";
13456
- const KindTagStyle = "k3dcesi";
13695
+ const SmallTabsStyle = "s3dcesi";
13696
+ const KindTagStyle = "kzyzuo8";
13457
13697
  function ShowGroupWithTitleComponent(props) {
13458
13698
  const {
13459
13699
  title,
@@ -13473,10 +13713,14 @@ function ShowGroupWithTitleComponent(props) {
13473
13713
  }
13474
13714
  function BasicShowGroupComponent(props) {
13475
13715
  const {
13476
- children
13716
+ children,
13717
+ size = "medium"
13477
13718
  } = props;
13478
13719
  return /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
13479
13720
  className: common.cx_default(BasicGroupStyle, "basic-group"),
13721
+ style: {
13722
+ margin: size === "small" ? "12px 8px 0px 12px" : void 0
13723
+ },
13480
13724
  children
13481
13725
  });
13482
13726
  }
@@ -13492,7 +13736,8 @@ const ShowContentView = (props) => {
13492
13736
  hideBackButton = false,
13493
13737
  canCollapseTabs = false,
13494
13738
  className,
13495
- hideTopBar = false
13739
+ hideTopBar = false,
13740
+ size = "medium"
13496
13741
  } = props;
13497
13742
  const {
13498
13743
  queryResult
@@ -13524,43 +13769,47 @@ const ShowContentView = (props) => {
13524
13769
  if (!record)
13525
13770
  return null;
13526
13771
  return fields.map((field) => {
13527
- if (field.hidden)
13772
+ const shouldHide = typeof field.hidden === "function" ? field.hidden(record) : field.hidden;
13773
+ if (shouldHide)
13528
13774
  return null;
13529
13775
  let content;
13530
13776
  const value2 = lodashEs.get(record, field.path);
13531
13777
  if (field.renderContent) {
13532
- content = field.renderContent(value2, record, field);
13778
+ content = field.renderContent(value2, record, field, size);
13533
13779
  } else {
13534
13780
  content = lodashEs.get(record, field.path);
13535
13781
  }
13536
- return hasCol ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Col, {
13537
- flex: areaType === AreaType.Inline ? "none" : "",
13538
- span: field.col || 24,
13539
- className: "czyzuo8",
13540
- children: field.render ? field.render(value2, record, field) : /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
13541
- className: FieldWrapperStyle,
13542
- children: [field.title && /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
13543
- className: eagle.Typo.Label.l4_regular_title,
13544
- style: {
13545
- width: field.labelWidth || "165px",
13546
- marginRight: 8,
13547
- flexShrink: 0,
13548
- color: "#2C385299"
13549
- },
13550
- children: field.title
13551
- }), /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
13552
- style: {
13553
- flex: 1,
13554
- minWidth: 0
13555
- },
13556
- children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(ValueDisplay, {
13557
- className: common.cx_default(eagle.Typo.Label.l4_regular_title, ValueStyle),
13558
- value: content,
13559
- useOverflow: false
13560
- })
13561
- })]
13562
- })
13563
- }, field.key) : /* @__PURE__ */ common.jsxRuntimeExports.jsx(ValueDisplay, {
13782
+ if (hasCol) {
13783
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Col, {
13784
+ flex: areaType === AreaType.Inline ? "none" : "",
13785
+ span: field.col || 24,
13786
+ className: "cxd8k68",
13787
+ children: field.render ? field.render(value2, record, field, size) : /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
13788
+ className: FieldWrapperStyle,
13789
+ children: [field.title && /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
13790
+ className: eagle.Typo.Label.l4_regular_title,
13791
+ style: {
13792
+ width: field.labelWidth || "165px",
13793
+ marginRight: 8,
13794
+ flexShrink: 0,
13795
+ color: "#2C385299"
13796
+ },
13797
+ children: field.title
13798
+ }), /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
13799
+ style: {
13800
+ flex: 1,
13801
+ minWidth: 0
13802
+ },
13803
+ children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(ValueDisplay, {
13804
+ className: common.cx_default(eagle.Typo.Label.l4_regular_title, ValueStyle),
13805
+ value: content,
13806
+ useOverflow: false
13807
+ })
13808
+ })]
13809
+ })
13810
+ }, field.key);
13811
+ }
13812
+ return field.render ? field.render(value2, record, field, size) : /* @__PURE__ */ common.jsxRuntimeExports.jsx(ValueDisplay, {
13564
13813
  style: {
13565
13814
  height: "100%"
13566
13815
  },
@@ -13572,7 +13821,10 @@ const ShowContentView = (props) => {
13572
13821
  function renderGroup(group, isBasicGroup = false) {
13573
13822
  let GroupContainer = React.Fragment;
13574
13823
  let FieldContainer = React.Fragment;
13575
- let groupContainerProps = {};
13824
+ const groupContainerProps = {
13825
+ title: group.title || "",
13826
+ size
13827
+ };
13576
13828
  let fieldContainerProps = {};
13577
13829
  if (isBasicGroup) {
13578
13830
  GroupContainer = BasicShowGroupComponent;
@@ -13582,9 +13834,6 @@ const ShowContentView = (props) => {
13582
13834
  const shouldRenderRow = !!(isBasicGroup || group.title);
13583
13835
  if (shouldRenderRow) {
13584
13836
  FieldContainer = eagle.Row;
13585
- groupContainerProps = {
13586
- title: group.title || ""
13587
- };
13588
13837
  fieldContainerProps = {
13589
13838
  gutter: [24, 8]
13590
13839
  };
@@ -13606,6 +13855,9 @@ const ShowContentView = (props) => {
13606
13855
  const stateDisplay = lodashEs.get(record, "stateDisplay");
13607
13856
  const topBar = /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
13608
13857
  className: ToolBarWrapper,
13858
+ style: {
13859
+ padding: size === "small" ? "8px 16px" : void 0
13860
+ },
13609
13861
  children: [!hideBackButton && !showConfig.renderCustomBackButton && /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
13610
13862
  className: common.cx_default(eagle.Typo.Label.l4_bold, BackButton),
13611
13863
  onClick: () => {
@@ -13664,22 +13916,28 @@ const ShowContentView = (props) => {
13664
13916
  })]
13665
13917
  });
13666
13918
  const tabs = /* @__PURE__ */ common.jsxRuntimeExports.jsx(Tabs$1, {
13667
- tabs: (showConfig.tabs || []).map((tab, tabIndex) => {
13919
+ tabs: (showConfig.tabs || []).map((tab) => {
13668
13920
  var _a2;
13669
13921
  return {
13670
13922
  title: tab.title,
13671
13923
  key: tab.key,
13672
13924
  children: /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
13673
- className: common.cx_default(TabContentStyle, tab.groups.length <= 1 && tabIndex !== 0 && FullTabContentStyle),
13925
+ className: common.cx_default(TabContentStyle, tab.groups.length <= 1 && FullTabContentStyle),
13926
+ style: {
13927
+ background: tab.background === "white" ? "#fff" : void 0
13928
+ },
13674
13929
  children: (_a2 = tab.groups) == null ? void 0 : _a2.map((group) => renderGroup(group, false))
13675
13930
  })
13676
13931
  };
13677
13932
  }),
13678
- className: TabsStyle
13933
+ className: common.cx_default(TabsStyle, size === "small" && SmallTabsStyle)
13679
13934
  });
13680
13935
  const basicInfo = showConfig.basicGroup ? renderGroup(showConfig.basicGroup, true) : null;
13681
13936
  return /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
13682
13937
  className: common.cx_default(ShowContentWrapperStyle, className),
13938
+ style: {
13939
+ background: size === "small" ? "#fff" : void 0
13940
+ },
13683
13941
  children: [hideTopBar ? null : /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Space, {
13684
13942
  direction: "vertical",
13685
13943
  className: ShowContentHeaderStyle,
@@ -13708,9 +13966,9 @@ const CollapseTabs = (props) => {
13708
13966
  type: "link",
13709
13967
  onClick: () => setIsCollapsed((v) => !v),
13710
13968
  suffixIcon: isCollapsed ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, {
13711
- src: iconsReact.ArrowChevronUpSmall16BlueIcon
13712
- }) : /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, {
13713
13969
  src: iconsReact.ArrowChevronDownSmall16BlueIcon
13970
+ }) : /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, {
13971
+ src: iconsReact.ArrowChevronUpSmall16BlueIcon
13714
13972
  }),
13715
13973
  children: isCollapsed ? t2("dovetail.view_all_info") : t2("dovetail.collapse")
13716
13974
  })
@@ -14498,10 +14756,9 @@ const MemoizedFormField = React.memo(function FormField({
14498
14756
  control,
14499
14757
  name: fieldConfig.path.join("."),
14500
14758
  rules: {
14501
- async validate(value2) {
14759
+ async validate(value2, formValue) {
14502
14760
  if (fieldConfig.disabledWhenEdit && action === "edit")
14503
14761
  return true;
14504
- const formValue = watchedFormValues || getValues();
14505
14762
  if (!fieldConfig.validators || fieldConfig.validators.length === 0)
14506
14763
  return true;
14507
14764
  for (const func of fieldConfig.validators) {
@@ -14513,7 +14770,7 @@ const MemoizedFormField = React.memo(function FormField({
14513
14770
  }
14514
14771
  },
14515
14772
  render: ({ field, fieldState }) => {
14516
- var _a;
14773
+ var _a, _b;
14517
14774
  const currentFormValue = watchedFormValues || getValues();
14518
14775
  const renderProps = {
14519
14776
  field,
@@ -14536,7 +14793,7 @@ const MemoizedFormField = React.memo(function FormField({
14536
14793
  colon: false,
14537
14794
  labelCol: fieldConfig.layout === FormItemLayout.VERTICAL ? {} : { flex: `0 0 ${(formConfig == null ? void 0 : formConfig.labelWidth) || "216px"}` },
14538
14795
  help: fieldConfig.isHideErrorStatus ? "" : (_a = fieldState.error) == null ? void 0 : _a.message,
14539
- extra: fieldConfig.helperText,
14796
+ extra: ((_b = fieldState.error) == null ? void 0 : _b.message) === fieldConfig.helperText ? "" : fieldConfig.helperText,
14540
14797
  validateStatus: fieldState.invalid && !fieldConfig.isHideErrorStatus ? "error" : void 0,
14541
14798
  "data-test-id": fieldConfig.key,
14542
14799
  className: fieldConfig.layout === FormItemLayout.VERTICAL ? VerticalFormItemStyle : "",
@@ -17301,7 +17558,8 @@ function ResourceSelect(props) {
17301
17558
  namespace: namespace2,
17302
17559
  selectProps,
17303
17560
  value: value2,
17304
- onChange
17561
+ onChange,
17562
+ placeholder
17305
17563
  } = props;
17306
17564
  const { data: data2, isLoading, isError } = core.useList({
17307
17565
  resource,
@@ -17317,6 +17575,7 @@ function ResourceSelect(props) {
17317
17575
  eagle.Select,
17318
17576
  {
17319
17577
  className,
17578
+ placeholder,
17320
17579
  input: {
17321
17580
  value: value2,
17322
17581
  onChange
@@ -17328,7 +17587,7 @@ function ResourceSelect(props) {
17328
17587
  }
17329
17588
  );
17330
17589
  }
17331
- const SelectMatchLabelButton_1rnabop = "";
17590
+ const SelectMatchLabelButton_1uc76rw = "";
17332
17591
  const PopoverOverlayStyle = "p19yct45";
17333
17592
  const PopoverContentStyle = "p2255z4";
17334
17593
  const PopoverTitleStyle = "p16qejqa";
@@ -17344,12 +17603,16 @@ function ResourceMatchLabelSelector({
17344
17603
  value: value2,
17345
17604
  onChange
17346
17605
  }) {
17606
+ const {
17607
+ t: t2
17608
+ } = common.useTranslation();
17347
17609
  return /* @__PURE__ */ common.jsxRuntimeExports.jsx(ResourceSelect, {
17348
17610
  namespace: namespace2,
17349
17611
  resource,
17350
17612
  resourceBasePath,
17351
17613
  kind,
17352
17614
  value: value2,
17615
+ placeholder: t2("dovetail.select_workload"),
17353
17616
  onChange: (newValue, object2) => {
17354
17617
  var _a, _b;
17355
17618
  const resourceItem = object2.object;
@@ -17397,7 +17660,7 @@ function SelectMatchLabelButton(props) {
17397
17660
  children: [/* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
17398
17661
  className: PopoverContentBodyStyle,
17399
17662
  children: [/* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
17400
- className: common.cx_default(eagle.Typo.Display.d3_bold_title, PopoverTitleStyle),
17663
+ className: common.cx_default(eagle.Typo.Heading.h2_bold_title, PopoverTitleStyle),
17401
17664
  children: t2("dovetail.specify_workload")
17402
17665
  }), /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
17403
17666
  className: FormWrapperStyle,
@@ -17454,9 +17717,12 @@ function SelectMatchLabelButton(props) {
17454
17717
  children: [/* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Button, {
17455
17718
  onClick: () => setPopoverVisible(false),
17456
17719
  type: "quiet",
17720
+ size: "small",
17457
17721
  children: t2("dovetail.cancel")
17458
17722
  }), /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Button, {
17459
17723
  type: "primary",
17724
+ size: "small",
17725
+ disabled: !selectedResource,
17460
17726
  onClick: () => {
17461
17727
  onChange == null ? void 0 : onChange(selector);
17462
17728
  setPopoverVisible(false);
@@ -17514,8 +17780,7 @@ const MatchLabelSelector = React.forwardRef(function MatchLabelSelector2(props,
17514
17780
  onChange,
17515
17781
  isValueOptional: false,
17516
17782
  minSize: 1,
17517
- disabledChagneDefaultValues,
17518
- isHideLabelFormatPopover: true
17783
+ disabledChagneDefaultValues
17519
17784
  }
17520
17785
  );
17521
17786
  });
@@ -18352,7 +18617,7 @@ const PortsConfigForm = React.forwardRef(function PortsConfigForm2({ value: valu
18352
18617
  },
18353
18618
  {
18354
18619
  key: "name",
18355
- title: `${i18n2.t("dovetail.name")}${i18n2.t("dovetail.optional_with_bracket")}`,
18620
+ title: i18n2.t("dovetail.port_name"),
18356
18621
  type: "input",
18357
18622
  validator: ({ value: portName, rowIndex }) => {
18358
18623
  const { errorMessage } = validateRfc1123Name({
@@ -18547,9 +18812,8 @@ const IngressRulesComponent = ({ ingress }) => {
18547
18812
  });
18548
18813
  return /* @__PURE__ */ common.jsxRuntimeExports.jsx(common.jsxRuntimeExports.Fragment, { children: result });
18549
18814
  };
18550
- const columns_j8358c = "";
18551
- const DashedTitleStyle = "dh5j833";
18552
- const ServiceClusterTooltipStyle = "s1fcgan";
18815
+ const columns_gm9kgl = "";
18816
+ const ServiceClusterTooltipStyle = "sh5j833";
18553
18817
  const NameLink = (props) => {
18554
18818
  var _a;
18555
18819
  const {
@@ -18758,14 +19022,14 @@ const NodeNameColumnRenderer = (i18n2, options) => {
18758
19022
  ...options
18759
19023
  };
18760
19024
  };
18761
- const CompletionsCountColumnRenderer = (i18n2) => {
19025
+ const PodCountOfJobColumnRenderer = (i18n2) => {
18762
19026
  const dataIndex = ["succeeded"];
18763
19027
  return {
18764
19028
  key: "completions",
18765
19029
  display: true,
18766
19030
  dataIndex,
18767
19031
  title: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Tooltip, {
18768
- title: i18n2.t("dovetail.completion_num_tooltip"),
19032
+ title: i18n2.t("dovetail.job_pod_count_tooltip"),
18769
19033
  children: /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
18770
19034
  className: DashedTitleStyle,
18771
19035
  children: i18n2.t("dovetail.pod_num")
@@ -18777,7 +19041,7 @@ const CompletionsCountColumnRenderer = (i18n2) => {
18777
19041
  sorter: CommonSorter(dataIndex),
18778
19042
  render: (_, record) => {
18779
19043
  return /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
18780
- children: record.completionsDisplay
19044
+ children: record.podCountDisplay
18781
19045
  });
18782
19046
  }
18783
19047
  };
@@ -19525,7 +19789,6 @@ exports.CRONJOB_INIT_VALUE = CRONJOB_INIT_VALUE;
19525
19789
  exports.ClusterIpField = ClusterIpField;
19526
19790
  exports.ColumnKeys = ColumnKeys;
19527
19791
  exports.CommonSorter = CommonSorter;
19528
- exports.CompletionsCountColumnRenderer = CompletionsCountColumnRenderer;
19529
19792
  exports.ComponentContext = ComponentContext;
19530
19793
  exports.ConditionsField = ConditionsField;
19531
19794
  exports.ConditionsGroup = ConditionsGroup;
@@ -19540,8 +19803,8 @@ exports.DAEMONSET_INIT_VALUE = DAEMONSET_INIT_VALUE;
19540
19803
  exports.DEPLOYMENT_INIT_VALUE = DEPLOYMENT_INIT_VALUE;
19541
19804
  exports.DaemonSetModel = DaemonSetModel;
19542
19805
  exports.DataField = DataField;
19543
- exports.DataGroup = DataGroup;
19544
19806
  exports.DataKeysColumnRenderer = DataKeysColumnRenderer;
19807
+ exports.DataTab = DataTab;
19545
19808
  exports.DeleteButton = DeleteButton;
19546
19809
  exports.DeleteManyButton = DeleteManyButton;
19547
19810
  exports.DeploymentModel = DeploymentModel;
@@ -19578,7 +19841,7 @@ exports.IngressClassColumnRenderer = IngressClassColumnRenderer;
19578
19841
  exports.IngressDefaultBackendColumnRenderer = IngressDefaultBackendColumnRenderer;
19579
19842
  exports.IngressModel = IngressModel;
19580
19843
  exports.IngressRulesColumnRenderer = IngressRulesColumnRenderer;
19581
- exports.IngressRulesGroup = IngressRulesGroup;
19844
+ exports.IngressRulesTab = IngressRulesTab;
19582
19845
  exports.IngressRulesTableTabField = IngressRulesTableTabField;
19583
19846
  exports.IngressTlsColumnRenderer = IngressTlsColumnRenderer;
19584
19847
  exports.IsDefaultSCColumnRenderer = IsDefaultSCColumnRenderer;
@@ -19595,6 +19858,7 @@ exports.KeyValueListWidget = KeyValueListWidget;
19595
19858
  exports.KeyValueSecret = KeyValueSecret;
19596
19859
  exports.KeyValueTableForm = KeyValueTableForm;
19597
19860
  exports.LabelAnnotationsTab = LabelAnnotationsTab;
19861
+ exports.LabelsAndAnnotationsShow = LabelsAndAnnotationsShow;
19598
19862
  exports.LabelsField = LabelsField;
19599
19863
  exports.Layout = Layout;
19600
19864
  exports.ListPage = ListPage;
@@ -19656,6 +19920,8 @@ exports.PlainTextNameColumnRenderer = PlainTextNameColumnRenderer;
19656
19920
  exports.PodContainersGroup = PodContainersGroup;
19657
19921
  exports.PodContainersNumColumnRenderer = PodContainersNumColumnRenderer;
19658
19922
  exports.PodContainersTable = PodContainersTable;
19923
+ exports.PodCountOfJobColumnRenderer = PodCountOfJobColumnRenderer;
19924
+ exports.PodCountOfJobField = PodCountOfJobField;
19659
19925
  exports.PodDropdown = PodDropdown;
19660
19926
  exports.PodLog = PodLog;
19661
19927
  exports.PodLogTab = PodLogTab;
@@ -19671,6 +19937,7 @@ exports.PodsGroup = PodsGroup;
19671
19937
  exports.PortMappingColumnRenderer = PortMappingColumnRenderer;
19672
19938
  exports.PortsConfigForm = PortsConfigForm;
19673
19939
  exports.PortsGroup = PortsGroup;
19940
+ exports.PortsTab = PortsTab;
19674
19941
  exports.PortsTableField = PortsTableField;
19675
19942
  exports.ProviderPlugins = ProviderPlugins;
19676
19943
  exports.ProvisionerColumnRenderer = ProvisionerColumnRenderer;
@@ -19716,7 +19983,7 @@ exports.STATEFULSET_INIT_VALUE = STATEFULSET_INIT_VALUE;
19716
19983
  exports.STORAGE_CLASS_INIT_VALUE = STORAGE_CLASS_INIT_VALUE;
19717
19984
  exports.SchemaStrategy = SchemaStrategy;
19718
19985
  exports.SecretDataField = SecretDataField;
19719
- exports.SecretDataGroup = SecretDataGroup;
19986
+ exports.SecretDataTab = SecretDataTab;
19720
19987
  exports.SectionTitle = SectionTitle;
19721
19988
  exports.Separator = Separator;
19722
19989
  exports.ServiceInClusterAccessColumnRenderer = ServiceInClusterAccessColumnRenderer;