@dovetail-v2/refine 0.0.40-bowen.6 → 0.0.41
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-915e1b64.js → MonacoYamlDiffEditor-90b9132b.js} +1 -1
- package/dist/{index-70f11bd6.js → index-f702bf6d.js} +198 -190
- package/dist/refine.js +145 -144
- package/dist/refine.umd.cjs +54 -46
- package/dist/style.css +4 -5
- package/lib/src/components/Form/RefineFormContent.d.ts +2 -2
- package/lib/src/components/Form/type.d.ts +5 -1
- package/lib/src/components/ModalContextProvider/index.d.ts +12 -0
- package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.d.ts +2 -1
- package/lib/src/components/Table/index.d.ts +1 -0
- package/lib/src/components/YamlForm/index.d.ts +4 -0
- package/lib/src/hooks/useDeleteModal/useDeleteModal.d.ts +1 -0
- package/lib/src/hooks/useEagleForm.d.ts +2 -1
- package/lib/src/hooks/useModal.d.ts +0 -0
- package/lib/src/model/cronjob-model.d.ts +9 -0
- package/lib/src/model/index.d.ts +6 -0
- package/lib/src/model/job-model.d.ts +10 -0
- package/lib/src/model/pod-metrics-model.d.ts +7 -0
- package/lib/src/model/pod-model.d.ts +15 -0
- package/lib/src/model/resource-model.d.ts +17 -0
- package/lib/src/model/workload-model.d.ts +17 -0
- package/lib/src/types/metric.d.ts +25 -0
- package/package.json +1 -1
- package/lib/src/App.js +0 -91
- package/lib/src/Dovetail.js +0 -45
- package/lib/src/components/Breadcrumb/index.js +0 -20
- package/lib/src/components/ConditionsTable/ConditionsTable.js +0 -56
- package/lib/src/components/ConditionsTable/index.js +0 -1
- package/lib/src/components/CreateButton/index.js +0 -10
- package/lib/src/components/CronJobDropdown/index.js +0 -26
- package/lib/src/components/CronjobJobsTable/index.js +0 -49
- package/lib/src/components/DeleteButton/index.js +0 -13
- package/lib/src/components/DeleteManyButton/index.js +0 -16
- package/lib/src/components/DrawerShow/DrawerShow.js +0 -13
- package/lib/src/components/DrawerShow/index.js +0 -1
- package/lib/src/components/EditButton/index.js +0 -13
- package/lib/src/components/EditField/index.js +0 -47
- package/lib/src/components/ErrorContent/index.js +0 -36
- package/lib/src/components/EventsTable/EventsTable.js +0 -59
- package/lib/src/components/EventsTable/index.js +0 -1
- package/lib/src/components/Form/KeyValueListWidget.js +0 -56
- package/lib/src/components/Form/MetadataForm.js +0 -9
- package/lib/src/components/Form/NameInputWidget.js +0 -50
- package/lib/src/components/Form/NamespaceSelectWidget.js +0 -21
- package/lib/src/components/Form/index.js +0 -4
- package/lib/src/components/Form/widget.js +0 -1
- package/lib/src/components/FormErrorAlert/index.js +0 -8
- package/lib/src/components/FormLayout/index.js +0 -21
- package/lib/src/components/FormModal/index.js +0 -51
- package/lib/src/components/ImageNames/index.js +0 -14
- package/lib/src/components/IngressRulesComponent/index.js +0 -11
- package/lib/src/components/IngressRulesTable/IngressRulesTable.js +0 -51
- package/lib/src/components/IngressRulesTable/index.js +0 -1
- package/lib/src/components/K8sDropdown/index.js +0 -31
- package/lib/src/components/KeyValue/KeyValue.js +0 -27
- package/lib/src/components/KeyValue/index.js +0 -1
- package/lib/src/components/KeyValueData/index.js +0 -50
- package/lib/src/components/Layout/index.js +0 -39
- package/lib/src/components/ListPage/index.js +0 -25
- package/lib/src/components/Menu/index.js +0 -36
- package/lib/src/components/NamespacesFilter/index.js +0 -34
- package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.js +0 -77
- package/lib/src/components/NetworkPolicyRulesTable/index.js +0 -1
- package/lib/src/components/PageShow/PageShow.js +0 -11
- package/lib/src/components/PageShow/index.js +0 -1
- package/lib/src/components/PodContainersTable/PodContainersTable.js +0 -78
- package/lib/src/components/PodContainersTable/index.js +0 -1
- package/lib/src/components/PodLog/index.js +0 -136
- package/lib/src/components/ReferenceLink/index.js +0 -17
- package/lib/src/components/RefineForm/RefineFormContent.d.ts +0 -10
- package/lib/src/components/RefineForm/RefineFormModal.d.ts +0 -8
- package/lib/src/components/RefineForm/RefineFormPage.d.ts +0 -7
- package/lib/src/components/RefineForm/index.d.ts +0 -3
- package/lib/src/components/RefineForm/type.d.ts +0 -20
- package/lib/src/components/RefineForm/useRefineForm.d.ts +0 -10
- package/lib/src/components/ResourceCRUD/ResourceCRUD.js +0 -15
- package/lib/src/components/ResourceCRUD/create/index.js +0 -13
- package/lib/src/components/ResourceCRUD/index.js +0 -4
- package/lib/src/components/ResourceCRUD/list/index.js +0 -19
- package/lib/src/components/ResourceCRUD/show/index.js +0 -6
- package/lib/src/components/ResourceLink/index.js +0 -21
- package/lib/src/components/ResourceUsageBar/index.js +0 -81
- package/lib/src/components/Separator/index.js +0 -11
- package/lib/src/components/ShowContent/ShowContent.js +0 -157
- package/lib/src/components/ShowContent/fields.js +0 -157
- package/lib/src/components/ShowContent/index.js +0 -2
- package/lib/src/components/StateTag/StateTag.js +0 -22
- package/lib/src/components/StateTag/index.js +0 -1
- package/lib/src/components/Table/ErrorContent.js +0 -36
- package/lib/src/components/Table/TableToolBar.js +0 -14
- package/lib/src/components/Table/TableWidgets.js +0 -28
- package/lib/src/components/Table/index.js +0 -69
- package/lib/src/components/Tags/index.js +0 -22
- package/lib/src/components/Time/index.js +0 -14
- package/lib/src/components/WorkloadDropdown/index.js +0 -24
- package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.js +0 -39
- package/lib/src/components/WorkloadPodsTable/index.js +0 -1
- package/lib/src/components/WorkloadReplicas/index.js +0 -50
- package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.js +0 -34
- package/lib/src/components/YamlEditor/MonacoYamlEditor.js +0 -149
- package/lib/src/components/YamlEditor/YamlEditorComponent.js +0 -90
- package/lib/src/components/YamlEditor/index.js +0 -1
- package/lib/src/components/YamlEditor/style.js +0 -102
- package/lib/src/components/YamlEditor/yaml.worker.js +0 -1
- package/lib/src/components/YamlForm/index.js +0 -61
- package/lib/src/components/index.js +0 -38
- package/lib/src/constants/index.js +0 -2
- package/lib/src/constants/k8s.js +0 -203
- package/lib/src/constants/state.js +0 -15
- package/lib/src/contexts/component.js +0 -3
- package/lib/src/contexts/configs.js +0 -3
- package/lib/src/contexts/global-store.js +0 -3
- package/lib/src/contexts/index.js +0 -3
- package/lib/src/hooks/index.js +0 -7
- package/lib/src/hooks/useDeleteModal/index.js +0 -1
- package/lib/src/hooks/useDeleteModal/useDeleteManyModal.js +0 -31
- package/lib/src/hooks/useDeleteModal/useDeleteModal.js +0 -38
- package/lib/src/hooks/useDownloadYAML.js +0 -10
- package/lib/src/hooks/useEagleForm.js +0 -177
- package/lib/src/hooks/useEagleTable/columns.js +0 -246
- package/lib/src/hooks/useEagleTable/index.js +0 -2
- package/lib/src/hooks/useEagleTable/useEagleTable.js +0 -63
- package/lib/src/hooks/useEdit.js +0 -19
- package/lib/src/hooks/useGlobalStore.js +0 -5
- package/lib/src/hooks/useK8sYamlEditor.js +0 -37
- package/lib/src/hooks/useOpenForm.js +0 -43
- package/lib/src/hooks/useSchema.js +0 -37
- package/lib/src/hooks/useSubmitForm.js +0 -42
- package/lib/src/i18n.js +0 -19
- package/lib/src/index.js +0 -13
- package/lib/src/locales/en-US/dovetail.json +0 -18
- package/lib/src/locales/en-US/index.js +0 -4
- package/lib/src/locales/index.js +0 -6
- package/lib/src/locales/zh-CN/dovetail.json +0 -91
- package/lib/src/locales/zh-CN/index.js +0 -4
- package/lib/src/main.js +0 -12
- package/lib/src/models/cronjob-model.js +0 -32
- package/lib/src/models/daemonset-model.js +0 -17
- package/lib/src/models/deployment-model.js +0 -17
- package/lib/src/models/event-model.js +0 -11
- package/lib/src/models/index.js +0 -14
- package/lib/src/models/ingress-model.js +0 -24
- package/lib/src/models/job-model.js +0 -56
- package/lib/src/models/network-policy-model.js +0 -10
- package/lib/src/models/pod-metrics-model.js +0 -34
- package/lib/src/models/pod-model.js +0 -78
- package/lib/src/models/resource-model.js +0 -34
- package/lib/src/models/server-instance-model.d.ts +0 -10
- package/lib/src/models/service-model.js +0 -17
- package/lib/src/models/statefulset-model.js +0 -17
- package/lib/src/models/types/index.js +0 -1
- package/lib/src/models/types/metric.js +0 -1
- package/lib/src/models/workload-base-model.js +0 -22
- package/lib/src/models/workload-model.js +0 -51
- package/lib/src/pages/configmaps/index.js +0 -15
- package/lib/src/pages/cronjobs/create/index.js +0 -6
- package/lib/src/pages/cronjobs/index.js +0 -3
- package/lib/src/pages/cronjobs/list/index.js +0 -42
- package/lib/src/pages/cronjobs/show/index.js +0 -16
- package/lib/src/pages/daemonsets/create/index.js +0 -6
- package/lib/src/pages/daemonsets/index.js +0 -3
- package/lib/src/pages/daemonsets/list/index.js +0 -32
- package/lib/src/pages/daemonsets/show/index.js +0 -16
- package/lib/src/pages/deployments/create/index.js +0 -7
- package/lib/src/pages/deployments/index.js +0 -3
- package/lib/src/pages/deployments/list/index.js +0 -26
- package/lib/src/pages/deployments/show/index.js +0 -16
- package/lib/src/pages/ingresses/index.js +0 -26
- package/lib/src/pages/jobs/index.js +0 -34
- package/lib/src/pages/networkPolicies/index.js +0 -67
- package/lib/src/pages/pods/create/index.js +0 -6
- package/lib/src/pages/pods/index.js +0 -3
- package/lib/src/pages/pods/list/index.js +0 -81
- package/lib/src/pages/pods/show/index.js +0 -54
- package/lib/src/pages/secrets/index.js +0 -15
- package/lib/src/pages/services/index.js +0 -26
- package/lib/src/pages/statefulsets/create/index.js +0 -6
- package/lib/src/pages/statefulsets/index.js +0 -3
- package/lib/src/pages/statefulsets/list/index.js +0 -26
- package/lib/src/pages/statefulsets/show/index.js +0 -16
- package/lib/src/plugins/index.js +0 -3
- package/lib/src/plugins/model-plugin.js +0 -46
- package/lib/src/plugins/relation-plugin.js +0 -81
- package/lib/src/plugins/type.js +0 -1
- package/lib/src/providers/index.js +0 -1
- package/lib/src/providers/router-provider/index.js +0 -100
- package/lib/src/types/index.js +0 -1
- package/lib/src/types/resource.js +0 -12
- package/lib/src/utils/addId.js +0 -8
- package/lib/src/utils/download.js +0 -9
- package/lib/src/utils/error.js +0 -53
- package/lib/src/utils/form.js +0 -9
- package/lib/src/utils/k8s.js +0 -6
- package/lib/src/utils/labels.js +0 -15
- package/lib/src/utils/match-selector.js +0 -12
- package/lib/src/utils/openapi.js +0 -33
- package/lib/src/utils/schema.js +0 -117
- package/lib/src/utils/selector.js +0 -12
- package/lib/src/utils/string.js +0 -6
- package/lib/src/utils/time.js +0 -46
- package/lib/src/utils/unit.js +0 -69
- package/lib/src/utils/yaml.js +0 -44
- package/lib/vite.config.js +0 -60
package/dist/refine.umd.cjs
CHANGED
|
@@ -8033,7 +8033,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8033
8033
|
};
|
|
8034
8034
|
var cx_default = cx;
|
|
8035
8035
|
const ConfigsContext = React.createContext({});
|
|
8036
|
-
const
|
|
8036
|
+
const useDeleteModal_v7eb93 = "";
|
|
8037
8037
|
const TextStyle = "t1vq0ett";
|
|
8038
8038
|
const TipStyle = "t139onst";
|
|
8039
8039
|
const NameStyle$1 = "n18lzor8";
|
|
@@ -8686,6 +8686,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8686
8686
|
const component = React.useContext(ComponentContext);
|
|
8687
8687
|
const Table$1 = component.Table || Table;
|
|
8688
8688
|
const [currentPage, setCurrentPage] = React.useState(1);
|
|
8689
|
+
const currentSize = 10;
|
|
8689
8690
|
const datas = Object.keys(podSelectors).map((key2) => ({
|
|
8690
8691
|
id: key2,
|
|
8691
8692
|
key: key2,
|
|
@@ -8722,11 +8723,12 @@ var __publicField = (obj, key, value) => {
|
|
|
8722
8723
|
{
|
|
8723
8724
|
tableKey: "podSelector",
|
|
8724
8725
|
loading: false,
|
|
8725
|
-
data: datas,
|
|
8726
|
+
data: datas.slice((currentPage - 1) * currentSize, currentPage * currentSize),
|
|
8727
|
+
total: datas.length,
|
|
8726
8728
|
columns: addDefaultRenderToColumns(columns),
|
|
8727
8729
|
rowKey: "key",
|
|
8728
8730
|
empty: t2("dovetail.empty"),
|
|
8729
|
-
currentSize
|
|
8731
|
+
currentSize,
|
|
8730
8732
|
currentPage,
|
|
8731
8733
|
onPageChange: setCurrentPage,
|
|
8732
8734
|
showMenuColumn: false
|
|
@@ -8738,6 +8740,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8738
8740
|
const component = React.useContext(ComponentContext);
|
|
8739
8741
|
const Table$1 = component.Table || Table;
|
|
8740
8742
|
const [currentPage, setCurrentPage] = React.useState(1);
|
|
8743
|
+
const currentSize = 10;
|
|
8741
8744
|
const columns = [
|
|
8742
8745
|
{
|
|
8743
8746
|
key: "name",
|
|
@@ -8794,11 +8797,12 @@ var __publicField = (obj, key, value) => {
|
|
|
8794
8797
|
{
|
|
8795
8798
|
tableKey: "ports",
|
|
8796
8799
|
loading: false,
|
|
8797
|
-
data: ports,
|
|
8800
|
+
data: ports.slice((currentPage - 1) * currentSize, currentPage * currentSize),
|
|
8801
|
+
total: ports.length,
|
|
8798
8802
|
columns: addDefaultRenderToColumns(columns),
|
|
8799
8803
|
rowKey: "name",
|
|
8800
8804
|
empty: t2("dovetail.empty"),
|
|
8801
|
-
currentSize
|
|
8805
|
+
currentSize,
|
|
8802
8806
|
currentPage,
|
|
8803
8807
|
onPageChange: setCurrentPage,
|
|
8804
8808
|
showMenuColumn: false
|
|
@@ -10117,6 +10121,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10117
10121
|
const { t: t2 } = useTranslation();
|
|
10118
10122
|
const component = React.useContext(ComponentContext);
|
|
10119
10123
|
const Table$1 = component.Table || Table;
|
|
10124
|
+
const currentSize = 10;
|
|
10120
10125
|
const conditionsWithId = addId(conditions, "type");
|
|
10121
10126
|
const columns = [
|
|
10122
10127
|
{
|
|
@@ -10182,11 +10187,12 @@ var __publicField = (obj, key, value) => {
|
|
|
10182
10187
|
{
|
|
10183
10188
|
tableKey: "condition",
|
|
10184
10189
|
loading: false,
|
|
10185
|
-
data: conditionsWithId,
|
|
10190
|
+
data: conditionsWithId.slice((currentPage - 1) * currentSize, currentPage * currentSize),
|
|
10191
|
+
total: conditionsWithId.length,
|
|
10186
10192
|
columns: addDefaultRenderToColumns(columns),
|
|
10187
10193
|
rowKey: "type",
|
|
10188
10194
|
empty: t2("dovetail.empty"),
|
|
10189
|
-
currentSize
|
|
10195
|
+
currentSize,
|
|
10190
10196
|
currentPage,
|
|
10191
10197
|
onPageChange: setCurrentPage,
|
|
10192
10198
|
showMenuColumn: false
|
|
@@ -10392,6 +10398,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10392
10398
|
const [currentPage, setCurrentPage] = React.useState(1);
|
|
10393
10399
|
const component = React.useContext(ComponentContext);
|
|
10394
10400
|
const Table$1 = component.Table || Table;
|
|
10401
|
+
const currentSize = 10;
|
|
10395
10402
|
const {
|
|
10396
10403
|
data: data2,
|
|
10397
10404
|
isLoading
|
|
@@ -10428,13 +10435,14 @@ var __publicField = (obj, key, value) => {
|
|
|
10428
10435
|
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Table$1, {
|
|
10429
10436
|
tableKey: "cronjobs",
|
|
10430
10437
|
loading: isLoading,
|
|
10431
|
-
data: dataSource || [],
|
|
10438
|
+
data: (dataSource || []).slice((currentPage - 1) * currentSize, currentPage * currentSize),
|
|
10439
|
+
total: (dataSource == null ? void 0 : dataSource.length) || 0,
|
|
10432
10440
|
columns,
|
|
10433
10441
|
rowKey: "id",
|
|
10434
10442
|
error: false,
|
|
10435
10443
|
currentPage,
|
|
10436
10444
|
onPageChange: (p) => setCurrentPage(p),
|
|
10437
|
-
currentSize
|
|
10445
|
+
currentSize,
|
|
10438
10446
|
refetch: () => null,
|
|
10439
10447
|
showMenuColumn: false
|
|
10440
10448
|
})]
|
|
@@ -10443,6 +10451,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10443
10451
|
const EventsTable = ({}) => {
|
|
10444
10452
|
const { i18n: i18n2 } = useTranslation();
|
|
10445
10453
|
const [currentPage, setCurrentPage] = React.useState(1);
|
|
10454
|
+
const currentSize = 10;
|
|
10446
10455
|
const { data: data2, isLoading } = core.useList({
|
|
10447
10456
|
resource: "events",
|
|
10448
10457
|
meta: { resourceBasePath: "/apis/events.k8s.io/v1", kind: "Event" },
|
|
@@ -10509,13 +10518,14 @@ var __publicField = (obj, key, value) => {
|
|
|
10509
10518
|
{
|
|
10510
10519
|
tableKey: "events",
|
|
10511
10520
|
loading: isLoading,
|
|
10512
|
-
data: dataSource || [],
|
|
10521
|
+
data: (dataSource || []).slice((currentPage - 1) * currentSize, currentPage * currentSize),
|
|
10522
|
+
total: (dataSource == null ? void 0 : dataSource.length) || 0,
|
|
10513
10523
|
columns: addDefaultRenderToColumns(columns),
|
|
10514
10524
|
rowKey: "id",
|
|
10515
10525
|
error: false,
|
|
10516
10526
|
currentPage,
|
|
10517
10527
|
onPageChange: (p) => setCurrentPage(p),
|
|
10518
|
-
currentSize
|
|
10528
|
+
currentSize,
|
|
10519
10529
|
refetch: () => null,
|
|
10520
10530
|
showMenuColumn: false
|
|
10521
10531
|
}
|
|
@@ -10561,6 +10571,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10561
10571
|
const component = React.useContext(ComponentContext);
|
|
10562
10572
|
const Table$1 = component.Table || Table;
|
|
10563
10573
|
const [currentPage, setCurrentPage] = React.useState(1);
|
|
10574
|
+
const currentSize = 10;
|
|
10564
10575
|
const columns = [
|
|
10565
10576
|
{
|
|
10566
10577
|
key: "pathType",
|
|
@@ -10635,18 +10646,19 @@ var __publicField = (obj, key, value) => {
|
|
|
10635
10646
|
{
|
|
10636
10647
|
tableKey: "ingressRules",
|
|
10637
10648
|
loading: false,
|
|
10638
|
-
data: rows,
|
|
10649
|
+
data: rows.slice((currentPage - 1) * currentSize, currentPage * currentSize),
|
|
10650
|
+
total: rows.length,
|
|
10639
10651
|
columns: addDefaultRenderToColumns(columns),
|
|
10640
10652
|
rowKey: "pathType",
|
|
10641
10653
|
empty: t2("dovetail.empty"),
|
|
10642
|
-
currentSize
|
|
10654
|
+
currentSize,
|
|
10643
10655
|
currentPage,
|
|
10644
10656
|
onPageChange: setCurrentPage,
|
|
10645
10657
|
showMenuColumn: false
|
|
10646
10658
|
}
|
|
10647
10659
|
);
|
|
10648
10660
|
};
|
|
10649
|
-
const
|
|
10661
|
+
const KeyValue_1v1utgj = "";
|
|
10650
10662
|
const ContentBlockStyle = "c8jy7dc";
|
|
10651
10663
|
const KeyStyle = "k2sddxl";
|
|
10652
10664
|
const ValueStyle$2 = "v16vicsr";
|
|
@@ -11078,6 +11090,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11078
11090
|
const [currentPage, setCurrentPage] = React.useState(1);
|
|
11079
11091
|
const component = React.useContext(ComponentContext);
|
|
11080
11092
|
const Table$1 = component.Table || Table;
|
|
11093
|
+
const currentSize = 10;
|
|
11081
11094
|
const {
|
|
11082
11095
|
data: data2
|
|
11083
11096
|
} = core.useList({
|
|
@@ -11122,14 +11135,15 @@ var __publicField = (obj, key, value) => {
|
|
|
11122
11135
|
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Table$1, {
|
|
11123
11136
|
tableKey: "pods",
|
|
11124
11137
|
loading: !dataSource,
|
|
11125
|
-
data: dataSource || [],
|
|
11138
|
+
data: (dataSource || []).slice((currentPage - 1) * currentSize, currentPage * currentSize),
|
|
11139
|
+
total: (dataSource == null ? void 0 : dataSource.length) || 0,
|
|
11126
11140
|
columns: addDefaultRenderToColumns(columns),
|
|
11127
11141
|
onSelect: (keys) => setSelectedKeys(keys),
|
|
11128
11142
|
rowKey: "id",
|
|
11129
11143
|
error: false,
|
|
11130
11144
|
currentPage,
|
|
11131
11145
|
onPageChange: (p) => setCurrentPage(p),
|
|
11132
|
-
currentSize
|
|
11146
|
+
currentSize,
|
|
11133
11147
|
refetch: () => null,
|
|
11134
11148
|
showMenuColumn: false
|
|
11135
11149
|
})]
|
|
@@ -11240,9 +11254,8 @@ var __publicField = (obj, key, value) => {
|
|
|
11240
11254
|
onSubmit
|
|
11241
11255
|
};
|
|
11242
11256
|
}
|
|
11243
|
-
const
|
|
11244
|
-
const
|
|
11245
|
-
const EditButtonStyle = "e1m0bgls";
|
|
11257
|
+
const index_7c3887 = "";
|
|
11258
|
+
const EditButtonStyle = "esoz3jw";
|
|
11246
11259
|
function EditFieldModal(props) {
|
|
11247
11260
|
const {
|
|
11248
11261
|
title,
|
|
@@ -11269,7 +11282,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11269
11282
|
reset();
|
|
11270
11283
|
}, [reset]);
|
|
11271
11284
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.modal, {
|
|
11272
|
-
className:
|
|
11285
|
+
className: ModalStyle,
|
|
11273
11286
|
title: title || i18n2.t("dovetail.edit"),
|
|
11274
11287
|
confirmLoading: submitting,
|
|
11275
11288
|
onOk: onSubmit,
|
|
@@ -17311,7 +17324,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17311
17324
|
const LogViewer = React.forwardRef((props, ref) => React.createElement(LogViewerBase, Object.assign({ innerRef: ref }, props)));
|
|
17312
17325
|
LogViewer.displayName = "LogViewer";
|
|
17313
17326
|
const baseNoReset = "";
|
|
17314
|
-
const
|
|
17327
|
+
const index_jv52b6 = "";
|
|
17315
17328
|
const WrapperStyle$3 = "wve7dfm";
|
|
17316
17329
|
const ToolbarStyle = "t9oeh3c";
|
|
17317
17330
|
const ToolbarAreaStyle = "t1u2zqn6";
|
|
@@ -17403,7 +17416,6 @@ var __publicField = (obj, key, value) => {
|
|
|
17403
17416
|
}
|
|
17404
17417
|
const total = buffer + chunk.slice(0, lastIndex);
|
|
17405
17418
|
buffer = chunk.slice(lastIndex + 1);
|
|
17406
|
-
console.log(total);
|
|
17407
17419
|
const formattedLogs = total.split("\n").filter(Boolean).map((line) => {
|
|
17408
17420
|
const [timestamps, ...content] = line.split(" ");
|
|
17409
17421
|
const t22 = new Date(timestamps).toLocaleString();
|
|
@@ -17728,7 +17740,8 @@ var __publicField = (obj, key, value) => {
|
|
|
17728
17740
|
defaultValue: yaml.dump(ingressOrEgress),
|
|
17729
17741
|
height: "300px",
|
|
17730
17742
|
className: EditorStyle$1,
|
|
17731
|
-
readOnly: true
|
|
17743
|
+
readOnly: true,
|
|
17744
|
+
isScrollOnFocus: true
|
|
17732
17745
|
});
|
|
17733
17746
|
};
|
|
17734
17747
|
const PodContainersTable = ({
|
|
@@ -17739,6 +17752,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17739
17752
|
const component = React.useContext(ComponentContext);
|
|
17740
17753
|
const Table$1 = component.Table || Table;
|
|
17741
17754
|
const [currentPage, setCurrentPage] = React.useState(1);
|
|
17755
|
+
const currentSize = 10;
|
|
17742
17756
|
const columns = React.useMemo(
|
|
17743
17757
|
() => [
|
|
17744
17758
|
{
|
|
@@ -17815,11 +17829,12 @@ var __publicField = (obj, key, value) => {
|
|
|
17815
17829
|
{
|
|
17816
17830
|
tableKey: "podContainers",
|
|
17817
17831
|
loading: false,
|
|
17818
|
-
data: dataSource,
|
|
17832
|
+
data: dataSource.slice((currentPage - 1) * currentSize, currentPage * currentSize),
|
|
17833
|
+
total: dataSource.length,
|
|
17819
17834
|
columns: addDefaultRenderToColumns(columns),
|
|
17820
17835
|
rowKey: "containerID",
|
|
17821
17836
|
error: false,
|
|
17822
|
-
currentSize
|
|
17837
|
+
currentSize,
|
|
17823
17838
|
currentPage,
|
|
17824
17839
|
onPageChange: setCurrentPage,
|
|
17825
17840
|
showMenuColumn: false
|
|
@@ -21681,30 +21696,23 @@ var __publicField = (obj, key, value) => {
|
|
|
21681
21696
|
var _a, _b;
|
|
21682
21697
|
const {
|
|
21683
21698
|
config,
|
|
21684
|
-
|
|
21699
|
+
control,
|
|
21685
21700
|
action,
|
|
21686
21701
|
errorMsg
|
|
21687
21702
|
} = props;
|
|
21688
|
-
const {
|
|
21689
|
-
control,
|
|
21690
|
-
watch,
|
|
21691
|
-
getValues
|
|
21692
|
-
} = formResult;
|
|
21693
|
-
watch();
|
|
21694
21703
|
const fields = (_b = (_a = config == null ? void 0 : config.formConfig) == null ? void 0 : _a.fields) == null ? void 0 : _b.map((c2) => {
|
|
21695
21704
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Controller, {
|
|
21696
21705
|
control,
|
|
21697
21706
|
name: c2.path.join("."),
|
|
21698
21707
|
rules: {
|
|
21699
|
-
validate(value2) {
|
|
21700
|
-
const formValue = getValues();
|
|
21708
|
+
validate(value2, formValues) {
|
|
21701
21709
|
if (!c2.validators || c2.validators.length === 0)
|
|
21702
21710
|
return true;
|
|
21703
21711
|
for (const func of c2.validators) {
|
|
21704
21712
|
const {
|
|
21705
21713
|
isValid,
|
|
21706
21714
|
errorMsg: errorMsg2
|
|
21707
|
-
} = func(value2,
|
|
21715
|
+
} = func(value2, formValues);
|
|
21708
21716
|
if (!isValid)
|
|
21709
21717
|
return errorMsg2;
|
|
21710
21718
|
}
|
|
@@ -21721,7 +21729,6 @@ var __publicField = (obj, key, value) => {
|
|
|
21721
21729
|
fieldState
|
|
21722
21730
|
}) => {
|
|
21723
21731
|
var _a2;
|
|
21724
|
-
const formValue = getValues();
|
|
21725
21732
|
let ele = /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Fields.String, {
|
|
21726
21733
|
input: {
|
|
21727
21734
|
value: value2,
|
|
@@ -21750,9 +21757,6 @@ var __publicField = (obj, key, value) => {
|
|
|
21750
21757
|
children: value2
|
|
21751
21758
|
});
|
|
21752
21759
|
}
|
|
21753
|
-
if (c2 == null ? void 0 : c2.render) {
|
|
21754
|
-
ele = c2.render(value2, onChange, formValue, onBlur);
|
|
21755
|
-
}
|
|
21756
21760
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Form.Item, {
|
|
21757
21761
|
label: c2.label,
|
|
21758
21762
|
labelCol: {
|
|
@@ -22327,7 +22331,6 @@ var __publicField = (obj, key, value) => {
|
|
|
22327
22331
|
resource: config.name,
|
|
22328
22332
|
action: id ? "edit" : "create",
|
|
22329
22333
|
id,
|
|
22330
|
-
liveMode: "off",
|
|
22331
22334
|
...refineProps
|
|
22332
22335
|
},
|
|
22333
22336
|
defaultValues: config == null ? void 0 : config.initValue
|
|
@@ -23089,7 +23092,7 @@ var __publicField = (obj, key, value) => {
|
|
|
23089
23092
|
...yamlFormProps
|
|
23090
23093
|
});
|
|
23091
23094
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(RefineFormContent, {
|
|
23092
|
-
|
|
23095
|
+
control: refineFormResult.formResult.control,
|
|
23093
23096
|
config,
|
|
23094
23097
|
errorMsg: refineFormResult.responseErrorMsg,
|
|
23095
23098
|
action: id ? "edit" : "create"
|
|
@@ -23152,7 +23155,8 @@ var __publicField = (obj, key, value) => {
|
|
|
23152
23155
|
onFinish
|
|
23153
23156
|
},
|
|
23154
23157
|
getValues,
|
|
23155
|
-
saveButtonProps
|
|
23158
|
+
saveButtonProps,
|
|
23159
|
+
control
|
|
23156
23160
|
} = formResult;
|
|
23157
23161
|
const onClick = () => {
|
|
23158
23162
|
const data2 = getValues();
|
|
@@ -23163,7 +23167,7 @@ var __publicField = (obj, key, value) => {
|
|
|
23163
23167
|
className: "c1pvtlkp",
|
|
23164
23168
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(RefineFormContent, {
|
|
23165
23169
|
config,
|
|
23166
|
-
|
|
23170
|
+
control
|
|
23167
23171
|
}), ";", /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Button, {
|
|
23168
23172
|
...saveButtonProps,
|
|
23169
23173
|
onClick,
|
|
@@ -24038,7 +24042,7 @@ var __publicField = (obj, key, value) => {
|
|
|
24038
24042
|
}));
|
|
24039
24043
|
}
|
|
24040
24044
|
const useEagleTable = (params) => {
|
|
24041
|
-
var _a;
|
|
24045
|
+
var _a, _b, _c;
|
|
24042
24046
|
const { columns, tableProps, formatter, Dropdown = K8sDropdown } = params;
|
|
24043
24047
|
const [selectedKeys, setSelectedKeys] = React.useState([]);
|
|
24044
24048
|
const [currentPage, setCurrentPage] = React.useState((tableProps == null ? void 0 : tableProps.currentPage) || 1);
|
|
@@ -24075,7 +24079,9 @@ var __publicField = (obj, key, value) => {
|
|
|
24075
24079
|
},
|
|
24076
24080
|
[setCurrentPage]
|
|
24077
24081
|
);
|
|
24078
|
-
const
|
|
24082
|
+
const currentSize = (tableProps == null ? void 0 : tableProps.currentSize) || 5;
|
|
24083
|
+
const data2 = (_b = (_a = table.tableQueryResult.data) == null ? void 0 : _a.data) == null ? void 0 : _b.slice((currentPage - 1) * currentSize, currentPage * currentSize);
|
|
24084
|
+
const total = ((_c = table.tableQueryResult.data) == null ? void 0 : _c.data.length) || 0;
|
|
24079
24085
|
const finalDataSource = formatter ? data2 == null ? void 0 : data2.map(formatter) : data2;
|
|
24080
24086
|
const finalProps = {
|
|
24081
24087
|
tableKey: (resource == null ? void 0 : resource.name) || "table",
|
|
@@ -24086,11 +24092,12 @@ var __publicField = (obj, key, value) => {
|
|
|
24086
24092
|
error: false,
|
|
24087
24093
|
rowKey: "id",
|
|
24088
24094
|
currentPage,
|
|
24089
|
-
currentSize
|
|
24095
|
+
currentSize,
|
|
24090
24096
|
onPageChange,
|
|
24091
24097
|
onSelect: (keys) => {
|
|
24092
24098
|
setSelectedKeys(keys);
|
|
24093
24099
|
},
|
|
24100
|
+
total,
|
|
24094
24101
|
RowMenu: Dropdown
|
|
24095
24102
|
};
|
|
24096
24103
|
return { tableProps: finalProps, selectedKeys, ...table };
|
|
@@ -24411,6 +24418,7 @@ var __publicField = (obj, key, value) => {
|
|
|
24411
24418
|
exports2.ListPage = ListPage;
|
|
24412
24419
|
exports2.Menu = Menu;
|
|
24413
24420
|
exports2.MetadataForm = MetadataForm;
|
|
24421
|
+
exports2.ModalStyle = ModalStyle;
|
|
24414
24422
|
exports2.NETWORK_POLICY_INIT_VALUE = NETWORK_POLICY_INIT_VALUE;
|
|
24415
24423
|
exports2.NS_STORE_KEY = NS_STORE_KEY;
|
|
24416
24424
|
exports2.NameColumnRenderer = NameColumnRenderer;
|
package/dist/style.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.t1vq0ett{margin-bottom:4px;}
|
|
2
2
|
.t139onst{color:rgba(44,56,82,0.60);}
|
|
3
3
|
.n18lzor8.ant-tag.ant-tag-gray{background-color:rgba(237,241,250,.6);border:1px solid rgba(211,218,235,.6);color:#00122e;}
|
|
4
|
-
.mvvgkkc.ant-modal .ant-modal-content{border-radius:16px;}.mvvgkkc.ant-modal .ant-modal-header{border-radius:16px 16px 0 0;}
|
|
4
|
+
.mvvgkkc.ant-modal.normal-modal .ant-modal-content{width:492px;border-radius:16px;}.mvvgkkc.ant-modal.normal-modal .ant-modal-body{padding:32px 40px;min-height:160px;}.mvvgkkc.ant-modal.normal-modal .ant-modal-header{border-radius:16px 16px 0 0;padding:32px 40px;padding-bottom:0;}.mvvgkkc.ant-modal.normal-modal .ant-modal-footer{padding:24px 40px;}.mvvgkkc.ant-modal.normal-modal .ant-modal-close-x{top:35px;right:40px;}
|
|
5
5
|
.e5223w8.e5223w8{color:rgba(0,21,64,.3);}
|
|
6
6
|
.cdjsw14{width:100%;}.cdjsw14.overflow{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
|
7
7
|
.b142d7q8{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}.b142d7q8 .breadcrumb-item:not(:last-of-type):after{content:'>';margin:0 8px;}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
.i1u1f5zp{white-space:pre-line;}
|
|
24
24
|
.c8jy7dc{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding:8px 10px;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;gap:8px;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;border-radius:4px;background:rgba(237,241,250,0.6);}.c8jy7dc:not(:last-of-type){margin-bottom:8px;}
|
|
25
25
|
.k2sddxl{color:rgba(44,56,82,0.6);width:calc(30% - 4px);margin-right:8px;word-break:break-all;}
|
|
26
|
-
.v16vicsr{word-break:break-all;width:calc(70% - 4px);}
|
|
26
|
+
.v16vicsr{word-break:break-all;white-space:pre-wrap;width:calc(70% - 4px);}
|
|
27
27
|
.w14056kz{width:100%;}
|
|
28
28
|
.hisq2gt{width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.hisq2gt.expanded{margin-bottom:8px;}
|
|
29
29
|
.h11urhaw{margin-right:8px;line-height:18px;}
|
|
@@ -43,8 +43,7 @@
|
|
|
43
43
|
.tf5s6s.ant-tabs{-webkit-flex:1;-ms-flex:1;flex:1;min-height:0;}.tf5s6s.ant-tabs .ant-tabs-nav{margin-bottom:0;margin-right:24px;}.tf5s6s.ant-tabs .ant-tabs-nav-list{margin-left:24px;}.tf5s6s.ant-tabs .ant-tabs-content-holder{overflow:auto;}.tf5s6s.ant-tabs .ant-tabs-content-holder .ant-tabs-content,.tf5s6s.ant-tabs .ant-tabs-content-holder .ant-tabs-tabpane-active{height:100%;}
|
|
44
44
|
.b11tbgf7.ant-btn-quiet.ant-btn{color:rgba(44,56,82,0.75);}
|
|
45
45
|
.c1dicff8{width:100%;vertical-align:top;}
|
|
46
|
-
.esoz3jw
|
|
47
|
-
.e1m0bgls.ant-btn.ant-btn-link{height:22px;margin-left:8px;}
|
|
46
|
+
.esoz3jw.ant-btn.ant-btn-link{height:22px;margin-left:8px;}
|
|
48
47
|
.w8ychfk{border-radius:8px;border:1px solid rgba(211,218,235,0.60);padding:16px;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
|
49
48
|
.d1o004do{width:70px;height:70px;margin-right:16px;}
|
|
50
49
|
.dfo80qq{width:100%;}
|
|
@@ -1490,7 +1489,7 @@
|
|
|
1490
1489
|
height: 1em;
|
|
1491
1490
|
vertical-align: -0.125em;
|
|
1492
1491
|
}.wve7dfm{padding:0 24px;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}
|
|
1493
|
-
.t9oeh3c{margin:8px 0;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}.t9oeh3c
|
|
1492
|
+
.t9oeh3c{margin:8px 0;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}.t9oeh3c .ant-select{width:256px !important;}
|
|
1494
1493
|
.t1u2zqn6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:12px;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
|
1495
1494
|
.c8wrcus{-webkit-flex:1;-ms-flex:1;flex:1;min-height:0;}
|
|
1496
1495
|
.t1joof7s{width:100%;padding:11px;border-bottom:1px solid rgba(211,218,235,0.6);background:rgba(225,230,241,0.6);border-top-left-radius:8px;border-top-right-radius:8px;}.t1joof7s.collapsed{border-bottom:0;}.t1joof7s svg{margin:auto;}.t1joof7s > .dovetail-ant-space-item{line-height:16px;}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { Control } from 'react-hook-form';
|
|
3
3
|
import { ResourceModel } from '../../models';
|
|
4
4
|
import { ResourceConfig } from '../../types';
|
|
5
5
|
type Props<Model extends ResourceModel> = {
|
|
6
6
|
config?: ResourceConfig<Model>;
|
|
7
|
-
|
|
7
|
+
control: Control;
|
|
8
8
|
errorMsg?: string;
|
|
9
9
|
action?: 'create' | 'edit';
|
|
10
10
|
};
|
|
@@ -9,5 +9,9 @@ export type RefineFormField = {
|
|
|
9
9
|
label: string;
|
|
10
10
|
type?: 'number';
|
|
11
11
|
validators?: RefineFormValidator[];
|
|
12
|
-
render?:
|
|
12
|
+
render?: React.FC<{
|
|
13
|
+
value: unknown;
|
|
14
|
+
onChange: (event: unknown) => void;
|
|
15
|
+
onBlur: () => void;
|
|
16
|
+
}>;
|
|
13
17
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ModalInfo {
|
|
3
|
+
resource: string;
|
|
4
|
+
id?: string;
|
|
5
|
+
}
|
|
6
|
+
type ModalContextValue = ModalInfo & {
|
|
7
|
+
open: (info: ModalInfo) => void;
|
|
8
|
+
close: () => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const ModalContext: React.Context<ModalContextValue>;
|
|
11
|
+
declare function ModalContextProvider(props: React.PropsWithChildren<Record<string, unknown>>): JSX.Element;
|
|
12
|
+
export default ModalContextProvider;
|
|
@@ -2,6 +2,7 @@ import type { NetworkPolicyIngressRule, NetworkPolicyEgressRule } from 'kubernet
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
type Props = {
|
|
4
4
|
ingressOrEgress: NetworkPolicyIngressRule[] | NetworkPolicyEgressRule[];
|
|
5
|
+
kind?: string;
|
|
5
6
|
};
|
|
6
|
-
export declare const
|
|
7
|
+
export declare const NetworkPolicyRulesViewer: React.FC<Props>;
|
|
7
8
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { FormAction } from '@refinedev/core';
|
|
2
3
|
import useEagleForm from 'src/hooks/useEagleForm';
|
|
3
4
|
export declare enum SchemaStrategy {
|
|
4
5
|
Required = "Required",
|
|
@@ -7,7 +8,9 @@ export declare enum SchemaStrategy {
|
|
|
7
8
|
}
|
|
8
9
|
export interface YamlFormProps {
|
|
9
10
|
id?: string;
|
|
11
|
+
action?: FormAction;
|
|
10
12
|
initialValues?: Record<string, unknown>;
|
|
13
|
+
transformValues?: (values: Record<string, unknown>) => Record<string, unknown>;
|
|
11
14
|
schemaStrategy?: SchemaStrategy;
|
|
12
15
|
isShowLayout?: boolean;
|
|
13
16
|
useFormProps?: Parameters<typeof useEagleForm>[0];
|
|
@@ -15,6 +18,7 @@ export interface YamlFormProps {
|
|
|
15
18
|
disabled?: boolean;
|
|
16
19
|
onClick: () => void;
|
|
17
20
|
}) => void;
|
|
21
|
+
onErrorsChange?: (errors: string[]) => void;
|
|
18
22
|
onFinish?: () => void;
|
|
19
23
|
}
|
|
20
24
|
declare function YamlForm(props: YamlFormProps): JSX.Element;
|
|
@@ -20,6 +20,7 @@ export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError ex
|
|
|
20
20
|
isSkipSchema?: boolean;
|
|
21
21
|
};
|
|
22
22
|
initialValuesForCreate?: Record<string, unknown>;
|
|
23
|
+
transformValues?: (values: Record<string, unknown>) => Record<string, unknown>;
|
|
23
24
|
};
|
|
24
25
|
export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormReturnTypeCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
|
|
25
26
|
form: FormInstance;
|
|
@@ -43,5 +44,5 @@ declare const useEagleForm: <TQueryFnData extends Unstructured = Unstructured &
|
|
|
43
44
|
[prop: string]: unknown;
|
|
44
45
|
} = {
|
|
45
46
|
[prop: string]: unknown;
|
|
46
|
-
}, TData extends Unstructured = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action, resource, onMutationSuccess: onMutationSuccessProp, onMutationError, submitOnEnter, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, redirect, successNotification, errorNotification, meta, metaData, queryMeta, mutationMeta, liveMode, liveParams, mutationMode, dataProviderName, onLiveEvent, invalidates, undoableTimeout, queryOptions, createMutationOptions, updateMutationOptions, id: idFromProps, overtimeOptions, editorOptions, initialValuesForCreate, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
|
47
|
+
}, TData extends Unstructured = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action: actionFromProps, resource, onMutationSuccess: onMutationSuccessProp, onMutationError, submitOnEnter, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, redirect, successNotification, errorNotification, meta, metaData, queryMeta, mutationMeta, liveMode, liveParams, mutationMode, dataProviderName, onLiveEvent, invalidates, undoableTimeout, queryOptions, createMutationOptions, updateMutationOptions, id: idFromProps, overtimeOptions, editorOptions, initialValuesForCreate, transformValues, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
|
47
48
|
export default useEagleForm;
|
|
File without changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CronJob } from 'kubernetes-types/batch/v1';
|
|
2
|
+
import { WithId } from '../types';
|
|
3
|
+
import { WorkloadModel } from './workload-model';
|
|
4
|
+
export declare class CronJobModel extends WorkloadModel<CronJob> {
|
|
5
|
+
data: WithId<CronJob>;
|
|
6
|
+
constructor(data: WithId<CronJob>);
|
|
7
|
+
suspend(): WithId<CronJob>;
|
|
8
|
+
resume(): WithId<CronJob>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Job } from 'kubernetes-types/batch/v1';
|
|
2
|
+
import { WithId } from '../types';
|
|
3
|
+
import { WorkloadModel } from './workload-model';
|
|
4
|
+
export declare class JobModel extends WorkloadModel<Job> {
|
|
5
|
+
rawYaml: WithId<Job>;
|
|
6
|
+
constructor(rawYaml: WithId<Job>);
|
|
7
|
+
get duration(): number;
|
|
8
|
+
get durationDisplay(): string | undefined;
|
|
9
|
+
get completionsDisplay(): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Pod } from 'kubernetes-types/core/v1';
|
|
2
|
+
import { ResourceQuantity } from 'src/types/metric';
|
|
3
|
+
import { WithId } from '../types';
|
|
4
|
+
import { WorkloadModel } from './workload-model';
|
|
5
|
+
export declare class PodModel extends WorkloadModel<Pod> {
|
|
6
|
+
rawYaml: WithId<Pod>;
|
|
7
|
+
request: ResourceQuantity;
|
|
8
|
+
limit: ResourceQuantity;
|
|
9
|
+
constructor(rawYaml: WithId<Pod>);
|
|
10
|
+
get imageNames(): string[];
|
|
11
|
+
get restartCount(): number;
|
|
12
|
+
get readyDisplay(): string;
|
|
13
|
+
get readyContainerCount(): number | undefined;
|
|
14
|
+
get containerCount(): number | undefined;
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Resource } from '../types';
|
|
2
|
+
export declare class ResourceModel implements Resource {
|
|
3
|
+
rawYaml: Resource;
|
|
4
|
+
id: Resource['id'];
|
|
5
|
+
apiVersion: Resource['apiVersion'];
|
|
6
|
+
kind: Resource['kind'];
|
|
7
|
+
metadata: Resource['metadata'];
|
|
8
|
+
constructor(rawYaml: Resource);
|
|
9
|
+
get name(): string | undefined;
|
|
10
|
+
get namespace(): string | undefined;
|
|
11
|
+
get labels(): {
|
|
12
|
+
[name: string]: string;
|
|
13
|
+
} | undefined;
|
|
14
|
+
get annotations(): {
|
|
15
|
+
[name: string]: string;
|
|
16
|
+
} | undefined;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DaemonSet, Deployment, StatefulSet } from 'kubernetes-types/apps/v1';
|
|
2
|
+
import type { CronJob, Job } from 'kubernetes-types/batch/v1';
|
|
3
|
+
import { Pod } from 'kubernetes-types/core/v1';
|
|
4
|
+
import { WithId } from '../types';
|
|
5
|
+
import { ResourceModel } from './resource-model';
|
|
6
|
+
type WorkloadTypes = Deployment | StatefulSet | Job | DaemonSet | CronJob | Pod;
|
|
7
|
+
export declare class WorkloadModel<T extends WorkloadTypes = WorkloadTypes> extends ResourceModel {
|
|
8
|
+
rawYaml: WithId<T>;
|
|
9
|
+
constructor(rawYaml: WithId<T>);
|
|
10
|
+
get status(): T['status'];
|
|
11
|
+
get spec(): T['spec'];
|
|
12
|
+
get imageNames(): string[];
|
|
13
|
+
get restartCount(): number;
|
|
14
|
+
redeploy(): WithId<T>;
|
|
15
|
+
scale(value: number): WithId<T>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Resource } from './resource';
|
|
2
|
+
type Quantity = string;
|
|
3
|
+
export type ContainerMetrics = {
|
|
4
|
+
name: string;
|
|
5
|
+
usage: {
|
|
6
|
+
cpu?: Quantity;
|
|
7
|
+
memory?: Quantity;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export type PodMetrics = {
|
|
11
|
+
timestamp: string;
|
|
12
|
+
window: string;
|
|
13
|
+
containers: ContainerMetrics[];
|
|
14
|
+
} & Resource;
|
|
15
|
+
export type ResourceQuantity = {
|
|
16
|
+
cpu: {
|
|
17
|
+
si: string;
|
|
18
|
+
value: number;
|
|
19
|
+
};
|
|
20
|
+
memory: {
|
|
21
|
+
si: string;
|
|
22
|
+
value: number;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export {};
|