@dovetail-v2/refine 0.0.55 → 0.0.57
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-9d8bb154.js → MonacoYamlDiffEditor-06894d28.js} +1 -1
- package/dist/{index-0789694e.js → index-ced408be.js} +103 -67
- package/dist/refine.js +1 -1
- package/dist/refine.umd.cjs +101 -65
- package/dist/style.css +6 -5
- package/lib/src/components/LinkFallback/index.d.ts +4 -0
- package/lib/src/components/ModalContextProvider/index.d.ts +12 -0
- package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.d.ts +2 -1
- package/lib/src/components/ShowContent/ShowContent.d.ts +3 -2
- package/lib/src/components/YamlForm/index.d.ts +4 -0
- package/lib/src/hooks/useEagleForm.d.ts +2 -1
- package/lib/src/hooks/useModal.d.ts +0 -0
- package/lib/src/hooks/useNamespaceFilter.d.ts +5 -0
- package/lib/src/model/cronjob-model.d.ts +9 -0
- package/lib/src/model/index.d.ts +6 -0
- package/lib/src/model/job-model.d.ts +10 -0
- package/lib/src/model/pod-metrics-model.d.ts +7 -0
- package/lib/src/model/pod-model.d.ts +15 -0
- package/lib/src/model/resource-model.d.ts +17 -0
- package/lib/src/model/workload-model.d.ts +17 -0
- package/lib/src/types/metric.d.ts +25 -0
- package/package.json +1 -1
- package/lib/src/App.js +0 -91
- package/lib/src/Dovetail.js +0 -45
- package/lib/src/components/Breadcrumb/index.js +0 -20
- package/lib/src/components/ConditionsTable/ConditionsTable.js +0 -56
- package/lib/src/components/ConditionsTable/index.js +0 -1
- package/lib/src/components/CreateButton/index.js +0 -10
- package/lib/src/components/CronJobDropdown/index.js +0 -26
- package/lib/src/components/CronjobJobsTable/index.js +0 -49
- package/lib/src/components/DeleteButton/index.js +0 -13
- package/lib/src/components/DeleteManyButton/index.js +0 -16
- package/lib/src/components/DrawerShow/DrawerShow.js +0 -13
- package/lib/src/components/DrawerShow/index.js +0 -1
- package/lib/src/components/EditButton/index.js +0 -13
- package/lib/src/components/EditField/index.js +0 -47
- package/lib/src/components/ErrorContent/index.js +0 -36
- package/lib/src/components/EventsTable/EventsTable.js +0 -59
- package/lib/src/components/EventsTable/index.js +0 -1
- package/lib/src/components/Form/KeyValueListWidget.js +0 -56
- package/lib/src/components/Form/MetadataForm.js +0 -9
- package/lib/src/components/Form/NameInputWidget.js +0 -50
- package/lib/src/components/Form/NamespaceSelectWidget.js +0 -21
- package/lib/src/components/Form/index.js +0 -4
- package/lib/src/components/Form/widget.js +0 -1
- package/lib/src/components/FormErrorAlert/index.js +0 -8
- package/lib/src/components/FormLayout/index.js +0 -21
- package/lib/src/components/FormModal/index.js +0 -51
- package/lib/src/components/ImageNames/index.js +0 -14
- package/lib/src/components/IngressRulesComponent/index.js +0 -11
- package/lib/src/components/IngressRulesTable/IngressRulesTable.js +0 -51
- package/lib/src/components/IngressRulesTable/index.js +0 -1
- package/lib/src/components/K8sDropdown/index.js +0 -31
- package/lib/src/components/KeyValue/KeyValue.js +0 -27
- package/lib/src/components/KeyValue/index.js +0 -1
- package/lib/src/components/KeyValueData/index.js +0 -50
- package/lib/src/components/Layout/index.js +0 -39
- package/lib/src/components/ListPage/index.js +0 -25
- package/lib/src/components/Menu/index.js +0 -36
- package/lib/src/components/NamespacesFilter/index.js +0 -34
- package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.js +0 -77
- package/lib/src/components/NetworkPolicyRulesTable/index.js +0 -1
- package/lib/src/components/PageShow/PageShow.js +0 -11
- package/lib/src/components/PageShow/index.js +0 -1
- package/lib/src/components/PodContainersTable/PodContainersTable.js +0 -78
- package/lib/src/components/PodContainersTable/index.js +0 -1
- package/lib/src/components/PodLog/index.js +0 -136
- package/lib/src/components/ReferenceLink/index.js +0 -17
- package/lib/src/components/RefineForm/RefineFormContent.d.ts +0 -10
- package/lib/src/components/RefineForm/RefineFormModal.d.ts +0 -8
- package/lib/src/components/RefineForm/RefineFormPage.d.ts +0 -7
- package/lib/src/components/RefineForm/index.d.ts +0 -3
- package/lib/src/components/RefineForm/type.d.ts +0 -20
- package/lib/src/components/RefineForm/useRefineForm.d.ts +0 -10
- package/lib/src/components/ResourceCRUD/ResourceCRUD.js +0 -15
- package/lib/src/components/ResourceCRUD/create/index.js +0 -13
- package/lib/src/components/ResourceCRUD/index.js +0 -4
- package/lib/src/components/ResourceCRUD/list/index.js +0 -19
- package/lib/src/components/ResourceCRUD/show/index.js +0 -6
- package/lib/src/components/ResourceLink/index.js +0 -21
- package/lib/src/components/ResourceUsageBar/index.js +0 -81
- package/lib/src/components/Separator/index.js +0 -11
- package/lib/src/components/ShowContent/ShowContent.js +0 -157
- package/lib/src/components/ShowContent/fields.js +0 -157
- package/lib/src/components/ShowContent/index.js +0 -2
- package/lib/src/components/StateTag/StateTag.js +0 -22
- package/lib/src/components/StateTag/index.js +0 -1
- package/lib/src/components/Table/ErrorContent.js +0 -36
- package/lib/src/components/Table/TableToolBar.js +0 -14
- package/lib/src/components/Table/TableWidgets.js +0 -28
- package/lib/src/components/Table/index.js +0 -69
- package/lib/src/components/Tags/index.js +0 -22
- package/lib/src/components/Time/index.js +0 -14
- package/lib/src/components/WorkloadDropdown/index.js +0 -24
- package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.js +0 -39
- package/lib/src/components/WorkloadPodsTable/index.js +0 -1
- package/lib/src/components/WorkloadReplicas/index.js +0 -50
- package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.js +0 -34
- package/lib/src/components/YamlEditor/MonacoYamlEditor.js +0 -149
- package/lib/src/components/YamlEditor/YamlEditorComponent.js +0 -90
- package/lib/src/components/YamlEditor/index.js +0 -1
- package/lib/src/components/YamlEditor/style.js +0 -102
- package/lib/src/components/YamlEditor/yaml.worker.js +0 -1
- package/lib/src/components/YamlForm/index.js +0 -61
- package/lib/src/components/index.js +0 -38
- package/lib/src/constants/index.js +0 -2
- package/lib/src/constants/k8s.js +0 -203
- package/lib/src/constants/state.js +0 -15
- package/lib/src/contexts/component.js +0 -3
- package/lib/src/contexts/configs.js +0 -3
- package/lib/src/contexts/global-store.js +0 -3
- package/lib/src/contexts/index.js +0 -3
- package/lib/src/hooks/index.js +0 -7
- package/lib/src/hooks/useDeleteModal/index.js +0 -1
- package/lib/src/hooks/useDeleteModal/useDeleteManyModal.js +0 -31
- package/lib/src/hooks/useDeleteModal/useDeleteModal.js +0 -38
- package/lib/src/hooks/useDownloadYAML.js +0 -10
- package/lib/src/hooks/useEagleForm.js +0 -177
- package/lib/src/hooks/useEagleTable/columns.js +0 -246
- package/lib/src/hooks/useEagleTable/index.js +0 -2
- package/lib/src/hooks/useEagleTable/useEagleTable.js +0 -63
- package/lib/src/hooks/useEdit.js +0 -19
- package/lib/src/hooks/useGlobalStore.js +0 -5
- package/lib/src/hooks/useK8sYamlEditor.js +0 -37
- package/lib/src/hooks/useOpenForm.js +0 -43
- package/lib/src/hooks/useSchema.js +0 -37
- package/lib/src/hooks/useSubmitForm.js +0 -42
- package/lib/src/i18n.js +0 -19
- package/lib/src/index.js +0 -13
- package/lib/src/locales/en-US/dovetail.json +0 -18
- package/lib/src/locales/en-US/index.js +0 -4
- package/lib/src/locales/index.js +0 -6
- package/lib/src/locales/zh-CN/dovetail.json +0 -91
- package/lib/src/locales/zh-CN/index.js +0 -4
- package/lib/src/main.js +0 -12
- package/lib/src/models/cronjob-model.js +0 -32
- package/lib/src/models/daemonset-model.js +0 -17
- package/lib/src/models/deployment-model.js +0 -17
- package/lib/src/models/event-model.js +0 -11
- package/lib/src/models/index.js +0 -14
- package/lib/src/models/ingress-model.js +0 -24
- package/lib/src/models/job-model.js +0 -56
- package/lib/src/models/network-policy-model.js +0 -10
- package/lib/src/models/pod-metrics-model.js +0 -34
- package/lib/src/models/pod-model.js +0 -78
- package/lib/src/models/resource-model.js +0 -34
- package/lib/src/models/server-instance-model.d.ts +0 -10
- package/lib/src/models/service-model.js +0 -17
- package/lib/src/models/statefulset-model.js +0 -17
- package/lib/src/models/types/index.js +0 -1
- package/lib/src/models/types/metric.js +0 -1
- package/lib/src/models/workload-base-model.js +0 -22
- package/lib/src/models/workload-model.js +0 -51
- package/lib/src/pages/configmaps/index.js +0 -15
- package/lib/src/pages/cronjobs/create/index.js +0 -6
- package/lib/src/pages/cronjobs/index.js +0 -3
- package/lib/src/pages/cronjobs/list/index.js +0 -42
- package/lib/src/pages/cronjobs/show/index.js +0 -16
- package/lib/src/pages/daemonsets/create/index.js +0 -6
- package/lib/src/pages/daemonsets/index.js +0 -3
- package/lib/src/pages/daemonsets/list/index.js +0 -32
- package/lib/src/pages/daemonsets/show/index.js +0 -16
- package/lib/src/pages/deployments/create/index.js +0 -7
- package/lib/src/pages/deployments/index.js +0 -3
- package/lib/src/pages/deployments/list/index.js +0 -26
- package/lib/src/pages/deployments/show/index.js +0 -16
- package/lib/src/pages/ingresses/index.js +0 -26
- package/lib/src/pages/jobs/index.js +0 -34
- package/lib/src/pages/networkPolicies/index.js +0 -67
- package/lib/src/pages/pods/create/index.js +0 -6
- package/lib/src/pages/pods/index.js +0 -3
- package/lib/src/pages/pods/list/index.js +0 -81
- package/lib/src/pages/pods/show/index.js +0 -54
- package/lib/src/pages/secrets/index.js +0 -15
- package/lib/src/pages/services/index.js +0 -26
- package/lib/src/pages/statefulsets/create/index.js +0 -6
- package/lib/src/pages/statefulsets/index.js +0 -3
- package/lib/src/pages/statefulsets/list/index.js +0 -26
- package/lib/src/pages/statefulsets/show/index.js +0 -16
- package/lib/src/plugins/index.js +0 -3
- package/lib/src/plugins/model-plugin.js +0 -46
- package/lib/src/plugins/relation-plugin.js +0 -81
- package/lib/src/plugins/type.js +0 -1
- package/lib/src/providers/index.js +0 -1
- package/lib/src/providers/router-provider/index.js +0 -100
- package/lib/src/types/index.js +0 -1
- package/lib/src/types/resource.js +0 -12
- package/lib/src/utils/addId.js +0 -8
- package/lib/src/utils/download.js +0 -9
- package/lib/src/utils/error.js +0 -53
- package/lib/src/utils/form.js +0 -9
- package/lib/src/utils/k8s.js +0 -6
- package/lib/src/utils/labels.js +0 -15
- package/lib/src/utils/match-selector.js +0 -12
- package/lib/src/utils/openapi.js +0 -33
- package/lib/src/utils/schema.js +0 -117
- package/lib/src/utils/selector.js +0 -12
- package/lib/src/utils/string.js +0 -6
- package/lib/src/utils/time.js +0 -46
- package/lib/src/utils/unit.js +0 -69
- package/lib/src/utils/yaml.js +0 -44
- package/lib/vite.config.js +0 -60
package/dist/refine.umd.cjs
CHANGED
|
@@ -1115,7 +1115,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1115
1115
|
const auto_wrap$1 = "Auto wrap";
|
|
1116
1116
|
const container_num$1 = "Containers";
|
|
1117
1117
|
const edit_resource_success$1 = "{{resource}} {{name}} was edited successfully";
|
|
1118
|
-
const redeploy_success_toast$1 = "{{kind}} was redeployed successfully";
|
|
1118
|
+
const redeploy_success_toast$1 = "{{kind}} {{name}} was redeployed successfully";
|
|
1119
1119
|
const redeploy_failed_toast$1 = "Failed to redeploy {{kind}} {{name}}";
|
|
1120
1120
|
const pause_success_toast$1 = "Successfully suspended";
|
|
1121
1121
|
const pause_failed_toast$1 = "Failed to suspend";
|
|
@@ -8605,7 +8605,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8605
8605
|
return o(prop);
|
|
8606
8606
|
}
|
|
8607
8607
|
}) : styled;
|
|
8608
|
-
const
|
|
8608
|
+
const index_cp12i5 = "";
|
|
8609
8609
|
const ErrorWrapper = /* @__PURE__ */ styled_default("div")({
|
|
8610
8610
|
name: "ErrorWrapper",
|
|
8611
8611
|
class: "egn3dbn",
|
|
@@ -8648,11 +8648,11 @@ var __publicField = (obj, key, value) => {
|
|
|
8648
8648
|
]: eagle.Typo.Display.d2_bold_title
|
|
8649
8649
|
};
|
|
8650
8650
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorWrapper, {
|
|
8651
|
-
className: props.className,
|
|
8651
|
+
className: cx_default(props.className, type2),
|
|
8652
8652
|
style: props.style,
|
|
8653
8653
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ErrorContent, {
|
|
8654
8654
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("p", {
|
|
8655
|
-
className: cx_default(fontMap[type2], "title"
|
|
8655
|
+
className: cx_default(fontMap[type2], "title"),
|
|
8656
8656
|
children: errorText || t2("dovetail.obtain_data_error")
|
|
8657
8657
|
}), !refetch ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
|
|
8658
8658
|
size: "small",
|
|
@@ -9474,7 +9474,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9474
9474
|
},
|
|
9475
9475
|
"type": "Opaque",
|
|
9476
9476
|
"data": {
|
|
9477
|
-
"key":
|
|
9477
|
+
"key": "value"
|
|
9478
9478
|
}
|
|
9479
9479
|
};
|
|
9480
9480
|
const SECRET_IMAGE_REPO_INIT_VALUE = {
|
|
@@ -9498,8 +9498,8 @@ var __publicField = (obj, key, value) => {
|
|
|
9498
9498
|
},
|
|
9499
9499
|
"type": "kubernetes.io/basic-auth",
|
|
9500
9500
|
"data": {
|
|
9501
|
-
"username":
|
|
9502
|
-
"password":
|
|
9501
|
+
"username": "example",
|
|
9502
|
+
"password": "example"
|
|
9503
9503
|
}
|
|
9504
9504
|
};
|
|
9505
9505
|
const SECRET_SSH_AUTH_INIT_VALUE = {
|
|
@@ -10048,7 +10048,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10048
10048
|
service,
|
|
10049
10049
|
breakLine = true
|
|
10050
10050
|
}) => {
|
|
10051
|
-
var _a, _b, _c, _d;
|
|
10051
|
+
var _a, _b, _c, _d, _e;
|
|
10052
10052
|
const {
|
|
10053
10053
|
i18n: i18n2
|
|
10054
10054
|
} = useTranslation();
|
|
@@ -10057,10 +10057,14 @@ var __publicField = (obj, key, value) => {
|
|
|
10057
10057
|
let content = "-";
|
|
10058
10058
|
switch (spec.type) {
|
|
10059
10059
|
case ServiceTypeEnum.NodePort:
|
|
10060
|
-
|
|
10060
|
+
if (!breakLine) {
|
|
10061
|
+
content = (_a = spec.ports) == null ? void 0 : _a.filter((v) => !!v).map((p) => `${i18n2.t("dovetail.any_node_ip")}:${p.nodePort}`).join(", ");
|
|
10062
|
+
break;
|
|
10063
|
+
}
|
|
10064
|
+
content = (_b = spec.ports) == null ? void 0 : _b.filter((v) => !!v).map((p) => /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.OverflowTooltip, {
|
|
10061
10065
|
content: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
|
|
10062
10066
|
className: cx_default(eagle.Typo.Label.l4_regular_title, BreakLineStyle),
|
|
10063
|
-
children: [i18n2.t("dovetail.any_node_ip"), ":", p.nodePort
|
|
10067
|
+
children: [i18n2.t("dovetail.any_node_ip"), ":", p.nodePort]
|
|
10064
10068
|
}),
|
|
10065
10069
|
tooltip: `${i18n2.t("dovetail.any_node_ip")}:${p.nodePort}`
|
|
10066
10070
|
}, p.nodePort));
|
|
@@ -10069,12 +10073,14 @@ var __publicField = (obj, key, value) => {
|
|
|
10069
10073
|
});
|
|
10070
10074
|
case ServiceTypeEnum.ExternalName:
|
|
10071
10075
|
content = /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
|
10072
|
-
|
|
10076
|
+
useOverflow: false,
|
|
10077
|
+
value: (_c = spec.externalIPs) == null ? void 0 : _c.join(breakLine ? "\n" : ", ")
|
|
10073
10078
|
});
|
|
10074
10079
|
break;
|
|
10075
10080
|
case ServiceTypeEnum.LoadBalancer:
|
|
10076
10081
|
content = /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
|
10077
|
-
|
|
10082
|
+
useOverflow: false,
|
|
10083
|
+
value: (_e = (_d = status.loadBalancer) == null ? void 0 : _d.ingress) == null ? void 0 : _e.map(({
|
|
10078
10084
|
ip
|
|
10079
10085
|
}) => ip).join(breakLine ? "\n" : ", ")
|
|
10080
10086
|
});
|
|
@@ -10084,6 +10090,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10084
10090
|
break;
|
|
10085
10091
|
default:
|
|
10086
10092
|
content = /* @__PURE__ */ jsxRuntimeExports.jsx(ValueDisplay, {
|
|
10093
|
+
useOverflow: false,
|
|
10087
10094
|
value: ""
|
|
10088
10095
|
});
|
|
10089
10096
|
break;
|
|
@@ -10907,8 +10914,25 @@ var __publicField = (obj, key, value) => {
|
|
|
10907
10914
|
}, `${image2}-${index}`)) : value2.join(", ")
|
|
10908
10915
|
});
|
|
10909
10916
|
};
|
|
10917
|
+
const index_1m8lip = "";
|
|
10918
|
+
const LinkStyle$1 = "lmmrm55";
|
|
10919
|
+
function LinkFallback({
|
|
10920
|
+
fullPath
|
|
10921
|
+
}) {
|
|
10922
|
+
if (fullPath.includes("http") && !fullPath.includes("*")) {
|
|
10923
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Link, {
|
|
10924
|
+
className: LinkStyle$1,
|
|
10925
|
+
href: fullPath,
|
|
10926
|
+
target: "_blank",
|
|
10927
|
+
children: fullPath
|
|
10928
|
+
});
|
|
10929
|
+
}
|
|
10930
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
10931
|
+
children: fullPath
|
|
10932
|
+
});
|
|
10933
|
+
}
|
|
10910
10934
|
const index_cbhkdt = "";
|
|
10911
|
-
const LinkStyle
|
|
10935
|
+
const LinkStyle = "l1vnw9x0";
|
|
10912
10936
|
const ResourceLink = (props) => {
|
|
10913
10937
|
const {
|
|
10914
10938
|
name: name2,
|
|
@@ -10930,7 +10954,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10930
10954
|
});
|
|
10931
10955
|
};
|
|
10932
10956
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.Link, {
|
|
10933
|
-
className: LinkStyle
|
|
10957
|
+
className: LinkStyle,
|
|
10934
10958
|
onClick,
|
|
10935
10959
|
children: resourceId
|
|
10936
10960
|
});
|
|
@@ -10958,7 +10982,10 @@ var __publicField = (obj, key, value) => {
|
|
|
10958
10982
|
dataIndex: "fullPath",
|
|
10959
10983
|
title: t2("dovetail.path"),
|
|
10960
10984
|
width: 478,
|
|
10961
|
-
sortable: true
|
|
10985
|
+
sortable: true,
|
|
10986
|
+
render(value2) {
|
|
10987
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(LinkFallback, { fullPath: value2 });
|
|
10988
|
+
}
|
|
10962
10989
|
},
|
|
10963
10990
|
{
|
|
10964
10991
|
key: "serviceName",
|
|
@@ -11125,14 +11152,14 @@ var __publicField = (obj, key, value) => {
|
|
|
11125
11152
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.tabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
|
|
11126
11153
|
}) });
|
|
11127
11154
|
}
|
|
11128
|
-
const
|
|
11155
|
+
const ShowContent_vvz9yc = "";
|
|
11129
11156
|
const ShowContentWrapperStyle = "s9agep2";
|
|
11130
11157
|
const BackButton = "bo89gfi";
|
|
11131
11158
|
const ToolBarWrapper = "t1ohe42f";
|
|
11132
11159
|
const NameStyle = "nqm4qz0";
|
|
11133
11160
|
const TopBarStyle = "ticl0qc";
|
|
11134
11161
|
const ShowContentHeaderStyle = "so9uwk1";
|
|
11135
|
-
const GroupStyle = "ge26ou0";
|
|
11162
|
+
const GroupStyle$1 = "ge26ou0";
|
|
11136
11163
|
const GroupTitleStyle = "g17f8vl9";
|
|
11137
11164
|
const FullTabContentStyle = "fykgn2i";
|
|
11138
11165
|
const FieldWrapperStyle = "fngr745";
|
|
@@ -11147,7 +11174,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11147
11174
|
operationEle
|
|
11148
11175
|
} = props;
|
|
11149
11176
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
11150
|
-
className: cx_default(GroupStyle, className),
|
|
11177
|
+
className: cx_default(GroupStyle$1, className),
|
|
11151
11178
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
11152
11179
|
className: cx_default(eagle.Typo.Heading.h2_bold_title, GroupTitleStyle),
|
|
11153
11180
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
@@ -11301,11 +11328,17 @@ var __publicField = (obj, key, value) => {
|
|
|
11301
11328
|
children: (_a2 = tab.groups) == null ? void 0 : _a2.map((group) => {
|
|
11302
11329
|
const GroupContainer = group.title ? ShowGroupComponent : React.Fragment;
|
|
11303
11330
|
const FieldContainer = group.title ? kit.row : React.Fragment;
|
|
11331
|
+
const groupContainerProps = group.title ? {
|
|
11332
|
+
title: group.title || ""
|
|
11333
|
+
} : {};
|
|
11334
|
+
const fieldContainerProps = group.title ? {
|
|
11335
|
+
gutter: [24, 8]
|
|
11336
|
+
} : {};
|
|
11304
11337
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(GroupContainer, {
|
|
11305
|
-
|
|
11338
|
+
...groupContainerProps,
|
|
11306
11339
|
children: group.areas.map((area, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
11307
11340
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(FieldContainer, {
|
|
11308
|
-
|
|
11341
|
+
...fieldContainerProps,
|
|
11309
11342
|
children: renderFields(area.fields, area.type, !!group.title)
|
|
11310
11343
|
}, index), index !== group.areas.length - 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(kit.divider, {
|
|
11311
11344
|
style: {
|
|
@@ -11329,8 +11362,9 @@ var __publicField = (obj, key, value) => {
|
|
|
11329
11362
|
}), tabs]
|
|
11330
11363
|
});
|
|
11331
11364
|
};
|
|
11332
|
-
const
|
|
11365
|
+
const KeyValueSecret_1ibo68a = "";
|
|
11333
11366
|
const ButtonStyle = "b11tbgf7";
|
|
11367
|
+
const GroupStyle = "gtbyh5g";
|
|
11334
11368
|
function KeyValueSecret(props) {
|
|
11335
11369
|
const {
|
|
11336
11370
|
data: data2 = {}
|
|
@@ -11352,6 +11386,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11352
11386
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ShowGroupComponent, {
|
|
11353
11387
|
title: i18n2.t("dovetail.data"),
|
|
11354
11388
|
operationEle: toggleButton,
|
|
11389
|
+
className: GroupStyle,
|
|
11355
11390
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyValue, {
|
|
11356
11391
|
data: data2,
|
|
11357
11392
|
hideSecret,
|
|
@@ -11471,7 +11506,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11471
11506
|
[
|
|
11472
11507
|
`error.${cause.reason}`,
|
|
11473
11508
|
`error.${cause.code}`,
|
|
11474
|
-
`${
|
|
11509
|
+
`${cause.field ? `${cause.field}: ` : ""}${message2}`
|
|
11475
11510
|
],
|
|
11476
11511
|
{
|
|
11477
11512
|
...params,
|
|
@@ -11483,7 +11518,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11483
11518
|
[
|
|
11484
11519
|
`error.${cause.reason}`,
|
|
11485
11520
|
`error.${cause.code}`,
|
|
11486
|
-
`${
|
|
11521
|
+
`${cause.field ? `${cause.field}: ` : ""}${message2}`
|
|
11487
11522
|
],
|
|
11488
11523
|
{
|
|
11489
11524
|
...params,
|
|
@@ -17657,6 +17692,12 @@ var __publicField = (obj, key, value) => {
|
|
|
17657
17692
|
scrollOffsetToBottom,
|
|
17658
17693
|
scrollUpdateWasRequested
|
|
17659
17694
|
} = params;
|
|
17695
|
+
if (scrollOffsetToBottom === -1) {
|
|
17696
|
+
setTimeout(() => {
|
|
17697
|
+
var _a2;
|
|
17698
|
+
(_a2 = logViewerRef.current) == null ? void 0 : _a2.scrollToBottom();
|
|
17699
|
+
}, 16);
|
|
17700
|
+
}
|
|
17660
17701
|
if (!scrollUpdateWasRequested) {
|
|
17661
17702
|
if (scrollOffsetToBottom > 0) {
|
|
17662
17703
|
setPaused(true);
|
|
@@ -17901,7 +17942,9 @@ var __publicField = (obj, key, value) => {
|
|
|
17901
17942
|
scrollBeyondLastLine: false,
|
|
17902
17943
|
model,
|
|
17903
17944
|
scrollbar: {
|
|
17904
|
-
handleMouseWheel: !isScrollOnFocus
|
|
17945
|
+
handleMouseWheel: !isScrollOnFocus,
|
|
17946
|
+
alwaysConsumeMouseWheel: false
|
|
17947
|
+
// https://github.com/microsoft/monaco-editor/issues/2007
|
|
17905
17948
|
},
|
|
17906
17949
|
tabSize: 2,
|
|
17907
17950
|
readOnly,
|
|
@@ -24053,45 +24096,37 @@ var __publicField = (obj, key, value) => {
|
|
|
24053
24096
|
});
|
|
24054
24097
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: tags });
|
|
24055
24098
|
};
|
|
24056
|
-
const
|
|
24057
|
-
const LinkStyle = "l25ca2k";
|
|
24058
|
-
const IngressRulesComponent = ({
|
|
24059
|
-
ingress
|
|
24060
|
-
}) => {
|
|
24099
|
+
const IngressRulesComponent = ({ ingress }) => {
|
|
24061
24100
|
const kit = eagle.useUIKit();
|
|
24062
24101
|
const result = ingress.flattenedRules.map((r2) => {
|
|
24063
24102
|
const divider = " > ";
|
|
24064
|
-
|
|
24065
|
-
|
|
24066
|
-
|
|
24067
|
-
|
|
24068
|
-
|
|
24069
|
-
|
|
24070
|
-
|
|
24071
|
-
|
|
24072
|
-
|
|
24073
|
-
|
|
24074
|
-
|
|
24075
|
-
|
|
24076
|
-
|
|
24077
|
-
|
|
24078
|
-
|
|
24079
|
-
|
|
24080
|
-
|
|
24081
|
-
|
|
24082
|
-
|
|
24083
|
-
|
|
24084
|
-
|
|
24085
|
-
|
|
24086
|
-
|
|
24087
|
-
|
|
24088
|
-
|
|
24089
|
-
tooltip: `${r2.fullPath}${divider}:${r2.servicePort}`
|
|
24090
|
-
}, r2.fullPath);
|
|
24091
|
-
});
|
|
24092
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {
|
|
24093
|
-
children: result
|
|
24103
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24104
|
+
kit.overflowTooltip,
|
|
24105
|
+
{
|
|
24106
|
+
content: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
24107
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(LinkFallback, { fullPath: r2.fullPath }),
|
|
24108
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: divider }),
|
|
24109
|
+
r2.serviceName ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
24110
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24111
|
+
ResourceLink,
|
|
24112
|
+
{
|
|
24113
|
+
name: "services",
|
|
24114
|
+
namespace: ingress.metadata.namespace || "default",
|
|
24115
|
+
resourceId: r2.serviceName
|
|
24116
|
+
}
|
|
24117
|
+
),
|
|
24118
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
24119
|
+
":",
|
|
24120
|
+
r2.servicePort
|
|
24121
|
+
] })
|
|
24122
|
+
] }) : r2.resourceName
|
|
24123
|
+
] }),
|
|
24124
|
+
tooltip: `${r2.fullPath}${divider}:${r2.servicePort}`
|
|
24125
|
+
},
|
|
24126
|
+
r2.fullPath
|
|
24127
|
+
);
|
|
24094
24128
|
});
|
|
24129
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: result });
|
|
24095
24130
|
};
|
|
24096
24131
|
const columns_1h38dp = "";
|
|
24097
24132
|
const DashedTitleStyle = "dh5j833";
|
|
@@ -24391,6 +24426,7 @@ var __publicField = (obj, key, value) => {
|
|
|
24391
24426
|
display: true,
|
|
24392
24427
|
dataIndex: [],
|
|
24393
24428
|
width: 160,
|
|
24429
|
+
sorter: void 0,
|
|
24394
24430
|
render(_, record) {
|
|
24395
24431
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceInClusterAccessComponent, {
|
|
24396
24432
|
service: record
|
|
@@ -24437,6 +24473,7 @@ var __publicField = (obj, key, value) => {
|
|
|
24437
24473
|
display: true,
|
|
24438
24474
|
dataIndex: [],
|
|
24439
24475
|
width: 160,
|
|
24476
|
+
sorter: void 0,
|
|
24440
24477
|
render(_, record) {
|
|
24441
24478
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ServiceOutClusterAccessComponent, {
|
|
24442
24479
|
service: record
|
|
@@ -24475,7 +24512,7 @@ var __publicField = (obj, key, value) => {
|
|
|
24475
24512
|
display: true,
|
|
24476
24513
|
dataIndex,
|
|
24477
24514
|
sortable: true,
|
|
24478
|
-
sorter:
|
|
24515
|
+
sorter: void 0,
|
|
24479
24516
|
width: 300,
|
|
24480
24517
|
render(_, record) {
|
|
24481
24518
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(IngressRulesComponent, {
|
|
@@ -24578,7 +24615,8 @@ var __publicField = (obj, key, value) => {
|
|
|
24578
24615
|
});
|
|
24579
24616
|
},
|
|
24580
24617
|
width: 300,
|
|
24581
|
-
sortable: true
|
|
24618
|
+
sortable: true,
|
|
24619
|
+
sorter: void 0
|
|
24582
24620
|
};
|
|
24583
24621
|
};
|
|
24584
24622
|
const PortMappingColumnRenderer = (i18n2, clusterVip) => {
|
|
@@ -24594,6 +24632,7 @@ var __publicField = (obj, key, value) => {
|
|
|
24594
24632
|
display: true,
|
|
24595
24633
|
dataIndex: ["displayPortMapping"],
|
|
24596
24634
|
width: 300,
|
|
24635
|
+
sorter: void 0,
|
|
24597
24636
|
render(value2, record) {
|
|
24598
24637
|
var _a;
|
|
24599
24638
|
const content = (_a = record.displayPortMapping) == null ? void 0 : _a.map((v) => /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.OverflowTooltip, {
|
|
@@ -24668,10 +24707,7 @@ var __publicField = (obj, key, value) => {
|
|
|
24668
24707
|
options: {
|
|
24669
24708
|
warnWhenUnsavedChanges: true,
|
|
24670
24709
|
liveMode: "auto",
|
|
24671
|
-
disableTelemetry: true
|
|
24672
|
-
overtime: {
|
|
24673
|
-
interval: Number.MAX_SAFE_INTEGER
|
|
24674
|
-
}
|
|
24710
|
+
disableTelemetry: true
|
|
24675
24711
|
},
|
|
24676
24712
|
accessControlProvider,
|
|
24677
24713
|
resources: resourcesConfig.map((c2) => {
|
package/dist/style.css
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
.e5223w8.e5223w8{color:rgba(0,21,64,.3);}
|
|
6
6
|
.cdjsw14{width:100%;}.cdjsw14.overflow{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
|
7
7
|
.b142d7q8{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}.b142d7q8 .breadcrumb-item:not(:last-of-type):after{content:'>';margin:0 8px;}
|
|
8
|
-
.egn3dbn{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;}
|
|
9
|
-
.e136jgy8{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.e136jgy8 .title{margin-bottom:8px;}
|
|
8
|
+
.egn3dbn{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;}.egn3dbn.widget .title{background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-image:linear-gradient(211.41deg,#929dad 0%,#d3dbe3 100%);}.egn3dbn.list .title{color:rgba(44,56,82,0.60);}.egn3dbn.card .title{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:96px;color:rgba(0,21,64,0.30);}
|
|
9
|
+
.e136jgy8{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.e136jgy8 .title{margin-bottom:8px;}
|
|
10
10
|
.ax1qopv{position:absolute;top:0;left:0;bottom:0;width:1px;background:$blue-60;-webkit-transform:translateX(-9999px);-ms-transform:translateX(-9999px);transform:translateX(-9999px);z-index:999;}.ax1qopv::before{content:'';position:absolute;height:34px;width:3px;top:0;left:-1px;background:$blue-60;}
|
|
11
11
|
.t1upn1sz{width:100%;border-top:1px solid rgba(211,218,235,0.6);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.t1upn1sz .ant-table-pagination{display:none;}.t1upn1sz .table-container{min-height:0;}
|
|
12
12
|
.b1vtjd4k.ant-btn.ant-btn-link{display:block;}
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
.d1wqyhgc{color:rgba(44,56,82,0.75);}
|
|
21
21
|
.w16agr8o.ant-space{width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}
|
|
22
22
|
.i1u1f5zp{white-space:pre-line;}
|
|
23
|
+
.lmmrm55{padding:0 !important;}
|
|
23
24
|
.l1vnw9x0{padding:0 !important;}
|
|
24
25
|
.c8jy7dc{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding:8px 10px;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;gap:8px;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;border-radius:4px;background:rgba(237,241,250,0.6);}.c8jy7dc:not(:last-of-type){margin-bottom:8px;}
|
|
25
26
|
.k2sddxl{color:rgba(44,56,82,0.75);width:calc(30% - 4px);margin-right:8px;word-break:break-all;}
|
|
@@ -34,14 +35,15 @@
|
|
|
34
35
|
.nqm4qz0{color:#00122E;margin-right:8px;}
|
|
35
36
|
.ticl0qc{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;width:100%;}
|
|
36
37
|
.so9uwk1{width:100%;}
|
|
37
|
-
.ge26ou0{padding:12px 16px;padding-bottom:
|
|
38
|
-
.g17f8vl9{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;color:#1d326c;margin-bottom:
|
|
38
|
+
.ge26ou0{padding:12px 16px;padding-bottom:4px;border-radius:8px;border:1px solid rgba(211,218,235,0.6);box-shadow: 0px 0px 2.003px 0px rgba(107,125,153,0.15), 0px 0px 16px 0px rgba(107,125,153,0.08);background-color:#fff;margin:0 24px;overflow:auto;width:calc(100% - 48px);max-width:1592px;}.ge26ou0:first-of-type{margin-top:16px;}.ge26ou0:not(:last-of-type){margin-bottom:24px;}.ge26ou0 .pagination-wrapper{padding-top:12px;padding-bottom:0;}
|
|
39
|
+
.g17f8vl9{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;color:#1d326c;margin-bottom:10px;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
|
39
40
|
.fykgn2i{background-color:#fff;height:100%;}
|
|
40
41
|
.fngr745{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;}
|
|
41
42
|
.t11wg61l{padding-bottom:16px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-width:904px;}
|
|
42
43
|
.v1x3rivf{color:#00122E;}
|
|
43
44
|
.tf5s6s.ant-tabs{-webkit-flex:1;-ms-flex:1;flex:1;min-height:0;}.tf5s6s.ant-tabs .ant-tabs-nav{margin-bottom:0;margin-right:24px;}.tf5s6s.ant-tabs .ant-tabs-nav-list{margin-left:24px;}.tf5s6s.ant-tabs .ant-tabs-content-holder{overflow:auto;}.tf5s6s.ant-tabs .ant-tabs-content-holder .ant-tabs-content,.tf5s6s.ant-tabs .ant-tabs-content-holder .ant-tabs-tabpane-active{height:100%;}
|
|
44
45
|
.b11tbgf7.ant-btn-quiet.ant-btn{color:rgba(44,56,82,0.75);}
|
|
46
|
+
.gtbyh5g{padding-bottom:12px;}
|
|
45
47
|
.c1dicff8{width:100%;vertical-align:top;}
|
|
46
48
|
.esoz3jw.ant-btn.ant-btn-link{font-size:13px;height:22px;margin-left:8px;}
|
|
47
49
|
.w8ychfk{border-radius:8px;border:1px solid rgba(211,218,235,0.60);padding:16px;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
|
@@ -1538,7 +1540,6 @@
|
|
|
1538
1540
|
.c1i80kj{height:100%;}
|
|
1539
1541
|
.s18sezq1.ant-layout-sider{background:#edf0f7;}
|
|
1540
1542
|
.cyc9hl2.ant-layout-content{background:#fff;}
|
|
1541
|
-
.l25ca2k{padding:0 !important;}
|
|
1542
1543
|
.dh5j833{border-bottom:1px dashed rgba(107,128,167,0.6);padding-bottom:1px;}
|
|
1543
1544
|
.s1fcgan.ant-tooltip .ant-tooltip-inner{width:256px;}
|
|
1544
1545
|
.ciistgu{padding:0 !important;}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ModalInfo {
|
|
3
|
+
resource: string;
|
|
4
|
+
id?: string;
|
|
5
|
+
}
|
|
6
|
+
type ModalContextValue = ModalInfo & {
|
|
7
|
+
open: (info: ModalInfo) => void;
|
|
8
|
+
close: () => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const ModalContext: React.Context<ModalContextValue>;
|
|
11
|
+
declare function ModalContextProvider(props: React.PropsWithChildren<Record<string, unknown>>): JSX.Element;
|
|
12
|
+
export default ModalContextProvider;
|
|
@@ -2,6 +2,7 @@ import type { NetworkPolicyIngressRule, NetworkPolicyEgressRule } from 'kubernet
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
type Props = {
|
|
4
4
|
ingressOrEgress: NetworkPolicyIngressRule[] | NetworkPolicyEgressRule[];
|
|
5
|
+
kind?: string;
|
|
5
6
|
};
|
|
6
|
-
export declare const
|
|
7
|
+
export declare const NetworkPolicyRulesViewer: React.FC<Props>;
|
|
7
8
|
export {};
|
|
@@ -8,10 +8,11 @@ type Props<Model extends ResourceModel> = {
|
|
|
8
8
|
record: Model;
|
|
9
9
|
}>;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
type ShowGroupComponentProps = React.PropsWithChildren<{
|
|
12
12
|
title: string;
|
|
13
13
|
className?: string;
|
|
14
14
|
operationEle?: React.ReactElement | null;
|
|
15
|
-
}
|
|
15
|
+
}>;
|
|
16
|
+
export declare function ShowGroupComponent(props: ShowGroupComponentProps): JSX.Element;
|
|
16
17
|
export declare const ShowContent: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(props: Props<Model>) => JSX.Element | null;
|
|
17
18
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { FormAction } from '@refinedev/core';
|
|
2
3
|
import useEagleForm from 'src/hooks/useEagleForm';
|
|
3
4
|
export declare enum SchemaStrategy {
|
|
4
5
|
Required = "Required",
|
|
@@ -7,7 +8,9 @@ export declare enum SchemaStrategy {
|
|
|
7
8
|
}
|
|
8
9
|
export interface YamlFormProps {
|
|
9
10
|
id?: string;
|
|
11
|
+
action?: FormAction;
|
|
10
12
|
initialValues?: Record<string, unknown>;
|
|
13
|
+
transformValues?: (values: Record<string, unknown>) => Record<string, unknown>;
|
|
11
14
|
schemaStrategy?: SchemaStrategy;
|
|
12
15
|
isShowLayout?: boolean;
|
|
13
16
|
useFormProps?: Parameters<typeof useEagleForm>[0];
|
|
@@ -15,6 +18,7 @@ export interface YamlFormProps {
|
|
|
15
18
|
disabled?: boolean;
|
|
16
19
|
onClick: () => void;
|
|
17
20
|
}) => void;
|
|
21
|
+
onErrorsChange?: (errors: string[]) => void;
|
|
18
22
|
onFinish?: () => void;
|
|
19
23
|
}
|
|
20
24
|
declare function YamlForm(props: YamlFormProps): JSX.Element;
|
|
@@ -20,6 +20,7 @@ export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError ex
|
|
|
20
20
|
isSkipSchema?: boolean;
|
|
21
21
|
};
|
|
22
22
|
initialValuesForCreate?: Record<string, unknown>;
|
|
23
|
+
transformValues?: (values: Record<string, unknown>) => Record<string, unknown>;
|
|
23
24
|
};
|
|
24
25
|
export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormReturnTypeCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
|
|
25
26
|
form: FormInstance;
|
|
@@ -43,5 +44,5 @@ declare const useEagleForm: <TQueryFnData extends Unstructured = Unstructured &
|
|
|
43
44
|
[prop: string]: unknown;
|
|
44
45
|
} = {
|
|
45
46
|
[prop: string]: unknown;
|
|
46
|
-
}, TData extends Unstructured = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action, resource, onMutationSuccess: onMutationSuccessProp, onMutationError, submitOnEnter, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, redirect, successNotification, errorNotification, meta, metaData, queryMeta, mutationMeta, liveMode, liveParams, mutationMode, dataProviderName, onLiveEvent, invalidates, undoableTimeout, queryOptions, createMutationOptions, updateMutationOptions, id: idFromProps, overtimeOptions, editorOptions, initialValuesForCreate, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
|
47
|
+
}, TData extends Unstructured = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action: actionFromProps, resource, onMutationSuccess: onMutationSuccessProp, onMutationError, submitOnEnter, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, redirect, successNotification, errorNotification, meta, metaData, queryMeta, mutationMeta, liveMode, liveParams, mutationMode, dataProviderName, onLiveEvent, invalidates, undoableTimeout, queryOptions, createMutationOptions, updateMutationOptions, id: idFromProps, overtimeOptions, editorOptions, initialValuesForCreate, transformValues, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
|
47
48
|
export default useEagleForm;
|
|
File without changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CronJob } from 'kubernetes-types/batch/v1';
|
|
2
|
+
import { WithId } from '../types';
|
|
3
|
+
import { WorkloadModel } from './workload-model';
|
|
4
|
+
export declare class CronJobModel extends WorkloadModel<CronJob> {
|
|
5
|
+
data: WithId<CronJob>;
|
|
6
|
+
constructor(data: WithId<CronJob>);
|
|
7
|
+
suspend(): WithId<CronJob>;
|
|
8
|
+
resume(): WithId<CronJob>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Job } from 'kubernetes-types/batch/v1';
|
|
2
|
+
import { WithId } from '../types';
|
|
3
|
+
import { WorkloadModel } from './workload-model';
|
|
4
|
+
export declare class JobModel extends WorkloadModel<Job> {
|
|
5
|
+
rawYaml: WithId<Job>;
|
|
6
|
+
constructor(rawYaml: WithId<Job>);
|
|
7
|
+
get duration(): number;
|
|
8
|
+
get durationDisplay(): string | undefined;
|
|
9
|
+
get completionsDisplay(): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Pod } from 'kubernetes-types/core/v1';
|
|
2
|
+
import { ResourceQuantity } from 'src/types/metric';
|
|
3
|
+
import { WithId } from '../types';
|
|
4
|
+
import { WorkloadModel } from './workload-model';
|
|
5
|
+
export declare class PodModel extends WorkloadModel<Pod> {
|
|
6
|
+
rawYaml: WithId<Pod>;
|
|
7
|
+
request: ResourceQuantity;
|
|
8
|
+
limit: ResourceQuantity;
|
|
9
|
+
constructor(rawYaml: WithId<Pod>);
|
|
10
|
+
get imageNames(): string[];
|
|
11
|
+
get restartCount(): number;
|
|
12
|
+
get readyDisplay(): string;
|
|
13
|
+
get readyContainerCount(): number | undefined;
|
|
14
|
+
get containerCount(): number | undefined;
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Resource } from '../types';
|
|
2
|
+
export declare class ResourceModel implements Resource {
|
|
3
|
+
rawYaml: Resource;
|
|
4
|
+
id: Resource['id'];
|
|
5
|
+
apiVersion: Resource['apiVersion'];
|
|
6
|
+
kind: Resource['kind'];
|
|
7
|
+
metadata: Resource['metadata'];
|
|
8
|
+
constructor(rawYaml: Resource);
|
|
9
|
+
get name(): string | undefined;
|
|
10
|
+
get namespace(): string | undefined;
|
|
11
|
+
get labels(): {
|
|
12
|
+
[name: string]: string;
|
|
13
|
+
} | undefined;
|
|
14
|
+
get annotations(): {
|
|
15
|
+
[name: string]: string;
|
|
16
|
+
} | undefined;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DaemonSet, Deployment, StatefulSet } from 'kubernetes-types/apps/v1';
|
|
2
|
+
import type { CronJob, Job } from 'kubernetes-types/batch/v1';
|
|
3
|
+
import { Pod } from 'kubernetes-types/core/v1';
|
|
4
|
+
import { WithId } from '../types';
|
|
5
|
+
import { ResourceModel } from './resource-model';
|
|
6
|
+
type WorkloadTypes = Deployment | StatefulSet | Job | DaemonSet | CronJob | Pod;
|
|
7
|
+
export declare class WorkloadModel<T extends WorkloadTypes = WorkloadTypes> extends ResourceModel {
|
|
8
|
+
rawYaml: WithId<T>;
|
|
9
|
+
constructor(rawYaml: WithId<T>);
|
|
10
|
+
get status(): T['status'];
|
|
11
|
+
get spec(): T['spec'];
|
|
12
|
+
get imageNames(): string[];
|
|
13
|
+
get restartCount(): number;
|
|
14
|
+
redeploy(): WithId<T>;
|
|
15
|
+
scale(value: number): WithId<T>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Resource } from './resource';
|
|
2
|
+
type Quantity = string;
|
|
3
|
+
export type ContainerMetrics = {
|
|
4
|
+
name: string;
|
|
5
|
+
usage: {
|
|
6
|
+
cpu?: Quantity;
|
|
7
|
+
memory?: Quantity;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export type PodMetrics = {
|
|
11
|
+
timestamp: string;
|
|
12
|
+
window: string;
|
|
13
|
+
containers: ContainerMetrics[];
|
|
14
|
+
} & Resource;
|
|
15
|
+
export type ResourceQuantity = {
|
|
16
|
+
cpu: {
|
|
17
|
+
si: string;
|
|
18
|
+
value: number;
|
|
19
|
+
};
|
|
20
|
+
memory: {
|
|
21
|
+
si: string;
|
|
22
|
+
value: number;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export {};
|