@dovetail-v2/refine 0.0.46-alpha.1 → 0.0.46
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-a0787f8d.js → MonacoYamlDiffEditor-68215003.js} +1 -1
- package/dist/{index-9a6fb2d3.js → index-238ec29f.js} +359 -280
- package/dist/refine.js +176 -175
- package/dist/refine.umd.cjs +183 -104
- package/lib/src/App.js +91 -0
- package/lib/src/Dovetail.js +45 -0
- package/lib/src/components/Breadcrumb/index.js +20 -0
- package/lib/src/components/ConditionsTable/ConditionsTable.js +56 -0
- package/lib/src/components/ConditionsTable/index.js +1 -0
- package/lib/src/components/CreateButton/index.js +10 -0
- package/lib/src/components/CronJobDropdown/index.js +26 -0
- package/lib/src/components/CronjobJobsTable/index.js +49 -0
- package/lib/src/components/DeleteButton/index.js +13 -0
- package/lib/src/components/DeleteManyButton/index.js +16 -0
- package/lib/src/components/DrawerShow/DrawerShow.js +13 -0
- package/lib/src/components/DrawerShow/index.js +1 -0
- package/lib/src/components/EditButton/index.js +13 -0
- package/lib/src/components/EditField/index.js +47 -0
- package/lib/src/components/ErrorContent/index.js +36 -0
- package/lib/src/components/EventsTable/EventsTable.js +59 -0
- package/lib/src/components/EventsTable/index.js +1 -0
- package/lib/src/components/Form/KeyValueListWidget.js +56 -0
- package/lib/src/components/Form/MetadataForm.js +9 -0
- package/lib/src/components/Form/NameInputWidget.js +50 -0
- package/lib/src/components/Form/NamespaceSelectWidget.js +21 -0
- package/lib/src/components/Form/index.js +4 -0
- package/lib/src/components/Form/widget.js +1 -0
- package/lib/src/components/FormErrorAlert/index.js +8 -0
- package/lib/src/components/FormLayout/index.js +21 -0
- package/lib/src/components/FormModal/index.js +51 -0
- package/lib/src/components/ImageNames/index.js +14 -0
- package/lib/src/components/IngressRulesComponent/index.js +11 -0
- package/lib/src/components/IngressRulesTable/IngressRulesTable.js +51 -0
- package/lib/src/components/IngressRulesTable/index.js +1 -0
- package/lib/src/components/K8sDropdown/index.js +31 -0
- package/lib/src/components/KeyValue/KeyValue.js +27 -0
- package/lib/src/components/KeyValue/index.js +1 -0
- package/lib/src/components/KeyValueData/index.js +50 -0
- package/lib/src/components/Layout/index.js +39 -0
- package/lib/src/components/ListPage/index.js +25 -0
- package/lib/src/components/Menu/index.js +36 -0
- package/lib/src/components/NamespacesFilter/index.js +34 -0
- package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.d.ts +1 -2
- package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.js +77 -0
- package/lib/src/components/NetworkPolicyRulesTable/index.js +1 -0
- package/lib/src/components/PageShow/PageShow.js +11 -0
- package/lib/src/components/PageShow/index.js +1 -0
- package/lib/src/components/PodContainersTable/PodContainersTable.js +78 -0
- package/lib/src/components/PodContainersTable/index.js +1 -0
- package/lib/src/components/PodLog/index.js +136 -0
- package/lib/src/components/ReferenceLink/index.js +17 -0
- package/lib/src/components/RefineForm/RefineFormContent.d.ts +10 -0
- package/lib/src/components/RefineForm/RefineFormModal.d.ts +8 -0
- package/lib/src/components/RefineForm/RefineFormPage.d.ts +7 -0
- package/lib/src/components/RefineForm/index.d.ts +3 -0
- package/lib/src/components/RefineForm/type.d.ts +20 -0
- package/lib/src/components/RefineForm/useRefineForm.d.ts +10 -0
- package/lib/src/components/ResourceCRUD/ResourceCRUD.js +15 -0
- package/lib/src/components/ResourceCRUD/create/index.js +13 -0
- package/lib/src/components/ResourceCRUD/index.js +4 -0
- package/lib/src/components/ResourceCRUD/list/index.js +19 -0
- package/lib/src/components/ResourceCRUD/show/index.js +6 -0
- package/lib/src/components/ResourceLink/index.js +21 -0
- package/lib/src/components/ResourceUsageBar/index.js +81 -0
- package/lib/src/components/Separator/index.js +11 -0
- package/lib/src/components/ShowContent/ShowContent.d.ts +0 -2
- package/lib/src/components/ShowContent/ShowContent.js +157 -0
- package/lib/src/components/ShowContent/fields.js +157 -0
- package/lib/src/components/ShowContent/index.js +2 -0
- package/lib/src/components/StateTag/StateTag.js +22 -0
- package/lib/src/components/StateTag/index.js +1 -0
- package/lib/src/components/Table/ErrorContent.js +36 -0
- package/lib/src/components/Table/TableToolBar.js +14 -0
- package/lib/src/components/Table/TableWidgets.js +28 -0
- package/lib/src/components/Table/index.js +69 -0
- package/lib/src/components/Tags/index.js +22 -0
- package/lib/src/components/Time/index.js +14 -0
- package/lib/src/components/WorkloadDropdown/index.js +24 -0
- package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.js +39 -0
- package/lib/src/components/WorkloadPodsTable/index.js +1 -0
- package/lib/src/components/WorkloadReplicas/index.js +50 -0
- package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.js +34 -0
- package/lib/src/components/YamlEditor/MonacoYamlEditor.js +149 -0
- package/lib/src/components/YamlEditor/YamlEditorComponent.js +90 -0
- package/lib/src/components/YamlEditor/index.js +1 -0
- package/lib/src/components/YamlEditor/style.js +102 -0
- package/lib/src/components/YamlEditor/yaml.worker.js +1 -0
- package/lib/src/components/YamlForm/index.d.ts +0 -4
- package/lib/src/components/YamlForm/index.js +61 -0
- package/lib/src/components/index.js +38 -0
- package/lib/src/constants/index.js +2 -0
- package/lib/src/constants/k8s.js +203 -0
- package/lib/src/constants/state.js +15 -0
- package/lib/src/contexts/component.js +3 -0
- package/lib/src/contexts/configs.js +3 -0
- package/lib/src/contexts/global-store.js +3 -0
- package/lib/src/contexts/index.js +3 -0
- package/lib/src/hooks/index.d.ts +1 -0
- package/lib/src/hooks/index.js +7 -0
- package/lib/src/hooks/useDeleteModal/index.js +1 -0
- package/lib/src/hooks/useDeleteModal/useDeleteManyModal.js +31 -0
- package/lib/src/hooks/useDeleteModal/useDeleteModal.js +38 -0
- package/lib/src/hooks/useDownloadYAML.js +10 -0
- package/lib/src/hooks/useEagleForm.d.ts +1 -2
- package/lib/src/hooks/useEagleForm.js +177 -0
- package/lib/src/hooks/useEagleTable/columns.js +246 -0
- package/lib/src/hooks/useEagleTable/index.js +2 -0
- package/lib/src/hooks/useEagleTable/useEagleTable.js +63 -0
- package/lib/src/hooks/useEdit.js +19 -0
- package/lib/src/hooks/useGlobalStore.js +5 -0
- package/lib/src/hooks/useK8sYamlEditor.js +37 -0
- package/lib/src/hooks/useNamespaceRefineFilter.d.ts +5 -0
- package/lib/src/hooks/useOpenForm.js +43 -0
- package/lib/src/hooks/useSchema.js +37 -0
- package/lib/src/hooks/useSubmitForm.js +42 -0
- package/lib/src/i18n.d.ts +68 -34
- package/lib/src/i18n.js +19 -0
- package/lib/src/index.js +13 -0
- package/lib/src/locales/en-US/dovetail.json +18 -0
- package/lib/src/locales/en-US/index.d.ts +67 -34
- package/lib/src/locales/en-US/index.js +4 -0
- package/lib/src/locales/index.js +6 -0
- package/lib/src/locales/zh-CN/dovetail.json +91 -0
- package/lib/src/locales/zh-CN/index.d.ts +1 -0
- package/lib/src/locales/zh-CN/index.js +4 -0
- package/lib/src/main.js +12 -0
- package/lib/src/models/cronjob-model.js +32 -0
- package/lib/src/models/daemonset-model.js +17 -0
- package/lib/src/models/deployment-model.js +17 -0
- package/lib/src/models/event-model.js +11 -0
- package/lib/src/models/index.js +14 -0
- package/lib/src/models/ingress-model.js +24 -0
- package/lib/src/models/job-model.js +56 -0
- package/lib/src/models/network-policy-model.js +10 -0
- package/lib/src/models/pod-metrics-model.js +34 -0
- package/lib/src/models/pod-model.js +78 -0
- package/lib/src/models/resource-model.js +34 -0
- package/lib/src/models/server-instance-model.d.ts +10 -0
- package/lib/src/models/service-model.js +17 -0
- package/lib/src/models/statefulset-model.js +17 -0
- package/lib/src/models/types/index.js +1 -0
- package/lib/src/models/types/metric.js +1 -0
- package/lib/src/models/workload-base-model.js +22 -0
- package/lib/src/models/workload-model.js +51 -0
- package/lib/src/pages/configmaps/index.js +15 -0
- package/lib/src/pages/cronjobs/create/index.js +6 -0
- package/lib/src/pages/cronjobs/index.js +3 -0
- package/lib/src/pages/cronjobs/list/index.js +42 -0
- package/lib/src/pages/cronjobs/show/index.js +16 -0
- package/lib/src/pages/daemonsets/create/index.js +6 -0
- package/lib/src/pages/daemonsets/index.js +3 -0
- package/lib/src/pages/daemonsets/list/index.js +32 -0
- package/lib/src/pages/daemonsets/show/index.js +16 -0
- package/lib/src/pages/deployments/create/index.js +7 -0
- package/lib/src/pages/deployments/index.js +3 -0
- package/lib/src/pages/deployments/list/index.js +26 -0
- package/lib/src/pages/deployments/show/index.js +16 -0
- package/lib/src/pages/ingresses/index.js +26 -0
- package/lib/src/pages/jobs/index.js +34 -0
- package/lib/src/pages/networkPolicies/index.js +67 -0
- package/lib/src/pages/pods/create/index.js +6 -0
- package/lib/src/pages/pods/index.js +3 -0
- package/lib/src/pages/pods/list/index.js +81 -0
- package/lib/src/pages/pods/show/index.js +54 -0
- package/lib/src/pages/secrets/index.js +15 -0
- package/lib/src/pages/services/index.js +26 -0
- package/lib/src/pages/statefulsets/create/index.js +6 -0
- package/lib/src/pages/statefulsets/index.js +3 -0
- package/lib/src/pages/statefulsets/list/index.js +26 -0
- package/lib/src/pages/statefulsets/show/index.js +16 -0
- package/lib/src/plugins/index.js +3 -0
- package/lib/src/plugins/model-plugin.js +46 -0
- package/lib/src/plugins/relation-plugin.js +81 -0
- package/lib/src/plugins/type.js +1 -0
- package/lib/src/providers/index.js +1 -0
- package/lib/src/providers/router-provider/index.js +100 -0
- package/lib/src/types/index.js +1 -0
- package/lib/src/types/resource.js +12 -0
- package/lib/src/utils/addId.js +8 -0
- package/lib/src/utils/download.js +9 -0
- package/lib/src/utils/error.js +53 -0
- package/lib/src/utils/form.js +9 -0
- package/lib/src/utils/k8s.js +6 -0
- package/lib/src/utils/labels.js +15 -0
- package/lib/src/utils/match-selector.js +12 -0
- package/lib/src/utils/openapi.js +33 -0
- package/lib/src/utils/schema.js +117 -0
- package/lib/src/utils/selector.js +12 -0
- package/lib/src/utils/string.js +6 -0
- package/lib/src/utils/time.js +46 -0
- package/lib/src/utils/unit.js +69 -0
- package/lib/src/utils/yaml.js +44 -0
- package/lib/vite.config.js +60 -0
- package/package.json +2 -2
- package/lib/src/components/ModalContextProvider/index.d.ts +0 -12
- package/lib/src/hooks/useModal.d.ts +0 -0
- package/lib/src/hooks/useNamespaceFilter.d.ts +0 -5
- package/lib/src/model/cronjob-model.d.ts +0 -9
- package/lib/src/model/index.d.ts +0 -6
- package/lib/src/model/job-model.d.ts +0 -10
- package/lib/src/model/pod-metrics-model.d.ts +0 -7
- package/lib/src/model/pod-model.d.ts +0 -15
- package/lib/src/model/resource-model.d.ts +0 -17
- package/lib/src/model/workload-model.d.ts +0 -17
- package/lib/src/types/metric.d.ts +0 -25
package/dist/refine.umd.cjs
CHANGED
|
@@ -1034,10 +1034,9 @@ var __publicField = (obj, key, value) => {
|
|
|
1034
1034
|
const pod$1 = "Pod";
|
|
1035
1035
|
const cancel$1 = "Cancel";
|
|
1036
1036
|
const create$1 = "Create";
|
|
1037
|
-
const confirm_delete_text$1 = "
|
|
1037
|
+
const confirm_delete_text$1 = "Are you sure you want to delete the {{kind}} <0>{{target}}</0>?";
|
|
1038
1038
|
const edit$1 = "edit";
|
|
1039
1039
|
const namespace$1 = "Namespace";
|
|
1040
|
-
const image$1 = "Image";
|
|
1041
1040
|
const created_time$1 = "Creation time";
|
|
1042
1041
|
const label$1 = "Label";
|
|
1043
1042
|
const annotation$1 = "Annotation";
|
|
@@ -1049,32 +1048,20 @@ var __publicField = (obj, key, value) => {
|
|
|
1049
1048
|
const condition$1 = "Condition";
|
|
1050
1049
|
const download_yaml$1 = "Download YAML";
|
|
1051
1050
|
const detail$1 = "Detail";
|
|
1052
|
-
const restarts$1 = "Restart Count";
|
|
1053
|
-
const updated_time$1 = "Transition Time";
|
|
1054
1051
|
const message$1 = "Message";
|
|
1055
1052
|
const save$1 = "Save";
|
|
1056
|
-
const more = "更多";
|
|
1057
1053
|
const workload$1 = "Workload";
|
|
1058
|
-
const all_namespaces$1 = "所有名字空间";
|
|
1059
1054
|
const empty$1 = "No data available";
|
|
1060
1055
|
const schedule$1 = "Schedule";
|
|
1061
1056
|
const lastScheduleTime$1 = "Last Schedule";
|
|
1062
1057
|
const duration$1 = "Duration";
|
|
1063
|
-
const started$1 = "
|
|
1064
|
-
const init_container$1 = "Init Container";
|
|
1065
|
-
const regular_container$1 = "Regular Container";
|
|
1058
|
+
const started$1 = "Start time";
|
|
1066
1059
|
const container$1 = "Container";
|
|
1067
1060
|
const redeploy$1 = "Redeploy";
|
|
1068
1061
|
const data$1 = "Data";
|
|
1069
|
-
const suspend$1 = "Suspended";
|
|
1070
1062
|
const resume$1 = "Resume";
|
|
1071
|
-
const clusterIp$1 = "集群 IP";
|
|
1072
1063
|
const sessionAffinity$1 = "会话保持";
|
|
1073
1064
|
const log$1 = "Log";
|
|
1074
|
-
const select_container$1 = "选择容器";
|
|
1075
|
-
const wrap = "折叠";
|
|
1076
|
-
const resume_log = "继续";
|
|
1077
|
-
const log_new_lines = ",并展示 {{ count }} 行新日志";
|
|
1078
1065
|
const ready$1 = "Ready";
|
|
1079
1066
|
const updating$1 = "Updating";
|
|
1080
1067
|
const completed$1 = "Completed";
|
|
@@ -1087,38 +1074,17 @@ var __publicField = (obj, key, value) => {
|
|
|
1087
1074
|
const unknown$1 = "Unknown";
|
|
1088
1075
|
const pending$1 = "Pending";
|
|
1089
1076
|
const waiting$1 = "Waiting";
|
|
1090
|
-
const sec$1 = "秒";
|
|
1091
|
-
const min$1 = "分";
|
|
1092
|
-
const hr$1 = "小时";
|
|
1093
|
-
const day$1 = "天";
|
|
1094
1077
|
const expand$1 = "Expand";
|
|
1095
1078
|
const fold$1 = "Collapse";
|
|
1096
1079
|
const rule$1 = "Rule";
|
|
1097
|
-
const default_backend$1 = "Default Backend";
|
|
1098
|
-
const ingress_class$1 = "Ingress Class";
|
|
1099
1080
|
const port$1 = "Port";
|
|
1100
|
-
const pod_ready_num$1 = "Ready Pod";
|
|
1101
|
-
const pod_replicas_num$1 = "Desired Pod";
|
|
1102
|
-
const edit_replicas$1 = "编辑副本数";
|
|
1103
1081
|
const cert$1 = "Certificate";
|
|
1104
|
-
const
|
|
1105
|
-
const port_mapping$1 = "端口映射";
|
|
1106
|
-
const out_cluster_access$1 = "集群外访问方式";
|
|
1107
|
-
const in_cluster_access$1 = "集群内访问方式";
|
|
1108
|
-
const fail_get_detail$1 = "{{resource}} {{name}} 已不存在";
|
|
1109
|
-
const basic_info$1 = "Basic Information";
|
|
1110
|
-
const pod_selector$1 = "Pod Selector";
|
|
1111
|
-
const ingress_rule$1 = "Ingress Rule";
|
|
1112
|
-
const egress_rule$1 = "Egress Rule";
|
|
1113
|
-
const ip_address$1 = "IP Address";
|
|
1082
|
+
const ip_address$1 = "IP address";
|
|
1114
1083
|
const last_seen$1 = "Last Seen";
|
|
1115
|
-
const service_port$1 = "Service Port";
|
|
1116
|
-
const pod_port$1 = "Pod Port";
|
|
1117
1084
|
const node_port$1 = "NodePort";
|
|
1118
1085
|
const protocol$1 = "Protocol";
|
|
1119
1086
|
const key$1 = "Key";
|
|
1120
1087
|
const value$1 = "Value";
|
|
1121
|
-
const path_type$1 = "Path Type";
|
|
1122
1088
|
const path$1 = "Path";
|
|
1123
1089
|
const backend$1 = "Backend";
|
|
1124
1090
|
const belong_to_node$1 = "Node";
|
|
@@ -1130,6 +1096,73 @@ var __publicField = (obj, key, value) => {
|
|
|
1130
1096
|
const username$1 = "Username";
|
|
1131
1097
|
const host$1 = "Host";
|
|
1132
1098
|
const no_resource$1 = "No {{kind}}";
|
|
1099
|
+
const all_namespaces$1 = "All namespaces";
|
|
1100
|
+
const clusterIp$1 = "Cluster IP";
|
|
1101
|
+
const select_container$1 = "Select container";
|
|
1102
|
+
const sec$1 = "sec";
|
|
1103
|
+
const min$1 = "min";
|
|
1104
|
+
const hr$1 = "hr";
|
|
1105
|
+
const day$1 = "d";
|
|
1106
|
+
const port_mapping$1 = "Port mapping";
|
|
1107
|
+
const out_cluster_access$1 = "Access outside cluster";
|
|
1108
|
+
const in_cluster_access$1 = "Access within cluster";
|
|
1109
|
+
const fail_get_detail$1 = "{{resource}} {{name}} no longer exists";
|
|
1110
|
+
const pod_num$1 = "Pods";
|
|
1111
|
+
const show_data_value$1 = "Show";
|
|
1112
|
+
const hide_data_value$1 = "Hide";
|
|
1113
|
+
const please_input$1 = "Please enter…";
|
|
1114
|
+
const create_failed$1 = "Creation failed.";
|
|
1115
|
+
const create_failed_tip$1 = "Please address the following issues and try again: ";
|
|
1116
|
+
const save_failed$1 = "Failed to save.";
|
|
1117
|
+
const save_failed_tip$1 = "Please address the following issues and try again: ";
|
|
1118
|
+
const completion_num_tooltip$1 = "Completed/Expected";
|
|
1119
|
+
const ready_num_tooltip$1 = "Ready/Expected";
|
|
1120
|
+
const realtime_log$1 = "Real-time logs";
|
|
1121
|
+
const previous_log$1 = "Last startup logs";
|
|
1122
|
+
const auto_wrap$1 = "Auto wrap";
|
|
1123
|
+
const container_num$1 = "Containers";
|
|
1124
|
+
const edit_resource_success$1 = "{{resource}} {{name}} was edited successfully";
|
|
1125
|
+
const redeploy_success_toast$1 = "{{kind}} was redeployed successfully";
|
|
1126
|
+
const redeploy_failed_toast$1 = "Failed to redeploy {{kind}} {{name}}";
|
|
1127
|
+
const pause_success_toast$1 = "Successfully suspended";
|
|
1128
|
+
const pause_failed_toast$1 = "Failed to suspend";
|
|
1129
|
+
const resume_success_toast$1 = "Successfully resumed";
|
|
1130
|
+
const resume_failed_toast$1 = "Failed to resume";
|
|
1131
|
+
const delete_success_toast$1 = "{{kind}} {{name}} was deleted successfully";
|
|
1132
|
+
const delete_failed_toast$1 = "Failed to delete {{kind}} {{name}}";
|
|
1133
|
+
const create_success_toast$1 = "{{kind}} {{name}} was created successfully";
|
|
1134
|
+
const save_yaml_success_toast$1 = "YAML editing was successfully saved";
|
|
1135
|
+
const save_replicas_success_toast$1 = "The expected number of replicas was edited successfully";
|
|
1136
|
+
const save_replicas_failed_toast$1 = "Failed to edit the expected number of replicas";
|
|
1137
|
+
const port_mapping_title_tooltip$1 = "The mapping between the service port and the pod port.";
|
|
1138
|
+
const in_cluster_desc$1 = "Services of types ClusterIP, NodePort, and LoadBalancer will show the ClusterIP field, which represents a virtual IP address only accessible within the cluster.";
|
|
1139
|
+
const in_cluster_ip_desc$1 = "If ClusterIP is a headless service, it will display as blank.";
|
|
1140
|
+
const in_cluster_external_name_desc$1 = "For an ExternalName type service, it displays DNS records.";
|
|
1141
|
+
const out_cluster_ip_desc$1 = "ClusterIP doesn't support external cluster access.";
|
|
1142
|
+
const out_cluster_node_port_desc$1 = "For a NodePort type service, it displays <strong>Node IP:nodeport</strong>.";
|
|
1143
|
+
const out_cluster_lb_desc$1 = "For a LoadBalancer type service, it displays <strong>ingress[*].ip</strong>.";
|
|
1144
|
+
const out_external_name_desc$1 = "For an ExternalName type service, it displays <strong>external-ip</strong>.";
|
|
1145
|
+
const image$1 = "Container image";
|
|
1146
|
+
const restarts$1 = "Restart count";
|
|
1147
|
+
const updated_time$1 = "Transition time";
|
|
1148
|
+
const init_container$1 = "Init container";
|
|
1149
|
+
const regular_container$1 = "Regular container";
|
|
1150
|
+
const suspend$1 = "Suspend";
|
|
1151
|
+
const default_backend$1 = "Default backend";
|
|
1152
|
+
const ingress_class$1 = "IngressClass";
|
|
1153
|
+
const pod_ready_num$1 = "Ready Pod";
|
|
1154
|
+
const pod_complete_num$1 = "Completion Pod";
|
|
1155
|
+
const pod_replicas_num$1 = "Desired Pod";
|
|
1156
|
+
const edit_replicas$1 = "Edit expected number of replicas";
|
|
1157
|
+
const dns_record$1 = "DNS record";
|
|
1158
|
+
const basic_info$1 = "Basic information";
|
|
1159
|
+
const pod_selector$1 = "Pod selector";
|
|
1160
|
+
const ingress_rule$1 = "Ingress rule";
|
|
1161
|
+
const egress_rule$1 = "Egress rule";
|
|
1162
|
+
const service_port$1 = "Service port";
|
|
1163
|
+
const pod_port$1 = "Pod port";
|
|
1164
|
+
const path_type$1 = "Path type";
|
|
1165
|
+
const only_support_one_yaml$1 = "Only one YAML configuration is supported at a time.";
|
|
1133
1166
|
const dovetail$1 = {
|
|
1134
1167
|
copy: copy$1,
|
|
1135
1168
|
reset_arguments: reset_arguments$1,
|
|
@@ -1155,7 +1188,6 @@ var __publicField = (obj, key, value) => {
|
|
|
1155
1188
|
confirm_delete_text: confirm_delete_text$1,
|
|
1156
1189
|
edit: edit$1,
|
|
1157
1190
|
namespace: namespace$1,
|
|
1158
|
-
image: image$1,
|
|
1159
1191
|
created_time: created_time$1,
|
|
1160
1192
|
label: label$1,
|
|
1161
1193
|
annotation: annotation$1,
|
|
@@ -1167,32 +1199,20 @@ var __publicField = (obj, key, value) => {
|
|
|
1167
1199
|
condition: condition$1,
|
|
1168
1200
|
download_yaml: download_yaml$1,
|
|
1169
1201
|
detail: detail$1,
|
|
1170
|
-
restarts: restarts$1,
|
|
1171
|
-
updated_time: updated_time$1,
|
|
1172
1202
|
message: message$1,
|
|
1173
1203
|
save: save$1,
|
|
1174
|
-
more,
|
|
1175
1204
|
workload: workload$1,
|
|
1176
|
-
all_namespaces: all_namespaces$1,
|
|
1177
1205
|
empty: empty$1,
|
|
1178
1206
|
schedule: schedule$1,
|
|
1179
1207
|
lastScheduleTime: lastScheduleTime$1,
|
|
1180
1208
|
duration: duration$1,
|
|
1181
1209
|
started: started$1,
|
|
1182
|
-
init_container: init_container$1,
|
|
1183
|
-
regular_container: regular_container$1,
|
|
1184
1210
|
container: container$1,
|
|
1185
1211
|
redeploy: redeploy$1,
|
|
1186
1212
|
data: data$1,
|
|
1187
|
-
suspend: suspend$1,
|
|
1188
1213
|
resume: resume$1,
|
|
1189
|
-
clusterIp: clusterIp$1,
|
|
1190
1214
|
sessionAffinity: sessionAffinity$1,
|
|
1191
1215
|
log: log$1,
|
|
1192
|
-
select_container: select_container$1,
|
|
1193
|
-
wrap,
|
|
1194
|
-
resume_log,
|
|
1195
|
-
log_new_lines,
|
|
1196
1216
|
ready: ready$1,
|
|
1197
1217
|
updating: updating$1,
|
|
1198
1218
|
completed: completed$1,
|
|
@@ -1205,38 +1225,17 @@ var __publicField = (obj, key, value) => {
|
|
|
1205
1225
|
unknown: unknown$1,
|
|
1206
1226
|
pending: pending$1,
|
|
1207
1227
|
waiting: waiting$1,
|
|
1208
|
-
sec: sec$1,
|
|
1209
|
-
min: min$1,
|
|
1210
|
-
hr: hr$1,
|
|
1211
|
-
day: day$1,
|
|
1212
1228
|
expand: expand$1,
|
|
1213
1229
|
fold: fold$1,
|
|
1214
1230
|
rule: rule$1,
|
|
1215
|
-
default_backend: default_backend$1,
|
|
1216
|
-
ingress_class: ingress_class$1,
|
|
1217
1231
|
port: port$1,
|
|
1218
|
-
pod_ready_num: pod_ready_num$1,
|
|
1219
|
-
pod_replicas_num: pod_replicas_num$1,
|
|
1220
|
-
edit_replicas: edit_replicas$1,
|
|
1221
1232
|
cert: cert$1,
|
|
1222
|
-
dns_record: dns_record$1,
|
|
1223
|
-
port_mapping: port_mapping$1,
|
|
1224
|
-
out_cluster_access: out_cluster_access$1,
|
|
1225
|
-
in_cluster_access: in_cluster_access$1,
|
|
1226
|
-
fail_get_detail: fail_get_detail$1,
|
|
1227
|
-
basic_info: basic_info$1,
|
|
1228
|
-
pod_selector: pod_selector$1,
|
|
1229
|
-
ingress_rule: ingress_rule$1,
|
|
1230
|
-
egress_rule: egress_rule$1,
|
|
1231
1233
|
ip_address: ip_address$1,
|
|
1232
1234
|
last_seen: last_seen$1,
|
|
1233
|
-
service_port: service_port$1,
|
|
1234
|
-
pod_port: pod_port$1,
|
|
1235
1235
|
node_port: node_port$1,
|
|
1236
1236
|
protocol: protocol$1,
|
|
1237
1237
|
key: key$1,
|
|
1238
1238
|
value: value$1,
|
|
1239
|
-
path_type: path_type$1,
|
|
1240
1239
|
path: path$1,
|
|
1241
1240
|
backend: backend$1,
|
|
1242
1241
|
belong_to_node: belong_to_node$1,
|
|
@@ -1249,7 +1248,74 @@ var __publicField = (obj, key, value) => {
|
|
|
1249
1248
|
password: password$1,
|
|
1250
1249
|
username: username$1,
|
|
1251
1250
|
host: host$1,
|
|
1252
|
-
no_resource: no_resource$1
|
|
1251
|
+
no_resource: no_resource$1,
|
|
1252
|
+
all_namespaces: all_namespaces$1,
|
|
1253
|
+
clusterIp: clusterIp$1,
|
|
1254
|
+
select_container: select_container$1,
|
|
1255
|
+
sec: sec$1,
|
|
1256
|
+
min: min$1,
|
|
1257
|
+
hr: hr$1,
|
|
1258
|
+
day: day$1,
|
|
1259
|
+
port_mapping: port_mapping$1,
|
|
1260
|
+
out_cluster_access: out_cluster_access$1,
|
|
1261
|
+
in_cluster_access: in_cluster_access$1,
|
|
1262
|
+
fail_get_detail: fail_get_detail$1,
|
|
1263
|
+
pod_num: pod_num$1,
|
|
1264
|
+
show_data_value: show_data_value$1,
|
|
1265
|
+
hide_data_value: hide_data_value$1,
|
|
1266
|
+
please_input: please_input$1,
|
|
1267
|
+
create_failed: create_failed$1,
|
|
1268
|
+
create_failed_tip: create_failed_tip$1,
|
|
1269
|
+
save_failed: save_failed$1,
|
|
1270
|
+
save_failed_tip: save_failed_tip$1,
|
|
1271
|
+
completion_num_tooltip: completion_num_tooltip$1,
|
|
1272
|
+
ready_num_tooltip: ready_num_tooltip$1,
|
|
1273
|
+
realtime_log: realtime_log$1,
|
|
1274
|
+
previous_log: previous_log$1,
|
|
1275
|
+
auto_wrap: auto_wrap$1,
|
|
1276
|
+
container_num: container_num$1,
|
|
1277
|
+
edit_resource_success: edit_resource_success$1,
|
|
1278
|
+
redeploy_success_toast: redeploy_success_toast$1,
|
|
1279
|
+
redeploy_failed_toast: redeploy_failed_toast$1,
|
|
1280
|
+
pause_success_toast: pause_success_toast$1,
|
|
1281
|
+
pause_failed_toast: pause_failed_toast$1,
|
|
1282
|
+
resume_success_toast: resume_success_toast$1,
|
|
1283
|
+
resume_failed_toast: resume_failed_toast$1,
|
|
1284
|
+
delete_success_toast: delete_success_toast$1,
|
|
1285
|
+
delete_failed_toast: delete_failed_toast$1,
|
|
1286
|
+
create_success_toast: create_success_toast$1,
|
|
1287
|
+
save_yaml_success_toast: save_yaml_success_toast$1,
|
|
1288
|
+
save_replicas_success_toast: save_replicas_success_toast$1,
|
|
1289
|
+
save_replicas_failed_toast: save_replicas_failed_toast$1,
|
|
1290
|
+
port_mapping_title_tooltip: port_mapping_title_tooltip$1,
|
|
1291
|
+
in_cluster_desc: in_cluster_desc$1,
|
|
1292
|
+
in_cluster_ip_desc: in_cluster_ip_desc$1,
|
|
1293
|
+
in_cluster_external_name_desc: in_cluster_external_name_desc$1,
|
|
1294
|
+
out_cluster_ip_desc: out_cluster_ip_desc$1,
|
|
1295
|
+
out_cluster_node_port_desc: out_cluster_node_port_desc$1,
|
|
1296
|
+
out_cluster_lb_desc: out_cluster_lb_desc$1,
|
|
1297
|
+
out_external_name_desc: out_external_name_desc$1,
|
|
1298
|
+
image: image$1,
|
|
1299
|
+
restarts: restarts$1,
|
|
1300
|
+
updated_time: updated_time$1,
|
|
1301
|
+
init_container: init_container$1,
|
|
1302
|
+
regular_container: regular_container$1,
|
|
1303
|
+
suspend: suspend$1,
|
|
1304
|
+
default_backend: default_backend$1,
|
|
1305
|
+
ingress_class: ingress_class$1,
|
|
1306
|
+
pod_ready_num: pod_ready_num$1,
|
|
1307
|
+
pod_complete_num: pod_complete_num$1,
|
|
1308
|
+
pod_replicas_num: pod_replicas_num$1,
|
|
1309
|
+
edit_replicas: edit_replicas$1,
|
|
1310
|
+
dns_record: dns_record$1,
|
|
1311
|
+
basic_info: basic_info$1,
|
|
1312
|
+
pod_selector: pod_selector$1,
|
|
1313
|
+
ingress_rule: ingress_rule$1,
|
|
1314
|
+
egress_rule: egress_rule$1,
|
|
1315
|
+
service_port: service_port$1,
|
|
1316
|
+
pod_port: pod_port$1,
|
|
1317
|
+
path_type: path_type$1,
|
|
1318
|
+
only_support_one_yaml: only_support_one_yaml$1
|
|
1253
1319
|
};
|
|
1254
1320
|
const EN = {
|
|
1255
1321
|
dovetail: dovetail$1
|
|
@@ -1403,6 +1469,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1403
1469
|
const out_cluster_node_port_desc = "NodePort 展示<strong>节点 IP:nodeport</strong>。";
|
|
1404
1470
|
const out_cluster_lb_desc = "LoadBalancer 展示 <strong>ingress[*].ip</strong>。";
|
|
1405
1471
|
const out_external_name_desc = "ExternalName 展示 <strong>external-ip</strong>。";
|
|
1472
|
+
const only_support_one_yaml = "一次仅支持输入一个 YAML 配置。";
|
|
1406
1473
|
const dovetail = {
|
|
1407
1474
|
copy,
|
|
1408
1475
|
reset_arguments,
|
|
@@ -1555,7 +1622,8 @@ var __publicField = (obj, key, value) => {
|
|
|
1555
1622
|
out_cluster_ip_desc,
|
|
1556
1623
|
out_cluster_node_port_desc,
|
|
1557
1624
|
out_cluster_lb_desc,
|
|
1558
|
-
out_external_name_desc
|
|
1625
|
+
out_external_name_desc,
|
|
1626
|
+
only_support_one_yaml
|
|
1559
1627
|
};
|
|
1560
1628
|
const ZH = {
|
|
1561
1629
|
dovetail
|
|
@@ -6356,7 +6424,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6356
6424
|
function unary(func) {
|
|
6357
6425
|
return ary(func, 1);
|
|
6358
6426
|
}
|
|
6359
|
-
function
|
|
6427
|
+
function wrap(value2, wrapper) {
|
|
6360
6428
|
return partial(castFunction(wrapper), value2);
|
|
6361
6429
|
}
|
|
6362
6430
|
function castArray() {
|
|
@@ -7479,7 +7547,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7479
7547
|
lodash2.valuesIn = valuesIn;
|
|
7480
7548
|
lodash2.without = without;
|
|
7481
7549
|
lodash2.words = words;
|
|
7482
|
-
lodash2.wrap =
|
|
7550
|
+
lodash2.wrap = wrap;
|
|
7483
7551
|
lodash2.xor = xor;
|
|
7484
7552
|
lodash2.xorBy = xorBy;
|
|
7485
7553
|
lodash2.xorWith = xorWith;
|
|
@@ -10477,7 +10545,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10477
10545
|
}));
|
|
10478
10546
|
}
|
|
10479
10547
|
const useEagleTable = (params) => {
|
|
10480
|
-
var _a, _b
|
|
10548
|
+
var _a, _b;
|
|
10481
10549
|
const { columns, tableProps, formatter, Dropdown = K8sDropdown } = params;
|
|
10482
10550
|
const [selectedKeys, setSelectedKeys] = React.useState([]);
|
|
10483
10551
|
const [currentPage, setCurrentPage] = React.useState((tableProps == null ? void 0 : tableProps.currentPage) || 1);
|
|
@@ -10544,10 +10612,6 @@ var __publicField = (obj, key, value) => {
|
|
|
10544
10612
|
order: "desc"
|
|
10545
10613
|
}]);
|
|
10546
10614
|
}, []);
|
|
10547
|
-
React.useEffect(() => {
|
|
10548
|
-
setCurrentPage(1);
|
|
10549
|
-
table.setCurrent(1);
|
|
10550
|
-
}, [(_c = params.useTableParams) == null ? void 0 : _c.filters]);
|
|
10551
10615
|
return { tableProps: finalProps, selectedKeys, ...table };
|
|
10552
10616
|
};
|
|
10553
10617
|
function CreateButton() {
|
|
@@ -10671,13 +10735,11 @@ var __publicField = (obj, key, value) => {
|
|
|
10671
10735
|
const [selectedKeys] = React.useState([]);
|
|
10672
10736
|
const component = React.useContext(ComponentContext);
|
|
10673
10737
|
const Table$1 = component.Table || Table;
|
|
10674
|
-
const columns = [NameColumnRenderer(i18n2, "jobs"), StateDisplayColumnRenderer(i18n2), NameSpaceColumnRenderer(i18n2), {
|
|
10738
|
+
const columns = React.useMemo(() => [NameColumnRenderer(i18n2, "jobs"), StateDisplayColumnRenderer(i18n2), NameSpaceColumnRenderer(i18n2), {
|
|
10675
10739
|
...WorkloadImageColumnRenderer(i18n2),
|
|
10676
10740
|
width: 238
|
|
10677
|
-
}, CompletionsCountColumnRenderer(i18n2), DurationColumnRenderer(i18n2), AgeColumnRenderer(i18n2)];
|
|
10678
|
-
const {
|
|
10679
|
-
tableProps
|
|
10680
|
-
} = useEagleTable({
|
|
10741
|
+
}, CompletionsCountColumnRenderer(i18n2), DurationColumnRenderer(i18n2), AgeColumnRenderer(i18n2)], [i18n2]);
|
|
10742
|
+
const params = React.useMemo(() => ({
|
|
10681
10743
|
columns,
|
|
10682
10744
|
useTableParams: {
|
|
10683
10745
|
resource: "jobs",
|
|
@@ -10695,7 +10757,10 @@ var __publicField = (obj, key, value) => {
|
|
|
10695
10757
|
}]
|
|
10696
10758
|
}
|
|
10697
10759
|
}
|
|
10698
|
-
});
|
|
10760
|
+
}), [columns, owner]);
|
|
10761
|
+
const {
|
|
10762
|
+
tableProps
|
|
10763
|
+
} = useEagleTable(params);
|
|
10699
10764
|
if (!((_a = tableProps.data) == null ? void 0 : _a.length) && !tableProps.loading) {
|
|
10700
10765
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(WidgetErrorContent, {
|
|
10701
10766
|
errorText: i18n2.t("dovetail.no_resource", {
|
|
@@ -10762,7 +10827,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10762
10827
|
],
|
|
10763
10828
|
[i18n2]
|
|
10764
10829
|
);
|
|
10765
|
-
const
|
|
10830
|
+
const params = React.useMemo(() => ({
|
|
10766
10831
|
columns,
|
|
10767
10832
|
tableProps: {
|
|
10768
10833
|
defaultSize: 50
|
|
@@ -10788,7 +10853,8 @@ var __publicField = (obj, key, value) => {
|
|
|
10788
10853
|
}]
|
|
10789
10854
|
}
|
|
10790
10855
|
}
|
|
10791
|
-
});
|
|
10856
|
+
}), [columns, regardingName, regardingNamespace]);
|
|
10857
|
+
const { tableProps } = useEagleTable(params);
|
|
10792
10858
|
const component = React.useContext(ComponentContext);
|
|
10793
10859
|
const Table$1 = component.Table || Table;
|
|
10794
10860
|
if (!((_b = tableProps.data) == null ? void 0 : _b.length) && !tableProps.loading) {
|
|
@@ -11066,8 +11132,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11066
11132
|
const {
|
|
11067
11133
|
showConfig,
|
|
11068
11134
|
formatter,
|
|
11069
|
-
Dropdown = K8sDropdown
|
|
11070
|
-
data: data2
|
|
11135
|
+
Dropdown = K8sDropdown
|
|
11071
11136
|
} = props;
|
|
11072
11137
|
const kit = eagle.useUIKit();
|
|
11073
11138
|
const parsed = core.useParsed();
|
|
@@ -11075,9 +11140,18 @@ var __publicField = (obj, key, value) => {
|
|
|
11075
11140
|
resource
|
|
11076
11141
|
} = core.useResource();
|
|
11077
11142
|
const id = (_a = parsed == null ? void 0 : parsed.params) == null ? void 0 : _a.id;
|
|
11143
|
+
const {
|
|
11144
|
+
queryResult
|
|
11145
|
+
} = core.useShow({
|
|
11146
|
+
id,
|
|
11147
|
+
errorNotification: false
|
|
11148
|
+
});
|
|
11078
11149
|
const {
|
|
11079
11150
|
t: t2
|
|
11080
11151
|
} = useTranslation();
|
|
11152
|
+
const {
|
|
11153
|
+
data: data2
|
|
11154
|
+
} = queryResult;
|
|
11081
11155
|
const navigation = core.useNavigation();
|
|
11082
11156
|
const go = core.useGo();
|
|
11083
11157
|
const openForm = useOpenForm({
|
|
@@ -17517,7 +17591,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17517
17591
|
const [logType, setLogType] = React.useState("realtime");
|
|
17518
17592
|
const [currentItemCount, setCurrentItemCount] = React.useState(0);
|
|
17519
17593
|
const [paused, setPaused] = React.useState(false);
|
|
17520
|
-
const [
|
|
17594
|
+
const [wrap, setWrap] = React.useState(false);
|
|
17521
17595
|
const [linesBehind, setLinesBehind] = React.useState(0);
|
|
17522
17596
|
const logViewerRef = React.useRef(null);
|
|
17523
17597
|
const abortControllerRef = React.useRef(null);
|
|
@@ -17667,7 +17741,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17667
17741
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
|
|
17668
17742
|
className: ToolbarAreaStyle,
|
|
17669
17743
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(kit.checkbox, {
|
|
17670
|
-
checked:
|
|
17744
|
+
checked: wrap,
|
|
17671
17745
|
onChange: (e2) => setWrap(e2.target.checked),
|
|
17672
17746
|
children: t2("dovetail.auto_wrap")
|
|
17673
17747
|
}), /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
|
|
@@ -17692,7 +17766,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17692
17766
|
hasLineNumbers: true,
|
|
17693
17767
|
data: logs,
|
|
17694
17768
|
theme: "light",
|
|
17695
|
-
isTextWrapped:
|
|
17769
|
+
isTextWrapped: wrap,
|
|
17696
17770
|
onScroll
|
|
17697
17771
|
})
|
|
17698
17772
|
})]
|
|
@@ -18206,11 +18280,11 @@ var __publicField = (obj, key, value) => {
|
|
|
18206
18280
|
retry: 1
|
|
18207
18281
|
},
|
|
18208
18282
|
errorNotification: () => {
|
|
18209
|
-
var _a2
|
|
18283
|
+
var _a2;
|
|
18210
18284
|
return {
|
|
18211
18285
|
message: i18n2.t("dovetail.fail_get_detail", {
|
|
18212
|
-
resource:
|
|
18213
|
-
name: (
|
|
18286
|
+
resource: resource == null ? void 0 : resource.name,
|
|
18287
|
+
name: (_a2 = parsed == null ? void 0 : parsed.params) == null ? void 0 : _a2.id,
|
|
18214
18288
|
interpolation: { escapeValue: false }
|
|
18215
18289
|
}),
|
|
18216
18290
|
description: "Error",
|
|
@@ -18218,13 +18292,13 @@ var __publicField = (obj, key, value) => {
|
|
|
18218
18292
|
};
|
|
18219
18293
|
}
|
|
18220
18294
|
});
|
|
18221
|
-
const { isLoading, isError
|
|
18295
|
+
const { isLoading, isError } = queryResult;
|
|
18222
18296
|
React.useEffect(() => {
|
|
18223
18297
|
if (isError && resource) {
|
|
18224
18298
|
nav.list(resource);
|
|
18225
18299
|
}
|
|
18226
18300
|
}, [isError, nav, resource]);
|
|
18227
|
-
return isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Loading, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(ShowContent, { ...props
|
|
18301
|
+
return isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Loading, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(ShowContent, { ...props });
|
|
18228
18302
|
};
|
|
18229
18303
|
const index_17v8shn = "";
|
|
18230
18304
|
const WrapperStyle$1 = "w1akirqw";
|
|
@@ -18673,9 +18747,9 @@ var __publicField = (obj, key, value) => {
|
|
|
18673
18747
|
})
|
|
18674
18748
|
});
|
|
18675
18749
|
};
|
|
18676
|
-
function
|
|
18750
|
+
function useNamespaceRefineFilter() {
|
|
18677
18751
|
const { value: nsFilters = [] } = useNamespacesFilter();
|
|
18678
|
-
|
|
18752
|
+
const filters = React.useMemo(() => ({
|
|
18679
18753
|
permanent: [
|
|
18680
18754
|
{
|
|
18681
18755
|
operator: "or",
|
|
@@ -18686,7 +18760,8 @@ var __publicField = (obj, key, value) => {
|
|
|
18686
18760
|
}))
|
|
18687
18761
|
}
|
|
18688
18762
|
]
|
|
18689
|
-
};
|
|
18763
|
+
}), [nsFilters]);
|
|
18764
|
+
return filters;
|
|
18690
18765
|
}
|
|
18691
18766
|
const index_hp158y = "";
|
|
18692
18767
|
const ListPageStyle = "laykzsq";
|
|
@@ -18752,7 +18827,7 @@ var __publicField = (obj, key, value) => {
|
|
|
18752
18827
|
const { formatter, columns, Dropdown, noShow } = props.config;
|
|
18753
18828
|
const { i18n: i18n2 } = useTranslation();
|
|
18754
18829
|
const nameRenderer = noShow ? PlainTextNameColumnRenderer(i18n2) : NameColumnRenderer(i18n2);
|
|
18755
|
-
const filters =
|
|
18830
|
+
const filters = useNamespaceRefineFilter();
|
|
18756
18831
|
const { tableProps, selectedKeys } = useEagleTable({
|
|
18757
18832
|
useTableParams: {
|
|
18758
18833
|
filters
|
|
@@ -18765,6 +18840,9 @@ var __publicField = (obj, key, value) => {
|
|
|
18765
18840
|
formatter,
|
|
18766
18841
|
Dropdown
|
|
18767
18842
|
});
|
|
18843
|
+
React.useEffect(() => {
|
|
18844
|
+
tableProps.onPageChange(1);
|
|
18845
|
+
}, [filters]);
|
|
18768
18846
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ListPage, { selectedKeys, tableProps });
|
|
18769
18847
|
}
|
|
18770
18848
|
function ResourceShow(props) {
|
|
@@ -23852,7 +23930,7 @@ var __publicField = (obj, key, value) => {
|
|
|
23852
23930
|
const parsed = core.useParsed();
|
|
23853
23931
|
const nav = core.useNavigation();
|
|
23854
23932
|
const { queryResult } = core.useShow({ id: (_a = parsed == null ? void 0 : parsed.params) == null ? void 0 : _a.id });
|
|
23855
|
-
const { isLoading
|
|
23933
|
+
const { isLoading } = queryResult;
|
|
23856
23934
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
23857
23935
|
antd.Drawer,
|
|
23858
23936
|
{
|
|
@@ -23861,7 +23939,7 @@ var __publicField = (obj, key, value) => {
|
|
|
23861
23939
|
onClose: () => nav.goBack(),
|
|
23862
23940
|
width: "50%",
|
|
23863
23941
|
visible: !!((_b = parsed == null ? void 0 : parsed.params) == null ? void 0 : _b.id),
|
|
23864
|
-
children: isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(kit.loading, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(ShowContent, { ...props
|
|
23942
|
+
children: isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(kit.loading, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(ShowContent, { ...props })
|
|
23865
23943
|
}
|
|
23866
23944
|
);
|
|
23867
23945
|
};
|
|
@@ -24899,6 +24977,7 @@ var __publicField = (obj, key, value) => {
|
|
|
24899
24977
|
exports2.useEagleTable = useEagleTable;
|
|
24900
24978
|
exports2.useEdit = useEdit;
|
|
24901
24979
|
exports2.useGlobalStore = useGlobalStore;
|
|
24980
|
+
exports2.useNamespaceRefineFilter = useNamespaceRefineFilter;
|
|
24902
24981
|
exports2.useNamespacesFilter = useNamespacesFilter;
|
|
24903
24982
|
exports2.useOpenForm = useOpenForm;
|
|
24904
24983
|
exports2.useRefineForm = useRefineForm;
|
package/lib/src/App.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { createBrowserHistory } from 'history';
|
|
3
|
+
import { GlobalStore } from 'k8s-api-provider';
|
|
4
|
+
import { useMemo } from 'react';
|
|
5
|
+
import { I18nextProvider } from 'react-i18next';
|
|
6
|
+
import { Route, Router } from 'react-router-dom';
|
|
7
|
+
import { Layout } from './components';
|
|
8
|
+
import { CRONJOB_INIT_VALUE, DAEMONSET_INIT_VALUE, STATEFULSET_INIT_VALUE, POD_INIT_VALUE, } from './constants/k8s';
|
|
9
|
+
import { Dovetail } from './Dovetail';
|
|
10
|
+
import i18n from './i18n';
|
|
11
|
+
import { ConfigMapConfig } from './pages/configmaps';
|
|
12
|
+
import { CronJobForm, CronJobList, CronJobShow } from './pages/cronjobs';
|
|
13
|
+
import { DaemonSetForm, DaemonSetList, DaemonSetShow } from './pages/daemonsets';
|
|
14
|
+
import { DeploymentForm, DeploymentList, DeploymentShow } from './pages/deployments';
|
|
15
|
+
import { IngressConfig } from './pages/ingresses';
|
|
16
|
+
import { JobConfig } from './pages/jobs';
|
|
17
|
+
import { NetworkPolicyConfig } from './pages/networkPolicies';
|
|
18
|
+
import { PodShow, PodList, PodForm } from './pages/pods';
|
|
19
|
+
import { SecretsConfig } from './pages/secrets';
|
|
20
|
+
import { ServicesConfig } from './pages/services';
|
|
21
|
+
import { StatefulSetShow, StatefulSetList, StatefulSetForm } from './pages/statefulsets';
|
|
22
|
+
import { ProviderPlugins } from './plugins';
|
|
23
|
+
import { RESOURCE_GROUP, FormType } from './types';
|
|
24
|
+
function App() {
|
|
25
|
+
const histroy = createBrowserHistory();
|
|
26
|
+
const resourcesConfig = useMemo(() => {
|
|
27
|
+
return [
|
|
28
|
+
{
|
|
29
|
+
name: 'cronjobs',
|
|
30
|
+
basePath: '/apis/batch/v1beta1',
|
|
31
|
+
kind: 'CronJob',
|
|
32
|
+
parent: RESOURCE_GROUP.WORKLOAD,
|
|
33
|
+
label: 'CronJobs',
|
|
34
|
+
initValue: CRONJOB_INIT_VALUE,
|
|
35
|
+
isCustom: true,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'daemonsets',
|
|
39
|
+
basePath: '/apis/apps/v1',
|
|
40
|
+
kind: 'DaemonSet',
|
|
41
|
+
parent: RESOURCE_GROUP.WORKLOAD,
|
|
42
|
+
label: 'DaemonSets',
|
|
43
|
+
initValue: DAEMONSET_INIT_VALUE,
|
|
44
|
+
isCustom: true,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'deployments',
|
|
48
|
+
basePath: '/apis/apps/v1',
|
|
49
|
+
kind: 'Deployment',
|
|
50
|
+
parent: RESOURCE_GROUP.WORKLOAD,
|
|
51
|
+
label: 'Deployments',
|
|
52
|
+
formType: FormType.MODAL,
|
|
53
|
+
FormModal: DeploymentForm,
|
|
54
|
+
isCustom: true,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'statefulsets',
|
|
58
|
+
basePath: '/apis/apps/v1',
|
|
59
|
+
kind: 'StatefulSet',
|
|
60
|
+
parent: RESOURCE_GROUP.WORKLOAD,
|
|
61
|
+
label: 'StatefulSets',
|
|
62
|
+
initValue: STATEFULSET_INIT_VALUE,
|
|
63
|
+
isCustom: true,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'pods',
|
|
67
|
+
basePath: '/api/v1',
|
|
68
|
+
kind: 'Pod',
|
|
69
|
+
parent: RESOURCE_GROUP.WORKLOAD,
|
|
70
|
+
label: 'Pods',
|
|
71
|
+
initValue: POD_INIT_VALUE,
|
|
72
|
+
isCustom: true,
|
|
73
|
+
},
|
|
74
|
+
JobConfig,
|
|
75
|
+
IngressConfig,
|
|
76
|
+
NetworkPolicyConfig,
|
|
77
|
+
ConfigMapConfig,
|
|
78
|
+
SecretsConfig,
|
|
79
|
+
ServicesConfig,
|
|
80
|
+
];
|
|
81
|
+
}, []);
|
|
82
|
+
const globalStore = useMemo(() => {
|
|
83
|
+
return new GlobalStore({
|
|
84
|
+
apiUrl: '/api/k8s',
|
|
85
|
+
watchWsApiUrl: 'api/sks-ws/k8s',
|
|
86
|
+
prefix: 'default',
|
|
87
|
+
}, ProviderPlugins);
|
|
88
|
+
}, []);
|
|
89
|
+
return (_jsx(I18nextProvider, { i18n: i18n, children: _jsx(Dovetail, { resourcesConfig: resourcesConfig, Layout: Layout, history: histroy, globalStore: globalStore, children: _jsxs(Router, { history: histroy, children: [_jsx(Route, { path: "/cronjobs", exact: true, children: _jsx(CronJobList, {}) }), _jsx(Route, { path: "/cronjobs/show", children: _jsx(CronJobShow, {}) }), _jsx(Route, { path: "/cronjobs/create", children: _jsx(CronJobForm, {}) }), _jsx(Route, { path: "/cronjobs/edit", children: _jsx(CronJobForm, {}) }), _jsx(Route, { path: "/daemonsets", exact: true, children: _jsx(DaemonSetList, {}) }), _jsx(Route, { path: "/daemonsets/show", children: _jsx(DaemonSetShow, {}) }), _jsx(Route, { path: "/daemonsets/create", children: _jsx(DaemonSetForm, {}) }), _jsx(Route, { path: "/daemonsets/edit", children: _jsx(DaemonSetForm, {}) }), _jsx(Route, { path: "/deployments", exact: true, children: _jsx(DeploymentList, {}) }), _jsx(Route, { path: "/deployments/show", children: _jsx(DeploymentShow, {}) }), _jsx(Route, { path: "/statefulsets", exact: true, children: _jsx(StatefulSetList, {}) }), _jsx(Route, { path: "/statefulsets/show", children: _jsx(StatefulSetShow, {}) }), _jsx(Route, { path: "/statefulsets/create", children: _jsx(StatefulSetForm, {}) }), _jsx(Route, { path: "/statefulsets/edit", children: _jsx(StatefulSetForm, {}) }), _jsx(Route, { path: "/pods", exact: true, children: _jsx(PodList, {}) }), _jsx(Route, { path: "/pods/show", children: _jsx(PodShow, {}) }), _jsx(Route, { path: "/pods/create", children: _jsx(PodForm, {}) }), _jsx(Route, { path: "/pods/edit", children: _jsx(PodForm, {}) })] }) }) }));
|
|
90
|
+
}
|
|
91
|
+
export default App;
|