@oneuptime/common 11.0.1 → 11.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/DatabaseModels/Alert.ts +276 -0
- package/Models/DatabaseModels/AlertLabelRule.ts +38 -0
- package/Models/DatabaseModels/AlertOwnerRule.ts +38 -0
- package/Models/DatabaseModels/CephCluster.ts +964 -0
- package/Models/DatabaseModels/CephClusterLabelRule.ts +514 -0
- package/Models/DatabaseModels/CephClusterOwnerRule.ts +596 -0
- package/Models/DatabaseModels/CephClusterOwnerTeam.ts +487 -0
- package/Models/DatabaseModels/CephClusterOwnerUser.ts +486 -0
- package/Models/DatabaseModels/CephResource.ts +809 -0
- package/Models/DatabaseModels/DockerSwarmCluster.ts +989 -0
- package/Models/DatabaseModels/DockerSwarmClusterLabelRule.ts +514 -0
- package/Models/DatabaseModels/DockerSwarmClusterOwnerRule.ts +596 -0
- package/Models/DatabaseModels/DockerSwarmClusterOwnerTeam.ts +487 -0
- package/Models/DatabaseModels/DockerSwarmClusterOwnerUser.ts +486 -0
- package/Models/DatabaseModels/DockerSwarmResource.ts +750 -0
- package/Models/DatabaseModels/Host.ts +64 -0
- package/Models/DatabaseModels/Incident.ts +276 -0
- package/Models/DatabaseModels/IncidentLabelRule.ts +38 -0
- package/Models/DatabaseModels/IncidentOwnerRule.ts +38 -0
- package/Models/DatabaseModels/IncidentTemplate.ts +56 -0
- package/Models/DatabaseModels/Index.ts +48 -0
- package/Models/DatabaseModels/PodmanHost.ts +859 -0
- package/Models/DatabaseModels/PodmanHostLabelRule.ts +514 -0
- package/Models/DatabaseModels/PodmanHostOwnerRule.ts +596 -0
- package/Models/DatabaseModels/PodmanHostOwnerTeam.ts +487 -0
- package/Models/DatabaseModels/PodmanHostOwnerUser.ts +486 -0
- package/Models/DatabaseModels/PodmanResource.ts +498 -0
- package/Models/DatabaseModels/ProxmoxCluster.ts +943 -0
- package/Models/DatabaseModels/ProxmoxClusterLabelRule.ts +514 -0
- package/Models/DatabaseModels/ProxmoxClusterOwnerRule.ts +596 -0
- package/Models/DatabaseModels/ProxmoxClusterOwnerTeam.ts +487 -0
- package/Models/DatabaseModels/ProxmoxClusterOwnerUser.ts +486 -0
- package/Models/DatabaseModels/ProxmoxResource.ts +726 -0
- package/Models/DatabaseModels/ScheduledMaintenance.ts +220 -0
- package/Models/DatabaseModels/ScheduledMaintenanceLabelRule.ts +38 -0
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.ts +38 -0
- package/Models/DatabaseModels/ScheduledMaintenanceTemplate.ts +56 -0
- package/Models/DatabaseModels/TelemetryException.ts +2 -0
- package/Server/API/BillingInvoiceAPI.ts +47 -7
- package/Server/API/CephResourceAPI.ts +134 -0
- package/Server/API/DashboardAPI.ts +135 -0
- package/Server/API/DockerSwarmResourceAPI.ts +137 -0
- package/Server/API/ProjectAPI.ts +15 -0
- package/Server/API/ProxmoxResourceAPI.ts +132 -0
- package/Server/API/ResellerPlanAPI.ts +17 -0
- package/Server/API/TelemetryAPI.ts +8 -1
- package/Server/Infrastructure/GlobalCache.ts +8 -2
- package/Server/Infrastructure/Postgres/SchemaMigrations/1781500000000-AddProxmoxAndCephClusterTables.ts +163 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1781587937032-MigrationName.ts +3199 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1781600000000-AddProxmoxCephV2Columns.ts +211 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1781600000001-AddProxmoxCephActivityAndRules.ts +590 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1781700000000-AddProxmoxCephV3Columns.ts +64 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +10 -0
- package/Server/Infrastructure/Redis.ts +40 -12
- package/Server/Services/AlertLabelRuleEngineService.ts +29 -0
- package/Server/Services/AlertOwnerRuleEngineService.ts +67 -0
- package/Server/Services/AnalyticsDatabaseService.ts +1 -1
- package/Server/Services/BillingService.ts +109 -21
- package/Server/Services/CephClusterLabelRuleEngineService.ts +200 -0
- package/Server/Services/CephClusterLabelRuleService.ts +14 -0
- package/Server/Services/CephClusterOwnerRuleEngineService.ts +218 -0
- package/Server/Services/CephClusterOwnerRuleService.ts +14 -0
- package/Server/Services/CephClusterOwnerTeamService.ts +10 -0
- package/Server/Services/CephClusterOwnerUserService.ts +10 -0
- package/Server/Services/CephClusterService.ts +401 -0
- package/Server/Services/CephResourceService.ts +383 -0
- package/Server/Services/CloudResourceService.ts +11 -3
- package/Server/Services/DockerHostService.ts +11 -3
- package/Server/Services/DockerSwarmClusterLabelRuleEngineService.ts +214 -0
- package/Server/Services/DockerSwarmClusterLabelRuleService.ts +14 -0
- package/Server/Services/DockerSwarmClusterOwnerRuleEngineService.ts +232 -0
- package/Server/Services/DockerSwarmClusterOwnerRuleService.ts +14 -0
- package/Server/Services/DockerSwarmClusterOwnerTeamService.ts +10 -0
- package/Server/Services/DockerSwarmClusterOwnerUserService.ts +10 -0
- package/Server/Services/DockerSwarmClusterService.ts +404 -0
- package/Server/Services/DockerSwarmResourceService.ts +381 -0
- package/Server/Services/ExceptionAggregationService.ts +3 -0
- package/Server/Services/HostService.ts +11 -3
- package/Server/Services/IncidentLabelRuleEngineService.ts +27 -0
- package/Server/Services/IncidentOwnerRuleEngineService.ts +67 -0
- package/Server/Services/IncidentService.ts +11 -0
- package/Server/Services/Index.ts +38 -0
- package/Server/Services/KubernetesClusterService.ts +11 -3
- package/Server/Services/LogAggregationService.ts +3 -0
- package/Server/Services/MetricAggregationService.ts +3 -0
- package/Server/Services/OpenTelemetryIngestService.ts +73 -0
- package/Server/Services/PodmanHostLabelRuleEngineService.ts +198 -0
- package/Server/Services/PodmanHostLabelRuleService.ts +14 -0
- package/Server/Services/PodmanHostOwnerRuleEngineService.ts +216 -0
- package/Server/Services/PodmanHostOwnerRuleService.ts +14 -0
- package/Server/Services/PodmanHostOwnerTeamService.ts +10 -0
- package/Server/Services/PodmanHostOwnerUserService.ts +10 -0
- package/Server/Services/PodmanHostService.ts +368 -0
- package/Server/Services/PodmanResourceService.ts +310 -0
- package/Server/Services/ProxmoxClusterLabelRuleEngineService.ts +204 -0
- package/Server/Services/ProxmoxClusterLabelRuleService.ts +14 -0
- package/Server/Services/ProxmoxClusterOwnerRuleEngineService.ts +222 -0
- package/Server/Services/ProxmoxClusterOwnerRuleService.ts +14 -0
- package/Server/Services/ProxmoxClusterOwnerTeamService.ts +10 -0
- package/Server/Services/ProxmoxClusterOwnerUserService.ts +10 -0
- package/Server/Services/ProxmoxClusterService.ts +382 -0
- package/Server/Services/ProxmoxResourceService.ts +404 -0
- package/Server/Services/RumApplicationService.ts +11 -3
- package/Server/Services/ScheduledMaintenanceLabelRuleEngineService.ts +29 -0
- package/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.ts +67 -0
- package/Server/Services/ServerlessFunctionService.ts +11 -3
- package/Server/Services/TelemetryUsageBillingService.ts +59 -3
- package/Server/Services/TraceAggregationService.ts +3 -0
- package/Server/Types/AnalyticsDatabase/AggregateBy.ts +8 -23
- package/Server/Types/Database/Permissions/OwnerTableRegistry.ts +13 -0
- package/Server/Utils/Monitor/MonitorAlert.ts +55 -0
- package/Server/Utils/Monitor/MonitorClusterContext.ts +158 -0
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +650 -4
- package/Server/Utils/Monitor/MonitorIncident.ts +175 -7
- package/Server/Utils/Monitor/MonitorMaintenanceSuppression.ts +56 -6
- package/Server/Utils/Monitor/MonitorTemplateUtil.ts +6 -1
- package/Server/Utils/Monitor/SeriesResourceLabels.ts +59 -0
- package/Server/Utils/Profiling.ts +37 -2
- package/Server/Utils/Telemetry/EntityRegistry.ts +4 -0
- package/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.ts +1096 -0
- package/Server/Utils/Telemetry/ResourceFacetResolver.ts +49 -0
- package/Server/Utils/Telemetry/Telemetry.ts +10 -0
- package/Server/Utils/Telemetry/TelemetryEntity.ts +107 -0
- package/Server/Utils/Telemetry.ts +8 -19
- package/Tests/Server/API/BillingInvoiceAPI.test.ts +194 -0
- package/Tests/Server/API/ProjectAPI.test.ts +91 -0
- package/Tests/Server/API/ResellerPlanAPI.test.ts +207 -0
- package/Tests/Server/Infrastructure/GlobalCache.test.ts +100 -0
- package/Tests/Server/Services/BillingService.test.ts +323 -0
- package/Tests/Server/Services/CephResourceService.test.ts +264 -0
- package/Tests/Server/Services/ProxmoxResourceService.test.ts +326 -0
- package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluator.test.ts +322 -0
- package/Tests/Server/Utils/Monitor/MonitorMaintenanceSuppression.test.ts +14 -0
- package/Tests/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.test.ts +879 -0
- package/Tests/Server/Utils/Telemetry/TelemetryEntity.test.ts +196 -0
- package/Tests/Types/DockerSwarm/DockerSwarmInventoryExtractor.test.ts +667 -0
- package/Tests/Types/Monitor/CephAlertTemplates.test.ts +1231 -0
- package/Tests/Types/Monitor/DockerSwarmAlertTemplates.test.ts +528 -0
- package/Tests/Types/Monitor/ProxmoxAlertTemplates.test.ts +732 -0
- package/Tests/Utils/Telemetry/EntityRelationship.test.ts +49 -0
- package/Tests/Utils/Telemetry/HeartbeatAvailability.test.ts +423 -0
- package/Types/BaseDatabase/AggregationIntervalUtil.ts +74 -0
- package/Types/Dashboard/DashboardComponentType.ts +11 -0
- package/Types/Dashboard/DashboardComponents/ComponentArgument.ts +4 -0
- package/Types/Dashboard/DashboardComponents/DashboardCephOsdListComponent.ts +15 -0
- package/Types/Dashboard/DashboardComponents/DashboardCephPoolListComponent.ts +14 -0
- package/Types/Dashboard/DashboardComponents/DashboardDockerSwarmNodeListComponent.ts +17 -0
- package/Types/Dashboard/DashboardComponents/DashboardDockerSwarmServiceListComponent.ts +17 -0
- package/Types/Dashboard/DashboardComponents/DashboardPodmanContainerListComponent.ts +16 -0
- package/Types/Dashboard/DashboardComponents/DashboardPodmanHostListComponent.ts +15 -0
- package/Types/Dashboard/DashboardComponents/DashboardPodmanImageListComponent.ts +16 -0
- package/Types/Dashboard/DashboardComponents/DashboardPodmanNetworkListComponent.ts +15 -0
- package/Types/Dashboard/DashboardComponents/DashboardPodmanVolumeListComponent.ts +15 -0
- package/Types/Dashboard/DashboardComponents/DashboardProxmoxGuestListComponent.ts +17 -0
- package/Types/Dashboard/DashboardComponents/DashboardProxmoxNodeListComponent.ts +16 -0
- package/Types/Dashboard/DashboardTemplates.ts +640 -0
- package/Types/DockerSwarm/DockerSwarmInventoryExtractor.ts +452 -0
- package/Types/Icon/IconProp.ts +3 -0
- package/Types/Monitor/CephAlertTemplates.ts +1647 -0
- package/Types/Monitor/CephMetricCatalog.ts +409 -0
- package/Types/Monitor/DockerSwarmAlertTemplates.ts +461 -0
- package/Types/Monitor/DockerSwarmMetricCatalog.ts +139 -0
- package/Types/Monitor/HostAlertTemplates.ts +455 -0
- package/Types/Monitor/HostMetricCatalog.ts +177 -0
- package/Types/Monitor/MetricMonitor/MetricMonitorResponse.ts +65 -0
- package/Types/Monitor/MonitorStep.ts +163 -0
- package/Types/Monitor/MonitorStepCephMonitor.ts +57 -0
- package/Types/Monitor/MonitorStepDockerSwarmMonitor.ts +74 -0
- package/Types/Monitor/MonitorStepHostMonitor.ts +30 -0
- package/Types/Monitor/MonitorStepPodmanMonitor.ts +38 -0
- package/Types/Monitor/MonitorStepProxmoxMonitor.ts +81 -0
- package/Types/Monitor/MonitorType.ts +71 -1
- package/Types/Monitor/PodmanAlertTemplates.ts +507 -0
- package/Types/Monitor/PodmanMetricCatalog.ts +226 -0
- package/Types/Monitor/ProxmoxAlertTemplates.ts +899 -0
- package/Types/Monitor/ProxmoxMetricCatalog.ts +382 -0
- package/Types/Permission.ts +1029 -104
- package/Types/Podman/PodmanInventoryExtractor.ts +343 -0
- package/Types/Telemetry/EntityType.ts +23 -0
- package/Types/Telemetry/ServiceType.ts +4 -0
- package/UI/Components/Icon/Icon.tsx +141 -0
- package/UI/Components/LogsViewer/LogsViewer.tsx +44 -1
- package/UI/Components/LogsViewer/components/LogsFacetSidebar.tsx +28 -0
- package/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.ts +15 -5
- package/UI/Utils/Telemetry/Telemetry.ts +16 -21
- package/UI/Utils/TelemetryService.ts +8 -3
- package/Utils/Dashboard/Components/DashboardCephOsdListComponent.ts +63 -0
- package/Utils/Dashboard/Components/DashboardCephPoolListComponent.ts +32 -0
- package/Utils/Dashboard/Components/DashboardCephResourceListShared.ts +61 -0
- package/Utils/Dashboard/Components/DashboardDockerSwarmNodeListComponent.ts +70 -0
- package/Utils/Dashboard/Components/DashboardDockerSwarmResourceListShared.ts +61 -0
- package/Utils/Dashboard/Components/DashboardDockerSwarmServiceListComponent.ts +71 -0
- package/Utils/Dashboard/Components/DashboardPodmanContainerListComponent.ts +100 -0
- package/Utils/Dashboard/Components/DashboardPodmanHostListComponent.ts +88 -0
- package/Utils/Dashboard/Components/DashboardPodmanImageListComponent.ts +97 -0
- package/Utils/Dashboard/Components/DashboardPodmanNetworkListComponent.ts +87 -0
- package/Utils/Dashboard/Components/DashboardPodmanVolumeListComponent.ts +87 -0
- package/Utils/Dashboard/Components/DashboardProxmoxGuestListComponent.ts +69 -0
- package/Utils/Dashboard/Components/DashboardProxmoxNodeListComponent.ts +55 -0
- package/Utils/Dashboard/Components/DashboardProxmoxResourceListShared.ts +61 -0
- package/Utils/Dashboard/Components/Index.ts +79 -0
- package/Utils/Telemetry/EntityKey.ts +53 -0
- package/Utils/Telemetry/EntityRelationship.ts +6 -0
- package/Utils/Telemetry/HeartbeatAvailability.ts +262 -0
- package/build/dist/Models/DatabaseModels/Alert.js +270 -0
- package/build/dist/Models/DatabaseModels/Alert.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertLabelRule.js +39 -0
- package/build/dist/Models/DatabaseModels/AlertLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertOwnerRule.js +39 -0
- package/build/dist/Models/DatabaseModels/AlertOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/CephCluster.js +992 -0
- package/build/dist/Models/DatabaseModels/CephCluster.js.map +1 -0
- package/build/dist/Models/DatabaseModels/CephClusterLabelRule.js +522 -0
- package/build/dist/Models/DatabaseModels/CephClusterLabelRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/CephClusterOwnerRule.js +603 -0
- package/build/dist/Models/DatabaseModels/CephClusterOwnerRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/CephClusterOwnerTeam.js +503 -0
- package/build/dist/Models/DatabaseModels/CephClusterOwnerTeam.js.map +1 -0
- package/build/dist/Models/DatabaseModels/CephClusterOwnerUser.js +502 -0
- package/build/dist/Models/DatabaseModels/CephClusterOwnerUser.js.map +1 -0
- package/build/dist/Models/DatabaseModels/CephResource.js +846 -0
- package/build/dist/Models/DatabaseModels/CephResource.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmCluster.js +1018 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmCluster.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterLabelRule.js +522 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterLabelRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterOwnerRule.js +603 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterOwnerRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterOwnerTeam.js +503 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterOwnerTeam.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterOwnerUser.js +502 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterOwnerUser.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmResource.js +787 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmResource.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Host.js +63 -0
- package/build/dist/Models/DatabaseModels/Host.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Incident.js +270 -0
- package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentLabelRule.js +39 -0
- package/build/dist/Models/DatabaseModels/IncidentLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentOwnerRule.js +39 -0
- package/build/dist/Models/DatabaseModels/IncidentOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentTemplate.js +54 -0
- package/build/dist/Models/DatabaseModels/IncidentTemplate.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +48 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/PodmanHost.js +885 -0
- package/build/dist/Models/DatabaseModels/PodmanHost.js.map +1 -0
- package/build/dist/Models/DatabaseModels/PodmanHostLabelRule.js +522 -0
- package/build/dist/Models/DatabaseModels/PodmanHostLabelRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/PodmanHostOwnerRule.js +603 -0
- package/build/dist/Models/DatabaseModels/PodmanHostOwnerRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/PodmanHostOwnerTeam.js +503 -0
- package/build/dist/Models/DatabaseModels/PodmanHostOwnerTeam.js.map +1 -0
- package/build/dist/Models/DatabaseModels/PodmanHostOwnerUser.js +502 -0
- package/build/dist/Models/DatabaseModels/PodmanHostOwnerUser.js.map +1 -0
- package/build/dist/Models/DatabaseModels/PodmanResource.js +526 -0
- package/build/dist/Models/DatabaseModels/PodmanResource.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ProxmoxCluster.js +967 -0
- package/build/dist/Models/DatabaseModels/ProxmoxCluster.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterLabelRule.js +522 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterLabelRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerRule.js +603 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerTeam.js +503 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerTeam.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerUser.js +502 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterOwnerUser.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ProxmoxResource.js +761 -0
- package/build/dist/Models/DatabaseModels/ProxmoxResource.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js +216 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js +39 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.js +39 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceTemplate.js +54 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceTemplate.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TelemetryException.js +2 -0
- package/build/dist/Models/DatabaseModels/TelemetryException.js.map +1 -1
- package/build/dist/Server/API/BillingInvoiceAPI.js +35 -5
- package/build/dist/Server/API/BillingInvoiceAPI.js.map +1 -1
- package/build/dist/Server/API/CephResourceAPI.js +98 -0
- package/build/dist/Server/API/CephResourceAPI.js.map +1 -0
- package/build/dist/Server/API/DashboardAPI.js +135 -0
- package/build/dist/Server/API/DashboardAPI.js.map +1 -1
- package/build/dist/Server/API/DockerSwarmResourceAPI.js +100 -0
- package/build/dist/Server/API/DockerSwarmResourceAPI.js.map +1 -0
- package/build/dist/Server/API/ProjectAPI.js +11 -0
- package/build/dist/Server/API/ProjectAPI.js.map +1 -1
- package/build/dist/Server/API/ProxmoxResourceAPI.js +95 -0
- package/build/dist/Server/API/ProxmoxResourceAPI.js.map +1 -0
- package/build/dist/Server/API/ResellerPlanAPI.js +17 -3
- package/build/dist/Server/API/ResellerPlanAPI.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +8 -1
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/GlobalCache.js +7 -2
- package/build/dist/Server/Infrastructure/GlobalCache.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781500000000-AddProxmoxAndCephClusterTables.js +76 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781500000000-AddProxmoxAndCephClusterTables.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781587937032-MigrationName.js +1100 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781587937032-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781600000000-AddProxmoxCephV2Columns.js +108 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781600000000-AddProxmoxCephV2Columns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781600000001-AddProxmoxCephActivityAndRules.js +253 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781600000001-AddProxmoxCephActivityAndRules.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781700000000-AddProxmoxCephV3Columns.js +43 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1781700000000-AddProxmoxCephV3Columns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +10 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Infrastructure/Redis.js +31 -8
- package/build/dist/Server/Infrastructure/Redis.js.map +1 -1
- package/build/dist/Server/Services/AlertLabelRuleEngineService.js +30 -4
- package/build/dist/Server/Services/AlertLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertOwnerRuleEngineService.js +62 -5
- package/build/dist/Server/Services/AlertOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AnalyticsDatabaseService.js +1 -1
- package/build/dist/Server/Services/AnalyticsDatabaseService.js.map +1 -1
- package/build/dist/Server/Services/BillingService.js +85 -23
- package/build/dist/Server/Services/BillingService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js +166 -0
- package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/CephClusterLabelRuleService.js +13 -0
- package/build/dist/Server/Services/CephClusterLabelRuleService.js.map +1 -0
- package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js +186 -0
- package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/CephClusterOwnerRuleService.js +13 -0
- package/build/dist/Server/Services/CephClusterOwnerRuleService.js.map +1 -0
- package/build/dist/Server/Services/CephClusterOwnerTeamService.js +9 -0
- package/build/dist/Server/Services/CephClusterOwnerTeamService.js.map +1 -0
- package/build/dist/Server/Services/CephClusterOwnerUserService.js +9 -0
- package/build/dist/Server/Services/CephClusterOwnerUserService.js.map +1 -0
- package/build/dist/Server/Services/CephClusterService.js +353 -0
- package/build/dist/Server/Services/CephClusterService.js.map +1 -0
- package/build/dist/Server/Services/CephResourceService.js +257 -0
- package/build/dist/Server/Services/CephResourceService.js.map +1 -0
- package/build/dist/Server/Services/CloudResourceService.js +10 -2
- package/build/dist/Server/Services/CloudResourceService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostService.js +10 -2
- package/build/dist/Server/Services/DockerHostService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js +168 -0
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleService.js +13 -0
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleService.js.map +1 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js +188 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleService.js +13 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleService.js.map +1 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerTeamService.js +9 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerTeamService.js.map +1 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerUserService.js +9 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerUserService.js.map +1 -0
- package/build/dist/Server/Services/DockerSwarmClusterService.js +353 -0
- package/build/dist/Server/Services/DockerSwarmClusterService.js.map +1 -0
- package/build/dist/Server/Services/DockerSwarmResourceService.js +258 -0
- package/build/dist/Server/Services/DockerSwarmResourceService.js.map +1 -0
- package/build/dist/Server/Services/ExceptionAggregationService.js +3 -0
- package/build/dist/Server/Services/ExceptionAggregationService.js.map +1 -1
- package/build/dist/Server/Services/HostService.js +10 -2
- package/build/dist/Server/Services/HostService.js.map +1 -1
- package/build/dist/Server/Services/IncidentLabelRuleEngineService.js +28 -4
- package/build/dist/Server/Services/IncidentLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentOwnerRuleEngineService.js +62 -5
- package/build/dist/Server/Services/IncidentOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +8 -0
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +38 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterService.js +10 -2
- package/build/dist/Server/Services/KubernetesClusterService.js.map +1 -1
- package/build/dist/Server/Services/LogAggregationService.js +3 -0
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MetricAggregationService.js +3 -0
- package/build/dist/Server/Services/MetricAggregationService.js.map +1 -1
- package/build/dist/Server/Services/OpenTelemetryIngestService.js +69 -9
- package/build/dist/Server/Services/OpenTelemetryIngestService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js +166 -0
- package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/PodmanHostLabelRuleService.js +13 -0
- package/build/dist/Server/Services/PodmanHostLabelRuleService.js.map +1 -0
- package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js +186 -0
- package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/PodmanHostOwnerRuleService.js +13 -0
- package/build/dist/Server/Services/PodmanHostOwnerRuleService.js.map +1 -0
- package/build/dist/Server/Services/PodmanHostOwnerTeamService.js +9 -0
- package/build/dist/Server/Services/PodmanHostOwnerTeamService.js.map +1 -0
- package/build/dist/Server/Services/PodmanHostOwnerUserService.js +9 -0
- package/build/dist/Server/Services/PodmanHostOwnerUserService.js.map +1 -0
- package/build/dist/Server/Services/PodmanHostService.js +319 -0
- package/build/dist/Server/Services/PodmanHostService.js.map +1 -0
- package/build/dist/Server/Services/PodmanResourceService.js +196 -0
- package/build/dist/Server/Services/PodmanResourceService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js +166 -0
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleService.js +13 -0
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js +186 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleService.js +13 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerTeamService.js +9 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerTeamService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerUserService.js +9 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerUserService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxClusterService.js +337 -0
- package/build/dist/Server/Services/ProxmoxClusterService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxResourceService.js +285 -0
- package/build/dist/Server/Services/ProxmoxResourceService.js.map +1 -0
- package/build/dist/Server/Services/RumApplicationService.js +10 -2
- package/build/dist/Server/Services/RumApplicationService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceLabelRuleEngineService.js +30 -4
- package/build/dist/Server/Services/ScheduledMaintenanceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.js +62 -5
- package/build/dist/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServerlessFunctionService.js +10 -2
- package/build/dist/Server/Services/ServerlessFunctionService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryUsageBillingService.js +43 -3
- package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
- package/build/dist/Server/Services/TraceAggregationService.js +3 -0
- package/build/dist/Server/Services/TraceAggregationService.js.map +1 -1
- package/build/dist/Server/Types/AnalyticsDatabase/AggregateBy.js +8 -25
- package/build/dist/Server/Types/AnalyticsDatabase/AggregateBy.js.map +1 -1
- package/build/dist/Server/Types/Database/Permissions/OwnerTableRegistry.js +13 -0
- package/build/dist/Server/Types/Database/Permissions/OwnerTableRegistry.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js +44 -0
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorClusterContext.js +118 -0
- package/build/dist/Server/Utils/Monitor/MonitorClusterContext.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +422 -4
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +137 -8
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorMaintenanceSuppression.js +32 -6
- package/build/dist/Server/Utils/Monitor/MonitorMaintenanceSuppression.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js +6 -1
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/SeriesResourceLabels.js +39 -0
- package/build/dist/Server/Utils/Monitor/SeriesResourceLabels.js.map +1 -1
- package/build/dist/Server/Utils/Profiling.js +24 -3
- package/build/dist/Server/Utils/Profiling.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/EntityRegistry.js +4 -0
- package/build/dist/Server/Utils/Telemetry/EntityRegistry.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.js +854 -0
- package/build/dist/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/ResourceFacetResolver.js +30 -0
- package/build/dist/Server/Utils/Telemetry/ResourceFacetResolver.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/Telemetry.js +6 -0
- package/build/dist/Server/Utils/Telemetry/Telemetry.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js +80 -0
- package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry.js +8 -10
- package/build/dist/Server/Utils/Telemetry.js.map +1 -1
- package/build/dist/Types/BaseDatabase/AggregationIntervalUtil.js +69 -0
- package/build/dist/Types/BaseDatabase/AggregationIntervalUtil.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponentType.js +11 -0
- package/build/dist/Types/Dashboard/DashboardComponentType.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js +4 -0
- package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardCephOsdListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardCephOsdListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardCephPoolListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardCephPoolListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerSwarmNodeListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerSwarmNodeListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerSwarmServiceListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerSwarmServiceListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardPodmanContainerListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardPodmanContainerListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardPodmanHostListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardPodmanHostListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardPodmanImageListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardPodmanImageListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardPodmanNetworkListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardPodmanNetworkListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardPodmanVolumeListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardPodmanVolumeListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardProxmoxGuestListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardProxmoxGuestListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardProxmoxNodeListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardProxmoxNodeListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardTemplates.js +562 -0
- package/build/dist/Types/Dashboard/DashboardTemplates.js.map +1 -1
- package/build/dist/Types/DockerSwarm/DockerSwarmInventoryExtractor.js +359 -0
- package/build/dist/Types/DockerSwarm/DockerSwarmInventoryExtractor.js.map +1 -0
- package/build/dist/Types/Icon/IconProp.js +3 -0
- package/build/dist/Types/Icon/IconProp.js.map +1 -1
- package/build/dist/Types/Monitor/CephAlertTemplates.js +1379 -0
- package/build/dist/Types/Monitor/CephAlertTemplates.js.map +1 -0
- package/build/dist/Types/Monitor/CephMetricCatalog.js +353 -0
- package/build/dist/Types/Monitor/CephMetricCatalog.js.map +1 -0
- package/build/dist/Types/Monitor/DockerSwarmAlertTemplates.js +358 -0
- package/build/dist/Types/Monitor/DockerSwarmAlertTemplates.js.map +1 -0
- package/build/dist/Types/Monitor/DockerSwarmMetricCatalog.js +103 -0
- package/build/dist/Types/Monitor/DockerSwarmMetricCatalog.js.map +1 -0
- package/build/dist/Types/Monitor/HostAlertTemplates.js +365 -0
- package/build/dist/Types/Monitor/HostAlertTemplates.js.map +1 -0
- package/build/dist/Types/Monitor/HostMetricCatalog.js +138 -0
- package/build/dist/Types/Monitor/HostMetricCatalog.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorStep.js +115 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepCephMonitor.js +34 -0
- package/build/dist/Types/Monitor/MonitorStepCephMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorStepDockerSwarmMonitor.js +21 -0
- package/build/dist/Types/Monitor/MonitorStepDockerSwarmMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorStepHostMonitor.js +20 -0
- package/build/dist/Types/Monitor/MonitorStepHostMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorStepPodmanMonitor.js +21 -0
- package/build/dist/Types/Monitor/MonitorStepPodmanMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorStepProxmoxMonitor.js +36 -0
- package/build/dist/Types/Monitor/MonitorStepProxmoxMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorType.js +66 -1
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- package/build/dist/Types/Monitor/PodmanAlertTemplates.js +410 -0
- package/build/dist/Types/Monitor/PodmanAlertTemplates.js.map +1 -0
- package/build/dist/Types/Monitor/PodmanMetricCatalog.js +192 -0
- package/build/dist/Types/Monitor/PodmanMetricCatalog.js.map +1 -0
- package/build/dist/Types/Monitor/ProxmoxAlertTemplates.js +743 -0
- package/build/dist/Types/Monitor/ProxmoxAlertTemplates.js.map +1 -0
- package/build/dist/Types/Monitor/ProxmoxMetricCatalog.js +320 -0
- package/build/dist/Types/Monitor/ProxmoxMetricCatalog.js.map +1 -0
- package/build/dist/Types/Permission.js +824 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/Podman/PodmanInventoryExtractor.js +293 -0
- package/build/dist/Types/Podman/PodmanInventoryExtractor.js.map +1 -0
- package/build/dist/Types/Telemetry/EntityType.js +23 -0
- package/build/dist/Types/Telemetry/EntityType.js.map +1 -1
- package/build/dist/Types/Telemetry/ServiceType.js +4 -0
- package/build/dist/Types/Telemetry/ServiceType.js.map +1 -1
- package/build/dist/UI/Components/Icon/Icon.js +49 -0
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js +30 -2
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsFacetSidebar.js +22 -0
- package/build/dist/UI/Components/LogsViewer/components/LogsFacetSidebar.js.map +1 -1
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js +11 -1
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js.map +1 -1
- package/build/dist/UI/Utils/Telemetry/Telemetry.js +11 -10
- package/build/dist/UI/Utils/Telemetry/Telemetry.js.map +1 -1
- package/build/dist/UI/Utils/TelemetryService.js +6 -2
- package/build/dist/UI/Utils/TelemetryService.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/DashboardCephOsdListComponent.js +50 -0
- package/build/dist/Utils/Dashboard/Components/DashboardCephOsdListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardCephPoolListComponent.js +27 -0
- package/build/dist/Utils/Dashboard/Components/DashboardCephPoolListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardCephResourceListShared.js +46 -0
- package/build/dist/Utils/Dashboard/Components/DashboardCephResourceListShared.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerSwarmNodeListComponent.js +55 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerSwarmNodeListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerSwarmResourceListShared.js +46 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerSwarmResourceListShared.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerSwarmServiceListComponent.js +55 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerSwarmServiceListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardPodmanContainerListComponent.js +77 -0
- package/build/dist/Utils/Dashboard/Components/DashboardPodmanContainerListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardPodmanHostListComponent.js +71 -0
- package/build/dist/Utils/Dashboard/Components/DashboardPodmanHostListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardPodmanImageListComponent.js +77 -0
- package/build/dist/Utils/Dashboard/Components/DashboardPodmanImageListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardPodmanNetworkListComponent.js +68 -0
- package/build/dist/Utils/Dashboard/Components/DashboardPodmanNetworkListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardPodmanVolumeListComponent.js +68 -0
- package/build/dist/Utils/Dashboard/Components/DashboardPodmanVolumeListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardProxmoxGuestListComponent.js +55 -0
- package/build/dist/Utils/Dashboard/Components/DashboardProxmoxGuestListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardProxmoxNodeListComponent.js +42 -0
- package/build/dist/Utils/Dashboard/Components/DashboardProxmoxNodeListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardProxmoxResourceListShared.js +46 -0
- package/build/dist/Utils/Dashboard/Components/DashboardProxmoxResourceListShared.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/Index.js +44 -0
- package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
- package/build/dist/Utils/Telemetry/EntityKey.js +41 -0
- package/build/dist/Utils/Telemetry/EntityKey.js.map +1 -1
- package/build/dist/Utils/Telemetry/EntityRelationship.js +3 -0
- package/build/dist/Utils/Telemetry/EntityRelationship.js.map +1 -1
- package/build/dist/Utils/Telemetry/HeartbeatAvailability.js +174 -0
- package/build/dist/Utils/Telemetry/HeartbeatAvailability.js.map +1 -0
- package/package.json +29 -21
|
@@ -0,0 +1,590 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Proxmox + Ceph V2 (Internal/Roadmap/ProxmoxCephProductsV2.md):
|
|
5
|
+
*
|
|
6
|
+
* 1. WI-11 activity wiring — proxmoxClusters / cephClusters ManyToMany
|
|
7
|
+
* join tables on Alert, Incident and ScheduledMaintenance (cloned
|
|
8
|
+
* from the AlertKubernetesCluster / IncidentDockerHost shape in
|
|
9
|
+
* 1779302536475-AttachKubernetesAndDockerToIncidentAndAlert).
|
|
10
|
+
*
|
|
11
|
+
* 2. WI-12 owner/label rule engines — ProxmoxClusterOwnerRule,
|
|
12
|
+
* ProxmoxClusterLabelRule, CephClusterOwnerRule, CephClusterLabelRule
|
|
13
|
+
* plus their matcher/action join tables (cloned from the
|
|
14
|
+
* KubernetesCluster rule tables in 1778784396629), and the owner join
|
|
15
|
+
* models ProxmoxClusterOwnerUser/OwnerTeam, CephClusterOwnerUser/
|
|
16
|
+
* OwnerTeam (cloned from KubernetesClusterOwnerUser/OwnerTeam in
|
|
17
|
+
* 1776504277320).
|
|
18
|
+
*
|
|
19
|
+
* Columns/indexes/FKs are derived from the model decorators in
|
|
20
|
+
* Common/Models/DatabaseModels/.
|
|
21
|
+
*/
|
|
22
|
+
export class AddProxmoxCephActivityAndRules1781600000001
|
|
23
|
+
implements MigrationInterface
|
|
24
|
+
{
|
|
25
|
+
public name = "AddProxmoxCephActivityAndRules1781600000001";
|
|
26
|
+
|
|
27
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
28
|
+
/*
|
|
29
|
+
* ------------------------------------------------------------------
|
|
30
|
+
* WI-11: activity ManyToMany join tables.
|
|
31
|
+
* ------------------------------------------------------------------
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
// AlertProxmoxCluster
|
|
35
|
+
await queryRunner.query(
|
|
36
|
+
`CREATE TABLE "AlertProxmoxCluster" ("alertId" uuid NOT NULL, "proxmoxClusterId" uuid NOT NULL, CONSTRAINT "PK_alert_proxmox_cluster" PRIMARY KEY ("alertId", "proxmoxClusterId"))`,
|
|
37
|
+
);
|
|
38
|
+
await queryRunner.query(
|
|
39
|
+
`CREATE INDEX "IDX_alert_proxmox_cluster_alertId" ON "AlertProxmoxCluster" ("alertId")`,
|
|
40
|
+
);
|
|
41
|
+
await queryRunner.query(
|
|
42
|
+
`CREATE INDEX "IDX_alert_proxmox_cluster_proxmoxClusterId" ON "AlertProxmoxCluster" ("proxmoxClusterId")`,
|
|
43
|
+
);
|
|
44
|
+
await queryRunner.query(
|
|
45
|
+
`ALTER TABLE "AlertProxmoxCluster" ADD CONSTRAINT "FK_alert_proxmox_cluster_alertId" FOREIGN KEY ("alertId") REFERENCES "Alert"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
46
|
+
);
|
|
47
|
+
await queryRunner.query(
|
|
48
|
+
`ALTER TABLE "AlertProxmoxCluster" ADD CONSTRAINT "FK_alert_proxmox_cluster_proxmoxClusterId" FOREIGN KEY ("proxmoxClusterId") REFERENCES "ProxmoxCluster"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
// AlertCephCluster
|
|
52
|
+
await queryRunner.query(
|
|
53
|
+
`CREATE TABLE "AlertCephCluster" ("alertId" uuid NOT NULL, "cephClusterId" uuid NOT NULL, CONSTRAINT "PK_alert_ceph_cluster" PRIMARY KEY ("alertId", "cephClusterId"))`,
|
|
54
|
+
);
|
|
55
|
+
await queryRunner.query(
|
|
56
|
+
`CREATE INDEX "IDX_alert_ceph_cluster_alertId" ON "AlertCephCluster" ("alertId")`,
|
|
57
|
+
);
|
|
58
|
+
await queryRunner.query(
|
|
59
|
+
`CREATE INDEX "IDX_alert_ceph_cluster_cephClusterId" ON "AlertCephCluster" ("cephClusterId")`,
|
|
60
|
+
);
|
|
61
|
+
await queryRunner.query(
|
|
62
|
+
`ALTER TABLE "AlertCephCluster" ADD CONSTRAINT "FK_alert_ceph_cluster_alertId" FOREIGN KEY ("alertId") REFERENCES "Alert"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
63
|
+
);
|
|
64
|
+
await queryRunner.query(
|
|
65
|
+
`ALTER TABLE "AlertCephCluster" ADD CONSTRAINT "FK_alert_ceph_cluster_cephClusterId" FOREIGN KEY ("cephClusterId") REFERENCES "CephCluster"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
// IncidentProxmoxCluster
|
|
69
|
+
await queryRunner.query(
|
|
70
|
+
`CREATE TABLE "IncidentProxmoxCluster" ("incidentId" uuid NOT NULL, "proxmoxClusterId" uuid NOT NULL, CONSTRAINT "PK_incident_proxmox_cluster" PRIMARY KEY ("incidentId", "proxmoxClusterId"))`,
|
|
71
|
+
);
|
|
72
|
+
await queryRunner.query(
|
|
73
|
+
`CREATE INDEX "IDX_incident_proxmox_cluster_incidentId" ON "IncidentProxmoxCluster" ("incidentId")`,
|
|
74
|
+
);
|
|
75
|
+
await queryRunner.query(
|
|
76
|
+
`CREATE INDEX "IDX_incident_proxmox_cluster_proxmoxClusterId" ON "IncidentProxmoxCluster" ("proxmoxClusterId")`,
|
|
77
|
+
);
|
|
78
|
+
await queryRunner.query(
|
|
79
|
+
`ALTER TABLE "IncidentProxmoxCluster" ADD CONSTRAINT "FK_incident_proxmox_cluster_incidentId" FOREIGN KEY ("incidentId") REFERENCES "Incident"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
80
|
+
);
|
|
81
|
+
await queryRunner.query(
|
|
82
|
+
`ALTER TABLE "IncidentProxmoxCluster" ADD CONSTRAINT "FK_incident_proxmox_cluster_proxmoxClusterId" FOREIGN KEY ("proxmoxClusterId") REFERENCES "ProxmoxCluster"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
// IncidentCephCluster
|
|
86
|
+
await queryRunner.query(
|
|
87
|
+
`CREATE TABLE "IncidentCephCluster" ("incidentId" uuid NOT NULL, "cephClusterId" uuid NOT NULL, CONSTRAINT "PK_incident_ceph_cluster" PRIMARY KEY ("incidentId", "cephClusterId"))`,
|
|
88
|
+
);
|
|
89
|
+
await queryRunner.query(
|
|
90
|
+
`CREATE INDEX "IDX_incident_ceph_cluster_incidentId" ON "IncidentCephCluster" ("incidentId")`,
|
|
91
|
+
);
|
|
92
|
+
await queryRunner.query(
|
|
93
|
+
`CREATE INDEX "IDX_incident_ceph_cluster_cephClusterId" ON "IncidentCephCluster" ("cephClusterId")`,
|
|
94
|
+
);
|
|
95
|
+
await queryRunner.query(
|
|
96
|
+
`ALTER TABLE "IncidentCephCluster" ADD CONSTRAINT "FK_incident_ceph_cluster_incidentId" FOREIGN KEY ("incidentId") REFERENCES "Incident"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
97
|
+
);
|
|
98
|
+
await queryRunner.query(
|
|
99
|
+
`ALTER TABLE "IncidentCephCluster" ADD CONSTRAINT "FK_incident_ceph_cluster_cephClusterId" FOREIGN KEY ("cephClusterId") REFERENCES "CephCluster"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
// ScheduledMaintenanceProxmoxCluster
|
|
103
|
+
await queryRunner.query(
|
|
104
|
+
`CREATE TABLE "ScheduledMaintenanceProxmoxCluster" ("scheduledMaintenanceId" uuid NOT NULL, "proxmoxClusterId" uuid NOT NULL, CONSTRAINT "PK_sm_proxmox_cluster" PRIMARY KEY ("scheduledMaintenanceId", "proxmoxClusterId"))`,
|
|
105
|
+
);
|
|
106
|
+
await queryRunner.query(
|
|
107
|
+
`CREATE INDEX "IDX_sm_proxmox_cluster_scheduledMaintenanceId" ON "ScheduledMaintenanceProxmoxCluster" ("scheduledMaintenanceId")`,
|
|
108
|
+
);
|
|
109
|
+
await queryRunner.query(
|
|
110
|
+
`CREATE INDEX "IDX_sm_proxmox_cluster_proxmoxClusterId" ON "ScheduledMaintenanceProxmoxCluster" ("proxmoxClusterId")`,
|
|
111
|
+
);
|
|
112
|
+
await queryRunner.query(
|
|
113
|
+
`ALTER TABLE "ScheduledMaintenanceProxmoxCluster" ADD CONSTRAINT "FK_sm_proxmox_cluster_scheduledMaintenanceId" FOREIGN KEY ("scheduledMaintenanceId") REFERENCES "ScheduledMaintenance"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
114
|
+
);
|
|
115
|
+
await queryRunner.query(
|
|
116
|
+
`ALTER TABLE "ScheduledMaintenanceProxmoxCluster" ADD CONSTRAINT "FK_sm_proxmox_cluster_proxmoxClusterId" FOREIGN KEY ("proxmoxClusterId") REFERENCES "ProxmoxCluster"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
// ScheduledMaintenanceCephCluster
|
|
120
|
+
await queryRunner.query(
|
|
121
|
+
`CREATE TABLE "ScheduledMaintenanceCephCluster" ("scheduledMaintenanceId" uuid NOT NULL, "cephClusterId" uuid NOT NULL, CONSTRAINT "PK_sm_ceph_cluster" PRIMARY KEY ("scheduledMaintenanceId", "cephClusterId"))`,
|
|
122
|
+
);
|
|
123
|
+
await queryRunner.query(
|
|
124
|
+
`CREATE INDEX "IDX_sm_ceph_cluster_scheduledMaintenanceId" ON "ScheduledMaintenanceCephCluster" ("scheduledMaintenanceId")`,
|
|
125
|
+
);
|
|
126
|
+
await queryRunner.query(
|
|
127
|
+
`CREATE INDEX "IDX_sm_ceph_cluster_cephClusterId" ON "ScheduledMaintenanceCephCluster" ("cephClusterId")`,
|
|
128
|
+
);
|
|
129
|
+
await queryRunner.query(
|
|
130
|
+
`ALTER TABLE "ScheduledMaintenanceCephCluster" ADD CONSTRAINT "FK_sm_ceph_cluster_scheduledMaintenanceId" FOREIGN KEY ("scheduledMaintenanceId") REFERENCES "ScheduledMaintenance"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
131
|
+
);
|
|
132
|
+
await queryRunner.query(
|
|
133
|
+
`ALTER TABLE "ScheduledMaintenanceCephCluster" ADD CONSTRAINT "FK_sm_ceph_cluster_cephClusterId" FOREIGN KEY ("cephClusterId") REFERENCES "CephCluster"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
/*
|
|
137
|
+
* ------------------------------------------------------------------
|
|
138
|
+
* WI-12: rule tables.
|
|
139
|
+
* ------------------------------------------------------------------
|
|
140
|
+
*/
|
|
141
|
+
|
|
142
|
+
// ProxmoxClusterOwnerRule
|
|
143
|
+
await queryRunner.query(
|
|
144
|
+
`CREATE TABLE "ProxmoxClusterOwnerRule" ("_id" uuid NOT NULL DEFAULT uuid_generate_v4(), "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deletedAt" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL, "projectId" uuid NOT NULL, "name" character varying(100) NOT NULL, "description" character varying(500), "isEnabled" boolean NOT NULL DEFAULT true, "notifyOwners" boolean NOT NULL DEFAULT true, "proxmoxClusterNamePattern" character varying(500), "proxmoxClusterDescriptionPattern" character varying(500), "createdByUserId" uuid, "deletedByUserId" uuid, CONSTRAINT "PK_proxmox_cluster_owner_rule" PRIMARY KEY ("_id"))`,
|
|
145
|
+
);
|
|
146
|
+
await queryRunner.query(
|
|
147
|
+
`CREATE INDEX "IDX_proxmox_cluster_owner_rule_projectId" ON "ProxmoxClusterOwnerRule" ("projectId")`,
|
|
148
|
+
);
|
|
149
|
+
await queryRunner.query(
|
|
150
|
+
`CREATE INDEX "IDX_proxmox_cluster_owner_rule_name" ON "ProxmoxClusterOwnerRule" ("name")`,
|
|
151
|
+
);
|
|
152
|
+
await queryRunner.query(
|
|
153
|
+
`CREATE INDEX "IDX_proxmox_cluster_owner_rule_isEnabled" ON "ProxmoxClusterOwnerRule" ("isEnabled")`,
|
|
154
|
+
);
|
|
155
|
+
await queryRunner.query(
|
|
156
|
+
`ALTER TABLE "ProxmoxClusterOwnerRule" ADD CONSTRAINT "FK_proxmox_cluster_owner_rule_projectId" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
157
|
+
);
|
|
158
|
+
await queryRunner.query(
|
|
159
|
+
`ALTER TABLE "ProxmoxClusterOwnerRule" ADD CONSTRAINT "FK_proxmox_cluster_owner_rule_createdByUserId" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
160
|
+
);
|
|
161
|
+
await queryRunner.query(
|
|
162
|
+
`ALTER TABLE "ProxmoxClusterOwnerRule" ADD CONSTRAINT "FK_proxmox_cluster_owner_rule_deletedByUserId" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
163
|
+
);
|
|
164
|
+
|
|
165
|
+
// ProxmoxClusterLabelRule
|
|
166
|
+
await queryRunner.query(
|
|
167
|
+
`CREATE TABLE "ProxmoxClusterLabelRule" ("_id" uuid NOT NULL DEFAULT uuid_generate_v4(), "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deletedAt" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL, "projectId" uuid NOT NULL, "name" character varying(100) NOT NULL, "description" character varying(500), "isEnabled" boolean NOT NULL DEFAULT true, "proxmoxClusterNamePattern" character varying(500), "proxmoxClusterDescriptionPattern" character varying(500), "createdByUserId" uuid, "deletedByUserId" uuid, CONSTRAINT "PK_proxmox_cluster_label_rule" PRIMARY KEY ("_id"))`,
|
|
168
|
+
);
|
|
169
|
+
await queryRunner.query(
|
|
170
|
+
`CREATE INDEX "IDX_proxmox_cluster_label_rule_projectId" ON "ProxmoxClusterLabelRule" ("projectId")`,
|
|
171
|
+
);
|
|
172
|
+
await queryRunner.query(
|
|
173
|
+
`CREATE INDEX "IDX_proxmox_cluster_label_rule_name" ON "ProxmoxClusterLabelRule" ("name")`,
|
|
174
|
+
);
|
|
175
|
+
await queryRunner.query(
|
|
176
|
+
`CREATE INDEX "IDX_proxmox_cluster_label_rule_isEnabled" ON "ProxmoxClusterLabelRule" ("isEnabled")`,
|
|
177
|
+
);
|
|
178
|
+
await queryRunner.query(
|
|
179
|
+
`ALTER TABLE "ProxmoxClusterLabelRule" ADD CONSTRAINT "FK_proxmox_cluster_label_rule_projectId" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
180
|
+
);
|
|
181
|
+
await queryRunner.query(
|
|
182
|
+
`ALTER TABLE "ProxmoxClusterLabelRule" ADD CONSTRAINT "FK_proxmox_cluster_label_rule_createdByUserId" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
183
|
+
);
|
|
184
|
+
await queryRunner.query(
|
|
185
|
+
`ALTER TABLE "ProxmoxClusterLabelRule" ADD CONSTRAINT "FK_proxmox_cluster_label_rule_deletedByUserId" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
// CephClusterOwnerRule
|
|
189
|
+
await queryRunner.query(
|
|
190
|
+
`CREATE TABLE "CephClusterOwnerRule" ("_id" uuid NOT NULL DEFAULT uuid_generate_v4(), "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deletedAt" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL, "projectId" uuid NOT NULL, "name" character varying(100) NOT NULL, "description" character varying(500), "isEnabled" boolean NOT NULL DEFAULT true, "notifyOwners" boolean NOT NULL DEFAULT true, "cephClusterNamePattern" character varying(500), "cephClusterDescriptionPattern" character varying(500), "createdByUserId" uuid, "deletedByUserId" uuid, CONSTRAINT "PK_ceph_cluster_owner_rule" PRIMARY KEY ("_id"))`,
|
|
191
|
+
);
|
|
192
|
+
await queryRunner.query(
|
|
193
|
+
`CREATE INDEX "IDX_ceph_cluster_owner_rule_projectId" ON "CephClusterOwnerRule" ("projectId")`,
|
|
194
|
+
);
|
|
195
|
+
await queryRunner.query(
|
|
196
|
+
`CREATE INDEX "IDX_ceph_cluster_owner_rule_name" ON "CephClusterOwnerRule" ("name")`,
|
|
197
|
+
);
|
|
198
|
+
await queryRunner.query(
|
|
199
|
+
`CREATE INDEX "IDX_ceph_cluster_owner_rule_isEnabled" ON "CephClusterOwnerRule" ("isEnabled")`,
|
|
200
|
+
);
|
|
201
|
+
await queryRunner.query(
|
|
202
|
+
`ALTER TABLE "CephClusterOwnerRule" ADD CONSTRAINT "FK_ceph_cluster_owner_rule_projectId" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
203
|
+
);
|
|
204
|
+
await queryRunner.query(
|
|
205
|
+
`ALTER TABLE "CephClusterOwnerRule" ADD CONSTRAINT "FK_ceph_cluster_owner_rule_createdByUserId" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
206
|
+
);
|
|
207
|
+
await queryRunner.query(
|
|
208
|
+
`ALTER TABLE "CephClusterOwnerRule" ADD CONSTRAINT "FK_ceph_cluster_owner_rule_deletedByUserId" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
209
|
+
);
|
|
210
|
+
|
|
211
|
+
// CephClusterLabelRule
|
|
212
|
+
await queryRunner.query(
|
|
213
|
+
`CREATE TABLE "CephClusterLabelRule" ("_id" uuid NOT NULL DEFAULT uuid_generate_v4(), "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deletedAt" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL, "projectId" uuid NOT NULL, "name" character varying(100) NOT NULL, "description" character varying(500), "isEnabled" boolean NOT NULL DEFAULT true, "cephClusterNamePattern" character varying(500), "cephClusterDescriptionPattern" character varying(500), "createdByUserId" uuid, "deletedByUserId" uuid, CONSTRAINT "PK_ceph_cluster_label_rule" PRIMARY KEY ("_id"))`,
|
|
214
|
+
);
|
|
215
|
+
await queryRunner.query(
|
|
216
|
+
`CREATE INDEX "IDX_ceph_cluster_label_rule_projectId" ON "CephClusterLabelRule" ("projectId")`,
|
|
217
|
+
);
|
|
218
|
+
await queryRunner.query(
|
|
219
|
+
`CREATE INDEX "IDX_ceph_cluster_label_rule_name" ON "CephClusterLabelRule" ("name")`,
|
|
220
|
+
);
|
|
221
|
+
await queryRunner.query(
|
|
222
|
+
`CREATE INDEX "IDX_ceph_cluster_label_rule_isEnabled" ON "CephClusterLabelRule" ("isEnabled")`,
|
|
223
|
+
);
|
|
224
|
+
await queryRunner.query(
|
|
225
|
+
`ALTER TABLE "CephClusterLabelRule" ADD CONSTRAINT "FK_ceph_cluster_label_rule_projectId" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
226
|
+
);
|
|
227
|
+
await queryRunner.query(
|
|
228
|
+
`ALTER TABLE "CephClusterLabelRule" ADD CONSTRAINT "FK_ceph_cluster_label_rule_createdByUserId" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
229
|
+
);
|
|
230
|
+
await queryRunner.query(
|
|
231
|
+
`ALTER TABLE "CephClusterLabelRule" ADD CONSTRAINT "FK_ceph_cluster_label_rule_deletedByUserId" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
232
|
+
);
|
|
233
|
+
|
|
234
|
+
/*
|
|
235
|
+
* ------------------------------------------------------------------
|
|
236
|
+
* WI-12: rule matcher/action join tables.
|
|
237
|
+
* Abbreviations to stay under Postgres's 63-char identifier limit:
|
|
238
|
+
* pcor = ProxmoxClusterOwnerRule, pclr = ProxmoxClusterLabelRule,
|
|
239
|
+
* ccor = CephClusterOwnerRule, cclr = CephClusterLabelRule.
|
|
240
|
+
* ------------------------------------------------------------------
|
|
241
|
+
*/
|
|
242
|
+
|
|
243
|
+
// ProxmoxClusterOwnerRuleProxmoxClusterLabel (matcher labels)
|
|
244
|
+
await queryRunner.query(
|
|
245
|
+
`CREATE TABLE "ProxmoxClusterOwnerRuleProxmoxClusterLabel" ("proxmoxClusterOwnerRuleId" uuid NOT NULL, "labelId" uuid NOT NULL, CONSTRAINT "PK_pcor_cluster_label" PRIMARY KEY ("proxmoxClusterOwnerRuleId", "labelId"))`,
|
|
246
|
+
);
|
|
247
|
+
await queryRunner.query(
|
|
248
|
+
`CREATE INDEX "IDX_pcor_cluster_label_ruleId" ON "ProxmoxClusterOwnerRuleProxmoxClusterLabel" ("proxmoxClusterOwnerRuleId")`,
|
|
249
|
+
);
|
|
250
|
+
await queryRunner.query(
|
|
251
|
+
`CREATE INDEX "IDX_pcor_cluster_label_labelId" ON "ProxmoxClusterOwnerRuleProxmoxClusterLabel" ("labelId")`,
|
|
252
|
+
);
|
|
253
|
+
await queryRunner.query(
|
|
254
|
+
`ALTER TABLE "ProxmoxClusterOwnerRuleProxmoxClusterLabel" ADD CONSTRAINT "FK_pcor_cluster_label_ruleId" FOREIGN KEY ("proxmoxClusterOwnerRuleId") REFERENCES "ProxmoxClusterOwnerRule"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
255
|
+
);
|
|
256
|
+
await queryRunner.query(
|
|
257
|
+
`ALTER TABLE "ProxmoxClusterOwnerRuleProxmoxClusterLabel" ADD CONSTRAINT "FK_pcor_cluster_label_labelId" FOREIGN KEY ("labelId") REFERENCES "Label"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
258
|
+
);
|
|
259
|
+
|
|
260
|
+
// ProxmoxClusterOwnerRuleOwnerUser
|
|
261
|
+
await queryRunner.query(
|
|
262
|
+
`CREATE TABLE "ProxmoxClusterOwnerRuleOwnerUser" ("proxmoxClusterOwnerRuleId" uuid NOT NULL, "userId" uuid NOT NULL, CONSTRAINT "PK_pcor_owner_user" PRIMARY KEY ("proxmoxClusterOwnerRuleId", "userId"))`,
|
|
263
|
+
);
|
|
264
|
+
await queryRunner.query(
|
|
265
|
+
`CREATE INDEX "IDX_pcor_owner_user_ruleId" ON "ProxmoxClusterOwnerRuleOwnerUser" ("proxmoxClusterOwnerRuleId")`,
|
|
266
|
+
);
|
|
267
|
+
await queryRunner.query(
|
|
268
|
+
`CREATE INDEX "IDX_pcor_owner_user_userId" ON "ProxmoxClusterOwnerRuleOwnerUser" ("userId")`,
|
|
269
|
+
);
|
|
270
|
+
await queryRunner.query(
|
|
271
|
+
`ALTER TABLE "ProxmoxClusterOwnerRuleOwnerUser" ADD CONSTRAINT "FK_pcor_owner_user_ruleId" FOREIGN KEY ("proxmoxClusterOwnerRuleId") REFERENCES "ProxmoxClusterOwnerRule"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
272
|
+
);
|
|
273
|
+
await queryRunner.query(
|
|
274
|
+
`ALTER TABLE "ProxmoxClusterOwnerRuleOwnerUser" ADD CONSTRAINT "FK_pcor_owner_user_userId" FOREIGN KEY ("userId") REFERENCES "User"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
275
|
+
);
|
|
276
|
+
|
|
277
|
+
// ProxmoxClusterOwnerRuleOwnerTeam
|
|
278
|
+
await queryRunner.query(
|
|
279
|
+
`CREATE TABLE "ProxmoxClusterOwnerRuleOwnerTeam" ("proxmoxClusterOwnerRuleId" uuid NOT NULL, "teamId" uuid NOT NULL, CONSTRAINT "PK_pcor_owner_team" PRIMARY KEY ("proxmoxClusterOwnerRuleId", "teamId"))`,
|
|
280
|
+
);
|
|
281
|
+
await queryRunner.query(
|
|
282
|
+
`CREATE INDEX "IDX_pcor_owner_team_ruleId" ON "ProxmoxClusterOwnerRuleOwnerTeam" ("proxmoxClusterOwnerRuleId")`,
|
|
283
|
+
);
|
|
284
|
+
await queryRunner.query(
|
|
285
|
+
`CREATE INDEX "IDX_pcor_owner_team_teamId" ON "ProxmoxClusterOwnerRuleOwnerTeam" ("teamId")`,
|
|
286
|
+
);
|
|
287
|
+
await queryRunner.query(
|
|
288
|
+
`ALTER TABLE "ProxmoxClusterOwnerRuleOwnerTeam" ADD CONSTRAINT "FK_pcor_owner_team_ruleId" FOREIGN KEY ("proxmoxClusterOwnerRuleId") REFERENCES "ProxmoxClusterOwnerRule"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
289
|
+
);
|
|
290
|
+
await queryRunner.query(
|
|
291
|
+
`ALTER TABLE "ProxmoxClusterOwnerRuleOwnerTeam" ADD CONSTRAINT "FK_pcor_owner_team_teamId" FOREIGN KEY ("teamId") REFERENCES "Team"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
292
|
+
);
|
|
293
|
+
|
|
294
|
+
// ProxmoxClusterLabelRuleProxmoxClusterLabel (matcher labels)
|
|
295
|
+
await queryRunner.query(
|
|
296
|
+
`CREATE TABLE "ProxmoxClusterLabelRuleProxmoxClusterLabel" ("proxmoxClusterLabelRuleId" uuid NOT NULL, "labelId" uuid NOT NULL, CONSTRAINT "PK_pclr_cluster_label" PRIMARY KEY ("proxmoxClusterLabelRuleId", "labelId"))`,
|
|
297
|
+
);
|
|
298
|
+
await queryRunner.query(
|
|
299
|
+
`CREATE INDEX "IDX_pclr_cluster_label_ruleId" ON "ProxmoxClusterLabelRuleProxmoxClusterLabel" ("proxmoxClusterLabelRuleId")`,
|
|
300
|
+
);
|
|
301
|
+
await queryRunner.query(
|
|
302
|
+
`CREATE INDEX "IDX_pclr_cluster_label_labelId" ON "ProxmoxClusterLabelRuleProxmoxClusterLabel" ("labelId")`,
|
|
303
|
+
);
|
|
304
|
+
await queryRunner.query(
|
|
305
|
+
`ALTER TABLE "ProxmoxClusterLabelRuleProxmoxClusterLabel" ADD CONSTRAINT "FK_pclr_cluster_label_ruleId" FOREIGN KEY ("proxmoxClusterLabelRuleId") REFERENCES "ProxmoxClusterLabelRule"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
306
|
+
);
|
|
307
|
+
await queryRunner.query(
|
|
308
|
+
`ALTER TABLE "ProxmoxClusterLabelRuleProxmoxClusterLabel" ADD CONSTRAINT "FK_pclr_cluster_label_labelId" FOREIGN KEY ("labelId") REFERENCES "Label"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
309
|
+
);
|
|
310
|
+
|
|
311
|
+
// ProxmoxClusterLabelRuleLabelToAdd (action labels)
|
|
312
|
+
await queryRunner.query(
|
|
313
|
+
`CREATE TABLE "ProxmoxClusterLabelRuleLabelToAdd" ("proxmoxClusterLabelRuleId" uuid NOT NULL, "labelId" uuid NOT NULL, CONSTRAINT "PK_pclr_label_to_add" PRIMARY KEY ("proxmoxClusterLabelRuleId", "labelId"))`,
|
|
314
|
+
);
|
|
315
|
+
await queryRunner.query(
|
|
316
|
+
`CREATE INDEX "IDX_pclr_label_to_add_ruleId" ON "ProxmoxClusterLabelRuleLabelToAdd" ("proxmoxClusterLabelRuleId")`,
|
|
317
|
+
);
|
|
318
|
+
await queryRunner.query(
|
|
319
|
+
`CREATE INDEX "IDX_pclr_label_to_add_labelId" ON "ProxmoxClusterLabelRuleLabelToAdd" ("labelId")`,
|
|
320
|
+
);
|
|
321
|
+
await queryRunner.query(
|
|
322
|
+
`ALTER TABLE "ProxmoxClusterLabelRuleLabelToAdd" ADD CONSTRAINT "FK_pclr_label_to_add_ruleId" FOREIGN KEY ("proxmoxClusterLabelRuleId") REFERENCES "ProxmoxClusterLabelRule"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
323
|
+
);
|
|
324
|
+
await queryRunner.query(
|
|
325
|
+
`ALTER TABLE "ProxmoxClusterLabelRuleLabelToAdd" ADD CONSTRAINT "FK_pclr_label_to_add_labelId" FOREIGN KEY ("labelId") REFERENCES "Label"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
326
|
+
);
|
|
327
|
+
|
|
328
|
+
// CephClusterOwnerRuleCephClusterLabel (matcher labels)
|
|
329
|
+
await queryRunner.query(
|
|
330
|
+
`CREATE TABLE "CephClusterOwnerRuleCephClusterLabel" ("cephClusterOwnerRuleId" uuid NOT NULL, "labelId" uuid NOT NULL, CONSTRAINT "PK_ccor_cluster_label" PRIMARY KEY ("cephClusterOwnerRuleId", "labelId"))`,
|
|
331
|
+
);
|
|
332
|
+
await queryRunner.query(
|
|
333
|
+
`CREATE INDEX "IDX_ccor_cluster_label_ruleId" ON "CephClusterOwnerRuleCephClusterLabel" ("cephClusterOwnerRuleId")`,
|
|
334
|
+
);
|
|
335
|
+
await queryRunner.query(
|
|
336
|
+
`CREATE INDEX "IDX_ccor_cluster_label_labelId" ON "CephClusterOwnerRuleCephClusterLabel" ("labelId")`,
|
|
337
|
+
);
|
|
338
|
+
await queryRunner.query(
|
|
339
|
+
`ALTER TABLE "CephClusterOwnerRuleCephClusterLabel" ADD CONSTRAINT "FK_ccor_cluster_label_ruleId" FOREIGN KEY ("cephClusterOwnerRuleId") REFERENCES "CephClusterOwnerRule"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
340
|
+
);
|
|
341
|
+
await queryRunner.query(
|
|
342
|
+
`ALTER TABLE "CephClusterOwnerRuleCephClusterLabel" ADD CONSTRAINT "FK_ccor_cluster_label_labelId" FOREIGN KEY ("labelId") REFERENCES "Label"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
343
|
+
);
|
|
344
|
+
|
|
345
|
+
// CephClusterOwnerRuleOwnerUser
|
|
346
|
+
await queryRunner.query(
|
|
347
|
+
`CREATE TABLE "CephClusterOwnerRuleOwnerUser" ("cephClusterOwnerRuleId" uuid NOT NULL, "userId" uuid NOT NULL, CONSTRAINT "PK_ccor_owner_user" PRIMARY KEY ("cephClusterOwnerRuleId", "userId"))`,
|
|
348
|
+
);
|
|
349
|
+
await queryRunner.query(
|
|
350
|
+
`CREATE INDEX "IDX_ccor_owner_user_ruleId" ON "CephClusterOwnerRuleOwnerUser" ("cephClusterOwnerRuleId")`,
|
|
351
|
+
);
|
|
352
|
+
await queryRunner.query(
|
|
353
|
+
`CREATE INDEX "IDX_ccor_owner_user_userId" ON "CephClusterOwnerRuleOwnerUser" ("userId")`,
|
|
354
|
+
);
|
|
355
|
+
await queryRunner.query(
|
|
356
|
+
`ALTER TABLE "CephClusterOwnerRuleOwnerUser" ADD CONSTRAINT "FK_ccor_owner_user_ruleId" FOREIGN KEY ("cephClusterOwnerRuleId") REFERENCES "CephClusterOwnerRule"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
357
|
+
);
|
|
358
|
+
await queryRunner.query(
|
|
359
|
+
`ALTER TABLE "CephClusterOwnerRuleOwnerUser" ADD CONSTRAINT "FK_ccor_owner_user_userId" FOREIGN KEY ("userId") REFERENCES "User"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
360
|
+
);
|
|
361
|
+
|
|
362
|
+
// CephClusterOwnerRuleOwnerTeam
|
|
363
|
+
await queryRunner.query(
|
|
364
|
+
`CREATE TABLE "CephClusterOwnerRuleOwnerTeam" ("cephClusterOwnerRuleId" uuid NOT NULL, "teamId" uuid NOT NULL, CONSTRAINT "PK_ccor_owner_team" PRIMARY KEY ("cephClusterOwnerRuleId", "teamId"))`,
|
|
365
|
+
);
|
|
366
|
+
await queryRunner.query(
|
|
367
|
+
`CREATE INDEX "IDX_ccor_owner_team_ruleId" ON "CephClusterOwnerRuleOwnerTeam" ("cephClusterOwnerRuleId")`,
|
|
368
|
+
);
|
|
369
|
+
await queryRunner.query(
|
|
370
|
+
`CREATE INDEX "IDX_ccor_owner_team_teamId" ON "CephClusterOwnerRuleOwnerTeam" ("teamId")`,
|
|
371
|
+
);
|
|
372
|
+
await queryRunner.query(
|
|
373
|
+
`ALTER TABLE "CephClusterOwnerRuleOwnerTeam" ADD CONSTRAINT "FK_ccor_owner_team_ruleId" FOREIGN KEY ("cephClusterOwnerRuleId") REFERENCES "CephClusterOwnerRule"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
374
|
+
);
|
|
375
|
+
await queryRunner.query(
|
|
376
|
+
`ALTER TABLE "CephClusterOwnerRuleOwnerTeam" ADD CONSTRAINT "FK_ccor_owner_team_teamId" FOREIGN KEY ("teamId") REFERENCES "Team"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
377
|
+
);
|
|
378
|
+
|
|
379
|
+
// CephClusterLabelRuleCephClusterLabel (matcher labels)
|
|
380
|
+
await queryRunner.query(
|
|
381
|
+
`CREATE TABLE "CephClusterLabelRuleCephClusterLabel" ("cephClusterLabelRuleId" uuid NOT NULL, "labelId" uuid NOT NULL, CONSTRAINT "PK_cclr_cluster_label" PRIMARY KEY ("cephClusterLabelRuleId", "labelId"))`,
|
|
382
|
+
);
|
|
383
|
+
await queryRunner.query(
|
|
384
|
+
`CREATE INDEX "IDX_cclr_cluster_label_ruleId" ON "CephClusterLabelRuleCephClusterLabel" ("cephClusterLabelRuleId")`,
|
|
385
|
+
);
|
|
386
|
+
await queryRunner.query(
|
|
387
|
+
`CREATE INDEX "IDX_cclr_cluster_label_labelId" ON "CephClusterLabelRuleCephClusterLabel" ("labelId")`,
|
|
388
|
+
);
|
|
389
|
+
await queryRunner.query(
|
|
390
|
+
`ALTER TABLE "CephClusterLabelRuleCephClusterLabel" ADD CONSTRAINT "FK_cclr_cluster_label_ruleId" FOREIGN KEY ("cephClusterLabelRuleId") REFERENCES "CephClusterLabelRule"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
391
|
+
);
|
|
392
|
+
await queryRunner.query(
|
|
393
|
+
`ALTER TABLE "CephClusterLabelRuleCephClusterLabel" ADD CONSTRAINT "FK_cclr_cluster_label_labelId" FOREIGN KEY ("labelId") REFERENCES "Label"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
394
|
+
);
|
|
395
|
+
|
|
396
|
+
// CephClusterLabelRuleLabelToAdd (action labels)
|
|
397
|
+
await queryRunner.query(
|
|
398
|
+
`CREATE TABLE "CephClusterLabelRuleLabelToAdd" ("cephClusterLabelRuleId" uuid NOT NULL, "labelId" uuid NOT NULL, CONSTRAINT "PK_cclr_label_to_add" PRIMARY KEY ("cephClusterLabelRuleId", "labelId"))`,
|
|
399
|
+
);
|
|
400
|
+
await queryRunner.query(
|
|
401
|
+
`CREATE INDEX "IDX_cclr_label_to_add_ruleId" ON "CephClusterLabelRuleLabelToAdd" ("cephClusterLabelRuleId")`,
|
|
402
|
+
);
|
|
403
|
+
await queryRunner.query(
|
|
404
|
+
`CREATE INDEX "IDX_cclr_label_to_add_labelId" ON "CephClusterLabelRuleLabelToAdd" ("labelId")`,
|
|
405
|
+
);
|
|
406
|
+
await queryRunner.query(
|
|
407
|
+
`ALTER TABLE "CephClusterLabelRuleLabelToAdd" ADD CONSTRAINT "FK_cclr_label_to_add_ruleId" FOREIGN KEY ("cephClusterLabelRuleId") REFERENCES "CephClusterLabelRule"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
408
|
+
);
|
|
409
|
+
await queryRunner.query(
|
|
410
|
+
`ALTER TABLE "CephClusterLabelRuleLabelToAdd" ADD CONSTRAINT "FK_cclr_label_to_add_labelId" FOREIGN KEY ("labelId") REFERENCES "Label"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
|
|
411
|
+
);
|
|
412
|
+
|
|
413
|
+
/*
|
|
414
|
+
* ------------------------------------------------------------------
|
|
415
|
+
* WI-12: owner join models (also the prerequisite for the Owners page
|
|
416
|
+
* and useResourceOwners facets).
|
|
417
|
+
* ------------------------------------------------------------------
|
|
418
|
+
*/
|
|
419
|
+
|
|
420
|
+
// ProxmoxClusterOwnerUser
|
|
421
|
+
await queryRunner.query(
|
|
422
|
+
`CREATE TABLE "ProxmoxClusterOwnerUser" ("_id" uuid NOT NULL DEFAULT uuid_generate_v4(), "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deletedAt" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL, "projectId" uuid NOT NULL, "userId" uuid NOT NULL, "proxmoxClusterId" uuid NOT NULL, "createdByUserId" uuid, "deletedByUserId" uuid, "isOwnerNotified" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_proxmox_cluster_owner_user" PRIMARY KEY ("_id"))`,
|
|
423
|
+
);
|
|
424
|
+
await queryRunner.query(
|
|
425
|
+
`CREATE INDEX "IDX_proxmox_cluster_owner_user_projectId" ON "ProxmoxClusterOwnerUser" ("projectId")`,
|
|
426
|
+
);
|
|
427
|
+
await queryRunner.query(
|
|
428
|
+
`CREATE INDEX "IDX_proxmox_cluster_owner_user_userId" ON "ProxmoxClusterOwnerUser" ("userId")`,
|
|
429
|
+
);
|
|
430
|
+
await queryRunner.query(
|
|
431
|
+
`CREATE INDEX "IDX_proxmox_cluster_owner_user_proxmoxClusterId" ON "ProxmoxClusterOwnerUser" ("proxmoxClusterId")`,
|
|
432
|
+
);
|
|
433
|
+
await queryRunner.query(
|
|
434
|
+
`CREATE INDEX "IDX_proxmox_cluster_owner_user_isOwnerNotified" ON "ProxmoxClusterOwnerUser" ("isOwnerNotified")`,
|
|
435
|
+
);
|
|
436
|
+
await queryRunner.query(
|
|
437
|
+
`ALTER TABLE "ProxmoxClusterOwnerUser" ADD CONSTRAINT "FK_proxmox_cluster_owner_user_projectId" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
438
|
+
);
|
|
439
|
+
await queryRunner.query(
|
|
440
|
+
`ALTER TABLE "ProxmoxClusterOwnerUser" ADD CONSTRAINT "FK_proxmox_cluster_owner_user_userId" FOREIGN KEY ("userId") REFERENCES "User"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
441
|
+
);
|
|
442
|
+
await queryRunner.query(
|
|
443
|
+
`ALTER TABLE "ProxmoxClusterOwnerUser" ADD CONSTRAINT "FK_proxmox_cluster_owner_user_proxmoxClusterId" FOREIGN KEY ("proxmoxClusterId") REFERENCES "ProxmoxCluster"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
444
|
+
);
|
|
445
|
+
await queryRunner.query(
|
|
446
|
+
`ALTER TABLE "ProxmoxClusterOwnerUser" ADD CONSTRAINT "FK_proxmox_cluster_owner_user_createdByUserId" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
447
|
+
);
|
|
448
|
+
await queryRunner.query(
|
|
449
|
+
`ALTER TABLE "ProxmoxClusterOwnerUser" ADD CONSTRAINT "FK_proxmox_cluster_owner_user_deletedByUserId" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
450
|
+
);
|
|
451
|
+
|
|
452
|
+
// ProxmoxClusterOwnerTeam
|
|
453
|
+
await queryRunner.query(
|
|
454
|
+
`CREATE TABLE "ProxmoxClusterOwnerTeam" ("_id" uuid NOT NULL DEFAULT uuid_generate_v4(), "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deletedAt" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL, "projectId" uuid NOT NULL, "teamId" uuid NOT NULL, "proxmoxClusterId" uuid NOT NULL, "createdByUserId" uuid, "deletedByUserId" uuid, "isOwnerNotified" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_proxmox_cluster_owner_team" PRIMARY KEY ("_id"))`,
|
|
455
|
+
);
|
|
456
|
+
await queryRunner.query(
|
|
457
|
+
`CREATE INDEX "IDX_proxmox_cluster_owner_team_projectId" ON "ProxmoxClusterOwnerTeam" ("projectId")`,
|
|
458
|
+
);
|
|
459
|
+
await queryRunner.query(
|
|
460
|
+
`CREATE INDEX "IDX_proxmox_cluster_owner_team_teamId" ON "ProxmoxClusterOwnerTeam" ("teamId")`,
|
|
461
|
+
);
|
|
462
|
+
await queryRunner.query(
|
|
463
|
+
`CREATE INDEX "IDX_proxmox_cluster_owner_team_proxmoxClusterId" ON "ProxmoxClusterOwnerTeam" ("proxmoxClusterId")`,
|
|
464
|
+
);
|
|
465
|
+
await queryRunner.query(
|
|
466
|
+
`CREATE INDEX "IDX_proxmox_cluster_owner_team_isOwnerNotified" ON "ProxmoxClusterOwnerTeam" ("isOwnerNotified")`,
|
|
467
|
+
);
|
|
468
|
+
await queryRunner.query(
|
|
469
|
+
`ALTER TABLE "ProxmoxClusterOwnerTeam" ADD CONSTRAINT "FK_proxmox_cluster_owner_team_projectId" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
470
|
+
);
|
|
471
|
+
await queryRunner.query(
|
|
472
|
+
`ALTER TABLE "ProxmoxClusterOwnerTeam" ADD CONSTRAINT "FK_proxmox_cluster_owner_team_teamId" FOREIGN KEY ("teamId") REFERENCES "Team"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
473
|
+
);
|
|
474
|
+
await queryRunner.query(
|
|
475
|
+
`ALTER TABLE "ProxmoxClusterOwnerTeam" ADD CONSTRAINT "FK_proxmox_cluster_owner_team_proxmoxClusterId" FOREIGN KEY ("proxmoxClusterId") REFERENCES "ProxmoxCluster"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
476
|
+
);
|
|
477
|
+
await queryRunner.query(
|
|
478
|
+
`ALTER TABLE "ProxmoxClusterOwnerTeam" ADD CONSTRAINT "FK_proxmox_cluster_owner_team_createdByUserId" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
479
|
+
);
|
|
480
|
+
await queryRunner.query(
|
|
481
|
+
`ALTER TABLE "ProxmoxClusterOwnerTeam" ADD CONSTRAINT "FK_proxmox_cluster_owner_team_deletedByUserId" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
482
|
+
);
|
|
483
|
+
|
|
484
|
+
// CephClusterOwnerUser
|
|
485
|
+
await queryRunner.query(
|
|
486
|
+
`CREATE TABLE "CephClusterOwnerUser" ("_id" uuid NOT NULL DEFAULT uuid_generate_v4(), "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deletedAt" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL, "projectId" uuid NOT NULL, "userId" uuid NOT NULL, "cephClusterId" uuid NOT NULL, "createdByUserId" uuid, "deletedByUserId" uuid, "isOwnerNotified" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_ceph_cluster_owner_user" PRIMARY KEY ("_id"))`,
|
|
487
|
+
);
|
|
488
|
+
await queryRunner.query(
|
|
489
|
+
`CREATE INDEX "IDX_ceph_cluster_owner_user_projectId" ON "CephClusterOwnerUser" ("projectId")`,
|
|
490
|
+
);
|
|
491
|
+
await queryRunner.query(
|
|
492
|
+
`CREATE INDEX "IDX_ceph_cluster_owner_user_userId" ON "CephClusterOwnerUser" ("userId")`,
|
|
493
|
+
);
|
|
494
|
+
await queryRunner.query(
|
|
495
|
+
`CREATE INDEX "IDX_ceph_cluster_owner_user_cephClusterId" ON "CephClusterOwnerUser" ("cephClusterId")`,
|
|
496
|
+
);
|
|
497
|
+
await queryRunner.query(
|
|
498
|
+
`CREATE INDEX "IDX_ceph_cluster_owner_user_isOwnerNotified" ON "CephClusterOwnerUser" ("isOwnerNotified")`,
|
|
499
|
+
);
|
|
500
|
+
await queryRunner.query(
|
|
501
|
+
`ALTER TABLE "CephClusterOwnerUser" ADD CONSTRAINT "FK_ceph_cluster_owner_user_projectId" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
502
|
+
);
|
|
503
|
+
await queryRunner.query(
|
|
504
|
+
`ALTER TABLE "CephClusterOwnerUser" ADD CONSTRAINT "FK_ceph_cluster_owner_user_userId" FOREIGN KEY ("userId") REFERENCES "User"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
505
|
+
);
|
|
506
|
+
await queryRunner.query(
|
|
507
|
+
`ALTER TABLE "CephClusterOwnerUser" ADD CONSTRAINT "FK_ceph_cluster_owner_user_cephClusterId" FOREIGN KEY ("cephClusterId") REFERENCES "CephCluster"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
508
|
+
);
|
|
509
|
+
await queryRunner.query(
|
|
510
|
+
`ALTER TABLE "CephClusterOwnerUser" ADD CONSTRAINT "FK_ceph_cluster_owner_user_createdByUserId" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
511
|
+
);
|
|
512
|
+
await queryRunner.query(
|
|
513
|
+
`ALTER TABLE "CephClusterOwnerUser" ADD CONSTRAINT "FK_ceph_cluster_owner_user_deletedByUserId" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
514
|
+
);
|
|
515
|
+
|
|
516
|
+
// CephClusterOwnerTeam
|
|
517
|
+
await queryRunner.query(
|
|
518
|
+
`CREATE TABLE "CephClusterOwnerTeam" ("_id" uuid NOT NULL DEFAULT uuid_generate_v4(), "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deletedAt" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL, "projectId" uuid NOT NULL, "teamId" uuid NOT NULL, "cephClusterId" uuid NOT NULL, "createdByUserId" uuid, "deletedByUserId" uuid, "isOwnerNotified" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_ceph_cluster_owner_team" PRIMARY KEY ("_id"))`,
|
|
519
|
+
);
|
|
520
|
+
await queryRunner.query(
|
|
521
|
+
`CREATE INDEX "IDX_ceph_cluster_owner_team_projectId" ON "CephClusterOwnerTeam" ("projectId")`,
|
|
522
|
+
);
|
|
523
|
+
await queryRunner.query(
|
|
524
|
+
`CREATE INDEX "IDX_ceph_cluster_owner_team_teamId" ON "CephClusterOwnerTeam" ("teamId")`,
|
|
525
|
+
);
|
|
526
|
+
await queryRunner.query(
|
|
527
|
+
`CREATE INDEX "IDX_ceph_cluster_owner_team_cephClusterId" ON "CephClusterOwnerTeam" ("cephClusterId")`,
|
|
528
|
+
);
|
|
529
|
+
await queryRunner.query(
|
|
530
|
+
`CREATE INDEX "IDX_ceph_cluster_owner_team_isOwnerNotified" ON "CephClusterOwnerTeam" ("isOwnerNotified")`,
|
|
531
|
+
);
|
|
532
|
+
await queryRunner.query(
|
|
533
|
+
`ALTER TABLE "CephClusterOwnerTeam" ADD CONSTRAINT "FK_ceph_cluster_owner_team_projectId" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
534
|
+
);
|
|
535
|
+
await queryRunner.query(
|
|
536
|
+
`ALTER TABLE "CephClusterOwnerTeam" ADD CONSTRAINT "FK_ceph_cluster_owner_team_teamId" FOREIGN KEY ("teamId") REFERENCES "Team"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
537
|
+
);
|
|
538
|
+
await queryRunner.query(
|
|
539
|
+
`ALTER TABLE "CephClusterOwnerTeam" ADD CONSTRAINT "FK_ceph_cluster_owner_team_cephClusterId" FOREIGN KEY ("cephClusterId") REFERENCES "CephCluster"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
540
|
+
);
|
|
541
|
+
await queryRunner.query(
|
|
542
|
+
`ALTER TABLE "CephClusterOwnerTeam" ADD CONSTRAINT "FK_ceph_cluster_owner_team_createdByUserId" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
543
|
+
);
|
|
544
|
+
await queryRunner.query(
|
|
545
|
+
`ALTER TABLE "CephClusterOwnerTeam" ADD CONSTRAINT "FK_ceph_cluster_owner_team_deletedByUserId" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
546
|
+
);
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
550
|
+
// Owner join models.
|
|
551
|
+
await queryRunner.query(`DROP TABLE "CephClusterOwnerTeam"`);
|
|
552
|
+
await queryRunner.query(`DROP TABLE "CephClusterOwnerUser"`);
|
|
553
|
+
await queryRunner.query(`DROP TABLE "ProxmoxClusterOwnerTeam"`);
|
|
554
|
+
await queryRunner.query(`DROP TABLE "ProxmoxClusterOwnerUser"`);
|
|
555
|
+
|
|
556
|
+
// Rule matcher/action join tables.
|
|
557
|
+
await queryRunner.query(`DROP TABLE "CephClusterLabelRuleLabelToAdd"`);
|
|
558
|
+
await queryRunner.query(
|
|
559
|
+
`DROP TABLE "CephClusterLabelRuleCephClusterLabel"`,
|
|
560
|
+
);
|
|
561
|
+
await queryRunner.query(`DROP TABLE "CephClusterOwnerRuleOwnerTeam"`);
|
|
562
|
+
await queryRunner.query(`DROP TABLE "CephClusterOwnerRuleOwnerUser"`);
|
|
563
|
+
await queryRunner.query(
|
|
564
|
+
`DROP TABLE "CephClusterOwnerRuleCephClusterLabel"`,
|
|
565
|
+
);
|
|
566
|
+
await queryRunner.query(`DROP TABLE "ProxmoxClusterLabelRuleLabelToAdd"`);
|
|
567
|
+
await queryRunner.query(
|
|
568
|
+
`DROP TABLE "ProxmoxClusterLabelRuleProxmoxClusterLabel"`,
|
|
569
|
+
);
|
|
570
|
+
await queryRunner.query(`DROP TABLE "ProxmoxClusterOwnerRuleOwnerTeam"`);
|
|
571
|
+
await queryRunner.query(`DROP TABLE "ProxmoxClusterOwnerRuleOwnerUser"`);
|
|
572
|
+
await queryRunner.query(
|
|
573
|
+
`DROP TABLE "ProxmoxClusterOwnerRuleProxmoxClusterLabel"`,
|
|
574
|
+
);
|
|
575
|
+
|
|
576
|
+
// Rule tables.
|
|
577
|
+
await queryRunner.query(`DROP TABLE "CephClusterLabelRule"`);
|
|
578
|
+
await queryRunner.query(`DROP TABLE "CephClusterOwnerRule"`);
|
|
579
|
+
await queryRunner.query(`DROP TABLE "ProxmoxClusterLabelRule"`);
|
|
580
|
+
await queryRunner.query(`DROP TABLE "ProxmoxClusterOwnerRule"`);
|
|
581
|
+
|
|
582
|
+
// Activity ManyToMany join tables.
|
|
583
|
+
await queryRunner.query(`DROP TABLE "ScheduledMaintenanceCephCluster"`);
|
|
584
|
+
await queryRunner.query(`DROP TABLE "ScheduledMaintenanceProxmoxCluster"`);
|
|
585
|
+
await queryRunner.query(`DROP TABLE "IncidentCephCluster"`);
|
|
586
|
+
await queryRunner.query(`DROP TABLE "IncidentProxmoxCluster"`);
|
|
587
|
+
await queryRunner.query(`DROP TABLE "AlertCephCluster"`);
|
|
588
|
+
await queryRunner.query(`DROP TABLE "AlertProxmoxCluster"`);
|
|
589
|
+
}
|
|
590
|
+
}
|