@terrestris/shogun-admin 16.1.0-next.1 → 17.0.0-next.2

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 (259) hide show
  1. package/package.json +74 -74
  2. package/dist/build/assets/App-BP74CNP_.js +0 -1258
  3. package/dist/build/assets/__federation_shared_react-CvClEUjg.js +0 -9
  4. package/dist/build/assets/__federation_shared_react-dom-BxqGBSTk.js +0 -24
  5. package/dist/build/assets/__federation_shared_react-i18next-MD_bYxcL.js +0 -1
  6. package/dist/build/assets/__federation_shared_react-router-dom-Vy7O6TNk.js +0 -2
  7. package/dist/build/assets/_commonjsHelpers-BosuxZz1.js +0 -1
  8. package/dist/build/assets/_virtual___federation_fn_import-PJHfB1tr.js +0 -1
  9. package/dist/build/assets/abap-DRC6TkPh.js +0 -6
  10. package/dist/build/assets/apex-BuapDI9Y.js +0 -6
  11. package/dist/build/assets/azcli-BypH-vXm.js +0 -6
  12. package/dist/build/assets/bat-BY6pwuIY.js +0 -6
  13. package/dist/build/assets/bicep-gRuQeaLk.js +0 -7
  14. package/dist/build/assets/cameligo-ul-Lp4lw.js +0 -6
  15. package/dist/build/assets/clojure-DeYg-96x.js +0 -6
  16. package/dist/build/assets/codicon-DCmgc-ay.ttf +0 -0
  17. package/dist/build/assets/coffee-CfnpWUYo.js +0 -6
  18. package/dist/build/assets/cpp-C9L3yaDO.js +0 -6
  19. package/dist/build/assets/csharp-DWGz5Zuj.js +0 -6
  20. package/dist/build/assets/csp-DrRCxMg5.js +0 -6
  21. package/dist/build/assets/css-BfLuTCmN.js +0 -8
  22. package/dist/build/assets/css.worker-BAJD-bzR.js +0 -83
  23. package/dist/build/assets/cssMode-Btzqpc23.js +0 -4
  24. package/dist/build/assets/cypher-DoFvH58O.js +0 -6
  25. package/dist/build/assets/dart-DIovg4uR.js +0 -6
  26. package/dist/build/assets/dockerfile-D2PfwrvU.js +0 -6
  27. package/dist/build/assets/ecl-C_scCXcs.js +0 -6
  28. package/dist/build/assets/editor.worker-MnaSPjGA.js +0 -11
  29. package/dist/build/assets/elixir-BRk-K-rg.js +0 -6
  30. package/dist/build/assets/favicon-CwZoocDV.ico +0 -0
  31. package/dist/build/assets/flow9-DLs3tTet.js +0 -6
  32. package/dist/build/assets/freemarker2-CoZuEXJi.js +0 -3
  33. package/dist/build/assets/fsharp-D0UiDa5C.js +0 -6
  34. package/dist/build/assets/go-CyVeKkvQ.js +0 -6
  35. package/dist/build/assets/graphql-BygKL3ZF.js +0 -6
  36. package/dist/build/assets/handlebars-BQ2vXFqT.js +0 -1
  37. package/dist/build/assets/hcl-D_OY6ada.js +0 -6
  38. package/dist/build/assets/html-S9BExIX4.js +0 -1
  39. package/dist/build/assets/html.worker-Bp7pNElH.js +0 -460
  40. package/dist/build/assets/htmlMode-D6oh_W-n.js +0 -4
  41. package/dist/build/assets/index-D5X_Cuhy.js +0 -139
  42. package/dist/build/assets/ini-BTpWsGps.js +0 -6
  43. package/dist/build/assets/java-3TATJI7h.js +0 -6
  44. package/dist/build/assets/javascript-C_BsKwTq.js +0 -1
  45. package/dist/build/assets/json.worker-BfIkrIax.js +0 -48
  46. package/dist/build/assets/jsonMode-CFQnTUoH.js +0 -10
  47. package/dist/build/assets/julia-DDpSJMW6.js +0 -6
  48. package/dist/build/assets/kotlin-DVYH6Lj_.js +0 -6
  49. package/dist/build/assets/less-CuFlys0T.js +0 -7
  50. package/dist/build/assets/lexon-m09vb5r-.js +0 -6
  51. package/dist/build/assets/liquid-CsJvQ-Gd.js +0 -1
  52. package/dist/build/assets/lua-D2Z7JJdl.js +0 -6
  53. package/dist/build/assets/m3-B2Cf9XSq.js +0 -6
  54. package/dist/build/assets/markdown-BXYnMxBe.js +0 -6
  55. package/dist/build/assets/mdx-CcsV6KQM.js +0 -1
  56. package/dist/build/assets/mips-Ckkbw-AO.js +0 -6
  57. package/dist/build/assets/msdax-B5uW3Zvf.js +0 -6
  58. package/dist/build/assets/mysql-B8ssZoUh.js +0 -6
  59. package/dist/build/assets/objective-c-CrrKwR0a.js +0 -6
  60. package/dist/build/assets/pascal-BWBTHuhh.js +0 -6
  61. package/dist/build/assets/pascaligo-BGLI1Hdo.js +0 -6
  62. package/dist/build/assets/perl-DDrv2Hr-.js +0 -6
  63. package/dist/build/assets/pgsql-DLPipH_Q.js +0 -6
  64. package/dist/build/assets/php-CTNlIIiR.js +0 -6
  65. package/dist/build/assets/pla-2oJWbEOo.js +0 -6
  66. package/dist/build/assets/postiats-DOk3G3cc.js +0 -6
  67. package/dist/build/assets/powerquery-Dgyr3wWZ.js +0 -6
  68. package/dist/build/assets/powershell-B_i9asfM.js +0 -6
  69. package/dist/build/assets/protobuf-CV9EbfTh.js +0 -7
  70. package/dist/build/assets/pug-CCBS_C5_.js +0 -6
  71. package/dist/build/assets/python-BNsLUA-F.js +0 -1
  72. package/dist/build/assets/qsharp-BLuZWbUW.js +0 -6
  73. package/dist/build/assets/r-CzF1MCbP.js +0 -6
  74. package/dist/build/assets/razor-CwLyy1uA.js +0 -1
  75. package/dist/build/assets/redis-C75U4IDy.js +0 -6
  76. package/dist/build/assets/redshift-Bc5xkKR1.js +0 -6
  77. package/dist/build/assets/restructuredtext-DmdQbaLT.js +0 -6
  78. package/dist/build/assets/ruby-DB0RB20n.js +0 -6
  79. package/dist/build/assets/rust-UMmp-gVE.js +0 -6
  80. package/dist/build/assets/sb-DVG02705.js +0 -6
  81. package/dist/build/assets/scala-DvSxYeG4.js +0 -6
  82. package/dist/build/assets/scheme-yf5bffbF.js +0 -6
  83. package/dist/build/assets/scss-Bzb7OGdO.js +0 -8
  84. package/dist/build/assets/shell-FNqbgIOG.js +0 -6
  85. package/dist/build/assets/shogun-spinner-BmOUi9Ar.gif +0 -0
  86. package/dist/build/assets/shogun_logo-B9ohJOpL.png +0 -0
  87. package/dist/build/assets/solidity-DyKutqhl.js +0 -6
  88. package/dist/build/assets/sophia-B4VqtPa2.js +0 -6
  89. package/dist/build/assets/sparql-B7alP455.js +0 -6
  90. package/dist/build/assets/sql-D7lU1fdU.js +0 -6
  91. package/dist/build/assets/st-VuadG5SK.js +0 -6
  92. package/dist/build/assets/style-CJpWC7V3.css +0 -1
  93. package/dist/build/assets/swift-BYtUz8ZP.js +0 -8
  94. package/dist/build/assets/systemverilog-DOAuugfS.js +0 -6
  95. package/dist/build/assets/tcl-CXKOl_mN.js +0 -6
  96. package/dist/build/assets/ts.worker-BBBnYv8q.js +0 -51333
  97. package/dist/build/assets/tsMode-meseu6bK.js +0 -11
  98. package/dist/build/assets/twig-D9yiNO04.js +0 -6
  99. package/dist/build/assets/typescript-BuOvk1sq.js +0 -1
  100. package/dist/build/assets/typespec-BupSXVCO.js +0 -6
  101. package/dist/build/assets/vb-ZlaFEk-P.js +0 -6
  102. package/dist/build/assets/wgsl-DrbANKle.js +0 -303
  103. package/dist/build/assets/xml-BXx9C-xA.js +0 -1
  104. package/dist/build/assets/yaml-CuMedh6B.js +0 -1
  105. package/dist/build/index.html +0 -24
  106. package/dist/lib/App.d.ts +0 -4
  107. package/dist/lib/App.js +0 -122
  108. package/dist/lib/Component/Dashboard/Dashboard.d.ts +0 -12
  109. package/dist/lib/Component/Dashboard/Dashboard.js +0 -10
  110. package/dist/lib/Component/Dashboard/DashboardCard/DashboardCard.d.ts +0 -13
  111. package/dist/lib/Component/Dashboard/DashboardCard/DashboardCard.js +0 -7
  112. package/dist/lib/Component/Dashboard/DashboardStatistics/DashboardStatistics.d.ts +0 -15
  113. package/dist/lib/Component/Dashboard/DashboardStatistics/DashboardStatistics.js +0 -30
  114. package/dist/lib/Component/EvictCache/EvictCache.d.ts +0 -6
  115. package/dist/lib/Component/EvictCache/EvictCache.js +0 -28
  116. package/dist/lib/Component/FormField/DisplayField/DisplayField.d.ts +0 -13
  117. package/dist/lib/Component/FormField/DisplayField/DisplayField.js +0 -32
  118. package/dist/lib/Component/FormField/JSONEditor/JSONEditor.d.ts +0 -13
  119. package/dist/lib/Component/FormField/JSONEditor/JSONEditor.js +0 -90
  120. package/dist/lib/Component/FormField/JSONEditor/UserWorker.d.ts +0 -1
  121. package/dist/lib/Component/FormField/JSONEditor/UserWorker.js +0 -26
  122. package/dist/lib/Component/FormField/LinkField/LinkField.d.ts +0 -11
  123. package/dist/lib/Component/FormField/LinkField/LinkField.js +0 -15
  124. package/dist/lib/Component/FormField/MarkdownEditor/MarkdownEditor.d.ts +0 -10
  125. package/dist/lib/Component/FormField/MarkdownEditor/MarkdownEditor.js +0 -23
  126. package/dist/lib/Component/FormField/Permission/GroupPermissionGrid/GroupPermissionGrid.d.ts +0 -7
  127. package/dist/lib/Component/FormField/Permission/GroupPermissionGrid/GroupPermissionGrid.js +0 -73
  128. package/dist/lib/Component/FormField/Permission/InstancePermissionGrid/InstancePermissionGrid.d.ts +0 -30
  129. package/dist/lib/Component/FormField/Permission/InstancePermissionGrid/InstancePermissionGrid.js +0 -151
  130. package/dist/lib/Component/FormField/Permission/PermissionModal/PermissionModal.d.ts +0 -28
  131. package/dist/lib/Component/FormField/Permission/PermissionModal/PermissionModal.js +0 -103
  132. package/dist/lib/Component/FormField/Permission/PermissionSelect/PermissionSelect.d.ts +0 -6
  133. package/dist/lib/Component/FormField/Permission/PermissionSelect/PermissionSelect.js +0 -21
  134. package/dist/lib/Component/FormField/Permission/RolePermissionGrid/RolePermissionGrid.d.ts +0 -7
  135. package/dist/lib/Component/FormField/Permission/RolePermissionGrid/RolePermissionGrid.js +0 -81
  136. package/dist/lib/Component/FormField/Permission/UserPermissionGrid/UserPermissionGrid.d.ts +0 -8
  137. package/dist/lib/Component/FormField/Permission/UserPermissionGrid/UserPermissionGrid.js +0 -87
  138. package/dist/lib/Component/FormField/VerifyProviderDetailsField/VerifyProviderDetailsField.d.ts +0 -13
  139. package/dist/lib/Component/FormField/VerifyProviderDetailsField/VerifyProviderDetailsField.js +0 -14
  140. package/dist/lib/Component/FormField/YesOrNoField/YesOrNoField.d.ts +0 -8
  141. package/dist/lib/Component/FormField/YesOrNoField/YesOrNoField.js +0 -10
  142. package/dist/lib/Component/FullscreenWrapper/FullscreenWrapper.d.ts +0 -4
  143. package/dist/lib/Component/FullscreenWrapper/FullscreenWrapper.js +0 -48
  144. package/dist/lib/Component/GeneralEntity/GeneralEntityForm/GeneralEntityForm.d.ts +0 -43
  145. package/dist/lib/Component/GeneralEntity/GeneralEntityForm/GeneralEntityForm.js +0 -145
  146. package/dist/lib/Component/GeneralEntity/GeneralEntityRoot/GeneralEntityRoot.d.ts +0 -22
  147. package/dist/lib/Component/GeneralEntity/GeneralEntityRoot/GeneralEntityRoot.js +0 -527
  148. package/dist/lib/Component/GeneralEntity/GeneralEntityTable/GeneralEntityTable.d.ts +0 -46
  149. package/dist/lib/Component/GeneralEntity/GeneralEntityTable/GeneralEntityTable.js +0 -179
  150. package/dist/lib/Component/GlobalSettings/GlobalSettingsRoot/GlobalSettingsRoot.d.ts +0 -5
  151. package/dist/lib/Component/GlobalSettings/GlobalSettingsRoot/GlobalSettingsRoot.js +0 -15
  152. package/dist/lib/Component/Header/Header.d.ts +0 -8
  153. package/dist/lib/Component/Header/Header.js +0 -16
  154. package/dist/lib/Component/ImageFile/ImageFileForm/ImageFileForm.d.ts +0 -7
  155. package/dist/lib/Component/ImageFile/ImageFileForm/ImageFileForm.js +0 -94
  156. package/dist/lib/Component/ImageFile/ImageFileRoot/ImageFileRoot.d.ts +0 -7
  157. package/dist/lib/Component/ImageFile/ImageFileRoot/ImageFileRoot.js +0 -44
  158. package/dist/lib/Component/ImageFile/ImageFileTable/ImageFileTable.d.ts +0 -9
  159. package/dist/lib/Component/ImageFile/ImageFileTable/ImageFileTable.js +0 -157
  160. package/dist/lib/Component/LanguageSelector/index.d.ts +0 -4
  161. package/dist/lib/Component/LanguageSelector/index.js +0 -15
  162. package/dist/lib/Component/Layer/LayerTypeSelect/LayerTypeSelect.d.ts +0 -11
  163. package/dist/lib/Component/Layer/LayerTypeSelect/LayerTypeSelect.js +0 -33
  164. package/dist/lib/Component/LayerPreview/LayerPreview.d.ts +0 -9
  165. package/dist/lib/Component/LayerPreview/LayerPreview.js +0 -159
  166. package/dist/lib/Component/LayerPreview/MapComponent/MapComponent.d.ts +0 -10
  167. package/dist/lib/Component/LayerPreview/MapComponent/MapComponent.js +0 -22
  168. package/dist/lib/Component/LogSettings/LogLevelSelect/LogLevelSelect.d.ts +0 -7
  169. package/dist/lib/Component/LogSettings/LogLevelSelect/LogLevelSelect.js +0 -20
  170. package/dist/lib/Component/LogSettings/LogLevelTable/LogLevelTable.d.ts +0 -12
  171. package/dist/lib/Component/LogSettings/LogLevelTable/LogLevelTable.js +0 -73
  172. package/dist/lib/Component/LogSettings/LogSettingsRoot/LogSettingsRoot.d.ts +0 -4
  173. package/dist/lib/Component/LogSettings/LogSettingsRoot/LogSettingsRoot.js +0 -11
  174. package/dist/lib/Component/Logs/Logs.d.ts +0 -5
  175. package/dist/lib/Component/Logs/Logs.js +0 -58
  176. package/dist/lib/Component/Menu/Navigation/Navigation.d.ts +0 -10
  177. package/dist/lib/Component/Menu/Navigation/Navigation.js +0 -96
  178. package/dist/lib/Component/Menu/User/User.d.ts +0 -7
  179. package/dist/lib/Component/Menu/User/User.js +0 -91
  180. package/dist/lib/Component/Metrics/JdbcConnectionsActive/JdbcConnectionsActive.d.ts +0 -6
  181. package/dist/lib/Component/Metrics/JdbcConnectionsActive/JdbcConnectionsActive.js +0 -7
  182. package/dist/lib/Component/Metrics/JvmMemoryUsed/JvmMemoryUsed.d.ts +0 -6
  183. package/dist/lib/Component/Metrics/JvmMemoryUsed/JvmMemoryUsed.js +0 -13
  184. package/dist/lib/Component/Metrics/JvmThreadsLive/JvmThreadsLive.d.ts +0 -6
  185. package/dist/lib/Component/Metrics/JvmThreadsLive/JvmThreadsLive.js +0 -7
  186. package/dist/lib/Component/Metrics/MetricEntry/MetricEntry.d.ts +0 -13
  187. package/dist/lib/Component/Metrics/MetricEntry/MetricEntry.js +0 -54
  188. package/dist/lib/Component/Metrics/MetricsRoot/MetricsRoot.d.ts +0 -12
  189. package/dist/lib/Component/Metrics/MetricsRoot/MetricsRoot.js +0 -28
  190. package/dist/lib/Component/Metrics/ProcessCpuUsage/ProcessCpuUsage.d.ts +0 -6
  191. package/dist/lib/Component/Metrics/ProcessCpuUsage/ProcessCpuUsage.js +0 -7
  192. package/dist/lib/Component/Metrics/ProcessStartTime/ProcessStartTime.d.ts +0 -6
  193. package/dist/lib/Component/Metrics/ProcessStartTime/ProcessStartTime.js +0 -12
  194. package/dist/lib/Component/Metrics/ProcessUptime/ProcessUptime.d.ts +0 -6
  195. package/dist/lib/Component/Metrics/ProcessUptime/ProcessUptime.js +0 -15
  196. package/dist/lib/Component/Metrics/SystemCpuCount/SystemCpuCount.d.ts +0 -6
  197. package/dist/lib/Component/Metrics/SystemCpuCount/SystemCpuCount.js +0 -7
  198. package/dist/lib/Component/Metrics/SystemCpuUsage/SystemCpuUsage.d.ts +0 -6
  199. package/dist/lib/Component/Metrics/SystemCpuUsage/SystemCpuUsage.js +0 -7
  200. package/dist/lib/Component/Metrics/SystemLoadAverage/SystemLoadAverage.d.ts +0 -6
  201. package/dist/lib/Component/Metrics/SystemLoadAverage/SystemLoadAverage.js +0 -7
  202. package/dist/lib/Component/Modal/ApplicationInfo/ApplicationInfo.d.ts +0 -7
  203. package/dist/lib/Component/Modal/ApplicationInfo/ApplicationInfo.js +0 -18
  204. package/dist/lib/Component/ShogunSpinner/ShogunSpinner.d.ts +0 -5
  205. package/dist/lib/Component/ShogunSpinner/ShogunSpinner.js +0 -7
  206. package/dist/lib/Component/UserAvatar/UserAvatar.d.ts +0 -9
  207. package/dist/lib/Component/UserAvatar/UserAvatar.js +0 -13
  208. package/dist/lib/Component/WelcomeDashboard/WelcomeDashboard.d.ts +0 -5
  209. package/dist/lib/Component/WelcomeDashboard/WelcomeDashboard.js +0 -35
  210. package/dist/lib/Context/PluginContext.d.ts +0 -9
  211. package/dist/lib/Context/PluginContext.js +0 -7
  212. package/dist/lib/Context/SHOGunAPIClientContext.d.ts +0 -9
  213. package/dist/lib/Context/SHOGunAPIClientContext.js +0 -7
  214. package/dist/lib/Controller/ControllerUtil.d.ts +0 -27
  215. package/dist/lib/Controller/ControllerUtil.js +0 -60
  216. package/dist/lib/Controller/GenericEntityController.d.ts +0 -169
  217. package/dist/lib/Controller/GenericEntityController.js +0 -368
  218. package/dist/lib/Hooks/useClientVersion.d.ts +0 -1
  219. package/dist/lib/Hooks/useClientVersion.js +0 -3
  220. package/dist/lib/Hooks/usePlugins.d.ts +0 -3
  221. package/dist/lib/Hooks/usePlugins.js +0 -6
  222. package/dist/lib/Hooks/useSHOGunAPIClient.d.ts +0 -3
  223. package/dist/lib/Hooks/useSHOGunAPIClient.js +0 -6
  224. package/dist/lib/Logger.d.ts +0 -2
  225. package/dist/lib/Logger.js +0 -23
  226. package/dist/lib/Page/Portal/Portal.d.ts +0 -7
  227. package/dist/lib/Page/Portal/Portal.js +0 -74
  228. package/dist/lib/Service/GenericServiceImpl/GenericServiceImpl.d.ts +0 -5
  229. package/dist/lib/Service/GenericServiceImpl/GenericServiceImpl.js +0 -7
  230. package/dist/lib/Service/LogService/LogService.d.ts +0 -18
  231. package/dist/lib/Service/LogService/LogService.js +0 -79
  232. package/dist/lib/Service/MetricService/MetricService.d.ts +0 -26
  233. package/dist/lib/Service/MetricService/MetricService.js +0 -25
  234. package/dist/lib/State/atoms.d.ts +0 -7
  235. package/dist/lib/State/atoms.js +0 -25
  236. package/dist/lib/State/static.d.ts +0 -3
  237. package/dist/lib/State/static.js +0 -10
  238. package/dist/lib/Util/FileUtil.d.ts +0 -3
  239. package/dist/lib/Util/FileUtil.js +0 -10
  240. package/dist/lib/Util/JsonUtil.d.ts +0 -11
  241. package/dist/lib/Util/JsonUtil.js +0 -22
  242. package/dist/lib/Util/OpenAPIUtil.d.ts +0 -25
  243. package/dist/lib/Util/OpenAPIUtil.js +0 -230
  244. package/dist/lib/Util/TableUtil.d.ts +0 -14
  245. package/dist/lib/Util/TableUtil.js +0 -71
  246. package/dist/lib/Util/TranslationUtil.d.ts +0 -3
  247. package/dist/lib/Util/TranslationUtil.js +0 -23
  248. package/dist/lib/Util/UserUtil.d.ts +0 -22
  249. package/dist/lib/Util/UserUtil.js +0 -32
  250. package/dist/lib/i18n/index.d.ts +0 -2
  251. package/dist/lib/i18n/index.js +0 -17
  252. package/dist/lib/i18n/translations.d.ts +0 -508
  253. package/dist/lib/i18n/translations.js +0 -512
  254. package/dist/lib/index.d.ts +0 -1
  255. package/dist/lib/index.js +0 -172
  256. package/dist/lib/plugin/index.d.ts +0 -58
  257. package/dist/lib/plugin/index.js +0 -3
  258. package/dist/lib/test-util.d.ts +0 -6
  259. package/dist/lib/test-util.js +0 -16
@@ -1,13 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import { StatisticProps } from 'antd/lib/statistic/Statistic';
3
- import { Metric } from '../../../Service/MetricService/MetricService';
4
- type StatisticPropExcludes = 'value' | 'prefix' | 'suffix' | 'title' | 'formatter';
5
- export interface MetricEntryProps extends Omit<StatisticProps, StatisticPropExcludes> {
6
- type: string;
7
- prefixRenderer?: (metric?: Metric) => ReactNode;
8
- suffixRenderer?: (metric?: Metric) => ReactNode;
9
- titleRenderer?: (metric?: Metric) => ReactNode;
10
- valueRenderer?: (value: number | string, metric?: Metric) => ReactNode;
11
- }
12
- export declare const MetricEntry: React.FC<MetricEntryProps>;
13
- export default MetricEntry;
@@ -1,54 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useCallback, useEffect, useState } from 'react';
3
- import { ReloadOutlined } from '@ant-design/icons';
4
- import { Button, Card, Statistic, Tooltip } from 'antd';
5
- import isFunction from 'lodash/isFunction';
6
- import useSHOGunAPIClient from '../../../Hooks/useSHOGunAPIClient';
7
- import MetricService from '../../../Service/MetricService/MetricService';
8
- export const MetricEntry = ({ type, prefixRenderer, suffixRenderer, titleRenderer, valueRenderer, ...passThroughProps }) => {
9
- const [isLoading, setIsLoading] = useState(false);
10
- const [metric, setMetric] = useState();
11
- const client = useSHOGunAPIClient();
12
- const fetchMetric = useCallback(async () => {
13
- setIsLoading(true);
14
- const metricService = new MetricService({
15
- keycloak: client?.getKeycloak()
16
- });
17
- const metricResponse = await metricService.getMetric(type);
18
- setMetric(metricResponse);
19
- setIsLoading(false);
20
- }, [client, type]);
21
- const getPrefix = () => {
22
- if (isFunction(prefixRenderer)) {
23
- return prefixRenderer(metric);
24
- }
25
- return null;
26
- };
27
- const getSuffix = () => {
28
- if (isFunction(suffixRenderer)) {
29
- return suffixRenderer(metric);
30
- }
31
- return null;
32
- };
33
- const getTitle = () => {
34
- if (isFunction(titleRenderer)) {
35
- return titleRenderer(metric);
36
- }
37
- return (_jsx(Tooltip, { title: metric?.description, children: _jsx("span", { children: metric?.description }) }));
38
- };
39
- const getFormatter = (value) => {
40
- if (isFunction(valueRenderer)) {
41
- return valueRenderer(value, metric);
42
- }
43
- return value;
44
- };
45
- useEffect(() => {
46
- fetchMetric();
47
- }, [fetchMetric]);
48
- return (_jsx(Card, { loading: isLoading, actions: [
49
- _jsx(Tooltip, { title: "Reload", mouseEnterDelay: 0.5, children: _jsx(Button, { onClick: fetchMetric, children: _jsx(ReloadOutlined, {}) }) }, "tooltip")
50
- ], children: _jsx(Statistic, { value: metric?.measurements[0]?.value, prefix: getPrefix(), suffix: getSuffix(), title: getTitle(), formatter: getFormatter, valueStyle: {
51
- color: '#3f8600'
52
- }, ...passThroughProps }) }));
53
- };
54
- export default MetricEntry;
@@ -1,12 +0,0 @@
1
- import './MetricsRoot.less';
2
- import React from 'react';
3
- type MetricsRootProps = {};
4
- /**
5
- * TODO Ideas:
6
- *
7
- * * show link to swagger and graphql
8
- * * show link to all other services (e.g. GeoServer) including status (crossing light)
9
- *
10
- */
11
- export declare const MetricsRoot: React.FC<MetricsRootProps>;
12
- export default MetricsRoot;
@@ -1,28 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import './MetricsRoot.less';
3
- import { PageHeader } from '@ant-design/pro-components';
4
- import { Col, Row } from 'antd';
5
- import { useTranslation } from 'react-i18next';
6
- import { useNavigate } from 'react-router-dom';
7
- import JdbcConnectionsActive from '../JdbcConnectionsActive/JdbcConnectionsActive';
8
- import JvmMemoryUsed from '../JvmMemoryUsed/JvmMemoryUsed';
9
- import JvmThreadsLive from '../JvmThreadsLive/JvmThreadsLive';
10
- import ProcessCpuUsage from '../ProcessCpuUsage/ProcessCpuUsage';
11
- import ProcessStartTime from '../ProcessStartTime/ProcessStartTime';
12
- import ProcessUptime from '../ProcessUptime/ProcessUptime';
13
- import SystemCpuCount from '../SystemCpuCount/SystemCpuCount';
14
- import SystemCpuUsage from '../SystemCpuUsage/SystemCpuUsage';
15
- import SystemLoadAverage from '../SystemLoadAverage/SystemLoadAverage';
16
- /**
17
- * TODO Ideas:
18
- *
19
- * * show link to swagger and graphql
20
- * * show link to all other services (e.g. GeoServer) including status (crossing light)
21
- *
22
- */
23
- export const MetricsRoot = (props) => {
24
- const navigate = useNavigate();
25
- const { t } = useTranslation();
26
- return (_jsxs("div", { className: "metrics-root", children: [_jsx(PageHeader, { className: "header", onBack: () => navigate(-1), title: t('Metrics.title'), subTitle: t('Metrics.info') }), _jsxs("div", { className: "metrics-card-container", children: [_jsxs(Row, { gutter: [16, 16], children: [_jsx(Col, { span: 8, children: _jsx(JdbcConnectionsActive, {}) }), _jsx(Col, { span: 8, children: _jsx(JvmThreadsLive, {}) }), _jsx(Col, { span: 8, children: _jsx(JvmMemoryUsed, {}) })] }), _jsxs(Row, { gutter: [16, 16], children: [_jsx(Col, { span: 8, children: _jsx(ProcessCpuUsage, {}) }), _jsx(Col, { span: 8, children: _jsx(SystemCpuCount, {}) }), _jsx(Col, { span: 8, children: _jsx(SystemCpuUsage, {}) })] }), _jsxs(Row, { gutter: [16, 16], children: [_jsx(Col, { span: 8, children: _jsx(ProcessStartTime, {}) }), _jsx(Col, { span: 8, children: _jsx(ProcessUptime, {}) }), _jsx(Col, { span: 8, children: _jsx(SystemLoadAverage, {}) })] })] })] }));
27
- };
28
- export default MetricsRoot;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { MetricEntryProps } from '../MetricEntry/MetricEntry';
3
- interface ProcessCpuUsageProps extends Omit<MetricEntryProps, 'type'> {
4
- }
5
- export declare const ProcessCpuUsage: React.FC<ProcessCpuUsageProps>;
6
- export default ProcessCpuUsage;
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import MetricEntry from '../MetricEntry/MetricEntry';
3
- ;
4
- export const ProcessCpuUsage = ({ ...passThroughProps }) => {
5
- return (_jsx(MetricEntry, { type: "process.cpu.usage", ...passThroughProps }));
6
- };
7
- export default ProcessCpuUsage;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { MetricEntryProps } from '../MetricEntry/MetricEntry';
3
- interface ProcessStartTimeProps extends Omit<MetricEntryProps, 'type'> {
4
- }
5
- export declare const ProcessStartTime: React.FC<ProcessStartTimeProps>;
6
- export default ProcessStartTime;
@@ -1,12 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import moment from 'moment';
3
- import MetricEntry from '../MetricEntry/MetricEntry';
4
- ;
5
- export const ProcessStartTime = ({ ...passThroughProps }) => {
6
- const valueRenderer = (value) => {
7
- let val = moment(Number(value) * 1000).format('llll');
8
- return _jsx("span", { children: val });
9
- };
10
- return (_jsx(MetricEntry, { type: "process.start.time", valueRenderer: valueRenderer, ...passThroughProps }));
11
- };
12
- export default ProcessStartTime;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { MetricEntryProps } from '../MetricEntry/MetricEntry';
3
- interface ProcessUptimeProps extends Omit<MetricEntryProps, 'type'> {
4
- }
5
- export declare const ProcessUptime: React.FC<ProcessUptimeProps>;
6
- export default ProcessUptime;
@@ -1,15 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import moment from 'moment';
3
- import MetricEntry from '../MetricEntry/MetricEntry';
4
- ;
5
- export const ProcessUptime = ({ ...passThroughProps }) => {
6
- const valueRenderer = (value) => {
7
- let val = moment.utc(Number(value) * 1000).format('HH:mm:ss');
8
- return _jsx("span", { children: val });
9
- };
10
- const suffixRenderer = () => {
11
- return _jsx("span", { children: "HH:mm:ss" });
12
- };
13
- return (_jsx(MetricEntry, { type: "process.uptime", valueRenderer: valueRenderer, suffixRenderer: suffixRenderer, ...passThroughProps }));
14
- };
15
- export default ProcessUptime;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { MetricEntryProps } from '../MetricEntry/MetricEntry';
3
- interface SystemCpuCountProps extends Omit<MetricEntryProps, 'type'> {
4
- }
5
- export declare const SystemCpuCount: React.FC<SystemCpuCountProps>;
6
- export default SystemCpuCount;
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import MetricEntry from '../MetricEntry/MetricEntry';
3
- ;
4
- export const SystemCpuCount = ({ ...passThroughProps }) => {
5
- return (_jsx(MetricEntry, { type: "system.cpu.count", ...passThroughProps }));
6
- };
7
- export default SystemCpuCount;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { MetricEntryProps } from '../MetricEntry/MetricEntry';
3
- interface SystemCpuUsageProps extends Omit<MetricEntryProps, 'type'> {
4
- }
5
- export declare const SystemCpuUsage: React.FC<SystemCpuUsageProps>;
6
- export default SystemCpuUsage;
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import MetricEntry from '../MetricEntry/MetricEntry';
3
- ;
4
- export const SystemCpuUsage = ({ ...passThroughProps }) => {
5
- return (_jsx(MetricEntry, { type: "system.cpu.usage", ...passThroughProps }));
6
- };
7
- export default SystemCpuUsage;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { MetricEntryProps } from '../MetricEntry/MetricEntry';
3
- interface SystemLoadAverageProps extends Omit<MetricEntryProps, 'type'> {
4
- }
5
- export declare const SystemLoadAverage: React.FC<SystemLoadAverageProps>;
6
- export default SystemLoadAverage;
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import MetricEntry from '../MetricEntry/MetricEntry';
3
- ;
4
- export const SystemLoadAverage = ({ ...passThroughProps }) => {
5
- return (_jsx(MetricEntry, { type: "system.load.average.1m", ...passThroughProps }));
6
- };
7
- export default SystemLoadAverage;
@@ -1,7 +0,0 @@
1
- import './ApplicationInfo.less';
2
- import React from 'react';
3
- import { ModalProps } from 'antd/lib/modal';
4
- export interface ApplicationInfoProps extends ModalProps {
5
- }
6
- export declare const ApplicationInfo: React.FC<ApplicationInfoProps>;
7
- export default ApplicationInfo;
@@ -1,18 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import './ApplicationInfo.less';
3
- import { Modal, Statistic } from 'antd';
4
- import { useTranslation } from 'react-i18next';
5
- import { useRecoilState } from 'recoil';
6
- import defaultLogo from '../../../../assets/img/shogun_logo.png';
7
- import { useClientVersion } from '../../../Hooks/useClientVersion';
8
- import { appInfoAtom, shogunInfoModalVisibleAtom } from '../../../State/atoms';
9
- export const ApplicationInfo = ({ ...passThroughProps }) => {
10
- const { t } = useTranslation();
11
- const [isVisible, setVisible] = useRecoilState(shogunInfoModalVisibleAtom);
12
- const [appInfo] = useRecoilState(appInfoAtom);
13
- const toggleVisibility = () => {
14
- setVisible(!isVisible);
15
- };
16
- return (_jsxs(Modal, { className: "application-info-modal", title: t('ApplicationInfoModal.clientAbout'), centered: true, open: isVisible, onOk: toggleVisibility, onCancel: toggleVisibility, footer: null, ...passThroughProps, children: [_jsx("img", { className: "shogun-logo", src: defaultLogo }), _jsx(Statistic, { title: t('ApplicationInfoModal.clientVersion'), value: useClientVersion() }), _jsx(Statistic, { title: t('ApplicationInfoModal.backendVersion'), value: `${appInfo.version} (${appInfo.buildTime})` })] }));
17
- };
18
- export default ApplicationInfo;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- export interface ShogunSpinnerProps extends Omit<React.ComponentProps<'img'>, 'src'> {
3
- }
4
- export declare const ShogunSpinner: React.FC<ShogunSpinnerProps>;
5
- export default ShogunSpinner;
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import shogunSpinner from './shogun-spinner.gif';
3
- ;
4
- export const ShogunSpinner = (props) => {
5
- return (_jsx("img", { src: shogunSpinner, alt: "shogun spinner", ...props }));
6
- };
7
- export default ShogunSpinner;
@@ -1,9 +0,0 @@
1
- import './UserAvatar.less';
2
- import React from 'react';
3
- import { AvatarProps } from 'antd';
4
- import User from '@terrestris/shogun-util/dist/model/User';
5
- export interface UserAvatarProps extends AvatarProps {
6
- user: User;
7
- }
8
- declare const UserAvatar: React.FC<UserAvatarProps>;
9
- export default UserAvatar;
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import './UserAvatar.less';
3
- import { Avatar } from 'antd';
4
- import UserUtil from '../../Util/UserUtil';
5
- ;
6
- const UserAvatar = ({ user, ...passThroughProps }) => {
7
- const avatarSrc = UserUtil.getGravatarUrl({
8
- email: user.providerDetails?.email || '',
9
- size: 30
10
- });
11
- return (_jsxs("div", { className: "user-avatar", children: [_jsx(Avatar, { src: avatarSrc, size: 'default', className: "user-avatar-image", ...passThroughProps }), _jsxs("div", { className: "user-avatar-name", children: [_jsx("span", { children: `${user.providerDetails?.firstName} ${user.providerDetails?.lastName}` }), _jsx("span", { children: user.providerDetails?.username })] })] }));
12
- };
13
- export default UserAvatar;
@@ -1,5 +0,0 @@
1
- import './WelcomeDashboard.less';
2
- import React from 'react';
3
- type WelcomeDashboardProps = {};
4
- export declare const WelcomeDashboard: React.FC<WelcomeDashboardProps>;
5
- export default WelcomeDashboard;
@@ -1,35 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import './WelcomeDashboard.less';
3
- import { AppstoreOutlined, BankOutlined, DashboardOutlined, LikeOutlined, UserOutlined } from '@ant-design/icons';
4
- import { Col, Row, Statistic } from 'antd';
5
- import _isNil from 'lodash/isNil';
6
- import { useTranslation } from 'react-i18next';
7
- import { Link } from 'react-router-dom';
8
- import config from 'shogunApplicationConfig';
9
- import useSHOGunAPIClient from '../../Hooks/useSHOGunAPIClient';
10
- import { Dashboard } from '../Dashboard/Dashboard';
11
- import { DashboardCard } from '../Dashboard/DashboardCard/DashboardCard';
12
- import DashboardStatistics from '../Dashboard/DashboardStatistics/DashboardStatistics';
13
- export const WelcomeDashboard = () => {
14
- const { t } = useTranslation();
15
- const dashboardConf = config.dashboard;
16
- const client = useSHOGunAPIClient();
17
- if (_isNil(client)) {
18
- return null;
19
- }
20
- return (_jsxs(Dashboard, { className: "welcome-dashboard", title: 'Dashboard', columns: 3, children: [dashboardConf?.statistics?.visible &&
21
- _jsx(DashboardCard, { className: "statistics-dashboard-card", title: "Statistiken", description: "\u2026 wie siehts denn aus", avatar: _jsx(DashboardOutlined, {}), children: _jsxs(Row, { gutter: 16, children: [_jsx(Col, { span: 12, children: _jsx(Statistic, { title: "Feedback", value: 1128, prefix: _jsx(LikeOutlined, {}) }) }), _jsx(Col, { span: 12, children: _jsx(Statistic, { title: "Unmerged", value: 93, suffix: "/ 100" }) })] }) }), dashboardConf?.applications?.visible &&
22
- _jsx(Link, { to: `${config.appPrefix}/portal/application`, children: _jsx(DashboardCard, { className: "layer-dashboard-card", title: t('WelcomeDashboard.applications'), description: t('WelcomeDashboard.applicationInfo'), avatar: _jsx(BankOutlined, {}), children: _jsx(DashboardStatistics, { service: client.application(), name: {
23
- singular: t('WelcomeDashboard.applicationSingular'),
24
- plural: t('WelcomeDashboard.applicationPlural')
25
- } }) }) }), dashboardConf?.layers?.visible &&
26
- _jsx(Link, { to: `${config.appPrefix}/portal/layer`, children: _jsx(DashboardCard, { className: "layer-dashboard-card", title: t('WelcomeDashboard.layer'), description: t('WelcomeDashboard.layerInfo'), avatar: _jsx(AppstoreOutlined, {}), children: _jsx(DashboardStatistics, { service: client.layer(), name: {
27
- singular: t('WelcomeDashboard.layerSingluar'),
28
- plural: t('WelcomeDashboard.layerPlural')
29
- } }) }) }), dashboardConf?.users?.visible &&
30
- _jsx(Link, { to: `${config.appPrefix}/portal/user`, children: _jsx(DashboardCard, { className: "layer-dashboard-card", title: t('WelcomeDashboard.user'), description: t('WelcomeDashboard.userInfo'), avatar: _jsx(UserOutlined, {}), children: _jsx(DashboardStatistics, { service: client.user(), name: {
31
- singular: t('WelcomeDashboard.userSingular'),
32
- plural: t('WelcomeDashboard.userPlural')
33
- } }) }) })] }));
34
- };
35
- export default WelcomeDashboard;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { AdminPluginInternal } from '../plugin';
3
- export type PluginProviderProps = {
4
- plugins: AdminPluginInternal[];
5
- children: JSX.Element;
6
- };
7
- export declare const PluginContext: React.Context<AdminPluginInternal[]>;
8
- export declare const PluginProvider: React.FC<PluginProviderProps>;
9
- export default PluginContext;
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import React from 'react';
3
- export const PluginContext = React.createContext([]);
4
- export const PluginProvider = ({ plugins, children }) => {
5
- return (_jsx(PluginContext.Provider, { value: plugins, children: children }));
6
- };
7
- export default PluginContext;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import SHOGunAPIClient from '@terrestris/shogun-util/dist/service/SHOGunAPIClient';
3
- export type SHOGunAPIClientProviderProps = {
4
- client: SHOGunAPIClient;
5
- children: JSX.Element;
6
- };
7
- export declare const SHOGunAPIClientContext: React.Context<SHOGunAPIClient | undefined>;
8
- export declare const SHOGunAPIClientProvider: React.FC<SHOGunAPIClientProviderProps>;
9
- export default SHOGunAPIClientContext;
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import React from 'react';
3
- export const SHOGunAPIClientContext = React.createContext(undefined);
4
- export const SHOGunAPIClientProvider = ({ client, children }) => {
5
- return (_jsx(SHOGunAPIClientContext.Provider, { value: client, children: children }));
6
- };
7
- export default SHOGunAPIClientContext;
@@ -1,27 +0,0 @@
1
- import Keycloak from 'keycloak-js';
2
- import BaseEntity from '@terrestris/shogun-util/dist/model/BaseEntity';
3
- import Application from '@terrestris/shogun-util/dist/model/File';
4
- import { FormConfig } from '../Component/GeneralEntity/GeneralEntityForm/GeneralEntityForm';
5
- import { FormValues, GenericEntityController } from './GenericEntityController';
6
- export type ControllerCfg = {
7
- endpoint: string;
8
- entityType: string;
9
- formConfig: FormConfig;
10
- keycloak?: Keycloak;
11
- updateForm?: (values: FormValues) => void;
12
- };
13
- export declare class ControllerUtil {
14
- static createController({ endpoint, keycloak, entityType, formConfig, updateForm }: ControllerCfg): GenericEntityController<BaseEntity>;
15
- /**
16
- * Create an application controller
17
- * @param controllerCfg The controller config
18
- * @returns an application controller instance
19
- */
20
- static createApplicationController(controllerCfg: ControllerCfg): GenericEntityController<Application>;
21
- /**
22
- * As a default: generate generic controller
23
- * @param controllerCfg The controller config
24
- * @returns a generic Controller
25
- */
26
- static createGenericController(controllerCfg: ControllerCfg): GenericEntityController<BaseEntity>;
27
- }
@@ -1,60 +0,0 @@
1
- import _lowerCase from 'lodash/lowerCase';
2
- import ApplicationService from '@terrestris/shogun-util/dist/service/ApplicationService';
3
- import { GenericServiceImpl } from '../Service/GenericServiceImpl/GenericServiceImpl';
4
- import { GenericEntityController } from './GenericEntityController';
5
- export class ControllerUtil {
6
- static createController({ endpoint, keycloak, entityType, formConfig, updateForm }) {
7
- switch (_lowerCase(entityType)) {
8
- case 'application':
9
- return ControllerUtil
10
- .createApplicationController({
11
- endpoint,
12
- keycloak,
13
- entityType: 'application',
14
- formConfig,
15
- updateForm
16
- });
17
- default:
18
- return ControllerUtil
19
- .createGenericController({
20
- endpoint,
21
- keycloak,
22
- entityType,
23
- formConfig,
24
- updateForm
25
- });
26
- }
27
- }
28
- /**
29
- * Create an application controller
30
- * @param controllerCfg The controller config
31
- * @returns an application controller instance
32
- */
33
- static createApplicationController(controllerCfg) {
34
- const appService = new ApplicationService({
35
- basePath: controllerCfg?.endpoint,
36
- keycloak: controllerCfg.keycloak
37
- });
38
- return new GenericEntityController({
39
- service: appService,
40
- formUpdater: controllerCfg?.updateForm,
41
- formConfig: controllerCfg?.formConfig
42
- });
43
- }
44
- /**
45
- * As a default: generate generic controller
46
- * @param controllerCfg The controller config
47
- * @returns a generic Controller
48
- */
49
- static createGenericController(controllerCfg) {
50
- const genericService = new GenericServiceImpl({
51
- basePath: controllerCfg?.endpoint,
52
- keycloak: controllerCfg.keycloak
53
- });
54
- return new GenericEntityController({
55
- service: genericService,
56
- formUpdater: controllerCfg?.updateForm,
57
- formConfig: controllerCfg?.formConfig
58
- });
59
- }
60
- }
@@ -1,169 +0,0 @@
1
- import { ValidateStatus } from 'antd/lib/form/FormItem';
2
- import BaseEntity from '@terrestris/shogun-util/dist/model/BaseEntity';
3
- import { Page } from '@terrestris/shogun-util/dist/model/Page';
4
- import GenericEntityService from '@terrestris/shogun-util/dist/service/GenericEntityService';
5
- import { PageOpts } from '@terrestris/shogun-util/dist/service/GenericService';
6
- import { FieldConfig, FormConfig } from '../Component/GeneralEntity/GeneralEntityForm/GeneralEntityForm';
7
- export type FieldValue = any;
8
- export type FormValues = {
9
- [key: string]: FieldValue;
10
- };
11
- export type FieldValidation = {
12
- validateStatus: ValidateStatus;
13
- message?: string;
14
- needsTranslation?: boolean;
15
- };
16
- export type GenericEntityControllerArgs<T extends BaseEntity> = {
17
- entity?: T;
18
- formConfig: FormConfig;
19
- formUpdater?: (values: FormValues) => void;
20
- initialValues?: FormValues;
21
- nextUpdate?: FormValues;
22
- service: GenericEntityService<T>;
23
- };
24
- export declare class GenericEntityController<T extends BaseEntity> {
25
- protected entity: T | undefined;
26
- protected initialValues?: FormValues;
27
- protected service: GenericEntityService<T>;
28
- private readonly formConfig;
29
- private formUpdater?;
30
- private nextUpdate?;
31
- constructor({ entity, initialValues, service, formConfig, formUpdater }: GenericEntityControllerArgs<T>);
32
- getEntity(): T | undefined;
33
- setFormUpdater(formUpdater: (values: FormValues) => void): void;
34
- /**
35
- * Load entity with given id using configured service and initialize the form values
36
- * @param id The id of the entitiy
37
- * @returns The entity
38
- */
39
- load(id: number): Promise<T>;
40
- /**
41
- * Create an empty instance and initialize form values
42
- * @returns The plain instance
43
- */
44
- createEntity(): T;
45
- delete(entity: T): Promise<void>;
46
- /**
47
- * Fetch all entities
48
- */
49
- findAll(pageOpts?: PageOpts): Promise<Page<T>>;
50
- /**
51
- * Update the entitiy from the form
52
- *
53
- * @param values the form values containing only changed values
54
- */
55
- updateEntity(values: FormValues): Promise<void>;
56
- /**
57
- * Save / Update (partial) the actual entity omitting read only fields (e.g. id)
58
- * @returns The updated / saved entitiy
59
- */
60
- saveOrUpdate(): Promise<T>;
61
- getFormConfig(): FormConfig;
62
- /**
63
- * Return the initial form values
64
- */
65
- getInitialFormValues(): FormValues | undefined;
66
- isFieldValid(fieldConfig: FieldConfig, value: FieldValue): FieldValidation;
67
- /**
68
- * Update passed entity
69
- * @param e The entity of type T
70
- * @returns The updated entity
71
- */
72
- update(e: T): Promise<T>;
73
- /**
74
- * Save passed entity
75
- * @param e The entity of type T
76
- * @returns The saved entity
77
- */
78
- add(e: T): Promise<T>;
79
- /**
80
- * This function initiates a form change for all field configs that use one of the given dataFields.
81
- * It only adds the given dataFields to the value change object.
82
- * @param dataFields
83
- * @protected
84
- */
85
- protected updateFormForDataFields(dataFields: string[]): void;
86
- /**
87
- *
88
- * Currently not needed
89
- *
90
- * Update the form only for specific components
91
- * @param components that are affected by the change
92
- * @param values that should be given to the form
93
- * @protected
94
- */
95
- protected updateFormForComponents(components: string[], values: FieldValue): void;
96
- /**
97
- * this sets the entity values that are specified by the data fields in the field config to the values
98
- * given by value.
99
- * @param fieldConfig
100
- * @param value
101
- * @protected
102
- */
103
- protected setEntityValueByFieldConfig(fieldConfig: FieldConfig, value: FieldValue): void;
104
- /**
105
- * create the form values object that is defined by the data fields in the field config from the entity.
106
- * @param fieldConfig
107
- * @protected
108
- */
109
- protected getFormValueByFieldConfig(fieldConfig: FieldConfig): FieldValue;
110
- /**
111
- * create form values object to initialize the form
112
- */
113
- protected initializeFormValues(): void;
114
- /**
115
- * This gets the value of a given datafield if it is in the fieldconfig
116
- * @param fieldConfig
117
- * @param value
118
- * @param dataField
119
- * @protected
120
- */
121
- protected getDataFieldValue(fieldConfig: FieldConfig, value: FieldValue, dataField: string): any;
122
- /**
123
- * returns true if the current config contains the datafield
124
- * @param fieldConfig
125
- * @param dataField
126
- * @protected
127
- */
128
- protected hasDataFieldValue(fieldConfig: FieldConfig, dataField: string): boolean;
129
- /**
130
- * This updates the given value and returns the new value. in case value is an object it is changed.
131
- * @param fieldConfig
132
- * @param value
133
- * @param dataField
134
- * @param newValue
135
- * @protected
136
- */
137
- protected updateDataFieldValue(fieldConfig: FieldConfig, value: FieldValue, dataField: string, newValue: any): FieldValue;
138
- /**
139
- * This function initiates a form change for all field configs that use one of the given dataFields.
140
- * It only adds the given dataFields to the value change object.
141
- * @param dataFields
142
- * @protected
143
- */
144
- protected addFormChangeForDataFields(dataFields: string[]): void;
145
- /**
146
- * Adds form change entry for given field name
147
- * @param fieldName The field name
148
- * @param value The value
149
- */
150
- private addFormChange;
151
- /**
152
- * Set fields value of entity object given FieldConfig and FieldValue
153
- * @param fieldConfig The FieldConfig holding cofiguration
154
- * @param value The field value to set
155
- */
156
- private setEntityValue;
157
- /**
158
- * Return the value of the form field given its field configuration
159
- * @param fieldConfig The FieldConfig
160
- * @returns The FieldValue
161
- */
162
- private getFormValue;
163
- /**
164
- * Create new instance of class passed used in generics
165
- * @param clz The Class
166
- * @returns A corresponding instance
167
- */
168
- private create;
169
- }