@dovetail-v2/refine 0.1.15-alpha.0 → 0.1.15-alpha.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.
- package/dist/{MonacoYamlDiffEditor-22b5ead6.js → MonacoYamlDiffEditor-8f26322f.js} +1 -1
- package/dist/{index-11293d19.js → index-8560b9d7.js} +11 -6
- package/dist/refine.js +1 -1
- package/dist/refine.umd.cjs +10 -5
- package/lib/components/ShowContent/fields.d.ts +0 -1
- package/lib/constants/k8s.d.ts +1 -0
- package/lib/i18n.d.ts +1 -0
- package/lib/locales/zh-CN/index.d.ts +1 -0
- package/lib/types/resource.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1548,6 +1548,7 @@ const change_form_mode_alert = "从编辑 YAML 切回表单编辑,将无法保
|
|
|
1548
1548
|
const pvc_storage_required = "请填写分配量。";
|
|
1549
1549
|
const pvc_storage_min = "请输入正整数。";
|
|
1550
1550
|
const pvc_storage_reduce_limit = "输入值不得小于当前数值。";
|
|
1551
|
+
const pvc_storage_max_limit = "分配量不能超过 64TiB。";
|
|
1551
1552
|
const key_empty_text = "请填写键。";
|
|
1552
1553
|
const format_error = "格式错误。";
|
|
1553
1554
|
const taint_effect_empty_text = "请选择效果。";
|
|
@@ -1782,6 +1783,7 @@ const dovetail = {
|
|
|
1782
1783
|
pvc_storage_required,
|
|
1783
1784
|
pvc_storage_min,
|
|
1784
1785
|
pvc_storage_reduce_limit,
|
|
1786
|
+
pvc_storage_max_limit,
|
|
1785
1787
|
key_empty_text,
|
|
1786
1788
|
format_error,
|
|
1787
1789
|
taint_effect_empty_text,
|
|
@@ -9504,6 +9506,8 @@ const DistributeStorageForm = React__default.forwardRef(function DistributeStora
|
|
|
9504
9506
|
return t2("dovetail.pvc_storage_required");
|
|
9505
9507
|
} else if (value2 < defaultValue) {
|
|
9506
9508
|
return t2("dovetail.pvc_storage_reduce_limit");
|
|
9509
|
+
} else if (value2 > 64 * 1024) {
|
|
9510
|
+
return t2("dovetail.pvc_storage_max_limit");
|
|
9507
9511
|
}
|
|
9508
9512
|
return "";
|
|
9509
9513
|
}
|
|
@@ -10243,7 +10247,7 @@ const STORAGE_CLASS_INIT_VALUE = {
|
|
|
10243
10247
|
"csi.storage.k8s.io/fstype": "ext4"
|
|
10244
10248
|
},
|
|
10245
10249
|
"provisioner": "",
|
|
10246
|
-
"reclaimPolicy": "",
|
|
10250
|
+
"reclaimPolicy": "Delete",
|
|
10247
10251
|
"allowVolumeExpansion": true,
|
|
10248
10252
|
"volumeBindingMode": "Immediate"
|
|
10249
10253
|
};
|
|
@@ -10275,10 +10279,11 @@ const PVC_INIT_VALUE = {
|
|
|
10275
10279
|
"accessModes": [],
|
|
10276
10280
|
"resources": {
|
|
10277
10281
|
"requests": {
|
|
10278
|
-
"storage": "
|
|
10282
|
+
"storage": "10Gi"
|
|
10279
10283
|
}
|
|
10280
10284
|
},
|
|
10281
|
-
"storageClassName": ""
|
|
10285
|
+
"storageClassName": "",
|
|
10286
|
+
"volumeMode": "Filesystem"
|
|
10282
10287
|
}
|
|
10283
10288
|
};
|
|
10284
10289
|
var ResourceState = /* @__PURE__ */ ((ResourceState2) => {
|
|
@@ -11252,7 +11257,7 @@ function K8sDropdown(props) {
|
|
|
11252
11257
|
Dropdown,
|
|
11253
11258
|
{
|
|
11254
11259
|
overlay: /* @__PURE__ */ jsxRuntimeExports.jsxs(Menu$1, { children: [
|
|
11255
|
-
isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(Menu$1.Item, { onClick: openForm, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon$1, { src: EditPen16PrimaryIcon, children: ((_a = config.formConfig) == null ? void 0 : _a.fields) ? t2("dovetail.edit") : t2("dovetail.edit_yaml") }) }),
|
|
11260
|
+
isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false || config.hideEdit ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(Menu$1.Item, { onClick: openForm, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon$1, { src: EditPen16PrimaryIcon, children: ((_a = config.formConfig) == null ? void 0 : _a.fields) ? t2("dovetail.edit") : t2("dovetail.edit_yaml") }) }),
|
|
11256
11261
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11257
11262
|
Menu$1.Item,
|
|
11258
11263
|
{
|
|
@@ -12087,7 +12092,7 @@ const ShowContent = (props) => {
|
|
|
12087
12092
|
resourceKind: (_d = resource == null ? void 0 : resource.meta) == null ? void 0 : _d.kind
|
|
12088
12093
|
}) : void 0]
|
|
12089
12094
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
|
|
12090
|
-
children: [(_e = showConfig.renderExtraButton) == null ? void 0 : _e.call(showConfig, record), !
|
|
12095
|
+
children: [(_e = showConfig.renderExtraButton) == null ? void 0 : _e.call(showConfig, record), !config.hideEdit ? /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
|
|
12091
12096
|
resource: resource == null ? void 0 : resource.name,
|
|
12092
12097
|
action: AccessControlAuth.Edit,
|
|
12093
12098
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
|
|
@@ -38393,7 +38398,7 @@ const Separator = () => {
|
|
|
38393
38398
|
});
|
|
38394
38399
|
};
|
|
38395
38400
|
const MonacoYamlEditor = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
|
|
38396
|
-
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-
|
|
38401
|
+
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-8f26322f.js"));
|
|
38397
38402
|
const YamlEditorComponent = forwardRef(
|
|
38398
38403
|
function YamlEditorComponent2(props, ref) {
|
|
38399
38404
|
const {
|
package/dist/refine.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bN, cC, A, aW, aY, aF, ca, bk, a1, co, cc, aQ, T, C, i, cG, aI, bp, ac, cI, ai, ap, cR, ax, cd, cb, cU, aM, bw, w, aD, bD, cT, cD, bG, D, b1, as, bJ, ar, at, a0, c9, c8, cS, bi, aU, ad, bQ, cF, cH, cm, aG, aj, s, q, cJ, I, bt, aT, t, M, be, bg, ce, cL, aL, bs, aq, ay, az, a8, aA, aX, aE, bE, bH, a9, d2, cn, cx, bM, N, a2, e, aV, a6, bP, by, bx, cK, b$, cZ, g, cY, aJ, bq, cg, L, ba, bb, bo, H, bc, J, bd, B, b5, cA, z, b4, G, b8, E, b6, F, b7, K, c0, b9, cz, aa, d0, c$, P, bm, v, ae, ah, b_, bj, cP, cO, a$, bu, c6, c5, p, aK, bl, x, bv, b0, d1, y, cq, cE, bK, bR, bS, d4, aH, R, ag, an, am, bL, ak, cQ, c2, al, cB, c7, bh, bA, au, h, Q, O, bf, ct, cw, cs, cr, cu, cv, cp, ch, ck, cl, cj, ci, cf, cy, bT, aN, br, aB, m, bW, l, aZ, cX, o, bX, a_, n, aS, bn, k, cW, aP, aR, c4, bC, bB, c3, aO, S, bF, cV, c_, b2, b3, bz, bI, c1, bY, bZ, ab, $, cN, af, W, cM, ao, aw, av, f, aC, bU, U, a3, d, d7, d6, d9, d3, a7, da, d5, d8, a5, a4, r, a, c, X, V, Y, Z, u, bO, _, bV, b } from "./index-
|
|
1
|
+
import { bN, cC, A, aW, aY, aF, ca, bk, a1, co, cc, aQ, T, C, i, cG, aI, bp, ac, cI, ai, ap, cR, ax, cd, cb, cU, aM, bw, w, aD, bD, cT, cD, bG, D, b1, as, bJ, ar, at, a0, c9, c8, cS, bi, aU, ad, bQ, cF, cH, cm, aG, aj, s, q, cJ, I, bt, aT, t, M, be, bg, ce, cL, aL, bs, aq, ay, az, a8, aA, aX, aE, bE, bH, a9, d2, cn, cx, bM, N, a2, e, aV, a6, bP, by, bx, cK, b$, cZ, g, cY, aJ, bq, cg, L, ba, bb, bo, H, bc, J, bd, B, b5, cA, z, b4, G, b8, E, b6, F, b7, K, c0, b9, cz, aa, d0, c$, P, bm, v, ae, ah, b_, bj, cP, cO, a$, bu, c6, c5, p, aK, bl, x, bv, b0, d1, y, cq, cE, bK, bR, bS, d4, aH, R, ag, an, am, bL, ak, cQ, c2, al, cB, c7, bh, bA, au, h, Q, O, bf, ct, cw, cs, cr, cu, cv, cp, ch, ck, cl, cj, ci, cf, cy, bT, aN, br, aB, m, bW, l, aZ, cX, o, bX, a_, n, aS, bn, k, cW, aP, aR, c4, bC, bB, c3, aO, S, bF, cV, c_, b2, b3, bz, bI, c1, bY, bZ, ab, $, cN, af, W, cM, ao, aw, av, f, aC, bU, U, a3, d, d7, d6, d9, d3, a7, da, d5, d8, a5, a4, r, a, c, X, V, Y, Z, u, bO, _, bV, b } from "./index-8560b9d7.js";
|
|
2
2
|
import "@cloudtower/eagle";
|
|
3
3
|
import "@refinedev/core";
|
|
4
4
|
import "react";
|
package/dist/refine.umd.cjs
CHANGED
|
@@ -1554,6 +1554,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1554
1554
|
const pvc_storage_required = "请填写分配量。";
|
|
1555
1555
|
const pvc_storage_min = "请输入正整数。";
|
|
1556
1556
|
const pvc_storage_reduce_limit = "输入值不得小于当前数值。";
|
|
1557
|
+
const pvc_storage_max_limit = "分配量不能超过 64TiB。";
|
|
1557
1558
|
const key_empty_text = "请填写键。";
|
|
1558
1559
|
const format_error = "格式错误。";
|
|
1559
1560
|
const taint_effect_empty_text = "请选择效果。";
|
|
@@ -1788,6 +1789,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1788
1789
|
pvc_storage_required,
|
|
1789
1790
|
pvc_storage_min,
|
|
1790
1791
|
pvc_storage_reduce_limit,
|
|
1792
|
+
pvc_storage_max_limit,
|
|
1791
1793
|
key_empty_text,
|
|
1792
1794
|
format_error,
|
|
1793
1795
|
taint_effect_empty_text,
|
|
@@ -9510,6 +9512,8 @@ var __publicField = (obj, key, value) => {
|
|
|
9510
9512
|
return t2("dovetail.pvc_storage_required");
|
|
9511
9513
|
} else if (value2 < defaultValue) {
|
|
9512
9514
|
return t2("dovetail.pvc_storage_reduce_limit");
|
|
9515
|
+
} else if (value2 > 64 * 1024) {
|
|
9516
|
+
return t2("dovetail.pvc_storage_max_limit");
|
|
9513
9517
|
}
|
|
9514
9518
|
return "";
|
|
9515
9519
|
}
|
|
@@ -10249,7 +10253,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10249
10253
|
"csi.storage.k8s.io/fstype": "ext4"
|
|
10250
10254
|
},
|
|
10251
10255
|
"provisioner": "",
|
|
10252
|
-
"reclaimPolicy": "",
|
|
10256
|
+
"reclaimPolicy": "Delete",
|
|
10253
10257
|
"allowVolumeExpansion": true,
|
|
10254
10258
|
"volumeBindingMode": "Immediate"
|
|
10255
10259
|
};
|
|
@@ -10281,10 +10285,11 @@ var __publicField = (obj, key, value) => {
|
|
|
10281
10285
|
"accessModes": [],
|
|
10282
10286
|
"resources": {
|
|
10283
10287
|
"requests": {
|
|
10284
|
-
"storage": "
|
|
10288
|
+
"storage": "10Gi"
|
|
10285
10289
|
}
|
|
10286
10290
|
},
|
|
10287
|
-
"storageClassName": ""
|
|
10291
|
+
"storageClassName": "",
|
|
10292
|
+
"volumeMode": "Filesystem"
|
|
10288
10293
|
}
|
|
10289
10294
|
};
|
|
10290
10295
|
var ResourceState = /* @__PURE__ */ ((ResourceState2) => {
|
|
@@ -11258,7 +11263,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11258
11263
|
eagle.Dropdown,
|
|
11259
11264
|
{
|
|
11260
11265
|
overlay: /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Menu, { children: [
|
|
11261
|
-
isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Menu.Item, { onClick: openForm, children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Icon, { src: iconsReact.EditPen16PrimaryIcon, children: ((_a = config.formConfig) == null ? void 0 : _a.fields) ? t2("dovetail.edit") : t2("dovetail.edit_yaml") }) }),
|
|
11266
|
+
isInShowPage || (canEditData == null ? void 0 : canEditData.can) === false || config.hideEdit ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Menu.Item, { onClick: openForm, children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Icon, { src: iconsReact.EditPen16PrimaryIcon, children: ((_a = config.formConfig) == null ? void 0 : _a.fields) ? t2("dovetail.edit") : t2("dovetail.edit_yaml") }) }),
|
|
11262
11267
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11263
11268
|
eagle.Menu.Item,
|
|
11264
11269
|
{
|
|
@@ -12093,7 +12098,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12093
12098
|
resourceKind: (_d = resource == null ? void 0 : resource.meta) == null ? void 0 : _d.kind
|
|
12094
12099
|
}) : void 0]
|
|
12095
12100
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, {
|
|
12096
|
-
children: [(_e = showConfig.renderExtraButton) == null ? void 0 : _e.call(showConfig, record), !
|
|
12101
|
+
children: [(_e = showConfig.renderExtraButton) == null ? void 0 : _e.call(showConfig, record), !config.hideEdit ? /* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
|
|
12097
12102
|
resource: resource == null ? void 0 : resource.name,
|
|
12098
12103
|
action: AccessControlAuth.Edit,
|
|
12099
12104
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, {
|
|
@@ -34,7 +34,6 @@ export type ShowTab<Model extends ResourceModel> = {
|
|
|
34
34
|
export interface ShowConfig<Model extends ResourceModel = ResourceModel> {
|
|
35
35
|
tabs?: ShowTab<Model>[];
|
|
36
36
|
renderExtraButton?: (record: Model) => React.ReactNode;
|
|
37
|
-
hideEditYamlButton?: boolean;
|
|
38
37
|
}
|
|
39
38
|
export declare const ImageField: <Model extends WorkloadBaseModel>(i18n: I18nType) => ShowField<Model>;
|
|
40
39
|
export declare const ReplicaField: <Model extends JobModel | WorkloadModel>() => ShowField<Model>;
|
package/lib/constants/k8s.d.ts
CHANGED
package/lib/i18n.d.ts
CHANGED
|
@@ -385,6 +385,7 @@ export declare const resources: {
|
|
|
385
385
|
pvc_storage_required: string;
|
|
386
386
|
pvc_storage_min: string;
|
|
387
387
|
pvc_storage_reduce_limit: string;
|
|
388
|
+
pvc_storage_max_limit: string;
|
|
388
389
|
key_empty_text: string;
|
|
389
390
|
format_error: string;
|
|
390
391
|
taint_effect_empty_text: string;
|
package/lib/types/resource.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export type ResourceConfig<Model extends ResourceModel = ResourceModel> = {
|
|
|
30
30
|
displayName?: string;
|
|
31
31
|
hideListToolBar?: boolean;
|
|
32
32
|
hideNamespacesFilter?: boolean;
|
|
33
|
+
hideEdit?: boolean;
|
|
33
34
|
description?: string;
|
|
34
35
|
parent?: RESOURCE_GROUP;
|
|
35
36
|
formatter?: (v: Model) => Model;
|