@oneuptime/common 11.0.0 → 11.0.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 (357) hide show
  1. package/Models/DatabaseModels/Alert.ts +110 -0
  2. package/Models/DatabaseModels/CephCluster.ts +964 -0
  3. package/Models/DatabaseModels/CephClusterLabelRule.ts +514 -0
  4. package/Models/DatabaseModels/CephClusterOwnerRule.ts +596 -0
  5. package/Models/DatabaseModels/CephClusterOwnerTeam.ts +487 -0
  6. package/Models/DatabaseModels/CephClusterOwnerUser.ts +486 -0
  7. package/Models/DatabaseModels/CephResource.ts +809 -0
  8. package/Models/DatabaseModels/Host.ts +64 -0
  9. package/Models/DatabaseModels/Incident.ts +110 -0
  10. package/Models/DatabaseModels/Index.ts +24 -0
  11. package/Models/DatabaseModels/ProxmoxCluster.ts +943 -0
  12. package/Models/DatabaseModels/ProxmoxClusterLabelRule.ts +514 -0
  13. package/Models/DatabaseModels/ProxmoxClusterOwnerRule.ts +596 -0
  14. package/Models/DatabaseModels/ProxmoxClusterOwnerTeam.ts +487 -0
  15. package/Models/DatabaseModels/ProxmoxClusterOwnerUser.ts +486 -0
  16. package/Models/DatabaseModels/ProxmoxResource.ts +726 -0
  17. package/Models/DatabaseModels/ScheduledMaintenance.ts +110 -0
  18. package/Server/API/BillingInvoiceAPI.ts +47 -7
  19. package/Server/API/CephResourceAPI.ts +134 -0
  20. package/Server/API/DashboardAPI.ts +46 -0
  21. package/Server/API/ProjectAPI.ts +15 -0
  22. package/Server/API/ProxmoxResourceAPI.ts +132 -0
  23. package/Server/API/ResellerPlanAPI.ts +17 -0
  24. package/Server/Infrastructure/GlobalCache.ts +8 -2
  25. package/Server/Infrastructure/Postgres/SchemaMigrations/1781500000000-AddProxmoxAndCephClusterTables.ts +163 -0
  26. package/Server/Infrastructure/Postgres/SchemaMigrations/1781600000000-AddProxmoxCephV2Columns.ts +211 -0
  27. package/Server/Infrastructure/Postgres/SchemaMigrations/1781600000001-AddProxmoxCephActivityAndRules.ts +590 -0
  28. package/Server/Infrastructure/Postgres/SchemaMigrations/1781700000000-AddProxmoxCephV3Columns.ts +64 -0
  29. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +8 -0
  30. package/Server/Infrastructure/Redis.ts +40 -12
  31. package/Server/Services/AnalyticsDatabaseService.ts +1 -1
  32. package/Server/Services/BillingService.ts +109 -21
  33. package/Server/Services/CephClusterLabelRuleEngineService.ts +200 -0
  34. package/Server/Services/CephClusterLabelRuleService.ts +14 -0
  35. package/Server/Services/CephClusterOwnerRuleEngineService.ts +218 -0
  36. package/Server/Services/CephClusterOwnerRuleService.ts +14 -0
  37. package/Server/Services/CephClusterOwnerTeamService.ts +10 -0
  38. package/Server/Services/CephClusterOwnerUserService.ts +10 -0
  39. package/Server/Services/CephClusterService.ts +401 -0
  40. package/Server/Services/CephResourceService.ts +383 -0
  41. package/Server/Services/CloudResourceService.ts +11 -3
  42. package/Server/Services/DockerHostService.ts +11 -3
  43. package/Server/Services/ExceptionAggregationService.ts +2 -0
  44. package/Server/Services/HostService.ts +11 -3
  45. package/Server/Services/Index.ts +24 -0
  46. package/Server/Services/KubernetesClusterService.ts +11 -3
  47. package/Server/Services/LogAggregationService.ts +2 -0
  48. package/Server/Services/MetricAggregationService.ts +2 -0
  49. package/Server/Services/OpenTelemetryIngestService.ts +36 -0
  50. package/Server/Services/ProxmoxClusterLabelRuleEngineService.ts +204 -0
  51. package/Server/Services/ProxmoxClusterLabelRuleService.ts +14 -0
  52. package/Server/Services/ProxmoxClusterOwnerRuleEngineService.ts +222 -0
  53. package/Server/Services/ProxmoxClusterOwnerRuleService.ts +14 -0
  54. package/Server/Services/ProxmoxClusterOwnerTeamService.ts +10 -0
  55. package/Server/Services/ProxmoxClusterOwnerUserService.ts +10 -0
  56. package/Server/Services/ProxmoxClusterService.ts +382 -0
  57. package/Server/Services/ProxmoxResourceService.ts +404 -0
  58. package/Server/Services/RumApplicationService.ts +11 -3
  59. package/Server/Services/ServerlessFunctionService.ts +11 -3
  60. package/Server/Services/TelemetryUsageBillingService.ts +41 -3
  61. package/Server/Services/TraceAggregationService.ts +2 -0
  62. package/Server/Types/AnalyticsDatabase/AggregateBy.ts +8 -23
  63. package/Server/Utils/Monitor/MonitorAlert.ts +45 -0
  64. package/Server/Utils/Monitor/MonitorClusterContext.ts +129 -0
  65. package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +344 -4
  66. package/Server/Utils/Monitor/MonitorIncident.ts +130 -7
  67. package/Server/Utils/Monitor/MonitorMaintenanceSuppression.ts +39 -6
  68. package/Server/Utils/Monitor/MonitorTemplateUtil.ts +3 -1
  69. package/Server/Utils/Monitor/SeriesResourceLabels.ts +33 -0
  70. package/Server/Utils/Profiling.ts +37 -2
  71. package/Server/Utils/Telemetry/EntityRegistry.ts +4 -0
  72. package/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.ts +1096 -0
  73. package/Server/Utils/Telemetry/TelemetryEntity.ts +85 -0
  74. package/Server/Utils/Telemetry.ts +8 -19
  75. package/Tests/Server/API/BillingInvoiceAPI.test.ts +194 -0
  76. package/Tests/Server/API/ProjectAPI.test.ts +91 -0
  77. package/Tests/Server/API/ResellerPlanAPI.test.ts +207 -0
  78. package/Tests/Server/Infrastructure/GlobalCache.test.ts +100 -0
  79. package/Tests/Server/Services/BillingService.test.ts +323 -0
  80. package/Tests/Server/Services/CephResourceService.test.ts +264 -0
  81. package/Tests/Server/Services/ProxmoxResourceService.test.ts +326 -0
  82. package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluator.test.ts +322 -0
  83. package/Tests/Server/Utils/Monitor/MonitorMaintenanceSuppression.test.ts +13 -0
  84. package/Tests/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.test.ts +879 -0
  85. package/Tests/Server/Utils/Telemetry/TelemetryEntity.test.ts +196 -0
  86. package/Tests/Types/Monitor/CephAlertTemplates.test.ts +1231 -0
  87. package/Tests/Types/Monitor/ProxmoxAlertTemplates.test.ts +732 -0
  88. package/Tests/Utils/ModelImportExport.test.ts +366 -0
  89. package/Tests/Utils/Telemetry/EntityRelationship.test.ts +49 -0
  90. package/Tests/Utils/Telemetry/HeartbeatAvailability.test.ts +423 -0
  91. package/Types/BaseDatabase/AggregationIntervalUtil.ts +74 -0
  92. package/Types/Dashboard/DashboardComponentType.ts +4 -0
  93. package/Types/Dashboard/DashboardComponents/ComponentArgument.ts +2 -0
  94. package/Types/Dashboard/DashboardComponents/DashboardCephOsdListComponent.ts +15 -0
  95. package/Types/Dashboard/DashboardComponents/DashboardCephPoolListComponent.ts +14 -0
  96. package/Types/Dashboard/DashboardComponents/DashboardProxmoxGuestListComponent.ts +17 -0
  97. package/Types/Dashboard/DashboardComponents/DashboardProxmoxNodeListComponent.ts +16 -0
  98. package/Types/Dashboard/DashboardTemplates.ts +446 -0
  99. package/Types/Icon/IconProp.ts +2 -0
  100. package/Types/Monitor/CephAlertTemplates.ts +1647 -0
  101. package/Types/Monitor/CephMetricCatalog.ts +409 -0
  102. package/Types/Monitor/MetricMonitor/MetricMonitorResponse.ts +44 -0
  103. package/Types/Monitor/MonitorStep.ts +64 -0
  104. package/Types/Monitor/MonitorStepCephMonitor.ts +57 -0
  105. package/Types/Monitor/MonitorStepProxmoxMonitor.ts +81 -0
  106. package/Types/Monitor/MonitorType.ts +29 -1
  107. package/Types/Monitor/ProxmoxAlertTemplates.ts +899 -0
  108. package/Types/Monitor/ProxmoxMetricCatalog.ts +382 -0
  109. package/Types/Permission.ts +464 -0
  110. package/Types/Telemetry/EntityType.ts +11 -0
  111. package/Types/Telemetry/ServiceType.ts +2 -0
  112. package/UI/Components/Icon/Icon.tsx +84 -0
  113. package/UI/Components/ImportExport/ExportModelCard.tsx +90 -0
  114. package/UI/Components/ImportExport/ImportModelsModal.tsx +239 -0
  115. package/UI/Components/ModelTable/ModelTable.tsx +294 -143
  116. package/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.ts +9 -5
  117. package/UI/Utils/ModelImportExport.ts +207 -0
  118. package/UI/Utils/Telemetry/Telemetry.ts +16 -21
  119. package/UI/Utils/TelemetryService.ts +7 -3
  120. package/Utils/Dashboard/Components/DashboardCephOsdListComponent.ts +63 -0
  121. package/Utils/Dashboard/Components/DashboardCephPoolListComponent.ts +32 -0
  122. package/Utils/Dashboard/Components/DashboardCephResourceListShared.ts +61 -0
  123. package/Utils/Dashboard/Components/DashboardProxmoxGuestListComponent.ts +69 -0
  124. package/Utils/Dashboard/Components/DashboardProxmoxNodeListComponent.ts +55 -0
  125. package/Utils/Dashboard/Components/DashboardProxmoxResourceListShared.ts +61 -0
  126. package/Utils/Dashboard/Components/Index.ts +28 -0
  127. package/Utils/ModelImportExport.ts +369 -0
  128. package/Utils/Telemetry/EntityKey.ts +35 -0
  129. package/Utils/Telemetry/EntityRelationship.ts +6 -0
  130. package/Utils/Telemetry/HeartbeatAvailability.ts +262 -0
  131. package/build/dist/Models/DatabaseModels/Alert.js +108 -0
  132. package/build/dist/Models/DatabaseModels/Alert.js.map +1 -1
  133. package/build/dist/Models/DatabaseModels/CephCluster.js +992 -0
  134. package/build/dist/Models/DatabaseModels/CephCluster.js.map +1 -0
  135. package/build/dist/Models/DatabaseModels/CephClusterLabelRule.js +522 -0
  136. package/build/dist/Models/DatabaseModels/CephClusterLabelRule.js.map +1 -0
  137. package/build/dist/Models/DatabaseModels/CephClusterOwnerRule.js +603 -0
  138. package/build/dist/Models/DatabaseModels/CephClusterOwnerRule.js.map +1 -0
  139. package/build/dist/Models/DatabaseModels/CephClusterOwnerTeam.js +503 -0
  140. package/build/dist/Models/DatabaseModels/CephClusterOwnerTeam.js.map +1 -0
  141. package/build/dist/Models/DatabaseModels/CephClusterOwnerUser.js +502 -0
  142. package/build/dist/Models/DatabaseModels/CephClusterOwnerUser.js.map +1 -0
  143. package/build/dist/Models/DatabaseModels/CephResource.js +846 -0
  144. package/build/dist/Models/DatabaseModels/CephResource.js.map +1 -0
  145. package/build/dist/Models/DatabaseModels/Host.js +63 -0
  146. package/build/dist/Models/DatabaseModels/Host.js.map +1 -1
  147. package/build/dist/Models/DatabaseModels/Incident.js +108 -0
  148. package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
  149. package/build/dist/Models/DatabaseModels/Index.js +24 -0
  150. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  151. package/build/dist/Models/DatabaseModels/ProxmoxCluster.js +967 -0
  152. package/build/dist/Models/DatabaseModels/ProxmoxCluster.js.map +1 -0
  153. package/build/dist/Models/DatabaseModels/ProxmoxClusterLabelRule.js +522 -0
  154. package/build/dist/Models/DatabaseModels/ProxmoxClusterLabelRule.js.map +1 -0
  155. package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerRule.js +603 -0
  156. package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerRule.js.map +1 -0
  157. package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerTeam.js +503 -0
  158. package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerTeam.js.map +1 -0
  159. package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerUser.js +502 -0
  160. package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerUser.js.map +1 -0
  161. package/build/dist/Models/DatabaseModels/ProxmoxResource.js +761 -0
  162. package/build/dist/Models/DatabaseModels/ProxmoxResource.js.map +1 -0
  163. package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js +108 -0
  164. package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js.map +1 -1
  165. package/build/dist/Server/API/BillingInvoiceAPI.js +35 -5
  166. package/build/dist/Server/API/BillingInvoiceAPI.js.map +1 -1
  167. package/build/dist/Server/API/CephResourceAPI.js +98 -0
  168. package/build/dist/Server/API/CephResourceAPI.js.map +1 -0
  169. package/build/dist/Server/API/DashboardAPI.js +46 -0
  170. package/build/dist/Server/API/DashboardAPI.js.map +1 -1
  171. package/build/dist/Server/API/ProjectAPI.js +11 -0
  172. package/build/dist/Server/API/ProjectAPI.js.map +1 -1
  173. package/build/dist/Server/API/ProxmoxResourceAPI.js +95 -0
  174. package/build/dist/Server/API/ProxmoxResourceAPI.js.map +1 -0
  175. package/build/dist/Server/API/ResellerPlanAPI.js +17 -3
  176. package/build/dist/Server/API/ResellerPlanAPI.js.map +1 -1
  177. package/build/dist/Server/Infrastructure/GlobalCache.js +7 -2
  178. package/build/dist/Server/Infrastructure/GlobalCache.js.map +1 -1
  179. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781500000000-AddProxmoxAndCephClusterTables.js +76 -0
  180. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781500000000-AddProxmoxAndCephClusterTables.js.map +1 -0
  181. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781600000000-AddProxmoxCephV2Columns.js +108 -0
  182. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781600000000-AddProxmoxCephV2Columns.js.map +1 -0
  183. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781600000001-AddProxmoxCephActivityAndRules.js +253 -0
  184. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781600000001-AddProxmoxCephActivityAndRules.js.map +1 -0
  185. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781700000000-AddProxmoxCephV3Columns.js +43 -0
  186. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781700000000-AddProxmoxCephV3Columns.js.map +1 -0
  187. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +8 -0
  188. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  189. package/build/dist/Server/Infrastructure/Redis.js +31 -8
  190. package/build/dist/Server/Infrastructure/Redis.js.map +1 -1
  191. package/build/dist/Server/Services/AnalyticsDatabaseService.js +1 -1
  192. package/build/dist/Server/Services/AnalyticsDatabaseService.js.map +1 -1
  193. package/build/dist/Server/Services/BillingService.js +85 -23
  194. package/build/dist/Server/Services/BillingService.js.map +1 -1
  195. package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js +166 -0
  196. package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js.map +1 -0
  197. package/build/dist/Server/Services/CephClusterLabelRuleService.js +13 -0
  198. package/build/dist/Server/Services/CephClusterLabelRuleService.js.map +1 -0
  199. package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js +186 -0
  200. package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js.map +1 -0
  201. package/build/dist/Server/Services/CephClusterOwnerRuleService.js +13 -0
  202. package/build/dist/Server/Services/CephClusterOwnerRuleService.js.map +1 -0
  203. package/build/dist/Server/Services/CephClusterOwnerTeamService.js +9 -0
  204. package/build/dist/Server/Services/CephClusterOwnerTeamService.js.map +1 -0
  205. package/build/dist/Server/Services/CephClusterOwnerUserService.js +9 -0
  206. package/build/dist/Server/Services/CephClusterOwnerUserService.js.map +1 -0
  207. package/build/dist/Server/Services/CephClusterService.js +353 -0
  208. package/build/dist/Server/Services/CephClusterService.js.map +1 -0
  209. package/build/dist/Server/Services/CephResourceService.js +257 -0
  210. package/build/dist/Server/Services/CephResourceService.js.map +1 -0
  211. package/build/dist/Server/Services/CloudResourceService.js +10 -2
  212. package/build/dist/Server/Services/CloudResourceService.js.map +1 -1
  213. package/build/dist/Server/Services/DockerHostService.js +10 -2
  214. package/build/dist/Server/Services/DockerHostService.js.map +1 -1
  215. package/build/dist/Server/Services/ExceptionAggregationService.js +2 -0
  216. package/build/dist/Server/Services/ExceptionAggregationService.js.map +1 -1
  217. package/build/dist/Server/Services/HostService.js +10 -2
  218. package/build/dist/Server/Services/HostService.js.map +1 -1
  219. package/build/dist/Server/Services/Index.js +24 -0
  220. package/build/dist/Server/Services/Index.js.map +1 -1
  221. package/build/dist/Server/Services/KubernetesClusterService.js +10 -2
  222. package/build/dist/Server/Services/KubernetesClusterService.js.map +1 -1
  223. package/build/dist/Server/Services/LogAggregationService.js +2 -0
  224. package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
  225. package/build/dist/Server/Services/MetricAggregationService.js +2 -0
  226. package/build/dist/Server/Services/MetricAggregationService.js.map +1 -1
  227. package/build/dist/Server/Services/OpenTelemetryIngestService.js +37 -7
  228. package/build/dist/Server/Services/OpenTelemetryIngestService.js.map +1 -1
  229. package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js +166 -0
  230. package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js.map +1 -0
  231. package/build/dist/Server/Services/ProxmoxClusterLabelRuleService.js +13 -0
  232. package/build/dist/Server/Services/ProxmoxClusterLabelRuleService.js.map +1 -0
  233. package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js +186 -0
  234. package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js.map +1 -0
  235. package/build/dist/Server/Services/ProxmoxClusterOwnerRuleService.js +13 -0
  236. package/build/dist/Server/Services/ProxmoxClusterOwnerRuleService.js.map +1 -0
  237. package/build/dist/Server/Services/ProxmoxClusterOwnerTeamService.js +9 -0
  238. package/build/dist/Server/Services/ProxmoxClusterOwnerTeamService.js.map +1 -0
  239. package/build/dist/Server/Services/ProxmoxClusterOwnerUserService.js +9 -0
  240. package/build/dist/Server/Services/ProxmoxClusterOwnerUserService.js.map +1 -0
  241. package/build/dist/Server/Services/ProxmoxClusterService.js +337 -0
  242. package/build/dist/Server/Services/ProxmoxClusterService.js.map +1 -0
  243. package/build/dist/Server/Services/ProxmoxResourceService.js +285 -0
  244. package/build/dist/Server/Services/ProxmoxResourceService.js.map +1 -0
  245. package/build/dist/Server/Services/RumApplicationService.js +10 -2
  246. package/build/dist/Server/Services/RumApplicationService.js.map +1 -1
  247. package/build/dist/Server/Services/ServerlessFunctionService.js +10 -2
  248. package/build/dist/Server/Services/ServerlessFunctionService.js.map +1 -1
  249. package/build/dist/Server/Services/TelemetryUsageBillingService.js +30 -3
  250. package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
  251. package/build/dist/Server/Services/TraceAggregationService.js +2 -0
  252. package/build/dist/Server/Services/TraceAggregationService.js.map +1 -1
  253. package/build/dist/Server/Types/AnalyticsDatabase/AggregateBy.js +8 -25
  254. package/build/dist/Server/Types/AnalyticsDatabase/AggregateBy.js.map +1 -1
  255. package/build/dist/Server/Utils/Monitor/MonitorAlert.js +36 -0
  256. package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
  257. package/build/dist/Server/Utils/Monitor/MonitorClusterContext.js +90 -0
  258. package/build/dist/Server/Utils/Monitor/MonitorClusterContext.js.map +1 -0
  259. package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +228 -4
  260. package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
  261. package/build/dist/Server/Utils/Monitor/MonitorIncident.js +103 -8
  262. package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
  263. package/build/dist/Server/Utils/Monitor/MonitorMaintenanceSuppression.js +23 -6
  264. package/build/dist/Server/Utils/Monitor/MonitorMaintenanceSuppression.js.map +1 -1
  265. package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js +3 -1
  266. package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js.map +1 -1
  267. package/build/dist/Server/Utils/Monitor/SeriesResourceLabels.js +23 -0
  268. package/build/dist/Server/Utils/Monitor/SeriesResourceLabels.js.map +1 -1
  269. package/build/dist/Server/Utils/Profiling.js +24 -3
  270. package/build/dist/Server/Utils/Profiling.js.map +1 -1
  271. package/build/dist/Server/Utils/Telemetry/EntityRegistry.js +4 -0
  272. package/build/dist/Server/Utils/Telemetry/EntityRegistry.js.map +1 -1
  273. package/build/dist/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.js +854 -0
  274. package/build/dist/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.js.map +1 -0
  275. package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js +62 -0
  276. package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js.map +1 -1
  277. package/build/dist/Server/Utils/Telemetry.js +8 -10
  278. package/build/dist/Server/Utils/Telemetry.js.map +1 -1
  279. package/build/dist/Types/BaseDatabase/AggregationIntervalUtil.js +69 -0
  280. package/build/dist/Types/BaseDatabase/AggregationIntervalUtil.js.map +1 -0
  281. package/build/dist/Types/Dashboard/DashboardComponentType.js +4 -0
  282. package/build/dist/Types/Dashboard/DashboardComponentType.js.map +1 -1
  283. package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js +2 -0
  284. package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js.map +1 -1
  285. package/build/dist/Types/Dashboard/DashboardComponents/DashboardCephOsdListComponent.js +2 -0
  286. package/build/dist/Types/Dashboard/DashboardComponents/DashboardCephOsdListComponent.js.map +1 -0
  287. package/build/dist/Types/Dashboard/DashboardComponents/DashboardCephPoolListComponent.js +2 -0
  288. package/build/dist/Types/Dashboard/DashboardComponents/DashboardCephPoolListComponent.js.map +1 -0
  289. package/build/dist/Types/Dashboard/DashboardComponents/DashboardProxmoxGuestListComponent.js +2 -0
  290. package/build/dist/Types/Dashboard/DashboardComponents/DashboardProxmoxGuestListComponent.js.map +1 -0
  291. package/build/dist/Types/Dashboard/DashboardComponents/DashboardProxmoxNodeListComponent.js +2 -0
  292. package/build/dist/Types/Dashboard/DashboardComponents/DashboardProxmoxNodeListComponent.js.map +1 -0
  293. package/build/dist/Types/Dashboard/DashboardTemplates.js +394 -0
  294. package/build/dist/Types/Dashboard/DashboardTemplates.js.map +1 -1
  295. package/build/dist/Types/Icon/IconProp.js +2 -0
  296. package/build/dist/Types/Icon/IconProp.js.map +1 -1
  297. package/build/dist/Types/Monitor/CephAlertTemplates.js +1379 -0
  298. package/build/dist/Types/Monitor/CephAlertTemplates.js.map +1 -0
  299. package/build/dist/Types/Monitor/CephMetricCatalog.js +353 -0
  300. package/build/dist/Types/Monitor/CephMetricCatalog.js.map +1 -0
  301. package/build/dist/Types/Monitor/MonitorStep.js +46 -0
  302. package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
  303. package/build/dist/Types/Monitor/MonitorStepCephMonitor.js +34 -0
  304. package/build/dist/Types/Monitor/MonitorStepCephMonitor.js.map +1 -0
  305. package/build/dist/Types/Monitor/MonitorStepProxmoxMonitor.js +36 -0
  306. package/build/dist/Types/Monitor/MonitorStepProxmoxMonitor.js.map +1 -0
  307. package/build/dist/Types/Monitor/MonitorType.js +27 -1
  308. package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
  309. package/build/dist/Types/Monitor/ProxmoxAlertTemplates.js +743 -0
  310. package/build/dist/Types/Monitor/ProxmoxAlertTemplates.js.map +1 -0
  311. package/build/dist/Types/Monitor/ProxmoxMetricCatalog.js +320 -0
  312. package/build/dist/Types/Monitor/ProxmoxMetricCatalog.js.map +1 -0
  313. package/build/dist/Types/Permission.js +408 -0
  314. package/build/dist/Types/Permission.js.map +1 -1
  315. package/build/dist/Types/Telemetry/EntityType.js +11 -0
  316. package/build/dist/Types/Telemetry/EntityType.js.map +1 -1
  317. package/build/dist/Types/Telemetry/ServiceType.js +2 -0
  318. package/build/dist/Types/Telemetry/ServiceType.js.map +1 -1
  319. package/build/dist/UI/Components/Icon/Icon.js +33 -0
  320. package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
  321. package/build/dist/UI/Components/ImportExport/ExportModelCard.js +50 -0
  322. package/build/dist/UI/Components/ImportExport/ExportModelCard.js.map +1 -0
  323. package/build/dist/UI/Components/ImportExport/ImportModelsModal.js +115 -0
  324. package/build/dist/UI/Components/ImportExport/ImportModelsModal.js.map +1 -0
  325. package/build/dist/UI/Components/ModelTable/ModelTable.js +166 -74
  326. package/build/dist/UI/Components/ModelTable/ModelTable.js.map +1 -1
  327. package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js +5 -1
  328. package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js.map +1 -1
  329. package/build/dist/UI/Utils/ModelImportExport.js +142 -0
  330. package/build/dist/UI/Utils/ModelImportExport.js.map +1 -0
  331. package/build/dist/UI/Utils/Telemetry/Telemetry.js +11 -10
  332. package/build/dist/UI/Utils/Telemetry/Telemetry.js.map +1 -1
  333. package/build/dist/UI/Utils/TelemetryService.js +5 -2
  334. package/build/dist/UI/Utils/TelemetryService.js.map +1 -1
  335. package/build/dist/Utils/Dashboard/Components/DashboardCephOsdListComponent.js +50 -0
  336. package/build/dist/Utils/Dashboard/Components/DashboardCephOsdListComponent.js.map +1 -0
  337. package/build/dist/Utils/Dashboard/Components/DashboardCephPoolListComponent.js +27 -0
  338. package/build/dist/Utils/Dashboard/Components/DashboardCephPoolListComponent.js.map +1 -0
  339. package/build/dist/Utils/Dashboard/Components/DashboardCephResourceListShared.js +46 -0
  340. package/build/dist/Utils/Dashboard/Components/DashboardCephResourceListShared.js.map +1 -0
  341. package/build/dist/Utils/Dashboard/Components/DashboardProxmoxGuestListComponent.js +55 -0
  342. package/build/dist/Utils/Dashboard/Components/DashboardProxmoxGuestListComponent.js.map +1 -0
  343. package/build/dist/Utils/Dashboard/Components/DashboardProxmoxNodeListComponent.js +42 -0
  344. package/build/dist/Utils/Dashboard/Components/DashboardProxmoxNodeListComponent.js.map +1 -0
  345. package/build/dist/Utils/Dashboard/Components/DashboardProxmoxResourceListShared.js +46 -0
  346. package/build/dist/Utils/Dashboard/Components/DashboardProxmoxResourceListShared.js.map +1 -0
  347. package/build/dist/Utils/Dashboard/Components/Index.js +16 -0
  348. package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
  349. package/build/dist/Utils/ModelImportExport.js +257 -0
  350. package/build/dist/Utils/ModelImportExport.js.map +1 -0
  351. package/build/dist/Utils/Telemetry/EntityKey.js +27 -0
  352. package/build/dist/Utils/Telemetry/EntityKey.js.map +1 -1
  353. package/build/dist/Utils/Telemetry/EntityRelationship.js +3 -0
  354. package/build/dist/Utils/Telemetry/EntityRelationship.js.map +1 -1
  355. package/build/dist/Utils/Telemetry/HeartbeatAvailability.js +174 -0
  356. package/build/dist/Utils/Telemetry/HeartbeatAvailability.js.map +1 -0
  357. package/package.json +29 -21
@@ -0,0 +1,166 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import Label from "../../Models/DatabaseModels/Label";
11
+ import CephCluster from "../../Models/DatabaseModels/CephCluster";
12
+ import CephClusterLabelRuleService from "./CephClusterLabelRuleService";
13
+ import CephClusterService from "./CephClusterService";
14
+ import ObjectID from "../../Types/ObjectID";
15
+ import CaptureSpan from "../Utils/Telemetry/CaptureSpan";
16
+ import logger from "../Utils/Logger";
17
+ class CephClusterLabelRuleEngineServiceClass {
18
+ /**
19
+ * Evaluates CephClusterLabelRule rows for the given Ceph cluster and attaches matched
20
+ * labels to it. The union is deduped against labels already on the Ceph cluster
21
+ * before insert to avoid PK conflicts on the join table.
22
+ */
23
+ async applyRulesToCephCluster(cephCluster) {
24
+ var _a, _b;
25
+ if (!cephCluster.id || !cephCluster.projectId) {
26
+ return;
27
+ }
28
+ try {
29
+ const rules = await CephClusterLabelRuleService.findBy({
30
+ query: {
31
+ projectId: cephCluster.projectId,
32
+ isEnabled: true,
33
+ },
34
+ props: { isRoot: true },
35
+ select: {
36
+ _id: true,
37
+ name: true,
38
+ cephClusterLabels: { _id: true },
39
+ cephClusterNamePattern: true,
40
+ cephClusterDescriptionPattern: true,
41
+ labelsToAdd: { _id: true },
42
+ },
43
+ limit: 100,
44
+ skip: 0,
45
+ });
46
+ if (rules.length === 0) {
47
+ return;
48
+ }
49
+ const cephClusterWithDetails = await CephClusterService.findOneById({
50
+ id: cephCluster.id,
51
+ select: {
52
+ name: true,
53
+ description: true,
54
+ labels: { _id: true },
55
+ },
56
+ props: { isRoot: true },
57
+ });
58
+ if (!cephClusterWithDetails) {
59
+ return;
60
+ }
61
+ const labelIdsToAdd = new Set();
62
+ for (const rule of rules) {
63
+ const matches = this.doesCephClusterMatchRule(cephClusterWithDetails, rule);
64
+ if (!matches) {
65
+ continue;
66
+ }
67
+ for (const label of rule.labelsToAdd || []) {
68
+ if (label.id) {
69
+ labelIdsToAdd.add(label.id.toString());
70
+ }
71
+ }
72
+ }
73
+ if (labelIdsToAdd.size === 0) {
74
+ return;
75
+ }
76
+ const existingLabelIds = new Set((cephClusterWithDetails.labels || [])
77
+ .map((l) => {
78
+ var _a;
79
+ return ((_a = l.id) === null || _a === void 0 ? void 0 : _a.toString()) || "";
80
+ })
81
+ .filter((id) => {
82
+ return id !== "";
83
+ }));
84
+ const newLabelIds = Array.from(labelIdsToAdd).filter((id) => {
85
+ return !existingLabelIds.has(id);
86
+ });
87
+ if (newLabelIds.length === 0) {
88
+ return;
89
+ }
90
+ await CephClusterService.getRepository()
91
+ .createQueryBuilder()
92
+ .relation(CephCluster, "labels")
93
+ .of(cephCluster.id.toString())
94
+ .add(newLabelIds);
95
+ /*
96
+ * Sync in-memory cephCluster.labels so a downstream owner-rule engine in
97
+ * the same onCreateSuccess chain can match on rule-added labels.
98
+ */
99
+ const mergedLabelIds = new Set([
100
+ ...existingLabelIds,
101
+ ...newLabelIds,
102
+ ]);
103
+ cephCluster.labels = Array.from(mergedLabelIds).map((id) => {
104
+ const label = new Label();
105
+ label.id = new ObjectID(id);
106
+ return label;
107
+ });
108
+ logger.debug(`CephClusterLabelRuleEngine attached ${newLabelIds.length} labels to Ceph cluster ${cephCluster.id}`, { projectId: cephCluster.projectId.toString() });
109
+ }
110
+ catch (error) {
111
+ logger.error(`Error applying Ceph cluster label rules: ${error}`, {
112
+ projectId: (_a = cephCluster.projectId) === null || _a === void 0 ? void 0 : _a.toString(),
113
+ cephClusterId: (_b = cephCluster.id) === null || _b === void 0 ? void 0 : _b.toString(),
114
+ });
115
+ }
116
+ }
117
+ doesCephClusterMatchRule(cephCluster, rule) {
118
+ if (rule.cephClusterLabels && rule.cephClusterLabels.length > 0) {
119
+ if (!cephCluster.labels || cephCluster.labels.length === 0) {
120
+ return false;
121
+ }
122
+ const ruleLabelIds = rule.cephClusterLabels.map((l) => {
123
+ var _a;
124
+ return ((_a = l.id) === null || _a === void 0 ? void 0 : _a.toString()) || "";
125
+ });
126
+ const labelIds = cephCluster.labels.map((l) => {
127
+ var _a;
128
+ return ((_a = l.id) === null || _a === void 0 ? void 0 : _a.toString()) || "";
129
+ });
130
+ if (!ruleLabelIds.some((id) => {
131
+ return labelIds.includes(id);
132
+ })) {
133
+ return false;
134
+ }
135
+ }
136
+ if (rule.cephClusterNamePattern &&
137
+ (!cephCluster.name ||
138
+ !this.testRegex(rule.cephClusterNamePattern, cephCluster.name, rule))) {
139
+ return false;
140
+ }
141
+ if (rule.cephClusterDescriptionPattern &&
142
+ (!cephCluster.description ||
143
+ !this.testRegex(rule.cephClusterDescriptionPattern, cephCluster.description, rule))) {
144
+ return false;
145
+ }
146
+ return true;
147
+ }
148
+ testRegex(pattern, value, rule) {
149
+ try {
150
+ const regex = new RegExp(pattern, "i");
151
+ return regex.test(value);
152
+ }
153
+ catch (_a) {
154
+ logger.warn(`Invalid regex in Ceph cluster label rule ${rule.id}: ${pattern}`);
155
+ return false;
156
+ }
157
+ }
158
+ }
159
+ __decorate([
160
+ CaptureSpan(),
161
+ __metadata("design:type", Function),
162
+ __metadata("design:paramtypes", [CephCluster]),
163
+ __metadata("design:returntype", Promise)
164
+ ], CephClusterLabelRuleEngineServiceClass.prototype, "applyRulesToCephCluster", null);
165
+ export default new CephClusterLabelRuleEngineServiceClass();
166
+ //# sourceMappingURL=CephClusterLabelRuleEngineService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CephClusterLabelRuleEngineService.js","sourceRoot":"","sources":["../../../../Server/Services/CephClusterLabelRuleEngineService.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,MAAM,mCAAmC,CAAC;AACtD,OAAO,WAAW,MAAM,yCAAyC,CAAC;AAElE,OAAO,2BAA2B,MAAM,+BAA+B,CAAC;AACxE,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,WAAW,MAAM,gCAAgC,CAAC;AACzD,OAAO,MAAyB,MAAM,iBAAiB,CAAC;AAExD,MAAM,sCAAsC;IAC1C;;;;OAIG;IAEU,AAAN,KAAK,CAAC,uBAAuB,CAClC,WAAwB;;QAExB,IAAI,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC;YAC9C,OAAO;QACT,CAAC;QAED,IAAI,CAAC;YACH,MAAM,KAAK,GACT,MAAM,2BAA2B,CAAC,MAAM,CAAC;gBACvC,KAAK,EAAE;oBACL,SAAS,EAAE,WAAW,CAAC,SAAS;oBAChC,SAAS,EAAE,IAAI;iBAChB;gBACD,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;gBACvB,MAAM,EAAE;oBACN,GAAG,EAAE,IAAI;oBACT,IAAI,EAAE,IAAI;oBACV,iBAAiB,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE;oBAChC,sBAAsB,EAAE,IAAI;oBAC5B,6BAA6B,EAAE,IAAI;oBACnC,WAAW,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE;iBAC3B;gBACD,KAAK,EAAE,GAAG;gBACV,IAAI,EAAE,CAAC;aACR,CAAC,CAAC;YAEL,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACvB,OAAO;YACT,CAAC;YAED,MAAM,sBAAsB,GAC1B,MAAM,kBAAkB,CA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A6B,EAClC,WAAW,CAAC,WAAW,EACvB,IAAI,CACL,CAAC,EACJ,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,SAAS,CACf,OAAe,EACf,KAAa,EACb,IAA0B;QAE1B,IAAI,CAAC;YACH,MAAM,KAAK,GAAW,IAAI,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;YAC/C,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;QAAC,WAAM,CAAC;YACP,MAAM,CAAC,IAAI,CACT,4CAA4C,IAAI,CAAC,EAAE,KAAK,OAAO,EAAE,CAClE,CAAC;YACF,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF;AArLc;IADZ,WAAW,EAAE;;qCAEC,WAAW;;qFAmHzB;AAmEH,eAAe,IAAI,sCAAsC,EAAE,CAAC"}
@@ -0,0 +1,13 @@
1
+ import DatabaseService from "./DatabaseService";
2
+ import Model from "../../Models/DatabaseModels/CephClusterLabelRule";
3
+ import { IsBillingEnabled } from "../EnvironmentConfig";
4
+ export class Service extends DatabaseService {
5
+ constructor() {
6
+ super(Model);
7
+ if (IsBillingEnabled) {
8
+ this.hardDeleteItemsOlderThanInDays("createdAt", 3 * 365);
9
+ }
10
+ }
11
+ }
12
+ export default new Service();
13
+ //# sourceMappingURL=CephClusterLabelRuleService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CephClusterLabelRuleService.js","sourceRoot":"","sources":["../../../../Server/Services/CephClusterLabelRuleService.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,OAAO,OAAQ,SAAQ,eAAsB;IACjD;QACE,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,gBAAgB,EAAE,CAAC;YACrB,IAAI,CAAC,8BAA8B,CAAC,WAAW,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;CACF;AAED,eAAe,IAAI,OAAO,EAAE,CAAC"}
@@ -0,0 +1,186 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import CephCluster from "../../Models/DatabaseModels/CephCluster";
11
+ import CephClusterOwnerUser from "../../Models/DatabaseModels/CephClusterOwnerUser";
12
+ import CephClusterOwnerTeam from "../../Models/DatabaseModels/CephClusterOwnerTeam";
13
+ import CephClusterOwnerRuleService from "./CephClusterOwnerRuleService";
14
+ import CephClusterOwnerUserService from "./CephClusterOwnerUserService";
15
+ import CephClusterOwnerTeamService from "./CephClusterOwnerTeamService";
16
+ import CephClusterService from "./CephClusterService";
17
+ import ObjectID from "../../Types/ObjectID";
18
+ import CaptureSpan from "../Utils/Telemetry/CaptureSpan";
19
+ import logger from "../Utils/Logger";
20
+ class CephClusterOwnerRuleEngineServiceClass {
21
+ /**
22
+ * Evaluates CephClusterOwnerRule rows for the given Ceph cluster and adds matched
23
+ * owner users / teams via CephClusterOwnerUserService / CephClusterOwnerTeamService. Rules
24
+ * with notifyOwners set notify the added owners; rules with notifyOwners off
25
+ * add silently.
26
+ */
27
+ async applyRulesToCephCluster(cephCluster) {
28
+ var _a, _b;
29
+ if (!cephCluster.id || !cephCluster.projectId) {
30
+ return;
31
+ }
32
+ try {
33
+ const rules = await CephClusterOwnerRuleService.findBy({
34
+ query: {
35
+ projectId: cephCluster.projectId,
36
+ isEnabled: true,
37
+ },
38
+ props: { isRoot: true },
39
+ select: {
40
+ _id: true,
41
+ name: true,
42
+ notifyOwners: true,
43
+ cephClusterLabels: { _id: true },
44
+ cephClusterNamePattern: true,
45
+ cephClusterDescriptionPattern: true,
46
+ ownerUsers: { _id: true },
47
+ ownerTeams: { _id: true },
48
+ },
49
+ limit: 100,
50
+ skip: 0,
51
+ });
52
+ if (rules.length === 0) {
53
+ return;
54
+ }
55
+ const cephClusterWithDetails = await CephClusterService.findOneById({
56
+ id: cephCluster.id,
57
+ select: {
58
+ name: true,
59
+ description: true,
60
+ labels: { _id: true },
61
+ },
62
+ props: { isRoot: true },
63
+ });
64
+ if (!cephClusterWithDetails) {
65
+ return;
66
+ }
67
+ const usersByNotify = new Map([
68
+ [true, new Set()],
69
+ [false, new Set()],
70
+ ]);
71
+ const teamsByNotify = new Map([
72
+ [true, new Set()],
73
+ [false, new Set()],
74
+ ]);
75
+ const matchedRules = [];
76
+ for (const rule of rules) {
77
+ const matches = this.doesCephClusterMatchRule(cephClusterWithDetails, rule);
78
+ if (!matches) {
79
+ continue;
80
+ }
81
+ let ruleAddedAny = false;
82
+ const notify = rule.notifyOwners !== false;
83
+ for (const user of rule.ownerUsers || []) {
84
+ if (user.id) {
85
+ usersByNotify.get(notify).add(user.id.toString());
86
+ ruleAddedAny = true;
87
+ }
88
+ }
89
+ for (const team of rule.ownerTeams || []) {
90
+ if (team.id) {
91
+ teamsByNotify.get(notify).add(team.id.toString());
92
+ ruleAddedAny = true;
93
+ }
94
+ }
95
+ if (ruleAddedAny) {
96
+ matchedRules.push(rule);
97
+ }
98
+ }
99
+ if (matchedRules.length === 0) {
100
+ return;
101
+ }
102
+ for (const notify of [true, false]) {
103
+ const userIds = usersByNotify.get(notify);
104
+ const teamIds = teamsByNotify.get(notify);
105
+ for (const userId of userIds) {
106
+ const owner = new CephClusterOwnerUser();
107
+ owner.cephClusterId = cephCluster.id;
108
+ owner.projectId = cephCluster.projectId;
109
+ owner.userId = new ObjectID(userId);
110
+ owner.isOwnerNotified = !notify;
111
+ await CephClusterOwnerUserService.create({
112
+ data: owner,
113
+ props: { isRoot: true },
114
+ });
115
+ }
116
+ for (const teamId of teamIds) {
117
+ const owner = new CephClusterOwnerTeam();
118
+ owner.cephClusterId = cephCluster.id;
119
+ owner.projectId = cephCluster.projectId;
120
+ owner.teamId = new ObjectID(teamId);
121
+ owner.isOwnerNotified = !notify;
122
+ await CephClusterOwnerTeamService.create({
123
+ data: owner,
124
+ props: { isRoot: true },
125
+ });
126
+ }
127
+ }
128
+ logger.debug(`CephClusterOwnerRuleEngine added owners to Ceph cluster ${cephCluster.id}`, { projectId: cephCluster.projectId.toString() });
129
+ }
130
+ catch (error) {
131
+ logger.error(`Error applying Ceph cluster owner rules: ${error}`, {
132
+ projectId: (_a = cephCluster.projectId) === null || _a === void 0 ? void 0 : _a.toString(),
133
+ cephClusterId: (_b = cephCluster.id) === null || _b === void 0 ? void 0 : _b.toString(),
134
+ });
135
+ }
136
+ }
137
+ doesCephClusterMatchRule(cephCluster, rule) {
138
+ if (rule.cephClusterLabels && rule.cephClusterLabels.length > 0) {
139
+ if (!cephCluster.labels || cephCluster.labels.length === 0) {
140
+ return false;
141
+ }
142
+ const ruleLabelIds = rule.cephClusterLabels.map((l) => {
143
+ var _a;
144
+ return ((_a = l.id) === null || _a === void 0 ? void 0 : _a.toString()) || "";
145
+ });
146
+ const labelIds = cephCluster.labels.map((l) => {
147
+ var _a;
148
+ return ((_a = l.id) === null || _a === void 0 ? void 0 : _a.toString()) || "";
149
+ });
150
+ if (!ruleLabelIds.some((id) => {
151
+ return labelIds.includes(id);
152
+ })) {
153
+ return false;
154
+ }
155
+ }
156
+ if (rule.cephClusterNamePattern &&
157
+ (!cephCluster.name ||
158
+ !this.testRegex(rule.cephClusterNamePattern, cephCluster.name, rule))) {
159
+ return false;
160
+ }
161
+ if (rule.cephClusterDescriptionPattern &&
162
+ (!cephCluster.description ||
163
+ !this.testRegex(rule.cephClusterDescriptionPattern, cephCluster.description, rule))) {
164
+ return false;
165
+ }
166
+ return true;
167
+ }
168
+ testRegex(pattern, value, rule) {
169
+ try {
170
+ const regex = new RegExp(pattern, "i");
171
+ return regex.test(value);
172
+ }
173
+ catch (_a) {
174
+ logger.warn(`Invalid regex in Ceph cluster owner rule ${rule.id}: ${pattern}`);
175
+ return false;
176
+ }
177
+ }
178
+ }
179
+ __decorate([
180
+ CaptureSpan(),
181
+ __metadata("design:type", Function),
182
+ __metadata("design:paramtypes", [CephCluster]),
183
+ __metadata("design:returntype", Promise)
184
+ ], CephClusterOwnerRuleEngineServiceClass.prototype, "applyRulesToCephCluster", null);
185
+ export default new CephClusterOwnerRuleEngineServiceClass();
186
+ //# sourceMappingURL=CephClusterOwnerRuleEngineService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CephClusterOwnerRuleEngineService.js","sourceRoot":"","sources":["../../../../Server/Services/CephClusterOwnerRuleEngineService.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,WAAW,MAAM,yCAAyC,CAAC;AAElE,OAAO,oBAAoB,MAAM,kDAAkD,CAAC;AACpF,OAAO,oBAAoB,MAAM,kDAAkD,CAAC;AACpF,OAAO,2BAA2B,MAAM,+BAA+B,CAAC;AACxE,OAAO,2BAA2B,MAAM,+BAA+B,CAAC;AACxE,OAAO,2BAA2B,MAAM,+BAA+B,CAAC;AACxE,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,WAAW,MAAM,gCAAgC,CAAC;AACzD,OAAO,MAAyB,MAAM,iBAAiB,CAAC;AAExD,MAAM,sCAAsC;IAC1C;;;;;OAKG;IAEU,AAAN,KAAK,CAAC,uBAAuB,CAClC,WAAwB;;QAExB,I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CAAC;QAED,IACE,IAAI,CAAC,sBAAsB;YAC3B,CAAC,CAAC,WAAW,CAAC,IAAI;gBAChB,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,sBAAsB,EAAE,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,EACvE,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IACE,IAAI,CAAC,6BAA6B;YAClC,CAAC,CAAC,WAAW,CAAC,WAAW;gBACvB,CAAC,IAAI,CAAC,SAAS,CACb,IAAI,CAAC,6BAA6B,EAClC,WAAW,CAAC,WAAW,EACvB,IAAI,CACL,CAAC,EACJ,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,SAAS,CACf,OAAe,EACf,KAAa,EACb,IAA0B;QAE1B,IAAI,CAAC;YACH,MAAM,KAAK,GAAW,IAAI,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;YAC/C,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;QAAC,WAAM,CAAC;YACP,MAAM,CAAC,IAAI,CACT,4CAA4C,IAAI,CAAC,EAAE,KAAK,OAAO,EAAE,CAClE,CAAC;YACF,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF;AAlMc;IADZ,WAAW,EAAE;;qCAEC,WAAW;;qFAgIzB;AAmEH,eAAe,IAAI,sCAAsC,EAAE,CAAC"}
@@ -0,0 +1,13 @@
1
+ import DatabaseService from "./DatabaseService";
2
+ import Model from "../../Models/DatabaseModels/CephClusterOwnerRule";
3
+ import { IsBillingEnabled } from "../EnvironmentConfig";
4
+ export class Service extends DatabaseService {
5
+ constructor() {
6
+ super(Model);
7
+ if (IsBillingEnabled) {
8
+ this.hardDeleteItemsOlderThanInDays("createdAt", 3 * 365);
9
+ }
10
+ }
11
+ }
12
+ export default new Service();
13
+ //# sourceMappingURL=CephClusterOwnerRuleService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CephClusterOwnerRuleService.js","sourceRoot":"","sources":["../../../../Server/Services/CephClusterOwnerRuleService.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,OAAO,OAAQ,SAAQ,eAAsB;IACjD;QACE,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,gBAAgB,EAAE,CAAC;YACrB,IAAI,CAAC,8BAA8B,CAAC,WAAW,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;CACF;AAED,eAAe,IAAI,OAAO,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import DatabaseService from "./DatabaseService";
2
+ import Model from "../../Models/DatabaseModels/CephClusterOwnerTeam";
3
+ export class Service extends DatabaseService {
4
+ constructor() {
5
+ super(Model);
6
+ }
7
+ }
8
+ export default new Service();
9
+ //# sourceMappingURL=CephClusterOwnerTeamService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CephClusterOwnerTeamService.js","sourceRoot":"","sources":["../../../../Server/Services/CephClusterOwnerTeamService.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,MAAM,kDAAkD,CAAC;AAErE,MAAM,OAAO,OAAQ,SAAQ,eAAsB;IACjD;QACE,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;CACF;AAED,eAAe,IAAI,OAAO,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import DatabaseService from "./DatabaseService";
2
+ import Model from "../../Models/DatabaseModels/CephClusterOwnerUser";
3
+ export class Service extends DatabaseService {
4
+ constructor() {
5
+ super(Model);
6
+ }
7
+ }
8
+ export default new Service();
9
+ //# sourceMappingURL=CephClusterOwnerUserService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CephClusterOwnerUserService.js","sourceRoot":"","sources":["../../../../Server/Services/CephClusterOwnerUserService.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,MAAM,kDAAkD,CAAC;AAErE,MAAM,OAAO,OAAQ,SAAQ,eAAsB;IACjD;QACE,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;CACF;AAED,eAAe,IAAI,OAAO,EAAE,CAAC"}