@dovetail-v2/refine 0.0.66-alpha.0 → 0.0.66-pod-exec.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MonacoYamlDiffEditor-bcc9a5fe.js → MonacoYamlDiffEditor-f07df2b6.js} +1 -1
- package/dist/{index-4ac6ee9d.js → index-ea6dd427.js} +15817 -1757
- package/dist/refine.js +167 -154
- package/dist/refine.umd.cjs +15710 -1650
- package/dist/style.css +229 -11
- package/lib/App.d.ts +2 -0
- package/lib/Dovetail.d.ts +18 -0
- package/lib/components/Breadcrumb/index.d.ts +5 -0
- package/lib/components/ConditionsTable/ConditionsTable.d.ts +7 -0
- package/lib/components/CreateButton/index.d.ts +1 -0
- package/lib/components/CronJobDropdown/index.d.ts +8 -0
- package/lib/components/CronjobJobsTable/index.d.ts +8 -0
- package/lib/components/DeleteButton/index.d.ts +2 -0
- package/lib/components/DeleteManyButton/index.d.ts +4 -0
- package/lib/components/DrawerShow/DrawerShow.d.ts +8 -0
- package/lib/components/DurationTime/index.d.ts +5 -0
- package/lib/components/EditButton/index.d.ts +2 -0
- package/lib/components/EditField/index.d.ts +15 -0
- package/lib/components/ErrorContent/index.d.ts +17 -0
- package/lib/components/EventsTable/EventsTable.d.ts +6 -0
- package/lib/{src/components/FormModal/index.d.ts → components/Form/FormModal.d.ts} +2 -2
- package/lib/{src/components/RefineForm → components/Form}/RefineFormContent.d.ts +5 -4
- package/lib/{src/components/RefineForm → components/Form}/RefineFormPage.d.ts +0 -1
- package/lib/components/Form/YamlForm.d.ts +28 -0
- package/lib/components/Form/index.d.ts +7 -0
- package/lib/components/Form/type.d.ts +17 -0
- package/lib/components/Form/useReactHookForm.d.ts +29 -0
- package/lib/components/Form/useRefineForm.d.ts +13 -0
- package/lib/{src/hooks/useEagleForm.d.ts → components/Form/useYamlForm.d.ts} +8 -4
- package/lib/components/FormErrorAlert/index.d.ts +9 -0
- package/lib/components/FormLayout/index.d.ts +7 -0
- package/lib/{src/components/Form → components/FormWidgets}/KeyValueListWidget.d.ts +0 -1
- package/lib/{src/components/Form → components/FormWidgets}/MetadataForm.d.ts +0 -1
- package/lib/{src/components/Form → components/FormWidgets}/NameInputWidget.d.ts +0 -1
- package/lib/{src/components/Form → components/FormWidgets}/NamespaceSelectWidget.d.ts +0 -1
- package/lib/components/ImageNames/index.d.ts +5 -0
- package/lib/components/IngressRulesComponent/index.d.ts +5 -0
- package/lib/components/IngressRulesTable/IngressRulesTable.d.ts +7 -0
- package/lib/components/K8sDropdown/index.d.ts +9 -0
- package/lib/components/KeyValue/KeyValue.d.ts +7 -0
- package/lib/components/KeyValue/KeyValueAnnotation.d.ts +5 -0
- package/lib/components/KeyValue/KeyValueSecret.d.ts +4 -0
- package/lib/components/KeyValue/index.d.ts +3 -0
- package/lib/components/Layout/index.d.ts +3 -0
- package/lib/components/LinkFallback/index.d.ts +3 -0
- package/lib/components/ListPage/index.d.ts +9 -0
- package/lib/components/Menu/index.d.ts +1 -0
- package/lib/components/NamespacesFilter/index.d.ts +11 -0
- package/lib/{src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.d.ts → components/NetworkPolicyRulesViewer/NetworkPolicyRulesViewer.d.ts} +2 -1
- package/lib/components/NetworkPolicyRulesViewer/index.d.ts +1 -0
- package/lib/components/PageShow/PageShow.d.ts +12 -0
- package/lib/components/PodContainersTable/PodContainersTable.d.ts +8 -0
- package/lib/components/PodDropdown/index.d.ts +9 -0
- package/lib/components/PodLog/index.d.ts +6 -0
- package/lib/components/PodSelectorTable/index.d.ts +6 -0
- package/lib/components/PodShellModal/PodShell.d.ts +18 -0
- package/lib/components/PodShellModal/index.d.ts +9 -0
- package/lib/components/PortsTable/index.d.ts +7 -0
- package/lib/components/ReferenceLink/index.d.ts +8 -0
- package/lib/components/ReplicasDropdown/index.d.ts +9 -0
- package/lib/components/ResourceCRUD/ResourceCRUD.d.ts +7 -0
- package/lib/components/ResourceCRUD/create/index.d.ts +7 -0
- package/lib/components/ResourceCRUD/list/index.d.ts +8 -0
- package/lib/components/ResourceCRUD/show/index.d.ts +8 -0
- package/lib/components/ResourceFiledDisplays.d.ts +6 -0
- package/lib/components/ResourceLink/index.d.ts +8 -0
- package/lib/components/ResourceSelect/index.d.ts +11 -0
- package/lib/components/ResourceUsageBar/index.d.ts +8 -0
- package/lib/components/Separator/index.d.ts +2 -0
- package/lib/components/ServiceComponents/index.d.ts +10 -0
- package/lib/components/Shell/index.d.ts +54 -0
- package/lib/components/ShowContent/ShowContent.d.ts +18 -0
- package/lib/components/ShowContent/fields.d.ts +68 -0
- package/lib/components/ShowContent/groups.d.ts +23 -0
- package/lib/{src/components/ShowContent/index.js → components/ShowContent/index.d.ts} +2 -0
- package/lib/components/ShowContent/tabs.d.ts +5 -0
- package/lib/components/StateTag/StateTag.d.ts +10 -0
- package/lib/components/Table/TableToolBar.d.ts +8 -0
- package/lib/components/Table/TableWidgets.d.ts +6 -0
- package/lib/components/Table/index.d.ts +43 -0
- package/lib/components/Tabs/index.d.ts +10 -0
- package/lib/components/Tags/index.d.ts +6 -0
- package/lib/components/TextTags/index.d.ts +6 -0
- package/lib/components/Time/index.d.ts +8 -0
- package/lib/components/ValueDisplay/index.d.ts +9 -0
- package/lib/components/WorkloadDropdown/index.d.ts +9 -0
- package/lib/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +9 -0
- package/lib/components/WorkloadReplicas/index.d.ts +17 -0
- package/lib/components/YamlEditor/MonacoYamlDiffEditor.d.ts +9 -0
- package/lib/components/YamlEditor/MonacoYamlEditor.d.ts +19 -0
- package/lib/components/YamlEditor/YamlEditorComponent.d.ts +27 -0
- package/lib/components/YamlEditor/style.d.ts +11 -0
- package/lib/{src/components/index.js → components/index.d.ts} +13 -4
- package/lib/constants/auth.d.ts +5 -0
- package/lib/{src/constants/index.js → constants/index.d.ts} +1 -0
- package/lib/constants/k8s.d.ts +487 -0
- package/lib/constants/state.d.ts +15 -0
- package/lib/contexts/component.d.ts +7 -0
- package/lib/contexts/configs.d.ts +3 -0
- package/lib/contexts/global-store.d.ts +5 -0
- package/lib/{src/hooks/index.js → hooks/index.d.ts} +2 -1
- package/lib/hooks/useDeleteModal/useDeleteManyModal.d.ts +7 -0
- package/lib/hooks/useDeleteModal/useDeleteModal.d.ts +7 -0
- package/lib/hooks/useDownloadYAML.d.ts +7 -0
- package/lib/hooks/useEagleTable/columns.d.ts +41 -0
- package/lib/hooks/useEagleTable/useEagleTable.d.ts +55 -0
- package/lib/hooks/useEdit.d.ts +4 -0
- package/lib/hooks/useGlobalStore.d.ts +3 -0
- package/lib/hooks/useK8sYamlEditor.d.ts +5 -0
- package/lib/hooks/useNamespaceRefineFilter.d.ts +5 -0
- package/lib/hooks/useOpenForm.d.ts +7 -0
- package/lib/hooks/useSchema.d.ts +14 -0
- package/lib/hooks/useSubmitForm.d.ts +14 -0
- package/lib/hooks/useTableData.d.ts +19 -0
- package/lib/i18n.d.ts +353 -0
- package/lib/{src/index.js → index.d.ts} +1 -3
- package/lib/locales/en-US/index.d.ts +175 -0
- package/lib/locales/index.d.ts +2 -0
- package/lib/locales/zh-CN/index.d.ts +175 -0
- package/lib/main.d.ts +3 -0
- package/lib/models/cronjob-model.d.ts +15 -0
- package/lib/models/daemonset-model.d.ts +15 -0
- package/lib/models/deployment-model.d.ts +13 -0
- package/lib/models/event-model.d.ts +7 -0
- package/lib/{src/models/index.js → models/index.d.ts} +5 -0
- package/lib/models/ingress-model.d.ts +20 -0
- package/lib/models/job-model.d.ts +20 -0
- package/lib/models/network-policy-model.d.ts +9 -0
- package/lib/models/node-model.d.ts +17 -0
- package/lib/models/persistent-volume-claim.d.ts +9 -0
- package/lib/models/persistent-volume.d.ts +9 -0
- package/lib/models/pod-metrics-model.d.ts +8 -0
- package/lib/models/pod-model.d.ts +20 -0
- package/lib/models/resource-model.d.ts +21 -0
- package/lib/models/service-model.d.ts +24 -0
- package/lib/models/statefulset-model.d.ts +13 -0
- package/lib/models/storage-class.d.ts +12 -0
- package/lib/models/types/metric.d.ts +25 -0
- package/lib/models/workload-base-model.d.ts +12 -0
- package/lib/models/workload-model.d.ts +18 -0
- package/lib/pages/configmaps/index.d.ts +4 -0
- package/lib/{src/pages/statefulsets → pages/cronjobs}/create/index.d.ts +1 -1
- package/lib/{src/pages/statefulsets/show → pages/cronjobs/list}/index.d.ts +1 -1
- package/lib/{src/pages/statefulsets/list → pages/cronjobs/show}/index.d.ts +1 -1
- package/lib/pages/daemonsets/create/index.d.ts +3 -0
- package/lib/pages/daemonsets/list/index.d.ts +3 -0
- package/lib/pages/daemonsets/show/index.d.ts +3 -0
- package/lib/{src/pages/pods/index.js → pages/deployments/index.d.ts} +0 -1
- package/lib/pages/deployments/list/index.d.ts +3 -0
- package/lib/pages/deployments/show/index.d.ts +3 -0
- package/lib/pages/ingresses/index.d.ts +4 -0
- package/lib/pages/jobs/index.d.ts +4 -0
- package/lib/pages/networkPolicies/index.d.ts +4 -0
- package/lib/pages/nodes/index.d.ts +2 -0
- package/lib/pages/nodes/list/index.d.ts +3 -0
- package/lib/pages/nodes/show/index.d.ts +3 -0
- package/lib/pages/persistentvolumeclaims/index.d.ts +4 -0
- package/lib/pages/persistentvolumes/index.d.ts +4 -0
- package/lib/pages/pods/create/index.d.ts +3 -0
- package/lib/pages/pods/list/index.d.ts +3 -0
- package/lib/pages/pods/show/index.d.ts +3 -0
- package/lib/pages/secrets/index.d.ts +4 -0
- package/lib/pages/services/index.d.ts +4 -0
- package/lib/pages/statefulsets/index.d.ts +4 -0
- package/lib/pages/storageclasses/form/index.d.ts +9 -0
- package/lib/pages/storageclasses/index.d.ts +44 -0
- package/lib/plugins/index.d.ts +4 -0
- package/lib/plugins/model-plugin.d.ts +13 -0
- package/lib/plugins/relation-plugin.d.ts +26 -0
- package/lib/plugins/type.d.ts +8 -0
- package/lib/providers/router-provider/index.d.ts +21 -0
- package/lib/src/components/Form/FormModal.d.ts +1 -0
- package/lib/src/components/ListPage/index.d.ts +1 -0
- package/lib/src/components/PodDropdown/index.d.ts +9 -0
- package/lib/src/components/PodShellModal/PodShell.d.ts +18 -0
- package/lib/src/components/PodShellModal/index.d.ts +10 -0
- package/lib/src/components/ResourceFiledDisplays.d.ts +7 -0
- package/lib/src/components/Shell/index.d.ts +54 -0
- package/lib/src/components/ShowContent/fields.d.ts +7 -2
- package/lib/src/components/index.d.ts +4 -0
- package/lib/src/hooks/useEagleTable/columns.d.ts +6 -6
- package/lib/src/i18n.d.ts +27 -1
- package/lib/src/locales/en-US/index.d.ts +15 -0
- package/lib/src/locales/zh-CN/index.d.ts +12 -1
- package/lib/src/models/cronjob-model.d.ts +0 -1
- package/lib/src/models/daemonset-model.d.ts +0 -1
- package/lib/src/models/deployment-model.d.ts +0 -1
- package/lib/src/models/event-model.d.ts +0 -1
- package/lib/src/models/ingress-model.d.ts +0 -1
- package/lib/src/models/job-model.d.ts +0 -1
- package/lib/src/models/network-policy-model.d.ts +0 -1
- package/lib/src/models/node-model.d.ts +0 -1
- package/lib/src/models/persistent-volume-claim.d.ts +0 -1
- package/lib/src/models/persistent-volume.d.ts +0 -1
- package/lib/src/models/pod-metrics-model.d.ts +0 -1
- package/lib/src/models/pod-model.d.ts +0 -1
- package/lib/src/models/resource-model.d.ts +1 -1
- package/lib/src/models/service-model.d.ts +0 -1
- package/lib/src/models/statefulset-model.d.ts +0 -1
- package/lib/src/models/storage-class.d.ts +0 -1
- package/lib/src/models/workload-base-model.d.ts +0 -1
- package/lib/src/models/workload-model.d.ts +0 -1
- package/lib/src/pages/persistentvolumeclaims/index.d.ts +4 -0
- package/lib/src/pages/persistentvolumes/index.d.ts +3 -18
- package/lib/src/utils/shell.d.ts +16 -0
- package/lib/types/resource.d.ts +62 -0
- package/lib/utils/addId.d.ts +3 -0
- package/lib/utils/download.d.ts +1 -0
- package/lib/utils/error.d.ts +20 -0
- package/lib/utils/form.d.ts +3 -0
- package/lib/utils/k8s.d.ts +3 -0
- package/lib/utils/labels.d.ts +9 -0
- package/lib/utils/match-selector.d.ts +3 -0
- package/lib/utils/openapi.d.ts +45 -0
- package/lib/utils/schema.d.ts +17 -0
- package/lib/utils/selector.d.ts +3 -0
- package/lib/utils/shell.d.ts +15 -0
- package/lib/utils/string.d.ts +1 -0
- package/lib/utils/time.d.ts +13 -0
- package/lib/utils/unit.d.ts +12 -0
- package/lib/utils/yaml.d.ts +2 -0
- package/package.json +14 -5
- 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/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/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/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/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/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.d.ts +0 -6
- 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.d.ts +0 -1
- package/lib/src/components/NetworkPolicyRulesTable/index.js +0 -1
- package/lib/src/components/PageShow/PageShow.js +0 -11
- package/lib/src/components/PodContainersTable/PodContainersTable.js +0 -78
- package/lib/src/components/PodLog/index.js +0 -136
- package/lib/src/components/ReferenceLink/index.js +0 -17
- package/lib/src/components/RefineForm/RefineFormModal.d.ts +0 -8
- 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/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/StateTag/StateTag.js +0 -22
- package/lib/src/components/Table/ErrorContent.d.ts +0 -10
- 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/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/style.js +0 -102
- package/lib/src/components/YamlForm/index.d.ts +0 -21
- package/lib/src/components/YamlForm/index.js +0 -61
- 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/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/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/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/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/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/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/list/index.js +0 -32
- package/lib/src/pages/daemonsets/show/index.js +0 -16
- package/lib/src/pages/deployments/create/index.d.ts +0 -3
- package/lib/src/pages/deployments/create/index.js +0 -7
- 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/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/router-provider/index.js +0 -100
- 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/lib/{src/components/ConditionsTable/index.js → components/ConditionsTable/index.d.ts} +0 -0
- /package/lib/{src/components/DrawerShow/index.js → components/DrawerShow/index.d.ts} +0 -0
- /package/lib/{src/components/EventsTable/index.js → components/EventsTable/index.d.ts} +0 -0
- /package/lib/{src/components/Form/index.js → components/FormWidgets/index.d.ts} +0 -0
- /package/lib/{src/components/Form → components/FormWidgets}/widget.d.ts +0 -0
- /package/lib/{src/components/IngressRulesTable/index.js → components/IngressRulesTable/index.d.ts} +0 -0
- /package/lib/{src/components/PageShow/index.js → components/PageShow/index.d.ts} +0 -0
- /package/lib/{src/components/PodContainersTable/index.js → components/PodContainersTable/index.d.ts} +0 -0
- /package/lib/{src/components/ResourceCRUD/index.js → components/ResourceCRUD/index.d.ts} +0 -0
- /package/lib/{src/components/StateTag/index.js → components/StateTag/index.d.ts} +0 -0
- /package/lib/{src/components/WorkloadPodsTable/index.js → components/WorkloadPodsTable/index.d.ts} +0 -0
- /package/lib/{src/components/YamlEditor/index.js → components/YamlEditor/index.d.ts} +0 -0
- /package/lib/{src/components/YamlEditor/yaml.worker.js → components/YamlEditor/yaml.worker.d.ts} +0 -0
- /package/lib/{src/contexts/index.js → contexts/index.d.ts} +0 -0
- /package/lib/{src/hooks/useDeleteModal/index.js → hooks/useDeleteModal/index.d.ts} +0 -0
- /package/lib/{src/hooks/useEagleTable/index.js → hooks/useEagleTable/index.d.ts} +0 -0
- /package/lib/{src/models/types/index.js → models/types/index.d.ts} +0 -0
- /package/lib/{src/pages/cronjobs/index.js → pages/cronjobs/index.d.ts} +0 -0
- /package/lib/{src/pages/daemonsets/index.js → pages/daemonsets/index.d.ts} +0 -0
- /package/lib/{src/pages/deployments/index.js → pages/pods/index.d.ts} +0 -0
- /package/lib/{src/providers/index.js → providers/index.d.ts} +0 -0
- /package/lib/{src/types/index.js → types/index.d.ts} +0 -0
|
@@ -4,7 +4,6 @@ import { ResourceModel } from './resource-model';
|
|
|
4
4
|
type NetworkPolicyTypes = Required<NetworkPolicy> & Unstructured;
|
|
5
5
|
export declare class NetworkPolicyModel extends ResourceModel<NetworkPolicyTypes> {
|
|
6
6
|
_rawYaml: NetworkPolicyTypes;
|
|
7
|
-
_globalStore: GlobalStore;
|
|
8
7
|
constructor(_rawYaml: NetworkPolicyTypes, _globalStore: GlobalStore);
|
|
9
8
|
}
|
|
10
9
|
export {};
|
|
@@ -8,7 +8,6 @@ export declare enum NodeRole {
|
|
|
8
8
|
}
|
|
9
9
|
export declare class NodeModel extends WorkloadBaseModel {
|
|
10
10
|
_rawYaml: RequiredNode;
|
|
11
|
-
_globalStore: GlobalStore;
|
|
12
11
|
constructor(_rawYaml: RequiredNode, _globalStore: GlobalStore);
|
|
13
12
|
get role(): NodeRole;
|
|
14
13
|
get ip(): string | undefined;
|
|
@@ -4,7 +4,6 @@ import { ResourceModel } from './resource-model';
|
|
|
4
4
|
type RequiredPersistentClaimVolume = Required<PersistentVolumeClaim> & Unstructured;
|
|
5
5
|
export declare class PersistentVolumeClaimModel extends ResourceModel {
|
|
6
6
|
_rawYaml: RequiredPersistentClaimVolume;
|
|
7
|
-
_globalStore: GlobalStore;
|
|
8
7
|
constructor(_rawYaml: RequiredPersistentClaimVolume, _globalStore: GlobalStore);
|
|
9
8
|
}
|
|
10
9
|
export {};
|
|
@@ -4,7 +4,6 @@ import { ResourceModel } from './resource-model';
|
|
|
4
4
|
type RequiredPersistentVolume = Required<PersistentVolume> & Unstructured;
|
|
5
5
|
export declare class PersistentVolumeModel extends ResourceModel {
|
|
6
6
|
_rawYaml: RequiredPersistentVolume;
|
|
7
|
-
_globalStore: GlobalStore;
|
|
8
7
|
constructor(_rawYaml: RequiredPersistentVolume, _globalStore: GlobalStore);
|
|
9
8
|
}
|
|
10
9
|
export {};
|
|
@@ -3,7 +3,6 @@ import { ResourceModel } from './resource-model';
|
|
|
3
3
|
import { PodMetrics, ResourceQuantity } from './types/metric';
|
|
4
4
|
export declare class PodMetricsModel extends ResourceModel<PodMetrics> {
|
|
5
5
|
_rawYaml: PodMetrics;
|
|
6
|
-
_globalStore: GlobalStore;
|
|
7
6
|
usage: ResourceQuantity;
|
|
8
7
|
constructor(_rawYaml: PodMetrics, _globalStore: GlobalStore);
|
|
9
8
|
}
|
|
@@ -5,7 +5,6 @@ import { WorkloadBaseModel } from './workload-base-model';
|
|
|
5
5
|
type RequiredPod = Required<Pod> & Unstructured;
|
|
6
6
|
export declare class PodModel extends WorkloadBaseModel {
|
|
7
7
|
_rawYaml: RequiredPod;
|
|
8
|
-
_globalStore: GlobalStore;
|
|
9
8
|
request: ResourceQuantity;
|
|
10
9
|
limit: ResourceQuantity;
|
|
11
10
|
spec?: RequiredPod['spec'];
|
|
@@ -2,11 +2,11 @@ import { GlobalStore, Unstructured } from 'k8s-api-provider';
|
|
|
2
2
|
export type IResourceModel = Unstructured & ResourceModel;
|
|
3
3
|
export declare class ResourceModel<T extends Unstructured = Unstructured> {
|
|
4
4
|
_rawYaml: T;
|
|
5
|
-
_globalStore: GlobalStore;
|
|
6
5
|
id: string;
|
|
7
6
|
apiVersion: T['apiVersion'];
|
|
8
7
|
kind: T['kind'];
|
|
9
8
|
metadata: T['metadata'];
|
|
9
|
+
_globalStore: GlobalStore;
|
|
10
10
|
constructor(_rawYaml: T, _globalStore: GlobalStore);
|
|
11
11
|
init(): Promise<void>;
|
|
12
12
|
get name(): string | undefined;
|
|
@@ -11,7 +11,6 @@ export declare enum ServiceTypeEnum {
|
|
|
11
11
|
}
|
|
12
12
|
export declare class ServiceModel extends ResourceModel<ServiceType> {
|
|
13
13
|
_rawYaml: ServiceType;
|
|
14
|
-
_globalStore: GlobalStore;
|
|
15
14
|
constructor(_rawYaml: ServiceType, _globalStore: GlobalStore);
|
|
16
15
|
get displayType(): string | undefined;
|
|
17
16
|
get dnsRecord(): string;
|
|
@@ -5,7 +5,6 @@ import { WorkloadModel } from './workload-model';
|
|
|
5
5
|
type RequiredStatefulSet = Required<StatefulSet> & Unstructured;
|
|
6
6
|
export declare class StatefulSetModel extends WorkloadModel {
|
|
7
7
|
_rawYaml: RequiredStatefulSet;
|
|
8
|
-
_globalStore: GlobalStore;
|
|
9
8
|
spec?: RequiredStatefulSet['spec'];
|
|
10
9
|
status?: RequiredStatefulSet['status'];
|
|
11
10
|
constructor(_rawYaml: RequiredStatefulSet, _globalStore: GlobalStore);
|
|
@@ -5,7 +5,6 @@ import { ResourceModel } from './resource-model';
|
|
|
5
5
|
type RequiredStorageClass = Required<StorageClass> & Unstructured;
|
|
6
6
|
export declare class StorageClassModel extends ResourceModel {
|
|
7
7
|
_rawYaml: RequiredStorageClass;
|
|
8
|
-
_globalStore: GlobalStore;
|
|
9
8
|
pvs: PersistentVolumeModel[];
|
|
10
9
|
constructor(_rawYaml: RequiredStorageClass, _globalStore: GlobalStore);
|
|
11
10
|
init(): Promise<void>;
|
|
@@ -6,7 +6,6 @@ import { ResourceModel } from './resource-model';
|
|
|
6
6
|
type WorkloadBaseTypes = Required<Deployment | StatefulSet | Job | DaemonSet | CronJob | Pod | Node> & Unstructured;
|
|
7
7
|
export declare class WorkloadBaseModel extends ResourceModel<WorkloadBaseTypes> {
|
|
8
8
|
_rawYaml: WorkloadBaseTypes;
|
|
9
|
-
_globalStore: GlobalStore;
|
|
10
9
|
constructor(_rawYaml: WorkloadBaseTypes, _globalStore: GlobalStore);
|
|
11
10
|
get imageNames(): string[];
|
|
12
11
|
}
|
|
@@ -4,7 +4,6 @@ import { WorkloadBaseModel } from './workload-base-model';
|
|
|
4
4
|
type WorkloadTypes = Required<Deployment | StatefulSet | DaemonSet> & Unstructured;
|
|
5
5
|
export declare class WorkloadModel extends WorkloadBaseModel {
|
|
6
6
|
_rawYaml: WorkloadTypes;
|
|
7
|
-
_globalStore: GlobalStore;
|
|
8
7
|
restarts: number;
|
|
9
8
|
spec?: WorkloadTypes['spec'];
|
|
10
9
|
status?: WorkloadTypes['status'];
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
import { i18n as I18n } from 'i18next';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
basePath: string;
|
|
6
|
-
apiVersion: string;
|
|
7
|
-
kind: string;
|
|
8
|
-
parent: RESOURCE_GROUP;
|
|
9
|
-
label: string;
|
|
10
|
-
initValue: {};
|
|
11
|
-
columns: () => (import("../..").Column<import("../..").ResourceModel<import("k8s-api-provider").Unstructured>> | import("../..").Column<import("../..").PersistentVolumeModel>)[];
|
|
12
|
-
showConfig: () => {
|
|
13
|
-
tabs: {
|
|
14
|
-
title: string;
|
|
15
|
-
key: string;
|
|
16
|
-
groups: import("../..").ShowGroup<import("../..").ResourceModel<import("k8s-api-provider").Unstructured>>[];
|
|
17
|
-
}[];
|
|
18
|
-
};
|
|
19
|
-
};
|
|
2
|
+
import { ResourceConfig } from 'src/types';
|
|
3
|
+
import { PersistentVolumeModel } from '../../models';
|
|
4
|
+
export declare const PersistentVolumeConfig: (i18n: I18n) => ResourceConfig<PersistentVolumeModel>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Buffer } from 'buffer';
|
|
3
|
+
export type QueryParams = {
|
|
4
|
+
[key: string]: string | string[];
|
|
5
|
+
};
|
|
6
|
+
export declare const stdin: (characters: string) => Buffer;
|
|
7
|
+
export declare function addParam(url: string, key: string, val: string | string[]): string;
|
|
8
|
+
export declare function addParams(url: string, params: QueryParams): string;
|
|
9
|
+
declare enum Alphabet {
|
|
10
|
+
NORMAL = "normal",
|
|
11
|
+
URL = "url"
|
|
12
|
+
}
|
|
13
|
+
export declare function base64Encode(str: string, alphabet?: Alphabet): string;
|
|
14
|
+
export declare function base64DecodeToBuffer(str: string): Buffer;
|
|
15
|
+
export declare function base64Decode(str: string): string;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { UseFormProps } from '@refinedev/react-hook-form';
|
|
2
|
+
import { Unstructured } from 'k8s-api-provider';
|
|
3
|
+
import { YamlFormProps } from '../components';
|
|
4
|
+
import { RefineFormField } from '../components/Form';
|
|
5
|
+
import { ShowConfig } from '../components/ShowContent';
|
|
6
|
+
import { Column, TableProps } from '../components/Table';
|
|
7
|
+
import { ResourceModel } from '../models';
|
|
8
|
+
export declare enum RESOURCE_GROUP {
|
|
9
|
+
WORKLOAD = "WORKLOAD",
|
|
10
|
+
STORAGE = "STORAGE",
|
|
11
|
+
NETWORK = "NETWORK",
|
|
12
|
+
CLUSTER = "CLUSTER",
|
|
13
|
+
SERVICE = "SERVICE",
|
|
14
|
+
SERVICE_AND_NETWORK = "SERVICE_AND_NETWORK",
|
|
15
|
+
CONFIG = "CONFIG",
|
|
16
|
+
NODE_MANAGEMENT = "NODE_MANAGEMENT"
|
|
17
|
+
}
|
|
18
|
+
export declare enum FormType {
|
|
19
|
+
PAGE = "PAGE",
|
|
20
|
+
MODAL = "MODAL"
|
|
21
|
+
}
|
|
22
|
+
export type WithId<T> = T & {
|
|
23
|
+
id: string;
|
|
24
|
+
};
|
|
25
|
+
export type ResourceConfig<Model extends ResourceModel = ResourceModel> = {
|
|
26
|
+
name: string;
|
|
27
|
+
kind: string;
|
|
28
|
+
basePath: string;
|
|
29
|
+
apiVersion: string;
|
|
30
|
+
label: string;
|
|
31
|
+
hideListToolBar?: boolean;
|
|
32
|
+
hideNamespacesFilter?: boolean;
|
|
33
|
+
description?: string;
|
|
34
|
+
parent?: RESOURCE_GROUP;
|
|
35
|
+
formatter?: (v: Model) => Model;
|
|
36
|
+
initValue?: Record<string, unknown>;
|
|
37
|
+
columns?: () => Column<Model>[];
|
|
38
|
+
noShow?: boolean;
|
|
39
|
+
showConfig?: () => ShowConfig<Model>;
|
|
40
|
+
Dropdown?: React.FC<{
|
|
41
|
+
record: Model;
|
|
42
|
+
}>;
|
|
43
|
+
tableProps?: Partial<TableProps<Model>>;
|
|
44
|
+
isCustom?: boolean;
|
|
45
|
+
formConfig?: {
|
|
46
|
+
fields?: (props: {
|
|
47
|
+
record?: Model;
|
|
48
|
+
records: Model[];
|
|
49
|
+
action: 'create' | 'edit';
|
|
50
|
+
}) => RefineFormField[];
|
|
51
|
+
saveButtonText?: string;
|
|
52
|
+
renderForm?: (props: YamlFormProps) => React.ReactNode;
|
|
53
|
+
formType?: FormType;
|
|
54
|
+
transformInitValues?: (values: Unstructured) => Unstructured;
|
|
55
|
+
transformApplyValues?: (values: Unstructured) => Unstructured;
|
|
56
|
+
formTitle?: string | ((action: 'create' | 'edit') => string);
|
|
57
|
+
formDesc?: string | ((action: 'create' | 'edit') => string);
|
|
58
|
+
formatError?: (errorBody: any) => string;
|
|
59
|
+
refineCoreProps?: UseFormProps['refineCoreProps'];
|
|
60
|
+
useFormProps?: UseFormProps;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function download(filename: string, content: string): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { i18n as I18n } from 'i18next';
|
|
2
|
+
type Cause = {
|
|
3
|
+
code?: string;
|
|
4
|
+
reason?: string;
|
|
5
|
+
message: string;
|
|
6
|
+
field?: string;
|
|
7
|
+
};
|
|
8
|
+
export type ErrorResponseBody = {
|
|
9
|
+
message?: string;
|
|
10
|
+
code?: number;
|
|
11
|
+
reason?: string;
|
|
12
|
+
details?: {
|
|
13
|
+
causes?: Cause[];
|
|
14
|
+
};
|
|
15
|
+
graphQLErrors?: Cause[];
|
|
16
|
+
};
|
|
17
|
+
export declare function isNetworkError(errors?: Cause[]): boolean;
|
|
18
|
+
export declare function getSubmitError(errorResponse: ErrorResponseBody | undefined, text: string, i18n: I18n): string;
|
|
19
|
+
export declare function getCommonErrors(responseBody: ErrorResponseBody, i18n: I18n): string[];
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type Labels = Record<string, string>;
|
|
2
|
+
type LabelsArray = {
|
|
3
|
+
key: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}[];
|
|
6
|
+
export declare function toLabelStrings(labels?: Labels): string[];
|
|
7
|
+
export declare function toLabelsArray(labels?: Labels): LabelsArray;
|
|
8
|
+
export declare function toLabelsRecord(labels: LabelsArray): Labels;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { JSONSchema7 } from 'json-schema';
|
|
2
|
+
interface OpenAPIResponse {
|
|
3
|
+
openapi: string;
|
|
4
|
+
paths: {
|
|
5
|
+
[prop: string]: {
|
|
6
|
+
get: {
|
|
7
|
+
responses: {
|
|
8
|
+
200: {
|
|
9
|
+
content: {
|
|
10
|
+
'application/json': {
|
|
11
|
+
schema: JSONSchema7;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
components: {
|
|
20
|
+
schemas: {
|
|
21
|
+
[prop: string]: JSONSchema7 & {
|
|
22
|
+
'x-kubernetes-group-version-kind': {
|
|
23
|
+
group: string;
|
|
24
|
+
kind: string;
|
|
25
|
+
version: string;
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
declare class K8sOpenAPI {
|
|
32
|
+
resourceBasePath: string;
|
|
33
|
+
response: OpenAPIResponse | null;
|
|
34
|
+
apiVersion: string;
|
|
35
|
+
constructor(resourceBasePath: string);
|
|
36
|
+
fetch(): Promise<OpenAPIResponse>;
|
|
37
|
+
findSchema(kind: string): Promise<(JSONSchema7 & {
|
|
38
|
+
'x-kubernetes-group-version-kind': {
|
|
39
|
+
group: string;
|
|
40
|
+
kind: string;
|
|
41
|
+
version: string;
|
|
42
|
+
}[];
|
|
43
|
+
}) | undefined>;
|
|
44
|
+
}
|
|
45
|
+
export default K8sOpenAPI;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { JSONSchema7, JSONSchema7Type } from 'json-schema';
|
|
2
|
+
type TransformOptions = {
|
|
3
|
+
generateValue?: (schema: JSONSchema7) => JSONSchema7Type | undefined | null | Record<string, unknown>;
|
|
4
|
+
};
|
|
5
|
+
export declare function generateValueFromSchema(schema: JSONSchema7, options: TransformOptions): JSONSchema7Type | undefined | Record<string, unknown>;
|
|
6
|
+
export declare function generateSchemaTypeValue(schema: JSONSchema7): JSONSchema7Type | undefined | Record<string, unknown>;
|
|
7
|
+
type ResolveOptions = {
|
|
8
|
+
prune: {
|
|
9
|
+
description: boolean;
|
|
10
|
+
optional: boolean;
|
|
11
|
+
metadata: boolean;
|
|
12
|
+
fields: string[];
|
|
13
|
+
xProperty: boolean;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare function resolveRef(schema: JSONSchema7, schemas: Record<string, JSONSchema7>, options: ResolveOptions): JSONSchema7;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Buffer } from 'buffer';
|
|
2
|
+
export type QueryParams = {
|
|
3
|
+
[key: string]: string | string[];
|
|
4
|
+
};
|
|
5
|
+
export declare const stdin: (characters: string) => Buffer;
|
|
6
|
+
export declare function addParam(url: string, key: string, val: string | string[]): string;
|
|
7
|
+
export declare function addParams(url: string, params: QueryParams): string;
|
|
8
|
+
declare enum Alphabet {
|
|
9
|
+
NORMAL = "normal",
|
|
10
|
+
URL = "url"
|
|
11
|
+
}
|
|
12
|
+
export declare function base64Encode(str: string, alphabet?: Alphabet): string;
|
|
13
|
+
export declare function base64DecodeToBuffer(str: string): Buffer;
|
|
14
|
+
export declare function base64Decode(str: string): string;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function shortenedImage(image: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare function getSecondsDiff(startDate: string, endDate: string): number;
|
|
2
|
+
export declare function elapsedTime(seconds: number, i18nMap: {
|
|
3
|
+
min: string;
|
|
4
|
+
sec: string;
|
|
5
|
+
hr: string;
|
|
6
|
+
day: string;
|
|
7
|
+
}): {
|
|
8
|
+
diff?: undefined;
|
|
9
|
+
label?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
diff: number;
|
|
12
|
+
label: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type FormatOptions = {
|
|
2
|
+
increment: number;
|
|
3
|
+
suffix: string | null;
|
|
4
|
+
firstSuffix: string | null;
|
|
5
|
+
startingExponent: number;
|
|
6
|
+
minExponent: number;
|
|
7
|
+
maxPrecision: number;
|
|
8
|
+
atLeastOne: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function formatSi(inValue: number, options?: Partial<FormatOptions>): string;
|
|
11
|
+
export declare function parseSi(inValue: string, increment?: number | null, allowFractional?: boolean): number;
|
|
12
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dovetail-v2/refine",
|
|
3
|
-
"version": "0.0.66-
|
|
3
|
+
"version": "0.0.66-pod-exec.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -10,14 +10,23 @@
|
|
|
10
10
|
"module": "./dist/refine.js",
|
|
11
11
|
"types": "./lib/src/index.d.ts",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@cloudtower/eagle": "^0.29.
|
|
14
|
-
"@cloudtower/icons-react": "^0.29.
|
|
13
|
+
"@cloudtower/eagle": "^0.29.29",
|
|
14
|
+
"@cloudtower/icons-react": "^0.29.29",
|
|
15
15
|
"@patternfly/react-core": "^5.1.1",
|
|
16
16
|
"@patternfly/react-log-viewer": "^5.0.0",
|
|
17
17
|
"@refinedev/core": "^4.47.2",
|
|
18
18
|
"@refinedev/inferencer": "^4.5.20",
|
|
19
19
|
"@refinedev/react-hook-form": "^4.8.14",
|
|
20
|
+
"@xterm/addon-attach": "^0.11.0",
|
|
21
|
+
"@xterm/addon-canvas": "^0.7.0",
|
|
22
|
+
"@xterm/addon-fit": "^0.10.0",
|
|
23
|
+
"@xterm/addon-search": "^0.15.0",
|
|
24
|
+
"@xterm/addon-web-links": "^0.11.0",
|
|
25
|
+
"@xterm/addon-webgl": "^0.18.0",
|
|
26
|
+
"@xterm/xterm": "^5.5.0",
|
|
20
27
|
"antd": "4.5.0",
|
|
28
|
+
"buffer": "^6.0.3",
|
|
29
|
+
"copy-to-clipboard": "^3.3.3",
|
|
21
30
|
"dayjs": "^1.11.10",
|
|
22
31
|
"i18next": "^23.2.3",
|
|
23
32
|
"js-yaml": "^4.1.0",
|
|
@@ -69,8 +78,8 @@
|
|
|
69
78
|
"vite-plugin-commonjs": "^0.10.0"
|
|
70
79
|
},
|
|
71
80
|
"peerDependencies": {
|
|
72
|
-
"@cloudtower/eagle": "^0.29.
|
|
73
|
-
"@cloudtower/icons-react": "^0.29.
|
|
81
|
+
"@cloudtower/eagle": "^0.29.29",
|
|
82
|
+
"@cloudtower/icons-react": "^0.29.29",
|
|
74
83
|
"@refinedev/core": "^4.47.2",
|
|
75
84
|
"antd": "4.5.0",
|
|
76
85
|
"i18next": "^23.2.3",
|
package/lib/src/App.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
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;
|
package/lib/src/Dovetail.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { KitStoreProvider, ModalStack } from '@cloudtower/eagle';
|
|
3
|
-
import { Refine } from '@refinedev/core';
|
|
4
|
-
import { dataProvider, liveProvider } from 'k8s-api-provider';
|
|
5
|
-
import { keyBy } from 'lodash-es';
|
|
6
|
-
import { useMemo } from 'react';
|
|
7
|
-
import { Router } from 'react-router-dom';
|
|
8
|
-
import ConfigsContext from 'src/contexts/configs';
|
|
9
|
-
import { ResourceCRUD } from './components/ResourceCRUD';
|
|
10
|
-
import GlobalStoreContext from './contexts/global-store';
|
|
11
|
-
import { routerProvider } from './providers/router-provider';
|
|
12
|
-
import './styles.css';
|
|
13
|
-
export const Dovetail = props => {
|
|
14
|
-
const { resourcesConfig, urlPrefix = '', Layout, history, globalStore } = props;
|
|
15
|
-
const notCustomResources = useMemo(() => {
|
|
16
|
-
return resourcesConfig.filter(c => !c.isCustom);
|
|
17
|
-
}, [resourcesConfig]);
|
|
18
|
-
const content = useMemo(() => {
|
|
19
|
-
const _content = (_jsxs(_Fragment, { children: [_jsx(ModalStack, {}), _jsx(ResourceCRUD, { configs: notCustomResources, urlPrefix: urlPrefix }), props.children] }));
|
|
20
|
-
if (Layout) {
|
|
21
|
-
return _jsx(Layout, { children: _content });
|
|
22
|
-
}
|
|
23
|
-
return _content;
|
|
24
|
-
}, [Layout, notCustomResources, props.children, urlPrefix]);
|
|
25
|
-
return (_jsx(Router, { history: history, children: _jsx(KitStoreProvider, { children: _jsx(GlobalStoreContext.Provider, { value: { globalStore }, children: _jsx(ConfigsContext.Provider, { value: keyBy(resourcesConfig, 'name'), children: _jsx(Refine, { dataProvider: {
|
|
26
|
-
default: dataProvider(globalStore),
|
|
27
|
-
}, routerProvider: routerProvider, liveProvider: liveProvider(globalStore), options: {
|
|
28
|
-
warnWhenUnsavedChanges: true,
|
|
29
|
-
liveMode: 'auto',
|
|
30
|
-
}, resources: resourcesConfig.map(c => {
|
|
31
|
-
return {
|
|
32
|
-
name: c.name,
|
|
33
|
-
meta: {
|
|
34
|
-
resourceBasePath: c.basePath,
|
|
35
|
-
kind: c.kind,
|
|
36
|
-
parent: c.parent,
|
|
37
|
-
label: `${c.kind}s`,
|
|
38
|
-
},
|
|
39
|
-
list: `${urlPrefix}/${c.name}`,
|
|
40
|
-
show: `${urlPrefix}/${c.name}/show`,
|
|
41
|
-
create: `${urlPrefix}/${c.name}/create`,
|
|
42
|
-
edit: `${urlPrefix}/${c.name}/edit`,
|
|
43
|
-
};
|
|
44
|
-
}), children: content }) }) }) }) }));
|
|
45
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { css, cx } from '@linaria/core';
|
|
3
|
-
import { useBreadcrumb } from '@refinedev/core';
|
|
4
|
-
import { Link } from 'react-router-dom';
|
|
5
|
-
const BreadcrumbStyle = css `
|
|
6
|
-
display: flex;
|
|
7
|
-
|
|
8
|
-
.breadcrumb-item {
|
|
9
|
-
&:not(:last-of-type):after {
|
|
10
|
-
content: '>';
|
|
11
|
-
margin: 0 8px;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
15
|
-
export function Breadcrumb(props) {
|
|
16
|
-
const { breadcrumbs } = useBreadcrumb();
|
|
17
|
-
return (_jsx("ul", { className: cx(BreadcrumbStyle, props.className), children: breadcrumbs.map(breadcrumb => {
|
|
18
|
-
return (_jsx("li", { className: "breadcrumb-item", children: breadcrumb.href ? (_jsx(Link, { to: breadcrumb.href, children: breadcrumb.label })) : (_jsx("span", { children: breadcrumb.label })) }, `breadcrumb-${breadcrumb.label}`));
|
|
19
|
-
}) }));
|
|
20
|
-
}
|