@dovetail-v2/refine 0.3.0 → 0.3.2

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.
Files changed (35) hide show
  1. package/dist/{MonacoYamlEditor-1ed09191.cjs → MonacoYamlEditor-bdd52136.cjs} +15 -7
  2. package/dist/{MonacoYamlEditor-74ecf0d5.js → MonacoYamlEditor-d09e7de9.js} +15 -7
  3. package/dist/components/Form/FormModal.d.ts +2 -0
  4. package/dist/components/Form/RefineFormContainer.d.ts +2 -1
  5. package/dist/components/Form/YamlForm.d.ts +2 -2
  6. package/dist/components/Form/YamlFormContainer.d.ts +3 -2
  7. package/dist/components/Form/type.d.ts +11 -1
  8. package/dist/components/KeyValueTableForm/index.d.ts +34 -0
  9. package/dist/components/ShowContent/ShowContent.d.ts +4 -16
  10. package/dist/components/ShowContent/ShowContentView.d.ts +21 -0
  11. package/dist/components/ShowContent/fields.d.ts +1 -0
  12. package/dist/components/ShowContent/index.d.ts +1 -0
  13. package/dist/components/YamlEditor/MonacoYamlEditor.d.ts +5 -5
  14. package/dist/components/YamlEditor/YamlEditorComponent.d.ts +9 -7
  15. package/dist/components/index.d.ts +1 -0
  16. package/dist/hooks/useEagleTable/columns.d.ts +1 -1
  17. package/dist/hooks/useOpenForm.d.ts +5 -2
  18. package/dist/i18n.d.ts +1 -0
  19. package/dist/{index-23ef5f69.js → index-3126e84d.js} +881 -586
  20. package/dist/{index-7c78ef6f.cjs → index-ec66ac8f.cjs} +770 -475
  21. package/dist/locales/zh-CN/index.d.ts +1 -0
  22. package/dist/models/deployment-model.d.ts +5 -1
  23. package/dist/models/index.d.ts +1 -1
  24. package/dist/models/replicaset-model.d.ts +17 -0
  25. package/dist/models/service-model.d.ts +4 -0
  26. package/dist/models/workload-model.d.ts +6 -0
  27. package/dist/refine.cjs +8 -1
  28. package/dist/refine.js +114 -107
  29. package/dist/style.css +171 -162
  30. package/dist/utils/file.d.ts +1 -0
  31. package/dist/utils/index.d.ts +1 -0
  32. package/dist/utils/match-selector.d.ts +2 -2
  33. package/dist/utils/validation.d.ts +5 -1
  34. package/package.json +1 -1
  35. package/dist/components/EditMetadataForm/KeyValueTableForm.d.ts +0 -16
@@ -1180,6 +1180,7 @@ const confirm = "确认";
1180
1180
  const cant_delete_resource = "无法删除{{resource}}";
1181
1181
  const cant_delete_resource_with_name = "无法删除{{resource}} <0>{{name}}</0> 。";
1182
1182
  const close = "关闭";
1183
+ const import_from_file = "从文件读取";
1183
1184
  const dovetail = {
1184
1185
  copy,
1185
1186
  reset_arguments,
@@ -1421,7 +1422,8 @@ const dovetail = {
1421
1422
  confirm,
1422
1423
  cant_delete_resource,
1423
1424
  cant_delete_resource_with_name,
1424
- close
1425
+ close,
1426
+ import_from_file
1425
1427
  };
1426
1428
  const ZH = {
1427
1429
  dovetail
@@ -9269,7 +9271,7 @@ var ResourceState = /* @__PURE__ */ ((ResourceState2) => {
9269
9271
  return ResourceState2;
9270
9272
  })(ResourceState || {});
9271
9273
  function matchSelector(pod2, selector, namespace2 = "default") {
9272
- var _a, _b, _c;
9274
+ var _a, _b, _c, _d;
9273
9275
  let match = true;
9274
9276
  if (selector) {
9275
9277
  for (const key2 in selector.matchLabels) {
@@ -9278,7 +9280,7 @@ function matchSelector(pod2, selector, namespace2 = "default") {
9278
9280
  }
9279
9281
  }
9280
9282
  }
9281
- return match && pod2.metadata.namespace === namespace2;
9283
+ return match && ((_d = pod2.metadata) == null ? void 0 : _d.namespace) === namespace2;
9282
9284
  }
9283
9285
  class WorkloadBaseModel extends ResourceModel {
9284
9286
  constructor(_rawYaml, _globalStore) {
@@ -9368,10 +9370,14 @@ class WorkloadModel extends WorkloadBaseModel {
9368
9370
  constructor(_rawYaml, _globalStore) {
9369
9371
  super(_rawYaml, _globalStore);
9370
9372
  __publicField(this, "restarts", 0);
9373
+ __publicField(this, "services", []);
9374
+ __publicField(this, "ingresses", []);
9371
9375
  this._rawYaml = _rawYaml;
9372
9376
  }
9373
9377
  async init() {
9374
9378
  await this.getRestarts();
9379
+ await this.getServices();
9380
+ await this.getIngresses();
9375
9381
  }
9376
9382
  async getRestarts() {
9377
9383
  const pods = await this._globalStore.get("pods", {
@@ -9387,6 +9393,29 @@ class WorkloadModel extends WorkloadBaseModel {
9387
9393
  const result = lodashExports.sumBy(myPods, "restarts");
9388
9394
  this.restarts = result;
9389
9395
  }
9396
+ async getServices() {
9397
+ const services = await this._globalStore.get("services", {
9398
+ resourceBasePath: "/api/v1",
9399
+ kind: "Service"
9400
+ });
9401
+ const myServices = services.items.filter(
9402
+ (p) => {
9403
+ var _a;
9404
+ return matchSelector(p, (_a = this.spec) == null ? void 0 : _a.selector, this.metadata.namespace);
9405
+ }
9406
+ );
9407
+ this.services = myServices;
9408
+ }
9409
+ async getIngresses() {
9410
+ const allIngresses = /* @__PURE__ */ new Map();
9411
+ for (const service of this.services) {
9412
+ for (const ingress of service.ingresses) {
9413
+ const key2 = `${ingress.namespace}-${ingress.name}`;
9414
+ allIngresses.set(key2, ingress);
9415
+ }
9416
+ }
9417
+ this.ingresses = Array.from(allIngresses.values());
9418
+ }
9390
9419
  get replicas() {
9391
9420
  return this.spec && "replicas" in this.spec ? this.spec.replicas : 0;
9392
9421
  }
@@ -9527,6 +9556,38 @@ class PodMetricsModel extends ResourceModel {
9527
9556
  };
9528
9557
  }
9529
9558
  }
9559
+ class ReplicaSetModel extends ResourceModel {
9560
+ constructor(_rawYaml, _globalStore) {
9561
+ super(_rawYaml, _globalStore);
9562
+ __publicField(this, "pods", []);
9563
+ __publicField(this, "restarts", 0);
9564
+ this._rawYaml = _rawYaml;
9565
+ }
9566
+ async init() {
9567
+ await this.getPods();
9568
+ }
9569
+ async getPods() {
9570
+ const pods = await this._globalStore.get("pods", {
9571
+ resourceBasePath: "/api/v1",
9572
+ kind: "Pod"
9573
+ });
9574
+ const myPods = pods.items.filter(
9575
+ (pod2) => {
9576
+ var _a;
9577
+ return matchSelector(pod2, (_a = this.spec) == null ? void 0 : _a.selector, this.metadata.namespace);
9578
+ }
9579
+ );
9580
+ this.pods = myPods;
9581
+ this.restarts = lodashExports.sumBy(this.pods, (pod2) => pod2.restarts || 0);
9582
+ }
9583
+ get ownerDeploymentName() {
9584
+ var _a;
9585
+ const ownerRef = (_a = this.metadata.ownerReferences) == null ? void 0 : _a.find(
9586
+ (ref) => ref.kind === "Deployment" && ref.apiVersion === "apps/v1"
9587
+ );
9588
+ return ownerRef == null ? void 0 : ownerRef.name;
9589
+ }
9590
+ }
9530
9591
  class CronJobModel extends WorkloadBaseModel {
9531
9592
  constructor(_rawYaml, _globalStore) {
9532
9593
  super(_rawYaml, _globalStore);
@@ -9569,8 +9630,27 @@ class EventModel extends ResourceModel {
9569
9630
  class DeploymentModel extends WorkloadModel {
9570
9631
  constructor(_rawYaml, _globalStore) {
9571
9632
  super(_rawYaml, _globalStore);
9633
+ __publicField(this, "replicaSets", []);
9572
9634
  this._rawYaml = _rawYaml;
9573
9635
  }
9636
+ async init() {
9637
+ await super.init();
9638
+ await this.getReplicaSets();
9639
+ }
9640
+ async getReplicaSets() {
9641
+ const replicaSets = await this._globalStore.get("replicasets", {
9642
+ resourceBasePath: "/apis/apps/v1",
9643
+ kind: "ReplicaSet"
9644
+ });
9645
+ const myReplicaSets = replicaSets.items.filter((rs) => {
9646
+ var _a, _b, _c;
9647
+ const ownerRef = (_b = (_a = rs.metadata) == null ? void 0 : _a.ownerReferences) == null ? void 0 : _b.find(
9648
+ (ref) => ref.kind === "Deployment" && ref.apiVersion === "apps/v1" && ref.name === this.name && ref.uid === this.metadata.uid
9649
+ );
9650
+ return !!ownerRef && ((_c = rs.metadata) == null ? void 0 : _c.namespace) === this.metadata.namespace;
9651
+ });
9652
+ this.replicaSets = myReplicaSets;
9653
+ }
9574
9654
  get stateDisplay() {
9575
9655
  var _a, _b, _c;
9576
9656
  if (((_a = this.spec) == null ? void 0 : _a.replicas) === 0) {
@@ -9626,8 +9706,25 @@ var ServiceTypeEnum = /* @__PURE__ */ ((ServiceTypeEnum2) => {
9626
9706
  class ServiceModel extends ResourceModel {
9627
9707
  constructor(_rawYaml, _globalStore) {
9628
9708
  super(_rawYaml, _globalStore);
9709
+ __publicField(this, "ingresses", []);
9629
9710
  this._rawYaml = _rawYaml;
9630
9711
  }
9712
+ async init() {
9713
+ await this.getIngresses();
9714
+ }
9715
+ async getIngresses() {
9716
+ const ingresses = await this._globalStore.get("ingresses", {
9717
+ resourceBasePath: "/apis/networking.k8s.io/v1",
9718
+ kind: "Ingress"
9719
+ });
9720
+ const myIngresses = ingresses.items.filter((ingress) => {
9721
+ const rules = ingress.getFlattenedRules([]);
9722
+ return rules.some(
9723
+ (rule2) => rule2.serviceName === this.name
9724
+ );
9725
+ });
9726
+ this.ingresses = myIngresses;
9727
+ }
9631
9728
  get displayType() {
9632
9729
  const spec = this._rawYaml.spec;
9633
9730
  const type2 = spec.type;
@@ -10193,29 +10290,38 @@ function getInitialValues(config) {
10193
10290
  spec: {}
10194
10291
  };
10195
10292
  }
10196
- function useOpenForm(options) {
10293
+ function useOpenForm() {
10197
10294
  const { resource } = core.useResource();
10198
10295
  const configs = React.useContext(ConfigsContext);
10199
10296
  const { edit: edit2 } = useEdit();
10200
10297
  const navigation = core.useNavigation();
10201
10298
  const pushModal = eagle.usePushModal();
10202
10299
  const go = core.useGo();
10203
- return function openForm(resourceName) {
10204
- var _a, _b;
10205
- const finalResourceName = resourceName || (resource == null ? void 0 : resource.name);
10300
+ return function openForm(options) {
10301
+ var _a;
10302
+ const finalResourceName = (options == null ? void 0 : options.resourceName) || (resource == null ? void 0 : resource.name);
10206
10303
  if (finalResourceName) {
10207
10304
  const config = configs[finalResourceName];
10208
10305
  const formType = (_a = config.formConfig) == null ? void 0 : _a.formContainerType;
10209
10306
  if (formType === void 0 || formType === FormContainerType.MODAL) {
10210
10307
  pushModal({
10211
- component: ((_b = config.formConfig) == null ? void 0 : _b.CustomFormModal) || FormModal,
10212
- props: {
10213
- resource: finalResourceName,
10214
- id: options == null ? void 0 : options.id,
10215
- formProps: {
10216
- initialValues: getInitialValues(config)
10217
- }
10218
- }
10308
+ component: () => {
10309
+ var _a2;
10310
+ const ModalComponent = ((_a2 = config.formConfig) == null ? void 0 : _a2.CustomFormModal) || FormModal;
10311
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
10312
+ ModalComponent,
10313
+ {
10314
+ resource: finalResourceName,
10315
+ id: options == null ? void 0 : options.id,
10316
+ yamlFormProps: {
10317
+ config,
10318
+ initialValuesForCreate: getInitialValues(config)
10319
+ },
10320
+ onSuccess: options == null ? void 0 : options.onSuccess
10321
+ }
10322
+ );
10323
+ },
10324
+ props: {}
10219
10325
  });
10220
10326
  } else if (options == null ? void 0 : options.id) {
10221
10327
  edit2(options.id);
@@ -10234,6 +10340,52 @@ function getResourceNameByKind(kind, configs) {
10234
10340
  var _a;
10235
10341
  return (_a = Object.values(configs).find((config) => config.kind === kind)) == null ? void 0 : _a.name;
10236
10342
  }
10343
+ function validateDnsSubdomain(subdomain) {
10344
+ const regex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-\_]*[a-zA-Z0-9]$)/;
10345
+ if (!regex.test(subdomain)) {
10346
+ return { isValid: false };
10347
+ }
10348
+ if (subdomain && subdomain.length > 63) {
10349
+ return { isValid: false };
10350
+ }
10351
+ return { isValid: true };
10352
+ }
10353
+ function validateLabelKey(key2) {
10354
+ const labelRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-\_]*[a-zA-Z0-9]$)/;
10355
+ let prefix2, name2;
10356
+ const splitResult = key2.split("/");
10357
+ if (splitResult.length === 1) {
10358
+ name2 = splitResult[0];
10359
+ } else {
10360
+ prefix2 = splitResult[0];
10361
+ name2 = splitResult[1];
10362
+ }
10363
+ if (prefix2 === "") {
10364
+ return { isValid: false };
10365
+ }
10366
+ if (prefix2 && !labelRegex.test(prefix2)) {
10367
+ return { isValid: false };
10368
+ }
10369
+ if (prefix2 && prefix2.length > 253) {
10370
+ return { isValid: false };
10371
+ }
10372
+ return validateDnsSubdomain(name2);
10373
+ }
10374
+ function validateLabelValue(value2, isOptional) {
10375
+ const labelValueRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-\_]*[a-zA-Z0-9]$)/;
10376
+ if (isOptional && value2 === "") {
10377
+ return { isValid: true };
10378
+ } else if (value2 === "") {
10379
+ return { isValid: false };
10380
+ }
10381
+ if (value2.length > 63) {
10382
+ return { isValid: false };
10383
+ }
10384
+ if (!labelValueRegex.test(value2)) {
10385
+ return { isValid: false };
10386
+ }
10387
+ return { isValid: true };
10388
+ }
10237
10389
  function K8sDropdown(props) {
10238
10390
  var _a;
10239
10391
  const { record, size = "normal" } = props;
@@ -10245,7 +10397,7 @@ function K8sDropdown(props) {
10245
10397
  const { t: t2 } = common.useTranslation();
10246
10398
  const { openDeleteConfirmModal } = useDeleteModal({ resourceName: resourceName || "" });
10247
10399
  const download2 = useDownloadYAML();
10248
- const openForm = useOpenForm({ id: record.id });
10400
+ const openForm = useOpenForm();
10249
10401
  const isInShowPage = useResourceResult.action === "show";
10250
10402
  const { data: canEditData } = core.useCan({
10251
10403
  resource: resourceName,
@@ -10266,7 +10418,7 @@ function K8sDropdown(props) {
10266
10418
  eagle.Dropdown,
10267
10419
  {
10268
10420
  overlay: /* @__PURE__ */ common.jsxRuntimeExports.jsxs(eagle.Menu, { children: [
10269
- isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false || config.hideEdit ? null : /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Menu.Item, { onClick: () => openForm(), children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, { src: iconsReact.EditPen16PrimaryIcon, children: formType === FormType.FORM ? t2("dovetail.edit") : t2("dovetail.edit_yaml") }) }),
10421
+ isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false || config.hideEdit ? null : /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Menu.Item, { onClick: () => openForm({ id: record.id }), children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, { src: iconsReact.EditPen16PrimaryIcon, children: formType === FormType.FORM ? t2("dovetail.edit") : t2("dovetail.edit_yaml") }) }),
10270
10422
  /* @__PURE__ */ common.jsxRuntimeExports.jsx(
10271
10423
  eagle.Menu.Item,
10272
10424
  {
@@ -10940,273 +11092,9 @@ function KeyValueAnnotation(props) {
10940
11092
  }) : null]
10941
11093
  });
10942
11094
  }
10943
- function Tabs(props) {
10944
- const { tabs, className } = props;
10945
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Tabs, { className, children: tabs.map((tab) => {
10946
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.TabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
10947
- }) });
10948
- }
10949
- const StateTag = (props) => {
10950
- const {
10951
- state: state2 = ResourceState.UPDATING,
10952
- hideBackground,
10953
- className,
10954
- customResourceStateMap
10955
- } = props;
10956
- const { t: t2 } = common.useTranslation();
10957
- const defaultStateMap = {
10958
- [ResourceState.UPDATING]: "loading",
10959
- [ResourceState.READY]: "green",
10960
- [ResourceState.COMPLETED]: "gray",
10961
- [ResourceState.FAILED]: "red",
10962
- [ResourceState.SUSPENDED]: "warning",
10963
- [ResourceState.RUNNING]: "green",
10964
- [ResourceState.SUCCEEDED]: "blue",
10965
- [ResourceState.UNKNOWN]: "gray",
10966
- [ResourceState.TERMINATING]: "loading",
10967
- [ResourceState.PENDING]: "warning",
10968
- [ResourceState.WAITING]: "warning",
10969
- [ResourceState.TERMINATED]: "gray",
10970
- [ResourceState.STOPPED]: "gray",
10971
- [ResourceState.AVAILABLE]: "blue",
10972
- [ResourceState.BOUND]: "green",
10973
- [ResourceState.RELEASED]: "gray",
10974
- [ResourceState.LOST]: "red",
10975
- [ResourceState.ACTIVE]: "green",
10976
- [ResourceState.DELETING]: "loading"
10977
- };
10978
- const finalColorMap = (customResourceStateMap == null ? void 0 : customResourceStateMap.color) || defaultStateMap;
10979
- const finalTextMap = customResourceStateMap == null ? void 0 : customResourceStateMap.text;
10980
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
10981
- eagle.StatusCapsule,
10982
- {
10983
- className: common.cx_default(className, StateTagStyle, hideBackground && "no-background"),
10984
- color: finalColorMap[state2] !== "loading" ? finalColorMap[state2] : void 0,
10985
- loading: finalColorMap[state2] === "loading",
10986
- children: finalTextMap ? finalTextMap[state2] : t2(`dovetail.${state2 || "updating"}_state`)
10987
- }
10988
- );
10989
- };
10990
- const ShowContent_1g0ejph = "";
10991
- const ShowContentWrapperStyle = "s9agep2";
10992
- const BackButton = "bo89gfi";
10993
- const ToolBarWrapper = "t1ohe42f";
10994
- const NameStyle = "nqm4qz0";
10995
- const TopBarStyle = "ticl0qc";
10996
- const ShowContentHeaderStyle = "so9uwk1";
10997
- const GroupStyle$1 = "ge26ou0";
10998
- const GroupTitleStyle = "g17f8vl9";
10999
- const FullTabContentStyle = "fykgn2i";
11000
- const FieldWrapperStyle = "fngr745";
11001
- const TabContentStyle = "t11wg61l";
11002
- const ValueStyle$1 = "v1x3rivf";
11003
- const TabsStyle = "tf5s6s";
11004
- function ShowGroupComponent(props) {
11005
- const {
11006
- title,
11007
- className,
11008
- children,
11009
- operationEle
11010
- } = props;
11011
- return /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
11012
- className: common.cx_default(GroupStyle$1, className),
11013
- children: [/* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
11014
- className: common.cx_default(eagle.Typo.Heading.h2_bold_title, GroupTitleStyle),
11015
- children: [/* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
11016
- children: title
11017
- }), operationEle]
11018
- }), children]
11019
- });
11020
- }
11021
- const ShowContent = (props) => {
11022
- var _a, _b, _c, _d, _e, _f;
11023
- const {
11024
- showConfig,
11025
- formatter,
11026
- Dropdown = K8sDropdown
11027
- } = props;
11028
- const parsed = core.useParsed();
11029
- const {
11030
- resource
11031
- } = core.useResource();
11032
- const id = (_a = parsed == null ? void 0 : parsed.params) == null ? void 0 : _a.id;
11033
- const {
11034
- queryResult
11035
- } = core.useShow({
11036
- id,
11037
- errorNotification: false
11038
- });
11039
- const {
11040
- t: t2
11041
- } = common.useTranslation();
11042
- const {
11043
- data: data2
11044
- } = queryResult;
11045
- const navigation = core.useNavigation();
11046
- const go = core.useGo();
11047
- const openForm = useOpenForm({
11048
- id
11049
- });
11050
- const Component = React.useContext(ComponentContext);
11051
- const configs = React.useContext(ConfigsContext);
11052
- const config = configs[(resource == null ? void 0 : resource.name) || ""];
11053
- const Tabs$1 = Component.Tabs || Tabs;
11054
- if (!(data2 == null ? void 0 : data2.data)) {
11055
- return null;
11056
- }
11057
- const model = data2.data;
11058
- const record = formatter ? formatter(model) : data2 == null ? void 0 : data2.data;
11059
- function renderFields(fields, areaType, hasCol = true) {
11060
- if (!record)
11061
- return null;
11062
- return fields.map((field) => {
11063
- if (field.hidden)
11064
- return null;
11065
- let content;
11066
- const value2 = lodashEs.get(record, field.path);
11067
- if (field.renderContent) {
11068
- content = field.renderContent(value2, record, field);
11069
- } else {
11070
- content = lodashEs.get(record, field.path);
11071
- }
11072
- return hasCol ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Col, {
11073
- flex: areaType === AreaType.Inline ? "none" : "",
11074
- span: field.col || 24,
11075
- children: field.render ? field.render(value2, record, field) : /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
11076
- className: FieldWrapperStyle,
11077
- children: [field.title && /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
11078
- className: eagle.Typo.Label.l4_regular_title,
11079
- style: {
11080
- width: field.labelWidth || "165px",
11081
- marginRight: 8,
11082
- flexShrink: 0,
11083
- color: "#2C385299"
11084
- },
11085
- children: field.title
11086
- }), /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
11087
- style: {
11088
- flex: 1,
11089
- minWidth: 0
11090
- },
11091
- children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(ValueDisplay, {
11092
- className: common.cx_default(eagle.Typo.Label.l4_regular_title, ValueStyle$1),
11093
- value: content,
11094
- useOverflow: false
11095
- })
11096
- })]
11097
- })
11098
- }, field.key) : /* @__PURE__ */ common.jsxRuntimeExports.jsx(ValueDisplay, {
11099
- style: {
11100
- height: "100%"
11101
- },
11102
- value: content,
11103
- useOverflow: false
11104
- });
11105
- });
11106
- }
11107
- const stateDisplay = lodashEs.get(record, "stateDisplay");
11108
- const topBar = /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
11109
- className: ToolBarWrapper,
11110
- children: [/* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
11111
- className: common.cx_default(eagle.Typo.Label.l4_bold, BackButton),
11112
- onClick: () => {
11113
- go({
11114
- to: navigation.listUrl((resource == null ? void 0 : resource.name) || "")
11115
- });
11116
- },
11117
- children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, {
11118
- src: iconsReact.ArrowChevronLeft16BoldTertiaryIcon,
11119
- hoverSrc: iconsReact.ArrowChevronLeftSmall16BoldBlueIcon,
11120
- style: {
11121
- marginRight: 4
11122
- },
11123
- children: /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
11124
- className: "button-text",
11125
- children: (config == null ? void 0 : config.displayName) || ((_b = resource == null ? void 0 : resource.meta) == null ? void 0 : _b.kind)
11126
- })
11127
- })
11128
- }), /* @__PURE__ */ common.jsxRuntimeExports.jsxs(eagle.Space, {
11129
- className: TopBarStyle,
11130
- children: [/* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
11131
- style: {
11132
- display: "flex"
11133
- },
11134
- children: [/* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
11135
- className: common.cx_default(eagle.Typo.Display.d2_regular_title, NameStyle),
11136
- children: ((_c = showConfig.displayName) == null ? void 0 : _c.call(showConfig, record)) || ((_d = record == null ? void 0 : record.metadata) == null ? void 0 : _d.name)
11137
- }), stateDisplay ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(StateTag, {
11138
- state: stateDisplay,
11139
- customResourceStateMap: showConfig.resourceStateMap
11140
- }) : void 0]
11141
- }), /* @__PURE__ */ common.jsxRuntimeExports.jsxs(eagle.Space, {
11142
- children: [(_e = showConfig.renderExtraButton) == null ? void 0 : _e.call(showConfig, record), !config.hideEdit ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(core.CanAccess, {
11143
- resource: resource == null ? void 0 : resource.name,
11144
- action: AccessControlAuth.Edit,
11145
- params: {
11146
- namespace: record.namespace
11147
- },
11148
- children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Button, {
11149
- style: {
11150
- marginRight: 8
11151
- },
11152
- onClick: () => openForm(),
11153
- children: ((_f = config.formConfig) == null ? void 0 : _f.formType) === FormType.FORM ? t2("dovetail.edit") : t2("dovetail.edit_yaml")
11154
- })
11155
- }) : null, /* @__PURE__ */ common.jsxRuntimeExports.jsx(Dropdown, {
11156
- record,
11157
- size: "large"
11158
- })]
11159
- })]
11160
- })]
11161
- });
11162
- const tabs = /* @__PURE__ */ common.jsxRuntimeExports.jsx(Tabs$1, {
11163
- tabs: (showConfig.tabs || []).map((tab, tabIndex) => {
11164
- var _a2;
11165
- return {
11166
- title: tab.title,
11167
- key: tab.key,
11168
- children: /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
11169
- className: common.cx_default(TabContentStyle, tab.groups.length <= 1 && tabIndex !== 0 && FullTabContentStyle),
11170
- children: (_a2 = tab.groups) == null ? void 0 : _a2.map((group) => {
11171
- const GroupContainer = group.title ? ShowGroupComponent : React.Fragment;
11172
- const FieldContainer = group.title ? eagle.Row : React.Fragment;
11173
- const groupContainerProps = group.title ? {
11174
- title: group.title || ""
11175
- } : {};
11176
- const fieldContainerProps = group.title ? {
11177
- gutter: [24, 8]
11178
- } : {};
11179
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(GroupContainer, {
11180
- ...groupContainerProps,
11181
- children: group.areas.map((area, index2) => /* @__PURE__ */ common.jsxRuntimeExports.jsxs(common.jsxRuntimeExports.Fragment, {
11182
- children: [/* @__PURE__ */ common.jsxRuntimeExports.jsx(FieldContainer, {
11183
- ...fieldContainerProps,
11184
- children: renderFields(area.fields, area.type, !!group.title)
11185
- }, index2), index2 !== group.areas.length - 1 ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Divider, {
11186
- style: {
11187
- margin: "8px 0 12px 0"
11188
- }
11189
- }) : null]
11190
- }))
11191
- }, group.title);
11192
- })
11193
- })
11194
- };
11195
- }),
11196
- className: TabsStyle
11197
- });
11198
- return /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
11199
- className: ShowContentWrapperStyle,
11200
- children: [/* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Space, {
11201
- direction: "vertical",
11202
- className: ShowContentHeaderStyle,
11203
- children: topBar
11204
- }), tabs]
11205
- });
11206
- };
11207
11095
  const KeyValueSecret_c3ji18 = "";
11208
11096
  const ButtonStyle = "b11tbgf7";
11209
- const GroupStyle = "gtbyh5g";
11097
+ const GroupStyle$1 = "gtbyh5g";
11210
11098
  function KeyValueSecret(props) {
11211
11099
  const {
11212
11100
  data: data2 = {}
@@ -11228,7 +11116,7 @@ function KeyValueSecret(props) {
11228
11116
  return /* @__PURE__ */ common.jsxRuntimeExports.jsx(ShowGroupComponent, {
11229
11117
  title: i18n2.t("dovetail.data"),
11230
11118
  operationEle: toggleButton,
11231
- className: GroupStyle,
11119
+ className: GroupStyle$1,
11232
11120
  children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(KeyValue, {
11233
11121
  data: data2,
11234
11122
  hideSecret,
@@ -11238,45 +11126,36 @@ function KeyValueSecret(props) {
11238
11126
  })
11239
11127
  });
11240
11128
  }
11241
- function validateLabelKey(key2) {
11242
- const labelRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-\_]*[a-zA-Z0-9]$)/;
11243
- let prefix2, name2;
11244
- const splitResult = key2.split("/");
11245
- if (splitResult.length === 1) {
11246
- name2 = splitResult[0];
11247
- } else {
11248
- prefix2 = splitResult[0];
11249
- name2 = splitResult[1];
11250
- }
11251
- if (prefix2 === "") {
11252
- return { isValid: false, errorMessage: "EMPTY_PREFIX" };
11253
- }
11254
- if (prefix2 && !labelRegex.test(prefix2)) {
11255
- return { isValid: false, errorMessage: "INVALID_PREFIX" };
11256
- }
11257
- if (!labelRegex.test(name2)) {
11258
- return { isValid: false, errorMessage: "INVALID_NAME" };
11259
- }
11260
- if (prefix2 && prefix2.length > 253) {
11261
- return { isValid: false, errorMessage: "MAX_253" };
11262
- }
11263
- if (name2 && name2.length > 63) {
11264
- return { isValid: false, errorMessage: "MAX_63" };
11129
+ function isUtf8(buffer) {
11130
+ try {
11131
+ const decoder = new TextDecoder("utf-8", { fatal: true });
11132
+ decoder.decode(buffer);
11133
+ return true;
11134
+ } catch (e2) {
11135
+ return false;
11265
11136
  }
11266
- return { isValid: true };
11267
11137
  }
11268
- function validateLabelValue(value2) {
11269
- const labelValueRegex = /(^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9\.\-\_]*[a-zA-Z0-9]$)/;
11270
- if (value2 === "") {
11271
- return { isValid: true };
11272
- }
11273
- if (value2.length > 63) {
11274
- return { isValid: false, errorMessage: "MAX_63" };
11275
- }
11276
- if (!labelValueRegex.test(value2)) {
11277
- return { isValid: false, errorMessage: "INVALID_VALUE" };
11278
- }
11279
- return { isValid: true };
11138
+ function readFileAsBase64(file) {
11139
+ return new Promise((resolve, reject) => {
11140
+ const reader = new FileReader();
11141
+ reader.onload = async () => {
11142
+ const arrayBuffer = reader.result;
11143
+ if (arrayBuffer instanceof ArrayBuffer) {
11144
+ if (isUtf8(arrayBuffer)) {
11145
+ resolve(await file.text());
11146
+ } else {
11147
+ const base64String = btoa(
11148
+ String.fromCharCode(...new Uint8Array(arrayBuffer))
11149
+ );
11150
+ resolve(base64String);
11151
+ }
11152
+ return;
11153
+ }
11154
+ reject(new Error("Failed to read file"));
11155
+ };
11156
+ reader.onerror = reject;
11157
+ reader.readAsArrayBuffer(file);
11158
+ });
11280
11159
  }
11281
11160
  const LabelFormatPopover_piveun = "";
11282
11161
  const PodLabelFormatRulePopoverStyle = "p5jt6nm";
@@ -11364,59 +11243,86 @@ const LabelFormatPopover = ({
11364
11243
  })
11365
11244
  });
11366
11245
  };
11367
- const KeyValueTableForm_1eydq7y = "";
11368
- function _KeyValueTableFormForm(props, ref) {
11246
+ const index_t3zi07 = "";
11247
+ function _KeyValueTableForm(props, ref) {
11369
11248
  const {
11249
+ value: value2,
11370
11250
  defaultValue,
11371
- onSubmit,
11251
+ onChange,
11372
11252
  extraColumns,
11373
11253
  addButtonText,
11374
- noValueValidation
11254
+ noValueValidation,
11255
+ isHideLabelFormatPopover,
11256
+ isValueOptional = true,
11257
+ canImportFromFile,
11258
+ minSize,
11259
+ validateKey,
11260
+ validateValue,
11261
+ onSubmit
11375
11262
  } = props;
11376
11263
  const {
11377
11264
  t: t2
11378
11265
  } = common.useTranslation();
11379
- const [value2, setValue] = React.useState([]);
11380
11266
  const tableFormRef = React.useRef(null);
11267
+ const [_value, _setValue] = React.useState(value2 || defaultValue);
11268
+ const [forceUpdateCount, setForceUpdateCount] = React.useState(0);
11269
+ const validate = React.useCallback(() => {
11270
+ return new Promise((resolve) => {
11271
+ var _a;
11272
+ (_a = tableFormRef.current) == null ? void 0 : _a.validateWholeFields();
11273
+ setForceUpdateCount(forceUpdateCount + 1);
11274
+ setTimeout(() => {
11275
+ var _a2;
11276
+ const isValid = (_a2 = tableFormRef.current) == null ? void 0 : _a2.isValid();
11277
+ resolve(isValid || false);
11278
+ }, 0);
11279
+ });
11280
+ }, [forceUpdateCount]);
11381
11281
  React.useImperativeHandle(ref, () => ({
11382
- submit: () => {
11383
- return new Promise((res, rej) => {
11384
- var _a;
11385
- (_a = tableFormRef.current) == null ? void 0 : _a.validateWholeFields();
11386
- setTimeout(() => {
11387
- var _a2;
11388
- const isValid = (_a2 = tableFormRef.current) == null ? void 0 : _a2.isValid();
11389
- if (isValid) {
11390
- res(onSubmit(value2));
11391
- } else {
11392
- rej();
11393
- }
11394
- }, 0);
11395
- });
11282
+ validate,
11283
+ submit: async () => {
11284
+ const isValid = await validate();
11285
+ if (isValid) {
11286
+ return onSubmit == null ? void 0 : onSubmit(_value);
11287
+ }
11288
+ return Promise.reject();
11289
+ },
11290
+ setValue: (value22) => {
11291
+ var _a;
11292
+ _setValue(value22);
11293
+ (_a = tableFormRef.current) == null ? void 0 : _a.setData(value22);
11396
11294
  }
11397
- }), [onSubmit, value2]);
11295
+ }), [validate, onSubmit, _value]);
11296
+ React.useEffect(() => {
11297
+ var _a;
11298
+ if (value2 && !lodashEs.isEqual(value2, _value)) {
11299
+ _setValue(value2);
11300
+ (_a = tableFormRef.current) == null ? void 0 : _a.setData(value2);
11301
+ }
11302
+ }, [value2]);
11398
11303
  const renderTextAreaFunc = ({
11399
11304
  value: value22,
11400
- onChange
11305
+ onChange: onChange2
11401
11306
  }) => {
11402
11307
  return /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.TextArea, {
11403
11308
  autoSize: true,
11404
- className: "clsjtk2",
11309
+ className: "c17gq8cd",
11405
11310
  size: "small",
11406
11311
  value: value22,
11407
11312
  onChange: (e2) => {
11408
- onChange(e2.target.value);
11313
+ onChange2(e2.target.value);
11409
11314
  }
11410
11315
  });
11411
11316
  };
11412
11317
  return /* @__PURE__ */ common.jsxRuntimeExports.jsxs(eagle.Space, {
11413
11318
  size: 8,
11414
11319
  direction: "vertical",
11415
- className: "cq3mbby",
11320
+ className: "c1n7fiws",
11416
11321
  children: [/* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.TableForm, {
11417
11322
  ref: tableFormRef,
11418
- onBodyChange: (value22) => {
11419
- setValue(value22);
11323
+ onBodyChange: (newValue) => {
11324
+ _setValue(newValue);
11325
+ onChange == null ? void 0 : onChange(newValue);
11420
11326
  },
11421
11327
  columns: [{
11422
11328
  key: "key",
@@ -11427,46 +11333,72 @@ function _KeyValueTableFormForm(props, ref) {
11427
11333
  }) => {
11428
11334
  if (!value22)
11429
11335
  return t2("dovetail.key_empty_text");
11336
+ const validate2 = validateKey || validateLabelKey;
11430
11337
  const {
11431
- isValid
11432
- } = validateLabelKey(value22 || "");
11338
+ isValid,
11339
+ errorMessage
11340
+ } = validate2(value22 || "");
11433
11341
  if (!isValid)
11434
- return t2("dovetail.format_error");
11342
+ return errorMessage || t2("dovetail.format_error");
11435
11343
  },
11436
11344
  render: renderTextAreaFunc
11437
11345
  }, {
11438
11346
  key: "value",
11439
- title: t2("dovetail.value_optional"),
11347
+ title: isValueOptional ? t2("dovetail.value_optional") : t2("dovetail.value"),
11440
11348
  type: "input",
11441
11349
  validator: ({
11442
11350
  value: value22
11443
11351
  }) => {
11444
11352
  if (noValueValidation)
11445
11353
  return;
11354
+ const validate2 = validateValue || validateLabelValue;
11446
11355
  const {
11447
- isValid
11448
- } = validateLabelValue(value22 || "");
11356
+ isValid,
11357
+ errorMessage
11358
+ } = validate2(value22 || "", isValueOptional);
11449
11359
  if (!isValid)
11450
- return t2("dovetail.format_error");
11360
+ return errorMessage || t2("dovetail.format_error");
11451
11361
  },
11452
11362
  render: renderTextAreaFunc
11453
11363
  }, ...extraColumns || []],
11454
- disableBatchFilling: true,
11455
- hideEmptyTable: true,
11456
11364
  rowAddConfig: {
11457
11365
  addible: true,
11458
11366
  text: () => addButtonText
11459
11367
  },
11460
11368
  defaultData: defaultValue,
11461
11369
  row: {
11462
- deletable: true
11463
- }
11464
- }), /* @__PURE__ */ common.jsxRuntimeExports.jsx(LabelFormatPopover, {
11370
+ deletable: _value.length > (minSize || 0)
11371
+ },
11372
+ disableBatchFilling: true,
11373
+ hideEmptyTable: true
11374
+ }), isHideLabelFormatPopover ? null : /* @__PURE__ */ common.jsxRuntimeExports.jsx(LabelFormatPopover, {
11465
11375
  noValueValidation
11466
- })]
11376
+ }), canImportFromFile ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Upload, {
11377
+ multiple: false,
11378
+ showUploadList: false,
11379
+ onChange: async (e2) => {
11380
+ var _a;
11381
+ const fileValue = {
11382
+ key: e2.file.name,
11383
+ value: await readFileAsBase64(e2.file.originFileObj)
11384
+ };
11385
+ let newValue = [..._value, fileValue];
11386
+ if (_value.some((v) => v.key === fileValue.key)) {
11387
+ newValue = _value.map((v) => v.key === fileValue.key ? fileValue : v);
11388
+ }
11389
+ _setValue(newValue);
11390
+ (_a = tableFormRef.current) == null ? void 0 : _a.setData(newValue);
11391
+ onChange == null ? void 0 : onChange(newValue);
11392
+ },
11393
+ children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Button, {
11394
+ type: "link",
11395
+ size: "small",
11396
+ children: t2("dovetail.import_from_file")
11397
+ })
11398
+ }) : null]
11467
11399
  });
11468
11400
  }
11469
- const KeyValueTableFormForm = React.forwardRef(_KeyValueTableFormForm);
11401
+ const KeyValueTableForm = React.forwardRef(_KeyValueTableForm);
11470
11402
  const EditNodeTaintForm_cgov7z = "";
11471
11403
  const UlStyle = "u19jcs7t";
11472
11404
  const EditNodeTaintForm = React.forwardRef(function EditNodeTaintForm2(props, ref) {
@@ -11479,6 +11411,7 @@ const EditNodeTaintForm = React.forwardRef(function EditNodeTaintForm2(props, re
11479
11411
  const {
11480
11412
  t: t2
11481
11413
  } = common.useTranslation();
11414
+ const tableFormRef = React.useRef(null);
11482
11415
  const defaultValue = React.useMemo(() => {
11483
11416
  var _a;
11484
11417
  return ((_a = nodeModel._rawYaml.spec) == null ? void 0 : _a.taints) || [];
@@ -11514,8 +11447,14 @@ const EditNodeTaintForm = React.forwardRef(function EditNodeTaintForm2(props, re
11514
11447
  errorNotification: false
11515
11448
  });
11516
11449
  }, [nodeModel, mutateAsync, t2]);
11517
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(KeyValueTableFormForm, {
11518
- ref,
11450
+ React.useImperativeHandle(ref, () => ({
11451
+ submit: () => {
11452
+ var _a;
11453
+ return (_a = tableFormRef.current) == null ? void 0 : _a.submit();
11454
+ }
11455
+ }), []);
11456
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(KeyValueTableForm, {
11457
+ ref: tableFormRef,
11519
11458
  defaultValue,
11520
11459
  onSubmit,
11521
11460
  addButtonText: t2("dovetail.add_taint"),
@@ -11768,6 +11707,47 @@ function ResourceTable(props) {
11768
11707
  }
11769
11708
  );
11770
11709
  }
11710
+ const StateTag = (props) => {
11711
+ const {
11712
+ state: state2 = ResourceState.UPDATING,
11713
+ hideBackground,
11714
+ className,
11715
+ customResourceStateMap
11716
+ } = props;
11717
+ const { t: t2 } = common.useTranslation();
11718
+ const defaultStateMap = {
11719
+ [ResourceState.UPDATING]: "loading",
11720
+ [ResourceState.READY]: "green",
11721
+ [ResourceState.COMPLETED]: "gray",
11722
+ [ResourceState.FAILED]: "red",
11723
+ [ResourceState.SUSPENDED]: "warning",
11724
+ [ResourceState.RUNNING]: "green",
11725
+ [ResourceState.SUCCEEDED]: "blue",
11726
+ [ResourceState.UNKNOWN]: "gray",
11727
+ [ResourceState.TERMINATING]: "loading",
11728
+ [ResourceState.PENDING]: "warning",
11729
+ [ResourceState.WAITING]: "warning",
11730
+ [ResourceState.TERMINATED]: "gray",
11731
+ [ResourceState.STOPPED]: "gray",
11732
+ [ResourceState.AVAILABLE]: "blue",
11733
+ [ResourceState.BOUND]: "green",
11734
+ [ResourceState.RELEASED]: "gray",
11735
+ [ResourceState.LOST]: "red",
11736
+ [ResourceState.ACTIVE]: "green",
11737
+ [ResourceState.DELETING]: "loading"
11738
+ };
11739
+ const finalColorMap = (customResourceStateMap == null ? void 0 : customResourceStateMap.color) || defaultStateMap;
11740
+ const finalTextMap = customResourceStateMap == null ? void 0 : customResourceStateMap.text;
11741
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
11742
+ eagle.StatusCapsule,
11743
+ {
11744
+ className: common.cx_default(className, StateTagStyle, hideBackground && "no-background"),
11745
+ color: finalColorMap[state2] !== "loading" ? finalColorMap[state2] : void 0,
11746
+ loading: finalColorMap[state2] === "loading",
11747
+ children: finalTextMap ? finalTextMap[state2] : t2(`dovetail.${state2 || "updating"}_state`)
11748
+ }
11749
+ );
11750
+ };
11771
11751
  const WorkloadPodsTable_975j2t = "";
11772
11752
  const WorkloadPodsTable = ({
11773
11753
  namespace: namespace2,
@@ -11849,7 +11829,7 @@ const ReadyValueStyle = "r1bm8olw";
11849
11829
  const ReplicasValueStyle = "r1oqudbh";
11850
11830
  const ContentWrapperStyle = "c18i6jtg";
11851
11831
  const LabelStyle = "lpm22il";
11852
- const ValueStyle = "v1ixr1me";
11832
+ const ValueStyle$1 = "v1ixr1me";
11853
11833
  const WorkloadReplicasForm = React.forwardRef(function WorkloadReplicasForm2(props, ref) {
11854
11834
  const {
11855
11835
  defaultValue,
@@ -11979,7 +11959,7 @@ function WorkloadReplicas({
11979
11959
  className: common.cx_default(LabelStyle, eagle.Typo.Label.l3_regular),
11980
11960
  children: record.kind === "Job" ? t2("dovetail.pod_complete_num") : t2("dovetail.pod_ready_num")
11981
11961
  }), /* @__PURE__ */ common.jsxRuntimeExports.jsx("td", {
11982
- className: common.cx_default(ValueStyle, eagle.Typo.Label.l3_regular),
11962
+ className: common.cx_default(ValueStyle$1, eagle.Typo.Label.l3_regular),
11983
11963
  children: readyReplicas
11984
11964
  })]
11985
11965
  }), /* @__PURE__ */ common.jsxRuntimeExports.jsxs("tr", {
@@ -11987,7 +11967,7 @@ function WorkloadReplicas({
11987
11967
  className: common.cx_default(LabelStyle, eagle.Typo.Label.l3_regular),
11988
11968
  children: t2("dovetail.pod_replicas_num")
11989
11969
  }), /* @__PURE__ */ common.jsxRuntimeExports.jsx("td", {
11990
- className: common.cx_default(ValueStyle, eagle.Typo.Label.l3_regular),
11970
+ className: common.cx_default(ValueStyle$1, eagle.Typo.Label.l3_regular),
11991
11971
  children: replicas
11992
11972
  }), /* @__PURE__ */ common.jsxRuntimeExports.jsx("td", {
11993
11973
  children: editable && canScale && /* @__PURE__ */ common.jsxRuntimeExports.jsx(EditField, {
@@ -12018,6 +11998,7 @@ var AreaType = /* @__PURE__ */ ((AreaType2) => {
12018
11998
  const ImageField = (i18n2) => {
12019
11999
  return {
12020
12000
  key: "Image",
12001
+ col: 12,
12021
12002
  title: i18n2.t("dovetail.image"),
12022
12003
  path: ["imageNames"],
12023
12004
  renderContent(value2) {
@@ -12124,6 +12105,7 @@ const SecretDataField = () => {
12124
12105
  const StartTimeField = (i18n2) => {
12125
12106
  return {
12126
12107
  key: "started",
12108
+ col: 12,
12127
12109
  title: i18n2.t("dovetail.started"),
12128
12110
  path: ["status", "startTime"],
12129
12111
  renderContent(value2) {
@@ -12134,6 +12116,7 @@ const StartTimeField = (i18n2) => {
12134
12116
  const ServiceTypeField = (i18n2) => {
12135
12117
  return {
12136
12118
  key: "type",
12119
+ col: 12,
12137
12120
  title: i18n2.t("dovetail.type"),
12138
12121
  path: ["displayType"]
12139
12122
  };
@@ -12141,6 +12124,7 @@ const ServiceTypeField = (i18n2) => {
12141
12124
  const ClusterIpField = (i18n2) => {
12142
12125
  return {
12143
12126
  key: "clusterIp",
12127
+ col: 12,
12144
12128
  title: i18n2.t("dovetail.clusterIp"),
12145
12129
  path: ["spec", "clusterIP"]
12146
12130
  };
@@ -12148,6 +12132,7 @@ const ClusterIpField = (i18n2) => {
12148
12132
  const SessionAffinityField = (i18n2) => {
12149
12133
  return {
12150
12134
  key: "clusterIp",
12135
+ col: 12,
12151
12136
  title: i18n2.t("dovetail.sessionAffinity"),
12152
12137
  path: ["spec", "sessionAffinity"]
12153
12138
  };
@@ -12192,11 +12177,13 @@ const EventsTableTabField = () => {
12192
12177
  };
12193
12178
  const NamespaceField = (i18n2) => ({
12194
12179
  key: "NameSpace",
12180
+ col: 12,
12195
12181
  title: i18n2.t("dovetail.namespace"),
12196
12182
  path: ["metadata", "namespace"]
12197
12183
  });
12198
12184
  const AgeField = (i18n2) => ({
12199
12185
  key: "Age",
12186
+ col: 12,
12200
12187
  title: i18n2.t("dovetail.created_time"),
12201
12188
  path: ["metadata", "creationTimestamp"],
12202
12189
  renderContent(value2) {
@@ -12224,6 +12211,7 @@ const AnnotationsField = (i18n2) => ({
12224
12211
  });
12225
12212
  const ServiceInnerClusterAccessField = () => ({
12226
12213
  key: "innerClusterAccess",
12214
+ col: 12,
12227
12215
  title: /* @__PURE__ */ common.jsxRuntimeExports.jsx(ServiceInClusterAccessTitle, {}),
12228
12216
  path: [],
12229
12217
  renderContent: (_, record) => {
@@ -12232,6 +12220,7 @@ const ServiceInnerClusterAccessField = () => ({
12232
12220
  });
12233
12221
  const ServiceOutClusterAccessField = (clusterVip) => ({
12234
12222
  key: "innerClusterAccess",
12223
+ col: 12,
12235
12224
  title: /* @__PURE__ */ common.jsxRuntimeExports.jsx(ServiceOutClusterAccessTitle, {}),
12236
12225
  path: [],
12237
12226
  renderContent: (_, record) => {
@@ -12264,6 +12253,7 @@ const PortsTableField = () => ({
12264
12253
  const DurationField = (i18n2) => {
12265
12254
  return {
12266
12255
  key: "duration",
12256
+ col: 12,
12267
12257
  path: ["duration"],
12268
12258
  title: i18n2.t("dovetail.duration"),
12269
12259
  renderContent: (v) => {
@@ -12274,6 +12264,7 @@ const DurationField = (i18n2) => {
12274
12264
  const StorageClassProvisionerField = (i18n2) => {
12275
12265
  return {
12276
12266
  key: "provisioner",
12267
+ col: 12,
12277
12268
  path: ["provisioner"],
12278
12269
  title: i18n2.t("dovetail.provisioner")
12279
12270
  };
@@ -12309,6 +12300,7 @@ const StorageClassPvField = () => {
12309
12300
  const PVCapacityField = (i18n2) => {
12310
12301
  return {
12311
12302
  key: "capacity",
12303
+ col: 12,
12312
12304
  path: ["spec", "capacity", "storage"],
12313
12305
  title: i18n2.t("dovetail.capacity"),
12314
12306
  renderContent(value2) {
@@ -12319,6 +12311,7 @@ const PVCapacityField = (i18n2) => {
12319
12311
  const PVCStorageField = (i18n2) => {
12320
12312
  return {
12321
12313
  key: "storage",
12314
+ col: 12,
12322
12315
  path: ["spec", "resources", "requests", "storage"],
12323
12316
  title: i18n2.t("dovetail.distributed"),
12324
12317
  renderContent(value2, pvc2) {
@@ -12329,6 +12322,7 @@ const PVCStorageField = (i18n2) => {
12329
12322
  const PVRefField = (i18n2) => {
12330
12323
  return {
12331
12324
  key: "pv",
12325
+ col: 12,
12332
12326
  path: ["pv"],
12333
12327
  title: i18n2.t("dovetail.pv"),
12334
12328
  renderContent(value2) {
@@ -12346,6 +12340,7 @@ const PVRefField = (i18n2) => {
12346
12340
  const PVStorageClassField = (i18n2) => {
12347
12341
  return {
12348
12342
  key: "storageClass",
12343
+ col: 12,
12349
12344
  path: ["spec", "storageClassName"],
12350
12345
  title: i18n2.t("dovetail.storage_class"),
12351
12346
  renderContent(value2) {
@@ -12356,6 +12351,7 @@ const PVStorageClassField = (i18n2) => {
12356
12351
  const PVPhaseField = (i18n2) => {
12357
12352
  return {
12358
12353
  key: "phase",
12354
+ col: 12,
12359
12355
  path: ["stateDisplay"],
12360
12356
  title: i18n2.t("dovetail.state"),
12361
12357
  renderContent(value2) {
@@ -12366,6 +12362,7 @@ const PVPhaseField = (i18n2) => {
12366
12362
  const PVVolumeModeField = (i18n2) => {
12367
12363
  return {
12368
12364
  key: "mode",
12365
+ col: 12,
12369
12366
  path: ["spec", "volumeMode"],
12370
12367
  title: i18n2.t("dovetail.volume_mode"),
12371
12368
  renderContent(value2) {
@@ -12376,6 +12373,7 @@ const PVVolumeModeField = (i18n2) => {
12376
12373
  const PVAccessModeField = (i18n2) => {
12377
12374
  return {
12378
12375
  key: "accessMode",
12376
+ col: 12,
12379
12377
  path: ["spec", "accessModes"],
12380
12378
  title: i18n2.t("dovetail.access_mode"),
12381
12379
  renderContent(value2) {
@@ -12411,6 +12409,7 @@ const PVCPodsField = () => {
12411
12409
  const PVCRefField = (i18n2) => {
12412
12410
  return {
12413
12411
  key: "pvc",
12412
+ col: 12,
12414
12413
  path: ["pvc"],
12415
12414
  title: i18n2.t("dovetail.pvc"),
12416
12415
  renderContent(value2, pv2) {
@@ -12429,6 +12428,7 @@ const PVCRefField = (i18n2) => {
12429
12428
  const PVCSIRefField = (i18n2) => {
12430
12429
  return {
12431
12430
  key: "csi",
12431
+ col: 12,
12432
12432
  path: ["csi"],
12433
12433
  title: i18n2.t("dovetail.csi")
12434
12434
  };
@@ -12436,6 +12436,7 @@ const PVCSIRefField = (i18n2) => {
12436
12436
  const IsDefaultSCField = (i18n2) => {
12437
12437
  return {
12438
12438
  key: "isDefaultSC",
12439
+ col: 12,
12439
12440
  path: ["isDefaultSC"],
12440
12441
  title: i18n2.t("dovetail.default_sc"),
12441
12442
  renderContent(val) {
@@ -12446,6 +12447,7 @@ const IsDefaultSCField = (i18n2) => {
12446
12447
  const SCReclaimPolicyField = (i18n2) => {
12447
12448
  return {
12448
12449
  key: "reclaimPolicy",
12450
+ col: 12,
12449
12451
  path: ["reclaimPolicy"],
12450
12452
  title: i18n2.t("dovetail.reclaim_policy"),
12451
12453
  renderContent(val) {
@@ -12460,6 +12462,7 @@ const SCReclaimPolicyField = (i18n2) => {
12460
12462
  const IsSCAllowVolumeExpansionField = (i18n2) => {
12461
12463
  return {
12462
12464
  key: "allowVolumeExpansion",
12465
+ col: 12,
12463
12466
  path: ["allowVolumeExpansion"],
12464
12467
  title: i18n2.t("dovetail.allow_expand"),
12465
12468
  renderContent(val) {
@@ -12707,7 +12710,7 @@ const PodLogTab = (i18n2) => ({
12707
12710
  ]
12708
12711
  });
12709
12712
  const NetworkPolicyRulesViewer_r6jity = "";
12710
- const MonacoYamlEditor$1 = React.lazy(() => Promise.resolve().then(() => require("./MonacoYamlEditor-1ed09191.cjs")));
12713
+ const MonacoYamlEditor$1 = React.lazy(() => Promise.resolve().then(() => require("./MonacoYamlEditor-bdd52136.cjs")));
12711
12714
  const EditorStyle$1 = "e1cjl2b8";
12712
12715
  const NetworkPolicyRulesViewer = ({
12713
12716
  ingressOrEgress,
@@ -13024,27 +13027,269 @@ const NetworkPolicyEgressRulesGroup = (i18n2) => ({
13024
13027
  }
13025
13028
  );
13026
13029
  }
13027
- }
13028
- ]
13029
- }
13030
- ]
13031
- });
13032
- const StorageClassPvGroup = (i18n2) => ({
13033
- title: i18n2.t("dovetail.persistent_volume"),
13034
- areas: [
13035
- {
13036
- fields: [StorageClassPvField()]
13037
- }
13038
- ]
13039
- });
13040
- const ResourceTableGroup = (resource, title) => ({
13041
- title,
13042
- areas: [
13030
+ }
13031
+ ]
13032
+ }
13033
+ ]
13034
+ });
13035
+ const StorageClassPvGroup = (i18n2) => ({
13036
+ title: i18n2.t("dovetail.persistent_volume"),
13037
+ areas: [
13038
+ {
13039
+ fields: [StorageClassPvField()]
13040
+ }
13041
+ ]
13042
+ });
13043
+ const ResourceTableGroup = (resource, title) => ({
13044
+ title,
13045
+ areas: [
13046
+ {
13047
+ fields: [ResourceTableField(resource)]
13048
+ }
13049
+ ]
13050
+ });
13051
+ function Tabs(props) {
13052
+ const { tabs, className } = props;
13053
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Tabs, { className, children: tabs.map((tab) => {
13054
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.TabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
13055
+ }) });
13056
+ }
13057
+ const ShowContentView_1mvcyif = "";
13058
+ const ShowContentWrapperStyle = "soapvs9";
13059
+ const BackButton = "b13d603q";
13060
+ const ToolBarWrapper = "tm8eaia";
13061
+ const NameStyle = "nhnus27";
13062
+ const TopBarStyle = "t16t20f5";
13063
+ const ShowContentHeaderStyle = "s97y2wr";
13064
+ const GroupStyle = "g1rhnxqx";
13065
+ const GroupTitleStyle = "g1f1s2pc";
13066
+ const FullTabContentStyle = "f1qw3bxx";
13067
+ const FieldWrapperStyle = "flfewds";
13068
+ const TabContentStyle = "t1c7cta8";
13069
+ const ValueStyle = "v1pt61xk";
13070
+ const TabsStyle = "t1to6fie";
13071
+ function ShowGroupComponent(props) {
13072
+ const {
13073
+ title,
13074
+ className,
13075
+ children,
13076
+ operationEle
13077
+ } = props;
13078
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
13079
+ className: common.cx_default(GroupStyle, className),
13080
+ children: [/* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
13081
+ className: common.cx_default(eagle.Typo.Heading.h2_bold_title, GroupTitleStyle),
13082
+ children: [/* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
13083
+ children: title
13084
+ }), operationEle]
13085
+ }), children]
13086
+ });
13087
+ }
13088
+ const ShowContentView = (props) => {
13089
+ var _a, _b, _c, _d;
13090
+ const {
13091
+ id,
13092
+ resourceName,
13093
+ showConfig,
13094
+ formatter,
13095
+ Dropdown = K8sDropdown,
13096
+ hideBackButton = false
13097
+ } = props;
13098
+ const {
13099
+ queryResult
13100
+ } = core.useShow({
13101
+ id,
13102
+ resource: resourceName,
13103
+ errorNotification: false
13104
+ });
13105
+ const {
13106
+ t: t2
13107
+ } = common.useTranslation();
13108
+ const {
13109
+ data: data2
13110
+ } = queryResult;
13111
+ const navigation = core.useNavigation();
13112
+ const go = core.useGo();
13113
+ const openForm = useOpenForm();
13114
+ const Component = React.useContext(ComponentContext);
13115
+ const configs = React.useContext(ConfigsContext);
13116
+ const config = configs[resourceName];
13117
+ const Tabs$1 = Component.Tabs || Tabs;
13118
+ if (!(data2 == null ? void 0 : data2.data)) {
13119
+ return null;
13120
+ }
13121
+ const model = data2.data;
13122
+ const record = formatter ? formatter(model) : data2 == null ? void 0 : data2.data;
13123
+ function renderFields(fields, areaType, hasCol = true) {
13124
+ if (!record)
13125
+ return null;
13126
+ return fields.map((field) => {
13127
+ if (field.hidden)
13128
+ return null;
13129
+ let content;
13130
+ const value2 = lodashEs.get(record, field.path);
13131
+ if (field.renderContent) {
13132
+ content = field.renderContent(value2, record, field);
13133
+ } else {
13134
+ content = lodashEs.get(record, field.path);
13135
+ }
13136
+ return hasCol ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Col, {
13137
+ flex: areaType === AreaType.Inline ? "none" : "",
13138
+ span: field.col || 24,
13139
+ className: "cca5959",
13140
+ children: field.render ? field.render(value2, record, field) : /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
13141
+ className: FieldWrapperStyle,
13142
+ children: [field.title && /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
13143
+ className: eagle.Typo.Label.l4_regular_title,
13144
+ style: {
13145
+ width: field.labelWidth || "165px",
13146
+ marginRight: 8,
13147
+ flexShrink: 0,
13148
+ color: "#2C385299"
13149
+ },
13150
+ children: field.title
13151
+ }), /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
13152
+ style: {
13153
+ flex: 1,
13154
+ minWidth: 0
13155
+ },
13156
+ children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(ValueDisplay, {
13157
+ className: common.cx_default(eagle.Typo.Label.l4_regular_title, ValueStyle),
13158
+ value: content,
13159
+ useOverflow: false
13160
+ })
13161
+ })]
13162
+ })
13163
+ }, field.key) : /* @__PURE__ */ common.jsxRuntimeExports.jsx(ValueDisplay, {
13164
+ style: {
13165
+ height: "100%"
13166
+ },
13167
+ value: content,
13168
+ useOverflow: false
13169
+ });
13170
+ });
13171
+ }
13172
+ function renderGroup(group) {
13173
+ const GroupContainer = group.title ? ShowGroupComponent : React.Fragment;
13174
+ const FieldContainer = group.title ? eagle.Row : React.Fragment;
13175
+ const groupContainerProps = group.title ? {
13176
+ title: group.title || ""
13177
+ } : {};
13178
+ const fieldContainerProps = group.title ? {
13179
+ gutter: [24, 8]
13180
+ } : {};
13181
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(GroupContainer, {
13182
+ ...groupContainerProps,
13183
+ children: group.areas.map((area, index2) => /* @__PURE__ */ common.jsxRuntimeExports.jsxs(common.jsxRuntimeExports.Fragment, {
13184
+ children: [/* @__PURE__ */ common.jsxRuntimeExports.jsx(FieldContainer, {
13185
+ ...fieldContainerProps,
13186
+ children: renderFields(area.fields, area.type, !!group.title)
13187
+ }, index2), index2 !== group.areas.length - 1 ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Divider, {
13188
+ style: {
13189
+ margin: "8px 0 12px 0"
13190
+ }
13191
+ }) : null]
13192
+ }))
13193
+ }, group.title);
13194
+ }
13195
+ const stateDisplay = lodashEs.get(record, "stateDisplay");
13196
+ const topBar = /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
13197
+ className: ToolBarWrapper,
13198
+ children: [!hideBackButton && /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
13199
+ className: common.cx_default(eagle.Typo.Label.l4_bold, BackButton),
13200
+ onClick: () => {
13201
+ go({
13202
+ to: navigation.listUrl(resourceName)
13203
+ });
13204
+ },
13205
+ children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, {
13206
+ src: iconsReact.ArrowChevronLeft16BoldTertiaryIcon,
13207
+ hoverSrc: iconsReact.ArrowChevronLeftSmall16BoldBlueIcon,
13208
+ style: {
13209
+ marginRight: 4
13210
+ },
13211
+ children: /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
13212
+ className: "button-text",
13213
+ children: (config == null ? void 0 : config.displayName) || resourceName
13214
+ })
13215
+ })
13216
+ }), /* @__PURE__ */ common.jsxRuntimeExports.jsxs(eagle.Space, {
13217
+ className: TopBarStyle,
13218
+ children: [/* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
13219
+ style: {
13220
+ display: "flex"
13221
+ },
13222
+ children: [/* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
13223
+ className: common.cx_default(eagle.Typo.Display.d2_regular_title, NameStyle),
13224
+ children: ((_a = showConfig.displayName) == null ? void 0 : _a.call(showConfig, record)) || ((_b = record == null ? void 0 : record.metadata) == null ? void 0 : _b.name)
13225
+ }), stateDisplay ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(StateTag, {
13226
+ state: stateDisplay,
13227
+ customResourceStateMap: showConfig.resourceStateMap
13228
+ }) : void 0]
13229
+ }), /* @__PURE__ */ common.jsxRuntimeExports.jsxs(eagle.Space, {
13230
+ children: [(_c = showConfig.renderExtraButton) == null ? void 0 : _c.call(showConfig, record), !config.hideEdit ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(core.CanAccess, {
13231
+ resource: resourceName,
13232
+ action: AccessControlAuth.Edit,
13233
+ params: {
13234
+ namespace: record.namespace
13235
+ },
13236
+ children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Button, {
13237
+ style: {
13238
+ marginRight: 8
13239
+ },
13240
+ onClick: () => openForm({
13241
+ id
13242
+ }),
13243
+ children: ((_d = config.formConfig) == null ? void 0 : _d.formType) === FormType.FORM ? t2("dovetail.edit") : t2("dovetail.edit_yaml")
13244
+ })
13245
+ }) : null, /* @__PURE__ */ common.jsxRuntimeExports.jsx(Dropdown, {
13246
+ record,
13247
+ size: "large"
13248
+ })]
13249
+ })]
13250
+ })]
13251
+ });
13252
+ const tabs = /* @__PURE__ */ common.jsxRuntimeExports.jsx(Tabs$1, {
13253
+ tabs: (showConfig.tabs || []).map((tab, tabIndex) => {
13254
+ var _a2;
13255
+ return {
13256
+ title: tab.title,
13257
+ key: tab.key,
13258
+ children: /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
13259
+ className: common.cx_default(TabContentStyle, tab.groups.length <= 1 && tabIndex !== 0 && FullTabContentStyle),
13260
+ children: (_a2 = tab.groups) == null ? void 0 : _a2.map(renderGroup)
13261
+ })
13262
+ };
13263
+ }),
13264
+ className: TabsStyle
13265
+ });
13266
+ const basicInfo = showConfig.basicGroup ? renderGroup(showConfig.basicGroup) : null;
13267
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
13268
+ className: ShowContentWrapperStyle,
13269
+ children: [/* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Space, {
13270
+ direction: "vertical",
13271
+ className: ShowContentHeaderStyle,
13272
+ children: topBar
13273
+ }), basicInfo, tabs]
13274
+ });
13275
+ };
13276
+ const ShowContent = (props) => {
13277
+ var _a;
13278
+ const { showConfig, formatter, Dropdown = K8sDropdown } = props;
13279
+ const parsed = core.useParsed();
13280
+ const { resource } = core.useResource();
13281
+ const id = (_a = parsed == null ? void 0 : parsed.params) == null ? void 0 : _a.id;
13282
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
13283
+ ShowContentView,
13043
13284
  {
13044
- fields: [ResourceTableField(resource)]
13285
+ id,
13286
+ resourceName: (resource == null ? void 0 : resource.name) || "",
13287
+ showConfig,
13288
+ formatter,
13289
+ Dropdown
13045
13290
  }
13046
- ]
13047
- });
13291
+ );
13292
+ };
13048
13293
  const PageShow = (props) => {
13049
13294
  var _a;
13050
13295
  const parsed = core.useParsed();
@@ -15278,6 +15523,11 @@ function usePathMap(options) {
15278
15523
  transformApplyValues
15279
15524
  };
15280
15525
  }
15526
+ var FormItemLayout = /* @__PURE__ */ ((FormItemLayout2) => {
15527
+ FormItemLayout2["VERTICAL"] = "VERTICAL";
15528
+ FormItemLayout2["HORIZONTAL"] = "HORIZONTAL";
15529
+ return FormItemLayout2;
15530
+ })(FormItemLayout || {});
15281
15531
  function useFieldsConfig(config, formConfig, resourceId) {
15282
15532
  var _a, _b, _c;
15283
15533
  const action = resourceId ? "edit" : "create";
@@ -15299,7 +15549,8 @@ function useFieldsConfig(config, formConfig, resourceId) {
15299
15549
  action
15300
15550
  });
15301
15551
  }
15302
- const RefineFormContent_ahna8x = "";
15552
+ const RefineFormContent_lnhybh = "";
15553
+ const VerticalFormItemStyle = "v154n7ie";
15303
15554
  function renderCommonFormFiled(props) {
15304
15555
  const {
15305
15556
  field,
@@ -15326,7 +15577,7 @@ function renderCommonFormFiled(props) {
15326
15577
  switch (fieldConfig.type) {
15327
15578
  case "number":
15328
15579
  ele = /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Fields.Integer, {
15329
- className: "c154n7ie",
15580
+ className: "c1c9j4da",
15330
15581
  placeholder: fieldConfig.placeholder,
15331
15582
  input: {
15332
15583
  value: value2,
@@ -15369,7 +15620,7 @@ const RefineFormContent = (props) => {
15369
15620
  control,
15370
15621
  name: fieldConfig.path.join("."),
15371
15622
  rules: {
15372
- validate(value2) {
15623
+ async validate(value2) {
15373
15624
  const formValue = getValues();
15374
15625
  if (!fieldConfig.validators || fieldConfig.validators.length === 0)
15375
15626
  return true;
@@ -15377,7 +15628,7 @@ const RefineFormContent = (props) => {
15377
15628
  const {
15378
15629
  isValid,
15379
15630
  errorMsg
15380
- } = func(value2, formValue, FormType.FORM);
15631
+ } = await func(value2, formValue, FormType.FORM);
15381
15632
  if (!isValid)
15382
15633
  return errorMsg;
15383
15634
  }
@@ -15405,13 +15656,14 @@ const RefineFormContent = (props) => {
15405
15656
  return /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Form.Item, {
15406
15657
  label: fieldConfig.label,
15407
15658
  colon: false,
15408
- labelCol: {
15659
+ labelCol: fieldConfig.layout === FormItemLayout.VERTICAL ? {} : {
15409
15660
  flex: `0 0 ${(formConfig == null ? void 0 : formConfig.labelWidth) || "216px"}`
15410
15661
  },
15411
- help: (_a2 = fieldState.error) == null ? void 0 : _a2.message,
15662
+ help: fieldConfig.isHideErrorStatus ? "" : (_a2 = fieldState.error) == null ? void 0 : _a2.message,
15412
15663
  extra: fieldConfig.helperText,
15413
- validateStatus: fieldState.invalid ? "error" : void 0,
15664
+ validateStatus: fieldState.invalid && !fieldConfig.isHideErrorStatus ? "error" : void 0,
15414
15665
  "data-test-id": fieldConfig.key,
15666
+ className: fieldConfig.layout === FormItemLayout.VERTICAL ? VerticalFormItemStyle : "",
15415
15667
  children: ele
15416
15668
  }, fieldConfig.key);
15417
15669
  }
@@ -15420,7 +15672,7 @@ const RefineFormContent = (props) => {
15420
15672
  return /* @__PURE__ */ common.jsxRuntimeExports.jsxs(eagle.Space, {
15421
15673
  direction: "vertical",
15422
15674
  size: 16,
15423
- className: "c1c9j4da",
15675
+ className: "cjxv8cf",
15424
15676
  children: [fields, /* @__PURE__ */ common.jsxRuntimeExports.jsx(FormErrorAlert, {
15425
15677
  errorMsgs: errorMsgs || [],
15426
15678
  style: {
@@ -16139,7 +16391,7 @@ const PlainCodeStyle = "pqch97v";
16139
16391
  const ErrorMsgStyle = "eh2qjnl";
16140
16392
  const ErrorWrapperStyle = "e19q2bnp";
16141
16393
  const YamlEditorStyle = "y16u5v3w";
16142
- const MonacoYamlEditor = React.lazy(() => Promise.resolve().then(() => require("./MonacoYamlEditor-1ed09191.cjs")));
16394
+ const MonacoYamlEditor = React.lazy(() => Promise.resolve().then(() => require("./MonacoYamlEditor-bdd52136.cjs")));
16143
16395
  const MonacoYamlDiffEditor = React.lazy(() => Promise.resolve().then(() => require("./MonacoYamlDiffEditor-7a07db88.cjs")));
16144
16396
  const YamlEditorComponent = React.forwardRef(
16145
16397
  function YamlEditorComponent2(props, ref) {
@@ -16167,20 +16419,18 @@ const YamlEditorComponent = React.forwardRef(
16167
16419
  const editorInstance = React.useRef();
16168
16420
  const [copyTooltip, setCopyTooltip] = React.useState(t2("dovetail.copy"));
16169
16421
  const [resetTooltip, setResetTooltip] = React.useState(t2("dovetail.reset_arguments"));
16170
- React.useImperativeHandle(ref, () => {
16171
- return {
16172
- setValue: _setValue,
16173
- setEditorValue: (value22) => {
16174
- var _a, _b;
16175
- (_b = (_a = editorInstance.current) == null ? void 0 : _a.getModel()) == null ? void 0 : _b.setValue(value22);
16176
- },
16177
- getEditorValue: () => {
16178
- var _a;
16179
- return ((_a = editorInstance.current) == null ? void 0 : _a.getValue()) ?? "";
16180
- },
16181
- getEditorInstance: () => editorInstance.current || null
16182
- };
16183
- });
16422
+ const defaultValueString = React.useMemo(() => {
16423
+ if (typeof defaultValue === "string") {
16424
+ return defaultValue;
16425
+ }
16426
+ return yaml$2.dump(defaultValue);
16427
+ }, [defaultValue]);
16428
+ const _valueString = React.useMemo(() => {
16429
+ if (typeof _value === "string") {
16430
+ return _value;
16431
+ }
16432
+ return yaml$2.dump(_value);
16433
+ }, [_value]);
16184
16434
  const onChange = React.useCallback(
16185
16435
  (newVal) => {
16186
16436
  var _a;
@@ -16203,7 +16453,7 @@ const YamlEditorComponent = React.forwardRef(
16203
16453
  (editor) => {
16204
16454
  var _a, _b, _c;
16205
16455
  if (editor.getValue() !== _value) {
16206
- (_b = (_a = editorInstance.current) == null ? void 0 : _a.getModel()) == null ? void 0 : _b.setValue(_value);
16456
+ (_b = (_a = editorInstance.current) == null ? void 0 : _a.getModel()) == null ? void 0 : _b.setValue(_valueString);
16207
16457
  }
16208
16458
  (_c = props.onEditorCreate) == null ? void 0 : _c.call(props, editor);
16209
16459
  },
@@ -16212,13 +16462,29 @@ const YamlEditorComponent = React.forwardRef(
16212
16462
  const getInstance = React.useCallback((ins) => {
16213
16463
  editorInstance.current = ins;
16214
16464
  }, []);
16465
+ const getEditorValue = React.useCallback(() => {
16466
+ var _a;
16467
+ return ((_a = editorInstance.current) == null ? void 0 : _a.getValue()) ?? "";
16468
+ }, []);
16215
16469
  React.useEffect(() => {
16216
16470
  var _a, _b;
16217
- if (value2 !== void 0 && value2 !== _value) {
16471
+ if (value2 !== void 0 && !lodashEs.isEqual(value2, _value)) {
16472
+ const valueString = typeof value2 === "string" ? value2 : yaml$2.dump(value2);
16218
16473
  _setValue(value2);
16219
- (_b = (_a = editorInstance.current) == null ? void 0 : _a.getModel()) == null ? void 0 : _b.setValue(value2);
16474
+ (_b = (_a = editorInstance.current) == null ? void 0 : _a.getModel()) == null ? void 0 : _b.setValue(valueString);
16220
16475
  }
16221
16476
  }, [value2]);
16477
+ React.useImperativeHandle(ref, () => {
16478
+ return {
16479
+ setValue: _setValue,
16480
+ setEditorValue: (value22) => {
16481
+ var _a, _b;
16482
+ (_b = (_a = editorInstance.current) == null ? void 0 : _a.getModel()) == null ? void 0 : _b.setValue(value22);
16483
+ },
16484
+ getEditorValue,
16485
+ getEditorInstance: () => editorInstance.current || null
16486
+ };
16487
+ });
16222
16488
  return /* @__PURE__ */ common.jsxRuntimeExports.jsxs(
16223
16489
  "div",
16224
16490
  {
@@ -16272,7 +16538,7 @@ const YamlEditorComponent = React.forwardRef(
16272
16538
  iconHeight: 16,
16273
16539
  onClick: () => {
16274
16540
  if (!isCollapsed) {
16275
- copyToClipboard(_value);
16541
+ copyToClipboard(getEditorValue());
16276
16542
  setCopyTooltip(t2("dovetail.copied"));
16277
16543
  }
16278
16544
  }
@@ -16304,7 +16570,7 @@ const YamlEditorComponent = React.forwardRef(
16304
16570
  onClick: () => {
16305
16571
  var _a;
16306
16572
  if (!isCollapsed) {
16307
- (_a = editorInstance.current) == null ? void 0 : _a.setValue(defaultValue);
16573
+ (_a = editorInstance.current) == null ? void 0 : _a.setValue(defaultValueString);
16308
16574
  setResetTooltip(t2("dovetail.already_reset"));
16309
16575
  }
16310
16576
  }
@@ -16365,7 +16631,7 @@ const YamlEditorComponent = React.forwardRef(
16365
16631
  zIndex: 1
16366
16632
  },
16367
16633
  children: [
16368
- /* @__PURE__ */ common.jsxRuntimeExports.jsx(React.Suspense, { fallback: /* @__PURE__ */ common.jsxRuntimeExports.jsx("pre", { className: PlainCodeStyle, children: _value }), children: /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", { style: { display: isDiff ? "none" : "block" }, children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(
16634
+ /* @__PURE__ */ common.jsxRuntimeExports.jsx(React.Suspense, { fallback: /* @__PURE__ */ common.jsxRuntimeExports.jsx("pre", { className: PlainCodeStyle, children: _valueString }), children: /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", { style: { display: isDiff ? "none" : "block" }, children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(
16369
16635
  MonacoYamlEditor,
16370
16636
  {
16371
16637
  id: props.id,
@@ -16381,12 +16647,12 @@ const YamlEditorComponent = React.forwardRef(
16381
16647
  isScrollOnFocus
16382
16648
  }
16383
16649
  ) }) }),
16384
- isDiff ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(React.Suspense, { fallback: /* @__PURE__ */ common.jsxRuntimeExports.jsx("pre", { className: PlainCodeStyle, children: _value }), children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(
16650
+ isDiff ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(React.Suspense, { fallback: /* @__PURE__ */ common.jsxRuntimeExports.jsx("pre", { className: PlainCodeStyle, children: _valueString }), children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(
16385
16651
  MonacoYamlDiffEditor,
16386
16652
  {
16387
16653
  id: props.id,
16388
- origin: defaultValue,
16389
- modified: _value,
16654
+ origin: defaultValueString,
16655
+ modified: _valueString,
16390
16656
  height
16391
16657
  }
16392
16658
  ) }) : null
@@ -16664,21 +16930,21 @@ const useYamlForm = ({
16664
16930
  }
16665
16931
  return changeValues;
16666
16932
  };
16667
- const validateRules = (yamlValue) => {
16933
+ const validateRules = async (yamlValue) => {
16668
16934
  const errorMap = {};
16669
16935
  if (rules && isYamlValid && isSchemaValid) {
16670
16936
  const formValue = yaml$2.load(yamlValue || "");
16671
- rules.forEach((rule2) => {
16937
+ for (const rule2 of rules) {
16672
16938
  const { path: path2, validators } = rule2;
16673
16939
  const value2 = lodashEs.get(formValue, path2);
16674
16940
  for (const validator of validators || []) {
16675
- const { isValid, errorMsg } = validator(value2, formValue, FormType.YAML);
16941
+ const { isValid, errorMsg } = await validator(value2, formValue, FormType.YAML);
16676
16942
  if (!isValid) {
16677
16943
  errorMap[path2.join(".")] = `${errorMsg}(${path2.join(".")})`;
16678
16944
  break;
16679
16945
  }
16680
16946
  }
16681
- });
16947
+ }
16682
16948
  }
16683
16949
  setRulesErrors(lodashEs.uniq(Object.values(errorMap)));
16684
16950
  return errorMap;
@@ -16816,7 +17082,7 @@ function YamlForm(props) {
16816
17082
  try {
16817
17083
  const result = await ((_a = formProps.onFinish) == null ? void 0 : _a.call(formProps, store));
16818
17084
  if (result) {
16819
- (_b = props.onFinish) == null ? void 0 : _b.call(props);
17085
+ (_b = props.onFinish) == null ? void 0 : _b.call(props, result);
16820
17086
  }
16821
17087
  } catch {
16822
17088
  } finally {
@@ -16887,20 +17153,21 @@ function RefineFormContainer({
16887
17153
  config,
16888
17154
  id,
16889
17155
  refineProps: {
16890
- onMutationSuccess: () => {
16891
- onSuccess == null ? void 0 : onSuccess();
17156
+ onMutationSuccess: (data2) => {
17157
+ onSuccess == null ? void 0 : onSuccess(data2);
16892
17158
  },
16893
17159
  onMutationError() {
16894
17160
  onError == null ? void 0 : onError();
16895
17161
  },
16896
17162
  redirect: false,
17163
+ mutationMeta: {
17164
+ updateType: "put"
17165
+ },
16897
17166
  ...formConfig == null ? void 0 : formConfig.refineCoreProps
16898
17167
  },
16899
17168
  formConfig
16900
17169
  });
16901
- const {
16902
- transformApplyValues
16903
- } = usePathMap({
17170
+ const { transformApplyValues } = usePathMap({
16904
17171
  pathMap: formConfig == null ? void 0 : formConfig.pathMap,
16905
17172
  transformInitValues: formConfig == null ? void 0 : formConfig.transformInitValues,
16906
17173
  transformApplyValues: (formConfig == null ? void 0 : formConfig.transformApplyValues) || ((v) => v)
@@ -16915,14 +17182,16 @@ function RefineFormContainer({
16915
17182
  initialValuesForCreate: transformApplyValues(
16916
17183
  refineFormResult.formResult.getValues()
16917
17184
  ),
16918
- initialValuesForEdit: transformApplyValues(refineFormResult.formResult.getValues()),
17185
+ initialValuesForEdit: transformApplyValues(
17186
+ refineFormResult.formResult.getValues()
17187
+ ),
16919
17188
  id,
16920
17189
  action,
16921
17190
  isShowLayout: false,
16922
17191
  useFormProps: {
16923
17192
  redirect: false
16924
17193
  },
16925
- rules: fieldsConfig == null ? void 0 : fieldsConfig.map((config2) => ({
17194
+ rules: fieldsConfig == null ? void 0 : fieldsConfig.filter((config2) => !config2.isSkipValidationInYaml).map((config2) => ({
16926
17195
  path: config2.path,
16927
17196
  validators: config2.validators
16928
17197
  })),
@@ -16990,51 +17259,45 @@ function YamlFormContainer({
16990
17259
  onSaveButtonPropsChange
16991
17260
  }) {
16992
17261
  const action = id ? "edit" : "create";
16993
- const {
16994
- transformInitValues,
16995
- transformApplyValues
16996
- } = usePathMap({
17262
+ const { transformInitValues, transformApplyValues } = usePathMap({
16997
17263
  pathMap: formConfig == null ? void 0 : formConfig.pathMap,
16998
17264
  transformInitValues: formConfig == null ? void 0 : formConfig.transformInitValues,
16999
17265
  transformApplyValues: (formConfig == null ? void 0 : formConfig.transformApplyValues) || ((v) => v)
17000
17266
  });
17001
- const yamlFormProps = React.useMemo(
17002
- () => {
17003
- return {
17004
- ...customYamlFormProps,
17005
- config,
17006
- transformInitValues,
17007
- transformApplyValues,
17008
- initialValuesForCreate: (customYamlFormProps == null ? void 0 : customYamlFormProps.initialValuesForCreate) || config.initValue,
17009
- initialValuesForEdit: void 0,
17010
- id,
17011
- action,
17012
- isShowLayout: false,
17013
- useFormProps: {
17014
- redirect: false
17015
- },
17016
- rules: void 0,
17017
- onSaveButtonPropsChange,
17018
- onErrorsChange(errors) {
17019
- if (errors.length) {
17020
- onError == null ? void 0 : onError();
17021
- }
17022
- },
17023
- onFinish: onSuccess
17024
- };
17025
- },
17026
- [
17027
- id,
17028
- action,
17029
- customYamlFormProps,
17267
+ const yamlFormProps = React.useMemo(() => {
17268
+ return {
17269
+ ...customYamlFormProps,
17030
17270
  config,
17031
17271
  transformInitValues,
17032
17272
  transformApplyValues,
17033
- onSuccess,
17034
- onError,
17035
- onSaveButtonPropsChange
17036
- ]
17037
- );
17273
+ initialValuesForCreate: (customYamlFormProps == null ? void 0 : customYamlFormProps.initialValuesForCreate) || config.initValue,
17274
+ initialValuesForEdit: void 0,
17275
+ id,
17276
+ action,
17277
+ isShowLayout: false,
17278
+ useFormProps: {
17279
+ redirect: false
17280
+ },
17281
+ rules: void 0,
17282
+ onSaveButtonPropsChange,
17283
+ onErrorsChange(errors) {
17284
+ if (errors.length) {
17285
+ onError == null ? void 0 : onError();
17286
+ }
17287
+ },
17288
+ onFinish: onSuccess
17289
+ };
17290
+ }, [
17291
+ id,
17292
+ action,
17293
+ customYamlFormProps,
17294
+ config,
17295
+ transformInitValues,
17296
+ transformApplyValues,
17297
+ onSuccess,
17298
+ onError,
17299
+ onSaveButtonPropsChange
17300
+ ]);
17038
17301
  return /* @__PURE__ */ common.jsxRuntimeExports.jsx(YamlForm, { ...yamlFormProps });
17039
17302
  }
17040
17303
  const FormModal_64brhp = "";
@@ -17074,7 +17337,8 @@ function FormModal(props) {
17074
17337
  const {
17075
17338
  resource: resourceFromProps,
17076
17339
  id,
17077
- yamlFormProps: customYamlFormProps
17340
+ yamlFormProps: customYamlFormProps,
17341
+ onSuccess
17078
17342
  } = props;
17079
17343
  const {
17080
17344
  i18n: i18n2
@@ -17153,9 +17417,10 @@ function FormModal(props) {
17153
17417
  onError: () => {
17154
17418
  setIsError(true);
17155
17419
  },
17156
- onSuccess: () => {
17420
+ onSuccess: (data2) => {
17157
17421
  setIsError(false);
17158
17422
  popModal();
17423
+ onSuccess == null ? void 0 : onSuccess(data2);
17159
17424
  }
17160
17425
  };
17161
17426
  if (config.formConfig && (((_a2 = config.formConfig) == null ? void 0 : _a2.formType) === FormType.FORM || "fields" in config.formConfig)) {
@@ -17169,7 +17434,7 @@ function FormModal(props) {
17169
17434
  ...commonFormProps,
17170
17435
  formConfig: config.formConfig
17171
17436
  });
17172
- }, [id, customYamlFormProps, config, isYamlMode, popModal, setSaveButtonProps]);
17437
+ }, [id, customYamlFormProps, config, isYamlMode, popModal, setSaveButtonProps, onSuccess]);
17173
17438
  return /* @__PURE__ */ common.jsxRuntimeExports.jsxs(eagle.Modal, {
17174
17439
  className: common.cx_default(FullscreenModalStyle),
17175
17440
  style: {
@@ -17342,6 +17607,7 @@ const EditLabelForm = React.forwardRef(
17342
17607
  const { resourceModel } = props;
17343
17608
  const { mutateAsync } = core.useUpdate();
17344
17609
  const { t: t2 } = common.useTranslation();
17610
+ const tableFormRef = React.useRef(null);
17345
17611
  const defaultValue = React.useMemo(() => {
17346
17612
  var _a2;
17347
17613
  return Object.keys(((_a2 = resourceModel.metadata) == null ? void 0 : _a2.labels) || {}).map((key2) => {
@@ -17383,10 +17649,20 @@ const EditLabelForm = React.forwardRef(
17383
17649
  },
17384
17650
  [resourceModel, mutateAsync, t2]
17385
17651
  );
17652
+ React.useImperativeHandle(
17653
+ ref,
17654
+ () => ({
17655
+ submit: () => {
17656
+ var _a2;
17657
+ return (_a2 = tableFormRef.current) == null ? void 0 : _a2.submit();
17658
+ }
17659
+ }),
17660
+ []
17661
+ );
17386
17662
  return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
17387
- KeyValueTableFormForm,
17663
+ KeyValueTableForm,
17388
17664
  {
17389
- ref,
17665
+ ref: tableFormRef,
17390
17666
  defaultValue,
17391
17667
  onSubmit,
17392
17668
  addButtonText: t2("dovetail.add_label")
@@ -17429,6 +17705,7 @@ const EditAnnotationForm = React.forwardRef(function EditAnnotationForm2(props,
17429
17705
  const { resourceModel } = props;
17430
17706
  const { mutateAsync } = core.useUpdate();
17431
17707
  const { t: t2 } = common.useTranslation();
17708
+ const tableFormRef = React.useRef(null);
17432
17709
  const defaultValue = React.useMemo(() => {
17433
17710
  var _a2;
17434
17711
  return Object.keys(((_a2 = resourceModel.metadata) == null ? void 0 : _a2.annotations) || {}).map((key2) => {
@@ -17470,10 +17747,20 @@ const EditAnnotationForm = React.forwardRef(function EditAnnotationForm2(props,
17470
17747
  },
17471
17748
  [resourceModel, mutateAsync, t2]
17472
17749
  );
17750
+ React.useImperativeHandle(
17751
+ ref,
17752
+ () => ({
17753
+ submit: () => {
17754
+ var _a2;
17755
+ return (_a2 = tableFormRef.current) == null ? void 0 : _a2.submit();
17756
+ }
17757
+ }),
17758
+ []
17759
+ );
17473
17760
  return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
17474
- KeyValueTableFormForm,
17761
+ KeyValueTableForm,
17475
17762
  {
17476
- ref,
17763
+ ref: tableFormRef,
17477
17764
  defaultValue,
17478
17765
  onSubmit,
17479
17766
  addButtonText: t2("dovetail.add_annotation"),
@@ -18642,7 +18929,8 @@ class ModelPlugin {
18642
18929
  Node: NodeModel,
18643
18930
  StorageClass: StorageClassModel,
18644
18931
  PersistentVolume: PersistentVolumeModel,
18645
- PersistentVolumeClaim: PersistentVolumeClaimModel
18932
+ PersistentVolumeClaim: PersistentVolumeClaimModel,
18933
+ ReplicaSet: ReplicaSetModel
18646
18934
  })
18647
18935
  ));
18648
18936
  }
@@ -18816,6 +19104,7 @@ exports.EventsTab = EventsTab;
18816
19104
  exports.EventsTableTabField = EventsTableTabField;
18817
19105
  exports.FormContainerType = FormContainerType;
18818
19106
  exports.FormErrorAlert = FormErrorAlert;
19107
+ exports.FormItemLayout = FormItemLayout;
18819
19108
  exports.FormModal = FormModal;
18820
19109
  exports.FormMode = FormMode;
18821
19110
  exports.FormType = FormType;
@@ -18842,6 +19131,7 @@ exports.KeyValue = KeyValue;
18842
19131
  exports.KeyValueAnnotation = KeyValueAnnotation;
18843
19132
  exports.KeyValueListWidget = KeyValueListWidget;
18844
19133
  exports.KeyValueSecret = KeyValueSecret;
19134
+ exports.KeyValueTableForm = KeyValueTableForm;
18845
19135
  exports.LabelsField = LabelsField;
18846
19136
  exports.Layout = Layout;
18847
19137
  exports.ListPage = ListPage;
@@ -18921,6 +19211,7 @@ exports.RefineFormContent = RefineFormContent;
18921
19211
  exports.RefineFormPage = RefineFormPage;
18922
19212
  exports.RelationPlugin = RelationPlugin;
18923
19213
  exports.ReplicaField = ReplicaField;
19214
+ exports.ReplicaSetModel = ReplicaSetModel;
18924
19215
  exports.ReplicasColumnRenderer = ReplicasColumnRenderer;
18925
19216
  exports.ReplicasDropdown = ReplicasDropdown;
18926
19217
  exports.ResourceCRUD = ResourceCRUD;
@@ -18973,6 +19264,7 @@ exports.ServiceTypeEnum = ServiceTypeEnum;
18973
19264
  exports.ServiceTypeField = ServiceTypeField;
18974
19265
  exports.SessionAffinityField = SessionAffinityField;
18975
19266
  exports.ShowContent = ShowContent;
19267
+ exports.ShowContentView = ShowContentView;
18976
19268
  exports.ShowGroupComponent = ShowGroupComponent;
18977
19269
  exports.StartTimeField = StartTimeField;
18978
19270
  exports.StateDisplayColumnRenderer = StateDisplayColumnRenderer;
@@ -19029,3 +19321,6 @@ exports.useNamespacesFilter = useNamespacesFilter;
19029
19321
  exports.useOpenForm = useOpenForm;
19030
19322
  exports.useRefineForm = useRefineForm;
19031
19323
  exports.useSchema = useSchema;
19324
+ exports.validateDnsSubdomain = validateDnsSubdomain;
19325
+ exports.validateLabelKey = validateLabelKey;
19326
+ exports.validateLabelValue = validateLabelValue;