@dovetail-v2/refine 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MonacoYamlDiffEditor-e0b05820.js → MonacoYamlDiffEditor-a6fe7989.js} +1 -1
- package/dist/{MonacoYamlEditor-96d9a48c.js → MonacoYamlEditor-9a71461b.js} +1 -1
- package/dist/{index-d8439125.js → index-d9e1f169.js} +42 -12
- package/dist/refine.js +1 -1
- package/dist/refine.umd.cjs +39 -9
- package/lib/components/EditField/index.d.ts +1 -0
- package/lib/components/TableToolbar/index.d.ts +1 -1
- package/lib/types/resource.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as jsxRuntimeExports, c as cx_default, Y as YamlEditorStyle } from "./index-
|
|
1
|
+
import { j as jsxRuntimeExports, c as cx_default, Y as YamlEditorStyle } from "./index-d9e1f169.js";
|
|
2
2
|
import * as monaco from "monaco-editor";
|
|
3
3
|
import { setDiagnosticsOptions } from "monaco-yaml";
|
|
4
4
|
import { useRef, useEffect } from "react";
|
|
@@ -9239,7 +9239,7 @@ function EditFieldModal(props) {
|
|
|
9239
9239
|
const close2 = useCallback(() => {
|
|
9240
9240
|
popModal();
|
|
9241
9241
|
reset();
|
|
9242
|
-
}, [reset]);
|
|
9242
|
+
}, [popModal, reset]);
|
|
9243
9243
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Modal, {
|
|
9244
9244
|
className: fullscreen ? FullscreenModalStyle : SmallModalStyle,
|
|
9245
9245
|
title: title || i18n2.t("dovetail.edit"),
|
|
@@ -9273,6 +9273,9 @@ function EditField(props) {
|
|
|
9273
9273
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
|
|
9274
9274
|
resource: resource == null ? void 0 : resource.name,
|
|
9275
9275
|
action: AccessControlAuth.Edit,
|
|
9276
|
+
params: {
|
|
9277
|
+
namespace: modalProps.namespace
|
|
9278
|
+
},
|
|
9276
9279
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
9277
9280
|
className: cx_default(EditButtonStyle, Typo.Label.l4_regular_title),
|
|
9278
9281
|
type: "link",
|
|
@@ -9484,6 +9487,7 @@ function PVCDistributeStorage({ pvc: pvc2, editable }) {
|
|
|
9484
9487
|
modalProps: {
|
|
9485
9488
|
formRef,
|
|
9486
9489
|
title: t2("dovetail.edit_distribute_storage"),
|
|
9490
|
+
namespace: pvc2.namespace || "",
|
|
9487
9491
|
renderContent() {
|
|
9488
9492
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9489
9493
|
DistributeStorageForm,
|
|
@@ -11180,11 +11184,17 @@ function K8sDropdown(props) {
|
|
|
11180
11184
|
const isInShowPage = useResourceResult.action === "show";
|
|
11181
11185
|
const { data: canEditData } = useCan({
|
|
11182
11186
|
resource: resource == null ? void 0 : resource.name,
|
|
11183
|
-
action: AccessControlAuth.Edit
|
|
11187
|
+
action: AccessControlAuth.Edit,
|
|
11188
|
+
params: {
|
|
11189
|
+
namespace: record.namespace
|
|
11190
|
+
}
|
|
11184
11191
|
});
|
|
11185
11192
|
const { data: canDeleteData } = useCan({
|
|
11186
11193
|
resource: resource == null ? void 0 : resource.name,
|
|
11187
|
-
action: AccessControlAuth.Delete
|
|
11194
|
+
action: AccessControlAuth.Delete,
|
|
11195
|
+
params: {
|
|
11196
|
+
namespace: record.namespace
|
|
11197
|
+
}
|
|
11188
11198
|
});
|
|
11189
11199
|
const formType = ((_a = config.formConfig) == null ? void 0 : _a.formType) || FormType.FORM;
|
|
11190
11200
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -12050,6 +12060,9 @@ const ShowContent = (props) => {
|
|
|
12050
12060
|
children: [(_e = showConfig.renderExtraButton) == null ? void 0 : _e.call(showConfig, record), !config.hideEdit ? /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
|
|
12051
12061
|
resource: resource == null ? void 0 : resource.name,
|
|
12052
12062
|
action: AccessControlAuth.Edit,
|
|
12063
|
+
params: {
|
|
12064
|
+
namespace: record.namespace
|
|
12065
|
+
},
|
|
12053
12066
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
12054
12067
|
style: {
|
|
12055
12068
|
marginRight: 8
|
|
@@ -12899,6 +12912,7 @@ function WorkloadReplicas({
|
|
|
12899
12912
|
modalProps: {
|
|
12900
12913
|
formRef,
|
|
12901
12914
|
title: t2("dovetail.edit_replicas"),
|
|
12915
|
+
namespace: record.namespace || "",
|
|
12902
12916
|
renderContent() {
|
|
12903
12917
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(WorkloadReplicasForm, {
|
|
12904
12918
|
ref: formRef,
|
|
@@ -13611,7 +13625,7 @@ const PodLogTab = (i18n2) => ({
|
|
|
13611
13625
|
]
|
|
13612
13626
|
});
|
|
13613
13627
|
const NetworkPolicyRulesViewer_r6jity = "";
|
|
13614
|
-
const MonacoYamlEditor$1 = lazy(() => import("./MonacoYamlEditor-
|
|
13628
|
+
const MonacoYamlEditor$1 = lazy(() => import("./MonacoYamlEditor-9a71461b.js"));
|
|
13615
13629
|
const EditorStyle$1 = "e1cjl2b8";
|
|
13616
13630
|
const NetworkPolicyRulesViewer = ({
|
|
13617
13631
|
ingressOrEgress,
|
|
@@ -14036,7 +14050,10 @@ function WorkloadDropdown(props) {
|
|
|
14036
14050
|
const { t: t2 } = useTranslation();
|
|
14037
14051
|
const { data: canEditData } = useCan({
|
|
14038
14052
|
resource: resource == null ? void 0 : resource.name,
|
|
14039
|
-
action: AccessControlAuth.Edit
|
|
14053
|
+
action: AccessControlAuth.Edit,
|
|
14054
|
+
params: {
|
|
14055
|
+
namespace: record.namespace
|
|
14056
|
+
}
|
|
14040
14057
|
});
|
|
14041
14058
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(K8sDropdown, { record, size, children: [
|
|
14042
14059
|
(canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -14091,7 +14108,10 @@ function ReplicasDropdown(props) {
|
|
|
14091
14108
|
const isInShowPage = action === "show";
|
|
14092
14109
|
const { data: canEditData } = useCan({
|
|
14093
14110
|
resource: resource == null ? void 0 : resource.name,
|
|
14094
|
-
action: AccessControlAuth.Edit
|
|
14111
|
+
action: AccessControlAuth.Edit,
|
|
14112
|
+
params: {
|
|
14113
|
+
namespace: record.namespace
|
|
14114
|
+
}
|
|
14095
14115
|
});
|
|
14096
14116
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(WorkloadDropdown, { record, size, children: [
|
|
14097
14117
|
isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -14101,6 +14121,7 @@ function ReplicasDropdown(props) {
|
|
|
14101
14121
|
const modalProps = {
|
|
14102
14122
|
formRef,
|
|
14103
14123
|
title: t2("dovetail.edit_replicas"),
|
|
14124
|
+
namespace: record.namespace || "",
|
|
14104
14125
|
renderContent() {
|
|
14105
14126
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
14106
14127
|
WorkloadReplicasForm,
|
|
@@ -16447,7 +16468,10 @@ function PodDropdown(props) {
|
|
|
16447
16468
|
const pushModal = usePushModal();
|
|
16448
16469
|
const { data: canEditData } = useCan({
|
|
16449
16470
|
resource: resource == null ? void 0 : resource.name,
|
|
16450
|
-
action: AccessControlAuth.Edit
|
|
16471
|
+
action: AccessControlAuth.Edit,
|
|
16472
|
+
params: {
|
|
16473
|
+
namespace: record.namespace
|
|
16474
|
+
}
|
|
16451
16475
|
});
|
|
16452
16476
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(K8sDropdown, { record, size, children: [
|
|
16453
16477
|
(canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -17696,8 +17720,8 @@ const PlainCodeStyle = "pqch97v";
|
|
|
17696
17720
|
const ErrorMsgStyle = "eh2qjnl";
|
|
17697
17721
|
const ErrorWrapperStyle = "e19q2bnp";
|
|
17698
17722
|
const YamlEditorStyle = "y16u5v3w";
|
|
17699
|
-
const MonacoYamlEditor = React__default.lazy(() => import("./MonacoYamlEditor-
|
|
17700
|
-
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-
|
|
17723
|
+
const MonacoYamlEditor = React__default.lazy(() => import("./MonacoYamlEditor-9a71461b.js"));
|
|
17724
|
+
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-a6fe7989.js"));
|
|
17701
17725
|
const YamlEditorComponent = forwardRef(
|
|
17702
17726
|
function YamlEditorComponent2(props, ref) {
|
|
17703
17727
|
const {
|
|
@@ -18846,7 +18870,10 @@ function CronJobDropdown(props) {
|
|
|
18846
18870
|
const { t: t2 } = useTranslation();
|
|
18847
18871
|
const { data: canEditData } = useCan({
|
|
18848
18872
|
resource: resource == null ? void 0 : resource.name,
|
|
18849
|
-
action: AccessControlAuth.Edit
|
|
18873
|
+
action: AccessControlAuth.Edit,
|
|
18874
|
+
params: {
|
|
18875
|
+
namespace: record.namespace
|
|
18876
|
+
}
|
|
18850
18877
|
});
|
|
18851
18878
|
const suspended = Boolean(spec == null ? void 0 : spec.suspend);
|
|
18852
18879
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(K8sDropdown, { record, size, children: (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -18965,7 +18992,8 @@ function EditLabelDropdownMenuItem(props) {
|
|
|
18965
18992
|
fullscreen: true,
|
|
18966
18993
|
renderContent() {
|
|
18967
18994
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(EditLabelForm, { ref: formRef, resourceModel });
|
|
18968
|
-
}
|
|
18995
|
+
},
|
|
18996
|
+
namespace: resourceModel.namespace || ""
|
|
18969
18997
|
};
|
|
18970
18998
|
pushModal({
|
|
18971
18999
|
component: EditFieldModal,
|
|
@@ -19049,6 +19077,7 @@ function EditAnnotationDropdownMenuItem(props) {
|
|
|
19049
19077
|
formRef,
|
|
19050
19078
|
title: t2("dovetail.edit_annotation"),
|
|
19051
19079
|
fullscreen: true,
|
|
19080
|
+
namespace: resourceModel.namespace || "",
|
|
19052
19081
|
renderContent() {
|
|
19053
19082
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(EditAnnotationForm, { ref: formRef, resourceModel });
|
|
19054
19083
|
}
|
|
@@ -19080,7 +19109,8 @@ function EditNodeTaintDropdownMenuItem(props) {
|
|
|
19080
19109
|
fullscreen: true,
|
|
19081
19110
|
renderContent() {
|
|
19082
19111
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(EditNodeTaintForm, { ref: formRef, nodeModel: resourceModel });
|
|
19083
|
-
}
|
|
19112
|
+
},
|
|
19113
|
+
namespace: resourceModel.namespace || ""
|
|
19084
19114
|
};
|
|
19085
19115
|
pushModal({
|
|
19086
19116
|
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-
|
|
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-d9e1f169.js";
|
|
2
2
|
import "@cloudtower/eagle";
|
|
3
3
|
import "@refinedev/core";
|
|
4
4
|
import "react";
|
package/dist/refine.umd.cjs
CHANGED
|
@@ -9236,7 +9236,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9236
9236
|
const close2 = React.useCallback(() => {
|
|
9237
9237
|
popModal();
|
|
9238
9238
|
reset();
|
|
9239
|
-
}, [reset]);
|
|
9239
|
+
}, [popModal, reset]);
|
|
9240
9240
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Modal, {
|
|
9241
9241
|
className: fullscreen ? FullscreenModalStyle : SmallModalStyle,
|
|
9242
9242
|
title: title || i18n2.t("dovetail.edit"),
|
|
@@ -9270,6 +9270,9 @@ var __publicField = (obj, key, value) => {
|
|
|
9270
9270
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
|
|
9271
9271
|
resource: resource == null ? void 0 : resource.name,
|
|
9272
9272
|
action: AccessControlAuth.Edit,
|
|
9273
|
+
params: {
|
|
9274
|
+
namespace: modalProps.namespace
|
|
9275
|
+
},
|
|
9273
9276
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, {
|
|
9274
9277
|
className: cx_default(EditButtonStyle, eagle.Typo.Label.l4_regular_title),
|
|
9275
9278
|
type: "link",
|
|
@@ -9481,6 +9484,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9481
9484
|
modalProps: {
|
|
9482
9485
|
formRef,
|
|
9483
9486
|
title: t2("dovetail.edit_distribute_storage"),
|
|
9487
|
+
namespace: pvc2.namespace || "",
|
|
9484
9488
|
renderContent() {
|
|
9485
9489
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9486
9490
|
DistributeStorageForm,
|
|
@@ -11177,11 +11181,17 @@ var __publicField = (obj, key, value) => {
|
|
|
11177
11181
|
const isInShowPage = useResourceResult.action === "show";
|
|
11178
11182
|
const { data: canEditData } = core.useCan({
|
|
11179
11183
|
resource: resource == null ? void 0 : resource.name,
|
|
11180
|
-
action: AccessControlAuth.Edit
|
|
11184
|
+
action: AccessControlAuth.Edit,
|
|
11185
|
+
params: {
|
|
11186
|
+
namespace: record.namespace
|
|
11187
|
+
}
|
|
11181
11188
|
});
|
|
11182
11189
|
const { data: canDeleteData } = core.useCan({
|
|
11183
11190
|
resource: resource == null ? void 0 : resource.name,
|
|
11184
|
-
action: AccessControlAuth.Delete
|
|
11191
|
+
action: AccessControlAuth.Delete,
|
|
11192
|
+
params: {
|
|
11193
|
+
namespace: record.namespace
|
|
11194
|
+
}
|
|
11185
11195
|
});
|
|
11186
11196
|
const formType = ((_a = config.formConfig) == null ? void 0 : _a.formType) || FormType.FORM;
|
|
11187
11197
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -12047,6 +12057,9 @@ var __publicField = (obj, key, value) => {
|
|
|
12047
12057
|
children: [(_e = showConfig.renderExtraButton) == null ? void 0 : _e.call(showConfig, record), !config.hideEdit ? /* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
|
|
12048
12058
|
resource: resource == null ? void 0 : resource.name,
|
|
12049
12059
|
action: AccessControlAuth.Edit,
|
|
12060
|
+
params: {
|
|
12061
|
+
namespace: record.namespace
|
|
12062
|
+
},
|
|
12050
12063
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, {
|
|
12051
12064
|
style: {
|
|
12052
12065
|
marginRight: 8
|
|
@@ -12896,6 +12909,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12896
12909
|
modalProps: {
|
|
12897
12910
|
formRef,
|
|
12898
12911
|
title: t2("dovetail.edit_replicas"),
|
|
12912
|
+
namespace: record.namespace || "",
|
|
12899
12913
|
renderContent() {
|
|
12900
12914
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(WorkloadReplicasForm, {
|
|
12901
12915
|
ref: formRef,
|
|
@@ -14033,7 +14047,10 @@ var __publicField = (obj, key, value) => {
|
|
|
14033
14047
|
const { t: t2 } = useTranslation();
|
|
14034
14048
|
const { data: canEditData } = core.useCan({
|
|
14035
14049
|
resource: resource == null ? void 0 : resource.name,
|
|
14036
|
-
action: AccessControlAuth.Edit
|
|
14050
|
+
action: AccessControlAuth.Edit,
|
|
14051
|
+
params: {
|
|
14052
|
+
namespace: record.namespace
|
|
14053
|
+
}
|
|
14037
14054
|
});
|
|
14038
14055
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(K8sDropdown, { record, size, children: [
|
|
14039
14056
|
(canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -14088,7 +14105,10 @@ var __publicField = (obj, key, value) => {
|
|
|
14088
14105
|
const isInShowPage = action === "show";
|
|
14089
14106
|
const { data: canEditData } = core.useCan({
|
|
14090
14107
|
resource: resource == null ? void 0 : resource.name,
|
|
14091
|
-
action: AccessControlAuth.Edit
|
|
14108
|
+
action: AccessControlAuth.Edit,
|
|
14109
|
+
params: {
|
|
14110
|
+
namespace: record.namespace
|
|
14111
|
+
}
|
|
14092
14112
|
});
|
|
14093
14113
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(WorkloadDropdown, { record, size, children: [
|
|
14094
14114
|
isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -14098,6 +14118,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14098
14118
|
const modalProps = {
|
|
14099
14119
|
formRef,
|
|
14100
14120
|
title: t2("dovetail.edit_replicas"),
|
|
14121
|
+
namespace: record.namespace || "",
|
|
14101
14122
|
renderContent() {
|
|
14102
14123
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
14103
14124
|
WorkloadReplicasForm,
|
|
@@ -16444,7 +16465,10 @@ var __publicField = (obj, key, value) => {
|
|
|
16444
16465
|
const pushModal = eagle.usePushModal();
|
|
16445
16466
|
const { data: canEditData } = core.useCan({
|
|
16446
16467
|
resource: resource == null ? void 0 : resource.name,
|
|
16447
|
-
action: AccessControlAuth.Edit
|
|
16468
|
+
action: AccessControlAuth.Edit,
|
|
16469
|
+
params: {
|
|
16470
|
+
namespace: record.namespace
|
|
16471
|
+
}
|
|
16448
16472
|
});
|
|
16449
16473
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(K8sDropdown, { record, size, children: [
|
|
16450
16474
|
(canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -18843,7 +18867,10 @@ var __publicField = (obj, key, value) => {
|
|
|
18843
18867
|
const { t: t2 } = useTranslation();
|
|
18844
18868
|
const { data: canEditData } = core.useCan({
|
|
18845
18869
|
resource: resource == null ? void 0 : resource.name,
|
|
18846
|
-
action: AccessControlAuth.Edit
|
|
18870
|
+
action: AccessControlAuth.Edit,
|
|
18871
|
+
params: {
|
|
18872
|
+
namespace: record.namespace
|
|
18873
|
+
}
|
|
18847
18874
|
});
|
|
18848
18875
|
const suspended = Boolean(spec == null ? void 0 : spec.suspend);
|
|
18849
18876
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(K8sDropdown, { record, size, children: (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -18962,7 +18989,8 @@ var __publicField = (obj, key, value) => {
|
|
|
18962
18989
|
fullscreen: true,
|
|
18963
18990
|
renderContent() {
|
|
18964
18991
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(EditLabelForm, { ref: formRef, resourceModel });
|
|
18965
|
-
}
|
|
18992
|
+
},
|
|
18993
|
+
namespace: resourceModel.namespace || ""
|
|
18966
18994
|
};
|
|
18967
18995
|
pushModal({
|
|
18968
18996
|
component: EditFieldModal,
|
|
@@ -19046,6 +19074,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19046
19074
|
formRef,
|
|
19047
19075
|
title: t2("dovetail.edit_annotation"),
|
|
19048
19076
|
fullscreen: true,
|
|
19077
|
+
namespace: resourceModel.namespace || "",
|
|
19049
19078
|
renderContent() {
|
|
19050
19079
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(EditAnnotationForm, { ref: formRef, resourceModel });
|
|
19051
19080
|
}
|
|
@@ -19077,7 +19106,8 @@ var __publicField = (obj, key, value) => {
|
|
|
19077
19106
|
fullscreen: true,
|
|
19078
19107
|
renderContent() {
|
|
19079
19108
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(EditNodeTaintForm, { ref: formRef, nodeModel: resourceModel });
|
|
19080
|
-
}
|
|
19109
|
+
},
|
|
19110
|
+
namespace: resourceModel.namespace || ""
|
|
19081
19111
|
};
|
|
19082
19112
|
pushModal({
|
|
19083
19113
|
component: EditFieldModal,
|
package/lib/types/resource.d.ts
CHANGED
|
@@ -166,7 +166,7 @@ export type ResourceConfig<Model extends ResourceModel = ResourceModel> = {
|
|
|
166
166
|
/** 是否隐藏创建功能 */
|
|
167
167
|
hideCreate?: boolean;
|
|
168
168
|
/** 资源的描述信息 */
|
|
169
|
-
description?:
|
|
169
|
+
description?: React.ReactNode;
|
|
170
170
|
/** 父级资源名称,用于建立资源层级关系。在 Dovetail2 中用不到这个 */
|
|
171
171
|
parent?: string;
|
|
172
172
|
/** 格式化数据参数,目前暂未完全实现,可能会删除 */
|