@dovetail-v2/refine 0.2.5 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { j as jsxRuntimeExports } from "./index-d8439125.js";
1
+ import { j as jsxRuntimeExports } from "./index-e2ac90c3.js";
2
2
  import * as monaco from "monaco-editor";
3
3
  import { useRef, useEffect } from "react";
4
4
  import "dayjs";
@@ -1,4 +1,4 @@
1
- import { j as jsxRuntimeExports, c as cx_default, Y as YamlEditorStyle } from "./index-d8439125.js";
1
+ import { j as jsxRuntimeExports, c as cx_default, Y as YamlEditorStyle } from "./index-e2ac90c3.js";
2
2
  import * as monaco from "monaco-editor";
3
3
  import { setDiagnosticsOptions } from "monaco-yaml";
4
4
  import { useRef, useEffect } from "react";
@@ -778,6 +778,8 @@ const succeeded_state$1 = "Succeeded";
778
778
  const unknown_state$1 = "Unknown";
779
779
  const pending_state$1 = "Pending";
780
780
  const waiting_state$1 = "Waiting";
781
+ const active_state$1 = "Active";
782
+ const deleting_state$1 = "Deleting";
781
783
  const expand$1 = "Expand";
782
784
  const fold$1 = "Collapse";
783
785
  const rule$1 = "Rule";
@@ -1017,6 +1019,8 @@ const dovetail$1 = {
1017
1019
  unknown_state: unknown_state$1,
1018
1020
  pending_state: pending_state$1,
1019
1021
  waiting_state: waiting_state$1,
1022
+ active_state: active_state$1,
1023
+ deleting_state: deleting_state$1,
1020
1024
  expand: expand$1,
1021
1025
  fold: fold$1,
1022
1026
  rule: rule$1,
@@ -1268,6 +1272,8 @@ const terminated_state = "已终止";
1268
1272
  const unknown_state = "未知";
1269
1273
  const pending_state = "待处理";
1270
1274
  const waiting_state = "等待中";
1275
+ const active_state = "活跃";
1276
+ const deleting_state = "删除中";
1271
1277
  const create_resource = "创建{{resource}}";
1272
1278
  const edit_resource = "编辑{{resource}}";
1273
1279
  const sec = "秒";
@@ -1506,6 +1512,8 @@ const dovetail = {
1506
1512
  unknown_state,
1507
1513
  pending_state,
1508
1514
  waiting_state,
1515
+ active_state,
1516
+ deleting_state,
1509
1517
  create_resource,
1510
1518
  edit_resource,
1511
1519
  sec,
@@ -9239,7 +9247,7 @@ function EditFieldModal(props) {
9239
9247
  const close2 = useCallback(() => {
9240
9248
  popModal();
9241
9249
  reset();
9242
- }, [reset]);
9250
+ }, [popModal, reset]);
9243
9251
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Modal, {
9244
9252
  className: fullscreen ? FullscreenModalStyle : SmallModalStyle,
9245
9253
  title: title || i18n2.t("dovetail.edit"),
@@ -9273,6 +9281,9 @@ function EditField(props) {
9273
9281
  return /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
9274
9282
  resource: resource == null ? void 0 : resource.name,
9275
9283
  action: AccessControlAuth.Edit,
9284
+ params: {
9285
+ namespace: modalProps.namespace
9286
+ },
9276
9287
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
9277
9288
  className: cx_default(EditButtonStyle, Typo.Label.l4_regular_title),
9278
9289
  type: "link",
@@ -9484,6 +9495,7 @@ function PVCDistributeStorage({ pvc: pvc2, editable }) {
9484
9495
  modalProps: {
9485
9496
  formRef,
9486
9497
  title: t2("dovetail.edit_distribute_storage"),
9498
+ namespace: pvc2.namespace || "",
9487
9499
  renderContent() {
9488
9500
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
9489
9501
  DistributeStorageForm,
@@ -10205,6 +10217,8 @@ var ResourceState = /* @__PURE__ */ ((ResourceState2) => {
10205
10217
  ResourceState2["BOUND"] = "bound";
10206
10218
  ResourceState2["RELEASED"] = "released";
10207
10219
  ResourceState2["LOST"] = "lost";
10220
+ ResourceState2["ACTIVE"] = "active";
10221
+ ResourceState2["DELETING"] = "deleting";
10208
10222
  return ResourceState2;
10209
10223
  })(ResourceState || {});
10210
10224
  function matchSelector(pod2, selector, namespace2 = "default") {
@@ -11180,11 +11194,17 @@ function K8sDropdown(props) {
11180
11194
  const isInShowPage = useResourceResult.action === "show";
11181
11195
  const { data: canEditData } = useCan({
11182
11196
  resource: resource == null ? void 0 : resource.name,
11183
- action: AccessControlAuth.Edit
11197
+ action: AccessControlAuth.Edit,
11198
+ params: {
11199
+ namespace: record.namespace
11200
+ }
11184
11201
  });
11185
11202
  const { data: canDeleteData } = useCan({
11186
11203
  resource: resource == null ? void 0 : resource.name,
11187
- action: AccessControlAuth.Delete
11204
+ action: AccessControlAuth.Delete,
11205
+ params: {
11206
+ namespace: record.namespace
11207
+ }
11188
11208
  });
11189
11209
  const formType = ((_a = config.formConfig) == null ? void 0 : _a.formType) || FormType.FORM;
11190
11210
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -11881,7 +11901,9 @@ const StateTag = (props) => {
11881
11901
  [ResourceState.AVAILABLE]: "blue",
11882
11902
  [ResourceState.BOUND]: "green",
11883
11903
  [ResourceState.RELEASED]: "gray",
11884
- [ResourceState.LOST]: "red"
11904
+ [ResourceState.LOST]: "red",
11905
+ [ResourceState.ACTIVE]: "green",
11906
+ [ResourceState.DELETING]: "loading"
11885
11907
  };
11886
11908
  const finalColorMap = (customResourceStateMap == null ? void 0 : customResourceStateMap.color) || defaultStateMap;
11887
11909
  const finalTextMap = customResourceStateMap == null ? void 0 : customResourceStateMap.text;
@@ -12050,6 +12072,9 @@ const ShowContent = (props) => {
12050
12072
  children: [(_e = showConfig.renderExtraButton) == null ? void 0 : _e.call(showConfig, record), !config.hideEdit ? /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
12051
12073
  resource: resource == null ? void 0 : resource.name,
12052
12074
  action: AccessControlAuth.Edit,
12075
+ params: {
12076
+ namespace: record.namespace
12077
+ },
12053
12078
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
12054
12079
  style: {
12055
12080
  marginRight: 8
@@ -12899,6 +12924,7 @@ function WorkloadReplicas({
12899
12924
  modalProps: {
12900
12925
  formRef,
12901
12926
  title: t2("dovetail.edit_replicas"),
12927
+ namespace: record.namespace || "",
12902
12928
  renderContent() {
12903
12929
  return /* @__PURE__ */ jsxRuntimeExports.jsx(WorkloadReplicasForm, {
12904
12930
  ref: formRef,
@@ -13611,7 +13637,7 @@ const PodLogTab = (i18n2) => ({
13611
13637
  ]
13612
13638
  });
13613
13639
  const NetworkPolicyRulesViewer_r6jity = "";
13614
- const MonacoYamlEditor$1 = lazy(() => import("./MonacoYamlEditor-96d9a48c.js"));
13640
+ const MonacoYamlEditor$1 = lazy(() => import("./MonacoYamlEditor-7071a8ae.js"));
13615
13641
  const EditorStyle$1 = "e1cjl2b8";
13616
13642
  const NetworkPolicyRulesViewer = ({
13617
13643
  ingressOrEgress,
@@ -14036,7 +14062,10 @@ function WorkloadDropdown(props) {
14036
14062
  const { t: t2 } = useTranslation();
14037
14063
  const { data: canEditData } = useCan({
14038
14064
  resource: resource == null ? void 0 : resource.name,
14039
- action: AccessControlAuth.Edit
14065
+ action: AccessControlAuth.Edit,
14066
+ params: {
14067
+ namespace: record.namespace
14068
+ }
14040
14069
  });
14041
14070
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(K8sDropdown, { record, size, children: [
14042
14071
  (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -14091,7 +14120,10 @@ function ReplicasDropdown(props) {
14091
14120
  const isInShowPage = action === "show";
14092
14121
  const { data: canEditData } = useCan({
14093
14122
  resource: resource == null ? void 0 : resource.name,
14094
- action: AccessControlAuth.Edit
14123
+ action: AccessControlAuth.Edit,
14124
+ params: {
14125
+ namespace: record.namespace
14126
+ }
14095
14127
  });
14096
14128
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(WorkloadDropdown, { record, size, children: [
14097
14129
  isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -14101,6 +14133,7 @@ function ReplicasDropdown(props) {
14101
14133
  const modalProps = {
14102
14134
  formRef,
14103
14135
  title: t2("dovetail.edit_replicas"),
14136
+ namespace: record.namespace || "",
14104
14137
  renderContent() {
14105
14138
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
14106
14139
  WorkloadReplicasForm,
@@ -16447,7 +16480,10 @@ function PodDropdown(props) {
16447
16480
  const pushModal = usePushModal();
16448
16481
  const { data: canEditData } = useCan({
16449
16482
  resource: resource == null ? void 0 : resource.name,
16450
- action: AccessControlAuth.Edit
16483
+ action: AccessControlAuth.Edit,
16484
+ params: {
16485
+ namespace: record.namespace
16486
+ }
16451
16487
  });
16452
16488
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(K8sDropdown, { record, size, children: [
16453
16489
  (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -17696,8 +17732,8 @@ const PlainCodeStyle = "pqch97v";
17696
17732
  const ErrorMsgStyle = "eh2qjnl";
17697
17733
  const ErrorWrapperStyle = "e19q2bnp";
17698
17734
  const YamlEditorStyle = "y16u5v3w";
17699
- const MonacoYamlEditor = React__default.lazy(() => import("./MonacoYamlEditor-96d9a48c.js"));
17700
- const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-e0b05820.js"));
17735
+ const MonacoYamlEditor = React__default.lazy(() => import("./MonacoYamlEditor-7071a8ae.js"));
17736
+ const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-ae04bff7.js"));
17701
17737
  const YamlEditorComponent = forwardRef(
17702
17738
  function YamlEditorComponent2(props, ref) {
17703
17739
  const {
@@ -18846,7 +18882,10 @@ function CronJobDropdown(props) {
18846
18882
  const { t: t2 } = useTranslation();
18847
18883
  const { data: canEditData } = useCan({
18848
18884
  resource: resource == null ? void 0 : resource.name,
18849
- action: AccessControlAuth.Edit
18885
+ action: AccessControlAuth.Edit,
18886
+ params: {
18887
+ namespace: record.namespace
18888
+ }
18850
18889
  });
18851
18890
  const suspended = Boolean(spec == null ? void 0 : spec.suspend);
18852
18891
  return /* @__PURE__ */ jsxRuntimeExports.jsx(K8sDropdown, { record, size, children: (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -18965,7 +19004,8 @@ function EditLabelDropdownMenuItem(props) {
18965
19004
  fullscreen: true,
18966
19005
  renderContent() {
18967
19006
  return /* @__PURE__ */ jsxRuntimeExports.jsx(EditLabelForm, { ref: formRef, resourceModel });
18968
- }
19007
+ },
19008
+ namespace: resourceModel.namespace || ""
18969
19009
  };
18970
19010
  pushModal({
18971
19011
  component: EditFieldModal,
@@ -19049,6 +19089,7 @@ function EditAnnotationDropdownMenuItem(props) {
19049
19089
  formRef,
19050
19090
  title: t2("dovetail.edit_annotation"),
19051
19091
  fullscreen: true,
19092
+ namespace: resourceModel.namespace || "",
19052
19093
  renderContent() {
19053
19094
  return /* @__PURE__ */ jsxRuntimeExports.jsx(EditAnnotationForm, { ref: formRef, resourceModel });
19054
19095
  }
@@ -19080,7 +19121,8 @@ function EditNodeTaintDropdownMenuItem(props) {
19080
19121
  fullscreen: true,
19081
19122
  renderContent() {
19082
19123
  return /* @__PURE__ */ jsxRuntimeExports.jsx(EditNodeTaintForm, { ref: formRef, nodeModel: resourceModel });
19083
- }
19124
+ },
19125
+ namespace: resourceModel.namespace || ""
19084
19126
  };
19085
19127
  pushModal({
19086
19128
  component: EditFieldModal,
package/dist/refine.js CHANGED
@@ -1,4 +1,4 @@
1
- import { bR, cH, A, a_, b0, aJ, cf, bo, a5, ct, ch, aU, X, C, m, cN, aM, bt, ag, cP, am, at, cY, aB, ci, cg, c$, aQ, bA, z, aH, bH, c_, cI, bK, D, b5, aw, bN, av, ax, a4, ce, cd, cZ, bm, aY, cK, ah, bU, cM, cL, cO, cr, aK, an, w, v, cQ, I, bx, aX, x, T, bi, bk, cj, cS, aP, bw, au, aC, aD, ac, aE, a$, aI, bI, bL, ad, d9, cs, cC, bQ, N, a6, h, aZ, aa, bT, bC, bB, cR, c4, d4, k, d3, aN, bu, cl, Q, be, bf, bs, L, bg, M, bh, G, b9, cF, F, b8, K, bc, H, ba, J, bb, O, c5, bd, cE, ae, d7, d6, P, bq, y, ai, al, c3, bn, cW, cV, b3, by, cb, ca, t, aO, bp, B, bz, b4, d8, E, cv, cJ, bO, bW, bX, db, aL, R, ak, ar, aq, bP, ao, cX, c7, ap, cG, cc, bl, bE, ay, l, V, U, bj, cy, cB, cx, cw, cz, cA, cu, cm, cp, cq, co, cn, ck, cD, bY, aR, bv, aF, p, b$, o, b1, d2, s, c0, b2, q, aW, br, n, d1, aT, aV, c9, bG, bF, c8, aS, S, bJ, d0, d5, b6, b7, bD, bM, c6, c1, c2, af, a3, cU, aj, W, cT, as, aA, az, i, aG, bZ, Z, a7, d, de, dd, dg, di, da, ab, dh, dc, bV, df, a9, a8, r, a, e, f, $, _, a0, g, a1, u, bS, a2, b_, b } from "./index-d8439125.js";
1
+ import { bR, cH, A, a_, b0, aJ, cf, bo, a5, ct, ch, aU, X, C, m, cN, aM, bt, ag, cP, am, at, cY, aB, ci, cg, c$, aQ, bA, z, aH, bH, c_, cI, bK, D, b5, aw, bN, av, ax, a4, ce, cd, cZ, bm, aY, cK, ah, bU, cM, cL, cO, cr, aK, an, w, v, cQ, I, bx, aX, x, T, bi, bk, cj, cS, aP, bw, au, aC, aD, ac, aE, a$, aI, bI, bL, ad, d9, cs, cC, bQ, N, a6, h, aZ, aa, bT, bC, bB, cR, c4, d4, k, d3, aN, bu, cl, Q, be, bf, bs, L, bg, M, bh, G, b9, cF, F, b8, K, bc, H, ba, J, bb, O, c5, bd, cE, ae, d7, d6, P, bq, y, ai, al, c3, bn, cW, cV, b3, by, cb, ca, t, aO, bp, B, bz, b4, d8, E, cv, cJ, bO, bW, bX, db, aL, R, ak, ar, aq, bP, ao, cX, c7, ap, cG, cc, bl, bE, ay, l, V, U, bj, cy, cB, cx, cw, cz, cA, cu, cm, cp, cq, co, cn, ck, cD, bY, aR, bv, aF, p, b$, o, b1, d2, s, c0, b2, q, aW, br, n, d1, aT, aV, c9, bG, bF, c8, aS, S, bJ, d0, d5, b6, b7, bD, bM, c6, c1, c2, af, a3, cU, aj, W, cT, as, aA, az, i, aG, bZ, Z, a7, d, de, dd, dg, di, da, ab, dh, dc, bV, df, a9, a8, r, a, e, f, $, _, a0, g, a1, u, bS, a2, b_, b } from "./index-e2ac90c3.js";
2
2
  import "@cloudtower/eagle";
3
3
  import "@refinedev/core";
4
4
  import "react";
@@ -775,6 +775,8 @@ var __publicField = (obj, key, value) => {
775
775
  const unknown_state$1 = "Unknown";
776
776
  const pending_state$1 = "Pending";
777
777
  const waiting_state$1 = "Waiting";
778
+ const active_state$1 = "Active";
779
+ const deleting_state$1 = "Deleting";
778
780
  const expand$1 = "Expand";
779
781
  const fold$1 = "Collapse";
780
782
  const rule$1 = "Rule";
@@ -1014,6 +1016,8 @@ var __publicField = (obj, key, value) => {
1014
1016
  unknown_state: unknown_state$1,
1015
1017
  pending_state: pending_state$1,
1016
1018
  waiting_state: waiting_state$1,
1019
+ active_state: active_state$1,
1020
+ deleting_state: deleting_state$1,
1017
1021
  expand: expand$1,
1018
1022
  fold: fold$1,
1019
1023
  rule: rule$1,
@@ -1265,6 +1269,8 @@ var __publicField = (obj, key, value) => {
1265
1269
  const unknown_state = "未知";
1266
1270
  const pending_state = "待处理";
1267
1271
  const waiting_state = "等待中";
1272
+ const active_state = "活跃";
1273
+ const deleting_state = "删除中";
1268
1274
  const create_resource = "创建{{resource}}";
1269
1275
  const edit_resource = "编辑{{resource}}";
1270
1276
  const sec = "秒";
@@ -1503,6 +1509,8 @@ var __publicField = (obj, key, value) => {
1503
1509
  unknown_state,
1504
1510
  pending_state,
1505
1511
  waiting_state,
1512
+ active_state,
1513
+ deleting_state,
1506
1514
  create_resource,
1507
1515
  edit_resource,
1508
1516
  sec,
@@ -9236,7 +9244,7 @@ var __publicField = (obj, key, value) => {
9236
9244
  const close2 = React.useCallback(() => {
9237
9245
  popModal();
9238
9246
  reset();
9239
- }, [reset]);
9247
+ }, [popModal, reset]);
9240
9248
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Modal, {
9241
9249
  className: fullscreen ? FullscreenModalStyle : SmallModalStyle,
9242
9250
  title: title || i18n2.t("dovetail.edit"),
@@ -9270,6 +9278,9 @@ var __publicField = (obj, key, value) => {
9270
9278
  return /* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
9271
9279
  resource: resource == null ? void 0 : resource.name,
9272
9280
  action: AccessControlAuth.Edit,
9281
+ params: {
9282
+ namespace: modalProps.namespace
9283
+ },
9273
9284
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, {
9274
9285
  className: cx_default(EditButtonStyle, eagle.Typo.Label.l4_regular_title),
9275
9286
  type: "link",
@@ -9481,6 +9492,7 @@ var __publicField = (obj, key, value) => {
9481
9492
  modalProps: {
9482
9493
  formRef,
9483
9494
  title: t2("dovetail.edit_distribute_storage"),
9495
+ namespace: pvc2.namespace || "",
9484
9496
  renderContent() {
9485
9497
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
9486
9498
  DistributeStorageForm,
@@ -10202,6 +10214,8 @@ var __publicField = (obj, key, value) => {
10202
10214
  ResourceState2["BOUND"] = "bound";
10203
10215
  ResourceState2["RELEASED"] = "released";
10204
10216
  ResourceState2["LOST"] = "lost";
10217
+ ResourceState2["ACTIVE"] = "active";
10218
+ ResourceState2["DELETING"] = "deleting";
10205
10219
  return ResourceState2;
10206
10220
  })(ResourceState || {});
10207
10221
  function matchSelector(pod2, selector, namespace2 = "default") {
@@ -11177,11 +11191,17 @@ var __publicField = (obj, key, value) => {
11177
11191
  const isInShowPage = useResourceResult.action === "show";
11178
11192
  const { data: canEditData } = core.useCan({
11179
11193
  resource: resource == null ? void 0 : resource.name,
11180
- action: AccessControlAuth.Edit
11194
+ action: AccessControlAuth.Edit,
11195
+ params: {
11196
+ namespace: record.namespace
11197
+ }
11181
11198
  });
11182
11199
  const { data: canDeleteData } = core.useCan({
11183
11200
  resource: resource == null ? void 0 : resource.name,
11184
- action: AccessControlAuth.Delete
11201
+ action: AccessControlAuth.Delete,
11202
+ params: {
11203
+ namespace: record.namespace
11204
+ }
11185
11205
  });
11186
11206
  const formType = ((_a = config.formConfig) == null ? void 0 : _a.formType) || FormType.FORM;
11187
11207
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -11878,7 +11898,9 @@ var __publicField = (obj, key, value) => {
11878
11898
  [ResourceState.AVAILABLE]: "blue",
11879
11899
  [ResourceState.BOUND]: "green",
11880
11900
  [ResourceState.RELEASED]: "gray",
11881
- [ResourceState.LOST]: "red"
11901
+ [ResourceState.LOST]: "red",
11902
+ [ResourceState.ACTIVE]: "green",
11903
+ [ResourceState.DELETING]: "loading"
11882
11904
  };
11883
11905
  const finalColorMap = (customResourceStateMap == null ? void 0 : customResourceStateMap.color) || defaultStateMap;
11884
11906
  const finalTextMap = customResourceStateMap == null ? void 0 : customResourceStateMap.text;
@@ -12047,6 +12069,9 @@ var __publicField = (obj, key, value) => {
12047
12069
  children: [(_e = showConfig.renderExtraButton) == null ? void 0 : _e.call(showConfig, record), !config.hideEdit ? /* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
12048
12070
  resource: resource == null ? void 0 : resource.name,
12049
12071
  action: AccessControlAuth.Edit,
12072
+ params: {
12073
+ namespace: record.namespace
12074
+ },
12050
12075
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, {
12051
12076
  style: {
12052
12077
  marginRight: 8
@@ -12896,6 +12921,7 @@ var __publicField = (obj, key, value) => {
12896
12921
  modalProps: {
12897
12922
  formRef,
12898
12923
  title: t2("dovetail.edit_replicas"),
12924
+ namespace: record.namespace || "",
12899
12925
  renderContent() {
12900
12926
  return /* @__PURE__ */ jsxRuntimeExports.jsx(WorkloadReplicasForm, {
12901
12927
  ref: formRef,
@@ -14033,7 +14059,10 @@ var __publicField = (obj, key, value) => {
14033
14059
  const { t: t2 } = useTranslation();
14034
14060
  const { data: canEditData } = core.useCan({
14035
14061
  resource: resource == null ? void 0 : resource.name,
14036
- action: AccessControlAuth.Edit
14062
+ action: AccessControlAuth.Edit,
14063
+ params: {
14064
+ namespace: record.namespace
14065
+ }
14037
14066
  });
14038
14067
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(K8sDropdown, { record, size, children: [
14039
14068
  (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -14088,7 +14117,10 @@ var __publicField = (obj, key, value) => {
14088
14117
  const isInShowPage = action === "show";
14089
14118
  const { data: canEditData } = core.useCan({
14090
14119
  resource: resource == null ? void 0 : resource.name,
14091
- action: AccessControlAuth.Edit
14120
+ action: AccessControlAuth.Edit,
14121
+ params: {
14122
+ namespace: record.namespace
14123
+ }
14092
14124
  });
14093
14125
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(WorkloadDropdown, { record, size, children: [
14094
14126
  isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -14098,6 +14130,7 @@ var __publicField = (obj, key, value) => {
14098
14130
  const modalProps = {
14099
14131
  formRef,
14100
14132
  title: t2("dovetail.edit_replicas"),
14133
+ namespace: record.namespace || "",
14101
14134
  renderContent() {
14102
14135
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
14103
14136
  WorkloadReplicasForm,
@@ -16444,7 +16477,10 @@ var __publicField = (obj, key, value) => {
16444
16477
  const pushModal = eagle.usePushModal();
16445
16478
  const { data: canEditData } = core.useCan({
16446
16479
  resource: resource == null ? void 0 : resource.name,
16447
- action: AccessControlAuth.Edit
16480
+ action: AccessControlAuth.Edit,
16481
+ params: {
16482
+ namespace: record.namespace
16483
+ }
16448
16484
  });
16449
16485
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(K8sDropdown, { record, size, children: [
16450
16486
  (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -18843,7 +18879,10 @@ var __publicField = (obj, key, value) => {
18843
18879
  const { t: t2 } = useTranslation();
18844
18880
  const { data: canEditData } = core.useCan({
18845
18881
  resource: resource == null ? void 0 : resource.name,
18846
- action: AccessControlAuth.Edit
18882
+ action: AccessControlAuth.Edit,
18883
+ params: {
18884
+ namespace: record.namespace
18885
+ }
18847
18886
  });
18848
18887
  const suspended = Boolean(spec == null ? void 0 : spec.suspend);
18849
18888
  return /* @__PURE__ */ jsxRuntimeExports.jsx(K8sDropdown, { record, size, children: (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -18962,7 +19001,8 @@ var __publicField = (obj, key, value) => {
18962
19001
  fullscreen: true,
18963
19002
  renderContent() {
18964
19003
  return /* @__PURE__ */ jsxRuntimeExports.jsx(EditLabelForm, { ref: formRef, resourceModel });
18965
- }
19004
+ },
19005
+ namespace: resourceModel.namespace || ""
18966
19006
  };
18967
19007
  pushModal({
18968
19008
  component: EditFieldModal,
@@ -19046,6 +19086,7 @@ var __publicField = (obj, key, value) => {
19046
19086
  formRef,
19047
19087
  title: t2("dovetail.edit_annotation"),
19048
19088
  fullscreen: true,
19089
+ namespace: resourceModel.namespace || "",
19049
19090
  renderContent() {
19050
19091
  return /* @__PURE__ */ jsxRuntimeExports.jsx(EditAnnotationForm, { ref: formRef, resourceModel });
19051
19092
  }
@@ -19077,7 +19118,8 @@ var __publicField = (obj, key, value) => {
19077
19118
  fullscreen: true,
19078
19119
  renderContent() {
19079
19120
  return /* @__PURE__ */ jsxRuntimeExports.jsx(EditNodeTaintForm, { ref: formRef, nodeModel: resourceModel });
19080
- }
19121
+ },
19122
+ namespace: resourceModel.namespace || ""
19081
19123
  };
19082
19124
  pushModal({
19083
19125
  component: EditFieldModal,
@@ -11,6 +11,7 @@ export interface EditFieldModalProps {
11
11
  } | null>;
12
12
  renderContent: () => React.ReactNode;
13
13
  fullscreen?: boolean;
14
+ namespace: string;
14
15
  }
15
16
  export declare function EditFieldModal(props: EditFieldModalProps): JSX.Element;
16
17
  export interface EditField {
@@ -16,5 +16,7 @@ export declare enum ResourceState {
16
16
  AVAILABLE = "available",
17
17
  BOUND = "bound",
18
18
  RELEASED = "released",
19
- LOST = "lost"
19
+ LOST = "lost",
20
+ ACTIVE = "active",
21
+ DELETING = "deleting"
20
22
  }
package/lib/i18n.d.ts CHANGED
@@ -64,6 +64,8 @@ export declare const resources: {
64
64
  unknown_state: string;
65
65
  pending_state: string;
66
66
  waiting_state: string;
67
+ active_state: string;
68
+ deleting_state: string;
67
69
  expand: string;
68
70
  fold: string;
69
71
  rule: string;
@@ -316,6 +318,8 @@ export declare const resources: {
316
318
  unknown_state: string;
317
319
  pending_state: string;
318
320
  waiting_state: string;
321
+ active_state: string;
322
+ deleting_state: string;
319
323
  create_resource: string;
320
324
  edit_resource: string;
321
325
  sec: string;
@@ -61,6 +61,8 @@ declare const _default: {
61
61
  unknown_state: string;
62
62
  pending_state: string;
63
63
  waiting_state: string;
64
+ active_state: string;
65
+ deleting_state: string;
64
66
  expand: string;
65
67
  fold: string;
66
68
  rule: string;
@@ -69,6 +69,8 @@ declare const _default: {
69
69
  unknown_state: string;
70
70
  pending_state: string;
71
71
  waiting_state: string;
72
+ active_state: string;
73
+ deleting_state: string;
72
74
  create_resource: string;
73
75
  edit_resource: string;
74
76
  sec: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dovetail-v2/refine",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",