@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.
- package/Models/DatabaseModels/Alert.ts +110 -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/Host.ts +64 -0
- package/Models/DatabaseModels/Incident.ts +110 -0
- package/Models/DatabaseModels/Index.ts +24 -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 +110 -0
- package/Server/API/BillingInvoiceAPI.ts +47 -7
- package/Server/API/CephResourceAPI.ts +134 -0
- package/Server/API/DashboardAPI.ts +46 -0
- package/Server/API/ProjectAPI.ts +15 -0
- package/Server/API/ProxmoxResourceAPI.ts +132 -0
- package/Server/API/ResellerPlanAPI.ts +17 -0
- package/Server/Infrastructure/GlobalCache.ts +8 -2
- package/Server/Infrastructure/Postgres/SchemaMigrations/1781500000000-AddProxmoxAndCephClusterTables.ts +163 -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 +8 -0
- package/Server/Infrastructure/Redis.ts +40 -12
- 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/ExceptionAggregationService.ts +2 -0
- package/Server/Services/HostService.ts +11 -3
- package/Server/Services/Index.ts +24 -0
- package/Server/Services/KubernetesClusterService.ts +11 -3
- package/Server/Services/LogAggregationService.ts +2 -0
- package/Server/Services/MetricAggregationService.ts +2 -0
- package/Server/Services/OpenTelemetryIngestService.ts +36 -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/ServerlessFunctionService.ts +11 -3
- package/Server/Services/TelemetryUsageBillingService.ts +41 -3
- package/Server/Services/TraceAggregationService.ts +2 -0
- package/Server/Types/AnalyticsDatabase/AggregateBy.ts +8 -23
- package/Server/Utils/Monitor/MonitorAlert.ts +45 -0
- package/Server/Utils/Monitor/MonitorClusterContext.ts +129 -0
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +344 -4
- package/Server/Utils/Monitor/MonitorIncident.ts +130 -7
- package/Server/Utils/Monitor/MonitorMaintenanceSuppression.ts +39 -6
- package/Server/Utils/Monitor/MonitorTemplateUtil.ts +3 -1
- package/Server/Utils/Monitor/SeriesResourceLabels.ts +33 -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/TelemetryEntity.ts +85 -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 +13 -0
- package/Tests/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.test.ts +879 -0
- package/Tests/Server/Utils/Telemetry/TelemetryEntity.test.ts +196 -0
- package/Tests/Types/Monitor/CephAlertTemplates.test.ts +1231 -0
- package/Tests/Types/Monitor/ProxmoxAlertTemplates.test.ts +732 -0
- package/Tests/Utils/ModelImportExport.test.ts +366 -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 +4 -0
- package/Types/Dashboard/DashboardComponents/ComponentArgument.ts +2 -0
- package/Types/Dashboard/DashboardComponents/DashboardCephOsdListComponent.ts +15 -0
- package/Types/Dashboard/DashboardComponents/DashboardCephPoolListComponent.ts +14 -0
- package/Types/Dashboard/DashboardComponents/DashboardProxmoxGuestListComponent.ts +17 -0
- package/Types/Dashboard/DashboardComponents/DashboardProxmoxNodeListComponent.ts +16 -0
- package/Types/Dashboard/DashboardTemplates.ts +446 -0
- package/Types/Icon/IconProp.ts +2 -0
- package/Types/Monitor/CephAlertTemplates.ts +1647 -0
- package/Types/Monitor/CephMetricCatalog.ts +409 -0
- package/Types/Monitor/MetricMonitor/MetricMonitorResponse.ts +44 -0
- package/Types/Monitor/MonitorStep.ts +64 -0
- package/Types/Monitor/MonitorStepCephMonitor.ts +57 -0
- package/Types/Monitor/MonitorStepProxmoxMonitor.ts +81 -0
- package/Types/Monitor/MonitorType.ts +29 -1
- package/Types/Monitor/ProxmoxAlertTemplates.ts +899 -0
- package/Types/Monitor/ProxmoxMetricCatalog.ts +382 -0
- package/Types/Permission.ts +464 -0
- package/Types/Telemetry/EntityType.ts +11 -0
- package/Types/Telemetry/ServiceType.ts +2 -0
- package/UI/Components/Icon/Icon.tsx +84 -0
- package/UI/Components/ImportExport/ExportModelCard.tsx +90 -0
- package/UI/Components/ImportExport/ImportModelsModal.tsx +239 -0
- package/UI/Components/ModelTable/ModelTable.tsx +294 -143
- package/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.ts +9 -5
- package/UI/Utils/ModelImportExport.ts +207 -0
- package/UI/Utils/Telemetry/Telemetry.ts +16 -21
- package/UI/Utils/TelemetryService.ts +7 -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/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 +28 -0
- package/Utils/ModelImportExport.ts +369 -0
- package/Utils/Telemetry/EntityKey.ts +35 -0
- package/Utils/Telemetry/EntityRelationship.ts +6 -0
- package/Utils/Telemetry/HeartbeatAvailability.ts +262 -0
- package/build/dist/Models/DatabaseModels/Alert.js +108 -0
- package/build/dist/Models/DatabaseModels/Alert.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/Host.js +63 -0
- package/build/dist/Models/DatabaseModels/Host.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Incident.js +108 -0
- package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +24 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- 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 +108 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.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 +46 -0
- package/build/dist/Server/API/DashboardAPI.js.map +1 -1
- 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/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/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 +8 -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/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/ExceptionAggregationService.js +2 -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/Index.js +24 -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 +2 -0
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MetricAggregationService.js +2 -0
- package/build/dist/Server/Services/MetricAggregationService.js.map +1 -1
- package/build/dist/Server/Services/OpenTelemetryIngestService.js +37 -7
- package/build/dist/Server/Services/OpenTelemetryIngestService.js.map +1 -1
- 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/ServerlessFunctionService.js +10 -2
- package/build/dist/Server/Services/ServerlessFunctionService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryUsageBillingService.js +30 -3
- package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
- package/build/dist/Server/Services/TraceAggregationService.js +2 -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/Utils/Monitor/MonitorAlert.js +36 -0
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorClusterContext.js +90 -0
- package/build/dist/Server/Utils/Monitor/MonitorClusterContext.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +228 -4
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +103 -8
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorMaintenanceSuppression.js +23 -6
- package/build/dist/Server/Utils/Monitor/MonitorMaintenanceSuppression.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js +3 -1
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/SeriesResourceLabels.js +23 -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/TelemetryEntity.js +62 -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 +4 -0
- package/build/dist/Types/Dashboard/DashboardComponentType.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js +2 -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/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 +394 -0
- package/build/dist/Types/Dashboard/DashboardTemplates.js.map +1 -1
- package/build/dist/Types/Icon/IconProp.js +2 -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/MonitorStep.js +46 -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/MonitorStepProxmoxMonitor.js +36 -0
- package/build/dist/Types/Monitor/MonitorStepProxmoxMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorType.js +27 -1
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- 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 +408 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/Telemetry/EntityType.js +11 -0
- package/build/dist/Types/Telemetry/EntityType.js.map +1 -1
- package/build/dist/Types/Telemetry/ServiceType.js +2 -0
- package/build/dist/Types/Telemetry/ServiceType.js.map +1 -1
- package/build/dist/UI/Components/Icon/Icon.js +33 -0
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/ImportExport/ExportModelCard.js +50 -0
- package/build/dist/UI/Components/ImportExport/ExportModelCard.js.map +1 -0
- package/build/dist/UI/Components/ImportExport/ImportModelsModal.js +115 -0
- package/build/dist/UI/Components/ImportExport/ImportModelsModal.js.map +1 -0
- package/build/dist/UI/Components/ModelTable/ModelTable.js +166 -74
- package/build/dist/UI/Components/ModelTable/ModelTable.js.map +1 -1
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js +5 -1
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js.map +1 -1
- package/build/dist/UI/Utils/ModelImportExport.js +142 -0
- package/build/dist/UI/Utils/ModelImportExport.js.map +1 -0
- 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 +5 -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/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 +16 -0
- package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
- package/build/dist/Utils/ModelImportExport.js +257 -0
- package/build/dist/Utils/ModelImportExport.js.map +1 -0
- package/build/dist/Utils/Telemetry/EntityKey.js +27 -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,207 @@
|
|
|
1
|
+
import BaseModel from "../../Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel";
|
|
2
|
+
import { JSONObject } from "../../Types/JSON";
|
|
3
|
+
import ObjectID from "../../Types/ObjectID";
|
|
4
|
+
import BadDataException from "../../Types/Exception/BadDataException";
|
|
5
|
+
import ModelImportExport from "../../Utils/ModelImportExport";
|
|
6
|
+
import API from "./API/API";
|
|
7
|
+
import ModelAPI from "./ModelAPI/ModelAPI";
|
|
8
|
+
|
|
9
|
+
export interface ImportFailure {
|
|
10
|
+
itemName: string;
|
|
11
|
+
errorMessage: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ImportResult {
|
|
15
|
+
successCount: number;
|
|
16
|
+
failures: Array<ImportFailure>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default class ModelImportExportUtil {
|
|
20
|
+
public static async fetchItemForExport<TBaseModel extends BaseModel>(data: {
|
|
21
|
+
modelType: { new (): TBaseModel };
|
|
22
|
+
modelId: ObjectID;
|
|
23
|
+
modelAPI?: typeof ModelAPI | undefined;
|
|
24
|
+
}): Promise<TBaseModel> {
|
|
25
|
+
const modelAPI: typeof ModelAPI = data.modelAPI || ModelAPI;
|
|
26
|
+
|
|
27
|
+
const item: TBaseModel | null = await modelAPI.getItem<TBaseModel>({
|
|
28
|
+
modelType: data.modelType,
|
|
29
|
+
id: data.modelId,
|
|
30
|
+
select: ModelImportExport.getImportExportSelect(data.modelType),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
if (!item || !item.id) {
|
|
34
|
+
const model: BaseModel = new data.modelType();
|
|
35
|
+
throw new BadDataException(
|
|
36
|
+
`${model.singularName || "Item"} not found. It may have been deleted.`,
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return item;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
public static downloadExportFile<TBaseModel extends BaseModel>(data: {
|
|
44
|
+
modelType: { new (): TBaseModel };
|
|
45
|
+
items: Array<TBaseModel>;
|
|
46
|
+
}): void {
|
|
47
|
+
const model: BaseModel = new data.modelType();
|
|
48
|
+
|
|
49
|
+
const envelope: JSONObject = ModelImportExport.buildExportEnvelope({
|
|
50
|
+
modelType: data.modelType,
|
|
51
|
+
items: data.items,
|
|
52
|
+
exportedAt: new Date(),
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const resourceName: string = (model.tableName || "resources")
|
|
56
|
+
.replace(/[^a-zA-Z0-9-]/g, "-")
|
|
57
|
+
.toLowerCase();
|
|
58
|
+
|
|
59
|
+
const timestamp: string = new Date()
|
|
60
|
+
.toISOString()
|
|
61
|
+
.replace(/[:.]/g, "-")
|
|
62
|
+
.slice(0, 19);
|
|
63
|
+
|
|
64
|
+
this.downloadJSONFile({
|
|
65
|
+
content: JSON.stringify(envelope, null, 2),
|
|
66
|
+
filename: `${resourceName}-export-${timestamp}.json`,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
public static downloadJSONFile(data: {
|
|
71
|
+
content: string;
|
|
72
|
+
filename: string;
|
|
73
|
+
}): void {
|
|
74
|
+
const blob: Blob = new Blob([data.content], {
|
|
75
|
+
type: "application/json;charset=utf-8;",
|
|
76
|
+
});
|
|
77
|
+
const url: string = window.URL.createObjectURL(blob);
|
|
78
|
+
const anchor: HTMLAnchorElement = document.createElement("a");
|
|
79
|
+
anchor.href = url;
|
|
80
|
+
anchor.download = data.filename;
|
|
81
|
+
document.body.appendChild(anchor);
|
|
82
|
+
anchor.click();
|
|
83
|
+
document.body.removeChild(anchor);
|
|
84
|
+
window.URL.revokeObjectURL(url);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
public static parseImportFileText(data: {
|
|
88
|
+
modelType: { new (): BaseModel };
|
|
89
|
+
fileText: string;
|
|
90
|
+
}): Array<JSONObject> {
|
|
91
|
+
let payload: unknown = null;
|
|
92
|
+
|
|
93
|
+
try {
|
|
94
|
+
payload = JSON.parse(data.fileText);
|
|
95
|
+
} catch {
|
|
96
|
+
throw new BadDataException(
|
|
97
|
+
"This file is not valid JSON. Please select a JSON export file.",
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return ModelImportExport.parseImportPayload({
|
|
102
|
+
modelType: data.modelType,
|
|
103
|
+
payload: payload as JSONObject,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/*
|
|
108
|
+
* Creates each item through the regular create API so all server-side
|
|
109
|
+
* validation, permission checks and hooks apply. When an item fails only
|
|
110
|
+
* because a resource with the same name already exists, it is retried once
|
|
111
|
+
* with an "(Imported)" suffix so re-importing into the same project works.
|
|
112
|
+
*/
|
|
113
|
+
public static async importItems<TBaseModel extends BaseModel>(data: {
|
|
114
|
+
modelType: { new (): TBaseModel };
|
|
115
|
+
itemJsons: Array<JSONObject>;
|
|
116
|
+
modelAPI?: typeof ModelAPI | undefined;
|
|
117
|
+
onProgress?:
|
|
118
|
+
| ((completedCount: number, totalCount: number) => void)
|
|
119
|
+
| undefined;
|
|
120
|
+
}): Promise<ImportResult> {
|
|
121
|
+
const modelAPI: typeof ModelAPI = data.modelAPI || ModelAPI;
|
|
122
|
+
|
|
123
|
+
const result: ImportResult = {
|
|
124
|
+
successCount: 0,
|
|
125
|
+
failures: [],
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/*
|
|
129
|
+
* The column that holds the human-readable name of the resource - used
|
|
130
|
+
* to label failures and to rename on duplicate-name conflicts. Most
|
|
131
|
+
* models use "name"; template models use "templateName".
|
|
132
|
+
*/
|
|
133
|
+
const displayNameColumn: string | undefined = [
|
|
134
|
+
"name",
|
|
135
|
+
"templateName",
|
|
136
|
+
"title",
|
|
137
|
+
].find((columnName: string) => {
|
|
138
|
+
return new data.modelType().getTableColumns().hasColumn(columnName);
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
let completedCount: number = 0;
|
|
142
|
+
|
|
143
|
+
for (const itemJson of data.itemJsons) {
|
|
144
|
+
const itemName: string =
|
|
145
|
+
(displayNameColumn &&
|
|
146
|
+
typeof itemJson[displayNameColumn] === "string" &&
|
|
147
|
+
(itemJson[displayNameColumn] as string)) ||
|
|
148
|
+
`Item ${completedCount + 1}`;
|
|
149
|
+
|
|
150
|
+
try {
|
|
151
|
+
const item: TBaseModel = ModelImportExport.fromImportJSON({
|
|
152
|
+
json: itemJson,
|
|
153
|
+
modelType: data.modelType,
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
try {
|
|
157
|
+
await modelAPI.create<TBaseModel>({
|
|
158
|
+
model: item,
|
|
159
|
+
modelType: data.modelType,
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
result.successCount += 1;
|
|
163
|
+
} catch (err) {
|
|
164
|
+
const errorMessage: string = API.getFriendlyMessage(err);
|
|
165
|
+
|
|
166
|
+
const canRetryWithNewName: boolean = Boolean(
|
|
167
|
+
errorMessage.toLowerCase().includes("already exists") &&
|
|
168
|
+
displayNameColumn &&
|
|
169
|
+
typeof item.getValue(displayNameColumn) === "string",
|
|
170
|
+
);
|
|
171
|
+
|
|
172
|
+
if (canRetryWithNewName) {
|
|
173
|
+
item.setValue(
|
|
174
|
+
displayNameColumn!,
|
|
175
|
+
`${item.getValue(displayNameColumn!)?.toString()} (Imported)`,
|
|
176
|
+
);
|
|
177
|
+
|
|
178
|
+
await modelAPI.create<TBaseModel>({
|
|
179
|
+
model: item,
|
|
180
|
+
modelType: data.modelType,
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
result.successCount += 1;
|
|
184
|
+
} else {
|
|
185
|
+
result.failures.push({
|
|
186
|
+
itemName: itemName,
|
|
187
|
+
errorMessage: errorMessage,
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
} catch (err) {
|
|
192
|
+
result.failures.push({
|
|
193
|
+
itemName: itemName,
|
|
194
|
+
errorMessage: API.getFriendlyMessage(err),
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
completedCount += 1;
|
|
199
|
+
|
|
200
|
+
if (data.onProgress) {
|
|
201
|
+
data.onProgress(completedCount, data.itemJsons.length);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
return result;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
@@ -8,14 +8,16 @@ import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
|
|
|
8
8
|
import { registerInstrumentations } from "@opentelemetry/instrumentation";
|
|
9
9
|
import { FetchInstrumentation } from "@opentelemetry/instrumentation-fetch";
|
|
10
10
|
import { XMLHttpRequestInstrumentation } from "@opentelemetry/instrumentation-xml-http-request";
|
|
11
|
-
import {
|
|
11
|
+
import { resourceFromAttributes } from "@opentelemetry/resources";
|
|
12
12
|
import {
|
|
13
13
|
BatchSpanProcessor,
|
|
14
14
|
TracerConfig,
|
|
15
15
|
WebTracerProvider,
|
|
16
16
|
} from "@opentelemetry/sdk-trace-web";
|
|
17
|
-
import type {
|
|
18
|
-
|
|
17
|
+
import type {
|
|
18
|
+
SpanExporter,
|
|
19
|
+
SpanProcessor,
|
|
20
|
+
} from "@opentelemetry/sdk-trace-base";
|
|
19
21
|
import { ATTR_SERVICE_NAME } from "@opentelemetry/semantic-conventions";
|
|
20
22
|
import URL from "../../../Types/API/URL";
|
|
21
23
|
|
|
@@ -87,14 +89,6 @@ export default class Telemetry {
|
|
|
87
89
|
Object.keys(OpenTelemetryExporterOtlpHeaders).length > 0;
|
|
88
90
|
|
|
89
91
|
if (OpenTelemetryExporterOtlpEndpoint && hasHeaders) {
|
|
90
|
-
const providerConfig: TracerConfig = {
|
|
91
|
-
resource: new Resource({
|
|
92
|
-
[ATTR_SERVICE_NAME]: data.serviceName,
|
|
93
|
-
}),
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
const provider: WebTracerProvider = new WebTracerProvider(providerConfig);
|
|
97
|
-
|
|
98
92
|
const traceExporter: SpanExporter = new OTLPTraceExporter({
|
|
99
93
|
url: URL.fromString(
|
|
100
94
|
OpenTelemetryExporterOtlpEndpoint?.toString() + "/v1/traces",
|
|
@@ -102,17 +96,18 @@ export default class Telemetry {
|
|
|
102
96
|
headers: OpenTelemetryExporterOtlpHeaders,
|
|
103
97
|
}) as unknown as SpanExporter;
|
|
104
98
|
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
99
|
+
const providerConfig: TracerConfig = {
|
|
100
|
+
resource: resourceFromAttributes({
|
|
101
|
+
[ATTR_SERVICE_NAME]: data.serviceName,
|
|
102
|
+
}),
|
|
103
|
+
// Stamp global RUM attributes (userId, projectId, ...) onto every span.
|
|
104
|
+
spanProcessors: [
|
|
105
|
+
new BatchSpanProcessor(traceExporter),
|
|
106
|
+
new GlobalAttributeSpanProcessor() as unknown as SpanProcessor,
|
|
107
|
+
],
|
|
108
|
+
};
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
provider.addSpanProcessor(
|
|
112
|
-
new GlobalAttributeSpanProcessor() as unknown as Parameters<
|
|
113
|
-
WebTracerProvider["addSpanProcessor"]
|
|
114
|
-
>[0],
|
|
115
|
-
);
|
|
110
|
+
const provider: WebTracerProvider = new WebTracerProvider(providerConfig);
|
|
116
111
|
|
|
117
112
|
provider.register({
|
|
118
113
|
contextManager: new ZoneContextManager(),
|
|
@@ -23,7 +23,8 @@ export const UNKNOWN_SERVICE_NAME: string = "Unknown Service";
|
|
|
23
23
|
* primaryEntityType) to something renderable. Either a Service (a real
|
|
24
24
|
* OpenTelemetry service, or the synthetic "Unknown Service" for the
|
|
25
25
|
* unattributed bucket) — or a plain `label` for infrastructure resource
|
|
26
|
-
* types (Host / DockerHost / KubernetesCluster
|
|
26
|
+
* types (Host / DockerHost / KubernetesCluster / ProxmoxCluster /
|
|
27
|
+
* CephCluster) that have no Service row.
|
|
27
28
|
*/
|
|
28
29
|
export interface ResolvedTelemetryResource {
|
|
29
30
|
service?: Service;
|
|
@@ -66,8 +67,9 @@ export default class TelemetryServiceUtil {
|
|
|
66
67
|
* old server-side `service` ORM relation on TelemetryException: a real
|
|
67
68
|
* Service resolves from the loaded list, the unattributed bucket resolves
|
|
68
69
|
* to the synthetic "Unknown Service", and Host / DockerHost /
|
|
69
|
-
* KubernetesCluster resolve to a type
|
|
70
|
-
* them). Mirrors how the ClickHouse
|
|
70
|
+
* KubernetesCluster / ProxmoxCluster / CephCluster resolve to a type
|
|
71
|
+
* label (no Service row exists for them). Mirrors how the ClickHouse
|
|
72
|
+
* analytics rows are resolved.
|
|
71
73
|
*/
|
|
72
74
|
public static resolveTelemetryResource(data: {
|
|
73
75
|
primaryEntityId: ObjectID | string | null | undefined;
|
|
@@ -101,6 +103,8 @@ export default class TelemetryServiceUtil {
|
|
|
101
103
|
[ServiceType.Host]: "Host telemetry",
|
|
102
104
|
[ServiceType.DockerHost]: "Docker host telemetry",
|
|
103
105
|
[ServiceType.KubernetesCluster]: "Kubernetes telemetry",
|
|
106
|
+
[ServiceType.ProxmoxCluster]: "Proxmox Cluster",
|
|
107
|
+
[ServiceType.CephCluster]: "Ceph Cluster",
|
|
104
108
|
};
|
|
105
109
|
const label: string | undefined = data.primaryEntityType
|
|
106
110
|
? typeLabels[data.primaryEntityType.toString()]
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import DashboardCephOsdListComponent from "../../../Types/Dashboard/DashboardComponents/DashboardCephOsdListComponent";
|
|
2
|
+
import { ObjectType } from "../../../Types/JSON";
|
|
3
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
4
|
+
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
5
|
+
import {
|
|
6
|
+
ComponentArgument,
|
|
7
|
+
ComponentInputType,
|
|
8
|
+
} from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
9
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
10
|
+
import {
|
|
11
|
+
CephFiltersSection,
|
|
12
|
+
getCephCommonArguments,
|
|
13
|
+
} from "./DashboardCephResourceListShared";
|
|
14
|
+
|
|
15
|
+
export default class DashboardCephOsdListComponentUtil extends DashboardBaseComponentUtil {
|
|
16
|
+
public static override getDefaultComponent(): DashboardCephOsdListComponent {
|
|
17
|
+
return {
|
|
18
|
+
_type: ObjectType.DashboardComponent,
|
|
19
|
+
componentType: DashboardComponentType.CephOsdList,
|
|
20
|
+
widthInDashboardUnits: 6,
|
|
21
|
+
heightInDashboardUnits: 4,
|
|
22
|
+
topInDashboardUnits: 0,
|
|
23
|
+
leftInDashboardUnits: 0,
|
|
24
|
+
componentId: ObjectID.generate(),
|
|
25
|
+
minHeightInDashboardUnits: 3,
|
|
26
|
+
minWidthInDashboardUnits: 6,
|
|
27
|
+
arguments: {
|
|
28
|
+
maxRows: 25,
|
|
29
|
+
/*
|
|
30
|
+
* The classic "OSD wall" — a honeycomb where each cell is an
|
|
31
|
+
* OSD colored by up/in state — is the view operators expect
|
|
32
|
+
* for this widget, so honeycomb is the default. The list view
|
|
33
|
+
* stays one dropdown away.
|
|
34
|
+
*/
|
|
35
|
+
viewMode: "honeycomb",
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
public static override getComponentConfigArguments(): Array<
|
|
41
|
+
ComponentArgument<DashboardCephOsdListComponent>
|
|
42
|
+
> {
|
|
43
|
+
const args: Array<ComponentArgument<DashboardCephOsdListComponent>> =
|
|
44
|
+
getCephCommonArguments<DashboardCephOsdListComponent>();
|
|
45
|
+
|
|
46
|
+
args.push({
|
|
47
|
+
name: "State",
|
|
48
|
+
description: "Quick filter by OSD up/in state",
|
|
49
|
+
required: false,
|
|
50
|
+
type: ComponentInputType.Dropdown,
|
|
51
|
+
id: "stateFilter",
|
|
52
|
+
section: CephFiltersSection,
|
|
53
|
+
dropdownOptions: [
|
|
54
|
+
{ label: "All", value: "" },
|
|
55
|
+
{ label: "Up only", value: "up" },
|
|
56
|
+
{ label: "Down only", value: "down" },
|
|
57
|
+
{ label: "Out only", value: "out" },
|
|
58
|
+
],
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
return args;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import DashboardCephPoolListComponent from "../../../Types/Dashboard/DashboardComponents/DashboardCephPoolListComponent";
|
|
2
|
+
import { ObjectType } from "../../../Types/JSON";
|
|
3
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
4
|
+
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
5
|
+
import { ComponentArgument } from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
6
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
7
|
+
import { getCephCommonArguments } from "./DashboardCephResourceListShared";
|
|
8
|
+
|
|
9
|
+
export default class DashboardCephPoolListComponentUtil extends DashboardBaseComponentUtil {
|
|
10
|
+
public static override getDefaultComponent(): DashboardCephPoolListComponent {
|
|
11
|
+
return {
|
|
12
|
+
_type: ObjectType.DashboardComponent,
|
|
13
|
+
componentType: DashboardComponentType.CephPoolList,
|
|
14
|
+
widthInDashboardUnits: 6,
|
|
15
|
+
heightInDashboardUnits: 4,
|
|
16
|
+
topInDashboardUnits: 0,
|
|
17
|
+
leftInDashboardUnits: 0,
|
|
18
|
+
componentId: ObjectID.generate(),
|
|
19
|
+
minHeightInDashboardUnits: 3,
|
|
20
|
+
minWidthInDashboardUnits: 6,
|
|
21
|
+
arguments: {
|
|
22
|
+
maxRows: 25,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public static override getComponentConfigArguments(): Array<
|
|
28
|
+
ComponentArgument<DashboardCephPoolListComponent>
|
|
29
|
+
> {
|
|
30
|
+
return getCephCommonArguments<DashboardCephPoolListComponent>();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ComponentArgument,
|
|
3
|
+
ComponentArgumentSection,
|
|
4
|
+
ComponentInputType,
|
|
5
|
+
EntityFilterModelType,
|
|
6
|
+
} from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
7
|
+
import DashboardBaseComponent from "../../../Types/Dashboard/DashboardComponents/DashboardBaseComponent";
|
|
8
|
+
import { getViewModeArgument } from "./DashboardListSharedArgs";
|
|
9
|
+
|
|
10
|
+
export const CephDisplaySection: ComponentArgumentSection = {
|
|
11
|
+
name: "Display Options",
|
|
12
|
+
description: "Configure the widget title and row limit",
|
|
13
|
+
order: 1,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const CephFiltersSection: ComponentArgumentSection = {
|
|
17
|
+
name: "Filters",
|
|
18
|
+
description: "Narrow down which resources are shown",
|
|
19
|
+
order: 2,
|
|
20
|
+
defaultCollapsed: true,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export function getCephCommonArguments<
|
|
24
|
+
T extends DashboardBaseComponent,
|
|
25
|
+
>(): Array<ComponentArgument<T>> {
|
|
26
|
+
const args: Array<ComponentArgument<T>> = [];
|
|
27
|
+
|
|
28
|
+
args.push({
|
|
29
|
+
name: "Title",
|
|
30
|
+
description: "Header shown above the list",
|
|
31
|
+
required: false,
|
|
32
|
+
type: ComponentInputType.Text,
|
|
33
|
+
id: "title" as keyof T["arguments"],
|
|
34
|
+
section: CephDisplaySection,
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
args.push({
|
|
38
|
+
name: "Max Rows",
|
|
39
|
+
description: "Maximum number of rows to show",
|
|
40
|
+
required: false,
|
|
41
|
+
type: ComponentInputType.Number,
|
|
42
|
+
id: "maxRows" as keyof T["arguments"],
|
|
43
|
+
placeholder: "25",
|
|
44
|
+
section: CephDisplaySection,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
args.push(getViewModeArgument<T>(CephDisplaySection));
|
|
48
|
+
|
|
49
|
+
args.push({
|
|
50
|
+
name: "Clusters",
|
|
51
|
+
description: "Show only resources from the selected Ceph clusters",
|
|
52
|
+
required: false,
|
|
53
|
+
type: ComponentInputType.EntityMultiSelectDropdown,
|
|
54
|
+
id: "cephClusterIds" as keyof T["arguments"],
|
|
55
|
+
placeholder: "All clusters",
|
|
56
|
+
section: CephFiltersSection,
|
|
57
|
+
entityFilterModelType: EntityFilterModelType.CephCluster,
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
return args;
|
|
61
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import DashboardProxmoxGuestListComponent from "../../../Types/Dashboard/DashboardComponents/DashboardProxmoxGuestListComponent";
|
|
2
|
+
import { ObjectType } from "../../../Types/JSON";
|
|
3
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
4
|
+
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
5
|
+
import {
|
|
6
|
+
ComponentArgument,
|
|
7
|
+
ComponentInputType,
|
|
8
|
+
} from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
9
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
10
|
+
import {
|
|
11
|
+
ProxmoxFiltersSection,
|
|
12
|
+
getProxmoxCommonArguments,
|
|
13
|
+
} from "./DashboardProxmoxResourceListShared";
|
|
14
|
+
|
|
15
|
+
export default class DashboardProxmoxGuestListComponentUtil extends DashboardBaseComponentUtil {
|
|
16
|
+
public static override getDefaultComponent(): DashboardProxmoxGuestListComponent {
|
|
17
|
+
return {
|
|
18
|
+
_type: ObjectType.DashboardComponent,
|
|
19
|
+
componentType: DashboardComponentType.ProxmoxGuestList,
|
|
20
|
+
widthInDashboardUnits: 6,
|
|
21
|
+
heightInDashboardUnits: 4,
|
|
22
|
+
topInDashboardUnits: 0,
|
|
23
|
+
leftInDashboardUnits: 0,
|
|
24
|
+
componentId: ObjectID.generate(),
|
|
25
|
+
minHeightInDashboardUnits: 3,
|
|
26
|
+
minWidthInDashboardUnits: 6,
|
|
27
|
+
arguments: {
|
|
28
|
+
maxRows: 25,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public static override getComponentConfigArguments(): Array<
|
|
34
|
+
ComponentArgument<DashboardProxmoxGuestListComponent>
|
|
35
|
+
> {
|
|
36
|
+
const args: Array<ComponentArgument<DashboardProxmoxGuestListComponent>> =
|
|
37
|
+
getProxmoxCommonArguments<DashboardProxmoxGuestListComponent>();
|
|
38
|
+
|
|
39
|
+
args.push({
|
|
40
|
+
name: "Guest Type",
|
|
41
|
+
description: "Show only QEMU VMs or only LXC containers",
|
|
42
|
+
required: false,
|
|
43
|
+
type: ComponentInputType.Dropdown,
|
|
44
|
+
id: "guestTypeFilter",
|
|
45
|
+
section: ProxmoxFiltersSection,
|
|
46
|
+
dropdownOptions: [
|
|
47
|
+
{ label: "All", value: "" },
|
|
48
|
+
{ label: "QEMU VMs only", value: "qemu" },
|
|
49
|
+
{ label: "LXC containers only", value: "lxc" },
|
|
50
|
+
],
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
args.push({
|
|
54
|
+
name: "Status",
|
|
55
|
+
description: "Quick filter by guest run state",
|
|
56
|
+
required: false,
|
|
57
|
+
type: ComponentInputType.Dropdown,
|
|
58
|
+
id: "statusFilter",
|
|
59
|
+
section: ProxmoxFiltersSection,
|
|
60
|
+
dropdownOptions: [
|
|
61
|
+
{ label: "All", value: "" },
|
|
62
|
+
{ label: "Running only", value: "running" },
|
|
63
|
+
{ label: "Stopped only", value: "stopped" },
|
|
64
|
+
],
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
return args;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import DashboardProxmoxNodeListComponent from "../../../Types/Dashboard/DashboardComponents/DashboardProxmoxNodeListComponent";
|
|
2
|
+
import { ObjectType } from "../../../Types/JSON";
|
|
3
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
4
|
+
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
5
|
+
import {
|
|
6
|
+
ComponentArgument,
|
|
7
|
+
ComponentInputType,
|
|
8
|
+
} from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
9
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
10
|
+
import {
|
|
11
|
+
ProxmoxFiltersSection,
|
|
12
|
+
getProxmoxCommonArguments,
|
|
13
|
+
} from "./DashboardProxmoxResourceListShared";
|
|
14
|
+
|
|
15
|
+
export default class DashboardProxmoxNodeListComponentUtil extends DashboardBaseComponentUtil {
|
|
16
|
+
public static override getDefaultComponent(): DashboardProxmoxNodeListComponent {
|
|
17
|
+
return {
|
|
18
|
+
_type: ObjectType.DashboardComponent,
|
|
19
|
+
componentType: DashboardComponentType.ProxmoxNodeList,
|
|
20
|
+
widthInDashboardUnits: 6,
|
|
21
|
+
heightInDashboardUnits: 4,
|
|
22
|
+
topInDashboardUnits: 0,
|
|
23
|
+
leftInDashboardUnits: 0,
|
|
24
|
+
componentId: ObjectID.generate(),
|
|
25
|
+
minHeightInDashboardUnits: 3,
|
|
26
|
+
minWidthInDashboardUnits: 6,
|
|
27
|
+
arguments: {
|
|
28
|
+
maxRows: 25,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public static override getComponentConfigArguments(): Array<
|
|
34
|
+
ComponentArgument<DashboardProxmoxNodeListComponent>
|
|
35
|
+
> {
|
|
36
|
+
const args: Array<ComponentArgument<DashboardProxmoxNodeListComponent>> =
|
|
37
|
+
getProxmoxCommonArguments<DashboardProxmoxNodeListComponent>();
|
|
38
|
+
|
|
39
|
+
args.push({
|
|
40
|
+
name: "Status",
|
|
41
|
+
description: "Quick filter by node availability",
|
|
42
|
+
required: false,
|
|
43
|
+
type: ComponentInputType.Dropdown,
|
|
44
|
+
id: "statusFilter",
|
|
45
|
+
section: ProxmoxFiltersSection,
|
|
46
|
+
dropdownOptions: [
|
|
47
|
+
{ label: "All", value: "" },
|
|
48
|
+
{ label: "Online only", value: "online" },
|
|
49
|
+
{ label: "Offline only", value: "offline" },
|
|
50
|
+
],
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
return args;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ComponentArgument,
|
|
3
|
+
ComponentArgumentSection,
|
|
4
|
+
ComponentInputType,
|
|
5
|
+
EntityFilterModelType,
|
|
6
|
+
} from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
7
|
+
import DashboardBaseComponent from "../../../Types/Dashboard/DashboardComponents/DashboardBaseComponent";
|
|
8
|
+
import { getViewModeArgument } from "./DashboardListSharedArgs";
|
|
9
|
+
|
|
10
|
+
export const ProxmoxDisplaySection: ComponentArgumentSection = {
|
|
11
|
+
name: "Display Options",
|
|
12
|
+
description: "Configure the widget title and row limit",
|
|
13
|
+
order: 1,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const ProxmoxFiltersSection: ComponentArgumentSection = {
|
|
17
|
+
name: "Filters",
|
|
18
|
+
description: "Narrow down which resources are shown",
|
|
19
|
+
order: 2,
|
|
20
|
+
defaultCollapsed: true,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export function getProxmoxCommonArguments<
|
|
24
|
+
T extends DashboardBaseComponent,
|
|
25
|
+
>(): Array<ComponentArgument<T>> {
|
|
26
|
+
const args: Array<ComponentArgument<T>> = [];
|
|
27
|
+
|
|
28
|
+
args.push({
|
|
29
|
+
name: "Title",
|
|
30
|
+
description: "Header shown above the list",
|
|
31
|
+
required: false,
|
|
32
|
+
type: ComponentInputType.Text,
|
|
33
|
+
id: "title" as keyof T["arguments"],
|
|
34
|
+
section: ProxmoxDisplaySection,
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
args.push({
|
|
38
|
+
name: "Max Rows",
|
|
39
|
+
description: "Maximum number of rows to show",
|
|
40
|
+
required: false,
|
|
41
|
+
type: ComponentInputType.Number,
|
|
42
|
+
id: "maxRows" as keyof T["arguments"],
|
|
43
|
+
placeholder: "25",
|
|
44
|
+
section: ProxmoxDisplaySection,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
args.push(getViewModeArgument<T>(ProxmoxDisplaySection));
|
|
48
|
+
|
|
49
|
+
args.push({
|
|
50
|
+
name: "Clusters",
|
|
51
|
+
description: "Show only resources from the selected Proxmox clusters",
|
|
52
|
+
required: false,
|
|
53
|
+
type: ComponentInputType.EntityMultiSelectDropdown,
|
|
54
|
+
id: "proxmoxClusterIds" as keyof T["arguments"],
|
|
55
|
+
placeholder: "All clusters",
|
|
56
|
+
section: ProxmoxFiltersSection,
|
|
57
|
+
entityFilterModelType: EntityFilterModelType.ProxmoxCluster,
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
return args;
|
|
61
|
+
}
|