@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.
Files changed (203) hide show
  1. package/dist/{MonacoYamlDiffEditor-915e1b64.js → MonacoYamlDiffEditor-90b9132b.js} +1 -1
  2. package/dist/{index-70f11bd6.js → index-f702bf6d.js} +198 -190
  3. package/dist/refine.js +145 -144
  4. package/dist/refine.umd.cjs +54 -46
  5. package/dist/style.css +4 -5
  6. package/lib/src/components/Form/RefineFormContent.d.ts +2 -2
  7. package/lib/src/components/Form/type.d.ts +5 -1
  8. package/lib/src/components/ModalContextProvider/index.d.ts +12 -0
  9. package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.d.ts +2 -1
  10. package/lib/src/components/Table/index.d.ts +1 -0
  11. package/lib/src/components/YamlForm/index.d.ts +4 -0
  12. package/lib/src/hooks/useDeleteModal/useDeleteModal.d.ts +1 -0
  13. package/lib/src/hooks/useEagleForm.d.ts +2 -1
  14. package/lib/src/hooks/useModal.d.ts +0 -0
  15. package/lib/src/model/cronjob-model.d.ts +9 -0
  16. package/lib/src/model/index.d.ts +6 -0
  17. package/lib/src/model/job-model.d.ts +10 -0
  18. package/lib/src/model/pod-metrics-model.d.ts +7 -0
  19. package/lib/src/model/pod-model.d.ts +15 -0
  20. package/lib/src/model/resource-model.d.ts +17 -0
  21. package/lib/src/model/workload-model.d.ts +17 -0
  22. package/lib/src/types/metric.d.ts +25 -0
  23. package/package.json +1 -1
  24. package/lib/src/App.js +0 -91
  25. package/lib/src/Dovetail.js +0 -45
  26. package/lib/src/components/Breadcrumb/index.js +0 -20
  27. package/lib/src/components/ConditionsTable/ConditionsTable.js +0 -56
  28. package/lib/src/components/ConditionsTable/index.js +0 -1
  29. package/lib/src/components/CreateButton/index.js +0 -10
  30. package/lib/src/components/CronJobDropdown/index.js +0 -26
  31. package/lib/src/components/CronjobJobsTable/index.js +0 -49
  32. package/lib/src/components/DeleteButton/index.js +0 -13
  33. package/lib/src/components/DeleteManyButton/index.js +0 -16
  34. package/lib/src/components/DrawerShow/DrawerShow.js +0 -13
  35. package/lib/src/components/DrawerShow/index.js +0 -1
  36. package/lib/src/components/EditButton/index.js +0 -13
  37. package/lib/src/components/EditField/index.js +0 -47
  38. package/lib/src/components/ErrorContent/index.js +0 -36
  39. package/lib/src/components/EventsTable/EventsTable.js +0 -59
  40. package/lib/src/components/EventsTable/index.js +0 -1
  41. package/lib/src/components/Form/KeyValueListWidget.js +0 -56
  42. package/lib/src/components/Form/MetadataForm.js +0 -9
  43. package/lib/src/components/Form/NameInputWidget.js +0 -50
  44. package/lib/src/components/Form/NamespaceSelectWidget.js +0 -21
  45. package/lib/src/components/Form/index.js +0 -4
  46. package/lib/src/components/Form/widget.js +0 -1
  47. package/lib/src/components/FormErrorAlert/index.js +0 -8
  48. package/lib/src/components/FormLayout/index.js +0 -21
  49. package/lib/src/components/FormModal/index.js +0 -51
  50. package/lib/src/components/ImageNames/index.js +0 -14
  51. package/lib/src/components/IngressRulesComponent/index.js +0 -11
  52. package/lib/src/components/IngressRulesTable/IngressRulesTable.js +0 -51
  53. package/lib/src/components/IngressRulesTable/index.js +0 -1
  54. package/lib/src/components/K8sDropdown/index.js +0 -31
  55. package/lib/src/components/KeyValue/KeyValue.js +0 -27
  56. package/lib/src/components/KeyValue/index.js +0 -1
  57. package/lib/src/components/KeyValueData/index.js +0 -50
  58. package/lib/src/components/Layout/index.js +0 -39
  59. package/lib/src/components/ListPage/index.js +0 -25
  60. package/lib/src/components/Menu/index.js +0 -36
  61. package/lib/src/components/NamespacesFilter/index.js +0 -34
  62. package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.js +0 -77
  63. package/lib/src/components/NetworkPolicyRulesTable/index.js +0 -1
  64. package/lib/src/components/PageShow/PageShow.js +0 -11
  65. package/lib/src/components/PageShow/index.js +0 -1
  66. package/lib/src/components/PodContainersTable/PodContainersTable.js +0 -78
  67. package/lib/src/components/PodContainersTable/index.js +0 -1
  68. package/lib/src/components/PodLog/index.js +0 -136
  69. package/lib/src/components/ReferenceLink/index.js +0 -17
  70. package/lib/src/components/RefineForm/RefineFormContent.d.ts +0 -10
  71. package/lib/src/components/RefineForm/RefineFormModal.d.ts +0 -8
  72. package/lib/src/components/RefineForm/RefineFormPage.d.ts +0 -7
  73. package/lib/src/components/RefineForm/index.d.ts +0 -3
  74. package/lib/src/components/RefineForm/type.d.ts +0 -20
  75. package/lib/src/components/RefineForm/useRefineForm.d.ts +0 -10
  76. package/lib/src/components/ResourceCRUD/ResourceCRUD.js +0 -15
  77. package/lib/src/components/ResourceCRUD/create/index.js +0 -13
  78. package/lib/src/components/ResourceCRUD/index.js +0 -4
  79. package/lib/src/components/ResourceCRUD/list/index.js +0 -19
  80. package/lib/src/components/ResourceCRUD/show/index.js +0 -6
  81. package/lib/src/components/ResourceLink/index.js +0 -21
  82. package/lib/src/components/ResourceUsageBar/index.js +0 -81
  83. package/lib/src/components/Separator/index.js +0 -11
  84. package/lib/src/components/ShowContent/ShowContent.js +0 -157
  85. package/lib/src/components/ShowContent/fields.js +0 -157
  86. package/lib/src/components/ShowContent/index.js +0 -2
  87. package/lib/src/components/StateTag/StateTag.js +0 -22
  88. package/lib/src/components/StateTag/index.js +0 -1
  89. package/lib/src/components/Table/ErrorContent.js +0 -36
  90. package/lib/src/components/Table/TableToolBar.js +0 -14
  91. package/lib/src/components/Table/TableWidgets.js +0 -28
  92. package/lib/src/components/Table/index.js +0 -69
  93. package/lib/src/components/Tags/index.js +0 -22
  94. package/lib/src/components/Time/index.js +0 -14
  95. package/lib/src/components/WorkloadDropdown/index.js +0 -24
  96. package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.js +0 -39
  97. package/lib/src/components/WorkloadPodsTable/index.js +0 -1
  98. package/lib/src/components/WorkloadReplicas/index.js +0 -50
  99. package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.js +0 -34
  100. package/lib/src/components/YamlEditor/MonacoYamlEditor.js +0 -149
  101. package/lib/src/components/YamlEditor/YamlEditorComponent.js +0 -90
  102. package/lib/src/components/YamlEditor/index.js +0 -1
  103. package/lib/src/components/YamlEditor/style.js +0 -102
  104. package/lib/src/components/YamlEditor/yaml.worker.js +0 -1
  105. package/lib/src/components/YamlForm/index.js +0 -61
  106. package/lib/src/components/index.js +0 -38
  107. package/lib/src/constants/index.js +0 -2
  108. package/lib/src/constants/k8s.js +0 -203
  109. package/lib/src/constants/state.js +0 -15
  110. package/lib/src/contexts/component.js +0 -3
  111. package/lib/src/contexts/configs.js +0 -3
  112. package/lib/src/contexts/global-store.js +0 -3
  113. package/lib/src/contexts/index.js +0 -3
  114. package/lib/src/hooks/index.js +0 -7
  115. package/lib/src/hooks/useDeleteModal/index.js +0 -1
  116. package/lib/src/hooks/useDeleteModal/useDeleteManyModal.js +0 -31
  117. package/lib/src/hooks/useDeleteModal/useDeleteModal.js +0 -38
  118. package/lib/src/hooks/useDownloadYAML.js +0 -10
  119. package/lib/src/hooks/useEagleForm.js +0 -177
  120. package/lib/src/hooks/useEagleTable/columns.js +0 -246
  121. package/lib/src/hooks/useEagleTable/index.js +0 -2
  122. package/lib/src/hooks/useEagleTable/useEagleTable.js +0 -63
  123. package/lib/src/hooks/useEdit.js +0 -19
  124. package/lib/src/hooks/useGlobalStore.js +0 -5
  125. package/lib/src/hooks/useK8sYamlEditor.js +0 -37
  126. package/lib/src/hooks/useOpenForm.js +0 -43
  127. package/lib/src/hooks/useSchema.js +0 -37
  128. package/lib/src/hooks/useSubmitForm.js +0 -42
  129. package/lib/src/i18n.js +0 -19
  130. package/lib/src/index.js +0 -13
  131. package/lib/src/locales/en-US/dovetail.json +0 -18
  132. package/lib/src/locales/en-US/index.js +0 -4
  133. package/lib/src/locales/index.js +0 -6
  134. package/lib/src/locales/zh-CN/dovetail.json +0 -91
  135. package/lib/src/locales/zh-CN/index.js +0 -4
  136. package/lib/src/main.js +0 -12
  137. package/lib/src/models/cronjob-model.js +0 -32
  138. package/lib/src/models/daemonset-model.js +0 -17
  139. package/lib/src/models/deployment-model.js +0 -17
  140. package/lib/src/models/event-model.js +0 -11
  141. package/lib/src/models/index.js +0 -14
  142. package/lib/src/models/ingress-model.js +0 -24
  143. package/lib/src/models/job-model.js +0 -56
  144. package/lib/src/models/network-policy-model.js +0 -10
  145. package/lib/src/models/pod-metrics-model.js +0 -34
  146. package/lib/src/models/pod-model.js +0 -78
  147. package/lib/src/models/resource-model.js +0 -34
  148. package/lib/src/models/server-instance-model.d.ts +0 -10
  149. package/lib/src/models/service-model.js +0 -17
  150. package/lib/src/models/statefulset-model.js +0 -17
  151. package/lib/src/models/types/index.js +0 -1
  152. package/lib/src/models/types/metric.js +0 -1
  153. package/lib/src/models/workload-base-model.js +0 -22
  154. package/lib/src/models/workload-model.js +0 -51
  155. package/lib/src/pages/configmaps/index.js +0 -15
  156. package/lib/src/pages/cronjobs/create/index.js +0 -6
  157. package/lib/src/pages/cronjobs/index.js +0 -3
  158. package/lib/src/pages/cronjobs/list/index.js +0 -42
  159. package/lib/src/pages/cronjobs/show/index.js +0 -16
  160. package/lib/src/pages/daemonsets/create/index.js +0 -6
  161. package/lib/src/pages/daemonsets/index.js +0 -3
  162. package/lib/src/pages/daemonsets/list/index.js +0 -32
  163. package/lib/src/pages/daemonsets/show/index.js +0 -16
  164. package/lib/src/pages/deployments/create/index.js +0 -7
  165. package/lib/src/pages/deployments/index.js +0 -3
  166. package/lib/src/pages/deployments/list/index.js +0 -26
  167. package/lib/src/pages/deployments/show/index.js +0 -16
  168. package/lib/src/pages/ingresses/index.js +0 -26
  169. package/lib/src/pages/jobs/index.js +0 -34
  170. package/lib/src/pages/networkPolicies/index.js +0 -67
  171. package/lib/src/pages/pods/create/index.js +0 -6
  172. package/lib/src/pages/pods/index.js +0 -3
  173. package/lib/src/pages/pods/list/index.js +0 -81
  174. package/lib/src/pages/pods/show/index.js +0 -54
  175. package/lib/src/pages/secrets/index.js +0 -15
  176. package/lib/src/pages/services/index.js +0 -26
  177. package/lib/src/pages/statefulsets/create/index.js +0 -6
  178. package/lib/src/pages/statefulsets/index.js +0 -3
  179. package/lib/src/pages/statefulsets/list/index.js +0 -26
  180. package/lib/src/pages/statefulsets/show/index.js +0 -16
  181. package/lib/src/plugins/index.js +0 -3
  182. package/lib/src/plugins/model-plugin.js +0 -46
  183. package/lib/src/plugins/relation-plugin.js +0 -81
  184. package/lib/src/plugins/type.js +0 -1
  185. package/lib/src/providers/index.js +0 -1
  186. package/lib/src/providers/router-provider/index.js +0 -100
  187. package/lib/src/types/index.js +0 -1
  188. package/lib/src/types/resource.js +0 -12
  189. package/lib/src/utils/addId.js +0 -8
  190. package/lib/src/utils/download.js +0 -9
  191. package/lib/src/utils/error.js +0 -53
  192. package/lib/src/utils/form.js +0 -9
  193. package/lib/src/utils/k8s.js +0 -6
  194. package/lib/src/utils/labels.js +0 -15
  195. package/lib/src/utils/match-selector.js +0 -12
  196. package/lib/src/utils/openapi.js +0 -33
  197. package/lib/src/utils/schema.js +0 -117
  198. package/lib/src/utils/selector.js +0 -12
  199. package/lib/src/utils/string.js +0 -6
  200. package/lib/src/utils/time.js +0 -46
  201. package/lib/src/utils/unit.js +0 -69
  202. package/lib/src/utils/yaml.js +0 -44
  203. package/lib/vite.config.js +0 -60
@@ -8027,7 +8027,7 @@ var cx = function cx2() {
8027
8027
  };
8028
8028
  var cx_default = cx;
8029
8029
  const ConfigsContext = createContext({});
8030
- const useDeleteModal_1kqb6q3 = "";
8030
+ const useDeleteModal_v7eb93 = "";
8031
8031
  const TextStyle = "t1vq0ett";
8032
8032
  const TipStyle = "t139onst";
8033
8033
  const NameStyle$1 = "n18lzor8";
@@ -8680,6 +8680,7 @@ const PodSelectorTable = ({ podSelectors = {} }) => {
8680
8680
  const component = useContext(ComponentContext);
8681
8681
  const Table$1 = component.Table || Table;
8682
8682
  const [currentPage, setCurrentPage] = useState(1);
8683
+ const currentSize = 10;
8683
8684
  const datas = Object.keys(podSelectors).map((key2) => ({
8684
8685
  id: key2,
8685
8686
  key: key2,
@@ -8716,11 +8717,12 @@ const PodSelectorTable = ({ podSelectors = {} }) => {
8716
8717
  {
8717
8718
  tableKey: "podSelector",
8718
8719
  loading: false,
8719
- data: datas,
8720
+ data: datas.slice((currentPage - 1) * currentSize, currentPage * currentSize),
8721
+ total: datas.length,
8720
8722
  columns: addDefaultRenderToColumns(columns),
8721
8723
  rowKey: "key",
8722
8724
  empty: t2("dovetail.empty"),
8723
- currentSize: 10,
8725
+ currentSize,
8724
8726
  currentPage,
8725
8727
  onPageChange: setCurrentPage,
8726
8728
  showMenuColumn: false
@@ -8732,6 +8734,7 @@ const PortsTable = ({ service }) => {
8732
8734
  const component = useContext(ComponentContext);
8733
8735
  const Table$1 = component.Table || Table;
8734
8736
  const [currentPage, setCurrentPage] = useState(1);
8737
+ const currentSize = 10;
8735
8738
  const columns = [
8736
8739
  {
8737
8740
  key: "name",
@@ -8788,11 +8791,12 @@ const PortsTable = ({ service }) => {
8788
8791
  {
8789
8792
  tableKey: "ports",
8790
8793
  loading: false,
8791
- data: ports,
8794
+ data: ports.slice((currentPage - 1) * currentSize, currentPage * currentSize),
8795
+ total: ports.length,
8792
8796
  columns: addDefaultRenderToColumns(columns),
8793
8797
  rowKey: "name",
8794
8798
  empty: t2("dovetail.empty"),
8795
- currentSize: 10,
8799
+ currentSize,
8796
8800
  currentPage,
8797
8801
  onPageChange: setCurrentPage,
8798
8802
  showMenuColumn: false
@@ -10111,6 +10115,7 @@ const ConditionsTable = ({ conditions = [] }) => {
10111
10115
  const { t: t2 } = useTranslation();
10112
10116
  const component = useContext(ComponentContext);
10113
10117
  const Table$1 = component.Table || Table;
10118
+ const currentSize = 10;
10114
10119
  const conditionsWithId = addId(conditions, "type");
10115
10120
  const columns = [
10116
10121
  {
@@ -10176,11 +10181,12 @@ const ConditionsTable = ({ conditions = [] }) => {
10176
10181
  {
10177
10182
  tableKey: "condition",
10178
10183
  loading: false,
10179
- data: conditionsWithId,
10184
+ data: conditionsWithId.slice((currentPage - 1) * currentSize, currentPage * currentSize),
10185
+ total: conditionsWithId.length,
10180
10186
  columns: addDefaultRenderToColumns(columns),
10181
10187
  rowKey: "type",
10182
10188
  empty: t2("dovetail.empty"),
10183
- currentSize: 10,
10189
+ currentSize,
10184
10190
  currentPage,
10185
10191
  onPageChange: setCurrentPage,
10186
10192
  showMenuColumn: false
@@ -10386,6 +10392,7 @@ const CronjobJobsTable = ({
10386
10392
  const [currentPage, setCurrentPage] = useState(1);
10387
10393
  const component = useContext(ComponentContext);
10388
10394
  const Table$1 = component.Table || Table;
10395
+ const currentSize = 10;
10389
10396
  const {
10390
10397
  data: data2,
10391
10398
  isLoading
@@ -10422,13 +10429,14 @@ const CronjobJobsTable = ({
10422
10429
  }), /* @__PURE__ */ jsxRuntimeExports.jsx(Table$1, {
10423
10430
  tableKey: "cronjobs",
10424
10431
  loading: isLoading,
10425
- data: dataSource || [],
10432
+ data: (dataSource || []).slice((currentPage - 1) * currentSize, currentPage * currentSize),
10433
+ total: (dataSource == null ? void 0 : dataSource.length) || 0,
10426
10434
  columns,
10427
10435
  rowKey: "id",
10428
10436
  error: false,
10429
10437
  currentPage,
10430
10438
  onPageChange: (p) => setCurrentPage(p),
10431
- currentSize: 10,
10439
+ currentSize,
10432
10440
  refetch: () => null,
10433
10441
  showMenuColumn: false
10434
10442
  })]
@@ -10437,6 +10445,7 @@ const CronjobJobsTable = ({
10437
10445
  const EventsTable = ({}) => {
10438
10446
  const { i18n: i18n2 } = useTranslation();
10439
10447
  const [currentPage, setCurrentPage] = useState(1);
10448
+ const currentSize = 10;
10440
10449
  const { data: data2, isLoading } = useList({
10441
10450
  resource: "events",
10442
10451
  meta: { resourceBasePath: "/apis/events.k8s.io/v1", kind: "Event" },
@@ -10503,13 +10512,14 @@ const EventsTable = ({}) => {
10503
10512
  {
10504
10513
  tableKey: "events",
10505
10514
  loading: isLoading,
10506
- data: dataSource || [],
10515
+ data: (dataSource || []).slice((currentPage - 1) * currentSize, currentPage * currentSize),
10516
+ total: (dataSource == null ? void 0 : dataSource.length) || 0,
10507
10517
  columns: addDefaultRenderToColumns(columns),
10508
10518
  rowKey: "id",
10509
10519
  error: false,
10510
10520
  currentPage,
10511
10521
  onPageChange: (p) => setCurrentPage(p),
10512
- currentSize: 10,
10522
+ currentSize,
10513
10523
  refetch: () => null,
10514
10524
  showMenuColumn: false
10515
10525
  }
@@ -10555,6 +10565,7 @@ const IngressRulesTable = ({ ingress }) => {
10555
10565
  const component = useContext(ComponentContext);
10556
10566
  const Table$1 = component.Table || Table;
10557
10567
  const [currentPage, setCurrentPage] = useState(1);
10568
+ const currentSize = 10;
10558
10569
  const columns = [
10559
10570
  {
10560
10571
  key: "pathType",
@@ -10629,18 +10640,19 @@ const IngressRulesTable = ({ ingress }) => {
10629
10640
  {
10630
10641
  tableKey: "ingressRules",
10631
10642
  loading: false,
10632
- data: rows,
10643
+ data: rows.slice((currentPage - 1) * currentSize, currentPage * currentSize),
10644
+ total: rows.length,
10633
10645
  columns: addDefaultRenderToColumns(columns),
10634
10646
  rowKey: "pathType",
10635
10647
  empty: t2("dovetail.empty"),
10636
- currentSize: 10,
10648
+ currentSize,
10637
10649
  currentPage,
10638
10650
  onPageChange: setCurrentPage,
10639
10651
  showMenuColumn: false
10640
10652
  }
10641
10653
  );
10642
10654
  };
10643
- const KeyValue_1ebh6uj = "";
10655
+ const KeyValue_1v1utgj = "";
10644
10656
  const ContentBlockStyle = "c8jy7dc";
10645
10657
  const KeyStyle = "k2sddxl";
10646
10658
  const ValueStyle$2 = "v16vicsr";
@@ -11072,6 +11084,7 @@ const WorkloadPodsTable = ({
11072
11084
  const [currentPage, setCurrentPage] = useState(1);
11073
11085
  const component = useContext(ComponentContext);
11074
11086
  const Table$1 = component.Table || Table;
11087
+ const currentSize = 10;
11075
11088
  const {
11076
11089
  data: data2
11077
11090
  } = useList({
@@ -11116,14 +11129,15 @@ const WorkloadPodsTable = ({
11116
11129
  }), /* @__PURE__ */ jsxRuntimeExports.jsx(Table$1, {
11117
11130
  tableKey: "pods",
11118
11131
  loading: !dataSource,
11119
- data: dataSource || [],
11132
+ data: (dataSource || []).slice((currentPage - 1) * currentSize, currentPage * currentSize),
11133
+ total: (dataSource == null ? void 0 : dataSource.length) || 0,
11120
11134
  columns: addDefaultRenderToColumns(columns),
11121
11135
  onSelect: (keys) => setSelectedKeys(keys),
11122
11136
  rowKey: "id",
11123
11137
  error: false,
11124
11138
  currentPage,
11125
11139
  onPageChange: (p) => setCurrentPage(p),
11126
- currentSize: 10,
11140
+ currentSize,
11127
11141
  refetch: () => null,
11128
11142
  showMenuColumn: false
11129
11143
  })]
@@ -11234,9 +11248,8 @@ function useSubmitForm(options) {
11234
11248
  onSubmit
11235
11249
  };
11236
11250
  }
11237
- const index_13sllsf = "";
11238
- const EditFieldModalStyle = "esoz3jw";
11239
- const EditButtonStyle = "e1m0bgls";
11251
+ const index_7c3887 = "";
11252
+ const EditButtonStyle = "esoz3jw";
11240
11253
  function EditFieldModal(props) {
11241
11254
  const {
11242
11255
  title,
@@ -11263,7 +11276,7 @@ function EditFieldModal(props) {
11263
11276
  reset();
11264
11277
  }, [reset]);
11265
11278
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.modal, {
11266
- className: EditFieldModalStyle,
11279
+ className: ModalStyle,
11267
11280
  title: title || i18n2.t("dovetail.edit"),
11268
11281
  confirmLoading: submitting,
11269
11282
  onOk: onSubmit,
@@ -17305,7 +17318,7 @@ const LogViewerBase = memo((_a) => {
17305
17318
  const LogViewer = React__default.forwardRef((props, ref) => React__default.createElement(LogViewerBase, Object.assign({ innerRef: ref }, props)));
17306
17319
  LogViewer.displayName = "LogViewer";
17307
17320
  const baseNoReset = "";
17308
- const index_yr3216 = "";
17321
+ const index_jv52b6 = "";
17309
17322
  const WrapperStyle$3 = "wve7dfm";
17310
17323
  const ToolbarStyle = "t9oeh3c";
17311
17324
  const ToolbarAreaStyle = "t1u2zqn6";
@@ -17397,7 +17410,6 @@ const PodLog = ({
17397
17410
  }
17398
17411
  const total = buffer + chunk.slice(0, lastIndex);
17399
17412
  buffer = chunk.slice(lastIndex + 1);
17400
- console.log(total);
17401
17413
  const formattedLogs = total.split("\n").filter(Boolean).map((line) => {
17402
17414
  const [timestamps, ...content] = line.split(" ");
17403
17415
  const t22 = new Date(timestamps).toLocaleString();
@@ -17722,7 +17734,8 @@ const NetworkPolicyRulesViewer = ({
17722
17734
  defaultValue: yaml.dump(ingressOrEgress),
17723
17735
  height: "300px",
17724
17736
  className: EditorStyle$1,
17725
- readOnly: true
17737
+ readOnly: true,
17738
+ isScrollOnFocus: true
17726
17739
  });
17727
17740
  };
17728
17741
  const PodContainersTable = ({
@@ -17733,6 +17746,7 @@ const PodContainersTable = ({
17733
17746
  const component = useContext(ComponentContext);
17734
17747
  const Table$1 = component.Table || Table;
17735
17748
  const [currentPage, setCurrentPage] = useState(1);
17749
+ const currentSize = 10;
17736
17750
  const columns = useMemo(
17737
17751
  () => [
17738
17752
  {
@@ -17809,11 +17823,12 @@ const PodContainersTable = ({
17809
17823
  {
17810
17824
  tableKey: "podContainers",
17811
17825
  loading: false,
17812
- data: dataSource,
17826
+ data: dataSource.slice((currentPage - 1) * currentSize, currentPage * currentSize),
17827
+ total: dataSource.length,
17813
17828
  columns: addDefaultRenderToColumns(columns),
17814
17829
  rowKey: "containerID",
17815
17830
  error: false,
17816
- currentSize: 10,
17831
+ currentSize,
17817
17832
  currentPage,
17818
17833
  onPageChange: setCurrentPage,
17819
17834
  showMenuColumn: false
@@ -21675,30 +21690,23 @@ const RefineFormContent = (props) => {
21675
21690
  var _a, _b;
21676
21691
  const {
21677
21692
  config,
21678
- formResult,
21693
+ control,
21679
21694
  action,
21680
21695
  errorMsg
21681
21696
  } = props;
21682
- const {
21683
- control,
21684
- watch,
21685
- getValues
21686
- } = formResult;
21687
- watch();
21688
21697
  const fields = (_b = (_a = config == null ? void 0 : config.formConfig) == null ? void 0 : _a.fields) == null ? void 0 : _b.map((c2) => {
21689
21698
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Controller, {
21690
21699
  control,
21691
21700
  name: c2.path.join("."),
21692
21701
  rules: {
21693
- validate(value2) {
21694
- const formValue = getValues();
21702
+ validate(value2, formValues) {
21695
21703
  if (!c2.validators || c2.validators.length === 0)
21696
21704
  return true;
21697
21705
  for (const func of c2.validators) {
21698
21706
  const {
21699
21707
  isValid,
21700
21708
  errorMsg: errorMsg2
21701
- } = func(value2, formValue);
21709
+ } = func(value2, formValues);
21702
21710
  if (!isValid)
21703
21711
  return errorMsg2;
21704
21712
  }
@@ -21715,7 +21723,6 @@ const RefineFormContent = (props) => {
21715
21723
  fieldState
21716
21724
  }) => {
21717
21725
  var _a2;
21718
- const formValue = getValues();
21719
21726
  let ele = /* @__PURE__ */ jsxRuntimeExports.jsx(Fields.String, {
21720
21727
  input: {
21721
21728
  value: value2,
@@ -21744,9 +21751,6 @@ const RefineFormContent = (props) => {
21744
21751
  children: value2
21745
21752
  });
21746
21753
  }
21747
- if (c2 == null ? void 0 : c2.render) {
21748
- ele = c2.render(value2, onChange, formValue, onBlur);
21749
- }
21750
21754
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, {
21751
21755
  label: c2.label,
21752
21756
  labelCol: {
@@ -22321,7 +22325,6 @@ const useRefineForm = (props) => {
22321
22325
  resource: config.name,
22322
22326
  action: id ? "edit" : "create",
22323
22327
  id,
22324
- liveMode: "off",
22325
22328
  ...refineProps
22326
22329
  },
22327
22330
  defaultValues: config == null ? void 0 : config.initValue
@@ -22345,7 +22348,7 @@ const Separator = () => {
22345
22348
  });
22346
22349
  };
22347
22350
  const MonacoYamlEditor = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
22348
- const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-915e1b64.js"));
22351
+ const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-90b9132b.js"));
22349
22352
  const YamlEditorComponent = forwardRef(
22350
22353
  function YamlEditorComponent2(props, ref) {
22351
22354
  const {
@@ -23083,7 +23086,7 @@ function FormModal(props) {
23083
23086
  ...yamlFormProps
23084
23087
  });
23085
23088
  return /* @__PURE__ */ jsxRuntimeExports.jsx(RefineFormContent, {
23086
- formResult: refineFormResult.formResult,
23089
+ control: refineFormResult.formResult.control,
23087
23090
  config,
23088
23091
  errorMsg: refineFormResult.responseErrorMsg,
23089
23092
  action: id ? "edit" : "create"
@@ -23146,7 +23149,8 @@ const RefineFormPage = (props) => {
23146
23149
  onFinish
23147
23150
  },
23148
23151
  getValues,
23149
- saveButtonProps
23152
+ saveButtonProps,
23153
+ control
23150
23154
  } = formResult;
23151
23155
  const onClick = () => {
23152
23156
  const data2 = getValues();
@@ -23157,7 +23161,7 @@ const RefineFormPage = (props) => {
23157
23161
  className: "c1pvtlkp",
23158
23162
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx(RefineFormContent, {
23159
23163
  config,
23160
- formResult
23164
+ control
23161
23165
  }), ";", /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
23162
23166
  ...saveButtonProps,
23163
23167
  onClick,
@@ -24032,7 +24036,7 @@ function addDefaultRenderToColumns(columns) {
24032
24036
  }));
24033
24037
  }
24034
24038
  const useEagleTable = (params) => {
24035
- var _a;
24039
+ var _a, _b, _c;
24036
24040
  const { columns, tableProps, formatter, Dropdown = K8sDropdown } = params;
24037
24041
  const [selectedKeys, setSelectedKeys] = useState([]);
24038
24042
  const [currentPage, setCurrentPage] = useState((tableProps == null ? void 0 : tableProps.currentPage) || 1);
@@ -24069,7 +24073,9 @@ const useEagleTable = (params) => {
24069
24073
  },
24070
24074
  [setCurrentPage]
24071
24075
  );
24072
- const data2 = (_a = table.tableQueryResult.data) == null ? void 0 : _a.data;
24076
+ const currentSize = (tableProps == null ? void 0 : tableProps.currentSize) || 5;
24077
+ const data2 = (_b = (_a = table.tableQueryResult.data) == null ? void 0 : _a.data) == null ? void 0 : _b.slice((currentPage - 1) * currentSize, currentPage * currentSize);
24078
+ const total = ((_c = table.tableQueryResult.data) == null ? void 0 : _c.data.length) || 0;
24073
24079
  const finalDataSource = formatter ? data2 == null ? void 0 : data2.map(formatter) : data2;
24074
24080
  const finalProps = {
24075
24081
  tableKey: (resource == null ? void 0 : resource.name) || "table",
@@ -24080,11 +24086,12 @@ const useEagleTable = (params) => {
24080
24086
  error: false,
24081
24087
  rowKey: "id",
24082
24088
  currentPage,
24083
- currentSize: (tableProps == null ? void 0 : tableProps.currentSize) || 5,
24089
+ currentSize,
24084
24090
  onPageChange,
24085
24091
  onSelect: (keys) => {
24086
24092
  setSelectedKeys(keys);
24087
24093
  },
24094
+ total,
24088
24095
  RowMenu: Dropdown
24089
24096
  };
24090
24097
  return { tableProps: finalProps, selectedKeys, ...table };
@@ -24299,7 +24306,7 @@ const relationPlugin = new RelationPlugin();
24299
24306
  const ProviderPlugins = [relationPlugin, modelPlugin];
24300
24307
  const dovetailRefineI18n = i18n;
24301
24308
  export {
24302
- CreateButton as $,
24309
+ ReplicasDropdown as $,
24303
24310
  AgeColumnRenderer as A,
24304
24311
  useEdit as B,
24305
24312
  CommonSorter as C,
@@ -24312,156 +24319,157 @@ export {
24312
24319
  dnsSubDomainRules as J,
24313
24320
  rfc1123LabelRules as K,
24314
24321
  rfc1035LabelRules as L,
24315
- NamespaceSelectWidget as M,
24322
+ ModalStyle as M,
24316
24323
  NameColumnRenderer as N,
24317
- namespaceRules as O,
24324
+ NamespaceSelectWidget as O,
24318
24325
  PlainTextNameColumnRenderer as P,
24319
- KeyValueListWidget as Q,
24326
+ namespaceRules as Q,
24320
24327
  ReplicasColumnRenderer as R,
24321
24328
  StateDisplayColumnRenderer as S,
24322
- MetadataForm as T,
24323
- PageShow as U,
24324
- Time as V,
24329
+ KeyValueListWidget as T,
24330
+ MetadataForm as U,
24331
+ PageShow as V,
24325
24332
  WorkloadImageColumnRenderer as W,
24326
- ConditionsTable as X,
24327
- PodContainersTable as Y,
24328
- WorkloadDropdown as Z,
24329
- ReplicasDropdown as _,
24333
+ Time as X,
24334
+ ConditionsTable as Y,
24335
+ PodContainersTable as Z,
24336
+ WorkloadDropdown as _,
24330
24337
  useDeleteModal as a,
24331
- DrawerShow as a$,
24332
- ImageNames as a0,
24333
- ResourceList as a1,
24334
- ResourceShow as a2,
24335
- ResourceForm as a3,
24336
- ResourceCRUD as a4,
24337
- WorkloadPodsTable as a5,
24338
- CronJobDropdown as a6,
24339
- ResourceUsageBar as a7,
24340
- WorkloadReplicasForm as a8,
24341
- WorkloadReplicas as a9,
24342
- AnnotationsField as aA,
24343
- ServiceInnerClusterAccessField as aB,
24344
- ServiceOutClusterAccessField as aC,
24345
- PodSelectorField as aD,
24346
- PortsTableField as aE,
24347
- DurationField as aF,
24348
- EventsTab as aG,
24349
- PodLogTab as aH,
24350
- BasicGroup as aI,
24351
- PodsGroup as aJ,
24352
- PodContainersGroup as aK,
24353
- ServicePodsGroup as aL,
24354
- ConditionsGroup as aM,
24355
- SecretDataGroup as aN,
24356
- JobsGroup as aO,
24357
- IngressRulesGroup as aP,
24358
- PodSelectorGroup as aQ,
24359
- PortsGroup as aR,
24360
- DataGroup as aS,
24361
- NetworkPolicyIngressRulesGroup as aT,
24362
- NetworkPolicyEgressRulesGroup as aU,
24363
- ShowGroupComponent as aV,
24364
- ShowContent as aW,
24365
- DeleteManyButton as aX,
24366
- ListPage as aY,
24367
- StateTagStyle as aZ,
24368
- StateTag as a_,
24369
- CronjobJobsTable as aa,
24370
- KeyValue as ab,
24371
- KeyValueAnnotation as ac,
24372
- KeyValueSecret as ad,
24373
- Separator as ae,
24374
- YamlEditorComponent as af,
24375
- DeleteButton as ag,
24376
- Layout as ah,
24377
- AreaType as ai,
24378
- ImageField as aj,
24379
- ReplicaField as ak,
24380
- ConditionsField as al,
24381
- PodsField as am,
24382
- JobsField as an,
24383
- DataField as ao,
24384
- SecretDataField as ap,
24385
- StartTimeField as aq,
24386
- ServiceTypeField as ar,
24387
- ClusterIpField as as,
24388
- SessionAffinityField as at,
24389
- ServicePodsField as au,
24390
- IngressRulesTableTabField as av,
24391
- EventsTableTabField as aw,
24392
- NamespaceField as ax,
24393
- AgeField as ay,
24394
- LabelsField as az,
24338
+ StateTag as a$,
24339
+ CreateButton as a0,
24340
+ ImageNames as a1,
24341
+ ResourceList as a2,
24342
+ ResourceShow as a3,
24343
+ ResourceForm as a4,
24344
+ ResourceCRUD as a5,
24345
+ WorkloadPodsTable as a6,
24346
+ CronJobDropdown as a7,
24347
+ ResourceUsageBar as a8,
24348
+ WorkloadReplicasForm as a9,
24349
+ LabelsField as aA,
24350
+ AnnotationsField as aB,
24351
+ ServiceInnerClusterAccessField as aC,
24352
+ ServiceOutClusterAccessField as aD,
24353
+ PodSelectorField as aE,
24354
+ PortsTableField as aF,
24355
+ DurationField as aG,
24356
+ EventsTab as aH,
24357
+ PodLogTab as aI,
24358
+ BasicGroup as aJ,
24359
+ PodsGroup as aK,
24360
+ PodContainersGroup as aL,
24361
+ ServicePodsGroup as aM,
24362
+ ConditionsGroup as aN,
24363
+ SecretDataGroup as aO,
24364
+ JobsGroup as aP,
24365
+ IngressRulesGroup as aQ,
24366
+ PodSelectorGroup as aR,
24367
+ PortsGroup as aS,
24368
+ DataGroup as aT,
24369
+ NetworkPolicyIngressRulesGroup as aU,
24370
+ NetworkPolicyEgressRulesGroup as aV,
24371
+ ShowGroupComponent as aW,
24372
+ ShowContent as aX,
24373
+ DeleteManyButton as aY,
24374
+ ListPage as aZ,
24375
+ StateTagStyle as a_,
24376
+ WorkloadReplicas as aa,
24377
+ CronjobJobsTable as ab,
24378
+ KeyValue as ac,
24379
+ KeyValueAnnotation as ad,
24380
+ KeyValueSecret as ae,
24381
+ Separator as af,
24382
+ YamlEditorComponent as ag,
24383
+ DeleteButton as ah,
24384
+ Layout as ai,
24385
+ AreaType as aj,
24386
+ ImageField as ak,
24387
+ ReplicaField as al,
24388
+ ConditionsField as am,
24389
+ PodsField as an,
24390
+ JobsField as ao,
24391
+ DataField as ap,
24392
+ SecretDataField as aq,
24393
+ StartTimeField as ar,
24394
+ ServiceTypeField as as,
24395
+ ClusterIpField as at,
24396
+ SessionAffinityField as au,
24397
+ ServicePodsField as av,
24398
+ IngressRulesTableTabField as aw,
24399
+ EventsTableTabField as ax,
24400
+ NamespaceField as ay,
24401
+ AgeField as az,
24395
24402
  NameSpaceColumnRenderer as b,
24396
- DaemonSetModel as b$,
24397
- Menu as b0,
24398
- EditButton as b1,
24399
- ReferenceLink as b2,
24400
- ResourceLink as b3,
24401
- NS_STORE_KEY as b4,
24402
- ALL_NS as b5,
24403
- useNamespacesFilter as b6,
24404
- NamespacesFilter as b7,
24405
- FormModal as b8,
24406
- RefineFormContent as b9,
24407
- SERVER_INSTANCE_INIT_VALUE as bA,
24408
- TIMESTAMP_LABEL as bB,
24409
- SECRET_OPAQUE_INIT_VALUE as bC,
24410
- SECRET_IMAGE_REPO_INIT_VALUE as bD,
24411
- SECRET_BASIC_AUTH_INIT_VALUE as bE,
24412
- SECRET_SSH_AUTH_INIT_VALUE as bF,
24413
- SECRET_TLS_INIT_VALUE as bG,
24414
- SECRET_CUSTOM_INIT_VALUE as bH,
24415
- WorkloadState as bI,
24416
- AccessControlAuth as bJ,
24417
- Dovetail as bK,
24418
- RESOURCE_GROUP as bL,
24419
- FormType as bM,
24420
- ComponentContext as bN,
24421
- GlobalStoreContext as bO,
24422
- ConfigsContext as bP,
24423
- IngressModel as bQ,
24424
- NetworkPolicyModel as bR,
24425
- JobModel as bS,
24426
- WorkloadModel as bT,
24427
- WorkloadBaseModel as bU,
24428
- PodModel as bV,
24429
- PodMetricsModel as bW,
24430
- ResourceModel as bX,
24431
- CronJobModel as bY,
24432
- EventModel as bZ,
24433
- DeploymentModel as b_,
24434
- RefineFormPage as ba,
24435
- SchemaStrategy as bb,
24436
- YamlForm as bc,
24437
- useRefineForm as bd,
24438
- ServiceInClusterAccessComponent as be,
24439
- ServiceOutClusterAccessComponent as bf,
24440
- Tags as bg,
24441
- TextTags as bh,
24442
- PodLog as bi,
24443
- NetworkPolicyRulesViewer as bj,
24444
- Tabs as bk,
24445
- BASE_INIT_VALUE as bl,
24446
- DEPLOYMENT_INIT_VALUE as bm,
24447
- CRONJOB_INIT_VALUE as bn,
24448
- DAEMONSET_INIT_VALUE as bo,
24449
- JOB_INIT_VALUE as bp,
24450
- STATEFULSET_INIT_VALUE as bq,
24451
- POD_INIT_VALUE as br,
24452
- SERVICE_CLUSTER_IP_INIT_VALUE as bs,
24453
- SERVICE_NODE_PORT_INIT_VALUE as bt,
24454
- SERVICE_LOAD_BALANCER_INIT_VALUE as bu,
24455
- SERVICE_EXTERNAL_NAME_INIT_VALUE as bv,
24456
- SERVICE_HEADLESS_INIT_VALUE as bw,
24457
- INGRESS_INIT_VALUE as bx,
24458
- NETWORK_POLICY_INIT_VALUE as by,
24459
- CONFIG_MAP_INIT_VALUE as bz,
24403
+ DeploymentModel as b$,
24404
+ DrawerShow as b0,
24405
+ Menu as b1,
24406
+ EditButton as b2,
24407
+ ReferenceLink as b3,
24408
+ ResourceLink as b4,
24409
+ NS_STORE_KEY as b5,
24410
+ ALL_NS as b6,
24411
+ useNamespacesFilter as b7,
24412
+ NamespacesFilter as b8,
24413
+ FormModal as b9,
24414
+ CONFIG_MAP_INIT_VALUE as bA,
24415
+ SERVER_INSTANCE_INIT_VALUE as bB,
24416
+ TIMESTAMP_LABEL as bC,
24417
+ SECRET_OPAQUE_INIT_VALUE as bD,
24418
+ SECRET_IMAGE_REPO_INIT_VALUE as bE,
24419
+ SECRET_BASIC_AUTH_INIT_VALUE as bF,
24420
+ SECRET_SSH_AUTH_INIT_VALUE as bG,
24421
+ SECRET_TLS_INIT_VALUE as bH,
24422
+ SECRET_CUSTOM_INIT_VALUE as bI,
24423
+ WorkloadState as bJ,
24424
+ AccessControlAuth as bK,
24425
+ Dovetail as bL,
24426
+ RESOURCE_GROUP as bM,
24427
+ FormType as bN,
24428
+ ComponentContext as bO,
24429
+ GlobalStoreContext as bP,
24430
+ ConfigsContext as bQ,
24431
+ IngressModel as bR,
24432
+ NetworkPolicyModel as bS,
24433
+ JobModel as bT,
24434
+ WorkloadModel as bU,
24435
+ WorkloadBaseModel as bV,
24436
+ PodModel as bW,
24437
+ PodMetricsModel as bX,
24438
+ ResourceModel as bY,
24439
+ CronJobModel as bZ,
24440
+ EventModel as b_,
24441
+ RefineFormContent as ba,
24442
+ RefineFormPage as bb,
24443
+ SchemaStrategy as bc,
24444
+ YamlForm as bd,
24445
+ useRefineForm as be,
24446
+ ServiceInClusterAccessComponent as bf,
24447
+ ServiceOutClusterAccessComponent as bg,
24448
+ Tags as bh,
24449
+ TextTags as bi,
24450
+ PodLog as bj,
24451
+ NetworkPolicyRulesViewer as bk,
24452
+ Tabs as bl,
24453
+ BASE_INIT_VALUE as bm,
24454
+ DEPLOYMENT_INIT_VALUE as bn,
24455
+ CRONJOB_INIT_VALUE as bo,
24456
+ DAEMONSET_INIT_VALUE as bp,
24457
+ JOB_INIT_VALUE as bq,
24458
+ STATEFULSET_INIT_VALUE as br,
24459
+ POD_INIT_VALUE as bs,
24460
+ SERVICE_CLUSTER_IP_INIT_VALUE as bt,
24461
+ SERVICE_NODE_PORT_INIT_VALUE as bu,
24462
+ SERVICE_LOAD_BALANCER_INIT_VALUE as bv,
24463
+ SERVICE_EXTERNAL_NAME_INIT_VALUE as bw,
24464
+ SERVICE_HEADLESS_INIT_VALUE as bx,
24465
+ INGRESS_INIT_VALUE as by,
24466
+ NETWORK_POLICY_INIT_VALUE as bz,
24460
24467
  WorkloadRestartsColumnRenderer as c,
24461
- StatefulSetModel as c0,
24462
- ServiceTypeEnum as c1,
24463
- ServiceModel as c2,
24464
- ProviderPlugins as c3,
24468
+ DaemonSetModel as c0,
24469
+ StatefulSetModel as c1,
24470
+ ServiceTypeEnum as c2,
24471
+ ServiceModel as c3,
24472
+ ProviderPlugins as c4,
24465
24473
  dovetailRefineI18n as d,
24466
24474
  NodeNameColumnRenderer as e,
24467
24475
  RestartCountColumnRenderer as f,