@dovetail-v2/refine 0.1.14-alpha.0 → 0.1.14-alpha.1
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-595d2c75.js → MonacoYamlDiffEditor-c3cc3648.js} +1 -1
- package/dist/{index-521e5f08.js → index-cfefd39c.js} +65 -57
- package/dist/refine.js +1 -1
- package/dist/refine.umd.cjs +64 -56
- package/dist/style.css +1 -0
- package/lib/i18n.d.ts +17 -18
- package/lib/locales/en-US/index.d.ts +17 -18
- package/package.json +1 -1
|
@@ -930,7 +930,7 @@ function useTranslation(ns) {
|
|
|
930
930
|
namespaces = typeof namespaces === "string" ? [namespaces] : namespaces || ["translation"];
|
|
931
931
|
if (i18n2.reportNamespaces.addUsedNamespaces)
|
|
932
932
|
i18n2.reportNamespaces.addUsedNamespaces(namespaces);
|
|
933
|
-
const
|
|
933
|
+
const ready = (i18n2.isInitialized || i18n2.initializedStoreOnce) && namespaces.every((n2) => hasLoadedNamespace(n2, i18n2, i18nOptions));
|
|
934
934
|
function getT() {
|
|
935
935
|
return i18n2.getFixedT(props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
|
|
936
936
|
}
|
|
@@ -946,7 +946,7 @@ function useTranslation(ns) {
|
|
|
946
946
|
bindI18nStore
|
|
947
947
|
} = i18nOptions;
|
|
948
948
|
isMounted.current = true;
|
|
949
|
-
if (!
|
|
949
|
+
if (!ready && !useSuspense) {
|
|
950
950
|
if (props.lng) {
|
|
951
951
|
loadLanguages(i18n2, props.lng, namespaces, () => {
|
|
952
952
|
if (isMounted.current)
|
|
@@ -959,7 +959,7 @@ function useTranslation(ns) {
|
|
|
959
959
|
});
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
|
-
if (
|
|
962
|
+
if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
|
|
963
963
|
setT(getT);
|
|
964
964
|
}
|
|
965
965
|
function boundReset() {
|
|
@@ -985,13 +985,13 @@ function useTranslation(ns) {
|
|
|
985
985
|
}
|
|
986
986
|
isInitial.current = false;
|
|
987
987
|
}, [i18n2, keyPrefix]);
|
|
988
|
-
const ret = [t2, i18n2,
|
|
988
|
+
const ret = [t2, i18n2, ready];
|
|
989
989
|
ret.t = t2;
|
|
990
990
|
ret.i18n = i18n2;
|
|
991
|
-
ret.ready =
|
|
992
|
-
if (
|
|
991
|
+
ret.ready = ready;
|
|
992
|
+
if (ready)
|
|
993
993
|
return ret;
|
|
994
|
-
if (!
|
|
994
|
+
if (!ready && !useSuspense)
|
|
995
995
|
return ret;
|
|
996
996
|
throw new Promise((resolve) => {
|
|
997
997
|
if (props.lng) {
|
|
@@ -1049,18 +1049,18 @@ const data$1 = "Data";
|
|
|
1049
1049
|
const resume$1 = "Resume";
|
|
1050
1050
|
const sessionAffinity$1 = "Session Affinity";
|
|
1051
1051
|
const log$1 = "Log";
|
|
1052
|
-
const
|
|
1053
|
-
const
|
|
1054
|
-
const
|
|
1055
|
-
const
|
|
1056
|
-
const
|
|
1057
|
-
const
|
|
1058
|
-
const
|
|
1059
|
-
const
|
|
1060
|
-
const
|
|
1061
|
-
const
|
|
1062
|
-
const
|
|
1063
|
-
const
|
|
1052
|
+
const ready_state$1 = "Ready";
|
|
1053
|
+
const updating_state$1 = "Updating";
|
|
1054
|
+
const completed_state$1 = "Completed";
|
|
1055
|
+
const abnormal_state$1 = "Failed";
|
|
1056
|
+
const suspended_state$1 = "Suspended";
|
|
1057
|
+
const running_state$1 = "Running";
|
|
1058
|
+
const terminating_state$1 = "Terminating";
|
|
1059
|
+
const terminated_state$1 = "Terminated";
|
|
1060
|
+
const succeeded_state$1 = "Succeeded";
|
|
1061
|
+
const unknown_state$1 = "Unknown";
|
|
1062
|
+
const pending_state$1 = "Pending";
|
|
1063
|
+
const waiting_state$1 = "Waiting";
|
|
1064
1064
|
const expand$1 = "Expand";
|
|
1065
1065
|
const fold$1 = "Collapse";
|
|
1066
1066
|
const rule$1 = "Rule";
|
|
@@ -1151,7 +1151,7 @@ const pod_port$1 = "Pod port";
|
|
|
1151
1151
|
const path_type$1 = "Path type";
|
|
1152
1152
|
const only_support_one_yaml$1 = "Only one YAML configuration is supported at a time.";
|
|
1153
1153
|
const not_support$1 = "Not supported";
|
|
1154
|
-
const
|
|
1154
|
+
const stopped_state$1 = "Stopped";
|
|
1155
1155
|
const any_node_ip$1 = "Any node IP";
|
|
1156
1156
|
const storage_class$1 = "Storage class";
|
|
1157
1157
|
const persistent_volume$1 = "Persistent volume";
|
|
@@ -1161,11 +1161,10 @@ const capacity$1 = "Capacity";
|
|
|
1161
1161
|
const volume_mode$1 = "Volume mode";
|
|
1162
1162
|
const access_mode$1 = "Access mode";
|
|
1163
1163
|
const block$1 = "Block";
|
|
1164
|
-
const
|
|
1165
|
-
const
|
|
1166
|
-
const
|
|
1167
|
-
const
|
|
1168
|
-
const pv_phase_pending = "Pending";
|
|
1164
|
+
const available_state$1 = "Available";
|
|
1165
|
+
const bound_state$1 = "Bound";
|
|
1166
|
+
const released_state$1 = "Released";
|
|
1167
|
+
const failed_state$1 = "Failed";
|
|
1169
1168
|
const exec_pod = "Execute shell";
|
|
1170
1169
|
const search$1 = "Search";
|
|
1171
1170
|
const edit_label$1 = "Edit label";
|
|
@@ -1219,18 +1218,18 @@ const dovetail$1 = {
|
|
|
1219
1218
|
resume: resume$1,
|
|
1220
1219
|
sessionAffinity: sessionAffinity$1,
|
|
1221
1220
|
log: log$1,
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1221
|
+
ready_state: ready_state$1,
|
|
1222
|
+
updating_state: updating_state$1,
|
|
1223
|
+
completed_state: completed_state$1,
|
|
1224
|
+
abnormal_state: abnormal_state$1,
|
|
1225
|
+
suspended_state: suspended_state$1,
|
|
1226
|
+
running_state: running_state$1,
|
|
1227
|
+
terminating_state: terminating_state$1,
|
|
1228
|
+
terminated_state: terminated_state$1,
|
|
1229
|
+
succeeded_state: succeeded_state$1,
|
|
1230
|
+
unknown_state: unknown_state$1,
|
|
1231
|
+
pending_state: pending_state$1,
|
|
1232
|
+
waiting_state: waiting_state$1,
|
|
1234
1233
|
expand: expand$1,
|
|
1235
1234
|
fold: fold$1,
|
|
1236
1235
|
rule: rule$1,
|
|
@@ -1323,7 +1322,7 @@ const dovetail$1 = {
|
|
|
1323
1322
|
path_type: path_type$1,
|
|
1324
1323
|
only_support_one_yaml: only_support_one_yaml$1,
|
|
1325
1324
|
not_support: not_support$1,
|
|
1326
|
-
|
|
1325
|
+
stopped_state: stopped_state$1,
|
|
1327
1326
|
any_node_ip: any_node_ip$1,
|
|
1328
1327
|
storage_class: storage_class$1,
|
|
1329
1328
|
persistent_volume: persistent_volume$1,
|
|
@@ -1333,11 +1332,10 @@ const dovetail$1 = {
|
|
|
1333
1332
|
volume_mode: volume_mode$1,
|
|
1334
1333
|
access_mode: access_mode$1,
|
|
1335
1334
|
block: block$1,
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
pv_phase_pending,
|
|
1335
|
+
available_state: available_state$1,
|
|
1336
|
+
bound_state: bound_state$1,
|
|
1337
|
+
released_state: released_state$1,
|
|
1338
|
+
failed_state: failed_state$1,
|
|
1341
1339
|
exec_pod,
|
|
1342
1340
|
search: search$1,
|
|
1343
1341
|
edit_label: edit_label$1
|
|
@@ -17231,7 +17229,7 @@ function requireReactDomServer_browser_development() {
|
|
|
17231
17229
|
ReactCurrentDispatcher.current = Dispatcher;
|
|
17232
17230
|
try {
|
|
17233
17231
|
var out = [""];
|
|
17234
|
-
var
|
|
17232
|
+
var suspended = false;
|
|
17235
17233
|
while (out[0].length < bytes) {
|
|
17236
17234
|
if (this.stack.length === 0) {
|
|
17237
17235
|
this.exhausted = true;
|
|
@@ -17239,7 +17237,7 @@ function requireReactDomServer_browser_development() {
|
|
|
17239
17237
|
break;
|
|
17240
17238
|
}
|
|
17241
17239
|
var frame = this.stack[this.stack.length - 1];
|
|
17242
|
-
if (
|
|
17240
|
+
if (suspended || frame.childIndex >= frame.children.length) {
|
|
17243
17241
|
var footer = frame.footer;
|
|
17244
17242
|
if (footer !== "") {
|
|
17245
17243
|
this.previousWasTextNode = false;
|
|
@@ -17253,8 +17251,8 @@ function requireReactDomServer_browser_development() {
|
|
|
17253
17251
|
} else if (frame.type === REACT_SUSPENSE_TYPE) {
|
|
17254
17252
|
this.suspenseDepth--;
|
|
17255
17253
|
var buffered = out.pop();
|
|
17256
|
-
if (
|
|
17257
|
-
|
|
17254
|
+
if (suspended) {
|
|
17255
|
+
suspended = false;
|
|
17258
17256
|
var fallbackFrame = frame.fallbackFrame;
|
|
17259
17257
|
if (!fallbackFrame) {
|
|
17260
17258
|
{
|
|
@@ -19204,7 +19202,7 @@ const PodLogTab = (i18n2) => ({
|
|
|
19204
19202
|
}
|
|
19205
19203
|
]
|
|
19206
19204
|
});
|
|
19207
|
-
const
|
|
19205
|
+
const style_j3z7so = "";
|
|
19208
19206
|
const ToolBarStyle = "t1joof7s";
|
|
19209
19207
|
const ToolBarHeaderStyle = "tti58uh";
|
|
19210
19208
|
const ErrorIconStyle = "e15yt16p";
|
|
@@ -33149,7 +33147,7 @@ const Shell = React__default.forwardRef(function Shell2(props, ref) {
|
|
|
33149
33147
|
});
|
|
33150
33148
|
}
|
|
33151
33149
|
}, [encode, send, props.fit]);
|
|
33152
|
-
const debouncedFit =
|
|
33150
|
+
const debouncedFit = useCallback(() => debounce(fit, 200), [fit]);
|
|
33153
33151
|
const flush = useCallback(() => {
|
|
33154
33152
|
const backlog = backlogRef.current.slice();
|
|
33155
33153
|
backlogRef.current = [];
|
|
@@ -38375,7 +38373,7 @@ const Separator = () => {
|
|
|
38375
38373
|
});
|
|
38376
38374
|
};
|
|
38377
38375
|
const MonacoYamlEditor = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
|
|
38378
|
-
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-
|
|
38376
|
+
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-c3cc3648.js"));
|
|
38379
38377
|
const YamlEditorComponent = forwardRef(
|
|
38380
38378
|
function YamlEditorComponent2(props, ref) {
|
|
38381
38379
|
const {
|
|
@@ -38819,7 +38817,7 @@ const useYamlForm = ({
|
|
|
38819
38817
|
pruneBeforeEdit(initialValues2);
|
|
38820
38818
|
}
|
|
38821
38819
|
return (transformInitValues == null ? void 0 : transformInitValues(initialValues2)) || initialValues2;
|
|
38822
|
-
}, [queryResult, globalStore, initialValuesForCreate, transformInitValues]);
|
|
38820
|
+
}, [queryResult, globalStore, initialValuesForCreate, action, initialValuesForEdit, transformInitValues]);
|
|
38823
38821
|
const finalErrors = useMemo(() => {
|
|
38824
38822
|
return uniq([...editorErrors, ...rulesErrors]);
|
|
38825
38823
|
}, [editorErrors, rulesErrors]);
|
|
@@ -38890,7 +38888,16 @@ const useYamlForm = ({
|
|
|
38890
38888
|
}
|
|
38891
38889
|
}
|
|
38892
38890
|
};
|
|
38893
|
-
}, [
|
|
38891
|
+
}, [
|
|
38892
|
+
schema,
|
|
38893
|
+
editorOptions == null ? void 0 : editorOptions.isGenerateAnnotations,
|
|
38894
|
+
initialValues,
|
|
38895
|
+
schemas,
|
|
38896
|
+
(_a = useResourceResult.resource) == null ? void 0 : _a.name,
|
|
38897
|
+
action,
|
|
38898
|
+
finalErrors,
|
|
38899
|
+
fold2
|
|
38900
|
+
]);
|
|
38894
38901
|
return {
|
|
38895
38902
|
form: formSF.form,
|
|
38896
38903
|
formProps: {
|
|
@@ -38903,6 +38910,7 @@ const useYamlForm = ({
|
|
|
38903
38910
|
].filter((error) => !!error);
|
|
38904
38911
|
if (errors.length) {
|
|
38905
38912
|
setEditorErrors(errors);
|
|
38913
|
+
setRulesErrors([]);
|
|
38906
38914
|
return;
|
|
38907
38915
|
}
|
|
38908
38916
|
const rulesErrors2 = validateYaml(((_a2 = editor.current) == null ? void 0 : _a2.getEditorValue()) || "");
|
|
@@ -39392,12 +39400,12 @@ function CronJobDropdown(props) {
|
|
|
39392
39400
|
resource: resource == null ? void 0 : resource.name,
|
|
39393
39401
|
action: AccessControlAuth.Edit
|
|
39394
39402
|
});
|
|
39395
|
-
const
|
|
39403
|
+
const suspended = Boolean(spec == null ? void 0 : spec.suspend);
|
|
39396
39404
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(K8sDropdown, { record, size, children: (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
39397
39405
|
Menu$1.Item,
|
|
39398
39406
|
{
|
|
39399
39407
|
onClick: async () => {
|
|
39400
|
-
const v =
|
|
39408
|
+
const v = suspended ? record.resume() : record.suspend();
|
|
39401
39409
|
const id = record.id;
|
|
39402
39410
|
pruneBeforeEdit(v);
|
|
39403
39411
|
await mutateAsync({
|
|
@@ -39406,7 +39414,7 @@ function CronJobDropdown(props) {
|
|
|
39406
39414
|
values: v,
|
|
39407
39415
|
successNotification() {
|
|
39408
39416
|
return {
|
|
39409
|
-
message: t2(
|
|
39417
|
+
message: t2(suspended ? "dovetail.resume_success_toast" : "dovetail.pause_success_toast", {
|
|
39410
39418
|
kind: record.kind,
|
|
39411
39419
|
name: id,
|
|
39412
39420
|
interpolation: {
|
|
@@ -39418,7 +39426,7 @@ function CronJobDropdown(props) {
|
|
|
39418
39426
|
},
|
|
39419
39427
|
errorNotification() {
|
|
39420
39428
|
return {
|
|
39421
|
-
message: t2(
|
|
39429
|
+
message: t2(suspended ? "dovetail.resume_failed_toast" : "dovetail.pause_failed_toast", {
|
|
39422
39430
|
kind: record.kind,
|
|
39423
39431
|
name: id,
|
|
39424
39432
|
interpolation: {
|
|
@@ -39430,7 +39438,7 @@ function CronJobDropdown(props) {
|
|
|
39430
39438
|
}
|
|
39431
39439
|
});
|
|
39432
39440
|
},
|
|
39433
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon$1, { src:
|
|
39441
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon$1, { src: suspended ? RecoverContinue16GradientBlueIcon : Pause16GradientBlueIcon, children: t2(suspended ? "dovetail.resume" : "dovetail.suspend") })
|
|
39434
39442
|
}
|
|
39435
39443
|
) : null });
|
|
39436
39444
|
}
|
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-cfefd39c.js";
|
|
2
2
|
import "@cloudtower/eagle";
|
|
3
3
|
import "@refinedev/core";
|
|
4
4
|
import "react";
|
package/dist/refine.umd.cjs
CHANGED
|
@@ -936,7 +936,7 @@ var __publicField = (obj, key, value) => {
|
|
|
936
936
|
namespaces = typeof namespaces === "string" ? [namespaces] : namespaces || ["translation"];
|
|
937
937
|
if (i18n2.reportNamespaces.addUsedNamespaces)
|
|
938
938
|
i18n2.reportNamespaces.addUsedNamespaces(namespaces);
|
|
939
|
-
const
|
|
939
|
+
const ready = (i18n2.isInitialized || i18n2.initializedStoreOnce) && namespaces.every((n2) => hasLoadedNamespace(n2, i18n2, i18nOptions));
|
|
940
940
|
function getT() {
|
|
941
941
|
return i18n2.getFixedT(props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
|
|
942
942
|
}
|
|
@@ -952,7 +952,7 @@ var __publicField = (obj, key, value) => {
|
|
|
952
952
|
bindI18nStore
|
|
953
953
|
} = i18nOptions;
|
|
954
954
|
isMounted.current = true;
|
|
955
|
-
if (!
|
|
955
|
+
if (!ready && !useSuspense) {
|
|
956
956
|
if (props.lng) {
|
|
957
957
|
loadLanguages(i18n2, props.lng, namespaces, () => {
|
|
958
958
|
if (isMounted.current)
|
|
@@ -965,7 +965,7 @@ var __publicField = (obj, key, value) => {
|
|
|
965
965
|
});
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
|
-
if (
|
|
968
|
+
if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
|
|
969
969
|
setT(getT);
|
|
970
970
|
}
|
|
971
971
|
function boundReset() {
|
|
@@ -991,13 +991,13 @@ var __publicField = (obj, key, value) => {
|
|
|
991
991
|
}
|
|
992
992
|
isInitial.current = false;
|
|
993
993
|
}, [i18n2, keyPrefix]);
|
|
994
|
-
const ret = [t2, i18n2,
|
|
994
|
+
const ret = [t2, i18n2, ready];
|
|
995
995
|
ret.t = t2;
|
|
996
996
|
ret.i18n = i18n2;
|
|
997
|
-
ret.ready =
|
|
998
|
-
if (
|
|
997
|
+
ret.ready = ready;
|
|
998
|
+
if (ready)
|
|
999
999
|
return ret;
|
|
1000
|
-
if (!
|
|
1000
|
+
if (!ready && !useSuspense)
|
|
1001
1001
|
return ret;
|
|
1002
1002
|
throw new Promise((resolve) => {
|
|
1003
1003
|
if (props.lng) {
|
|
@@ -1055,18 +1055,18 @@ var __publicField = (obj, key, value) => {
|
|
|
1055
1055
|
const resume$1 = "Resume";
|
|
1056
1056
|
const sessionAffinity$1 = "Session Affinity";
|
|
1057
1057
|
const log$1 = "Log";
|
|
1058
|
-
const
|
|
1059
|
-
const
|
|
1060
|
-
const
|
|
1061
|
-
const
|
|
1062
|
-
const
|
|
1063
|
-
const
|
|
1064
|
-
const
|
|
1065
|
-
const
|
|
1066
|
-
const
|
|
1067
|
-
const
|
|
1068
|
-
const
|
|
1069
|
-
const
|
|
1058
|
+
const ready_state$1 = "Ready";
|
|
1059
|
+
const updating_state$1 = "Updating";
|
|
1060
|
+
const completed_state$1 = "Completed";
|
|
1061
|
+
const abnormal_state$1 = "Failed";
|
|
1062
|
+
const suspended_state$1 = "Suspended";
|
|
1063
|
+
const running_state$1 = "Running";
|
|
1064
|
+
const terminating_state$1 = "Terminating";
|
|
1065
|
+
const terminated_state$1 = "Terminated";
|
|
1066
|
+
const succeeded_state$1 = "Succeeded";
|
|
1067
|
+
const unknown_state$1 = "Unknown";
|
|
1068
|
+
const pending_state$1 = "Pending";
|
|
1069
|
+
const waiting_state$1 = "Waiting";
|
|
1070
1070
|
const expand$1 = "Expand";
|
|
1071
1071
|
const fold$1 = "Collapse";
|
|
1072
1072
|
const rule$1 = "Rule";
|
|
@@ -1157,7 +1157,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1157
1157
|
const path_type$1 = "Path type";
|
|
1158
1158
|
const only_support_one_yaml$1 = "Only one YAML configuration is supported at a time.";
|
|
1159
1159
|
const not_support$1 = "Not supported";
|
|
1160
|
-
const
|
|
1160
|
+
const stopped_state$1 = "Stopped";
|
|
1161
1161
|
const any_node_ip$1 = "Any node IP";
|
|
1162
1162
|
const storage_class$1 = "Storage class";
|
|
1163
1163
|
const persistent_volume$1 = "Persistent volume";
|
|
@@ -1167,11 +1167,10 @@ var __publicField = (obj, key, value) => {
|
|
|
1167
1167
|
const volume_mode$1 = "Volume mode";
|
|
1168
1168
|
const access_mode$1 = "Access mode";
|
|
1169
1169
|
const block$1 = "Block";
|
|
1170
|
-
const
|
|
1171
|
-
const
|
|
1172
|
-
const
|
|
1173
|
-
const
|
|
1174
|
-
const pv_phase_pending = "Pending";
|
|
1170
|
+
const available_state$1 = "Available";
|
|
1171
|
+
const bound_state$1 = "Bound";
|
|
1172
|
+
const released_state$1 = "Released";
|
|
1173
|
+
const failed_state$1 = "Failed";
|
|
1175
1174
|
const exec_pod = "Execute shell";
|
|
1176
1175
|
const search$1 = "Search";
|
|
1177
1176
|
const edit_label$1 = "Edit label";
|
|
@@ -1225,18 +1224,18 @@ var __publicField = (obj, key, value) => {
|
|
|
1225
1224
|
resume: resume$1,
|
|
1226
1225
|
sessionAffinity: sessionAffinity$1,
|
|
1227
1226
|
log: log$1,
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1227
|
+
ready_state: ready_state$1,
|
|
1228
|
+
updating_state: updating_state$1,
|
|
1229
|
+
completed_state: completed_state$1,
|
|
1230
|
+
abnormal_state: abnormal_state$1,
|
|
1231
|
+
suspended_state: suspended_state$1,
|
|
1232
|
+
running_state: running_state$1,
|
|
1233
|
+
terminating_state: terminating_state$1,
|
|
1234
|
+
terminated_state: terminated_state$1,
|
|
1235
|
+
succeeded_state: succeeded_state$1,
|
|
1236
|
+
unknown_state: unknown_state$1,
|
|
1237
|
+
pending_state: pending_state$1,
|
|
1238
|
+
waiting_state: waiting_state$1,
|
|
1240
1239
|
expand: expand$1,
|
|
1241
1240
|
fold: fold$1,
|
|
1242
1241
|
rule: rule$1,
|
|
@@ -1329,7 +1328,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1329
1328
|
path_type: path_type$1,
|
|
1330
1329
|
only_support_one_yaml: only_support_one_yaml$1,
|
|
1331
1330
|
not_support: not_support$1,
|
|
1332
|
-
|
|
1331
|
+
stopped_state: stopped_state$1,
|
|
1333
1332
|
any_node_ip: any_node_ip$1,
|
|
1334
1333
|
storage_class: storage_class$1,
|
|
1335
1334
|
persistent_volume: persistent_volume$1,
|
|
@@ -1339,11 +1338,10 @@ var __publicField = (obj, key, value) => {
|
|
|
1339
1338
|
volume_mode: volume_mode$1,
|
|
1340
1339
|
access_mode: access_mode$1,
|
|
1341
1340
|
block: block$1,
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
pv_phase_pending,
|
|
1341
|
+
available_state: available_state$1,
|
|
1342
|
+
bound_state: bound_state$1,
|
|
1343
|
+
released_state: released_state$1,
|
|
1344
|
+
failed_state: failed_state$1,
|
|
1347
1345
|
exec_pod,
|
|
1348
1346
|
search: search$1,
|
|
1349
1347
|
edit_label: edit_label$1
|
|
@@ -17237,7 +17235,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17237
17235
|
ReactCurrentDispatcher.current = Dispatcher;
|
|
17238
17236
|
try {
|
|
17239
17237
|
var out = [""];
|
|
17240
|
-
var
|
|
17238
|
+
var suspended = false;
|
|
17241
17239
|
while (out[0].length < bytes) {
|
|
17242
17240
|
if (this.stack.length === 0) {
|
|
17243
17241
|
this.exhausted = true;
|
|
@@ -17245,7 +17243,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17245
17243
|
break;
|
|
17246
17244
|
}
|
|
17247
17245
|
var frame = this.stack[this.stack.length - 1];
|
|
17248
|
-
if (
|
|
17246
|
+
if (suspended || frame.childIndex >= frame.children.length) {
|
|
17249
17247
|
var footer = frame.footer;
|
|
17250
17248
|
if (footer !== "") {
|
|
17251
17249
|
this.previousWasTextNode = false;
|
|
@@ -17259,8 +17257,8 @@ var __publicField = (obj, key, value) => {
|
|
|
17259
17257
|
} else if (frame.type === REACT_SUSPENSE_TYPE) {
|
|
17260
17258
|
this.suspenseDepth--;
|
|
17261
17259
|
var buffered = out.pop();
|
|
17262
|
-
if (
|
|
17263
|
-
|
|
17260
|
+
if (suspended) {
|
|
17261
|
+
suspended = false;
|
|
17264
17262
|
var fallbackFrame = frame.fallbackFrame;
|
|
17265
17263
|
if (!fallbackFrame) {
|
|
17266
17264
|
{
|
|
@@ -19210,7 +19208,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19210
19208
|
}
|
|
19211
19209
|
]
|
|
19212
19210
|
});
|
|
19213
|
-
const
|
|
19211
|
+
const style_j3z7so = "";
|
|
19214
19212
|
const ToolBarStyle = "t1joof7s";
|
|
19215
19213
|
const ToolBarHeaderStyle = "tti58uh";
|
|
19216
19214
|
const ErrorIconStyle = "e15yt16p";
|
|
@@ -33155,7 +33153,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
33155
33153
|
});
|
|
33156
33154
|
}
|
|
33157
33155
|
}, [encode, send, props.fit]);
|
|
33158
|
-
const debouncedFit = React.
|
|
33156
|
+
const debouncedFit = React.useCallback(() => lodashEs.debounce(fit, 200), [fit]);
|
|
33159
33157
|
const flush = React.useCallback(() => {
|
|
33160
33158
|
const backlog = backlogRef.current.slice();
|
|
33161
33159
|
backlogRef.current = [];
|
|
@@ -38825,7 +38823,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
38825
38823
|
pruneBeforeEdit(initialValues2);
|
|
38826
38824
|
}
|
|
38827
38825
|
return (transformInitValues == null ? void 0 : transformInitValues(initialValues2)) || initialValues2;
|
|
38828
|
-
}, [queryResult, globalStore, initialValuesForCreate, transformInitValues]);
|
|
38826
|
+
}, [queryResult, globalStore, initialValuesForCreate, action, initialValuesForEdit, transformInitValues]);
|
|
38829
38827
|
const finalErrors = React.useMemo(() => {
|
|
38830
38828
|
return lodashEs.uniq([...editorErrors, ...rulesErrors]);
|
|
38831
38829
|
}, [editorErrors, rulesErrors]);
|
|
@@ -38896,7 +38894,16 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
38896
38894
|
}
|
|
38897
38895
|
}
|
|
38898
38896
|
};
|
|
38899
|
-
}, [
|
|
38897
|
+
}, [
|
|
38898
|
+
schema,
|
|
38899
|
+
editorOptions == null ? void 0 : editorOptions.isGenerateAnnotations,
|
|
38900
|
+
initialValues,
|
|
38901
|
+
schemas,
|
|
38902
|
+
(_a = useResourceResult.resource) == null ? void 0 : _a.name,
|
|
38903
|
+
action,
|
|
38904
|
+
finalErrors,
|
|
38905
|
+
fold2
|
|
38906
|
+
]);
|
|
38900
38907
|
return {
|
|
38901
38908
|
form: formSF.form,
|
|
38902
38909
|
formProps: {
|
|
@@ -38909,6 +38916,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
38909
38916
|
].filter((error) => !!error);
|
|
38910
38917
|
if (errors.length) {
|
|
38911
38918
|
setEditorErrors(errors);
|
|
38919
|
+
setRulesErrors([]);
|
|
38912
38920
|
return;
|
|
38913
38921
|
}
|
|
38914
38922
|
const rulesErrors2 = validateYaml(((_a2 = editor.current) == null ? void 0 : _a2.getEditorValue()) || "");
|
|
@@ -39398,12 +39406,12 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39398
39406
|
resource: resource == null ? void 0 : resource.name,
|
|
39399
39407
|
action: AccessControlAuth.Edit
|
|
39400
39408
|
});
|
|
39401
|
-
const
|
|
39409
|
+
const suspended = Boolean(spec == null ? void 0 : spec.suspend);
|
|
39402
39410
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(K8sDropdown, { record, size, children: (canEditData == null ? void 0 : canEditData.can) !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
39403
39411
|
eagle.Menu.Item,
|
|
39404
39412
|
{
|
|
39405
39413
|
onClick: async () => {
|
|
39406
|
-
const v =
|
|
39414
|
+
const v = suspended ? record.resume() : record.suspend();
|
|
39407
39415
|
const id = record.id;
|
|
39408
39416
|
pruneBeforeEdit(v);
|
|
39409
39417
|
await mutateAsync({
|
|
@@ -39412,7 +39420,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39412
39420
|
values: v,
|
|
39413
39421
|
successNotification() {
|
|
39414
39422
|
return {
|
|
39415
|
-
message: t2(
|
|
39423
|
+
message: t2(suspended ? "dovetail.resume_success_toast" : "dovetail.pause_success_toast", {
|
|
39416
39424
|
kind: record.kind,
|
|
39417
39425
|
name: id,
|
|
39418
39426
|
interpolation: {
|
|
@@ -39424,7 +39432,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39424
39432
|
},
|
|
39425
39433
|
errorNotification() {
|
|
39426
39434
|
return {
|
|
39427
|
-
message: t2(
|
|
39435
|
+
message: t2(suspended ? "dovetail.resume_failed_toast" : "dovetail.pause_failed_toast", {
|
|
39428
39436
|
kind: record.kind,
|
|
39429
39437
|
name: id,
|
|
39430
39438
|
interpolation: {
|
|
@@ -39436,7 +39444,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39436
39444
|
}
|
|
39437
39445
|
});
|
|
39438
39446
|
},
|
|
39439
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Icon, { src:
|
|
39447
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Icon, { src: suspended ? iconsReact.RecoverContinue16GradientBlueIcon : iconsReact.Pause16GradientBlueIcon, children: t2(suspended ? "dovetail.resume" : "dovetail.suspend") })
|
|
39440
39448
|
}
|
|
39441
39449
|
) : null });
|
|
39442
39450
|
}
|
package/dist/style.css
CHANGED
package/lib/i18n.d.ts
CHANGED
|
@@ -52,18 +52,18 @@ export declare const resources: {
|
|
|
52
52
|
resume: string;
|
|
53
53
|
sessionAffinity: string;
|
|
54
54
|
log: string;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
55
|
+
ready_state: string;
|
|
56
|
+
updating_state: string;
|
|
57
|
+
completed_state: string;
|
|
58
|
+
abnormal_state: string;
|
|
59
|
+
suspended_state: string;
|
|
60
|
+
running_state: string;
|
|
61
|
+
terminating_state: string;
|
|
62
|
+
terminated_state: string;
|
|
63
|
+
succeeded_state: string;
|
|
64
|
+
unknown_state: string;
|
|
65
|
+
pending_state: string;
|
|
66
|
+
waiting_state: string;
|
|
67
67
|
expand: string;
|
|
68
68
|
fold: string;
|
|
69
69
|
rule: string;
|
|
@@ -156,7 +156,7 @@ export declare const resources: {
|
|
|
156
156
|
path_type: string;
|
|
157
157
|
only_support_one_yaml: string;
|
|
158
158
|
not_support: string;
|
|
159
|
-
|
|
159
|
+
stopped_state: string;
|
|
160
160
|
any_node_ip: string;
|
|
161
161
|
storage_class: string;
|
|
162
162
|
persistent_volume: string;
|
|
@@ -166,11 +166,10 @@ export declare const resources: {
|
|
|
166
166
|
volume_mode: string;
|
|
167
167
|
access_mode: string;
|
|
168
168
|
block: string;
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
pv_phase_pending: string;
|
|
169
|
+
available_state: string;
|
|
170
|
+
bound_state: string;
|
|
171
|
+
released_state: string;
|
|
172
|
+
failed_state: string;
|
|
174
173
|
exec_pod: string;
|
|
175
174
|
search: string;
|
|
176
175
|
edit_label: string;
|
|
@@ -49,18 +49,18 @@ declare const _default: {
|
|
|
49
49
|
resume: string;
|
|
50
50
|
sessionAffinity: string;
|
|
51
51
|
log: string;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
52
|
+
ready_state: string;
|
|
53
|
+
updating_state: string;
|
|
54
|
+
completed_state: string;
|
|
55
|
+
abnormal_state: string;
|
|
56
|
+
suspended_state: string;
|
|
57
|
+
running_state: string;
|
|
58
|
+
terminating_state: string;
|
|
59
|
+
terminated_state: string;
|
|
60
|
+
succeeded_state: string;
|
|
61
|
+
unknown_state: string;
|
|
62
|
+
pending_state: string;
|
|
63
|
+
waiting_state: string;
|
|
64
64
|
expand: string;
|
|
65
65
|
fold: string;
|
|
66
66
|
rule: string;
|
|
@@ -153,7 +153,7 @@ declare const _default: {
|
|
|
153
153
|
path_type: string;
|
|
154
154
|
only_support_one_yaml: string;
|
|
155
155
|
not_support: string;
|
|
156
|
-
|
|
156
|
+
stopped_state: string;
|
|
157
157
|
any_node_ip: string;
|
|
158
158
|
storage_class: string;
|
|
159
159
|
persistent_volume: string;
|
|
@@ -163,11 +163,10 @@ declare const _default: {
|
|
|
163
163
|
volume_mode: string;
|
|
164
164
|
access_mode: string;
|
|
165
165
|
block: string;
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
pv_phase_pending: string;
|
|
166
|
+
available_state: string;
|
|
167
|
+
bound_state: string;
|
|
168
|
+
released_state: string;
|
|
169
|
+
failed_state: string;
|
|
171
170
|
exec_pod: string;
|
|
172
171
|
search: string;
|
|
173
172
|
edit_label: string;
|