@dovetail-v2/refine 0.0.20 → 0.0.21
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-caec6da3.js → MonacoYamlDiffEditor-4436e990.js} +2 -2
- package/dist/{index-dce89c8c.js → index-21a94e67.js} +1124 -1120
- package/dist/refine.js +101 -100
- package/dist/refine.umd.cjs +1027 -1023
- package/lib/src/Dovetail.d.ts +0 -2
- package/lib/src/components/ShowContent/fields.d.ts +12 -11
- package/lib/src/hooks/useEagleTable/columns.d.ts +16 -15
- package/lib/src/i18n.d.ts +1 -0
- package/lib/src/index.d.ts +1 -0
- package/lib/src/locales/en-US/index.d.ts +1 -0
- package/lib/src/pages/configmaps/index.d.ts +2 -1
- package/lib/src/pages/ingresses/index.d.ts +2 -1
- package/lib/src/pages/jobs/index.d.ts +2 -1
- package/lib/src/pages/networkPolicies/index.d.ts +2 -1
- package/lib/src/pages/secrets/index.d.ts +2 -1
- package/lib/src/pages/services/index.d.ts +2 -1
- package/package.json +1 -1
package/dist/refine.umd.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(global2, factory) {
|
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@refinedev/core"), require("qs"), require("react"), require("react-router-dom"), require("@cloudtower/eagle"), require("js-yaml"), require("lodash-es"), require("sunflower-antd"), require("
|
|
3
|
-
})(this, function(exports2, core, qs, React, reactRouterDom, eagle, yaml, lodashEs, sunflowerAntd,
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("i18next"), require("@refinedev/core"), require("qs"), require("react"), require("react-router-dom"), require("@cloudtower/eagle"), require("js-yaml"), require("lodash-es"), require("sunflower-antd"), require("@cloudtower/icons-react"), require("monaco-editor"), require("monaco-yaml"), require("react-dom"), require("antd"), require("k8s-api-provider")) : typeof define === "function" && define.amd ? define(["exports", "i18next", "@refinedev/core", "qs", "react", "react-router-dom", "@cloudtower/eagle", "js-yaml", "lodash-es", "sunflower-antd", "@cloudtower/icons-react", "monaco-editor", "monaco-yaml", "react-dom", "antd", "k8s-api-provider"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.dovetail = {}, global2.i18n, global2.core, global2.qs, global2.React, global2.reactRouterDom, global2.eagle, global2.yaml, global2.lodashEs, global2.sunflowerAntd, global2.iconsReact, global2.monaco, global2.monacoYaml, global2.ReactDOM, global2.antd, global2.k8sApiProvider));
|
|
3
|
+
})(this, function(exports2, i18n, core, qs, React, reactRouterDom, eagle, yaml, lodashEs, sunflowerAntd, iconsReact, monaco, monacoYaml, ReactDOM, antd, k8sApiProvider) {
|
|
4
4
|
"use strict";var __defProp = Object.defineProperty;
|
|
5
5
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
6
|
var __publicField = (obj, key, value) => {
|
|
@@ -30,247 +30,758 @@ var __publicField = (obj, key, value) => {
|
|
|
30
30
|
function getDefaultExportFromCjs(x) {
|
|
31
31
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/
|
|
43
|
-
var hasRequiredReactJsxRuntime_production_min;
|
|
44
|
-
function requireReactJsxRuntime_production_min() {
|
|
45
|
-
if (hasRequiredReactJsxRuntime_production_min)
|
|
46
|
-
return reactJsxRuntime_production_min;
|
|
47
|
-
hasRequiredReactJsxRuntime_production_min = 1;
|
|
48
|
-
var f = React, g = 60103;
|
|
49
|
-
reactJsxRuntime_production_min.Fragment = 60107;
|
|
50
|
-
if ("function" === typeof Symbol && Symbol.for) {
|
|
51
|
-
var h = Symbol.for;
|
|
52
|
-
g = h("react.element");
|
|
53
|
-
reactJsxRuntime_production_min.Fragment = h("react.fragment");
|
|
33
|
+
function warn() {
|
|
34
|
+
if (console && console.warn) {
|
|
35
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
36
|
+
args[_key] = arguments[_key];
|
|
37
|
+
}
|
|
38
|
+
if (typeof args[0] === "string")
|
|
39
|
+
args[0] = `react-i18next:: ${args[0]}`;
|
|
40
|
+
console.warn(...args);
|
|
54
41
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
void 0 !== a.ref && (l = a.ref);
|
|
61
|
-
for (b in a)
|
|
62
|
-
n.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
|
|
63
|
-
if (c && c.defaultProps)
|
|
64
|
-
for (b in a = c.defaultProps, a)
|
|
65
|
-
void 0 === d[b] && (d[b] = a[b]);
|
|
66
|
-
return { $$typeof: g, type: c, key: e, ref: l, props: d, _owner: m.current };
|
|
42
|
+
}
|
|
43
|
+
const alreadyWarned = {};
|
|
44
|
+
function warnOnce() {
|
|
45
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
46
|
+
args[_key2] = arguments[_key2];
|
|
67
47
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
48
|
+
if (typeof args[0] === "string" && alreadyWarned[args[0]])
|
|
49
|
+
return;
|
|
50
|
+
if (typeof args[0] === "string")
|
|
51
|
+
alreadyWarned[args[0]] = /* @__PURE__ */ new Date();
|
|
52
|
+
warn(...args);
|
|
71
53
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
54
|
+
const loadedClb = (i18n2, cb) => () => {
|
|
55
|
+
if (i18n2.isInitialized) {
|
|
56
|
+
cb();
|
|
57
|
+
} else {
|
|
58
|
+
const initialized = () => {
|
|
59
|
+
setTimeout(() => {
|
|
60
|
+
i18n2.off("initialized", initialized);
|
|
61
|
+
}, 0);
|
|
62
|
+
cb();
|
|
63
|
+
};
|
|
64
|
+
i18n2.on("initialized", initialized);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
function loadNamespaces(i18n2, ns, cb) {
|
|
68
|
+
i18n2.loadNamespaces(ns, loadedClb(i18n2, cb));
|
|
69
|
+
}
|
|
70
|
+
function loadLanguages(i18n2, lng, ns, cb) {
|
|
71
|
+
if (typeof ns === "string")
|
|
72
|
+
ns = [ns];
|
|
73
|
+
ns.forEach((n) => {
|
|
74
|
+
if (i18n2.options.ns.indexOf(n) < 0)
|
|
75
|
+
i18n2.options.ns.push(n);
|
|
76
|
+
});
|
|
77
|
+
i18n2.loadLanguages(lng, loadedClb(i18n2, cb));
|
|
78
|
+
}
|
|
79
|
+
function oldI18nextHasLoadedNamespace(ns, i18n2) {
|
|
80
|
+
let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
81
|
+
const lng = i18n2.languages[0];
|
|
82
|
+
const fallbackLng = i18n2.options ? i18n2.options.fallbackLng : false;
|
|
83
|
+
const lastLng = i18n2.languages[i18n2.languages.length - 1];
|
|
84
|
+
if (lng.toLowerCase() === "cimode")
|
|
85
|
+
return true;
|
|
86
|
+
const loadNotPending = (l, n) => {
|
|
87
|
+
const loadState = i18n2.services.backendConnector.state[`${l}|${n}`];
|
|
88
|
+
return loadState === -1 || loadState === 2;
|
|
89
|
+
};
|
|
90
|
+
if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18n2.services.backendConnector.backend && i18n2.isLanguageChangingTo && !loadNotPending(i18n2.isLanguageChangingTo, ns))
|
|
91
|
+
return false;
|
|
92
|
+
if (i18n2.hasResourceBundle(lng, ns))
|
|
93
|
+
return true;
|
|
94
|
+
if (!i18n2.services.backendConnector.backend || i18n2.options.resources && !i18n2.options.partialBundledLanguages)
|
|
95
|
+
return true;
|
|
96
|
+
if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns)))
|
|
97
|
+
return true;
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
function hasLoadedNamespace(ns, i18n2) {
|
|
101
|
+
let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
102
|
+
if (!i18n2.languages || !i18n2.languages.length) {
|
|
103
|
+
warnOnce("i18n.languages were undefined or empty", i18n2.languages);
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
const isNewerI18next = i18n2.options.ignoreJSONStructure !== void 0;
|
|
107
|
+
if (!isNewerI18next) {
|
|
108
|
+
return oldI18nextHasLoadedNamespace(ns, i18n2, options);
|
|
109
|
+
}
|
|
110
|
+
return i18n2.hasLoadedNamespace(ns, {
|
|
111
|
+
lng: options.lng,
|
|
112
|
+
precheck: (i18nInstance2, loadNotPending) => {
|
|
113
|
+
if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18nInstance2.services.backendConnector.backend && i18nInstance2.isLanguageChangingTo && !loadNotPending(i18nInstance2.isLanguageChangingTo, ns))
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
|
|
119
|
+
const htmlEntities = {
|
|
120
|
+
"&": "&",
|
|
121
|
+
"&": "&",
|
|
122
|
+
"<": "<",
|
|
123
|
+
"<": "<",
|
|
124
|
+
">": ">",
|
|
125
|
+
">": ">",
|
|
126
|
+
"'": "'",
|
|
127
|
+
"'": "'",
|
|
128
|
+
""": '"',
|
|
129
|
+
""": '"',
|
|
130
|
+
" ": " ",
|
|
131
|
+
" ": " ",
|
|
132
|
+
"©": "©",
|
|
133
|
+
"©": "©",
|
|
134
|
+
"®": "®",
|
|
135
|
+
"®": "®",
|
|
136
|
+
"…": "…",
|
|
137
|
+
"…": "…",
|
|
138
|
+
"/": "/",
|
|
139
|
+
"/": "/"
|
|
140
|
+
};
|
|
141
|
+
const unescapeHtmlEntity = (m) => htmlEntities[m];
|
|
142
|
+
const unescape = (text) => text.replace(matchHtmlEntity, unescapeHtmlEntity);
|
|
143
|
+
let defaultOptions = {
|
|
144
|
+
bindI18n: "languageChanged",
|
|
145
|
+
bindI18nStore: "",
|
|
146
|
+
transEmptyNodeValue: "",
|
|
147
|
+
transSupportBasicHtmlNodes: true,
|
|
148
|
+
transWrapTextNodes: "",
|
|
149
|
+
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
|
|
150
|
+
useSuspense: true,
|
|
151
|
+
unescape
|
|
152
|
+
};
|
|
153
|
+
function setDefaults() {
|
|
154
|
+
let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
155
|
+
defaultOptions = {
|
|
156
|
+
...defaultOptions,
|
|
157
|
+
...options
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
function getDefaults() {
|
|
161
|
+
return defaultOptions;
|
|
162
|
+
}
|
|
163
|
+
let i18nInstance;
|
|
164
|
+
function setI18n(instance) {
|
|
165
|
+
i18nInstance = instance;
|
|
166
|
+
}
|
|
167
|
+
function getI18n() {
|
|
168
|
+
return i18nInstance;
|
|
169
|
+
}
|
|
170
|
+
const initReactI18next = {
|
|
171
|
+
type: "3rdParty",
|
|
172
|
+
init(instance) {
|
|
173
|
+
setDefaults(instance.options.react);
|
|
174
|
+
setI18n(instance);
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
const I18nContext = React.createContext();
|
|
178
|
+
class ReportNamespaces {
|
|
179
|
+
constructor() {
|
|
180
|
+
this.usedNamespaces = {};
|
|
181
|
+
}
|
|
182
|
+
addUsedNamespaces(namespaces) {
|
|
183
|
+
namespaces.forEach((ns) => {
|
|
184
|
+
if (!this.usedNamespaces[ns])
|
|
185
|
+
this.usedNamespaces[ns] = true;
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
getUsedNamespaces() {
|
|
189
|
+
return Object.keys(this.usedNamespaces);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
const usePrevious = (value, ignore) => {
|
|
193
|
+
const ref = React.useRef();
|
|
194
|
+
React.useEffect(() => {
|
|
195
|
+
ref.current = ignore ? ref.current : value;
|
|
196
|
+
}, [value, ignore]);
|
|
197
|
+
return ref.current;
|
|
198
|
+
};
|
|
199
|
+
function useTranslation(ns) {
|
|
200
|
+
let props = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
201
|
+
const {
|
|
202
|
+
i18n: i18nFromProps
|
|
203
|
+
} = props;
|
|
204
|
+
const {
|
|
205
|
+
i18n: i18nFromContext,
|
|
206
|
+
defaultNS: defaultNSFromContext
|
|
207
|
+
} = React.useContext(I18nContext) || {};
|
|
208
|
+
const i18n2 = i18nFromProps || i18nFromContext || getI18n();
|
|
209
|
+
if (i18n2 && !i18n2.reportNamespaces)
|
|
210
|
+
i18n2.reportNamespaces = new ReportNamespaces();
|
|
211
|
+
if (!i18n2) {
|
|
212
|
+
warnOnce("You will need to pass in an i18next instance by using initReactI18next");
|
|
213
|
+
const notReadyT = (k, optsOrDefaultValue) => {
|
|
214
|
+
if (typeof optsOrDefaultValue === "string")
|
|
215
|
+
return optsOrDefaultValue;
|
|
216
|
+
if (optsOrDefaultValue && typeof optsOrDefaultValue === "object" && typeof optsOrDefaultValue.defaultValue === "string")
|
|
217
|
+
return optsOrDefaultValue.defaultValue;
|
|
218
|
+
return Array.isArray(k) ? k[k.length - 1] : k;
|
|
219
|
+
};
|
|
220
|
+
const retNotReady = [notReadyT, {}, false];
|
|
221
|
+
retNotReady.t = notReadyT;
|
|
222
|
+
retNotReady.i18n = {};
|
|
223
|
+
retNotReady.ready = false;
|
|
224
|
+
return retNotReady;
|
|
225
|
+
}
|
|
226
|
+
if (i18n2.options.react && i18n2.options.react.wait !== void 0)
|
|
227
|
+
warnOnce("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
|
228
|
+
const i18nOptions = {
|
|
229
|
+
...getDefaults(),
|
|
230
|
+
...i18n2.options.react,
|
|
231
|
+
...props
|
|
232
|
+
};
|
|
233
|
+
const {
|
|
234
|
+
useSuspense,
|
|
235
|
+
keyPrefix
|
|
236
|
+
} = i18nOptions;
|
|
237
|
+
let namespaces = ns || defaultNSFromContext || i18n2.options && i18n2.options.defaultNS;
|
|
238
|
+
namespaces = typeof namespaces === "string" ? [namespaces] : namespaces || ["translation"];
|
|
239
|
+
if (i18n2.reportNamespaces.addUsedNamespaces)
|
|
240
|
+
i18n2.reportNamespaces.addUsedNamespaces(namespaces);
|
|
241
|
+
const ready2 = (i18n2.isInitialized || i18n2.initializedStoreOnce) && namespaces.every((n) => hasLoadedNamespace(n, i18n2, i18nOptions));
|
|
242
|
+
function getT() {
|
|
243
|
+
return i18n2.getFixedT(props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
|
|
244
|
+
}
|
|
245
|
+
const [t, setT] = React.useState(getT);
|
|
246
|
+
let joinedNS = namespaces.join();
|
|
247
|
+
if (props.lng)
|
|
248
|
+
joinedNS = `${props.lng}${joinedNS}`;
|
|
249
|
+
const previousJoinedNS = usePrevious(joinedNS);
|
|
250
|
+
const isMounted = React.useRef(true);
|
|
251
|
+
React.useEffect(() => {
|
|
252
|
+
const {
|
|
253
|
+
bindI18n,
|
|
254
|
+
bindI18nStore
|
|
255
|
+
} = i18nOptions;
|
|
256
|
+
isMounted.current = true;
|
|
257
|
+
if (!ready2 && !useSuspense) {
|
|
258
|
+
if (props.lng) {
|
|
259
|
+
loadLanguages(i18n2, props.lng, namespaces, () => {
|
|
260
|
+
if (isMounted.current)
|
|
261
|
+
setT(getT);
|
|
262
|
+
});
|
|
263
|
+
} else {
|
|
264
|
+
loadNamespaces(i18n2, namespaces, () => {
|
|
265
|
+
if (isMounted.current)
|
|
266
|
+
setT(getT);
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
if (ready2 && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
|
|
271
|
+
setT(getT);
|
|
272
|
+
}
|
|
273
|
+
function boundReset() {
|
|
274
|
+
if (isMounted.current)
|
|
275
|
+
setT(getT);
|
|
276
|
+
}
|
|
277
|
+
if (bindI18n && i18n2)
|
|
278
|
+
i18n2.on(bindI18n, boundReset);
|
|
279
|
+
if (bindI18nStore && i18n2)
|
|
280
|
+
i18n2.store.on(bindI18nStore, boundReset);
|
|
281
|
+
return () => {
|
|
282
|
+
isMounted.current = false;
|
|
283
|
+
if (bindI18n && i18n2)
|
|
284
|
+
bindI18n.split(" ").forEach((e) => i18n2.off(e, boundReset));
|
|
285
|
+
if (bindI18nStore && i18n2)
|
|
286
|
+
bindI18nStore.split(" ").forEach((e) => i18n2.store.off(e, boundReset));
|
|
287
|
+
};
|
|
288
|
+
}, [i18n2, joinedNS]);
|
|
289
|
+
const isInitial = React.useRef(true);
|
|
290
|
+
React.useEffect(() => {
|
|
291
|
+
if (isMounted.current && !isInitial.current) {
|
|
292
|
+
setT(getT);
|
|
293
|
+
}
|
|
294
|
+
isInitial.current = false;
|
|
295
|
+
}, [i18n2, keyPrefix]);
|
|
296
|
+
const ret = [t, i18n2, ready2];
|
|
297
|
+
ret.t = t;
|
|
298
|
+
ret.i18n = i18n2;
|
|
299
|
+
ret.ready = ready2;
|
|
300
|
+
if (ready2)
|
|
301
|
+
return ret;
|
|
302
|
+
if (!ready2 && !useSuspense)
|
|
303
|
+
return ret;
|
|
304
|
+
throw new Promise((resolve) => {
|
|
305
|
+
if (props.lng) {
|
|
306
|
+
loadLanguages(i18n2, props.lng, namespaces, () => resolve());
|
|
307
|
+
} else {
|
|
308
|
+
loadNamespaces(i18n2, namespaces, () => resolve());
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
const copy$1 = "Copy";
|
|
313
|
+
const reset_arguments$1 = "Reset";
|
|
314
|
+
const view_changes$1 = "Show Diff";
|
|
315
|
+
const back_to_edit$1 = "Edit";
|
|
316
|
+
const configure_file$1 = "Configuration";
|
|
317
|
+
const yaml_format_wrong$1 = "Configuration is in an invalid YAML format.";
|
|
318
|
+
const yaml_value_wrong$1 = "Configuration has invalid values.";
|
|
319
|
+
const edit_yaml$1 = "Edit YAML";
|
|
320
|
+
const copied$1 = "Copied";
|
|
321
|
+
const already_reset$1 = "Already reset";
|
|
322
|
+
const fetch_schema_fail$1 = "Failed to fetch schema.";
|
|
323
|
+
const obtain_data_error$1 = "Having trouble getting data.";
|
|
324
|
+
const retry$1 = "Retry";
|
|
325
|
+
const create_resource$1 = "Create {{resource}}";
|
|
326
|
+
const edit_resource$1 = "Edit {{resource}}";
|
|
327
|
+
const status$1 = "Status";
|
|
328
|
+
const dovetail$1 = {
|
|
329
|
+
copy: copy$1,
|
|
330
|
+
reset_arguments: reset_arguments$1,
|
|
331
|
+
view_changes: view_changes$1,
|
|
332
|
+
back_to_edit: back_to_edit$1,
|
|
333
|
+
configure_file: configure_file$1,
|
|
334
|
+
yaml_format_wrong: yaml_format_wrong$1,
|
|
335
|
+
yaml_value_wrong: yaml_value_wrong$1,
|
|
336
|
+
edit_yaml: edit_yaml$1,
|
|
337
|
+
copied: copied$1,
|
|
338
|
+
already_reset: already_reset$1,
|
|
339
|
+
fetch_schema_fail: fetch_schema_fail$1,
|
|
340
|
+
obtain_data_error: obtain_data_error$1,
|
|
341
|
+
retry: retry$1,
|
|
342
|
+
create_resource: create_resource$1,
|
|
343
|
+
edit_resource: edit_resource$1,
|
|
344
|
+
status: status$1
|
|
345
|
+
};
|
|
346
|
+
const EN = {
|
|
347
|
+
dovetail: dovetail$1
|
|
348
|
+
};
|
|
349
|
+
const copy = "复制";
|
|
350
|
+
const reset_arguments = "重置";
|
|
351
|
+
const view_changes = "查看改动";
|
|
352
|
+
const back_to_edit = "编辑";
|
|
353
|
+
const configure_file = "配置内容";
|
|
354
|
+
const yaml_format_wrong = "配置内容不是有效的 yaml 格式。";
|
|
355
|
+
const yaml_value_wrong = "配置内容中存在不合法的值。";
|
|
356
|
+
const edit_yaml = "编辑 YAML";
|
|
357
|
+
const copied = "已复制";
|
|
358
|
+
const already_reset = "已重置";
|
|
359
|
+
const cancel = "取消";
|
|
360
|
+
const create = "创建";
|
|
361
|
+
const confirm_delete_text = "确定要删除 {{target}} 吗?";
|
|
362
|
+
const edit = "编辑";
|
|
363
|
+
const namespace = "名字空间";
|
|
364
|
+
const name = "名称";
|
|
365
|
+
const state = "状态";
|
|
366
|
+
const status = "状态";
|
|
367
|
+
const phase = "状态";
|
|
368
|
+
const image = "容器镜像";
|
|
369
|
+
const replicas = "副本数";
|
|
370
|
+
const created_time = "创建时间";
|
|
371
|
+
const label = "标签";
|
|
372
|
+
const annotation = "注释";
|
|
373
|
+
const type = "类型";
|
|
374
|
+
const event = "事件";
|
|
375
|
+
const reason = "原因";
|
|
376
|
+
const object = "对象";
|
|
377
|
+
const note$1 = "事件信息";
|
|
378
|
+
const condition = "Condition";
|
|
379
|
+
const download_yaml = "下载 YAML";
|
|
380
|
+
const detail = "详情";
|
|
381
|
+
const node_name = "主机名称";
|
|
382
|
+
const restarts = "重启次数";
|
|
383
|
+
const updated_time = "更新时间";
|
|
384
|
+
const message = "消息";
|
|
385
|
+
const save = "保存";
|
|
386
|
+
const more = "更多";
|
|
387
|
+
const workload = "工作负载";
|
|
388
|
+
const all_namespaces = "所有名字空间";
|
|
389
|
+
const empty = "无可显示的数据";
|
|
390
|
+
const schedule = "调度时间表";
|
|
391
|
+
const lastScheduleTime = "上次调度时间";
|
|
392
|
+
const duration = "持续时间";
|
|
393
|
+
const completions = "完成 Job 历史数";
|
|
394
|
+
const started = "开始时间";
|
|
395
|
+
const init_container = "初始化容器";
|
|
396
|
+
const container = "容器";
|
|
397
|
+
const redeploy = "重新部署";
|
|
398
|
+
const data = "数据";
|
|
399
|
+
const suspend = "暂停";
|
|
400
|
+
const resume = "重新开始";
|
|
401
|
+
const cluster = "集群";
|
|
402
|
+
const storage = "存储";
|
|
403
|
+
const network = "网络";
|
|
404
|
+
const clusterIp = "集群 IP";
|
|
405
|
+
const sessionAffinity = "会话保持";
|
|
406
|
+
const log = "日志";
|
|
407
|
+
const select_container = "选择容器";
|
|
408
|
+
const wrap = "折叠";
|
|
409
|
+
const resume_log = "继续";
|
|
410
|
+
const log_new_lines = ",并展示 {{ count }} 行新日志";
|
|
411
|
+
const fetch_schema_fail = "获取 schema 失败。";
|
|
412
|
+
const obtain_data_error = "获取数据时遇到问题。";
|
|
413
|
+
const retry = "重试";
|
|
414
|
+
const ready = "就绪";
|
|
415
|
+
const updating = "更新中";
|
|
416
|
+
const completed = "完成";
|
|
417
|
+
const failed = "异常";
|
|
418
|
+
const suspended = "挂起";
|
|
419
|
+
const running = "运行中";
|
|
420
|
+
const terminating = "终止";
|
|
421
|
+
const succeeded = "成功终止";
|
|
422
|
+
const unknown = "未知";
|
|
423
|
+
const pending = "待处理";
|
|
424
|
+
const waiting = "等待中";
|
|
425
|
+
const create_resource = "创建 {{resource}}";
|
|
426
|
+
const edit_resource = "编辑 {{resource}}";
|
|
427
|
+
const sec = "秒";
|
|
428
|
+
const min = "分";
|
|
429
|
+
const hr = "小时";
|
|
430
|
+
const day = "天";
|
|
431
|
+
const expand = "展开";
|
|
432
|
+
const fold = "收起";
|
|
433
|
+
const rule = "规则";
|
|
434
|
+
const default_backend = "默认后端";
|
|
435
|
+
const ingress_rule_type = "规则类型";
|
|
436
|
+
const port = "端口";
|
|
437
|
+
const dovetail = {
|
|
438
|
+
copy,
|
|
439
|
+
reset_arguments,
|
|
440
|
+
view_changes,
|
|
441
|
+
back_to_edit,
|
|
442
|
+
configure_file,
|
|
443
|
+
yaml_format_wrong,
|
|
444
|
+
yaml_value_wrong,
|
|
445
|
+
edit_yaml,
|
|
446
|
+
copied,
|
|
447
|
+
already_reset,
|
|
448
|
+
cancel,
|
|
449
|
+
"delete": "删除",
|
|
450
|
+
create,
|
|
451
|
+
confirm_delete_text,
|
|
452
|
+
edit,
|
|
453
|
+
namespace,
|
|
454
|
+
name,
|
|
455
|
+
state,
|
|
456
|
+
status,
|
|
457
|
+
phase,
|
|
458
|
+
image,
|
|
459
|
+
replicas,
|
|
460
|
+
created_time,
|
|
461
|
+
label,
|
|
462
|
+
annotation,
|
|
463
|
+
type,
|
|
464
|
+
event,
|
|
465
|
+
reason,
|
|
466
|
+
object,
|
|
467
|
+
note: note$1,
|
|
468
|
+
condition,
|
|
469
|
+
download_yaml,
|
|
470
|
+
detail,
|
|
471
|
+
node_name,
|
|
472
|
+
restarts,
|
|
473
|
+
updated_time,
|
|
474
|
+
message,
|
|
475
|
+
save,
|
|
476
|
+
more,
|
|
477
|
+
workload,
|
|
478
|
+
all_namespaces,
|
|
479
|
+
empty,
|
|
480
|
+
schedule,
|
|
481
|
+
lastScheduleTime,
|
|
482
|
+
duration,
|
|
483
|
+
completions,
|
|
484
|
+
started,
|
|
485
|
+
init_container,
|
|
486
|
+
container,
|
|
487
|
+
redeploy,
|
|
488
|
+
data,
|
|
489
|
+
suspend,
|
|
490
|
+
resume,
|
|
491
|
+
cluster,
|
|
492
|
+
storage,
|
|
493
|
+
network,
|
|
494
|
+
clusterIp,
|
|
495
|
+
sessionAffinity,
|
|
496
|
+
log,
|
|
497
|
+
select_container,
|
|
498
|
+
wrap,
|
|
499
|
+
resume_log,
|
|
500
|
+
log_new_lines,
|
|
501
|
+
fetch_schema_fail,
|
|
502
|
+
obtain_data_error,
|
|
503
|
+
retry,
|
|
504
|
+
ready,
|
|
505
|
+
updating,
|
|
506
|
+
completed,
|
|
507
|
+
failed,
|
|
508
|
+
suspended,
|
|
509
|
+
running,
|
|
510
|
+
terminating,
|
|
511
|
+
succeeded,
|
|
512
|
+
unknown,
|
|
513
|
+
pending,
|
|
514
|
+
waiting,
|
|
515
|
+
create_resource,
|
|
516
|
+
edit_resource,
|
|
517
|
+
sec,
|
|
518
|
+
min,
|
|
519
|
+
hr,
|
|
520
|
+
day,
|
|
521
|
+
expand,
|
|
522
|
+
fold,
|
|
523
|
+
rule,
|
|
524
|
+
default_backend,
|
|
525
|
+
ingress_rule_type,
|
|
526
|
+
port
|
|
527
|
+
};
|
|
528
|
+
const ZH = {
|
|
529
|
+
dovetail
|
|
530
|
+
};
|
|
531
|
+
const resources = {
|
|
532
|
+
"en-US": EN,
|
|
533
|
+
"zh-CN": ZH
|
|
534
|
+
};
|
|
535
|
+
i18n.use(initReactI18next).init({
|
|
536
|
+
supportedLngs: ["en-US", "zh-CN"],
|
|
537
|
+
resources,
|
|
538
|
+
ns: Object.keys(resources["zh-CN"]),
|
|
539
|
+
defaultNS: "dovetail",
|
|
540
|
+
fallbackLng: ["en-US", "zh-CN"],
|
|
541
|
+
lng: "zh-CN",
|
|
542
|
+
nsSeparator: "."
|
|
543
|
+
});
|
|
544
|
+
var jsxRuntime = { exports: {} };
|
|
545
|
+
var reactJsxRuntime_production_min = {};
|
|
546
|
+
/** @license React v16.14.0
|
|
547
|
+
* react-jsx-runtime.production.min.js
|
|
548
|
+
*
|
|
549
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
550
|
+
*
|
|
551
|
+
* This source code is licensed under the MIT license found in the
|
|
552
|
+
* LICENSE file in the root directory of this source tree.
|
|
553
|
+
*/
|
|
554
|
+
var hasRequiredReactJsxRuntime_production_min;
|
|
555
|
+
function requireReactJsxRuntime_production_min() {
|
|
556
|
+
if (hasRequiredReactJsxRuntime_production_min)
|
|
557
|
+
return reactJsxRuntime_production_min;
|
|
558
|
+
hasRequiredReactJsxRuntime_production_min = 1;
|
|
559
|
+
var f = React, g = 60103;
|
|
560
|
+
reactJsxRuntime_production_min.Fragment = 60107;
|
|
561
|
+
if ("function" === typeof Symbol && Symbol.for) {
|
|
562
|
+
var h = Symbol.for;
|
|
563
|
+
g = h("react.element");
|
|
564
|
+
reactJsxRuntime_production_min.Fragment = h("react.fragment");
|
|
565
|
+
}
|
|
566
|
+
var m = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, n = Object.prototype.hasOwnProperty, p = { key: true, ref: true, __self: true, __source: true };
|
|
567
|
+
function q(c, a, k) {
|
|
568
|
+
var b, d = {}, e = null, l = null;
|
|
569
|
+
void 0 !== k && (e = "" + k);
|
|
570
|
+
void 0 !== a.key && (e = "" + a.key);
|
|
571
|
+
void 0 !== a.ref && (l = a.ref);
|
|
572
|
+
for (b in a)
|
|
573
|
+
n.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
|
|
574
|
+
if (c && c.defaultProps)
|
|
575
|
+
for (b in a = c.defaultProps, a)
|
|
576
|
+
void 0 === d[b] && (d[b] = a[b]);
|
|
577
|
+
return { $$typeof: g, type: c, key: e, ref: l, props: d, _owner: m.current };
|
|
578
|
+
}
|
|
579
|
+
reactJsxRuntime_production_min.jsx = q;
|
|
580
|
+
reactJsxRuntime_production_min.jsxs = q;
|
|
581
|
+
return reactJsxRuntime_production_min;
|
|
582
|
+
}
|
|
583
|
+
var reactJsxRuntime_development = {};
|
|
584
|
+
/** @license React v16.14.0
|
|
585
|
+
* react-jsx-runtime.development.js
|
|
586
|
+
*
|
|
587
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
588
|
+
*
|
|
589
|
+
* This source code is licensed under the MIT license found in the
|
|
590
|
+
* LICENSE file in the root directory of this source tree.
|
|
591
|
+
*/
|
|
592
|
+
var hasRequiredReactJsxRuntime_development;
|
|
593
|
+
function requireReactJsxRuntime_development() {
|
|
594
|
+
if (hasRequiredReactJsxRuntime_development)
|
|
595
|
+
return reactJsxRuntime_development;
|
|
596
|
+
hasRequiredReactJsxRuntime_development = 1;
|
|
597
|
+
(function(exports3) {
|
|
598
|
+
if (process.env.NODE_ENV !== "production") {
|
|
599
|
+
(function() {
|
|
600
|
+
var React$1 = React;
|
|
601
|
+
var REACT_ELEMENT_TYPE = 60103;
|
|
602
|
+
var REACT_PORTAL_TYPE = 60106;
|
|
603
|
+
exports3.Fragment = 60107;
|
|
604
|
+
var REACT_STRICT_MODE_TYPE = 60108;
|
|
605
|
+
var REACT_PROFILER_TYPE = 60114;
|
|
606
|
+
var REACT_PROVIDER_TYPE = 60109;
|
|
607
|
+
var REACT_CONTEXT_TYPE = 60110;
|
|
608
|
+
var REACT_FORWARD_REF_TYPE = 60112;
|
|
609
|
+
var REACT_SUSPENSE_TYPE = 60113;
|
|
610
|
+
var REACT_SUSPENSE_LIST_TYPE = 60120;
|
|
611
|
+
var REACT_MEMO_TYPE = 60115;
|
|
612
|
+
var REACT_LAZY_TYPE = 60116;
|
|
613
|
+
var REACT_BLOCK_TYPE = 60121;
|
|
614
|
+
var REACT_SERVER_BLOCK_TYPE = 60122;
|
|
615
|
+
var REACT_FUNDAMENTAL_TYPE = 60117;
|
|
616
|
+
var REACT_DEBUG_TRACING_MODE_TYPE = 60129;
|
|
617
|
+
var REACT_LEGACY_HIDDEN_TYPE = 60131;
|
|
618
|
+
if (typeof Symbol === "function" && Symbol.for) {
|
|
619
|
+
var symbolFor = Symbol.for;
|
|
620
|
+
REACT_ELEMENT_TYPE = symbolFor("react.element");
|
|
621
|
+
REACT_PORTAL_TYPE = symbolFor("react.portal");
|
|
622
|
+
exports3.Fragment = symbolFor("react.fragment");
|
|
623
|
+
REACT_STRICT_MODE_TYPE = symbolFor("react.strict_mode");
|
|
624
|
+
REACT_PROFILER_TYPE = symbolFor("react.profiler");
|
|
625
|
+
REACT_PROVIDER_TYPE = symbolFor("react.provider");
|
|
626
|
+
REACT_CONTEXT_TYPE = symbolFor("react.context");
|
|
627
|
+
REACT_FORWARD_REF_TYPE = symbolFor("react.forward_ref");
|
|
628
|
+
REACT_SUSPENSE_TYPE = symbolFor("react.suspense");
|
|
629
|
+
REACT_SUSPENSE_LIST_TYPE = symbolFor("react.suspense_list");
|
|
630
|
+
REACT_MEMO_TYPE = symbolFor("react.memo");
|
|
631
|
+
REACT_LAZY_TYPE = symbolFor("react.lazy");
|
|
632
|
+
REACT_BLOCK_TYPE = symbolFor("react.block");
|
|
633
|
+
REACT_SERVER_BLOCK_TYPE = symbolFor("react.server.block");
|
|
634
|
+
REACT_FUNDAMENTAL_TYPE = symbolFor("react.fundamental");
|
|
635
|
+
symbolFor("react.scope");
|
|
636
|
+
symbolFor("react.opaque.id");
|
|
637
|
+
REACT_DEBUG_TRACING_MODE_TYPE = symbolFor("react.debug_trace_mode");
|
|
638
|
+
symbolFor("react.offscreen");
|
|
639
|
+
REACT_LEGACY_HIDDEN_TYPE = symbolFor("react.legacy_hidden");
|
|
640
|
+
}
|
|
641
|
+
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
|
|
642
|
+
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
|
643
|
+
function getIteratorFn(maybeIterable) {
|
|
644
|
+
if (maybeIterable === null || typeof maybeIterable !== "object") {
|
|
645
|
+
return null;
|
|
646
|
+
}
|
|
647
|
+
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
648
|
+
if (typeof maybeIterator === "function") {
|
|
649
|
+
return maybeIterator;
|
|
650
|
+
}
|
|
651
|
+
return null;
|
|
652
|
+
}
|
|
653
|
+
var ReactSharedInternals = React$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
654
|
+
function error(format) {
|
|
655
|
+
{
|
|
656
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
657
|
+
args[_key2 - 1] = arguments[_key2];
|
|
658
|
+
}
|
|
659
|
+
printWarning("error", format, args);
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
function printWarning(level, format, args) {
|
|
663
|
+
{
|
|
664
|
+
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
665
|
+
var stack = "";
|
|
666
|
+
if (currentlyValidatingElement) {
|
|
667
|
+
var name2 = getComponentName(currentlyValidatingElement.type);
|
|
668
|
+
var owner = currentlyValidatingElement._owner;
|
|
669
|
+
stack += describeComponentFrame(name2, currentlyValidatingElement._source, owner && getComponentName(owner.type));
|
|
670
|
+
}
|
|
671
|
+
stack += ReactDebugCurrentFrame.getStackAddendum();
|
|
672
|
+
if (stack !== "") {
|
|
673
|
+
format += "%s";
|
|
674
|
+
args = args.concat([stack]);
|
|
675
|
+
}
|
|
676
|
+
var argsWithFormat = args.map(function(item) {
|
|
677
|
+
return "" + item;
|
|
678
|
+
});
|
|
679
|
+
argsWithFormat.unshift("Warning: " + format);
|
|
680
|
+
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
var enableScopeAPI = false;
|
|
684
|
+
function isValidElementType(type2) {
|
|
685
|
+
if (typeof type2 === "string" || typeof type2 === "function") {
|
|
686
|
+
return true;
|
|
687
|
+
}
|
|
688
|
+
if (type2 === exports3.Fragment || type2 === REACT_PROFILER_TYPE || type2 === REACT_DEBUG_TRACING_MODE_TYPE || type2 === REACT_STRICT_MODE_TYPE || type2 === REACT_SUSPENSE_TYPE || type2 === REACT_SUSPENSE_LIST_TYPE || type2 === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI) {
|
|
689
|
+
return true;
|
|
690
|
+
}
|
|
691
|
+
if (typeof type2 === "object" && type2 !== null) {
|
|
692
|
+
if (type2.$$typeof === REACT_LAZY_TYPE || type2.$$typeof === REACT_MEMO_TYPE || type2.$$typeof === REACT_PROVIDER_TYPE || type2.$$typeof === REACT_CONTEXT_TYPE || type2.$$typeof === REACT_FORWARD_REF_TYPE || type2.$$typeof === REACT_FUNDAMENTAL_TYPE || type2.$$typeof === REACT_BLOCK_TYPE || type2[0] === REACT_SERVER_BLOCK_TYPE) {
|
|
693
|
+
return true;
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
return false;
|
|
697
|
+
}
|
|
698
|
+
var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
|
|
699
|
+
function describeComponentFrame(name2, source, ownerName) {
|
|
700
|
+
var sourceInfo = "";
|
|
701
|
+
if (source) {
|
|
702
|
+
var path = source.fileName;
|
|
703
|
+
var fileName = path.replace(BEFORE_SLASH_RE, "");
|
|
704
|
+
{
|
|
705
|
+
if (/^index\./.test(fileName)) {
|
|
706
|
+
var match = path.match(BEFORE_SLASH_RE);
|
|
707
|
+
if (match) {
|
|
708
|
+
var pathBeforeSlash = match[1];
|
|
709
|
+
if (pathBeforeSlash) {
|
|
710
|
+
var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, "");
|
|
711
|
+
fileName = folderName + "/" + fileName;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
sourceInfo = " (at " + fileName + ":" + source.lineNumber + ")";
|
|
717
|
+
} else if (ownerName) {
|
|
718
|
+
sourceInfo = " (created by " + ownerName + ")";
|
|
719
|
+
}
|
|
720
|
+
return "\n in " + (name2 || "Unknown") + sourceInfo;
|
|
721
|
+
}
|
|
722
|
+
var Resolved = 1;
|
|
723
|
+
function refineResolvedLazyComponent(lazyComponent) {
|
|
724
|
+
return lazyComponent._status === Resolved ? lazyComponent._result : null;
|
|
725
|
+
}
|
|
726
|
+
function getWrappedName(outerType, innerType, wrapperName) {
|
|
727
|
+
var functionName = innerType.displayName || innerType.name || "";
|
|
728
|
+
return outerType.displayName || (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName);
|
|
729
|
+
}
|
|
730
|
+
function getComponentName(type2) {
|
|
731
|
+
if (type2 == null) {
|
|
732
|
+
return null;
|
|
733
|
+
}
|
|
734
|
+
{
|
|
735
|
+
if (typeof type2.tag === "number") {
|
|
736
|
+
error("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue.");
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
if (typeof type2 === "function") {
|
|
740
|
+
return type2.displayName || type2.name || null;
|
|
741
|
+
}
|
|
742
|
+
if (typeof type2 === "string") {
|
|
743
|
+
return type2;
|
|
744
|
+
}
|
|
745
|
+
switch (type2) {
|
|
746
|
+
case exports3.Fragment:
|
|
747
|
+
return "Fragment";
|
|
748
|
+
case REACT_PORTAL_TYPE:
|
|
749
|
+
return "Portal";
|
|
750
|
+
case REACT_PROFILER_TYPE:
|
|
751
|
+
return "Profiler";
|
|
752
|
+
case REACT_STRICT_MODE_TYPE:
|
|
753
|
+
return "StrictMode";
|
|
754
|
+
case REACT_SUSPENSE_TYPE:
|
|
755
|
+
return "Suspense";
|
|
756
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
757
|
+
return "SuspenseList";
|
|
758
|
+
}
|
|
759
|
+
if (typeof type2 === "object") {
|
|
760
|
+
switch (type2.$$typeof) {
|
|
761
|
+
case REACT_CONTEXT_TYPE:
|
|
762
|
+
return "Context.Consumer";
|
|
763
|
+
case REACT_PROVIDER_TYPE:
|
|
764
|
+
return "Context.Provider";
|
|
765
|
+
case REACT_FORWARD_REF_TYPE:
|
|
766
|
+
return getWrappedName(type2, type2.render, "ForwardRef");
|
|
767
|
+
case REACT_MEMO_TYPE:
|
|
768
|
+
return getComponentName(type2.type);
|
|
769
|
+
case REACT_BLOCK_TYPE:
|
|
770
|
+
return getComponentName(type2.render);
|
|
771
|
+
case REACT_LAZY_TYPE: {
|
|
772
|
+
var thenable = type2;
|
|
773
|
+
var resolvedThenable = refineResolvedLazyComponent(thenable);
|
|
774
|
+
if (resolvedThenable) {
|
|
775
|
+
return getComponentName(resolvedThenable);
|
|
776
|
+
}
|
|
777
|
+
break;
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
return null;
|
|
782
|
+
}
|
|
783
|
+
var loggedTypeFailures = {};
|
|
784
|
+
ReactSharedInternals.ReactDebugCurrentFrame;
|
|
274
785
|
var currentlyValidatingElement = null;
|
|
275
786
|
function setCurrentlyValidatingElement(element) {
|
|
276
787
|
{
|
|
@@ -574,499 +1085,220 @@ var __publicField = (obj, key, value) => {
|
|
|
574
1085
|
var propTypes;
|
|
575
1086
|
if (typeof type2 === "function") {
|
|
576
1087
|
propTypes = type2.propTypes;
|
|
577
|
-
} else if (typeof type2 === "object" && (type2.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
578
|
-
// Inner props are checked in the reconciler.
|
|
579
|
-
type2.$$typeof === REACT_MEMO_TYPE)) {
|
|
580
|
-
propTypes = type2.propTypes;
|
|
581
|
-
} else {
|
|
582
|
-
return;
|
|
583
|
-
}
|
|
584
|
-
if (propTypes) {
|
|
585
|
-
var name2 = getComponentName(type2);
|
|
586
|
-
checkPropTypes(propTypes, element.props, "prop", name2, element);
|
|
587
|
-
} else if (type2.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
|
|
588
|
-
propTypesMisspellWarningShown = true;
|
|
589
|
-
var _name = getComponentName(type2);
|
|
590
|
-
error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
|
|
591
|
-
}
|
|
592
|
-
if (typeof type2.getDefaultProps === "function" && !type2.getDefaultProps.isReactClassApproved) {
|
|
593
|
-
error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
function validateFragmentProps(fragment) {
|
|
598
|
-
{
|
|
599
|
-
var keys = Object.keys(fragment.props);
|
|
600
|
-
for (var i = 0; i < keys.length; i++) {
|
|
601
|
-
var key = keys[i];
|
|
602
|
-
if (key !== "children" && key !== "key") {
|
|
603
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
604
|
-
error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
|
|
605
|
-
setCurrentlyValidatingElement$1(null);
|
|
606
|
-
break;
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
if (fragment.ref !== null) {
|
|
610
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
611
|
-
error("Invalid attribute `ref` supplied to `React.Fragment`.");
|
|
612
|
-
setCurrentlyValidatingElement$1(null);
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
function jsxWithValidation(type2, props, key, isStaticChildren, source, self2) {
|
|
617
|
-
{
|
|
618
|
-
var validType = isValidElementType(type2);
|
|
619
|
-
if (!validType) {
|
|
620
|
-
var info = "";
|
|
621
|
-
if (type2 === void 0 || typeof type2 === "object" && type2 !== null && Object.keys(type2).length === 0) {
|
|
622
|
-
info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
|
|
623
|
-
}
|
|
624
|
-
var sourceInfo = getSourceInfoErrorAddendum(source);
|
|
625
|
-
if (sourceInfo) {
|
|
626
|
-
info += sourceInfo;
|
|
627
|
-
} else {
|
|
628
|
-
info += getDeclarationErrorAddendum();
|
|
629
|
-
}
|
|
630
|
-
var typeString;
|
|
631
|
-
if (type2 === null) {
|
|
632
|
-
typeString = "null";
|
|
633
|
-
} else if (Array.isArray(type2)) {
|
|
634
|
-
typeString = "array";
|
|
635
|
-
} else if (type2 !== void 0 && type2.$$typeof === REACT_ELEMENT_TYPE) {
|
|
636
|
-
typeString = "<" + (getComponentName(type2.type) || "Unknown") + " />";
|
|
637
|
-
info = " Did you accidentally export a JSX literal instead of a component?";
|
|
638
|
-
} else {
|
|
639
|
-
typeString = typeof type2;
|
|
640
|
-
}
|
|
641
|
-
error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
|
642
|
-
}
|
|
643
|
-
var element = jsxDEV(type2, props, key, source, self2);
|
|
644
|
-
if (element == null) {
|
|
645
|
-
return element;
|
|
646
|
-
}
|
|
647
|
-
if (validType) {
|
|
648
|
-
var children = props.children;
|
|
649
|
-
if (children !== void 0) {
|
|
650
|
-
if (isStaticChildren) {
|
|
651
|
-
if (Array.isArray(children)) {
|
|
652
|
-
for (var i = 0; i < children.length; i++) {
|
|
653
|
-
validateChildKeys(children[i], type2);
|
|
654
|
-
}
|
|
655
|
-
if (Object.freeze) {
|
|
656
|
-
Object.freeze(children);
|
|
657
|
-
}
|
|
658
|
-
} else {
|
|
659
|
-
error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
660
|
-
}
|
|
661
|
-
} else {
|
|
662
|
-
validateChildKeys(children, type2);
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
if (type2 === exports3.Fragment) {
|
|
667
|
-
validateFragmentProps(element);
|
|
668
|
-
} else {
|
|
669
|
-
validatePropTypes(element);
|
|
670
|
-
}
|
|
671
|
-
return element;
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
function jsxWithValidationStatic(type2, props, key) {
|
|
675
|
-
{
|
|
676
|
-
return jsxWithValidation(type2, props, key, true);
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
function jsxWithValidationDynamic(type2, props, key) {
|
|
680
|
-
{
|
|
681
|
-
return jsxWithValidation(type2, props, key, false);
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
var jsx = jsxWithValidationDynamic;
|
|
685
|
-
var jsxs = jsxWithValidationStatic;
|
|
686
|
-
exports3.jsx = jsx;
|
|
687
|
-
exports3.jsxs = jsxs;
|
|
688
|
-
})();
|
|
689
|
-
}
|
|
690
|
-
})(reactJsxRuntime_development);
|
|
691
|
-
return reactJsxRuntime_development;
|
|
692
|
-
}
|
|
693
|
-
if (process.env.NODE_ENV === "production") {
|
|
694
|
-
jsxRuntime.exports = requireReactJsxRuntime_production_min();
|
|
695
|
-
} else {
|
|
696
|
-
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
697
|
-
}
|
|
698
|
-
var jsxRuntimeExports = jsxRuntime.exports;
|
|
699
|
-
const stringifyConfig = {
|
|
700
|
-
addQueryPrefix: true,
|
|
701
|
-
skipNulls: true,
|
|
702
|
-
arrayFormat: "indices",
|
|
703
|
-
encode: false,
|
|
704
|
-
encodeValuesOnly: true
|
|
705
|
-
};
|
|
706
|
-
const convertToNumberIfPossible = (value) => {
|
|
707
|
-
if (typeof value === "undefined") {
|
|
708
|
-
return value;
|
|
709
|
-
}
|
|
710
|
-
const num = Number(value);
|
|
711
|
-
if (`${num}` === value) {
|
|
712
|
-
return num;
|
|
713
|
-
}
|
|
714
|
-
return value;
|
|
715
|
-
};
|
|
716
|
-
const routerProvider = {
|
|
717
|
-
go: () => {
|
|
718
|
-
const { search: existingSearch, hash: existingHash } = reactRouterDom.useLocation();
|
|
719
|
-
const history = reactRouterDom.useHistory();
|
|
720
|
-
const fn = React.useCallback(
|
|
721
|
-
({ to, type: type2, query, hash, options: { keepQuery, keepHash } = {} }) => {
|
|
722
|
-
const urlQuery = {
|
|
723
|
-
...keepQuery && existingSearch && qs.parse(existingSearch, { ignoreQueryPrefix: true }),
|
|
724
|
-
...query
|
|
725
|
-
};
|
|
726
|
-
if (urlQuery.to) {
|
|
727
|
-
urlQuery.to = encodeURIComponent(`${urlQuery.to}`);
|
|
728
|
-
}
|
|
729
|
-
const hasUrlQuery = Object.keys(urlQuery).length > 0;
|
|
730
|
-
const urlHash = `#${(hash || keepHash && existingHash || "").replace(
|
|
731
|
-
/^#/,
|
|
732
|
-
""
|
|
733
|
-
)}`;
|
|
734
|
-
const hasUrlHash = urlHash.length > 1;
|
|
735
|
-
const urlTo = to || "";
|
|
736
|
-
const fullPath = `${urlTo}${hasUrlQuery ? qs.stringify(urlQuery, stringifyConfig) : ""}${hasUrlHash ? urlHash : ""}`;
|
|
737
|
-
if (type2 === "path") {
|
|
738
|
-
return fullPath;
|
|
1088
|
+
} else if (typeof type2 === "object" && (type2.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
1089
|
+
// Inner props are checked in the reconciler.
|
|
1090
|
+
type2.$$typeof === REACT_MEMO_TYPE)) {
|
|
1091
|
+
propTypes = type2.propTypes;
|
|
1092
|
+
} else {
|
|
1093
|
+
return;
|
|
1094
|
+
}
|
|
1095
|
+
if (propTypes) {
|
|
1096
|
+
var name2 = getComponentName(type2);
|
|
1097
|
+
checkPropTypes(propTypes, element.props, "prop", name2, element);
|
|
1098
|
+
} else if (type2.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
|
|
1099
|
+
propTypesMisspellWarningShown = true;
|
|
1100
|
+
var _name = getComponentName(type2);
|
|
1101
|
+
error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
|
|
1102
|
+
}
|
|
1103
|
+
if (typeof type2.getDefaultProps === "function" && !type2.getDefaultProps.isReactClassApproved) {
|
|
1104
|
+
error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
739
1107
|
}
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
const { resource, action, matchedRoute } = React.useMemo(() => {
|
|
759
|
-
return core.matchResourceFromRoute(pathname, resources2);
|
|
760
|
-
}, [resources2, pathname]);
|
|
761
|
-
if (Object.entries(params).length === 0 && matchedRoute) {
|
|
762
|
-
params = ((_a = reactRouterDom.matchPath(matchedRoute, pathname)) == null ? void 0 : _a.params) || {};
|
|
763
|
-
}
|
|
764
|
-
const fn = React.useCallback(() => {
|
|
765
|
-
const parsedSearch = qs.parse(search, { ignoreQueryPrefix: true });
|
|
766
|
-
const combinedParams = {
|
|
767
|
-
...params,
|
|
768
|
-
...parsedSearch
|
|
769
|
-
};
|
|
770
|
-
const response = {
|
|
771
|
-
...resource && { resource },
|
|
772
|
-
...action && { action },
|
|
773
|
-
...(parsedSearch == null ? void 0 : parsedSearch.id) && { id: decodeURIComponent(parsedSearch.id) },
|
|
774
|
-
// ...(params?.action && { action: params.action }), // lets see if there is a need for this
|
|
775
|
-
pathname,
|
|
776
|
-
params: {
|
|
777
|
-
...combinedParams,
|
|
778
|
-
current: convertToNumberIfPossible(combinedParams.current),
|
|
779
|
-
pageSize: convertToNumberIfPossible(combinedParams.pageSize),
|
|
780
|
-
to: combinedParams.to ? decodeURIComponent(combinedParams.to) : void 0
|
|
1108
|
+
function validateFragmentProps(fragment) {
|
|
1109
|
+
{
|
|
1110
|
+
var keys = Object.keys(fragment.props);
|
|
1111
|
+
for (var i = 0; i < keys.length; i++) {
|
|
1112
|
+
var key = keys[i];
|
|
1113
|
+
if (key !== "children" && key !== "key") {
|
|
1114
|
+
setCurrentlyValidatingElement$1(fragment);
|
|
1115
|
+
error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
|
|
1116
|
+
setCurrentlyValidatingElement$1(null);
|
|
1117
|
+
break;
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
if (fragment.ref !== null) {
|
|
1121
|
+
setCurrentlyValidatingElement$1(fragment);
|
|
1122
|
+
error("Invalid attribute `ref` supplied to `React.Fragment`.");
|
|
1123
|
+
setCurrentlyValidatingElement$1(null);
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
781
1126
|
}
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
function hasLoadedNamespace(ns, i18n2) {
|
|
859
|
-
let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
860
|
-
if (!i18n2.languages || !i18n2.languages.length) {
|
|
861
|
-
warnOnce("i18n.languages were undefined or empty", i18n2.languages);
|
|
862
|
-
return true;
|
|
863
|
-
}
|
|
864
|
-
const isNewerI18next = i18n2.options.ignoreJSONStructure !== void 0;
|
|
865
|
-
if (!isNewerI18next) {
|
|
866
|
-
return oldI18nextHasLoadedNamespace(ns, i18n2, options);
|
|
867
|
-
}
|
|
868
|
-
return i18n2.hasLoadedNamespace(ns, {
|
|
869
|
-
lng: options.lng,
|
|
870
|
-
precheck: (i18nInstance2, loadNotPending) => {
|
|
871
|
-
if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18nInstance2.services.backendConnector.backend && i18nInstance2.isLanguageChangingTo && !loadNotPending(i18nInstance2.isLanguageChangingTo, ns))
|
|
872
|
-
return false;
|
|
873
|
-
}
|
|
874
|
-
});
|
|
875
|
-
}
|
|
876
|
-
const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
|
|
877
|
-
const htmlEntities = {
|
|
878
|
-
"&": "&",
|
|
879
|
-
"&": "&",
|
|
880
|
-
"<": "<",
|
|
881
|
-
"<": "<",
|
|
882
|
-
">": ">",
|
|
883
|
-
">": ">",
|
|
884
|
-
"'": "'",
|
|
885
|
-
"'": "'",
|
|
886
|
-
""": '"',
|
|
887
|
-
""": '"',
|
|
888
|
-
" ": " ",
|
|
889
|
-
" ": " ",
|
|
890
|
-
"©": "©",
|
|
891
|
-
"©": "©",
|
|
892
|
-
"®": "®",
|
|
893
|
-
"®": "®",
|
|
894
|
-
"…": "…",
|
|
895
|
-
"…": "…",
|
|
896
|
-
"/": "/",
|
|
897
|
-
"/": "/"
|
|
898
|
-
};
|
|
899
|
-
const unescapeHtmlEntity = (m) => htmlEntities[m];
|
|
900
|
-
const unescape = (text) => text.replace(matchHtmlEntity, unescapeHtmlEntity);
|
|
901
|
-
let defaultOptions = {
|
|
902
|
-
bindI18n: "languageChanged",
|
|
903
|
-
bindI18nStore: "",
|
|
904
|
-
transEmptyNodeValue: "",
|
|
905
|
-
transSupportBasicHtmlNodes: true,
|
|
906
|
-
transWrapTextNodes: "",
|
|
907
|
-
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
|
|
908
|
-
useSuspense: true,
|
|
909
|
-
unescape
|
|
910
|
-
};
|
|
911
|
-
function setDefaults() {
|
|
912
|
-
let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
913
|
-
defaultOptions = {
|
|
914
|
-
...defaultOptions,
|
|
915
|
-
...options
|
|
916
|
-
};
|
|
917
|
-
}
|
|
918
|
-
function getDefaults() {
|
|
919
|
-
return defaultOptions;
|
|
920
|
-
}
|
|
921
|
-
let i18nInstance;
|
|
922
|
-
function setI18n(instance) {
|
|
923
|
-
i18nInstance = instance;
|
|
1127
|
+
function jsxWithValidation(type2, props, key, isStaticChildren, source, self2) {
|
|
1128
|
+
{
|
|
1129
|
+
var validType = isValidElementType(type2);
|
|
1130
|
+
if (!validType) {
|
|
1131
|
+
var info = "";
|
|
1132
|
+
if (type2 === void 0 || typeof type2 === "object" && type2 !== null && Object.keys(type2).length === 0) {
|
|
1133
|
+
info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
|
|
1134
|
+
}
|
|
1135
|
+
var sourceInfo = getSourceInfoErrorAddendum(source);
|
|
1136
|
+
if (sourceInfo) {
|
|
1137
|
+
info += sourceInfo;
|
|
1138
|
+
} else {
|
|
1139
|
+
info += getDeclarationErrorAddendum();
|
|
1140
|
+
}
|
|
1141
|
+
var typeString;
|
|
1142
|
+
if (type2 === null) {
|
|
1143
|
+
typeString = "null";
|
|
1144
|
+
} else if (Array.isArray(type2)) {
|
|
1145
|
+
typeString = "array";
|
|
1146
|
+
} else if (type2 !== void 0 && type2.$$typeof === REACT_ELEMENT_TYPE) {
|
|
1147
|
+
typeString = "<" + (getComponentName(type2.type) || "Unknown") + " />";
|
|
1148
|
+
info = " Did you accidentally export a JSX literal instead of a component?";
|
|
1149
|
+
} else {
|
|
1150
|
+
typeString = typeof type2;
|
|
1151
|
+
}
|
|
1152
|
+
error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
|
1153
|
+
}
|
|
1154
|
+
var element = jsxDEV(type2, props, key, source, self2);
|
|
1155
|
+
if (element == null) {
|
|
1156
|
+
return element;
|
|
1157
|
+
}
|
|
1158
|
+
if (validType) {
|
|
1159
|
+
var children = props.children;
|
|
1160
|
+
if (children !== void 0) {
|
|
1161
|
+
if (isStaticChildren) {
|
|
1162
|
+
if (Array.isArray(children)) {
|
|
1163
|
+
for (var i = 0; i < children.length; i++) {
|
|
1164
|
+
validateChildKeys(children[i], type2);
|
|
1165
|
+
}
|
|
1166
|
+
if (Object.freeze) {
|
|
1167
|
+
Object.freeze(children);
|
|
1168
|
+
}
|
|
1169
|
+
} else {
|
|
1170
|
+
error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
1171
|
+
}
|
|
1172
|
+
} else {
|
|
1173
|
+
validateChildKeys(children, type2);
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
if (type2 === exports3.Fragment) {
|
|
1178
|
+
validateFragmentProps(element);
|
|
1179
|
+
} else {
|
|
1180
|
+
validatePropTypes(element);
|
|
1181
|
+
}
|
|
1182
|
+
return element;
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
function jsxWithValidationStatic(type2, props, key) {
|
|
1186
|
+
{
|
|
1187
|
+
return jsxWithValidation(type2, props, key, true);
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
function jsxWithValidationDynamic(type2, props, key) {
|
|
1191
|
+
{
|
|
1192
|
+
return jsxWithValidation(type2, props, key, false);
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
var jsx = jsxWithValidationDynamic;
|
|
1196
|
+
var jsxs = jsxWithValidationStatic;
|
|
1197
|
+
exports3.jsx = jsx;
|
|
1198
|
+
exports3.jsxs = jsxs;
|
|
1199
|
+
})();
|
|
1200
|
+
}
|
|
1201
|
+
})(reactJsxRuntime_development);
|
|
1202
|
+
return reactJsxRuntime_development;
|
|
924
1203
|
}
|
|
925
|
-
|
|
926
|
-
|
|
1204
|
+
if (process.env.NODE_ENV === "production") {
|
|
1205
|
+
jsxRuntime.exports = requireReactJsxRuntime_production_min();
|
|
1206
|
+
} else {
|
|
1207
|
+
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
927
1208
|
}
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
1209
|
+
var jsxRuntimeExports = jsxRuntime.exports;
|
|
1210
|
+
const stringifyConfig = {
|
|
1211
|
+
addQueryPrefix: true,
|
|
1212
|
+
skipNulls: true,
|
|
1213
|
+
arrayFormat: "indices",
|
|
1214
|
+
encode: false,
|
|
1215
|
+
encodeValuesOnly: true
|
|
934
1216
|
};
|
|
935
|
-
const
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
this.usedNamespaces = {};
|
|
939
|
-
}
|
|
940
|
-
addUsedNamespaces(namespaces) {
|
|
941
|
-
namespaces.forEach((ns) => {
|
|
942
|
-
if (!this.usedNamespaces[ns])
|
|
943
|
-
this.usedNamespaces[ns] = true;
|
|
944
|
-
});
|
|
1217
|
+
const convertToNumberIfPossible = (value) => {
|
|
1218
|
+
if (typeof value === "undefined") {
|
|
1219
|
+
return value;
|
|
945
1220
|
}
|
|
946
|
-
|
|
947
|
-
|
|
1221
|
+
const num = Number(value);
|
|
1222
|
+
if (`${num}` === value) {
|
|
1223
|
+
return num;
|
|
948
1224
|
}
|
|
949
|
-
|
|
950
|
-
const usePrevious = (value, ignore) => {
|
|
951
|
-
const ref = React.useRef();
|
|
952
|
-
React.useEffect(() => {
|
|
953
|
-
ref.current = ignore ? ref.current : value;
|
|
954
|
-
}, [value, ignore]);
|
|
955
|
-
return ref.current;
|
|
1225
|
+
return value;
|
|
956
1226
|
};
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
let joinedNS = namespaces.join();
|
|
1005
|
-
if (props.lng)
|
|
1006
|
-
joinedNS = `${props.lng}${joinedNS}`;
|
|
1007
|
-
const previousJoinedNS = usePrevious(joinedNS);
|
|
1008
|
-
const isMounted = React.useRef(true);
|
|
1009
|
-
React.useEffect(() => {
|
|
1010
|
-
const {
|
|
1011
|
-
bindI18n,
|
|
1012
|
-
bindI18nStore
|
|
1013
|
-
} = i18nOptions;
|
|
1014
|
-
isMounted.current = true;
|
|
1015
|
-
if (!ready2 && !useSuspense) {
|
|
1016
|
-
if (props.lng) {
|
|
1017
|
-
loadLanguages(i18n2, props.lng, namespaces, () => {
|
|
1018
|
-
if (isMounted.current)
|
|
1019
|
-
setT(getT);
|
|
1020
|
-
});
|
|
1021
|
-
} else {
|
|
1022
|
-
loadNamespaces(i18n2, namespaces, () => {
|
|
1023
|
-
if (isMounted.current)
|
|
1024
|
-
setT(getT);
|
|
1025
|
-
});
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
if (ready2 && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
|
|
1029
|
-
setT(getT);
|
|
1030
|
-
}
|
|
1031
|
-
function boundReset() {
|
|
1032
|
-
if (isMounted.current)
|
|
1033
|
-
setT(getT);
|
|
1034
|
-
}
|
|
1035
|
-
if (bindI18n && i18n2)
|
|
1036
|
-
i18n2.on(bindI18n, boundReset);
|
|
1037
|
-
if (bindI18nStore && i18n2)
|
|
1038
|
-
i18n2.store.on(bindI18nStore, boundReset);
|
|
1039
|
-
return () => {
|
|
1040
|
-
isMounted.current = false;
|
|
1041
|
-
if (bindI18n && i18n2)
|
|
1042
|
-
bindI18n.split(" ").forEach((e) => i18n2.off(e, boundReset));
|
|
1043
|
-
if (bindI18nStore && i18n2)
|
|
1044
|
-
bindI18nStore.split(" ").forEach((e) => i18n2.store.off(e, boundReset));
|
|
1045
|
-
};
|
|
1046
|
-
}, [i18n2, joinedNS]);
|
|
1047
|
-
const isInitial = React.useRef(true);
|
|
1048
|
-
React.useEffect(() => {
|
|
1049
|
-
if (isMounted.current && !isInitial.current) {
|
|
1050
|
-
setT(getT);
|
|
1051
|
-
}
|
|
1052
|
-
isInitial.current = false;
|
|
1053
|
-
}, [i18n2, keyPrefix]);
|
|
1054
|
-
const ret = [t, i18n2, ready2];
|
|
1055
|
-
ret.t = t;
|
|
1056
|
-
ret.i18n = i18n2;
|
|
1057
|
-
ret.ready = ready2;
|
|
1058
|
-
if (ready2)
|
|
1059
|
-
return ret;
|
|
1060
|
-
if (!ready2 && !useSuspense)
|
|
1061
|
-
return ret;
|
|
1062
|
-
throw new Promise((resolve) => {
|
|
1063
|
-
if (props.lng) {
|
|
1064
|
-
loadLanguages(i18n2, props.lng, namespaces, () => resolve());
|
|
1065
|
-
} else {
|
|
1066
|
-
loadNamespaces(i18n2, namespaces, () => resolve());
|
|
1227
|
+
const routerProvider = {
|
|
1228
|
+
go: () => {
|
|
1229
|
+
const { search: existingSearch, hash: existingHash } = reactRouterDom.useLocation();
|
|
1230
|
+
const history = reactRouterDom.useHistory();
|
|
1231
|
+
const fn = React.useCallback(
|
|
1232
|
+
({ to, type: type2, query, hash, options: { keepQuery, keepHash } = {} }) => {
|
|
1233
|
+
const urlQuery = {
|
|
1234
|
+
...keepQuery && existingSearch && qs.parse(existingSearch, { ignoreQueryPrefix: true }),
|
|
1235
|
+
...query
|
|
1236
|
+
};
|
|
1237
|
+
if (urlQuery.to) {
|
|
1238
|
+
urlQuery.to = encodeURIComponent(`${urlQuery.to}`);
|
|
1239
|
+
}
|
|
1240
|
+
const hasUrlQuery = Object.keys(urlQuery).length > 0;
|
|
1241
|
+
const urlHash = `#${(hash || keepHash && existingHash || "").replace(
|
|
1242
|
+
/^#/,
|
|
1243
|
+
""
|
|
1244
|
+
)}`;
|
|
1245
|
+
const hasUrlHash = urlHash.length > 1;
|
|
1246
|
+
const urlTo = to || "";
|
|
1247
|
+
const fullPath = `${urlTo}${hasUrlQuery ? qs.stringify(urlQuery, stringifyConfig) : ""}${hasUrlHash ? urlHash : ""}`;
|
|
1248
|
+
if (type2 === "path") {
|
|
1249
|
+
return fullPath;
|
|
1250
|
+
}
|
|
1251
|
+
return history[type2 || "push"](fullPath);
|
|
1252
|
+
},
|
|
1253
|
+
[existingHash, existingSearch, history]
|
|
1254
|
+
);
|
|
1255
|
+
return fn;
|
|
1256
|
+
},
|
|
1257
|
+
back: () => {
|
|
1258
|
+
const history = reactRouterDom.useHistory();
|
|
1259
|
+
const fn = React.useCallback(() => {
|
|
1260
|
+
history.go(-1);
|
|
1261
|
+
}, [history]);
|
|
1262
|
+
return fn;
|
|
1263
|
+
},
|
|
1264
|
+
parse: () => {
|
|
1265
|
+
var _a;
|
|
1266
|
+
let params = reactRouterDom.useParams();
|
|
1267
|
+
const { pathname, search } = reactRouterDom.useLocation();
|
|
1268
|
+
const { resources: resources2 } = React.useContext(core.ResourceContext);
|
|
1269
|
+
const { resource, action, matchedRoute } = React.useMemo(() => {
|
|
1270
|
+
return core.matchResourceFromRoute(pathname, resources2);
|
|
1271
|
+
}, [resources2, pathname]);
|
|
1272
|
+
if (Object.entries(params).length === 0 && matchedRoute) {
|
|
1273
|
+
params = ((_a = reactRouterDom.matchPath(matchedRoute, pathname)) == null ? void 0 : _a.params) || {};
|
|
1067
1274
|
}
|
|
1068
|
-
|
|
1069
|
-
|
|
1275
|
+
const fn = React.useCallback(() => {
|
|
1276
|
+
const parsedSearch = qs.parse(search, { ignoreQueryPrefix: true });
|
|
1277
|
+
const combinedParams = {
|
|
1278
|
+
...params,
|
|
1279
|
+
...parsedSearch
|
|
1280
|
+
};
|
|
1281
|
+
const response = {
|
|
1282
|
+
...resource && { resource },
|
|
1283
|
+
...action && { action },
|
|
1284
|
+
...(parsedSearch == null ? void 0 : parsedSearch.id) && { id: decodeURIComponent(parsedSearch.id) },
|
|
1285
|
+
// ...(params?.action && { action: params.action }), // lets see if there is a need for this
|
|
1286
|
+
pathname,
|
|
1287
|
+
params: {
|
|
1288
|
+
...combinedParams,
|
|
1289
|
+
current: convertToNumberIfPossible(combinedParams.current),
|
|
1290
|
+
pageSize: convertToNumberIfPossible(combinedParams.pageSize),
|
|
1291
|
+
to: combinedParams.to ? decodeURIComponent(combinedParams.to) : void 0
|
|
1292
|
+
}
|
|
1293
|
+
};
|
|
1294
|
+
return response;
|
|
1295
|
+
}, [pathname, search, params, resource, action]);
|
|
1296
|
+
return fn;
|
|
1297
|
+
},
|
|
1298
|
+
Link: React.forwardRef(function RefineLink(props, ref) {
|
|
1299
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactRouterDom.Link, { ...props, ref });
|
|
1300
|
+
})
|
|
1301
|
+
};
|
|
1070
1302
|
function useK8sYamlEditor() {
|
|
1071
1303
|
const foldSymbol = React.useCallback(function(editor, symbol) {
|
|
1072
1304
|
const model = editor.getModel();
|
|
@@ -7282,236 +7514,6 @@ var __publicField = (obj, key, value) => {
|
|
|
7282
7514
|
/* @__PURE__ */ jsxRuntimeExports.jsx(kit.form.Item, { name: ["metadata", "annotations"], label: "Annotations", children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValueListWidget, {}) })
|
|
7283
7515
|
] });
|
|
7284
7516
|
}
|
|
7285
|
-
const copy$1 = "Copy";
|
|
7286
|
-
const reset_arguments$1 = "Reset";
|
|
7287
|
-
const view_changes$1 = "Show Diff";
|
|
7288
|
-
const back_to_edit$1 = "Edit";
|
|
7289
|
-
const configure_file$1 = "Configuration";
|
|
7290
|
-
const yaml_format_wrong$1 = "Configuration is in an invalid YAML format.";
|
|
7291
|
-
const yaml_value_wrong$1 = "Configuration has invalid values.";
|
|
7292
|
-
const edit_yaml$1 = "Edit YAML";
|
|
7293
|
-
const copied$1 = "Copied";
|
|
7294
|
-
const already_reset$1 = "Already reset";
|
|
7295
|
-
const fetch_schema_fail$1 = "Failed to fetch schema.";
|
|
7296
|
-
const obtain_data_error$1 = "Having trouble getting data.";
|
|
7297
|
-
const retry$1 = "Retry";
|
|
7298
|
-
const create_resource$1 = "Create {{resource}}";
|
|
7299
|
-
const edit_resource$1 = "Edit {{resource}}";
|
|
7300
|
-
const dovetail$1 = {
|
|
7301
|
-
copy: copy$1,
|
|
7302
|
-
reset_arguments: reset_arguments$1,
|
|
7303
|
-
view_changes: view_changes$1,
|
|
7304
|
-
back_to_edit: back_to_edit$1,
|
|
7305
|
-
configure_file: configure_file$1,
|
|
7306
|
-
yaml_format_wrong: yaml_format_wrong$1,
|
|
7307
|
-
yaml_value_wrong: yaml_value_wrong$1,
|
|
7308
|
-
edit_yaml: edit_yaml$1,
|
|
7309
|
-
copied: copied$1,
|
|
7310
|
-
already_reset: already_reset$1,
|
|
7311
|
-
fetch_schema_fail: fetch_schema_fail$1,
|
|
7312
|
-
obtain_data_error: obtain_data_error$1,
|
|
7313
|
-
retry: retry$1,
|
|
7314
|
-
create_resource: create_resource$1,
|
|
7315
|
-
edit_resource: edit_resource$1
|
|
7316
|
-
};
|
|
7317
|
-
const EN = {
|
|
7318
|
-
dovetail: dovetail$1
|
|
7319
|
-
};
|
|
7320
|
-
const copy = "复制";
|
|
7321
|
-
const reset_arguments = "重置";
|
|
7322
|
-
const view_changes = "查看改动";
|
|
7323
|
-
const back_to_edit = "编辑";
|
|
7324
|
-
const configure_file = "配置内容";
|
|
7325
|
-
const yaml_format_wrong = "配置内容不是有效的 yaml 格式。";
|
|
7326
|
-
const yaml_value_wrong = "配置内容中存在不合法的值。";
|
|
7327
|
-
const edit_yaml = "编辑 YAML";
|
|
7328
|
-
const copied = "已复制";
|
|
7329
|
-
const already_reset = "已重置";
|
|
7330
|
-
const cancel = "取消";
|
|
7331
|
-
const create = "创建";
|
|
7332
|
-
const confirm_delete_text = "确定要删除 {{target}} 吗?";
|
|
7333
|
-
const edit = "编辑";
|
|
7334
|
-
const namespace = "名字空间";
|
|
7335
|
-
const name = "名称";
|
|
7336
|
-
const state = "状态";
|
|
7337
|
-
const status = "状态";
|
|
7338
|
-
const phase = "状态";
|
|
7339
|
-
const image = "容器镜像";
|
|
7340
|
-
const replicas = "副本数";
|
|
7341
|
-
const created_time = "创建时间";
|
|
7342
|
-
const label = "标签";
|
|
7343
|
-
const annotation = "注释";
|
|
7344
|
-
const type = "类型";
|
|
7345
|
-
const event = "事件";
|
|
7346
|
-
const reason = "原因";
|
|
7347
|
-
const object = "对象";
|
|
7348
|
-
const note$1 = "事件信息";
|
|
7349
|
-
const condition = "Condition";
|
|
7350
|
-
const download_yaml = "下载 YAML";
|
|
7351
|
-
const detail = "详情";
|
|
7352
|
-
const node_name = "主机名称";
|
|
7353
|
-
const restarts = "重启次数";
|
|
7354
|
-
const updated_time = "更新时间";
|
|
7355
|
-
const message = "消息";
|
|
7356
|
-
const save = "保存";
|
|
7357
|
-
const more = "更多";
|
|
7358
|
-
const workload = "工作负载";
|
|
7359
|
-
const all_namespaces = "所有名字空间";
|
|
7360
|
-
const empty = "无可显示的数据";
|
|
7361
|
-
const schedule = "调度时间表";
|
|
7362
|
-
const lastScheduleTime = "上次调度时间";
|
|
7363
|
-
const duration = "持续时间";
|
|
7364
|
-
const completions = "完成 Job 历史数";
|
|
7365
|
-
const started = "开始时间";
|
|
7366
|
-
const init_container = "初始化容器";
|
|
7367
|
-
const container = "容器";
|
|
7368
|
-
const redeploy = "重新部署";
|
|
7369
|
-
const data = "数据";
|
|
7370
|
-
const suspend = "暂停";
|
|
7371
|
-
const resume = "重新开始";
|
|
7372
|
-
const cluster = "集群";
|
|
7373
|
-
const storage = "存储";
|
|
7374
|
-
const network = "网络";
|
|
7375
|
-
const clusterIp = "集群 IP";
|
|
7376
|
-
const sessionAffinity = "会话保持";
|
|
7377
|
-
const log = "日志";
|
|
7378
|
-
const select_container = "选择容器";
|
|
7379
|
-
const wrap = "折叠";
|
|
7380
|
-
const resume_log = "继续";
|
|
7381
|
-
const log_new_lines = ",并展示 {{ count }} 行新日志";
|
|
7382
|
-
const fetch_schema_fail = "获取 schema 失败。";
|
|
7383
|
-
const obtain_data_error = "获取数据时遇到问题。";
|
|
7384
|
-
const retry = "重试";
|
|
7385
|
-
const ready = "就绪";
|
|
7386
|
-
const updating = "更新中";
|
|
7387
|
-
const completed = "完成";
|
|
7388
|
-
const failed = "异常";
|
|
7389
|
-
const suspended = "挂起";
|
|
7390
|
-
const running = "运行中";
|
|
7391
|
-
const terminating = "终止";
|
|
7392
|
-
const succeeded = "成功终止";
|
|
7393
|
-
const unknown = "未知";
|
|
7394
|
-
const pending = "待处理";
|
|
7395
|
-
const waiting = "等待中";
|
|
7396
|
-
const create_resource = "创建 {{resource}}";
|
|
7397
|
-
const edit_resource = "编辑 {{resource}}";
|
|
7398
|
-
const sec = "秒";
|
|
7399
|
-
const min = "分";
|
|
7400
|
-
const hr = "小时";
|
|
7401
|
-
const day = "天";
|
|
7402
|
-
const expand = "展开";
|
|
7403
|
-
const fold = "收起";
|
|
7404
|
-
const rule = "规则";
|
|
7405
|
-
const default_backend = "默认后端";
|
|
7406
|
-
const ingress_rule_type = "规则类型";
|
|
7407
|
-
const port = "端口";
|
|
7408
|
-
const dovetail = {
|
|
7409
|
-
copy,
|
|
7410
|
-
reset_arguments,
|
|
7411
|
-
view_changes,
|
|
7412
|
-
back_to_edit,
|
|
7413
|
-
configure_file,
|
|
7414
|
-
yaml_format_wrong,
|
|
7415
|
-
yaml_value_wrong,
|
|
7416
|
-
edit_yaml,
|
|
7417
|
-
copied,
|
|
7418
|
-
already_reset,
|
|
7419
|
-
cancel,
|
|
7420
|
-
"delete": "删除",
|
|
7421
|
-
create,
|
|
7422
|
-
confirm_delete_text,
|
|
7423
|
-
edit,
|
|
7424
|
-
namespace,
|
|
7425
|
-
name,
|
|
7426
|
-
state,
|
|
7427
|
-
status,
|
|
7428
|
-
phase,
|
|
7429
|
-
image,
|
|
7430
|
-
replicas,
|
|
7431
|
-
created_time,
|
|
7432
|
-
label,
|
|
7433
|
-
annotation,
|
|
7434
|
-
type,
|
|
7435
|
-
event,
|
|
7436
|
-
reason,
|
|
7437
|
-
object,
|
|
7438
|
-
note: note$1,
|
|
7439
|
-
condition,
|
|
7440
|
-
download_yaml,
|
|
7441
|
-
detail,
|
|
7442
|
-
node_name,
|
|
7443
|
-
restarts,
|
|
7444
|
-
updated_time,
|
|
7445
|
-
message,
|
|
7446
|
-
save,
|
|
7447
|
-
more,
|
|
7448
|
-
workload,
|
|
7449
|
-
all_namespaces,
|
|
7450
|
-
empty,
|
|
7451
|
-
schedule,
|
|
7452
|
-
lastScheduleTime,
|
|
7453
|
-
duration,
|
|
7454
|
-
completions,
|
|
7455
|
-
started,
|
|
7456
|
-
init_container,
|
|
7457
|
-
container,
|
|
7458
|
-
redeploy,
|
|
7459
|
-
data,
|
|
7460
|
-
suspend,
|
|
7461
|
-
resume,
|
|
7462
|
-
cluster,
|
|
7463
|
-
storage,
|
|
7464
|
-
network,
|
|
7465
|
-
clusterIp,
|
|
7466
|
-
sessionAffinity,
|
|
7467
|
-
log,
|
|
7468
|
-
select_container,
|
|
7469
|
-
wrap,
|
|
7470
|
-
resume_log,
|
|
7471
|
-
log_new_lines,
|
|
7472
|
-
fetch_schema_fail,
|
|
7473
|
-
obtain_data_error,
|
|
7474
|
-
retry,
|
|
7475
|
-
ready,
|
|
7476
|
-
updating,
|
|
7477
|
-
completed,
|
|
7478
|
-
failed,
|
|
7479
|
-
suspended,
|
|
7480
|
-
running,
|
|
7481
|
-
terminating,
|
|
7482
|
-
succeeded,
|
|
7483
|
-
unknown,
|
|
7484
|
-
pending,
|
|
7485
|
-
waiting,
|
|
7486
|
-
create_resource,
|
|
7487
|
-
edit_resource,
|
|
7488
|
-
sec,
|
|
7489
|
-
min,
|
|
7490
|
-
hr,
|
|
7491
|
-
day,
|
|
7492
|
-
expand,
|
|
7493
|
-
fold,
|
|
7494
|
-
rule,
|
|
7495
|
-
default_backend,
|
|
7496
|
-
ingress_rule_type,
|
|
7497
|
-
port
|
|
7498
|
-
};
|
|
7499
|
-
const ZH = {
|
|
7500
|
-
dovetail
|
|
7501
|
-
};
|
|
7502
|
-
const resources = {
|
|
7503
|
-
"en-US": EN,
|
|
7504
|
-
"zh-CN": ZH
|
|
7505
|
-
};
|
|
7506
|
-
i18n.use(initReactI18next).init({
|
|
7507
|
-
supportedLngs: ["en-US", "zh-CN"],
|
|
7508
|
-
resources,
|
|
7509
|
-
ns: Object.keys(resources["zh-CN"]),
|
|
7510
|
-
defaultNS: "dovetail",
|
|
7511
|
-
fallbackLng: ["en-US", "zh-CN"],
|
|
7512
|
-
lng: "zh-CN",
|
|
7513
|
-
nsSeparator: "."
|
|
7514
|
-
});
|
|
7515
7517
|
function addId(arr, idKey) {
|
|
7516
7518
|
return arr.map((e) => {
|
|
7517
7519
|
return {
|
|
@@ -10669,6 +10671,9 @@ var __publicField = (obj, key, value) => {
|
|
|
10669
10671
|
const CronjobJobsTable = ({
|
|
10670
10672
|
owner
|
|
10671
10673
|
}) => {
|
|
10674
|
+
const {
|
|
10675
|
+
i18n: i18n2
|
|
10676
|
+
} = useTranslation();
|
|
10672
10677
|
const kit = eagle.useUIKit();
|
|
10673
10678
|
const [selectedKeys, setSelectedKeys] = React.useState([]);
|
|
10674
10679
|
const [currentPage, setCurrentPage] = React.useState(1);
|
|
@@ -10686,7 +10691,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10686
10691
|
return owner ? matchOwner(p, owner) : true;
|
|
10687
10692
|
});
|
|
10688
10693
|
}, [data2 == null ? void 0 : data2.data, owner]);
|
|
10689
|
-
const columns = [NameColumnRenderer("jobs"), StateDisplayColumnRenderer(), NameSpaceColumnRenderer(), WorkloadImageColumnRenderer(), CompletionsCountColumnRenderer(), DurationColumnRenderer(), AgeColumnRenderer()];
|
|
10694
|
+
const columns = [NameColumnRenderer(i18n2, "jobs"), StateDisplayColumnRenderer(i18n2), NameSpaceColumnRenderer(i18n2), WorkloadImageColumnRenderer(i18n2), CompletionsCountColumnRenderer(i18n2), DurationColumnRenderer(i18n2), AgeColumnRenderer(i18n2)];
|
|
10690
10695
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
|
|
10691
10696
|
direction: "vertical",
|
|
10692
10697
|
className: "c16agr8o",
|
|
@@ -10719,7 +10724,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10719
10724
|
const parsed = core.useParsed();
|
|
10720
10725
|
const columns = React.useMemo(
|
|
10721
10726
|
() => [
|
|
10722
|
-
NameSpaceColumnRenderer(),
|
|
10727
|
+
NameSpaceColumnRenderer(i18n2),
|
|
10723
10728
|
{
|
|
10724
10729
|
key: "type",
|
|
10725
10730
|
display: true,
|
|
@@ -10752,7 +10757,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10752
10757
|
sortable: true,
|
|
10753
10758
|
sorter: CommonSorter(["note"])
|
|
10754
10759
|
},
|
|
10755
|
-
AgeColumnRenderer()
|
|
10760
|
+
AgeColumnRenderer(i18n2)
|
|
10756
10761
|
],
|
|
10757
10762
|
[i18n2]
|
|
10758
10763
|
);
|
|
@@ -10930,6 +10935,9 @@ var __publicField = (obj, key, value) => {
|
|
|
10930
10935
|
selector,
|
|
10931
10936
|
hideToolbar
|
|
10932
10937
|
}) => {
|
|
10938
|
+
const {
|
|
10939
|
+
i18n: i18n2
|
|
10940
|
+
} = useTranslation();
|
|
10933
10941
|
const kit = eagle.useUIKit();
|
|
10934
10942
|
const [selectedKeys, setSelectedKeys] = React.useState([]);
|
|
10935
10943
|
const [currentPage, setCurrentPage] = React.useState(1);
|
|
@@ -10950,7 +10958,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10950
10958
|
return selector ? matchSelector(p, selector) : true;
|
|
10951
10959
|
});
|
|
10952
10960
|
}, [data2 == null ? void 0 : data2.data, selector]);
|
|
10953
|
-
const columns = [StateDisplayColumnRenderer(), NameColumnRenderer("pods"), NodeNameColumnRenderer(), WorkloadImageColumnRenderer(), RestartCountColumnRenderer()];
|
|
10961
|
+
const columns = [StateDisplayColumnRenderer(i18n2), NameColumnRenderer(i18n2, "pods"), NodeNameColumnRenderer(i18n2), WorkloadImageColumnRenderer(i18n2), RestartCountColumnRenderer(i18n2)];
|
|
10954
10962
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
|
|
10955
10963
|
direction: "vertical",
|
|
10956
10964
|
className: "c1dicff8",
|
|
@@ -11147,10 +11155,10 @@ var __publicField = (obj, key, value) => {
|
|
|
11147
11155
|
)
|
|
11148
11156
|
] });
|
|
11149
11157
|
}
|
|
11150
|
-
const ImageField = () => {
|
|
11158
|
+
const ImageField = (i18n2) => {
|
|
11151
11159
|
return {
|
|
11152
11160
|
key: "Image",
|
|
11153
|
-
title:
|
|
11161
|
+
title: i18n2.t("dovetail.image"),
|
|
11154
11162
|
path: ["imageNames"],
|
|
11155
11163
|
col: 12,
|
|
11156
11164
|
renderContent(value) {
|
|
@@ -11158,20 +11166,20 @@ var __publicField = (obj, key, value) => {
|
|
|
11158
11166
|
}
|
|
11159
11167
|
};
|
|
11160
11168
|
};
|
|
11161
|
-
const ReplicaField = () => {
|
|
11169
|
+
const ReplicaField = (i18n2) => {
|
|
11162
11170
|
return {
|
|
11163
11171
|
key: "Replicas",
|
|
11164
|
-
title:
|
|
11172
|
+
title: i18n2.t("dovetail.replicas"),
|
|
11165
11173
|
path: ["status", "replicas"],
|
|
11166
11174
|
renderContent: (_, record, field) => {
|
|
11167
11175
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(WorkloadReplicas, { record, label: field.title, editable: true });
|
|
11168
11176
|
}
|
|
11169
11177
|
};
|
|
11170
11178
|
};
|
|
11171
|
-
const ConditionsField = () => {
|
|
11179
|
+
const ConditionsField = (i18n2) => {
|
|
11172
11180
|
return {
|
|
11173
11181
|
key: "Conditions",
|
|
11174
|
-
title:
|
|
11182
|
+
title: i18n2.t("dovetail.condition"),
|
|
11175
11183
|
path: ["status", "conditions"],
|
|
11176
11184
|
renderContent: (value) => {
|
|
11177
11185
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ConditionsTable, { conditions: value });
|
|
@@ -11219,20 +11227,20 @@ var __publicField = (obj, key, value) => {
|
|
|
11219
11227
|
}
|
|
11220
11228
|
};
|
|
11221
11229
|
};
|
|
11222
|
-
const DataField = () => {
|
|
11230
|
+
const DataField = (i18n2) => {
|
|
11223
11231
|
return {
|
|
11224
11232
|
key: "data",
|
|
11225
|
-
title:
|
|
11233
|
+
title: i18n2.t("dovetail.data"),
|
|
11226
11234
|
path: ["data"],
|
|
11227
11235
|
renderContent: (val) => {
|
|
11228
11236
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValue, { value: val });
|
|
11229
11237
|
}
|
|
11230
11238
|
};
|
|
11231
11239
|
};
|
|
11232
|
-
const SecretDataField = () => {
|
|
11240
|
+
const SecretDataField = (i18n2) => {
|
|
11233
11241
|
return {
|
|
11234
11242
|
key: "data",
|
|
11235
|
-
title:
|
|
11243
|
+
title: i18n2.t("dovetail.data"),
|
|
11236
11244
|
path: ["data"],
|
|
11237
11245
|
renderContent: (val) => {
|
|
11238
11246
|
const decodeVal = {};
|
|
@@ -11243,10 +11251,10 @@ var __publicField = (obj, key, value) => {
|
|
|
11243
11251
|
}
|
|
11244
11252
|
};
|
|
11245
11253
|
};
|
|
11246
|
-
const StartTimeField = () => {
|
|
11254
|
+
const StartTimeField = (i18n2) => {
|
|
11247
11255
|
return {
|
|
11248
11256
|
key: "started",
|
|
11249
|
-
title:
|
|
11257
|
+
title: i18n2.t("dovetail.started"),
|
|
11250
11258
|
path: ["status", "startTime"],
|
|
11251
11259
|
col: 12,
|
|
11252
11260
|
renderContent(value) {
|
|
@@ -11254,24 +11262,24 @@ var __publicField = (obj, key, value) => {
|
|
|
11254
11262
|
}
|
|
11255
11263
|
};
|
|
11256
11264
|
};
|
|
11257
|
-
const ServiceTypeField = () => {
|
|
11265
|
+
const ServiceTypeField = (i18n2) => {
|
|
11258
11266
|
return {
|
|
11259
11267
|
key: "type",
|
|
11260
|
-
title:
|
|
11268
|
+
title: i18n2.t("dovetail.type"),
|
|
11261
11269
|
path: ["spec", "type"]
|
|
11262
11270
|
};
|
|
11263
11271
|
};
|
|
11264
|
-
const ClusterIpField = () => {
|
|
11272
|
+
const ClusterIpField = (i18n2) => {
|
|
11265
11273
|
return {
|
|
11266
11274
|
key: "clusterIp",
|
|
11267
|
-
title:
|
|
11275
|
+
title: i18n2.t("dovetail.clusterIp"),
|
|
11268
11276
|
path: ["spec", "clusterIP"]
|
|
11269
11277
|
};
|
|
11270
11278
|
};
|
|
11271
|
-
const SessionAffinityField = () => {
|
|
11279
|
+
const SessionAffinityField = (i18n2) => {
|
|
11272
11280
|
return {
|
|
11273
11281
|
key: "clusterIp",
|
|
11274
|
-
title:
|
|
11282
|
+
title: i18n2.t("dovetail.sessionAffinity"),
|
|
11275
11283
|
path: ["spec", "sessionAffinity"]
|
|
11276
11284
|
};
|
|
11277
11285
|
};
|
|
@@ -11293,20 +11301,20 @@ var __publicField = (obj, key, value) => {
|
|
|
11293
11301
|
}
|
|
11294
11302
|
};
|
|
11295
11303
|
};
|
|
11296
|
-
const IngressRulesTableTabField = () => {
|
|
11304
|
+
const IngressRulesTableTabField = (i18n2) => {
|
|
11297
11305
|
return {
|
|
11298
11306
|
key: "rules",
|
|
11299
|
-
title:
|
|
11307
|
+
title: i18n2.t("dovetail.rule"),
|
|
11300
11308
|
path: ["spec", "rules"],
|
|
11301
11309
|
renderContent: (_, record) => {
|
|
11302
11310
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(IngressRulesTable, { ingress: record });
|
|
11303
11311
|
}
|
|
11304
11312
|
};
|
|
11305
11313
|
};
|
|
11306
|
-
const EventsTableTabField = () => {
|
|
11314
|
+
const EventsTableTabField = (i18n2) => {
|
|
11307
11315
|
return {
|
|
11308
11316
|
key: "event",
|
|
11309
|
-
title:
|
|
11317
|
+
title: i18n2.t("dovetail.event"),
|
|
11310
11318
|
path: [],
|
|
11311
11319
|
renderContent: () => {
|
|
11312
11320
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(EventsTable, {});
|
|
@@ -12007,23 +12015,17 @@ var __publicField = (obj, key, value) => {
|
|
|
12007
12015
|
}
|
|
12008
12016
|
function ResourceList(props) {
|
|
12009
12017
|
const { formatter, name: name2, columns, Dropdown } = props;
|
|
12018
|
+
const { i18n: i18n2 } = useTranslation();
|
|
12010
12019
|
const { tableProps, selectedKeys } = useEagleTable({
|
|
12011
12020
|
useTableParams: {},
|
|
12012
|
-
columns: [NameColumnRenderer(), ...columns],
|
|
12021
|
+
columns: [NameColumnRenderer(i18n2), ...columns],
|
|
12013
12022
|
tableProps: {
|
|
12014
12023
|
currentSize: 10
|
|
12015
12024
|
},
|
|
12016
12025
|
formatter,
|
|
12017
12026
|
Dropdown
|
|
12018
12027
|
});
|
|
12019
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12020
|
-
ListPage,
|
|
12021
|
-
{
|
|
12022
|
-
title: name2 || "",
|
|
12023
|
-
selectedKeys,
|
|
12024
|
-
tableProps
|
|
12025
|
-
}
|
|
12026
|
-
);
|
|
12028
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ListPage, { title: name2 || "", selectedKeys, tableProps });
|
|
12027
12029
|
}
|
|
12028
12030
|
function ResourceShow(props) {
|
|
12029
12031
|
const { formatter, showConfig, Dropdown } = props;
|
|
@@ -18471,13 +18473,13 @@ var __publicField = (obj, key, value) => {
|
|
|
18471
18473
|
return 1;
|
|
18472
18474
|
return -1;
|
|
18473
18475
|
};
|
|
18474
|
-
const NameColumnRenderer = (resource = "") => {
|
|
18476
|
+
const NameColumnRenderer = (i18n2, resource = "") => {
|
|
18475
18477
|
const dataIndex = ["metadata", "name"];
|
|
18476
18478
|
return {
|
|
18477
18479
|
key: "name",
|
|
18478
18480
|
display: true,
|
|
18479
18481
|
dataIndex,
|
|
18480
|
-
title:
|
|
18482
|
+
title: i18n2.t("dovetail.name"),
|
|
18481
18483
|
sortable: true,
|
|
18482
18484
|
sorter: CommonSorter(dataIndex),
|
|
18483
18485
|
render: (v, record) => {
|
|
@@ -18485,36 +18487,36 @@ var __publicField = (obj, key, value) => {
|
|
|
18485
18487
|
}
|
|
18486
18488
|
};
|
|
18487
18489
|
};
|
|
18488
|
-
const NameSpaceColumnRenderer = () => {
|
|
18490
|
+
const NameSpaceColumnRenderer = (i18n2) => {
|
|
18489
18491
|
const dataIndex = ["metadata", "namespace"];
|
|
18490
18492
|
return {
|
|
18491
18493
|
key: "namespace",
|
|
18492
18494
|
display: true,
|
|
18493
18495
|
dataIndex,
|
|
18494
|
-
title:
|
|
18496
|
+
title: i18n2.t("dovetail.namespace"),
|
|
18495
18497
|
sortable: true,
|
|
18496
18498
|
sorter: CommonSorter(dataIndex)
|
|
18497
18499
|
};
|
|
18498
18500
|
};
|
|
18499
|
-
const StateDisplayColumnRenderer = () => {
|
|
18501
|
+
const StateDisplayColumnRenderer = (i18n2) => {
|
|
18500
18502
|
const dataIndex = ["stateDisplay"];
|
|
18501
18503
|
return {
|
|
18502
18504
|
key: "stateDisplay",
|
|
18503
18505
|
display: true,
|
|
18504
18506
|
dataIndex,
|
|
18505
|
-
title:
|
|
18507
|
+
title: i18n2.t("dovetail.state"),
|
|
18506
18508
|
sortable: true,
|
|
18507
18509
|
sorter: CommonSorter(dataIndex),
|
|
18508
18510
|
render: (v) => /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, { state: v })
|
|
18509
18511
|
};
|
|
18510
18512
|
};
|
|
18511
|
-
const WorkloadImageColumnRenderer = () => {
|
|
18513
|
+
const WorkloadImageColumnRenderer = (i18n2) => {
|
|
18512
18514
|
const dataIndex = ["imageNames"];
|
|
18513
18515
|
return {
|
|
18514
18516
|
key: "image",
|
|
18515
18517
|
display: true,
|
|
18516
18518
|
dataIndex,
|
|
18517
|
-
title:
|
|
18519
|
+
title: i18n2.t("dovetail.image"),
|
|
18518
18520
|
sortable: true,
|
|
18519
18521
|
sorter: CommonSorter(dataIndex),
|
|
18520
18522
|
render(value, record) {
|
|
@@ -18522,23 +18524,23 @@ var __publicField = (obj, key, value) => {
|
|
|
18522
18524
|
}
|
|
18523
18525
|
};
|
|
18524
18526
|
};
|
|
18525
|
-
const WorkloadRestartsColumnRenderer = () => {
|
|
18527
|
+
const WorkloadRestartsColumnRenderer = (i18n2) => {
|
|
18526
18528
|
const dataIndex = ["restarts"];
|
|
18527
18529
|
return {
|
|
18528
18530
|
key: "restarts",
|
|
18529
18531
|
display: true,
|
|
18530
18532
|
dataIndex,
|
|
18531
|
-
title:
|
|
18533
|
+
title: i18n2.t("dovetail.restarts"),
|
|
18532
18534
|
sortable: false
|
|
18533
18535
|
};
|
|
18534
18536
|
};
|
|
18535
|
-
const ReplicasColumnRenderer = () => {
|
|
18537
|
+
const ReplicasColumnRenderer = (i18n2) => {
|
|
18536
18538
|
const dataIndex = ["status", "replicas"];
|
|
18537
18539
|
return {
|
|
18538
18540
|
key: "replicas",
|
|
18539
18541
|
display: true,
|
|
18540
18542
|
dataIndex,
|
|
18541
|
-
title:
|
|
18543
|
+
title: i18n2.t("dovetail.replicas"),
|
|
18542
18544
|
sortable: true,
|
|
18543
18545
|
sorter: CommonSorter(dataIndex),
|
|
18544
18546
|
render: (_, record) => {
|
|
@@ -18550,13 +18552,13 @@ var __publicField = (obj, key, value) => {
|
|
|
18550
18552
|
}
|
|
18551
18553
|
};
|
|
18552
18554
|
};
|
|
18553
|
-
const AgeColumnRenderer = () => {
|
|
18555
|
+
const AgeColumnRenderer = (i18n2) => {
|
|
18554
18556
|
const dataIndex = ["metadata", "creationTimestamp"];
|
|
18555
18557
|
return {
|
|
18556
18558
|
key: "creationTimestamp",
|
|
18557
18559
|
display: true,
|
|
18558
18560
|
dataIndex,
|
|
18559
|
-
title:
|
|
18561
|
+
title: i18n2.t("dovetail.created_time"),
|
|
18560
18562
|
sortable: true,
|
|
18561
18563
|
sorter: (a, b) => {
|
|
18562
18564
|
const valA = new Date(lodashExports.get(a, dataIndex));
|
|
@@ -18572,76 +18574,76 @@ var __publicField = (obj, key, value) => {
|
|
|
18572
18574
|
}
|
|
18573
18575
|
};
|
|
18574
18576
|
};
|
|
18575
|
-
const NodeNameColumnRenderer = (options) => {
|
|
18577
|
+
const NodeNameColumnRenderer = (i18n2, options) => {
|
|
18576
18578
|
const dataIndex = ["spec", "nodeName"];
|
|
18577
18579
|
return {
|
|
18578
18580
|
key: "node",
|
|
18579
18581
|
display: true,
|
|
18580
18582
|
dataIndex,
|
|
18581
|
-
title:
|
|
18583
|
+
title: i18n2.t("dovetail.node_name"),
|
|
18582
18584
|
sortable: true,
|
|
18583
18585
|
sorter: CommonSorter(dataIndex),
|
|
18584
18586
|
...options
|
|
18585
18587
|
};
|
|
18586
18588
|
};
|
|
18587
|
-
const RestartCountColumnRenderer = () => {
|
|
18589
|
+
const RestartCountColumnRenderer = (i18n2) => {
|
|
18588
18590
|
const dataIndex = ["restartCount"];
|
|
18589
18591
|
return {
|
|
18590
18592
|
key: "restartCount",
|
|
18591
18593
|
display: true,
|
|
18592
18594
|
dataIndex,
|
|
18593
|
-
title:
|
|
18595
|
+
title: i18n2.t("dovetail.restarts"),
|
|
18594
18596
|
sortable: true,
|
|
18595
18597
|
sorter: CommonSorter(dataIndex)
|
|
18596
18598
|
};
|
|
18597
18599
|
};
|
|
18598
|
-
const CompletionsCountColumnRenderer = () => {
|
|
18600
|
+
const CompletionsCountColumnRenderer = (i18n2) => {
|
|
18599
18601
|
const dataIndex = ["completionsDisplay"];
|
|
18600
18602
|
return {
|
|
18601
18603
|
key: "completions",
|
|
18602
18604
|
display: true,
|
|
18603
18605
|
dataIndex,
|
|
18604
|
-
title:
|
|
18606
|
+
title: i18n2.t("completions"),
|
|
18605
18607
|
sortable: true,
|
|
18606
18608
|
sorter: CommonSorter(dataIndex)
|
|
18607
18609
|
};
|
|
18608
18610
|
};
|
|
18609
|
-
const DurationColumnRenderer = () => {
|
|
18611
|
+
const DurationColumnRenderer = (i18n2) => {
|
|
18610
18612
|
const dataIndex = ["duration"];
|
|
18611
18613
|
return {
|
|
18612
18614
|
key: "duration",
|
|
18613
18615
|
display: true,
|
|
18614
18616
|
dataIndex,
|
|
18615
|
-
title:
|
|
18617
|
+
title: i18n2.t("dovetail.duration"),
|
|
18616
18618
|
sortable: true,
|
|
18617
18619
|
sorter: CommonSorter(dataIndex),
|
|
18618
18620
|
render: (v) => {
|
|
18619
18621
|
const i18nMap = {
|
|
18620
|
-
sec:
|
|
18621
|
-
day:
|
|
18622
|
-
min:
|
|
18623
|
-
hr:
|
|
18622
|
+
sec: i18n2.t("dovetail.sec"),
|
|
18623
|
+
day: i18n2.t("dovetail.day"),
|
|
18624
|
+
min: i18n2.t("dovetail.min"),
|
|
18625
|
+
hr: i18n2.t("dovetail.hr")
|
|
18624
18626
|
};
|
|
18625
18627
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: elapsedTime(v, i18nMap).label || "-" });
|
|
18626
18628
|
}
|
|
18627
18629
|
};
|
|
18628
18630
|
};
|
|
18629
|
-
const ServiceTypeColumnRenderer = () => {
|
|
18631
|
+
const ServiceTypeColumnRenderer = (i18n2) => {
|
|
18630
18632
|
const dataIndex = ["spec", "type"];
|
|
18631
18633
|
return {
|
|
18632
18634
|
key: "type",
|
|
18633
|
-
title:
|
|
18635
|
+
title: i18n2.t("dovetail.type"),
|
|
18634
18636
|
display: true,
|
|
18635
18637
|
dataIndex,
|
|
18636
18638
|
sortable: true,
|
|
18637
18639
|
sorter: CommonSorter(dataIndex)
|
|
18638
18640
|
};
|
|
18639
18641
|
};
|
|
18640
|
-
const PodWorkloadColumnRenderer = () => {
|
|
18642
|
+
const PodWorkloadColumnRenderer = (i18n2) => {
|
|
18641
18643
|
const dataIndex = ["metadata", "ownerReferences"];
|
|
18642
18644
|
return {
|
|
18643
18645
|
key: "type",
|
|
18644
|
-
title:
|
|
18646
|
+
title: i18n2.t("dovetail.workload"),
|
|
18645
18647
|
display: true,
|
|
18646
18648
|
dataIndex,
|
|
18647
18649
|
sortable: true,
|
|
@@ -18658,11 +18660,11 @@ var __publicField = (obj, key, value) => {
|
|
|
18658
18660
|
}
|
|
18659
18661
|
};
|
|
18660
18662
|
};
|
|
18661
|
-
const IngressRulesColumnRenderer = () => {
|
|
18663
|
+
const IngressRulesColumnRenderer = (i18n2) => {
|
|
18662
18664
|
const dataIndex = ["spec", "rules"];
|
|
18663
18665
|
return {
|
|
18664
18666
|
key: "type",
|
|
18665
|
-
title:
|
|
18667
|
+
title: i18n2.t("dovetail.rule"),
|
|
18666
18668
|
display: true,
|
|
18667
18669
|
dataIndex,
|
|
18668
18670
|
sortable: true,
|
|
@@ -18672,13 +18674,13 @@ var __publicField = (obj, key, value) => {
|
|
|
18672
18674
|
}
|
|
18673
18675
|
};
|
|
18674
18676
|
};
|
|
18675
|
-
const IngressDefaultBackendColumnRenderer = () => {
|
|
18677
|
+
const IngressDefaultBackendColumnRenderer = (i18n2) => {
|
|
18676
18678
|
const dataIndex = ["spec", "defaultBackend"];
|
|
18677
18679
|
return {
|
|
18678
18680
|
key: "defaultBackend",
|
|
18679
18681
|
display: true,
|
|
18680
18682
|
dataIndex,
|
|
18681
|
-
title:
|
|
18683
|
+
title: i18n2.t("dovetail.default_backend"),
|
|
18682
18684
|
sortable: true,
|
|
18683
18685
|
sorter: CommonSorter(["spec", "defaultBackend"]),
|
|
18684
18686
|
render: (defaultBackend, record) => {
|
|
@@ -19325,6 +19327,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19325
19327
|
}
|
|
19326
19328
|
const relationPlugin = new RelationPlugin();
|
|
19327
19329
|
const ProviderPlugins = [relationPlugin, modelPlugin];
|
|
19330
|
+
const DovetailRefineI18n = i18n;
|
|
19328
19331
|
const MonacoYamlDiffEditor = (props) => {
|
|
19329
19332
|
const ref = React.useRef(null);
|
|
19330
19333
|
const { origin, modified, id, height } = props;
|
|
@@ -19390,6 +19393,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19390
19393
|
exports2.DeleteManyButton = DeleteManyButton;
|
|
19391
19394
|
exports2.DeploymentModel = DeploymentModel;
|
|
19392
19395
|
exports2.Dovetail = Dovetail;
|
|
19396
|
+
exports2.DovetailRefineI18n = DovetailRefineI18n;
|
|
19393
19397
|
exports2.DrawerShow = DrawerShow;
|
|
19394
19398
|
exports2.DurationColumnRenderer = DurationColumnRenderer;
|
|
19395
19399
|
exports2.EditButton = EditButton;
|