@dovetail-v2/refine 0.0.14 → 0.0.15
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.2bd18ff6.js → MonacoYamlDiffEditor.15656940.js} +3 -3
- package/dist/{index.8d29d388.js → index.82c82bb4.js} +797 -957
- package/dist/refine.js +72 -75
- package/dist/refine.umd.cjs +717 -877
- package/dist/style.css +4 -1
- package/lib/src/components/CronJobDropdown/index.d.ts +1 -1
- package/lib/src/components/DrawerShow/DrawerShow.d.ts +4 -5
- package/lib/src/components/ErrorContent/index.d.ts +12 -0
- package/lib/src/components/EventsTable/EventsTable.d.ts +1 -3
- package/lib/src/components/K8sDropdown/index.d.ts +1 -1
- package/lib/src/components/ListPage/index.d.ts +1 -1
- package/lib/src/components/PageShow/PageShow.d.ts +4 -5
- package/lib/src/components/PodLog/index.d.ts +1 -1
- package/lib/src/components/ResourceCRUD/create/index.d.ts +5 -5
- package/lib/src/components/ResourceCRUD/list/index.d.ts +3 -4
- package/lib/src/components/ResourceCRUD/show/index.d.ts +4 -5
- package/lib/src/components/ShowContent/ShowContent.d.ts +4 -5
- package/lib/src/components/ShowContent/fields.d.ts +13 -14
- package/lib/src/components/Table/index.d.ts +1 -1
- package/lib/src/components/WorkloadDropdown/index.d.ts +1 -1
- package/lib/src/components/WorkloadReplicas/index.d.ts +1 -1
- package/lib/src/components/YamlForm/index.d.ts +6 -0
- package/lib/src/constants/k8s.d.ts +22 -0
- package/lib/src/hooks/useDownloadYAML.d.ts +2 -2
- package/lib/src/hooks/useEagleForm.d.ts +5 -0
- package/lib/src/hooks/useEagleTable/columns.d.ts +13 -14
- package/lib/src/hooks/useEagleTable/useEagleTable.d.ts +6 -7
- package/lib/src/hooks/useSchema.d.ts +9 -2
- package/lib/src/i18n.d.ts +6 -0
- package/lib/src/index.d.ts +0 -1
- package/lib/src/locales/en-US/index.d.ts +3 -0
- package/lib/src/locales/zh-CN/index.d.ts +3 -0
- package/lib/src/pages/configmaps/index.d.ts +3 -3
- package/lib/src/pages/jobs/index.d.ts +3 -4
- package/lib/src/pages/secrets/index.d.ts +3 -3
- package/lib/src/pages/services/index.d.ts +3 -3
- package/lib/src/providers/router-provider/index.d.ts +1 -1
- package/lib/src/types/index.d.ts +0 -1
- package/lib/src/types/resource.d.ts +3 -16
- package/lib/src/utils/error.d.ts +2 -2
- package/lib/src/utils/selector.d.ts +1 -1
- package/package.json +4 -1
package/dist/refine.umd.cjs
CHANGED
|
@@ -5,8 +5,8 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
(function(global2, factory) {
|
|
8
|
-
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("
|
|
9
|
-
})(this, function(exports2, core, qs, React, reactRouterDom, eagle, yaml,
|
|
8
|
+
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("i18next"), 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", "@refinedev/core", "qs", "react", "react-router-dom", "@cloudtower/eagle", "js-yaml", "lodash-es", "sunflower-antd", "i18next", "@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.core, global2.qs, global2.React, global2.reactRouterDom, global2.eagle, global2.yaml, global2.lodashEs, global2.sunflowerAntd, global2.i18n, global2.iconsReact, global2.monaco, global2.monacoYaml, global2.ReactDOM, global2.antd$1, global2.k8sApiProvider));
|
|
9
|
+
})(this, function(exports2, core, qs, React, reactRouterDom, eagle, yaml, lodashEs, sunflowerAntd, i18n, iconsReact, monaco, monacoYaml, ReactDOM, antd$1, k8sApiProvider) {
|
|
10
10
|
"use strict";
|
|
11
11
|
const _interopDefaultLegacy = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
12
12
|
function _interopNamespace(e) {
|
|
@@ -29,9 +29,9 @@ var __publicField = (obj, key, value) => {
|
|
|
29
29
|
}
|
|
30
30
|
const React__default = /* @__PURE__ */ _interopDefaultLegacy(React);
|
|
31
31
|
const yaml__default = /* @__PURE__ */ _interopDefaultLegacy(yaml);
|
|
32
|
+
const i18n__default = /* @__PURE__ */ _interopDefaultLegacy(i18n);
|
|
32
33
|
const monaco__namespace = /* @__PURE__ */ _interopNamespace(monaco);
|
|
33
34
|
const ReactDOM__default = /* @__PURE__ */ _interopDefaultLegacy(ReactDOM);
|
|
34
|
-
const i18n__default = /* @__PURE__ */ _interopDefaultLegacy(i18n);
|
|
35
35
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
36
36
|
function getDefaultExportFromCjs(x) {
|
|
37
37
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
@@ -1069,7 +1069,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1069
1069
|
});
|
|
1070
1070
|
}
|
|
1071
1071
|
function useK8sYamlEditor() {
|
|
1072
|
-
|
|
1072
|
+
const foldSymbol = React.useCallback(function(editor, symbol) {
|
|
1073
1073
|
const model = editor.getModel();
|
|
1074
1074
|
const matchs = (model == null ? void 0 : model.findMatches(
|
|
1075
1075
|
symbol,
|
|
@@ -1091,8 +1091,8 @@ var __publicField = (obj, key, value) => {
|
|
|
1091
1091
|
reject(e);
|
|
1092
1092
|
}
|
|
1093
1093
|
});
|
|
1094
|
-
}
|
|
1095
|
-
async function
|
|
1094
|
+
}, []);
|
|
1095
|
+
const fold = React.useCallback(async function(editor) {
|
|
1096
1096
|
await editor.getAction("editor.unfoldAll").run();
|
|
1097
1097
|
const symbols = [
|
|
1098
1098
|
" annotations:",
|
|
@@ -1104,7 +1104,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1104
1104
|
await foldSymbol(editor, symbol);
|
|
1105
1105
|
}
|
|
1106
1106
|
editor.setScrollPosition({ scrollTop: 0 });
|
|
1107
|
-
}
|
|
1107
|
+
}, [foldSymbol]);
|
|
1108
1108
|
return {
|
|
1109
1109
|
fold
|
|
1110
1110
|
};
|
|
@@ -6703,6 +6703,8 @@ var __publicField = (obj, key, value) => {
|
|
|
6703
6703
|
function useSchema(options) {
|
|
6704
6704
|
var _a;
|
|
6705
6705
|
const [schema, setSchema] = React.useState(null);
|
|
6706
|
+
const [loading, setLoading] = React.useState(false);
|
|
6707
|
+
const [error, setError] = React.useState(null);
|
|
6706
6708
|
const useResourceResult = core.useResource();
|
|
6707
6709
|
const resource = (options == null ? void 0 : options.resource) || useResourceResult.resource;
|
|
6708
6710
|
const openapi = React.useMemo(
|
|
@@ -6712,14 +6714,31 @@ var __publicField = (obj, key, value) => {
|
|
|
6712
6714
|
},
|
|
6713
6715
|
[(_a = resource == null ? void 0 : resource.meta) == null ? void 0 : _a.resourceBasePath]
|
|
6714
6716
|
);
|
|
6715
|
-
React.
|
|
6716
|
-
|
|
6717
|
-
|
|
6717
|
+
const fetchSchema = React.useCallback(async () => {
|
|
6718
|
+
var _a2;
|
|
6719
|
+
setLoading(true);
|
|
6720
|
+
setError(null);
|
|
6721
|
+
try {
|
|
6718
6722
|
const schema2 = await openapi.findSchema((_a2 = resource == null ? void 0 : resource.meta) == null ? void 0 : _a2.kind);
|
|
6719
6723
|
setSchema(schema2 || null);
|
|
6720
|
-
|
|
6724
|
+
setError(null);
|
|
6725
|
+
} catch (e) {
|
|
6726
|
+
setError(e);
|
|
6727
|
+
} finally {
|
|
6728
|
+
setLoading(false);
|
|
6729
|
+
}
|
|
6721
6730
|
}, [resource, openapi]);
|
|
6722
|
-
|
|
6731
|
+
React.useEffect(() => {
|
|
6732
|
+
if (options == null ? void 0 : options.skip)
|
|
6733
|
+
return;
|
|
6734
|
+
fetchSchema();
|
|
6735
|
+
}, [fetchSchema]);
|
|
6736
|
+
return {
|
|
6737
|
+
schema,
|
|
6738
|
+
loading,
|
|
6739
|
+
error,
|
|
6740
|
+
fetchSchema
|
|
6741
|
+
};
|
|
6723
6742
|
}
|
|
6724
6743
|
function generateYamlBySchema(defaultValue, schema) {
|
|
6725
6744
|
const typeObject = generateSchemaTypeValue(schema);
|
|
@@ -6802,7 +6821,14 @@ var __publicField = (obj, key, value) => {
|
|
|
6802
6821
|
const [errorResponseBody, setErrorResponseBody] = React.useState(null);
|
|
6803
6822
|
const useResourceResult = core.useResource();
|
|
6804
6823
|
const kit = eagle.useUIKit();
|
|
6805
|
-
const
|
|
6824
|
+
const {
|
|
6825
|
+
schema,
|
|
6826
|
+
loading: isLoadingSchema,
|
|
6827
|
+
error: loadSchemaError,
|
|
6828
|
+
fetchSchema
|
|
6829
|
+
} = useSchema({
|
|
6830
|
+
skip: editorOptions == null ? void 0 : editorOptions.isSkipSchema
|
|
6831
|
+
});
|
|
6806
6832
|
const [formAnt] = kit.form.useForm();
|
|
6807
6833
|
const formSF = sunflowerAntd.useForm({
|
|
6808
6834
|
form: formAnt
|
|
@@ -6898,9 +6924,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6898
6924
|
}
|
|
6899
6925
|
}
|
|
6900
6926
|
};
|
|
6901
|
-
const initialValues = ((_c = queryResult == null ? void 0 : queryResult.data) == null ? void 0 : _c.data) ?
|
|
6902
|
-
...k8sApiProvider.relationPlugin.restoreItem(queryResult.data.data)
|
|
6903
|
-
} : void 0;
|
|
6927
|
+
const initialValues = ((_c = queryResult == null ? void 0 : queryResult.data) == null ? void 0 : _c.data) ? queryResult.data.data.restore() : void 0;
|
|
6904
6928
|
if (initialValues) {
|
|
6905
6929
|
pruneBeforeEdit(initialValues);
|
|
6906
6930
|
}
|
|
@@ -6930,6 +6954,10 @@ var __publicField = (obj, key, value) => {
|
|
|
6930
6954
|
editorProps,
|
|
6931
6955
|
enableEditor,
|
|
6932
6956
|
errorResponseBody,
|
|
6957
|
+
schema,
|
|
6958
|
+
isLoadingSchema,
|
|
6959
|
+
loadSchemaError,
|
|
6960
|
+
fetchSchema,
|
|
6933
6961
|
switchEditor() {
|
|
6934
6962
|
var _a2, _b2;
|
|
6935
6963
|
if (enableEditor && ((_a2 = editor.current) == null ? void 0 : _a2.getEditorValue())) {
|
|
@@ -6952,13 +6980,13 @@ var __publicField = (obj, key, value) => {
|
|
|
6952
6980
|
const [id, setId] = React.useState("");
|
|
6953
6981
|
const { t } = useTranslation();
|
|
6954
6982
|
const modalProps = {
|
|
6955
|
-
title: t("delete"),
|
|
6956
|
-
okText: t("delete"),
|
|
6983
|
+
title: t("dovetail.delete"),
|
|
6984
|
+
okText: t("dovetail.delete"),
|
|
6957
6985
|
okButtonProps: {
|
|
6958
6986
|
danger: true
|
|
6959
6987
|
},
|
|
6960
|
-
cancelText: t("cancel"),
|
|
6961
|
-
children: t("confirm_delete_text", {
|
|
6988
|
+
cancelText: t("dovetail.cancel"),
|
|
6989
|
+
children: t("dovetail.confirm_delete_text", {
|
|
6962
6990
|
target: id,
|
|
6963
6991
|
interpolation: { escapeValue: false }
|
|
6964
6992
|
}),
|
|
@@ -7406,6 +7434,188 @@ var __publicField = (obj, key, value) => {
|
|
|
7406
7434
|
})]
|
|
7407
7435
|
});
|
|
7408
7436
|
};
|
|
7437
|
+
const copy$1 = "Copy";
|
|
7438
|
+
const reset_arguments$1 = "Reset";
|
|
7439
|
+
const view_changes$1 = "Show Diff";
|
|
7440
|
+
const back_to_edit$1 = "Edit";
|
|
7441
|
+
const configure_file$1 = "Configuration";
|
|
7442
|
+
const yaml_format_wrong$1 = "Configuration is in an invalid YAML format.";
|
|
7443
|
+
const yaml_value_wrong$1 = "Configuration has invalid values.";
|
|
7444
|
+
const edit_yaml$1 = "Edit YAML";
|
|
7445
|
+
const copied$1 = "Copied";
|
|
7446
|
+
const already_reset$1 = "Already reset";
|
|
7447
|
+
const fetch_schema_fail$1 = "Failed to fetch schema.";
|
|
7448
|
+
const obtain_data_error$1 = "Having trouble getting data.";
|
|
7449
|
+
const retry$1 = "Retry";
|
|
7450
|
+
const dovetail$1 = {
|
|
7451
|
+
copy: copy$1,
|
|
7452
|
+
reset_arguments: reset_arguments$1,
|
|
7453
|
+
view_changes: view_changes$1,
|
|
7454
|
+
back_to_edit: back_to_edit$1,
|
|
7455
|
+
configure_file: configure_file$1,
|
|
7456
|
+
yaml_format_wrong: yaml_format_wrong$1,
|
|
7457
|
+
yaml_value_wrong: yaml_value_wrong$1,
|
|
7458
|
+
edit_yaml: edit_yaml$1,
|
|
7459
|
+
copied: copied$1,
|
|
7460
|
+
already_reset: already_reset$1,
|
|
7461
|
+
fetch_schema_fail: fetch_schema_fail$1,
|
|
7462
|
+
obtain_data_error: obtain_data_error$1,
|
|
7463
|
+
retry: retry$1
|
|
7464
|
+
};
|
|
7465
|
+
const EN = {
|
|
7466
|
+
dovetail: dovetail$1
|
|
7467
|
+
};
|
|
7468
|
+
const copy = "\u590D\u5236";
|
|
7469
|
+
const reset_arguments = "\u91CD\u7F6E";
|
|
7470
|
+
const view_changes = "\u67E5\u770B\u6539\u52A8";
|
|
7471
|
+
const back_to_edit = "\u7F16\u8F91";
|
|
7472
|
+
const configure_file = "\u914D\u7F6E\u5185\u5BB9";
|
|
7473
|
+
const yaml_format_wrong = "\u914D\u7F6E\u5185\u5BB9\u4E0D\u662F\u6709\u6548\u7684 yaml \u683C\u5F0F\u3002";
|
|
7474
|
+
const yaml_value_wrong = "\u914D\u7F6E\u5185\u5BB9\u4E2D\u5B58\u5728\u4E0D\u5408\u6CD5\u7684\u503C\u3002";
|
|
7475
|
+
const edit_yaml = "\u7F16\u8F91 YAML";
|
|
7476
|
+
const copied = "\u5DF2\u590D\u5236";
|
|
7477
|
+
const already_reset = "\u5DF2\u91CD\u7F6E";
|
|
7478
|
+
const cancel = "\u53D6\u6D88";
|
|
7479
|
+
const create = "\u521B\u5EFA";
|
|
7480
|
+
const confirm_delete_text = "\u786E\u5B9A\u8981\u5220\u9664 {{target}} \u5417\uFF1F";
|
|
7481
|
+
const edit = "\u7F16\u8F91";
|
|
7482
|
+
const namespace = "\u540D\u5B57\u7A7A\u95F4";
|
|
7483
|
+
const name = "\u540D\u79F0";
|
|
7484
|
+
const state = "\u72B6\u6001";
|
|
7485
|
+
const status = "\u72B6\u6001";
|
|
7486
|
+
const phase = "\u72B6\u6001";
|
|
7487
|
+
const image = "\u5BB9\u5668\u955C\u50CF";
|
|
7488
|
+
const replicas = "\u526F\u672C\u6570";
|
|
7489
|
+
const created_time = "\u521B\u5EFA\u65F6\u95F4";
|
|
7490
|
+
const label = "\u6807\u7B7E";
|
|
7491
|
+
const annotation = "\u6CE8\u91CA";
|
|
7492
|
+
const type = "\u7C7B\u578B";
|
|
7493
|
+
const event = "\u4E8B\u4EF6";
|
|
7494
|
+
const reason = "\u539F\u56E0";
|
|
7495
|
+
const object = "\u5BF9\u8C61";
|
|
7496
|
+
const note = "\u4E8B\u4EF6\u4FE1\u606F";
|
|
7497
|
+
const condition = "Condition";
|
|
7498
|
+
const download_yaml = "\u4E0B\u8F7D YAML";
|
|
7499
|
+
const detail = "\u8BE6\u60C5";
|
|
7500
|
+
const node_name = "\u4E3B\u673A\u540D\u79F0";
|
|
7501
|
+
const restarts = "\u91CD\u542F\u6B21\u6570";
|
|
7502
|
+
const updated_time = "\u66F4\u65B0\u65F6\u95F4";
|
|
7503
|
+
const message = "\u6D88\u606F";
|
|
7504
|
+
const save = "\u4FDD\u5B58";
|
|
7505
|
+
const more = "\u66F4\u591A";
|
|
7506
|
+
const workload = "\u5DE5\u4F5C\u8D1F\u8F7D";
|
|
7507
|
+
const all_namespaces = "\u6240\u6709\u540D\u5B57\u7A7A\u95F4";
|
|
7508
|
+
const empty = "\u65E0\u53EF\u663E\u793A\u7684\u6570\u636E";
|
|
7509
|
+
const schedule = "\u8C03\u5EA6\u65F6\u95F4\u8868";
|
|
7510
|
+
const lastScheduleTime = "\u4E0A\u6B21\u8C03\u5EA6\u65F6\u95F4";
|
|
7511
|
+
const duration = "\u6301\u7EED\u65F6\u95F4";
|
|
7512
|
+
const completions = "\u5B8C\u6210 Job \u5386\u53F2\u6570";
|
|
7513
|
+
const started = "\u5F00\u59CB\u65F6\u95F4";
|
|
7514
|
+
const ready = "\u5C31\u7EEA";
|
|
7515
|
+
const init_container = "\u521D\u59CB\u5316\u5BB9\u5668";
|
|
7516
|
+
const container = "\u5BB9\u5668";
|
|
7517
|
+
const redeploy = "\u91CD\u65B0\u90E8\u7F72";
|
|
7518
|
+
const data = "\u6570\u636E";
|
|
7519
|
+
const suspend = "\u6682\u505C";
|
|
7520
|
+
const resume = "\u91CD\u65B0\u5F00\u59CB";
|
|
7521
|
+
const cluster = "\u96C6\u7FA4";
|
|
7522
|
+
const storage = "\u5B58\u50A8";
|
|
7523
|
+
const network = "\u7F51\u7EDC";
|
|
7524
|
+
const clusterIp = "\u96C6\u7FA4 IP";
|
|
7525
|
+
const sessionAffinity = "\u4F1A\u8BDD\u4FDD\u6301";
|
|
7526
|
+
const log = "\u65E5\u5FD7";
|
|
7527
|
+
const select_container = "\u9009\u62E9\u5BB9\u5668";
|
|
7528
|
+
const wrap = "\u6298\u53E0";
|
|
7529
|
+
const resume_log = "\u7EE7\u7EED";
|
|
7530
|
+
const log_new_lines = "\uFF0C\u5E76\u5C55\u793A {{ count }} \u884C\u65B0\u65E5\u5FD7";
|
|
7531
|
+
const fetch_schema_fail = "\u83B7\u53D6 schema \u5931\u8D25\u3002";
|
|
7532
|
+
const obtain_data_error = "\u83B7\u53D6\u6570\u636E\u65F6\u9047\u5230\u95EE\u9898\u3002";
|
|
7533
|
+
const retry = "\u91CD\u8BD5";
|
|
7534
|
+
const dovetail = {
|
|
7535
|
+
copy,
|
|
7536
|
+
reset_arguments,
|
|
7537
|
+
view_changes,
|
|
7538
|
+
back_to_edit,
|
|
7539
|
+
configure_file,
|
|
7540
|
+
yaml_format_wrong,
|
|
7541
|
+
yaml_value_wrong,
|
|
7542
|
+
edit_yaml,
|
|
7543
|
+
copied,
|
|
7544
|
+
already_reset,
|
|
7545
|
+
cancel,
|
|
7546
|
+
"delete": "\u5220\u9664",
|
|
7547
|
+
create,
|
|
7548
|
+
confirm_delete_text,
|
|
7549
|
+
edit,
|
|
7550
|
+
namespace,
|
|
7551
|
+
name,
|
|
7552
|
+
state,
|
|
7553
|
+
status,
|
|
7554
|
+
phase,
|
|
7555
|
+
image,
|
|
7556
|
+
replicas,
|
|
7557
|
+
created_time,
|
|
7558
|
+
label,
|
|
7559
|
+
annotation,
|
|
7560
|
+
type,
|
|
7561
|
+
event,
|
|
7562
|
+
reason,
|
|
7563
|
+
object,
|
|
7564
|
+
note,
|
|
7565
|
+
condition,
|
|
7566
|
+
download_yaml,
|
|
7567
|
+
detail,
|
|
7568
|
+
node_name,
|
|
7569
|
+
restarts,
|
|
7570
|
+
updated_time,
|
|
7571
|
+
message,
|
|
7572
|
+
save,
|
|
7573
|
+
more,
|
|
7574
|
+
workload,
|
|
7575
|
+
all_namespaces,
|
|
7576
|
+
empty,
|
|
7577
|
+
schedule,
|
|
7578
|
+
lastScheduleTime,
|
|
7579
|
+
duration,
|
|
7580
|
+
completions,
|
|
7581
|
+
started,
|
|
7582
|
+
ready,
|
|
7583
|
+
init_container,
|
|
7584
|
+
container,
|
|
7585
|
+
redeploy,
|
|
7586
|
+
data,
|
|
7587
|
+
suspend,
|
|
7588
|
+
resume,
|
|
7589
|
+
cluster,
|
|
7590
|
+
storage,
|
|
7591
|
+
network,
|
|
7592
|
+
clusterIp,
|
|
7593
|
+
sessionAffinity,
|
|
7594
|
+
log,
|
|
7595
|
+
select_container,
|
|
7596
|
+
wrap,
|
|
7597
|
+
resume_log,
|
|
7598
|
+
log_new_lines,
|
|
7599
|
+
fetch_schema_fail,
|
|
7600
|
+
obtain_data_error,
|
|
7601
|
+
retry
|
|
7602
|
+
};
|
|
7603
|
+
const ZH = {
|
|
7604
|
+
dovetail
|
|
7605
|
+
};
|
|
7606
|
+
const resources = {
|
|
7607
|
+
"en-US": EN,
|
|
7608
|
+
"zh-CN": ZH
|
|
7609
|
+
};
|
|
7610
|
+
i18n__default.default.use(initReactI18next).init({
|
|
7611
|
+
supportedLngs: ["en-US", "zh-CN"],
|
|
7612
|
+
resources,
|
|
7613
|
+
ns: Object.keys(resources["zh-CN"]),
|
|
7614
|
+
defaultNS: "dovetail",
|
|
7615
|
+
fallbackLng: ["en-US", "zh-CN"],
|
|
7616
|
+
lng: "zh-CN",
|
|
7617
|
+
nsSeparator: "."
|
|
7618
|
+
});
|
|
7409
7619
|
const NameLink = (props) => {
|
|
7410
7620
|
var _a;
|
|
7411
7621
|
const { name: name2, id, resource } = props;
|
|
@@ -7442,13 +7652,13 @@ var __publicField = (obj, key, value) => {
|
|
|
7442
7652
|
return 1;
|
|
7443
7653
|
return -1;
|
|
7444
7654
|
};
|
|
7445
|
-
const NameColumnRenderer = (
|
|
7655
|
+
const NameColumnRenderer = (resource = "") => {
|
|
7446
7656
|
const dataIndex = ["metadata", "name"];
|
|
7447
7657
|
return {
|
|
7448
7658
|
key: "name",
|
|
7449
7659
|
display: true,
|
|
7450
7660
|
dataIndex,
|
|
7451
|
-
title:
|
|
7661
|
+
title: i18n__default.default.t("dovetail.name"),
|
|
7452
7662
|
sortable: true,
|
|
7453
7663
|
sorter: CommonSorter(dataIndex),
|
|
7454
7664
|
render: (v, record) => {
|
|
@@ -7456,50 +7666,60 @@ var __publicField = (obj, key, value) => {
|
|
|
7456
7666
|
}
|
|
7457
7667
|
};
|
|
7458
7668
|
};
|
|
7459
|
-
const NameSpaceColumnRenderer = (
|
|
7669
|
+
const NameSpaceColumnRenderer = () => {
|
|
7460
7670
|
const dataIndex = ["metadata", "namespace"];
|
|
7461
7671
|
return {
|
|
7462
7672
|
key: "namespace",
|
|
7463
7673
|
display: true,
|
|
7464
7674
|
dataIndex,
|
|
7465
|
-
title:
|
|
7675
|
+
title: i18n__default.default.t("dovetail.namespace"),
|
|
7466
7676
|
sortable: true,
|
|
7467
7677
|
sorter: CommonSorter(dataIndex)
|
|
7468
7678
|
};
|
|
7469
7679
|
};
|
|
7470
|
-
const PhaseColumnRenderer = (
|
|
7680
|
+
const PhaseColumnRenderer = () => {
|
|
7471
7681
|
const dataIndex = ["status", "phase"];
|
|
7472
7682
|
return {
|
|
7473
7683
|
key: "phase",
|
|
7474
7684
|
display: true,
|
|
7475
7685
|
dataIndex,
|
|
7476
|
-
title:
|
|
7686
|
+
title: i18n__default.default.t("dovetail.phase"),
|
|
7477
7687
|
sortable: true,
|
|
7478
7688
|
sorter: CommonSorter(dataIndex),
|
|
7479
7689
|
render: (v) => /* @__PURE__ */ jsxRuntime.exports.jsx(StateTag, { state: v })
|
|
7480
7690
|
};
|
|
7481
7691
|
};
|
|
7482
|
-
const WorkloadImageColumnRenderer = (
|
|
7692
|
+
const WorkloadImageColumnRenderer = () => {
|
|
7483
7693
|
const dataIndex = ["imageNames"];
|
|
7484
7694
|
return {
|
|
7485
7695
|
key: "image",
|
|
7486
7696
|
display: true,
|
|
7487
7697
|
dataIndex,
|
|
7488
|
-
title:
|
|
7698
|
+
title: i18n__default.default.t("dovetail.image"),
|
|
7489
7699
|
sortable: true,
|
|
7490
7700
|
sorter: CommonSorter(dataIndex),
|
|
7491
|
-
render(value) {
|
|
7492
|
-
return /* @__PURE__ */ jsxRuntime.exports.jsx(ImageNames, { value });
|
|
7701
|
+
render(value, record) {
|
|
7702
|
+
return /* @__PURE__ */ jsxRuntime.exports.jsx(ImageNames, { value: record.imageNames });
|
|
7493
7703
|
}
|
|
7494
7704
|
};
|
|
7495
7705
|
};
|
|
7496
|
-
const
|
|
7706
|
+
const WorkloadRestartsColumnRenderer = () => {
|
|
7707
|
+
const dataIndex = ["restarts"];
|
|
7708
|
+
return {
|
|
7709
|
+
key: "restarts",
|
|
7710
|
+
display: true,
|
|
7711
|
+
dataIndex,
|
|
7712
|
+
title: i18n__default.default.t("dovetail.restarts"),
|
|
7713
|
+
sortable: false
|
|
7714
|
+
};
|
|
7715
|
+
};
|
|
7716
|
+
const ReplicasColumnRenderer = () => {
|
|
7497
7717
|
const dataIndex = ["status", "replicas"];
|
|
7498
7718
|
return {
|
|
7499
7719
|
key: "replicas",
|
|
7500
7720
|
display: true,
|
|
7501
7721
|
dataIndex,
|
|
7502
|
-
title:
|
|
7722
|
+
title: i18n__default.default.t("dovetail.replicas"),
|
|
7503
7723
|
sortable: true,
|
|
7504
7724
|
sorter: CommonSorter(dataIndex),
|
|
7505
7725
|
render: (_, record) => {
|
|
@@ -7507,13 +7727,13 @@ var __publicField = (obj, key, value) => {
|
|
|
7507
7727
|
}
|
|
7508
7728
|
};
|
|
7509
7729
|
};
|
|
7510
|
-
const AgeColumnRenderer = (
|
|
7730
|
+
const AgeColumnRenderer = () => {
|
|
7511
7731
|
const dataIndex = ["metadata", "creationTimestamp"];
|
|
7512
7732
|
return {
|
|
7513
7733
|
key: "creationTimestamp",
|
|
7514
7734
|
display: true,
|
|
7515
7735
|
dataIndex,
|
|
7516
|
-
title:
|
|
7736
|
+
title: i18n__default.default.t("dovetail.created_time"),
|
|
7517
7737
|
sortable: true,
|
|
7518
7738
|
sorter: (a, b) => {
|
|
7519
7739
|
const valA = new Date(lodash.exports.get(a, dataIndex));
|
|
@@ -7529,55 +7749,56 @@ var __publicField = (obj, key, value) => {
|
|
|
7529
7749
|
}
|
|
7530
7750
|
};
|
|
7531
7751
|
};
|
|
7532
|
-
const NodeNameColumnRenderer = (
|
|
7752
|
+
const NodeNameColumnRenderer = (options) => {
|
|
7533
7753
|
const dataIndex = ["spec", "nodeName"];
|
|
7534
7754
|
return {
|
|
7535
7755
|
key: "node",
|
|
7536
7756
|
display: true,
|
|
7537
7757
|
dataIndex,
|
|
7538
|
-
title:
|
|
7758
|
+
title: i18n__default.default.t("dovetail.node_name"),
|
|
7539
7759
|
sortable: true,
|
|
7540
|
-
sorter: CommonSorter(dataIndex)
|
|
7760
|
+
sorter: CommonSorter(dataIndex),
|
|
7761
|
+
...options
|
|
7541
7762
|
};
|
|
7542
7763
|
};
|
|
7543
|
-
const RestartCountColumnRenderer = (
|
|
7764
|
+
const RestartCountColumnRenderer = () => {
|
|
7544
7765
|
const dataIndex = ["restartCount"];
|
|
7545
7766
|
return {
|
|
7546
7767
|
key: "restartCount",
|
|
7547
7768
|
display: true,
|
|
7548
7769
|
dataIndex,
|
|
7549
|
-
title:
|
|
7770
|
+
title: i18n__default.default.t("dovetail.restarts"),
|
|
7550
7771
|
sortable: true,
|
|
7551
7772
|
sorter: CommonSorter(dataIndex)
|
|
7552
7773
|
};
|
|
7553
7774
|
};
|
|
7554
|
-
const CompletionsCountColumnRenderer = (
|
|
7775
|
+
const CompletionsCountColumnRenderer = () => {
|
|
7555
7776
|
const dataIndex = ["completionsDisplay"];
|
|
7556
7777
|
return {
|
|
7557
7778
|
key: "completions",
|
|
7558
7779
|
display: true,
|
|
7559
7780
|
dataIndex,
|
|
7560
|
-
title:
|
|
7781
|
+
title: i18n__default.default.t("completions"),
|
|
7561
7782
|
sortable: true,
|
|
7562
7783
|
sorter: CommonSorter(dataIndex)
|
|
7563
7784
|
};
|
|
7564
7785
|
};
|
|
7565
|
-
const DurationColumnRenderer = (
|
|
7786
|
+
const DurationColumnRenderer = () => {
|
|
7566
7787
|
const dataIndex = ["durationDisplay"];
|
|
7567
7788
|
return {
|
|
7568
7789
|
key: "duration",
|
|
7569
7790
|
display: true,
|
|
7570
7791
|
dataIndex,
|
|
7571
|
-
title:
|
|
7792
|
+
title: i18n__default.default.t("dovetail.duration"),
|
|
7572
7793
|
sortable: true,
|
|
7573
7794
|
sorter: CommonSorter(dataIndex)
|
|
7574
7795
|
};
|
|
7575
7796
|
};
|
|
7576
|
-
const ServiceTypeColumnRenderer = (
|
|
7797
|
+
const ServiceTypeColumnRenderer = () => {
|
|
7577
7798
|
const dataIndex = ["rawYaml", "spec", "type"];
|
|
7578
7799
|
return {
|
|
7579
7800
|
key: "type",
|
|
7580
|
-
title:
|
|
7801
|
+
title: i18n__default.default.t("dovetail.type"),
|
|
7581
7802
|
display: true,
|
|
7582
7803
|
dataIndex,
|
|
7583
7804
|
sortable: true,
|
|
@@ -7599,6 +7820,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7599
7820
|
function useDownloadYAML() {
|
|
7600
7821
|
return function(options) {
|
|
7601
7822
|
const { name: name2, item } = options;
|
|
7823
|
+
console.log("download", item);
|
|
7602
7824
|
const content = yaml__default.default.dump(item);
|
|
7603
7825
|
download(`${name2}.yaml`, content);
|
|
7604
7826
|
};
|
|
@@ -7647,7 +7869,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7647
7869
|
edit2(data2.id);
|
|
7648
7870
|
}
|
|
7649
7871
|
},
|
|
7650
|
-
children: /* @__PURE__ */ jsxRuntime.exports.jsx(eagle.Icon, { src: iconsReact.EditPen16PrimaryIcon, children: t("edit") })
|
|
7872
|
+
children: /* @__PURE__ */ jsxRuntime.exports.jsx(eagle.Icon, { src: iconsReact.EditPen16PrimaryIcon, children: t("dovetail.edit") })
|
|
7651
7873
|
}
|
|
7652
7874
|
),
|
|
7653
7875
|
/* @__PURE__ */ jsxRuntime.exports.jsx(
|
|
@@ -7657,7 +7879,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7657
7879
|
onClick: () => {
|
|
7658
7880
|
openDeleteConfirmModal(data2.id);
|
|
7659
7881
|
},
|
|
7660
|
-
children: /* @__PURE__ */ jsxRuntime.exports.jsx(eagle.Icon, { src: iconsReact.TrashBinDelete16Icon, children: t("delete") })
|
|
7882
|
+
children: /* @__PURE__ */ jsxRuntime.exports.jsx(eagle.Icon, { src: iconsReact.TrashBinDelete16Icon, children: t("dovetail.delete") })
|
|
7661
7883
|
}
|
|
7662
7884
|
),
|
|
7663
7885
|
/* @__PURE__ */ jsxRuntime.exports.jsx(
|
|
@@ -7668,11 +7890,11 @@ var __publicField = (obj, key, value) => {
|
|
|
7668
7890
|
if (data2.id) {
|
|
7669
7891
|
download2({
|
|
7670
7892
|
name: ((_a = data2.metadata) == null ? void 0 : _a.name) || data2.kind || "",
|
|
7671
|
-
item: data2
|
|
7893
|
+
item: data2.restore()
|
|
7672
7894
|
});
|
|
7673
7895
|
}
|
|
7674
7896
|
},
|
|
7675
|
-
children: /* @__PURE__ */ jsxRuntime.exports.jsx(eagle.Icon, { src: iconsReact.Download16GradientBlueIcon, children: t("download_yaml") })
|
|
7897
|
+
children: /* @__PURE__ */ jsxRuntime.exports.jsx(eagle.Icon, { src: iconsReact.Download16GradientBlueIcon, children: t("dovetail.download_yaml") })
|
|
7676
7898
|
}
|
|
7677
7899
|
),
|
|
7678
7900
|
props.children
|
|
@@ -7868,6 +8090,9 @@ var __publicField = (obj, key, value) => {
|
|
|
7868
8090
|
const { value: nsFilter } = useNamespacesFilter();
|
|
7869
8091
|
const useTableParams = React.useMemo(() => {
|
|
7870
8092
|
const mergedParams = lodashEs.merge(params.useTableParams, {
|
|
8093
|
+
pagination: {
|
|
8094
|
+
mode: "off"
|
|
8095
|
+
},
|
|
7871
8096
|
filters: {
|
|
7872
8097
|
permanent: [
|
|
7873
8098
|
{
|
|
@@ -7896,7 +8121,8 @@ var __publicField = (obj, key, value) => {
|
|
|
7896
8121
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(Dropdown, { data: record });
|
|
7897
8122
|
}
|
|
7898
8123
|
};
|
|
7899
|
-
const
|
|
8124
|
+
const data2 = (_a = table.tableQueryResult.data) == null ? void 0 : _a.data;
|
|
8125
|
+
const finalDataSource = formatter ? data2 == null ? void 0 : data2.map(formatter) : data2;
|
|
7900
8126
|
const finalProps = {
|
|
7901
8127
|
loading: table.tableQueryResult.isLoading,
|
|
7902
8128
|
dataSource: finalDataSource || [],
|
|
@@ -8016,7 +8242,6 @@ var __publicField = (obj, key, value) => {
|
|
|
8016
8242
|
const onValueChange = React.useCallback(
|
|
8017
8243
|
(event2) => {
|
|
8018
8244
|
var _a;
|
|
8019
|
-
console.log(event2);
|
|
8020
8245
|
const value = event2.target.value;
|
|
8021
8246
|
(_a = props.onChange) == null ? void 0 : _a.call(props, {
|
|
8022
8247
|
...item,
|
|
@@ -8069,7 +8294,6 @@ var __publicField = (obj, key, value) => {
|
|
|
8069
8294
|
{
|
|
8070
8295
|
item,
|
|
8071
8296
|
onChange: (newItem) => {
|
|
8072
|
-
console.log(newItem);
|
|
8073
8297
|
const temp = [...items];
|
|
8074
8298
|
temp.splice(index, 1, newItem);
|
|
8075
8299
|
onChange(temp);
|
|
@@ -8117,9 +8341,9 @@ var __publicField = (obj, key, value) => {
|
|
|
8117
8341
|
});
|
|
8118
8342
|
}
|
|
8119
8343
|
const ErrorContent_1t51xnx = "";
|
|
8120
|
-
const ErrorWrapper = "eckm4od";
|
|
8121
|
-
const ErrorContent = "e1hl982n";
|
|
8122
|
-
const WidgetErrorContent = (props) => {
|
|
8344
|
+
const ErrorWrapper$1 = "eckm4od";
|
|
8345
|
+
const ErrorContent$1 = "e1hl982n";
|
|
8346
|
+
const WidgetErrorContent$1 = (props) => {
|
|
8123
8347
|
const {
|
|
8124
8348
|
refetch
|
|
8125
8349
|
} = props;
|
|
@@ -8128,10 +8352,10 @@ var __publicField = (obj, key, value) => {
|
|
|
8128
8352
|
t
|
|
8129
8353
|
} = useTranslation();
|
|
8130
8354
|
return /* @__PURE__ */ jsxRuntime.exports.jsx("div", {
|
|
8131
|
-
className: ErrorWrapper,
|
|
8355
|
+
className: ErrorWrapper$1,
|
|
8132
8356
|
style: props.style,
|
|
8133
8357
|
children: /* @__PURE__ */ jsxRuntime.exports.jsxs("div", {
|
|
8134
|
-
className: ErrorContent,
|
|
8358
|
+
className: ErrorContent$1,
|
|
8135
8359
|
children: [/* @__PURE__ */ jsxRuntime.exports.jsx("p", {
|
|
8136
8360
|
className: cx_default(eagle.Typo.Label.l1_regular_title, "title"),
|
|
8137
8361
|
children: props.errorText || t("dovetail.obtain_data_error")
|
|
@@ -8155,28 +8379,28 @@ var __publicField = (obj, key, value) => {
|
|
|
8155
8379
|
key: "type",
|
|
8156
8380
|
display: true,
|
|
8157
8381
|
dataIndex: "type",
|
|
8158
|
-
title: t("condition"),
|
|
8382
|
+
title: t("dovetail.condition"),
|
|
8159
8383
|
sortable: true
|
|
8160
8384
|
},
|
|
8161
8385
|
{
|
|
8162
8386
|
key: "status",
|
|
8163
8387
|
display: true,
|
|
8164
8388
|
dataIndex: "status",
|
|
8165
|
-
title: t("status"),
|
|
8389
|
+
title: t("dovetail.status"),
|
|
8166
8390
|
sortable: true
|
|
8167
8391
|
},
|
|
8168
8392
|
{
|
|
8169
8393
|
key: "reason",
|
|
8170
8394
|
display: true,
|
|
8171
8395
|
dataIndex: "reason",
|
|
8172
|
-
title: t("reason"),
|
|
8396
|
+
title: t("dovetail.reason"),
|
|
8173
8397
|
sortable: true
|
|
8174
8398
|
},
|
|
8175
8399
|
{
|
|
8176
8400
|
key: "lastUpdateTime",
|
|
8177
8401
|
display: true,
|
|
8178
8402
|
dataIndex: "lastUpdateTime",
|
|
8179
|
-
title: t("updated_time"),
|
|
8403
|
+
title: t("dovetail.updated_time"),
|
|
8180
8404
|
sortable: true,
|
|
8181
8405
|
render: (value, record) => {
|
|
8182
8406
|
const time = value || record.lastTransitionTime;
|
|
@@ -8187,12 +8411,12 @@ var __publicField = (obj, key, value) => {
|
|
|
8187
8411
|
key: "message",
|
|
8188
8412
|
display: true,
|
|
8189
8413
|
dataIndex: "message",
|
|
8190
|
-
title: t("message"),
|
|
8414
|
+
title: t("dovetail.message"),
|
|
8191
8415
|
sortable: true
|
|
8192
8416
|
}
|
|
8193
8417
|
];
|
|
8194
8418
|
if (conditionsWithId.length === 0) {
|
|
8195
|
-
return /* @__PURE__ */ jsxRuntime.exports.jsx(WidgetErrorContent, { errorText: t("dovetail.empty"), style: { padding: "15px 0" } });
|
|
8419
|
+
return /* @__PURE__ */ jsxRuntime.exports.jsx(WidgetErrorContent$1, { errorText: t("dovetail.empty"), style: { padding: "15px 0" } });
|
|
8196
8420
|
}
|
|
8197
8421
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(
|
|
8198
8422
|
kit.table,
|
|
@@ -8205,496 +8429,28 @@ var __publicField = (obj, key, value) => {
|
|
|
8205
8429
|
}
|
|
8206
8430
|
);
|
|
8207
8431
|
};
|
|
8208
|
-
function
|
|
8209
|
-
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
return
|
|
8214
|
-
}
|
|
8215
|
-
if (seconds < 120) {
|
|
8216
|
-
return {
|
|
8217
|
-
diff: 1,
|
|
8218
|
-
label: `${seconds}s`
|
|
8219
|
-
};
|
|
8220
|
-
}
|
|
8221
|
-
const minutes = Math.floor(seconds / 60);
|
|
8222
|
-
if (minutes < 10) {
|
|
8223
|
-
return {
|
|
8224
|
-
diff: 1,
|
|
8225
|
-
label: `${minutes}m${seconds - minutes * 60}s`
|
|
8226
|
-
};
|
|
8227
|
-
}
|
|
8228
|
-
const hours = Math.floor(seconds / 3600);
|
|
8229
|
-
if (hours < 3) {
|
|
8230
|
-
return {
|
|
8231
|
-
diff: 60,
|
|
8232
|
-
label: `${minutes}m`
|
|
8233
|
-
};
|
|
8234
|
-
}
|
|
8235
|
-
const days = Math.floor(seconds / (3600 * 24));
|
|
8236
|
-
if (days > 1) {
|
|
8237
|
-
return {
|
|
8238
|
-
diff: 60,
|
|
8239
|
-
label: `${days}d${hours - days * 24}h`
|
|
8240
|
-
};
|
|
8241
|
-
}
|
|
8242
|
-
if (hours > 7) {
|
|
8243
|
-
return {
|
|
8244
|
-
diff: 60,
|
|
8245
|
-
label: `${hours}h`
|
|
8246
|
-
};
|
|
8247
|
-
}
|
|
8248
|
-
return {
|
|
8249
|
-
diff: 60,
|
|
8250
|
-
label: `${hours}h${minutes - hours * 60}m`
|
|
8432
|
+
function memoize(fn) {
|
|
8433
|
+
var cache = /* @__PURE__ */ Object.create(null);
|
|
8434
|
+
return function(arg) {
|
|
8435
|
+
if (cache[arg] === void 0)
|
|
8436
|
+
cache[arg] = fn(arg);
|
|
8437
|
+
return cache[arg];
|
|
8251
8438
|
};
|
|
8252
8439
|
}
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
annotations: {},
|
|
8258
|
-
labels: {}
|
|
8440
|
+
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
|
|
8441
|
+
var isPropValid = /* @__PURE__ */ memoize(
|
|
8442
|
+
function(prop) {
|
|
8443
|
+
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
|
|
8259
8444
|
}
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
8266
|
-
|
|
8267
|
-
|
|
8268
|
-
|
|
8269
|
-
imagePullSecrets: [],
|
|
8270
|
-
initContainers: [],
|
|
8271
|
-
volumes: []
|
|
8272
|
-
};
|
|
8273
|
-
const DEPLOYMENT_INIT_VALUE = {
|
|
8274
|
-
apiVersion: "apps/v1",
|
|
8275
|
-
kind: "Deployment",
|
|
8276
|
-
...BASE_INIT_VALUE,
|
|
8277
|
-
spec: {
|
|
8278
|
-
replicas: 1,
|
|
8279
|
-
selector: {
|
|
8280
|
-
matchLabels: {
|
|
8281
|
-
[DEFAULT_MATCH_LABEL]: ""
|
|
8282
|
-
}
|
|
8283
|
-
},
|
|
8284
|
-
template: {
|
|
8285
|
-
metadata: {
|
|
8286
|
-
labels: {
|
|
8287
|
-
[DEFAULT_MATCH_LABEL]: ""
|
|
8288
|
-
}
|
|
8289
|
-
},
|
|
8290
|
-
spec: {
|
|
8291
|
-
containers: [BASE_CONTAINER_INIT_VALUE],
|
|
8292
|
-
restartPolicy: "Always",
|
|
8293
|
-
...BASE_WORKLOAD_SPEC_INIT_VALUE
|
|
8294
|
-
}
|
|
8295
|
-
}
|
|
8296
|
-
}
|
|
8297
|
-
};
|
|
8298
|
-
const CRONJOB_INIT_VALUE = {
|
|
8299
|
-
apiVersion: "batch/v1beta1",
|
|
8300
|
-
kind: "CronJob",
|
|
8301
|
-
...BASE_INIT_VALUE,
|
|
8302
|
-
spec: {
|
|
8303
|
-
schedule: "",
|
|
8304
|
-
jobTemplate: {
|
|
8305
|
-
metadata: {
|
|
8306
|
-
labels: {}
|
|
8307
|
-
},
|
|
8308
|
-
spec: {
|
|
8309
|
-
template: {
|
|
8310
|
-
spec: {
|
|
8311
|
-
containers: [BASE_CONTAINER_INIT_VALUE],
|
|
8312
|
-
restartPolicy: "Never",
|
|
8313
|
-
...BASE_WORKLOAD_SPEC_INIT_VALUE
|
|
8314
|
-
}
|
|
8315
|
-
}
|
|
8316
|
-
}
|
|
8317
|
-
}
|
|
8318
|
-
}
|
|
8319
|
-
};
|
|
8320
|
-
const DAEMONSET_INIT_VALUE = {
|
|
8321
|
-
apiVersion: "apps/v1",
|
|
8322
|
-
kind: "DaemonSet",
|
|
8323
|
-
...BASE_INIT_VALUE,
|
|
8324
|
-
spec: {
|
|
8325
|
-
replicas: 1,
|
|
8326
|
-
selector: {
|
|
8327
|
-
matchLabels: {
|
|
8328
|
-
[DEFAULT_MATCH_LABEL]: ""
|
|
8329
|
-
}
|
|
8330
|
-
},
|
|
8331
|
-
template: {
|
|
8332
|
-
metadata: {
|
|
8333
|
-
labels: {
|
|
8334
|
-
[DEFAULT_MATCH_LABEL]: ""
|
|
8335
|
-
}
|
|
8336
|
-
},
|
|
8337
|
-
spec: {
|
|
8338
|
-
containers: [BASE_CONTAINER_INIT_VALUE],
|
|
8339
|
-
restartPolicy: "Always",
|
|
8340
|
-
...BASE_WORKLOAD_SPEC_INIT_VALUE
|
|
8341
|
-
}
|
|
8342
|
-
}
|
|
8343
|
-
}
|
|
8344
|
-
};
|
|
8345
|
-
const JOB_INIT_VALUE = {
|
|
8346
|
-
apiVersion: "batch/v1",
|
|
8347
|
-
kind: "Job",
|
|
8348
|
-
...BASE_INIT_VALUE,
|
|
8349
|
-
spec: {
|
|
8350
|
-
replicas: 1,
|
|
8351
|
-
selector: {
|
|
8352
|
-
matchLabels: {}
|
|
8353
|
-
},
|
|
8354
|
-
template: {
|
|
8355
|
-
metadata: {
|
|
8356
|
-
labels: {}
|
|
8357
|
-
},
|
|
8358
|
-
spec: {
|
|
8359
|
-
containers: [BASE_CONTAINER_INIT_VALUE],
|
|
8360
|
-
restartPolicy: "Never",
|
|
8361
|
-
...BASE_WORKLOAD_SPEC_INIT_VALUE
|
|
8362
|
-
}
|
|
8363
|
-
}
|
|
8364
|
-
}
|
|
8365
|
-
};
|
|
8366
|
-
const STATEFULSET_INIT_VALUE = {
|
|
8367
|
-
apiVersion: "apps/v1",
|
|
8368
|
-
kind: "StatefulSet",
|
|
8369
|
-
...BASE_INIT_VALUE,
|
|
8370
|
-
spec: {
|
|
8371
|
-
replicas: 1,
|
|
8372
|
-
selector: {
|
|
8373
|
-
matchLabels: {
|
|
8374
|
-
[DEFAULT_MATCH_LABEL]: ""
|
|
8375
|
-
}
|
|
8376
|
-
},
|
|
8377
|
-
template: {
|
|
8378
|
-
metadata: {
|
|
8379
|
-
labels: {
|
|
8380
|
-
[DEFAULT_MATCH_LABEL]: ""
|
|
8381
|
-
}
|
|
8382
|
-
},
|
|
8383
|
-
spec: {
|
|
8384
|
-
containers: [BASE_CONTAINER_INIT_VALUE],
|
|
8385
|
-
restartPolicy: "Always",
|
|
8386
|
-
...BASE_WORKLOAD_SPEC_INIT_VALUE
|
|
8387
|
-
}
|
|
8388
|
-
}
|
|
8389
|
-
}
|
|
8390
|
-
};
|
|
8391
|
-
const POD_INIT_VALUE = {
|
|
8392
|
-
apiVersion: "v1",
|
|
8393
|
-
kind: "Pod",
|
|
8394
|
-
...BASE_INIT_VALUE,
|
|
8395
|
-
spec: {
|
|
8396
|
-
containers: [BASE_CONTAINER_INIT_VALUE]
|
|
8397
|
-
}
|
|
8398
|
-
};
|
|
8399
|
-
const TIMESTAMP_LABEL = "sks.user.kubesmart.smtx.io/timestamp";
|
|
8400
|
-
function shortenedImage(image2) {
|
|
8401
|
-
return (image2 || "").replace(/^(index\.)?docker.io\/(library\/)?/, "").replace(/:latest$/, "").replace(/^(.*@sha256:)([0-9a-f]{8})[0-9a-f]+$/i, "$1$2\u2026");
|
|
8402
|
-
}
|
|
8403
|
-
class ResourceModel {
|
|
8404
|
-
constructor(rawYaml) {
|
|
8405
|
-
__publicField(this, "id");
|
|
8406
|
-
__publicField(this, "apiVersion");
|
|
8407
|
-
__publicField(this, "kind");
|
|
8408
|
-
__publicField(this, "metadata");
|
|
8409
|
-
this.rawYaml = rawYaml;
|
|
8410
|
-
this.id = rawYaml.id;
|
|
8411
|
-
this.apiVersion = rawYaml.apiVersion;
|
|
8412
|
-
this.kind = rawYaml.kind;
|
|
8413
|
-
this.metadata = rawYaml.metadata;
|
|
8414
|
-
}
|
|
8415
|
-
get name() {
|
|
8416
|
-
var _a;
|
|
8417
|
-
return (_a = this.rawYaml.metadata) == null ? void 0 : _a.name;
|
|
8418
|
-
}
|
|
8419
|
-
get namespace() {
|
|
8420
|
-
var _a;
|
|
8421
|
-
return (_a = this.rawYaml.metadata) == null ? void 0 : _a.namespace;
|
|
8422
|
-
}
|
|
8423
|
-
get labels() {
|
|
8424
|
-
var _a;
|
|
8425
|
-
return (_a = this.rawYaml.metadata) == null ? void 0 : _a.labels;
|
|
8426
|
-
}
|
|
8427
|
-
get annotations() {
|
|
8428
|
-
var _a;
|
|
8429
|
-
return (_a = this.rawYaml.metadata) == null ? void 0 : _a.annotations;
|
|
8430
|
-
}
|
|
8431
|
-
}
|
|
8432
|
-
class WorkloadModel extends ResourceModel {
|
|
8433
|
-
constructor(rawYaml) {
|
|
8434
|
-
super(rawYaml);
|
|
8435
|
-
this.rawYaml = rawYaml;
|
|
8436
|
-
}
|
|
8437
|
-
get status() {
|
|
8438
|
-
return this.rawYaml.status;
|
|
8439
|
-
}
|
|
8440
|
-
get spec() {
|
|
8441
|
-
return this.rawYaml.spec;
|
|
8442
|
-
}
|
|
8443
|
-
get imageNames() {
|
|
8444
|
-
var _a, _b, _c, _d;
|
|
8445
|
-
const containers = this.rawYaml.spec && "jobTemplate" in this.rawYaml.spec ? (_b = (_a = this.rawYaml.spec.jobTemplate.spec) == null ? void 0 : _a.template.spec) == null ? void 0 : _b.containers : this.rawYaml.spec && "template" in this.rawYaml.spec ? (_d = (_c = this.rawYaml.spec) == null ? void 0 : _c.template.spec) == null ? void 0 : _d.containers : [];
|
|
8446
|
-
return (containers == null ? void 0 : containers.map((container2) => shortenedImage(container2.image || ""))) || [];
|
|
8447
|
-
}
|
|
8448
|
-
get restartCount() {
|
|
8449
|
-
return 0;
|
|
8450
|
-
}
|
|
8451
|
-
redeploy() {
|
|
8452
|
-
const newOne = lodashEs.cloneDeep(this.rawYaml);
|
|
8453
|
-
const path = "spec.template.metadata.annotations";
|
|
8454
|
-
const annotations = lodashEs.get(newOne, path, {});
|
|
8455
|
-
lodashEs.set(newOne, path, {
|
|
8456
|
-
...annotations,
|
|
8457
|
-
[TIMESTAMP_LABEL]: new Date().toISOString().replace(/\.\d+Z$/, "Z")
|
|
8458
|
-
});
|
|
8459
|
-
return newOne;
|
|
8460
|
-
}
|
|
8461
|
-
scale(value) {
|
|
8462
|
-
const newOne = lodashEs.cloneDeep(this.rawYaml);
|
|
8463
|
-
if (newOne.kind === "Deployment" || newOne.kind === "StatefulSet") {
|
|
8464
|
-
lodashEs.set(newOne, "spec.replicas", value);
|
|
8465
|
-
}
|
|
8466
|
-
return newOne;
|
|
8467
|
-
}
|
|
8468
|
-
}
|
|
8469
|
-
class JobModel extends WorkloadModel {
|
|
8470
|
-
constructor(rawYaml) {
|
|
8471
|
-
super(rawYaml);
|
|
8472
|
-
this.rawYaml = rawYaml;
|
|
8473
|
-
}
|
|
8474
|
-
get duration() {
|
|
8475
|
-
var _a, _b;
|
|
8476
|
-
const completionTime = (_a = this.rawYaml.status) == null ? void 0 : _a.completionTime;
|
|
8477
|
-
const startTime = (_b = this.rawYaml.status) == null ? void 0 : _b.startTime;
|
|
8478
|
-
if (!completionTime && startTime) {
|
|
8479
|
-
return getSecondsDiff(startTime, Date.now().toString());
|
|
8480
|
-
}
|
|
8481
|
-
if (completionTime && startTime) {
|
|
8482
|
-
return getSecondsDiff(startTime, completionTime);
|
|
8483
|
-
}
|
|
8484
|
-
return 0;
|
|
8485
|
-
}
|
|
8486
|
-
get durationDisplay() {
|
|
8487
|
-
return elapsedTime(this.duration).label;
|
|
8488
|
-
}
|
|
8489
|
-
get completionsDisplay() {
|
|
8490
|
-
var _a, _b;
|
|
8491
|
-
return `${((_a = this.rawYaml.status) == null ? void 0 : _a.succeeded) || 0}/${(_b = this.rawYaml.spec) == null ? void 0 : _b.completions}`;
|
|
8492
|
-
}
|
|
8493
|
-
}
|
|
8494
|
-
const UNITS = ["", "K", "M", "G", "T", "P"];
|
|
8495
|
-
const FRACTIONAL = ["", "m", "u", "n", "p", "f"];
|
|
8496
|
-
function formatSi(inValue, options) {
|
|
8497
|
-
const {
|
|
8498
|
-
increment = 1e3,
|
|
8499
|
-
suffix = null,
|
|
8500
|
-
firstSuffix = null,
|
|
8501
|
-
startingExponent = 0,
|
|
8502
|
-
minExponent = 0,
|
|
8503
|
-
maxPrecision = 2,
|
|
8504
|
-
atLeastOne = true
|
|
8505
|
-
} = options || {};
|
|
8506
|
-
let val = inValue;
|
|
8507
|
-
let exp = startingExponent;
|
|
8508
|
-
while (val >= increment && exp + 1 < UNITS.length || exp < minExponent) {
|
|
8509
|
-
val = val / increment;
|
|
8510
|
-
exp++;
|
|
8511
|
-
}
|
|
8512
|
-
let out = 0;
|
|
8513
|
-
if (val < 10 && maxPrecision >= 2) {
|
|
8514
|
-
out = Math.round(val * 100) / 100;
|
|
8515
|
-
} else if (val < 100 && maxPrecision >= 1) {
|
|
8516
|
-
out = Math.round(val * 10) / 10;
|
|
8517
|
-
} else {
|
|
8518
|
-
out = Math.round(val);
|
|
8519
|
-
}
|
|
8520
|
-
if (atLeastOne && out === 0) {
|
|
8521
|
-
out = 1;
|
|
8522
|
-
}
|
|
8523
|
-
let outStr = String(out);
|
|
8524
|
-
if (exp === 0 && firstSuffix !== null) {
|
|
8525
|
-
outStr += `${firstSuffix}`;
|
|
8526
|
-
} else {
|
|
8527
|
-
outStr += `${UNITS[exp]}${suffix}` || "";
|
|
8528
|
-
}
|
|
8529
|
-
return outStr;
|
|
8530
|
-
}
|
|
8531
|
-
function parseSi(inValue, increment = null, allowFractional = true) {
|
|
8532
|
-
if (!inValue || typeof inValue !== "string" || !inValue.length) {
|
|
8533
|
-
return NaN;
|
|
8534
|
-
}
|
|
8535
|
-
inValue = inValue.replace(/,/g, "");
|
|
8536
|
-
let [, valStr, unit, incStr] = inValue.match(/^([0-9.-]+)\s*([^0-9.-]?)([^0-9.-]?)/) || [];
|
|
8537
|
-
const val = parseFloat(valStr);
|
|
8538
|
-
if (!unit) {
|
|
8539
|
-
return val;
|
|
8540
|
-
}
|
|
8541
|
-
if (unit.charCodeAt(0) === 181) {
|
|
8542
|
-
unit = "u";
|
|
8543
|
-
}
|
|
8544
|
-
const divide = FRACTIONAL.includes(unit);
|
|
8545
|
-
const multiply = UNITS.includes(unit.toUpperCase());
|
|
8546
|
-
if (increment === null) {
|
|
8547
|
-
if ((multiply || divide) && incStr === "i") {
|
|
8548
|
-
increment = 1024;
|
|
8549
|
-
} else {
|
|
8550
|
-
increment = 1e3;
|
|
8551
|
-
}
|
|
8552
|
-
}
|
|
8553
|
-
if (divide && allowFractional) {
|
|
8554
|
-
const exp = FRACTIONAL.indexOf(unit);
|
|
8555
|
-
return val / Math.pow(increment, exp);
|
|
8556
|
-
}
|
|
8557
|
-
if (multiply) {
|
|
8558
|
-
const exp = UNITS.indexOf(unit.toUpperCase());
|
|
8559
|
-
return val * Math.pow(increment, exp);
|
|
8560
|
-
}
|
|
8561
|
-
return val;
|
|
8562
|
-
}
|
|
8563
|
-
class PodModel extends WorkloadModel {
|
|
8564
|
-
constructor(rawYaml) {
|
|
8565
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
8566
|
-
super(rawYaml);
|
|
8567
|
-
__publicField(this, "request");
|
|
8568
|
-
__publicField(this, "limit");
|
|
8569
|
-
this.rawYaml = rawYaml;
|
|
8570
|
-
let cpuRequestNum = 0;
|
|
8571
|
-
let memoryRequestNum = 0;
|
|
8572
|
-
let cpuLimitNum = 0;
|
|
8573
|
-
let memoryLimitNum = 0;
|
|
8574
|
-
for (const container2 of ((_a = rawYaml.spec) == null ? void 0 : _a.containers) || []) {
|
|
8575
|
-
cpuRequestNum += parseSi(((_c = (_b = container2.resources) == null ? void 0 : _b.requests) == null ? void 0 : _c.cpu) || "0");
|
|
8576
|
-
memoryRequestNum += parseSi(((_e = (_d = container2.resources) == null ? void 0 : _d.requests) == null ? void 0 : _e.memory) || "0");
|
|
8577
|
-
cpuLimitNum += parseSi(((_g = (_f = container2.resources) == null ? void 0 : _f.limits) == null ? void 0 : _g.cpu) || "0");
|
|
8578
|
-
memoryLimitNum += parseSi(((_i = (_h = container2.resources) == null ? void 0 : _h.limits) == null ? void 0 : _i.memory) || "0");
|
|
8579
|
-
}
|
|
8580
|
-
this.request = {
|
|
8581
|
-
cpu: {
|
|
8582
|
-
value: cpuRequestNum,
|
|
8583
|
-
si: formatSi(cpuRequestNum, {
|
|
8584
|
-
suffix: "m"
|
|
8585
|
-
})
|
|
8586
|
-
},
|
|
8587
|
-
memory: {
|
|
8588
|
-
value: memoryRequestNum,
|
|
8589
|
-
si: formatSi(memoryRequestNum, {
|
|
8590
|
-
suffix: "i"
|
|
8591
|
-
})
|
|
8592
|
-
}
|
|
8593
|
-
};
|
|
8594
|
-
this.limit = {
|
|
8595
|
-
cpu: {
|
|
8596
|
-
value: cpuLimitNum,
|
|
8597
|
-
si: formatSi(cpuLimitNum, {
|
|
8598
|
-
suffix: "m"
|
|
8599
|
-
})
|
|
8600
|
-
},
|
|
8601
|
-
memory: {
|
|
8602
|
-
value: memoryLimitNum,
|
|
8603
|
-
si: formatSi(memoryLimitNum, {
|
|
8604
|
-
suffix: "i"
|
|
8605
|
-
})
|
|
8606
|
-
}
|
|
8607
|
-
};
|
|
8608
|
-
}
|
|
8609
|
-
get imageNames() {
|
|
8610
|
-
var _a;
|
|
8611
|
-
return ((_a = this.rawYaml.spec) == null ? void 0 : _a.containers.map(
|
|
8612
|
-
(container2) => shortenedImage(container2.image || "")
|
|
8613
|
-
)) || [];
|
|
8614
|
-
}
|
|
8615
|
-
get restartCount() {
|
|
8616
|
-
var _a, _b;
|
|
8617
|
-
if ((_a = this.rawYaml.status) == null ? void 0 : _a.containerStatuses) {
|
|
8618
|
-
return ((_b = this.rawYaml.status) == null ? void 0 : _b.containerStatuses[0].restartCount) || 0;
|
|
8619
|
-
}
|
|
8620
|
-
return 0;
|
|
8621
|
-
}
|
|
8622
|
-
get readyDisplay() {
|
|
8623
|
-
var _a, _b, _c;
|
|
8624
|
-
return `${(_b = (_a = this.rawYaml.status) == null ? void 0 : _a.containerStatuses) == null ? void 0 : _b.filter((c) => c.ready).length}/${(_c = this.rawYaml.spec) == null ? void 0 : _c.containers.length}`;
|
|
8625
|
-
}
|
|
8626
|
-
}
|
|
8627
|
-
class PodMetricsModel extends ResourceModel {
|
|
8628
|
-
constructor(data2) {
|
|
8629
|
-
super(data2);
|
|
8630
|
-
__publicField(this, "usage");
|
|
8631
|
-
this.data = data2;
|
|
8632
|
-
let cpuUsageNum = 0;
|
|
8633
|
-
let memoryUsageNum = 0;
|
|
8634
|
-
for (const container2 of data2.containers) {
|
|
8635
|
-
cpuUsageNum += parseSi(container2.usage.cpu || "0");
|
|
8636
|
-
memoryUsageNum += parseSi(container2.usage.memory || "0");
|
|
8637
|
-
}
|
|
8638
|
-
this.usage = {
|
|
8639
|
-
cpu: {
|
|
8640
|
-
value: cpuUsageNum,
|
|
8641
|
-
si: formatSi(1e3 * cpuUsageNum, {
|
|
8642
|
-
suffix: "m",
|
|
8643
|
-
maxPrecision: 0
|
|
8644
|
-
})
|
|
8645
|
-
},
|
|
8646
|
-
memory: {
|
|
8647
|
-
value: memoryUsageNum,
|
|
8648
|
-
si: formatSi(memoryUsageNum, {
|
|
8649
|
-
suffix: "i",
|
|
8650
|
-
maxPrecision: 0
|
|
8651
|
-
})
|
|
8652
|
-
}
|
|
8653
|
-
};
|
|
8654
|
-
}
|
|
8655
|
-
}
|
|
8656
|
-
class CronJobModel extends WorkloadModel {
|
|
8657
|
-
constructor(data2) {
|
|
8658
|
-
super(data2);
|
|
8659
|
-
this.data = data2;
|
|
8660
|
-
}
|
|
8661
|
-
suspend() {
|
|
8662
|
-
const newOne = lodashEs.cloneDeep(this.data);
|
|
8663
|
-
if (this.data.kind === "CronJob") {
|
|
8664
|
-
lodashEs.set(newOne, "spec.suspend", true);
|
|
8665
|
-
}
|
|
8666
|
-
return newOne;
|
|
8667
|
-
}
|
|
8668
|
-
resume() {
|
|
8669
|
-
const newOne = lodashEs.cloneDeep(this.data);
|
|
8670
|
-
if (this.data.kind === "CronJob") {
|
|
8671
|
-
lodashEs.set(newOne, "spec.suspend", false);
|
|
8672
|
-
}
|
|
8673
|
-
return newOne;
|
|
8674
|
-
}
|
|
8675
|
-
}
|
|
8676
|
-
function memoize(fn) {
|
|
8677
|
-
var cache = /* @__PURE__ */ Object.create(null);
|
|
8678
|
-
return function(arg) {
|
|
8679
|
-
if (cache[arg] === void 0)
|
|
8680
|
-
cache[arg] = fn(arg);
|
|
8681
|
-
return cache[arg];
|
|
8682
|
-
};
|
|
8683
|
-
}
|
|
8684
|
-
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
|
|
8685
|
-
var isPropValid = /* @__PURE__ */ memoize(
|
|
8686
|
-
function(prop) {
|
|
8687
|
-
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
|
|
8688
|
-
}
|
|
8689
|
-
);
|
|
8690
|
-
var isCapital = (ch) => ch.toUpperCase() === ch;
|
|
8691
|
-
var filterKey = (keys) => (key) => keys.indexOf(key) === -1;
|
|
8692
|
-
var omit = (obj, keys) => {
|
|
8693
|
-
const res = {};
|
|
8694
|
-
Object.keys(obj).filter(filterKey(keys)).forEach((key) => {
|
|
8695
|
-
res[key] = obj[key];
|
|
8696
|
-
});
|
|
8697
|
-
return res;
|
|
8445
|
+
);
|
|
8446
|
+
var isCapital = (ch) => ch.toUpperCase() === ch;
|
|
8447
|
+
var filterKey = (keys) => (key) => keys.indexOf(key) === -1;
|
|
8448
|
+
var omit = (obj, keys) => {
|
|
8449
|
+
const res = {};
|
|
8450
|
+
Object.keys(obj).filter(filterKey(keys)).forEach((key) => {
|
|
8451
|
+
res[key] = obj[key];
|
|
8452
|
+
});
|
|
8453
|
+
return res;
|
|
8698
8454
|
};
|
|
8699
8455
|
function filterProps(asIs, props, omitKeys) {
|
|
8700
8456
|
const filteredProps = omit(props, omitKeys);
|
|
@@ -8826,7 +8582,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8826
8582
|
if (loading) {
|
|
8827
8583
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(kit.loading, {});
|
|
8828
8584
|
} else if (error) {
|
|
8829
|
-
return /* @__PURE__ */ jsxRuntime.exports.jsx(WidgetErrorContent, {
|
|
8585
|
+
return /* @__PURE__ */ jsxRuntime.exports.jsx(WidgetErrorContent$1, {
|
|
8830
8586
|
errorText: t("dovetail.retry_when_access_data_failed"),
|
|
8831
8587
|
refetch,
|
|
8832
8588
|
style: {
|
|
@@ -8834,7 +8590,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8834
8590
|
}
|
|
8835
8591
|
});
|
|
8836
8592
|
} else if (dataSource.length === 0) {
|
|
8837
|
-
return /* @__PURE__ */ jsxRuntime.exports.jsx(WidgetErrorContent, {
|
|
8593
|
+
return /* @__PURE__ */ jsxRuntime.exports.jsx(WidgetErrorContent$1, {
|
|
8838
8594
|
errorText: t("dovetail.empty"),
|
|
8839
8595
|
style: {
|
|
8840
8596
|
padding: "15px 0"
|
|
@@ -8886,20 +8642,20 @@ var __publicField = (obj, key, value) => {
|
|
|
8886
8642
|
});
|
|
8887
8643
|
}
|
|
8888
8644
|
}, [resource == null ? void 0 : resource.name]);
|
|
8889
|
-
return /* @__PURE__ */ jsxRuntime.exports.jsx(kit.button, { type: "primary", onClick, children: t("create") });
|
|
8645
|
+
return /* @__PURE__ */ jsxRuntime.exports.jsx(kit.button, { type: "primary", onClick, children: t("dovetail.create") });
|
|
8890
8646
|
}
|
|
8891
8647
|
const useDeleteManyModal = (resource, ids) => {
|
|
8892
8648
|
const { mutate } = core.useDeleteMany();
|
|
8893
8649
|
const [visible, setVisible] = React.useState(false);
|
|
8894
8650
|
const { t } = useTranslation();
|
|
8895
8651
|
const modalProps = {
|
|
8896
|
-
title: t("delete"),
|
|
8897
|
-
okText: t("delete"),
|
|
8652
|
+
title: t("dovetail.delete"),
|
|
8653
|
+
okText: t("dovetail.delete"),
|
|
8898
8654
|
okButtonProps: {
|
|
8899
8655
|
danger: true
|
|
8900
8656
|
},
|
|
8901
|
-
cancelText: t("cancel"),
|
|
8902
|
-
children: t("confirm_delete_text", {
|
|
8657
|
+
cancelText: t("dovetail.cancel"),
|
|
8658
|
+
children: t("dovetail.confirm_delete_text", {
|
|
8903
8659
|
target: ids,
|
|
8904
8660
|
interpolation: { escapeValue: false }
|
|
8905
8661
|
}),
|
|
@@ -8928,7 +8684,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8928
8684
|
setVisible(true);
|
|
8929
8685
|
}, [setVisible]);
|
|
8930
8686
|
return /* @__PURE__ */ jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment, { children: [
|
|
8931
|
-
/* @__PURE__ */ jsxRuntime.exports.jsx(kit.button, { type: "primary", danger: true, onClick, children: t("delete") }),
|
|
8687
|
+
/* @__PURE__ */ jsxRuntime.exports.jsx(kit.button, { type: "primary", danger: true, onClick, children: t("dovetail.delete") }),
|
|
8932
8688
|
visible ? /* @__PURE__ */ jsxRuntime.exports.jsx(kit.modal, { ...modalProps }) : null
|
|
8933
8689
|
] });
|
|
8934
8690
|
};
|
|
@@ -8967,9 +8723,6 @@ var __publicField = (obj, key, value) => {
|
|
|
8967
8723
|
owner
|
|
8968
8724
|
}) => {
|
|
8969
8725
|
const kit = eagle.useUIKit();
|
|
8970
|
-
const {
|
|
8971
|
-
i18n: i18n2
|
|
8972
|
-
} = useTranslation();
|
|
8973
8726
|
const [selectedKeys, setSelectedKeys] = React.useState([]);
|
|
8974
8727
|
const [currentPage, setCurrentPage] = React.useState(1);
|
|
8975
8728
|
const {
|
|
@@ -8982,11 +8735,11 @@ var __publicField = (obj, key, value) => {
|
|
|
8982
8735
|
}
|
|
8983
8736
|
});
|
|
8984
8737
|
const dataSource = React.useMemo(() => {
|
|
8985
|
-
return data2 == null ? void 0 : data2.data.
|
|
8738
|
+
return data2 == null ? void 0 : data2.data.filter((p) => {
|
|
8986
8739
|
return owner ? matchOwner(p, owner) : true;
|
|
8987
8740
|
});
|
|
8988
8741
|
}, [data2 == null ? void 0 : data2.data, owner]);
|
|
8989
|
-
const columns = [PhaseColumnRenderer(
|
|
8742
|
+
const columns = [PhaseColumnRenderer(), NameColumnRenderer("jobs"), NameSpaceColumnRenderer(), WorkloadImageColumnRenderer(), CompletionsCountColumnRenderer(), DurationColumnRenderer(), AgeColumnRenderer()];
|
|
8990
8743
|
return /* @__PURE__ */ jsxRuntime.exports.jsxs(kit.space, {
|
|
8991
8744
|
direction: "vertical",
|
|
8992
8745
|
className: "c16agr8o",
|
|
@@ -9055,9 +8808,6 @@ var __publicField = (obj, key, value) => {
|
|
|
9055
8808
|
selector
|
|
9056
8809
|
}) => {
|
|
9057
8810
|
const kit = eagle.useUIKit();
|
|
9058
|
-
const {
|
|
9059
|
-
i18n: i18n2
|
|
9060
|
-
} = useTranslation();
|
|
9061
8811
|
const [selectedKeys, setSelectedKeys] = React.useState([]);
|
|
9062
8812
|
const [currentPage, setCurrentPage] = React.useState(1);
|
|
9063
8813
|
const {
|
|
@@ -9070,11 +8820,11 @@ var __publicField = (obj, key, value) => {
|
|
|
9070
8820
|
}
|
|
9071
8821
|
});
|
|
9072
8822
|
const dataSource = React.useMemo(() => {
|
|
9073
|
-
return data2 == null ? void 0 : data2.data.
|
|
8823
|
+
return data2 == null ? void 0 : data2.data.filter((p) => {
|
|
9074
8824
|
return selector ? matchSelector(p, selector) : true;
|
|
9075
8825
|
});
|
|
9076
8826
|
}, [data2 == null ? void 0 : data2.data, selector]);
|
|
9077
|
-
const columns = [PhaseColumnRenderer(
|
|
8827
|
+
const columns = [PhaseColumnRenderer(), NameColumnRenderer("pods"), NodeNameColumnRenderer(), WorkloadImageColumnRenderer(), RestartCountColumnRenderer()];
|
|
9078
8828
|
return /* @__PURE__ */ jsxRuntime.exports.jsxs(kit.space, {
|
|
9079
8829
|
direction: "vertical",
|
|
9080
8830
|
className: "c1dicff8",
|
|
@@ -9096,42 +8846,42 @@ var __publicField = (obj, key, value) => {
|
|
|
9096
8846
|
})]
|
|
9097
8847
|
});
|
|
9098
8848
|
};
|
|
9099
|
-
const ImageField = (
|
|
8849
|
+
const ImageField = () => {
|
|
9100
8850
|
return {
|
|
9101
8851
|
key: "Image",
|
|
9102
|
-
title:
|
|
8852
|
+
title: i18n__default.default.t("dovetail.image"),
|
|
9103
8853
|
path: ["imageNames"],
|
|
9104
8854
|
render(value) {
|
|
9105
8855
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(ImageNames, { value });
|
|
9106
8856
|
}
|
|
9107
8857
|
};
|
|
9108
8858
|
};
|
|
9109
|
-
const ReplicaField = (
|
|
8859
|
+
const ReplicaField = () => {
|
|
9110
8860
|
return {
|
|
9111
8861
|
key: "Replicas",
|
|
9112
|
-
title:
|
|
8862
|
+
title: i18n__default.default.t("dovetail.replicas"),
|
|
9113
8863
|
path: ["status", "replicas"],
|
|
9114
8864
|
render: (_, record) => {
|
|
9115
8865
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(WorkloadReplicas, { record });
|
|
9116
8866
|
}
|
|
9117
8867
|
};
|
|
9118
8868
|
};
|
|
9119
|
-
const ConditionsField = (
|
|
8869
|
+
const ConditionsField = () => {
|
|
9120
8870
|
return {
|
|
9121
8871
|
key: "Conditions",
|
|
9122
|
-
title:
|
|
8872
|
+
title: i18n__default.default.t("dovetail.condition"),
|
|
9123
8873
|
path: ["status", "conditions"],
|
|
9124
8874
|
render: (value) => {
|
|
9125
8875
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(ConditionsTable, { conditions: value });
|
|
9126
8876
|
}
|
|
9127
8877
|
};
|
|
9128
8878
|
};
|
|
9129
|
-
const PodsField = (
|
|
8879
|
+
const PodsField = () => {
|
|
9130
8880
|
return {
|
|
9131
8881
|
key: "pods",
|
|
9132
8882
|
title: "Pods",
|
|
9133
8883
|
path: [],
|
|
9134
|
-
render: (
|
|
8884
|
+
render: (_, record) => {
|
|
9135
8885
|
var _a, _b;
|
|
9136
8886
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(
|
|
9137
8887
|
WorkloadPodsTable,
|
|
@@ -9144,12 +8894,12 @@ var __publicField = (obj, key, value) => {
|
|
|
9144
8894
|
}
|
|
9145
8895
|
};
|
|
9146
8896
|
};
|
|
9147
|
-
const JobsField = (
|
|
8897
|
+
const JobsField = () => {
|
|
9148
8898
|
return {
|
|
9149
8899
|
key: "jobs",
|
|
9150
8900
|
title: "Jobs",
|
|
9151
8901
|
path: [],
|
|
9152
|
-
render: (
|
|
8902
|
+
render: (_, record) => {
|
|
9153
8903
|
var _a, _b, _c;
|
|
9154
8904
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(
|
|
9155
8905
|
CronjobJobsTable,
|
|
@@ -9166,20 +8916,20 @@ var __publicField = (obj, key, value) => {
|
|
|
9166
8916
|
}
|
|
9167
8917
|
};
|
|
9168
8918
|
};
|
|
9169
|
-
const DataField = (
|
|
8919
|
+
const DataField = () => {
|
|
9170
8920
|
return {
|
|
9171
8921
|
key: "data",
|
|
9172
|
-
title:
|
|
8922
|
+
title: i18n__default.default.t("dovetail.data"),
|
|
9173
8923
|
path: ["rawYaml", "data"],
|
|
9174
8924
|
render: (val) => {
|
|
9175
8925
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(KeyValue, { value: val });
|
|
9176
8926
|
}
|
|
9177
8927
|
};
|
|
9178
8928
|
};
|
|
9179
|
-
const SecretDataField = (
|
|
8929
|
+
const SecretDataField = () => {
|
|
9180
8930
|
return {
|
|
9181
8931
|
key: "data",
|
|
9182
|
-
title:
|
|
8932
|
+
title: i18n__default.default.t("dovetail.data"),
|
|
9183
8933
|
path: ["rawYaml", "data"],
|
|
9184
8934
|
render: (val) => {
|
|
9185
8935
|
const decodeVal = {};
|
|
@@ -9190,43 +8940,43 @@ var __publicField = (obj, key, value) => {
|
|
|
9190
8940
|
}
|
|
9191
8941
|
};
|
|
9192
8942
|
};
|
|
9193
|
-
const StartTimeField = (
|
|
8943
|
+
const StartTimeField = () => {
|
|
9194
8944
|
return {
|
|
9195
8945
|
key: "started",
|
|
9196
|
-
title:
|
|
8946
|
+
title: i18n__default.default.t("dovetail.started"),
|
|
9197
8947
|
path: ["status", "startTime"],
|
|
9198
8948
|
render(value) {
|
|
9199
8949
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(Time, { date: value });
|
|
9200
8950
|
}
|
|
9201
8951
|
};
|
|
9202
8952
|
};
|
|
9203
|
-
const ServiceTypeField = (
|
|
8953
|
+
const ServiceTypeField = () => {
|
|
9204
8954
|
return {
|
|
9205
8955
|
key: "type",
|
|
9206
|
-
title:
|
|
8956
|
+
title: i18n__default.default.t("dovetail.type"),
|
|
9207
8957
|
path: ["rawYaml", "spec", "type"]
|
|
9208
8958
|
};
|
|
9209
8959
|
};
|
|
9210
|
-
const ClusterIpField = (
|
|
8960
|
+
const ClusterIpField = () => {
|
|
9211
8961
|
return {
|
|
9212
8962
|
key: "clusterIp",
|
|
9213
|
-
title:
|
|
8963
|
+
title: i18n__default.default.t("dovetail.clusterIp"),
|
|
9214
8964
|
path: ["rawYaml", "spec", "clusterIP"]
|
|
9215
8965
|
};
|
|
9216
8966
|
};
|
|
9217
|
-
const SessionAffinityField = (
|
|
8967
|
+
const SessionAffinityField = () => {
|
|
9218
8968
|
return {
|
|
9219
8969
|
key: "clusterIp",
|
|
9220
|
-
title:
|
|
8970
|
+
title: i18n__default.default.t("dovetail.sessionAffinity"),
|
|
9221
8971
|
path: ["rawYaml", "spec", "sessionAffinity"]
|
|
9222
8972
|
};
|
|
9223
8973
|
};
|
|
9224
|
-
const ServicePodsField = (
|
|
8974
|
+
const ServicePodsField = () => {
|
|
9225
8975
|
return {
|
|
9226
8976
|
key: "pods",
|
|
9227
8977
|
title: "Pods",
|
|
9228
8978
|
path: [],
|
|
9229
|
-
render: (
|
|
8979
|
+
render: (_, record) => {
|
|
9230
8980
|
var _a, _b;
|
|
9231
8981
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(
|
|
9232
8982
|
WorkloadPodsTable,
|
|
@@ -9400,44 +9150,22 @@ var __publicField = (obj, key, value) => {
|
|
|
9400
9150
|
__proto__: null,
|
|
9401
9151
|
default: MonacoYamlEditor$1
|
|
9402
9152
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
9403
|
-
const index_m52iq6 = "";
|
|
9404
|
-
const TagWrapper = "t13a6vox";
|
|
9405
|
-
const TagStyle = "t12ikbmp";
|
|
9406
|
-
const Tags = (props) => {
|
|
9407
|
-
const {
|
|
9408
|
-
value
|
|
9409
|
-
} = props;
|
|
9410
|
-
const kit = eagle.useUIKit();
|
|
9411
|
-
const tags = Object.keys(value).map((key) => {
|
|
9412
|
-
return /* @__PURE__ */ jsxRuntime.exports.jsxs(kit.tag, {
|
|
9413
|
-
className: TagStyle,
|
|
9414
|
-
title: `${key}:${value[key]}`,
|
|
9415
|
-
children: [key, ":", value[key]]
|
|
9416
|
-
}, key);
|
|
9417
|
-
});
|
|
9418
|
-
return /* @__PURE__ */ jsxRuntime.exports.jsx(kit.space, {
|
|
9419
|
-
className: TagWrapper,
|
|
9420
|
-
size: 8,
|
|
9421
|
-
children: tags
|
|
9422
|
-
});
|
|
9423
|
-
};
|
|
9424
9153
|
const EventsTable = ({}) => {
|
|
9425
|
-
eagle.useUIKit();
|
|
9426
9154
|
const { i18n: i18n2 } = useTranslation();
|
|
9427
9155
|
const [currentPage, setCurrentPage] = React.useState(1);
|
|
9428
|
-
const parsed = core.useParsed();
|
|
9429
9156
|
const { data: data2, isLoading } = core.useList({
|
|
9430
9157
|
resource: "events",
|
|
9431
9158
|
meta: { resourceBasePath: "/apis/events.k8s.io/v1", kind: "Event" }
|
|
9432
9159
|
});
|
|
9160
|
+
const parsed = core.useParsed();
|
|
9433
9161
|
const columns = React.useMemo(
|
|
9434
9162
|
() => [
|
|
9435
|
-
NameSpaceColumnRenderer(
|
|
9163
|
+
NameSpaceColumnRenderer(),
|
|
9436
9164
|
{
|
|
9437
9165
|
key: "type",
|
|
9438
9166
|
display: true,
|
|
9439
9167
|
dataIndex: ["rawYaml", "type"],
|
|
9440
|
-
title: i18n2.t("type"),
|
|
9168
|
+
title: i18n2.t("dovetail.type"),
|
|
9441
9169
|
sortable: true,
|
|
9442
9170
|
sorter: CommonSorter(["rawYaml", "type"])
|
|
9443
9171
|
},
|
|
@@ -9445,7 +9173,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9445
9173
|
key: "reason",
|
|
9446
9174
|
display: true,
|
|
9447
9175
|
dataIndex: ["rawYaml", "reason"],
|
|
9448
|
-
title: i18n2.t("reason"),
|
|
9176
|
+
title: i18n2.t("dovetail.reason"),
|
|
9449
9177
|
sortable: true,
|
|
9450
9178
|
sorter: CommonSorter(["rawYaml", "reason"])
|
|
9451
9179
|
},
|
|
@@ -9453,7 +9181,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9453
9181
|
key: "object",
|
|
9454
9182
|
display: true,
|
|
9455
9183
|
dataIndex: ["rawYaml", "regarding", "name"],
|
|
9456
|
-
title: i18n2.t("object"),
|
|
9184
|
+
title: i18n2.t("dovetail.object"),
|
|
9457
9185
|
sortable: true,
|
|
9458
9186
|
sorter: CommonSorter(["rawYaml", "regarding", "name"])
|
|
9459
9187
|
},
|
|
@@ -9461,11 +9189,11 @@ var __publicField = (obj, key, value) => {
|
|
|
9461
9189
|
key: "note",
|
|
9462
9190
|
display: true,
|
|
9463
9191
|
dataIndex: ["rawYaml", "note"],
|
|
9464
|
-
title: i18n2.t("note"),
|
|
9192
|
+
title: i18n2.t("dovetail.note"),
|
|
9465
9193
|
sortable: true,
|
|
9466
9194
|
sorter: CommonSorter(["rawYaml", "note"])
|
|
9467
9195
|
},
|
|
9468
|
-
AgeColumnRenderer(
|
|
9196
|
+
AgeColumnRenderer()
|
|
9469
9197
|
],
|
|
9470
9198
|
[i18n2]
|
|
9471
9199
|
);
|
|
@@ -9473,7 +9201,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9473
9201
|
() => addId((data2 == null ? void 0 : data2.data) || [], "metadata.uid").filter((d) => {
|
|
9474
9202
|
const objectId = `${d.regarding.namespace}/${d.regarding.name}`;
|
|
9475
9203
|
return objectId === parsed.id;
|
|
9476
|
-
})
|
|
9204
|
+
}),
|
|
9477
9205
|
[data2 == null ? void 0 : data2.data, parsed]
|
|
9478
9206
|
);
|
|
9479
9207
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(
|
|
@@ -9491,6 +9219,27 @@ var __publicField = (obj, key, value) => {
|
|
|
9491
9219
|
}
|
|
9492
9220
|
);
|
|
9493
9221
|
};
|
|
9222
|
+
const index_m52iq6 = "";
|
|
9223
|
+
const TagWrapper = "t13a6vox";
|
|
9224
|
+
const TagStyle = "t12ikbmp";
|
|
9225
|
+
const Tags = (props) => {
|
|
9226
|
+
const {
|
|
9227
|
+
value
|
|
9228
|
+
} = props;
|
|
9229
|
+
const kit = eagle.useUIKit();
|
|
9230
|
+
const tags = Object.keys(value).map((key) => {
|
|
9231
|
+
return /* @__PURE__ */ jsxRuntime.exports.jsxs(kit.tag, {
|
|
9232
|
+
className: TagStyle,
|
|
9233
|
+
title: `${key}:${value[key]}`,
|
|
9234
|
+
children: [key, ":", value[key]]
|
|
9235
|
+
}, key);
|
|
9236
|
+
});
|
|
9237
|
+
return /* @__PURE__ */ jsxRuntime.exports.jsx(kit.space, {
|
|
9238
|
+
className: TagWrapper,
|
|
9239
|
+
size: 8,
|
|
9240
|
+
children: tags
|
|
9241
|
+
});
|
|
9242
|
+
};
|
|
9494
9243
|
const ShowContent_10jwllm = "";
|
|
9495
9244
|
const TopBarStyle = "t9agep2";
|
|
9496
9245
|
const ShowContentStyle = "so89gfi";
|
|
@@ -9525,14 +9274,15 @@ var __publicField = (obj, key, value) => {
|
|
|
9525
9274
|
if (!(data2 == null ? void 0 : data2.data)) {
|
|
9526
9275
|
return null;
|
|
9527
9276
|
}
|
|
9528
|
-
const
|
|
9277
|
+
const model = data2.data;
|
|
9278
|
+
const record = formatter ? formatter(model) : data2 == null ? void 0 : data2.data;
|
|
9529
9279
|
const FirstLineFields = [{
|
|
9530
9280
|
key: "NameSpace",
|
|
9531
|
-
title: t("namespace"),
|
|
9281
|
+
title: t("dovetail.namespace"),
|
|
9532
9282
|
path: ["metadata", "namespace"]
|
|
9533
9283
|
}, {
|
|
9534
9284
|
key: "Age",
|
|
9535
|
-
title: t("created_time"),
|
|
9285
|
+
title: t("dovetail.created_time"),
|
|
9536
9286
|
path: ["metadata", "creationTimestamp"],
|
|
9537
9287
|
render(value) {
|
|
9538
9288
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(Time, {
|
|
@@ -9542,7 +9292,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9542
9292
|
}];
|
|
9543
9293
|
const SecondLineFields = [{
|
|
9544
9294
|
key: "Labels",
|
|
9545
|
-
title: t("label"),
|
|
9295
|
+
title: t("dovetail.label"),
|
|
9546
9296
|
path: ["metadata", "labels"],
|
|
9547
9297
|
render: (value) => {
|
|
9548
9298
|
if (!value) {
|
|
@@ -9554,7 +9304,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9554
9304
|
}
|
|
9555
9305
|
}, {
|
|
9556
9306
|
key: "Annotations",
|
|
9557
|
-
title: t("annotation"),
|
|
9307
|
+
title: t("dovetail.annotation"),
|
|
9558
9308
|
path: ["metadata", "annotations"],
|
|
9559
9309
|
render: (value) => {
|
|
9560
9310
|
if (!value) {
|
|
@@ -9603,7 +9353,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9603
9353
|
onChange: (e) => setMode(e.target.value),
|
|
9604
9354
|
children: [/* @__PURE__ */ jsxRuntime.exports.jsx(kit.radioButton, {
|
|
9605
9355
|
value: "detail",
|
|
9606
|
-
children: t("detail")
|
|
9356
|
+
children: t("dovetail.detail")
|
|
9607
9357
|
}), /* @__PURE__ */ jsxRuntime.exports.jsx(kit.radioButton, {
|
|
9608
9358
|
value: "yaml",
|
|
9609
9359
|
children: "YAML"
|
|
@@ -9640,7 +9390,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9640
9390
|
children: content
|
|
9641
9391
|
}, field.key);
|
|
9642
9392
|
}), /* @__PURE__ */ jsxRuntime.exports.jsx(kit.tabsTabPane, {
|
|
9643
|
-
tab: t("event"),
|
|
9393
|
+
tab: t("dovetail.event"),
|
|
9644
9394
|
children: /* @__PURE__ */ jsxRuntime.exports.jsx(EventsTable, {})
|
|
9645
9395
|
}, "event")]
|
|
9646
9396
|
});
|
|
@@ -9650,7 +9400,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9650
9400
|
}),
|
|
9651
9401
|
["yaml"]: /* @__PURE__ */ jsxRuntime.exports.jsx(MonacoYamlEditor$1, {
|
|
9652
9402
|
className: EditorStyle$1,
|
|
9653
|
-
defaultValue: yaml__default.default.dump(
|
|
9403
|
+
defaultValue: yaml__default.default.dump(model.restore()),
|
|
9654
9404
|
schema: {},
|
|
9655
9405
|
onEditorCreate: (editor) => {
|
|
9656
9406
|
fold(editor);
|
|
@@ -9704,7 +9454,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9704
9454
|
{
|
|
9705
9455
|
key: "state",
|
|
9706
9456
|
dataIndex: ["state"],
|
|
9707
|
-
title: i18n2.t("state"),
|
|
9457
|
+
title: i18n2.t("dovetail.state"),
|
|
9708
9458
|
sortable: true,
|
|
9709
9459
|
sorter: CommonSorter(["state"]),
|
|
9710
9460
|
render: (v) => /* @__PURE__ */ jsxRuntime.exports.jsx(StateTag, { state: Object.keys(v)[0] })
|
|
@@ -9712,7 +9462,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9712
9462
|
{
|
|
9713
9463
|
key: "ready",
|
|
9714
9464
|
dataIndex: ["ready"],
|
|
9715
|
-
title: i18n2.t("ready"),
|
|
9465
|
+
title: i18n2.t("dovetail.ready"),
|
|
9716
9466
|
sortable: true,
|
|
9717
9467
|
sorter: CommonSorter(["ready"]),
|
|
9718
9468
|
render: (v) => /* @__PURE__ */ jsxRuntime.exports.jsx(
|
|
@@ -9725,21 +9475,21 @@ var __publicField = (obj, key, value) => {
|
|
|
9725
9475
|
{
|
|
9726
9476
|
key: "name",
|
|
9727
9477
|
dataIndex: ["name"],
|
|
9728
|
-
title: i18n2.t("name"),
|
|
9478
|
+
title: i18n2.t("dovetail.name"),
|
|
9729
9479
|
sortable: true,
|
|
9730
9480
|
sorter: CommonSorter(["name"])
|
|
9731
9481
|
},
|
|
9732
9482
|
{
|
|
9733
9483
|
key: "image",
|
|
9734
9484
|
dataIndex: ["image"],
|
|
9735
|
-
title: i18n2.t("image"),
|
|
9485
|
+
title: i18n2.t("dovetail.image"),
|
|
9736
9486
|
sortable: true,
|
|
9737
9487
|
sorter: CommonSorter(["image"])
|
|
9738
9488
|
},
|
|
9739
9489
|
{
|
|
9740
9490
|
key: "init",
|
|
9741
9491
|
dataIndex: [],
|
|
9742
|
-
title: i18n2.t("init_container"),
|
|
9492
|
+
title: i18n2.t("dovetail.init_container"),
|
|
9743
9493
|
render: (_, record) => {
|
|
9744
9494
|
const isInit = initContainerStatuses.some(
|
|
9745
9495
|
(c) => c.containerID === record.containerID
|
|
@@ -9753,14 +9503,14 @@ var __publicField = (obj, key, value) => {
|
|
|
9753
9503
|
{
|
|
9754
9504
|
key: "restartCount",
|
|
9755
9505
|
dataIndex: ["restartCount"],
|
|
9756
|
-
title: i18n2.t("restarts"),
|
|
9506
|
+
title: i18n2.t("dovetail.restarts"),
|
|
9757
9507
|
sortable: true,
|
|
9758
9508
|
sorter: CommonSorter(["restartCount"])
|
|
9759
9509
|
},
|
|
9760
9510
|
{
|
|
9761
9511
|
key: "started",
|
|
9762
9512
|
dataIndex: ["state", "running", "startedAt"],
|
|
9763
|
-
title: i18n2.t("started"),
|
|
9513
|
+
title: i18n2.t("dovetail.started"),
|
|
9764
9514
|
sortable: true,
|
|
9765
9515
|
sorter: CommonSorter(["state", "running", "startedAt"]),
|
|
9766
9516
|
render: (value) => {
|
|
@@ -9835,13 +9585,13 @@ var __publicField = (obj, key, value) => {
|
|
|
9835
9585
|
}
|
|
9836
9586
|
function ResourceList(props) {
|
|
9837
9587
|
const { formatter, name: name2, columns, Dropdown } = props;
|
|
9838
|
-
|
|
9588
|
+
useTranslation();
|
|
9839
9589
|
const { tableProps, selectedKeys } = useEagleTable({
|
|
9840
9590
|
useTableParams: {},
|
|
9841
9591
|
columns: [
|
|
9842
|
-
|
|
9843
|
-
|
|
9844
|
-
NameSpaceColumnRenderer(
|
|
9592
|
+
NameColumnRenderer(),
|
|
9593
|
+
PhaseColumnRenderer(),
|
|
9594
|
+
NameSpaceColumnRenderer(),
|
|
9845
9595
|
...columns
|
|
9846
9596
|
],
|
|
9847
9597
|
tableProps: {
|
|
@@ -9863,6 +9613,46 @@ var __publicField = (obj, key, value) => {
|
|
|
9863
9613
|
}
|
|
9864
9614
|
);
|
|
9865
9615
|
}
|
|
9616
|
+
const index_1kmu85y = "";
|
|
9617
|
+
const ErrorWrapper = /* @__PURE__ */ styled_default("div")({
|
|
9618
|
+
name: "ErrorWrapper",
|
|
9619
|
+
class: "egn3dbn",
|
|
9620
|
+
propsAsIs: false
|
|
9621
|
+
});
|
|
9622
|
+
const ErrorContent = /* @__PURE__ */ styled_default("div")({
|
|
9623
|
+
name: "ErrorContent",
|
|
9624
|
+
class: "e136jgy8",
|
|
9625
|
+
propsAsIs: false
|
|
9626
|
+
});
|
|
9627
|
+
const WidgetErrorContent = (props) => {
|
|
9628
|
+
const {
|
|
9629
|
+
refetch,
|
|
9630
|
+
errorText,
|
|
9631
|
+
hiddenRetry
|
|
9632
|
+
} = props;
|
|
9633
|
+
const kit = React.useContext(eagle.kitContext);
|
|
9634
|
+
const {
|
|
9635
|
+
t
|
|
9636
|
+
} = useTranslation();
|
|
9637
|
+
return /* @__PURE__ */ jsxRuntime.exports.jsx(ErrorWrapper, {
|
|
9638
|
+
className: props.className,
|
|
9639
|
+
style: props.style,
|
|
9640
|
+
children: /* @__PURE__ */ jsxRuntime.exports.jsxs(ErrorContent, {
|
|
9641
|
+
children: [/* @__PURE__ */ jsxRuntime.exports.jsx("p", {
|
|
9642
|
+
className: cx_default(eagle.Typo.Label.l1_regular_title, "title"),
|
|
9643
|
+
children: errorText || t("dovetail.obtain_data_error")
|
|
9644
|
+
}), hiddenRetry ? null : /* @__PURE__ */ jsxRuntime.exports.jsx(kit.button, {
|
|
9645
|
+
size: "small",
|
|
9646
|
+
type: "ordinary",
|
|
9647
|
+
onClick: (e) => {
|
|
9648
|
+
e.stopPropagation();
|
|
9649
|
+
refetch == null ? void 0 : refetch();
|
|
9650
|
+
},
|
|
9651
|
+
children: t("dovetail.retry")
|
|
9652
|
+
})]
|
|
9653
|
+
})
|
|
9654
|
+
});
|
|
9655
|
+
};
|
|
9866
9656
|
const index_12sfrn = "";
|
|
9867
9657
|
const Style = "s1bsn3us";
|
|
9868
9658
|
const Separator = () => {
|
|
@@ -9904,8 +9694,8 @@ var __publicField = (obj, key, value) => {
|
|
|
9904
9694
|
(_b = (_a = editorInstance.current) == null ? void 0 : _a.getModel()) == null ? void 0 : _b.setValue(value2);
|
|
9905
9695
|
},
|
|
9906
9696
|
getEditorValue: () => {
|
|
9907
|
-
var _a;
|
|
9908
|
-
return ((_a = editorInstance.current) == null ? void 0 : _a.getValue())
|
|
9697
|
+
var _a, _b;
|
|
9698
|
+
return (_b = (_a = editorInstance.current) == null ? void 0 : _a.getValue()) != null ? _b : "";
|
|
9909
9699
|
},
|
|
9910
9700
|
getEditorInstance: () => editorInstance.current || null
|
|
9911
9701
|
};
|
|
@@ -10110,17 +9900,183 @@ var __publicField = (obj, key, value) => {
|
|
|
10110
9900
|
)
|
|
10111
9901
|
]
|
|
10112
9902
|
}
|
|
10113
|
-
);
|
|
9903
|
+
);
|
|
9904
|
+
}
|
|
9905
|
+
);
|
|
9906
|
+
function copyToClipboard(text) {
|
|
9907
|
+
const input = document.createElement("textarea");
|
|
9908
|
+
input.value = text;
|
|
9909
|
+
document.body.appendChild(input);
|
|
9910
|
+
input.select();
|
|
9911
|
+
document.execCommand("copy");
|
|
9912
|
+
document.body.removeChild(input);
|
|
9913
|
+
}
|
|
9914
|
+
const BASE_INIT_VALUE = {
|
|
9915
|
+
metadata: {
|
|
9916
|
+
name: "",
|
|
9917
|
+
namespace: "default",
|
|
9918
|
+
annotations: {},
|
|
9919
|
+
labels: {}
|
|
9920
|
+
}
|
|
9921
|
+
};
|
|
9922
|
+
const DEFAULT_MATCH_LABEL = "sks.user.kubesmart.smtx.io/app";
|
|
9923
|
+
const BASE_CONTAINER_INIT_VALUE = {
|
|
9924
|
+
name: "container-0",
|
|
9925
|
+
imagePullPolicy: "Always",
|
|
9926
|
+
image: ""
|
|
9927
|
+
};
|
|
9928
|
+
const BASE_WORKLOAD_SPEC_INIT_VALUE = {
|
|
9929
|
+
affinity: {},
|
|
9930
|
+
imagePullSecrets: [],
|
|
9931
|
+
initContainers: [],
|
|
9932
|
+
volumes: []
|
|
9933
|
+
};
|
|
9934
|
+
const DEPLOYMENT_INIT_VALUE = {
|
|
9935
|
+
apiVersion: "apps/v1",
|
|
9936
|
+
kind: "Deployment",
|
|
9937
|
+
...BASE_INIT_VALUE,
|
|
9938
|
+
spec: {
|
|
9939
|
+
replicas: 1,
|
|
9940
|
+
selector: {
|
|
9941
|
+
matchLabels: {
|
|
9942
|
+
[DEFAULT_MATCH_LABEL]: ""
|
|
9943
|
+
}
|
|
9944
|
+
},
|
|
9945
|
+
template: {
|
|
9946
|
+
metadata: {
|
|
9947
|
+
labels: {
|
|
9948
|
+
[DEFAULT_MATCH_LABEL]: ""
|
|
9949
|
+
}
|
|
9950
|
+
},
|
|
9951
|
+
spec: {
|
|
9952
|
+
containers: [BASE_CONTAINER_INIT_VALUE],
|
|
9953
|
+
restartPolicy: "Always",
|
|
9954
|
+
...BASE_WORKLOAD_SPEC_INIT_VALUE
|
|
9955
|
+
}
|
|
9956
|
+
}
|
|
9957
|
+
}
|
|
9958
|
+
};
|
|
9959
|
+
const CRONJOB_INIT_VALUE = {
|
|
9960
|
+
apiVersion: "batch/v1",
|
|
9961
|
+
kind: "CronJob",
|
|
9962
|
+
...BASE_INIT_VALUE,
|
|
9963
|
+
spec: {
|
|
9964
|
+
schedule: "",
|
|
9965
|
+
jobTemplate: {
|
|
9966
|
+
metadata: {
|
|
9967
|
+
labels: {}
|
|
9968
|
+
},
|
|
9969
|
+
spec: {
|
|
9970
|
+
template: {
|
|
9971
|
+
spec: {
|
|
9972
|
+
containers: [BASE_CONTAINER_INIT_VALUE],
|
|
9973
|
+
restartPolicy: "Never",
|
|
9974
|
+
...BASE_WORKLOAD_SPEC_INIT_VALUE
|
|
9975
|
+
}
|
|
9976
|
+
}
|
|
9977
|
+
}
|
|
9978
|
+
}
|
|
9979
|
+
}
|
|
9980
|
+
};
|
|
9981
|
+
const DAEMONSET_INIT_VALUE = {
|
|
9982
|
+
apiVersion: "apps/v1",
|
|
9983
|
+
kind: "DaemonSet",
|
|
9984
|
+
...BASE_INIT_VALUE,
|
|
9985
|
+
spec: {
|
|
9986
|
+
replicas: 1,
|
|
9987
|
+
selector: {
|
|
9988
|
+
matchLabels: {
|
|
9989
|
+
[DEFAULT_MATCH_LABEL]: ""
|
|
9990
|
+
}
|
|
9991
|
+
},
|
|
9992
|
+
template: {
|
|
9993
|
+
metadata: {
|
|
9994
|
+
labels: {
|
|
9995
|
+
[DEFAULT_MATCH_LABEL]: ""
|
|
9996
|
+
}
|
|
9997
|
+
},
|
|
9998
|
+
spec: {
|
|
9999
|
+
containers: [BASE_CONTAINER_INIT_VALUE],
|
|
10000
|
+
restartPolicy: "Always",
|
|
10001
|
+
...BASE_WORKLOAD_SPEC_INIT_VALUE
|
|
10002
|
+
}
|
|
10003
|
+
}
|
|
10004
|
+
}
|
|
10005
|
+
};
|
|
10006
|
+
const JOB_INIT_VALUE = {
|
|
10007
|
+
apiVersion: "batch/v1",
|
|
10008
|
+
kind: "Job",
|
|
10009
|
+
...BASE_INIT_VALUE,
|
|
10010
|
+
spec: {
|
|
10011
|
+
replicas: 1,
|
|
10012
|
+
selector: {
|
|
10013
|
+
matchLabels: {}
|
|
10014
|
+
},
|
|
10015
|
+
template: {
|
|
10016
|
+
metadata: {
|
|
10017
|
+
labels: {}
|
|
10018
|
+
},
|
|
10019
|
+
spec: {
|
|
10020
|
+
containers: [BASE_CONTAINER_INIT_VALUE],
|
|
10021
|
+
restartPolicy: "Never",
|
|
10022
|
+
...BASE_WORKLOAD_SPEC_INIT_VALUE
|
|
10023
|
+
}
|
|
10024
|
+
}
|
|
10025
|
+
}
|
|
10026
|
+
};
|
|
10027
|
+
const STATEFULSET_INIT_VALUE = {
|
|
10028
|
+
apiVersion: "apps/v1",
|
|
10029
|
+
kind: "StatefulSet",
|
|
10030
|
+
...BASE_INIT_VALUE,
|
|
10031
|
+
spec: {
|
|
10032
|
+
replicas: 1,
|
|
10033
|
+
selector: {
|
|
10034
|
+
matchLabels: {
|
|
10035
|
+
[DEFAULT_MATCH_LABEL]: ""
|
|
10036
|
+
}
|
|
10037
|
+
},
|
|
10038
|
+
template: {
|
|
10039
|
+
metadata: {
|
|
10040
|
+
labels: {
|
|
10041
|
+
[DEFAULT_MATCH_LABEL]: ""
|
|
10042
|
+
}
|
|
10043
|
+
},
|
|
10044
|
+
spec: {
|
|
10045
|
+
containers: [BASE_CONTAINER_INIT_VALUE],
|
|
10046
|
+
restartPolicy: "Always",
|
|
10047
|
+
...BASE_WORKLOAD_SPEC_INIT_VALUE
|
|
10048
|
+
}
|
|
10049
|
+
}
|
|
10114
10050
|
}
|
|
10115
|
-
|
|
10116
|
-
|
|
10117
|
-
|
|
10118
|
-
|
|
10119
|
-
|
|
10120
|
-
|
|
10121
|
-
|
|
10122
|
-
|
|
10123
|
-
}
|
|
10051
|
+
};
|
|
10052
|
+
const POD_INIT_VALUE = {
|
|
10053
|
+
apiVersion: "v1",
|
|
10054
|
+
kind: "Pod",
|
|
10055
|
+
...BASE_INIT_VALUE,
|
|
10056
|
+
spec: {
|
|
10057
|
+
containers: [BASE_CONTAINER_INIT_VALUE]
|
|
10058
|
+
}
|
|
10059
|
+
};
|
|
10060
|
+
const SERVICE_INIT_VALUE = {
|
|
10061
|
+
"apiVersion": "v1",
|
|
10062
|
+
"kind": "Service",
|
|
10063
|
+
...BASE_INIT_VALUE,
|
|
10064
|
+
"spec": {
|
|
10065
|
+
"selector": {},
|
|
10066
|
+
"clusterIP": null,
|
|
10067
|
+
"ports": [
|
|
10068
|
+
{
|
|
10069
|
+
"name": "",
|
|
10070
|
+
"port": null,
|
|
10071
|
+
"protocol": "TCP",
|
|
10072
|
+
"targetPort": null
|
|
10073
|
+
}
|
|
10074
|
+
],
|
|
10075
|
+
"sessionAffinity": "None",
|
|
10076
|
+
"type": "ClusterIP"
|
|
10077
|
+
}
|
|
10078
|
+
};
|
|
10079
|
+
const TIMESTAMP_LABEL = "sks.user.kubesmart.smtx.io/timestamp";
|
|
10124
10080
|
function getCommonErrors(response, i18n2) {
|
|
10125
10081
|
var _a;
|
|
10126
10082
|
if (!((response == null ? void 0 : response.message) || (response == null ? void 0 : response.code) || (response == null ? void 0 : response.reason) || (response == null ? void 0 : response.details) || (response == null ? void 0 : response.graphQLErrors))) {
|
|
@@ -10168,17 +10124,33 @@ var __publicField = (obj, key, value) => {
|
|
|
10168
10124
|
)
|
|
10169
10125
|
];
|
|
10170
10126
|
}
|
|
10171
|
-
const
|
|
10172
|
-
const
|
|
10127
|
+
const index_1mpguu8 = "";
|
|
10128
|
+
const FormStyle = "f5ks0bl";
|
|
10129
|
+
const EditorStyle = "e1tqaxpu";
|
|
10130
|
+
var SchemaStrategy = /* @__PURE__ */ ((SchemaStrategy2) => {
|
|
10131
|
+
SchemaStrategy2["Required"] = "Required";
|
|
10132
|
+
SchemaStrategy2["Optional"] = "Optional";
|
|
10133
|
+
SchemaStrategy2["None"] = "None";
|
|
10134
|
+
return SchemaStrategy2;
|
|
10135
|
+
})(SchemaStrategy || {});
|
|
10173
10136
|
function YamlForm(props) {
|
|
10174
10137
|
var _a, _b;
|
|
10138
|
+
const {
|
|
10139
|
+
schemaStrategy = "Optional"
|
|
10140
|
+
} = props;
|
|
10175
10141
|
const {
|
|
10176
10142
|
formProps,
|
|
10177
10143
|
saveButtonProps,
|
|
10178
10144
|
editorProps,
|
|
10179
10145
|
errorResponseBody,
|
|
10180
|
-
mutationResult
|
|
10181
|
-
|
|
10146
|
+
mutationResult,
|
|
10147
|
+
isLoadingSchema,
|
|
10148
|
+
fetchSchema
|
|
10149
|
+
} = useEagleForm({
|
|
10150
|
+
editorOptions: {
|
|
10151
|
+
isSkipSchema: schemaStrategy === "None"
|
|
10152
|
+
}
|
|
10153
|
+
});
|
|
10182
10154
|
const kit = eagle.useUIKit();
|
|
10183
10155
|
const {
|
|
10184
10156
|
t,
|
|
@@ -10190,38 +10162,47 @@ var __publicField = (obj, key, value) => {
|
|
|
10190
10162
|
...formProps,
|
|
10191
10163
|
initialValues: (_b = (_a = formProps.initialValues) != null ? _a : props.initialValues) != null ? _b : BASE_INIT_VALUE,
|
|
10192
10164
|
layout: "horizontal",
|
|
10193
|
-
|
|
10194
|
-
|
|
10195
|
-
|
|
10196
|
-
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
|
|
10200
|
-
className: EditorStyle,
|
|
10201
|
-
schema: editorProps.schema,
|
|
10202
|
-
collapsable: false
|
|
10203
|
-
})
|
|
10204
|
-
}), /* @__PURE__ */ jsxRuntime.exports.jsxs(kit.form.Item, {
|
|
10205
|
-
children: [mutationResult.error && /* @__PURE__ */ jsxRuntime.exports.jsx(kit.alert, {
|
|
10206
|
-
message: errorResponseBody ? /* @__PURE__ */ jsxRuntime.exports.jsx("ul", {
|
|
10207
|
-
children: responseErrors.map((error, index) => /* @__PURE__ */ jsxRuntime.exports.jsxs("li", {
|
|
10208
|
-
children: [responseErrors.length > 1 ? index + 1 + ". " : "", error]
|
|
10209
|
-
}, error))
|
|
10210
|
-
}) : mutationResult.error.message,
|
|
10211
|
-
type: "error",
|
|
10212
|
-
style: {
|
|
10213
|
-
marginTop: 16
|
|
10214
|
-
}
|
|
10215
|
-
}), /* @__PURE__ */ jsxRuntime.exports.jsx(kit.button, {
|
|
10216
|
-
...saveButtonProps,
|
|
10217
|
-
type: "primary",
|
|
10165
|
+
className: FormStyle,
|
|
10166
|
+
children: (() => {
|
|
10167
|
+
if (isLoadingSchema) {
|
|
10168
|
+
return /* @__PURE__ */ jsxRuntime.exports.jsx(kit.loading, {});
|
|
10169
|
+
}
|
|
10170
|
+
return editorProps.schema || schemaStrategy !== "Required" ? /* @__PURE__ */ jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment, {
|
|
10171
|
+
children: [/* @__PURE__ */ jsxRuntime.exports.jsx(kit.form.Item, {
|
|
10218
10172
|
style: {
|
|
10219
|
-
|
|
10173
|
+
flex: 1
|
|
10220
10174
|
},
|
|
10221
|
-
children:
|
|
10175
|
+
children: /* @__PURE__ */ jsxRuntime.exports.jsx(YamlEditorComponent, {
|
|
10176
|
+
...editorProps,
|
|
10177
|
+
className: EditorStyle,
|
|
10178
|
+
schema: editorProps.schema || {},
|
|
10179
|
+
collapsable: false
|
|
10180
|
+
})
|
|
10181
|
+
}), /* @__PURE__ */ jsxRuntime.exports.jsxs(kit.form.Item, {
|
|
10182
|
+
children: [mutationResult.error && /* @__PURE__ */ jsxRuntime.exports.jsx(kit.alert, {
|
|
10183
|
+
message: errorResponseBody ? /* @__PURE__ */ jsxRuntime.exports.jsx("ul", {
|
|
10184
|
+
children: responseErrors.map((error, index) => /* @__PURE__ */ jsxRuntime.exports.jsxs("li", {
|
|
10185
|
+
children: [responseErrors.length > 1 ? index + 1 + ". " : "", error]
|
|
10186
|
+
}, error))
|
|
10187
|
+
}) : mutationResult.error.message,
|
|
10188
|
+
type: "error",
|
|
10189
|
+
style: {
|
|
10190
|
+
marginTop: 16
|
|
10191
|
+
}
|
|
10192
|
+
}), /* @__PURE__ */ jsxRuntime.exports.jsx(kit.button, {
|
|
10193
|
+
...saveButtonProps,
|
|
10194
|
+
type: "primary",
|
|
10195
|
+
style: {
|
|
10196
|
+
marginTop: 16
|
|
10197
|
+
},
|
|
10198
|
+
children: t("dovetail.save")
|
|
10199
|
+
})]
|
|
10222
10200
|
})]
|
|
10223
|
-
})
|
|
10224
|
-
|
|
10201
|
+
}) : /* @__PURE__ */ jsxRuntime.exports.jsx(WidgetErrorContent, {
|
|
10202
|
+
errorText: t("dovetail.fetch_schema_fail"),
|
|
10203
|
+
refetch: fetchSchema
|
|
10204
|
+
});
|
|
10205
|
+
})()
|
|
10225
10206
|
})
|
|
10226
10207
|
});
|
|
10227
10208
|
}
|
|
@@ -10244,13 +10225,12 @@ var __publicField = (obj, key, value) => {
|
|
|
10244
10225
|
const { i18n: i18n2 } = useTranslation();
|
|
10245
10226
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment, { children: configs.map((config) => {
|
|
10246
10227
|
var _a, _b;
|
|
10247
|
-
const formatter = config.formatter || ((v) => new ResourceModel(v));
|
|
10248
10228
|
return /* @__PURE__ */ jsxRuntime.exports.jsxs(React__default.default.Fragment, { children: [
|
|
10249
10229
|
/* @__PURE__ */ jsxRuntime.exports.jsx(reactRouterDom.Route, { path: `${urlPrefix}/${config.name}`, exact: true, children: /* @__PURE__ */ jsxRuntime.exports.jsx(
|
|
10250
10230
|
ResourceList,
|
|
10251
10231
|
{
|
|
10252
10232
|
name: config.kind,
|
|
10253
|
-
formatter,
|
|
10233
|
+
formatter: config.formatter,
|
|
10254
10234
|
columns: ((_a = config.columns) == null ? void 0 : _a.call(config, i18n2)) || [],
|
|
10255
10235
|
Dropdown: config.Dropdown
|
|
10256
10236
|
}
|
|
@@ -10258,7 +10238,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10258
10238
|
/* @__PURE__ */ jsxRuntime.exports.jsx(reactRouterDom.Route, { path: `${urlPrefix}/${config.name}/show`, children: /* @__PURE__ */ jsxRuntime.exports.jsx(
|
|
10259
10239
|
ResourceShow,
|
|
10260
10240
|
{
|
|
10261
|
-
formatter,
|
|
10241
|
+
formatter: config.formatter,
|
|
10262
10242
|
filedGroups: ((_b = config.showFields) == null ? void 0 : _b.call(config, i18n2)) || [],
|
|
10263
10243
|
Dropdown: config.Dropdown
|
|
10264
10244
|
}
|
|
@@ -10269,19 +10249,19 @@ var __publicField = (obj, key, value) => {
|
|
|
10269
10249
|
}) });
|
|
10270
10250
|
};
|
|
10271
10251
|
function CronJobDropdown(props) {
|
|
10272
|
-
var _a;
|
|
10273
10252
|
const { data: data2 } = props;
|
|
10253
|
+
const { spec } = data2;
|
|
10274
10254
|
const kit = eagle.useUIKit();
|
|
10275
10255
|
const { resource } = core.useResource();
|
|
10276
10256
|
const { mutate } = core.useUpdate();
|
|
10277
10257
|
const { t } = useTranslation();
|
|
10278
|
-
const suspended = Boolean(
|
|
10258
|
+
const suspended = Boolean(spec == null ? void 0 : spec.suspend);
|
|
10279
10259
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(K8sDropdown, { data: data2, children: /* @__PURE__ */ jsxRuntime.exports.jsx(
|
|
10280
10260
|
kit.menu.Item,
|
|
10281
10261
|
{
|
|
10282
10262
|
onClick: () => {
|
|
10283
10263
|
const v = suspended ? data2.resume() : data2.suspend();
|
|
10284
|
-
const id =
|
|
10264
|
+
const id = data2.id;
|
|
10285
10265
|
pruneBeforeEdit(v);
|
|
10286
10266
|
mutate({
|
|
10287
10267
|
id,
|
|
@@ -10293,6 +10273,40 @@ var __publicField = (obj, key, value) => {
|
|
|
10293
10273
|
}
|
|
10294
10274
|
) });
|
|
10295
10275
|
}
|
|
10276
|
+
const UNITS = ["", "K", "M", "G", "T", "P"];
|
|
10277
|
+
const FRACTIONAL = ["", "m", "u", "n", "p", "f"];
|
|
10278
|
+
function parseSi(inValue, increment = null, allowFractional = true) {
|
|
10279
|
+
if (!inValue || typeof inValue !== "string" || !inValue.length) {
|
|
10280
|
+
return NaN;
|
|
10281
|
+
}
|
|
10282
|
+
inValue = inValue.replace(/,/g, "");
|
|
10283
|
+
let [, valStr, unit, incStr] = inValue.match(/^([0-9.-]+)\s*([^0-9.-]?)([^0-9.-]?)/) || [];
|
|
10284
|
+
const val = parseFloat(valStr);
|
|
10285
|
+
if (!unit) {
|
|
10286
|
+
return val;
|
|
10287
|
+
}
|
|
10288
|
+
if (unit.charCodeAt(0) === 181) {
|
|
10289
|
+
unit = "u";
|
|
10290
|
+
}
|
|
10291
|
+
const divide = FRACTIONAL.includes(unit);
|
|
10292
|
+
const multiply = UNITS.includes(unit.toUpperCase());
|
|
10293
|
+
if (increment === null) {
|
|
10294
|
+
if ((multiply || divide) && incStr === "i") {
|
|
10295
|
+
increment = 1024;
|
|
10296
|
+
} else {
|
|
10297
|
+
increment = 1e3;
|
|
10298
|
+
}
|
|
10299
|
+
}
|
|
10300
|
+
if (divide && allowFractional) {
|
|
10301
|
+
const exp = FRACTIONAL.indexOf(unit);
|
|
10302
|
+
return val / Math.pow(increment, exp);
|
|
10303
|
+
}
|
|
10304
|
+
if (multiply) {
|
|
10305
|
+
const exp = UNITS.indexOf(unit.toUpperCase());
|
|
10306
|
+
return val * Math.pow(increment, exp);
|
|
10307
|
+
}
|
|
10308
|
+
return val;
|
|
10309
|
+
}
|
|
10296
10310
|
const index_1wzdp7m = "";
|
|
10297
10311
|
const WrapperStyle = "wfg6u6g";
|
|
10298
10312
|
const InnerBar = ({
|
|
@@ -10365,7 +10379,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10365
10379
|
(resource == null ? void 0 : resource.name) || ""
|
|
10366
10380
|
);
|
|
10367
10381
|
return /* @__PURE__ */ jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment, { children: [
|
|
10368
|
-
/* @__PURE__ */ jsxRuntime.exports.jsx(kit.button, { type: "primary", danger: true, onClick: () => openDeleteConfirmModal(id || ""), children: t("delete") }),
|
|
10382
|
+
/* @__PURE__ */ jsxRuntime.exports.jsx(kit.button, { type: "primary", danger: true, onClick: () => openDeleteConfirmModal(id || ""), children: t("dovetail.delete") }),
|
|
10369
10383
|
visible ? /* @__PURE__ */ jsxRuntime.exports.jsx(kit.modal, { ...modalProps }) : null
|
|
10370
10384
|
] });
|
|
10371
10385
|
};
|
|
@@ -15977,7 +15991,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15977
15991
|
var _a, _b, _c, _d, _e;
|
|
15978
15992
|
const kit = eagle.useUIKit();
|
|
15979
15993
|
const [selectedContainer, setSelectedContainer] = React.useState(((_b = (_a = pod.spec) == null ? void 0 : _a.containers[0]) == null ? void 0 : _b.name) || "");
|
|
15980
|
-
const
|
|
15994
|
+
const follow = true;
|
|
15981
15995
|
const [logs, setLogs] = React.useState([]);
|
|
15982
15996
|
const [currentItemCount, setCurrentItemCount] = React.useState(0);
|
|
15983
15997
|
const [paused, setPaused] = React.useState(false);
|
|
@@ -16025,7 +16039,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16025
16039
|
signal
|
|
16026
16040
|
} = abortControllerRef.current;
|
|
16027
16041
|
let url = `${apiUrl}/api/v1/namespaces/${(_a2 = pod.metadata) == null ? void 0 : _a2.namespace}/pods/${(_b2 = pod.metadata) == null ? void 0 : _b2.name}/log?container=${selectedContainer}&tailLines=100×tamps=true`;
|
|
16028
|
-
|
|
16042
|
+
{
|
|
16029
16043
|
url += "&follow=true";
|
|
16030
16044
|
}
|
|
16031
16045
|
fetch(url, {
|
|
@@ -16095,7 +16109,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16095
16109
|
children: [/* @__PURE__ */ jsxRuntime.exports.jsx(kit.option, {
|
|
16096
16110
|
value: "",
|
|
16097
16111
|
disabled: true,
|
|
16098
|
-
children: t("select_container")
|
|
16112
|
+
children: t("dovetail.select_container")
|
|
16099
16113
|
}), (((_e = pod.spec) == null ? void 0 : _e.containers) || []).map((container2) => /* @__PURE__ */ jsxRuntime.exports.jsx(kit.option, {
|
|
16100
16114
|
value: container2.name,
|
|
16101
16115
|
children: container2.name
|
|
@@ -16103,11 +16117,11 @@ var __publicField = (obj, key, value) => {
|
|
|
16103
16117
|
}), /* @__PURE__ */ jsxRuntime.exports.jsx(kit.checkbox, {
|
|
16104
16118
|
checked: wrap2,
|
|
16105
16119
|
onChange: (e) => setWrap(e.target.checked),
|
|
16106
|
-
children: t("wrap")
|
|
16120
|
+
children: t("dovetail.wrap")
|
|
16107
16121
|
}), /* @__PURE__ */ jsxRuntime.exports.jsx(kit.button, {
|
|
16108
16122
|
onClick: () => setPaused((prev) => !prev),
|
|
16109
16123
|
prefixIcon: paused ? /* @__PURE__ */ jsxRuntime.exports.jsx(iconsReact.Resume24Icon, {}) : /* @__PURE__ */ jsxRuntime.exports.jsx(iconsReact.SuspendedPause24GradientOrangeIcon, {}),
|
|
16110
|
-
children: paused ? t("resume_log") : t("suspend")
|
|
16124
|
+
children: paused ? t("dovetail.resume_log") : t("dovetail.suspend")
|
|
16111
16125
|
})]
|
|
16112
16126
|
}), /* @__PURE__ */ jsxRuntime.exports.jsx(LogViewer, {
|
|
16113
16127
|
innerRef: logViewerRef,
|
|
@@ -16122,7 +16136,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16122
16136
|
borderRadius: 0
|
|
16123
16137
|
},
|
|
16124
16138
|
onClick: () => setPaused(false),
|
|
16125
|
-
children: [t("resume_log"), linesBehind === 0 ? null : t("log_new_lines", {
|
|
16139
|
+
children: [t("dovetail.resume_log"), linesBehind === 0 ? null : t("dovetail.log_new_lines", {
|
|
16126
16140
|
count: linesBehind
|
|
16127
16141
|
})]
|
|
16128
16142
|
}),
|
|
@@ -16130,176 +16144,6 @@ var __publicField = (obj, key, value) => {
|
|
|
16130
16144
|
})]
|
|
16131
16145
|
});
|
|
16132
16146
|
};
|
|
16133
|
-
const copy$1 = "Copy";
|
|
16134
|
-
const reset_arguments$1 = "Reset";
|
|
16135
|
-
const view_changes$1 = "Show Diff";
|
|
16136
|
-
const back_to_edit$1 = "Edit";
|
|
16137
|
-
const configure_file$1 = "Configuration";
|
|
16138
|
-
const yaml_format_wrong$1 = "Configuration is in an invalid YAML format.";
|
|
16139
|
-
const yaml_value_wrong$1 = "Configuration has invalid values.";
|
|
16140
|
-
const edit_yaml$1 = "Edit YAML";
|
|
16141
|
-
const copied$1 = "Copied";
|
|
16142
|
-
const already_reset$1 = "Already reset";
|
|
16143
|
-
const dovetail$1 = {
|
|
16144
|
-
copy: copy$1,
|
|
16145
|
-
reset_arguments: reset_arguments$1,
|
|
16146
|
-
view_changes: view_changes$1,
|
|
16147
|
-
back_to_edit: back_to_edit$1,
|
|
16148
|
-
configure_file: configure_file$1,
|
|
16149
|
-
yaml_format_wrong: yaml_format_wrong$1,
|
|
16150
|
-
yaml_value_wrong: yaml_value_wrong$1,
|
|
16151
|
-
edit_yaml: edit_yaml$1,
|
|
16152
|
-
copied: copied$1,
|
|
16153
|
-
already_reset: already_reset$1
|
|
16154
|
-
};
|
|
16155
|
-
const EN = {
|
|
16156
|
-
dovetail: dovetail$1
|
|
16157
|
-
};
|
|
16158
|
-
const copy = "\u590D\u5236";
|
|
16159
|
-
const reset_arguments = "\u91CD\u7F6E";
|
|
16160
|
-
const view_changes = "\u67E5\u770B\u6539\u52A8";
|
|
16161
|
-
const back_to_edit = "\u7F16\u8F91";
|
|
16162
|
-
const configure_file = "\u914D\u7F6E\u5185\u5BB9";
|
|
16163
|
-
const yaml_format_wrong = "\u914D\u7F6E\u5185\u5BB9\u4E0D\u662F\u6709\u6548\u7684 yaml \u683C\u5F0F\u3002";
|
|
16164
|
-
const yaml_value_wrong = "\u914D\u7F6E\u5185\u5BB9\u4E2D\u5B58\u5728\u4E0D\u5408\u6CD5\u7684\u503C\u3002";
|
|
16165
|
-
const edit_yaml = "\u7F16\u8F91 YAML";
|
|
16166
|
-
const copied = "\u5DF2\u590D\u5236";
|
|
16167
|
-
const already_reset = "\u5DF2\u91CD\u7F6E";
|
|
16168
|
-
const cancel = "\u53D6\u6D88";
|
|
16169
|
-
const create = "\u521B\u5EFA";
|
|
16170
|
-
const confirm_delete_text = "\u786E\u5B9A\u8981\u5220\u9664 {{target}} \u5417\uFF1F";
|
|
16171
|
-
const edit = "\u7F16\u8F91";
|
|
16172
|
-
const namespace = "\u540D\u5B57\u7A7A\u95F4";
|
|
16173
|
-
const name = "\u540D\u5B57";
|
|
16174
|
-
const state = "\u72B6\u6001";
|
|
16175
|
-
const status = "\u72B6\u6001";
|
|
16176
|
-
const phase = "\u72B6\u6001";
|
|
16177
|
-
const image = "\u955C\u50CF";
|
|
16178
|
-
const replicas = "\u526F\u672C\u6570";
|
|
16179
|
-
const created_time = "\u521B\u5EFA\u65F6\u95F4";
|
|
16180
|
-
const label = "\u6807\u7B7E";
|
|
16181
|
-
const annotation = "\u6CE8\u91CA";
|
|
16182
|
-
const type = "\u7C7B\u578B";
|
|
16183
|
-
const event = "\u4E8B\u4EF6";
|
|
16184
|
-
const reason = "\u539F\u56E0";
|
|
16185
|
-
const object = "\u5BF9\u8C61";
|
|
16186
|
-
const note = "\u4E8B\u4EF6\u4FE1\u606F";
|
|
16187
|
-
const condition = "Condition";
|
|
16188
|
-
const download_yaml = "\u4E0B\u8F7D YAML";
|
|
16189
|
-
const detail = "\u8BE6\u60C5";
|
|
16190
|
-
const node_name = "\u4E3B\u673A\u540D\u79F0";
|
|
16191
|
-
const restarts = "\u91CD\u542F\u6B21\u6570";
|
|
16192
|
-
const updated_time = "\u66F4\u65B0\u65F6\u95F4";
|
|
16193
|
-
const message = "\u6D88\u606F";
|
|
16194
|
-
const save = "\u4FDD\u5B58";
|
|
16195
|
-
const more = "\u66F4\u591A";
|
|
16196
|
-
const workload = "\u5DE5\u4F5C\u8D1F\u8F7D";
|
|
16197
|
-
const all_namespaces = "\u6240\u6709\u540D\u5B57\u7A7A\u95F4";
|
|
16198
|
-
const empty = "\u65E0\u53EF\u663E\u793A\u7684\u6570\u636E";
|
|
16199
|
-
const schedule = "\u8C03\u5EA6";
|
|
16200
|
-
const lastScheduleTime = "\u4E0A\u6B21\u8C03\u5EA6";
|
|
16201
|
-
const duration = "\u6301\u7EED\u65F6\u95F4";
|
|
16202
|
-
const completions = "\u5B8C\u6210 Job \u5386\u53F2\u6570";
|
|
16203
|
-
const started = "\u5F00\u59CB\u65F6\u95F4";
|
|
16204
|
-
const ready = "\u5C31\u7EEA";
|
|
16205
|
-
const init_container = "\u521D\u59CB\u5316\u5BB9\u5668";
|
|
16206
|
-
const container = "\u5BB9\u5668";
|
|
16207
|
-
const redeploy = "\u91CD\u65B0\u90E8\u7F72";
|
|
16208
|
-
const data = "\u6570\u636E";
|
|
16209
|
-
const suspend = "\u6682\u505C";
|
|
16210
|
-
const resume = "\u91CD\u65B0\u5F00\u59CB";
|
|
16211
|
-
const cluster = "\u96C6\u7FA4";
|
|
16212
|
-
const storage = "\u5B58\u50A8";
|
|
16213
|
-
const network = "\u7F51\u7EDC";
|
|
16214
|
-
const clusterIp = "\u96C6\u7FA4 IP";
|
|
16215
|
-
const sessionAffinity = "\u4F1A\u8BDD\u4FDD\u6301";
|
|
16216
|
-
const log = "\u65E5\u5FD7";
|
|
16217
|
-
const select_container = "\u9009\u62E9\u5BB9\u5668";
|
|
16218
|
-
const wrap = "\u6298\u53E0";
|
|
16219
|
-
const resume_log = "\u7EE7\u7EED";
|
|
16220
|
-
const log_new_lines = "\uFF0C\u5E76\u5C55\u793A {{ count }} \u884C\u65B0\u65E5\u5FD7";
|
|
16221
|
-
const dovetail = {
|
|
16222
|
-
copy,
|
|
16223
|
-
reset_arguments,
|
|
16224
|
-
view_changes,
|
|
16225
|
-
back_to_edit,
|
|
16226
|
-
configure_file,
|
|
16227
|
-
yaml_format_wrong,
|
|
16228
|
-
yaml_value_wrong,
|
|
16229
|
-
edit_yaml,
|
|
16230
|
-
copied,
|
|
16231
|
-
already_reset,
|
|
16232
|
-
cancel,
|
|
16233
|
-
"delete": "\u5220\u9664",
|
|
16234
|
-
create,
|
|
16235
|
-
confirm_delete_text,
|
|
16236
|
-
edit,
|
|
16237
|
-
namespace,
|
|
16238
|
-
name,
|
|
16239
|
-
state,
|
|
16240
|
-
status,
|
|
16241
|
-
phase,
|
|
16242
|
-
image,
|
|
16243
|
-
replicas,
|
|
16244
|
-
created_time,
|
|
16245
|
-
label,
|
|
16246
|
-
annotation,
|
|
16247
|
-
type,
|
|
16248
|
-
event,
|
|
16249
|
-
reason,
|
|
16250
|
-
object,
|
|
16251
|
-
note,
|
|
16252
|
-
condition,
|
|
16253
|
-
download_yaml,
|
|
16254
|
-
detail,
|
|
16255
|
-
node_name,
|
|
16256
|
-
restarts,
|
|
16257
|
-
updated_time,
|
|
16258
|
-
message,
|
|
16259
|
-
save,
|
|
16260
|
-
more,
|
|
16261
|
-
workload,
|
|
16262
|
-
all_namespaces,
|
|
16263
|
-
empty,
|
|
16264
|
-
schedule,
|
|
16265
|
-
lastScheduleTime,
|
|
16266
|
-
duration,
|
|
16267
|
-
completions,
|
|
16268
|
-
started,
|
|
16269
|
-
ready,
|
|
16270
|
-
init_container,
|
|
16271
|
-
container,
|
|
16272
|
-
redeploy,
|
|
16273
|
-
data,
|
|
16274
|
-
suspend,
|
|
16275
|
-
resume,
|
|
16276
|
-
cluster,
|
|
16277
|
-
storage,
|
|
16278
|
-
network,
|
|
16279
|
-
clusterIp,
|
|
16280
|
-
sessionAffinity,
|
|
16281
|
-
log,
|
|
16282
|
-
select_container,
|
|
16283
|
-
wrap,
|
|
16284
|
-
resume_log,
|
|
16285
|
-
log_new_lines
|
|
16286
|
-
};
|
|
16287
|
-
const ZH = {
|
|
16288
|
-
dovetail
|
|
16289
|
-
};
|
|
16290
|
-
const resources = {
|
|
16291
|
-
"en-US": EN,
|
|
16292
|
-
"zh-CN": ZH
|
|
16293
|
-
};
|
|
16294
|
-
i18n__default.default.use(initReactI18next).init({
|
|
16295
|
-
supportedLngs: ["en-US", "zh-CN"],
|
|
16296
|
-
resources,
|
|
16297
|
-
ns: Object.keys(resources["zh-CN"]),
|
|
16298
|
-
defaultNS: "dovetail",
|
|
16299
|
-
fallbackLng: ["en-US", "zh-CN"],
|
|
16300
|
-
lng: "zh-CN",
|
|
16301
|
-
nsSeparator: "."
|
|
16302
|
-
});
|
|
16303
16147
|
const styles = "";
|
|
16304
16148
|
const antd = "";
|
|
16305
16149
|
const style = "";
|
|
@@ -16307,13 +16151,12 @@ var __publicField = (obj, key, value) => {
|
|
|
16307
16151
|
const {
|
|
16308
16152
|
resourcesConfig,
|
|
16309
16153
|
urlPrefix = "",
|
|
16310
|
-
useHashUrl,
|
|
16311
16154
|
Layout: Layout2,
|
|
16312
16155
|
history,
|
|
16313
16156
|
globalStoreParams
|
|
16314
16157
|
} = props;
|
|
16315
16158
|
const globalStore = React.useMemo(() => {
|
|
16316
|
-
return new k8sApiProvider.GlobalStore(globalStoreParams);
|
|
16159
|
+
return new k8sApiProvider.GlobalStore(globalStoreParams, k8sApiProvider.ProviderPlugins);
|
|
16317
16160
|
}, [globalStoreParams]);
|
|
16318
16161
|
const notCustomResources = React.useMemo(() => {
|
|
16319
16162
|
return resourcesConfig.filter((c) => !c.isCustom);
|
|
@@ -16419,7 +16262,6 @@ var __publicField = (obj, key, value) => {
|
|
|
16419
16262
|
exports2.ConditionsTable = ConditionsTable;
|
|
16420
16263
|
exports2.CreateButton = CreateButton;
|
|
16421
16264
|
exports2.CronJobDropdown = CronJobDropdown;
|
|
16422
|
-
exports2.CronJobModel = CronJobModel;
|
|
16423
16265
|
exports2.CronjobJobsTable = CronjobJobsTable;
|
|
16424
16266
|
exports2.DAEMONSET_INIT_VALUE = DAEMONSET_INIT_VALUE;
|
|
16425
16267
|
exports2.DEPLOYMENT_INIT_VALUE = DEPLOYMENT_INIT_VALUE;
|
|
@@ -16433,7 +16275,6 @@ var __publicField = (obj, key, value) => {
|
|
|
16433
16275
|
exports2.ImageField = ImageField;
|
|
16434
16276
|
exports2.ImageNames = ImageNames;
|
|
16435
16277
|
exports2.JOB_INIT_VALUE = JOB_INIT_VALUE;
|
|
16436
|
-
exports2.JobModel = JobModel;
|
|
16437
16278
|
exports2.JobsField = JobsField;
|
|
16438
16279
|
exports2.KeyValue = KeyValue;
|
|
16439
16280
|
exports2.KeyValueListWidget = KeyValueListWidget;
|
|
@@ -16453,8 +16294,6 @@ var __publicField = (obj, key, value) => {
|
|
|
16453
16294
|
exports2.PhaseColumnRenderer = PhaseColumnRenderer;
|
|
16454
16295
|
exports2.PodContainersTable = PodContainersTable;
|
|
16455
16296
|
exports2.PodLog = PodLog;
|
|
16456
|
-
exports2.PodMetricsModel = PodMetricsModel;
|
|
16457
|
-
exports2.PodModel = PodModel;
|
|
16458
16297
|
exports2.PodsField = PodsField;
|
|
16459
16298
|
exports2.RESOURCE_GROUP = RESOURCE_GROUP;
|
|
16460
16299
|
exports2.ReplicaField = ReplicaField;
|
|
@@ -16462,11 +16301,12 @@ var __publicField = (obj, key, value) => {
|
|
|
16462
16301
|
exports2.ResourceCRUD = ResourceCRUD;
|
|
16463
16302
|
exports2.ResourceForm = ResourceForm;
|
|
16464
16303
|
exports2.ResourceList = ResourceList;
|
|
16465
|
-
exports2.ResourceModel = ResourceModel;
|
|
16466
16304
|
exports2.ResourceShow = ResourceShow;
|
|
16467
16305
|
exports2.ResourceUsageBar = ResourceUsageBar;
|
|
16468
16306
|
exports2.RestartCountColumnRenderer = RestartCountColumnRenderer;
|
|
16307
|
+
exports2.SERVICE_INIT_VALUE = SERVICE_INIT_VALUE;
|
|
16469
16308
|
exports2.STATEFULSET_INIT_VALUE = STATEFULSET_INIT_VALUE;
|
|
16309
|
+
exports2.SchemaStrategy = SchemaStrategy;
|
|
16470
16310
|
exports2.SecretDataField = SecretDataField;
|
|
16471
16311
|
exports2.Separator = Separator;
|
|
16472
16312
|
exports2.ServicePodsField = ServicePodsField;
|
|
@@ -16480,9 +16320,9 @@ var __publicField = (obj, key, value) => {
|
|
|
16480
16320
|
exports2.Tags = Tags;
|
|
16481
16321
|
exports2.WorkloadDropdown = WorkloadDropdown;
|
|
16482
16322
|
exports2.WorkloadImageColumnRenderer = WorkloadImageColumnRenderer;
|
|
16483
|
-
exports2.WorkloadModel = WorkloadModel;
|
|
16484
16323
|
exports2.WorkloadPodsTable = WorkloadPodsTable;
|
|
16485
16324
|
exports2.WorkloadReplicas = WorkloadReplicas;
|
|
16325
|
+
exports2.WorkloadRestartsColumnRenderer = WorkloadRestartsColumnRenderer;
|
|
16486
16326
|
exports2.YamlEditorComponent = YamlEditorComponent;
|
|
16487
16327
|
exports2.dnsSubDomainRules = dnsSubDomainRules;
|
|
16488
16328
|
exports2.namespaceRules = namespaceRules;
|