@oneuptime/common 12.0.7 → 12.0.9
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/AnalyticsModels/MetricItemAggMV1mByK8sCluster.ts +1 -1
- package/Models/AnalyticsModels/MetricItemAggMV1mByService.ts +1 -1
- package/Models/DatabaseModels/AIConversation.ts +32 -0
- package/Models/DatabaseModels/AIConversationMessage.ts +41 -0
- package/Models/DatabaseModels/AlertEpisodeMember.ts +27 -0
- package/Models/DatabaseModels/IncidentEpisodeMember.ts +28 -0
- package/Models/DatabaseModels/Index.ts +12 -4
- package/Models/DatabaseModels/{TelemetryEntity.ts → InventoryItem.ts} +184 -9
- package/Models/DatabaseModels/InventoryItemCustomField.ts +434 -0
- package/Models/DatabaseModels/{TelemetryEntityRelationship.ts → InventoryItemRelationship.ts} +33 -7
- package/Models/DatabaseModels/NetworkDevice.ts +141 -0
- package/Models/DatabaseModels/NetworkDeviceLink.ts +699 -0
- package/Models/DatabaseModels/NetworkDeviceLinkRule.ts +467 -0
- package/Models/DatabaseModels/NetworkTopologySuppression.ts +429 -0
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.ts +9 -0
- package/Models/DatabaseModels/Project.ts +78 -0
- package/Models/DatabaseModels/UserCall.ts +42 -0
- package/Models/DatabaseModels/UserEmail.ts +44 -0
- package/Models/DatabaseModels/UserNotificationRule.ts +425 -55
- package/Models/DatabaseModels/UserOnCallLogTimeline.ts +24 -2
- package/Models/DatabaseModels/UserPush.ts +49 -0
- package/Models/DatabaseModels/UserSMS.ts +43 -0
- package/Models/DatabaseModels/UserTelegram.ts +59 -0
- package/Models/DatabaseModels/UserWebhook.ts +52 -0
- package/Models/DatabaseModels/UserWhatsApp.ts +41 -0
- package/Models/DatabaseModels/WorkflowLog.ts +38 -0
- package/Models/DatabaseModels/WorkflowVariable.ts +12 -0
- package/Server/API/AIChatAPI.ts +315 -1
- package/Server/API/DashboardAPI.ts +217 -1
- package/Server/API/OnCallReadinessAPI.ts +841 -0
- package/Server/API/TeamComplianceAPI.ts +69 -17
- package/Server/API/TelemetryAPI.ts +220 -12
- package/Server/API/UserAPI.ts +16 -1
- package/Server/EnvironmentConfig.ts +52 -0
- package/Server/Infrastructure/Postgres/DataSourceOptions.ts +22 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1786100000000-RestoreServiceLowerNameIndex.ts +4 -4
- package/Server/Infrastructure/Postgres/SchemaMigrations/1786200000000-RestoreDroppedUniqueIndexes.ts +5 -5
- package/Server/Infrastructure/Postgres/SchemaMigrations/1786551733814-MigrationName.ts +41 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1786559879134-AddWorkflowLogStepTrace.ts +17 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1786625176831-AddMonitoringMethodToNetworkDevice.ts +35 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1786634985763-AddNetworkDeviceLink.ts +82 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1786639512056-AddNetworkDeviceLinkRule.ts +91 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1786639972982-AddNetworkTopologySuppression.ts +47 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1786800000000-RenameTelemetryEntityToInventoryItem.ts +255 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1786900000000-AddInventoryItemArchiveAndCustomFields.ts +107 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1787000000000-AddOnCallNotificationFallbackColumns.ts +90 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1787100000000-AddAIConversationPageContext.ts +39 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1787200000000-AddAIChatMessageFeedback.ts +33 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1787300000000-AddEpisodeMemberNotifyIndexes.ts +59 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +24 -0
- package/Server/Infrastructure/Queue.ts +78 -13
- package/Server/Middleware/MasterAdminAuthorization.ts +11 -6
- package/Server/Middleware/PublicDashboardRateLimit.ts +593 -0
- package/Server/Services/AIService.ts +7 -0
- package/Server/Services/AlertEpisodeStateTimelineService.ts +29 -0
- package/Server/Services/AlertSeverityService.ts +63 -0
- package/Server/Services/DashboardService.ts +9 -10
- package/Server/Services/DatabaseService.ts +32 -2
- package/Server/Services/IncidentEpisodeStateTimelineService.ts +29 -0
- package/Server/Services/IncidentSeverityService.ts +76 -0
- package/Server/Services/Index.ts +12 -4
- package/Server/Services/InventoryItemCustomFieldService.ts +9 -0
- package/Server/Services/{TelemetryEntityRelationshipService.ts → InventoryItemRelationshipService.ts} +7 -4
- package/Server/Services/{TelemetryEntityService.ts → InventoryItemService.ts} +203 -21
- package/Server/Services/LogAggregationService.ts +45 -8
- package/Server/Services/MetricAggregationService.ts +121 -0
- package/Server/Services/MetricService.ts +7 -7
- package/Server/Services/NetworkDeviceLinkRuleService.ts +10 -0
- package/Server/Services/NetworkDeviceLinkService.ts +84 -0
- package/Server/Services/NetworkDeviceService.ts +140 -0
- package/Server/Services/NetworkSiteService.ts +77 -25
- package/Server/Services/NetworkTopologySuppressionService.ts +84 -0
- package/Server/Services/OnCallDutyPolicyEscalationRuleScheduleService.ts +41 -29
- package/Server/Services/OnCallDutyPolicyExecutionLogService.ts +8 -0
- package/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.ts +62 -13
- package/Server/Services/OnCallDutyPolicyScheduleService.ts +61 -1
- package/Server/Services/OnCallNotificationAlertingService.ts +742 -0
- package/Server/Services/OnCallReadinessService.ts +2803 -0
- package/Server/Services/OnCallSetupReminderService.ts +955 -0
- package/Server/Services/ProfileAggregationService.ts +123 -0
- package/Server/Services/StatusPageService.ts +9 -10
- package/Server/Services/TeamComplianceService.ts +429 -252
- package/Server/Services/UserCallService.ts +26 -1
- package/Server/Services/UserEmailService.ts +26 -1
- package/Server/Services/UserNotificationRuleAdminService.ts +1183 -0
- package/Server/Services/UserNotificationRuleService.ts +3812 -333
- package/Server/Services/UserOnCallLogService.ts +561 -48
- package/Server/Services/UserPushService.ts +29 -0
- package/Server/Services/UserService.ts +11 -0
- package/Server/Services/UserSmsService.ts +26 -1
- package/Server/Services/UserTelegramService.ts +24 -1
- package/Server/Services/UserWebhookService.ts +28 -1
- package/Server/Services/UserWhatsAppService.ts +24 -1
- package/Server/Types/Database/Permissions/BasePermission.ts +19 -0
- package/Server/Types/Database/Permissions/CreatePermission.ts +164 -0
- package/Server/Types/Database/Permissions/OwnerOnlyColumnPermission.ts +340 -0
- package/Server/Types/Database/Permissions/QueryPermission.ts +48 -0
- package/Server/Types/Database/Permissions/TenantPermission.ts +8 -1
- package/Server/Types/Workflow/Components/API/Delete.ts +1 -1
- package/Server/Types/Workflow/Components/API/Get.ts +1 -1
- package/Server/Types/Workflow/Components/API/Patch.ts +1 -1
- package/Server/Types/Workflow/Components/API/Post.ts +1 -1
- package/Server/Types/Workflow/Components/API/Put.ts +1 -1
- package/Server/Types/Workflow/Components/API/Utils.ts +44 -1
- package/Server/Types/Workflow/Components/BaseModel/CreateManyBaseModel.ts +29 -5
- package/Server/Types/Workflow/Components/BaseModel/CreateOneBaseModel.ts +18 -10
- package/Server/Types/Workflow/Components/BaseModel/ModelArguments.ts +55 -0
- package/Server/Types/Workflow/Components/Conditions/IfElse.ts +3 -17
- package/Server/Types/Workflow/Components/Email.ts +25 -7
- package/Server/Types/Workflow/Components/JavaScript.ts +10 -3
- package/Server/Types/Workflow/Components/MicrosoftTeams/SendMessageToChannel.ts +1 -1
- package/Server/Types/Workflow/TriggerCode.ts +12 -0
- package/Server/Types/Workflow/Workflow.ts +5 -0
- package/Server/Utils/AI/Chat/ChatAgentRunner.ts +643 -48
- package/Server/Utils/AI/Chat/ObservabilityAssistant.ts +32 -3
- package/Server/Utils/AI/Chat/ObservabilityChatPrompt.ts +20 -6
- package/Server/Utils/AI/SRE/AIInvestigationEngine.ts +7 -0
- package/Server/Utils/AI/Toolbox/AIActionTools.ts +2 -2
- package/Server/Utils/AI/Toolbox/AIMetaTools.ts +863 -0
- package/Server/Utils/AI/Toolbox/AlertTools.ts +177 -15
- package/Server/Utils/AI/Toolbox/IncidentTools.ts +191 -10
- package/Server/Utils/AI/Toolbox/Index.ts +48 -0
- package/Server/Utils/AI/Toolbox/MonitorTools.ts +298 -11
- package/Server/Utils/AI/Toolbox/NoteWriteTools.ts +295 -0
- package/Server/Utils/AI/Toolbox/OnCallTools.ts +1246 -0
- package/Server/Utils/AI/Toolbox/RunbookTools.ts +424 -0
- package/Server/Utils/AI/Toolbox/SloTools.ts +456 -0
- package/Server/Utils/AI/Toolbox/StatusPageTools.ts +559 -0
- package/Server/Utils/AI/Toolbox/TeamTools.ts +327 -0
- package/Server/Utils/AI/Toolbox/TimelineTools.ts +615 -0
- package/Server/Utils/AI/Toolbox/WorkflowProbeTools.ts +664 -0
- package/Server/Utils/ClientIp.ts +221 -0
- package/Server/Utils/Dashboard/PublicDashboardResourceListPolicy.ts +47 -0
- package/Server/Utils/Dashboard/PublicDashboardSloHistoryPolicy.ts +163 -0
- package/Server/Utils/Dashboard/PublicDashboardSloWidget.ts +147 -0
- package/Server/Utils/Express.ts +12 -17
- package/Server/Utils/LLM/LLMService.ts +85 -8
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +204 -10
- package/Server/Utils/SSRFProtection.ts +98 -23
- package/Server/Utils/StartServer.ts +12 -3
- package/Server/Utils/Telemetry/EntityRegistry.ts +205 -18
- package/Server/Utils/Telemetry/InventoryEntityRegistry.ts +689 -0
- package/Server/Utils/Telemetry/TelemetryEntity.ts +160 -52
- package/Server/Utils/VM/VMAPI.ts +56 -8
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +7 -3
- package/Tests/App/Dashboard/AdminNotificationRulesPage.test.tsx +2146 -0
- package/Tests/App/Dashboard/CreateWorkflowModal.test.tsx +561 -0
- package/Tests/App/Dashboard/EscalationRuleReadiness.test.tsx +2470 -0
- package/Tests/App/Dashboard/MonitorCriteriaAttributeFilter.test.tsx +574 -0
- package/Tests/App/Dashboard/OnCallPreventionGuards.test.tsx +1897 -0
- package/Tests/App/Dashboard/OnCallReadinessSurfaces.test.tsx +3606 -0
- package/Tests/App/Dashboard/OnCallRulesDeleteGuard.test.tsx +784 -0
- package/Tests/App/Dashboard/OnCallRulesTable.test.tsx +1119 -0
- package/Tests/App/Dashboard/SloWidgetFetching.test.tsx +531 -0
- package/Tests/App/Dashboard/UserSettingsSetupChecklistModel.test.ts +1312 -0
- package/Tests/App/Dashboard/UserSettingsSetupChecklistPage.test.tsx +1390 -0
- package/Tests/Models/InventoryItemModel.test.ts +174 -0
- package/Tests/Models/InventoryItemNaming.test.ts +302 -0
- package/Tests/Server/API/AIChatCancelAndFeedback.test.ts +437 -0
- package/Tests/Server/API/DashboardPublicRateLimit.test.ts +659 -0
- package/Tests/Server/API/DashboardPublicResourceListAPI.test.ts +18 -0
- package/Tests/Server/API/DashboardPublicSloAPI.test.ts +880 -0
- package/Tests/Server/API/Helpers.ts +24 -15
- package/Tests/Server/API/OnCallReadinessAPI.test.ts +2680 -0
- package/Tests/Server/API/OnCallSetupReminderAPI.test.ts +915 -0
- package/Tests/Server/API/UserProjectsAPI.test.ts +478 -4
- package/Tests/Server/Infrastructure/Postgres/EpisodeMemberNotifyIndexesMigration.test.ts +533 -0
- package/Tests/Server/Infrastructure/Postgres/InventoryItemArchiveMigration.test.ts +213 -0
- package/Tests/Server/Infrastructure/Postgres/RenameInventoryItemMigration.test.ts +432 -0
- package/Tests/Server/Infrastructure/Queue.test.ts +293 -0
- package/Tests/Server/Middleware/PublicDashboardRateLimit.test.ts +1645 -0
- package/Tests/Server/Services/AdminRuleEditGuards.test.ts +2848 -0
- package/Tests/Server/Services/DeliverNotificationForRuleExtraction.test.ts +1393 -0
- package/Tests/Server/Services/EpisodeRuleSeverityRepair.test.ts +1802 -0
- package/Tests/Server/Services/EpisodeStateTimelineNote.test.ts +304 -0
- package/Tests/Server/Services/InventoryItemDisplayName.test.ts +339 -0
- package/Tests/Server/Services/InventoryItemManualCreate.test.ts +248 -0
- package/Tests/Server/Services/IpAllowlistSpoofing.test.ts +450 -0
- package/Tests/Server/Services/LogAggregationService.test.ts +235 -1
- package/Tests/Server/Services/MetricAggregationService.test.ts +231 -0
- package/Tests/Server/Services/MetricEntityMVKeyParity.test.ts +80 -29
- package/Tests/Server/Services/MetricServiceAggregate.test.ts +30 -30
- package/Tests/Server/Services/NetworkSiteService.test.ts +18 -3
- package/Tests/Server/Services/NotificationChannelEventCoverage.test.ts +1728 -0
- package/Tests/Server/Services/NotificationDeletionImpact.test.ts +2402 -0
- package/Tests/Server/Services/OnCallDutyPolicyExecutionLogTimelineGapFeed.test.ts +394 -0
- package/Tests/Server/Services/OnCallNotificationFallback.test.ts +1744 -0
- package/Tests/Server/Services/OnCallReadinessService.test.ts +4295 -0
- package/Tests/Server/Services/OnCallSetupReminder.test.ts +1272 -0
- package/Tests/Server/Services/OnCallWeeklyReadinessDigest.test.ts +1021 -0
- package/Tests/Server/Services/ProfileAggregationService.test.ts +296 -0
- package/Tests/Server/Services/SeverityCreationRuleBackfill.test.ts +1536 -0
- package/Tests/Server/Services/SeverityRuleBackfill.test.ts +1818 -0
- package/Tests/Server/Services/TeamComplianceServiceBehaviour.test.ts +1845 -0
- package/Tests/Server/Services/UserNotificationRuleAdminGuards.test.ts +1394 -0
- package/Tests/Server/Services/UserNotificationRuleDefaultCreation.test.ts +1166 -0
- package/Tests/Server/Services/UserNotificationRuleExecuteItem.test.ts +1468 -0
- package/Tests/Server/Services/UserOnCallLogNoNotificationRules.test.ts +1457 -0
- package/Tests/Server/Types/Database/Permissions/AdminNotificationRuleAccess.test.ts +1546 -0
- package/Tests/Server/Types/Database/Permissions/CreateOwnershipScoping.test.ts +529 -0
- package/Tests/Server/Types/Database/Permissions/OwnerOnlyColumns.test.ts +1219 -0
- package/Tests/Server/Types/Database/Permissions/UserNotificationRuleScoping.test.ts +1089 -0
- package/Tests/Server/Types/Workflow/Components/ApiComponentErrorPort.test.ts +2 -1
- package/Tests/Server/Types/Workflow/Components/ApiComponentHeaders.test.ts +192 -0
- package/Tests/Server/Types/Workflow/Components/BaseModelDatabaseComponents.test.ts +190 -0
- package/Tests/Server/Types/Workflow/Components/ChatWebhookComponents.test.ts +44 -14
- package/Tests/Server/Types/Workflow/Components/Email.test.ts +151 -0
- package/Tests/Server/Types/Workflow/Components/IfElse.test.ts +98 -0
- package/Tests/Server/Types/Workflow/Components/JavaScript.test.ts +51 -0
- package/Tests/Server/Utils/AI/AIMetaTools.test.ts +586 -0
- package/Tests/Server/Utils/AI/AlertMonitorFilters.test.ts +582 -0
- package/Tests/Server/Utils/AI/ChatAgentRunner.test.ts +726 -0
- package/Tests/Server/Utils/AI/IncidentToolsFilters.test.ts +315 -0
- package/Tests/Server/Utils/AI/LLMServiceStopReason.test.ts +314 -0
- package/Tests/Server/Utils/AI/LLMServiceToolCalling.test.ts +26 -3
- package/Tests/Server/Utils/AI/NoteWriteTools.test.ts +268 -0
- package/Tests/Server/Utils/AI/ObservabilityChatPrompt.test.ts +169 -0
- package/Tests/Server/Utils/AI/OnCallTools.test.ts +664 -0
- package/Tests/Server/Utils/AI/RunbookTools.test.ts +325 -0
- package/Tests/Server/Utils/AI/SloTools.test.ts +306 -0
- package/Tests/Server/Utils/AI/StatusPageTools.test.ts +391 -0
- package/Tests/Server/Utils/AI/TeamTools.test.ts +257 -0
- package/Tests/Server/Utils/AI/TimelineTools.test.ts +472 -0
- package/Tests/Server/Utils/AI/WorkflowProbeTools.test.ts +428 -0
- package/Tests/Server/Utils/AnalyticsDatabase/QuerySettingsHelper.test.ts +152 -0
- package/Tests/Server/Utils/ClientIp.test.ts +438 -0
- package/Tests/Server/Utils/Dashboard/PublicDashboardResourceListPolicy.test.ts +171 -0
- package/Tests/Server/Utils/Dashboard/PublicDashboardSloHistoryPolicy.test.ts +383 -0
- package/Tests/Server/Utils/EntityRegistryRowFence.test.ts +23 -25
- package/Tests/Server/Utils/MicrosoftTeamsWebhookUrlValidation.test.ts +6 -0
- package/Tests/Server/Utils/Monitor/Criteria/DnssecMonitorCriteria.test.ts +307 -0
- package/Tests/Server/Utils/Monitor/Criteria/SSLMonitorCriteria.test.ts +468 -0
- package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluatorTelemetryDeepLinks.test.ts +460 -0
- package/Tests/Server/Utils/ResponseRateLimitStatusCodes.test.ts +137 -0
- package/Tests/Server/Utils/SSRFProtectionBypasses.test.ts +40 -8
- package/Tests/Server/Utils/SSRFProtectionUserInfo.test.ts +351 -0
- package/Tests/Server/Utils/Telemetry/EntityRegistryRetirement.test.ts +531 -0
- package/Tests/Server/Utils/Telemetry/InventoryEntityRegistry.test.ts +322 -0
- package/Tests/Server/Utils/Telemetry/TelemetryEntity.test.ts +356 -39
- package/Tests/Server/Utils/VM/VMAPISubstitution.test.ts +243 -0
- package/Tests/Types/IP/IP.test.ts +263 -0
- package/Tests/Types/IP/IPWhitelist.test.ts +197 -0
- package/Tests/Types/IP/IPv6.test.ts +12 -1
- package/Tests/Types/Monitor/SnmpOid.test.ts +64 -0
- package/Tests/Types/NetworkDevice/NetworkDeviceMonitoringMethod.test.ts +110 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilMergeAudit.test.ts +106 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilMergeDifferential.test.ts +511 -0
- package/Tests/Types/OnCallDutyPolicy/ScheduleCoverageEndToEnd.test.ts +489 -0
- package/Tests/Types/OnCallDutyPolicy/ScheduleCoverageGapTolerance.test.ts +479 -0
- package/Tests/Types/OnCallDutyPolicy/ScheduleCoverageState.test.ts +822 -0
- package/Tests/Types/SerializableObjectDictionaryImportCycle.test.ts +197 -0
- package/Tests/Types/Telemetry/EntityTypeGroups.test.ts +140 -0
- package/Tests/Types/Workflow/BaseModelComponents.test.ts +429 -0
- package/Tests/Types/Workflow/Components/BaseModel.test.ts +225 -0
- package/Tests/Types/Workflow/IntegrationCredentialMetadata.test.ts +100 -0
- package/Tests/Types/Workflow/StepTrace.test.ts +235 -0
- package/Tests/Types/Workflow/TemplateSyntax.test.ts +491 -0
- package/Tests/Types/Workflow/Templates.test.ts +1218 -0
- package/Tests/UI/Components/ActiveFilterChipsOpenRoute.test.tsx +82 -0
- package/Tests/UI/Components/ComponentsModal.test.tsx +564 -7
- package/Tests/UI/Components/CustomTimeRangeModal.test.tsx +459 -0
- package/Tests/UI/Components/DictionaryAttributeFilterRow.test.tsx +477 -0
- package/Tests/UI/Components/Forms/AnchoredFieldPopupKeyboard.test.tsx +382 -0
- package/Tests/UI/Components/Forms/ColorPickerPicking.test.tsx +569 -0
- package/Tests/UI/Components/Forms/ValidationJSON.test.ts +241 -0
- package/Tests/UI/Components/KeyboardShortcut.test.tsx +95 -0
- package/Tests/UI/Components/LogDetailsPanelCrossSignal.test.tsx +448 -0
- package/Tests/UI/Components/LogTimeRangePicker.test.tsx +42 -0
- package/Tests/UI/Components/LogsTableCrossLinks.test.tsx +263 -0
- package/Tests/UI/Components/ModalPortalDismissal.test.tsx +90 -0
- package/Tests/UI/Components/PendingProjectInvitations.test.tsx +913 -0
- package/Tests/UI/Components/SimpleLogViewer.test.tsx +228 -0
- package/Tests/UI/Components/TableRowSelectability.test.tsx +312 -0
- package/Tests/UI/Components/TelemetryTimeRangePicker.test.tsx +49 -7
- package/Tests/UI/Components/TimeRangePickerDropdown.test.tsx +325 -0
- package/Tests/UI/Components/Workflow/GraphLint.test.ts +893 -0
- package/Tests/UI/Components/Workflow/GraphLintSummary.test.ts +755 -0
- package/Tests/UI/Components/Workflow/ModelColumnEditor.test.ts +522 -0
- package/Tests/UI/Components/Workflow/ModelColumnEditorServerContract.test.ts +193 -0
- package/Tests/UI/Components/Workflow/ModelSchema.test.ts +388 -0
- package/Tests/UI/Components/Workflow/RunStatusWatcher.test.ts +210 -0
- package/Tests/UI/Components/Workflow/StepTraceViewer.test.tsx +256 -0
- package/Tests/UI/Components/Workflow/UseRunWatch.test.tsx +665 -0
- package/Tests/UI/Components/Workflow/Utils.test.ts +192 -0
- package/Tests/UI/Components/Workflow/WorkflowIssuesModal.test.tsx +485 -0
- package/Tests/UI/Components/Workflow/WorkflowLogModal.test.tsx +478 -0
- package/Tests/UI/Components/Workflow/WorkflowStatusBar.test.tsx +379 -0
- package/Tests/UI/EsbuildConfig.test.ts +607 -0
- package/Tests/UI/Monitor/MonitorStepCriteriaView.test.tsx +432 -0
- package/Tests/UI/Utils/Breadcrumb/fixtures/RealBreadcrumbTrails.ts +5 -0
- package/Tests/UI/Utils/Breadcrumb/fixtures/RealRoutePatterns.ts +11 -4
- package/Tests/UI/Utils/ModelAPICreateMiscData.test.ts +94 -0
- package/Tests/UI/Utils/Platform.test.ts +147 -0
- package/Tests/UI/Utils/ProjectInvitationDisplay.test.ts +357 -0
- package/Tests/Utils/Monitor/NetworkDeviceLinkRuleUtil.test.ts +198 -0
- package/Tests/Utils/Monitor/NetworkDeviceRoleUtil.test.ts +514 -0
- package/Tests/Utils/Monitor/NetworkTopologyUtil.test.ts +727 -0
- package/Tests/Utils/Schema/AnalyticsModelSchema.test.ts +469 -0
- package/Tests/Utils/Schema/ModelSchema.test.ts +268 -0
- package/Tests/Utils/Telemetry/CrossSignalScope.test.ts +698 -0
- package/Tests/Utils/Telemetry/EntityKeyNonTelemetry.test.ts +193 -0
- package/Tests/__mocks__/bullmq.js +55 -0
- package/Types/AI/AIChatMessageStatus.ts +8 -1
- package/Types/AI/AIChatTypes.ts +12 -0
- package/Types/Database/AccessControl/OwnerOnlyColumn.ts +88 -0
- package/Types/Exception/ExceptionCode.ts +2 -0
- package/Types/Exception/ServiceUnavailableException.ts +8 -0
- package/Types/Exception/TooManyRequestsException.ts +8 -0
- package/Types/IP/IP.ts +93 -47
- package/Types/Monitor/SnmpMonitor/NetworkTopology.ts +80 -3
- package/Types/NetworkDevice/NetworkDeviceMonitoringMethod.ts +55 -0
- package/Types/OnCallDutyPolicy/Layer.ts +203 -149
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyStatus.ts +13 -0
- package/Types/OnCallDutyPolicy/ScheduleShiftUtil.ts +155 -10
- package/Types/Permission.ts +193 -0
- package/Types/SerializableObjectDictionary.ts +133 -39
- package/Types/Telemetry/EntityRelationshipType.ts +1 -1
- package/Types/Telemetry/EntitySource.ts +40 -0
- package/Types/Telemetry/EntityType.ts +28 -1
- package/Types/Telemetry/EntityTypeGroups.ts +65 -0
- package/Types/Workflow/Component.ts +29 -0
- package/Types/Workflow/Components/API.ts +35 -0
- package/Types/Workflow/Components/BaseModel.ts +77 -27
- package/Types/Workflow/Components/Discord.ts +1 -0
- package/Types/Workflow/Components/Email.ts +12 -3
- package/Types/Workflow/Components/JavaScript.ts +7 -0
- package/Types/Workflow/Components/MicrosoftTeams.ts +3 -2
- package/Types/Workflow/Components/Slack.ts +1 -0
- package/Types/Workflow/Components/Telegram.ts +1 -0
- package/Types/Workflow/StepTrace.ts +181 -0
- package/Types/Workflow/TemplateSyntax.ts +543 -0
- package/Types/Workflow/Templates.ts +2368 -0
- package/UI/Components/Calendar/Calendar.css +43 -0
- package/UI/Components/Calendar/Calendar.tsx +8 -0
- package/UI/Components/Card/Card.tsx +2 -2
- package/UI/Components/Checkbox/Checkbox.tsx +16 -0
- package/UI/Components/Date/CustomTimeRangeModal.tsx +278 -0
- package/UI/Components/Date/TimeRangePickerDropdown.tsx +250 -0
- package/UI/Components/Dictionary/Dictionary.tsx +71 -15
- package/UI/Components/FormModal/BasicFormModal.tsx +2 -1
- package/UI/Components/Forms/Fields/ColorPicker.tsx +66 -10
- package/UI/Components/Forms/Fields/IconPicker.tsx +48 -10
- package/UI/Components/Forms/Types/Field.ts +7 -0
- package/UI/Components/Forms/Validation.ts +63 -1
- package/UI/Components/Header/HeaderIconDropdownButton.tsx +53 -3
- package/UI/Components/Input/Input.tsx +32 -3
- package/UI/Components/KeyboardShortcut/KeyboardKey.ts +185 -0
- package/UI/Components/KeyboardShortcut/KeyboardShortcut.tsx +87 -0
- package/UI/Components/LogsViewer/LogsViewer.tsx +28 -0
- package/UI/Components/LogsViewer/components/ActiveFilterChips.tsx +31 -0
- package/UI/Components/LogsViewer/components/KeyboardShortcutsHelp.tsx +18 -18
- package/UI/Components/LogsViewer/components/LogDetailsPanel.tsx +363 -14
- package/UI/Components/LogsViewer/components/LogTimeRangePicker.tsx +11 -216
- package/UI/Components/LogsViewer/components/LogsAnalyticsView.tsx +11 -0
- package/UI/Components/LogsViewer/components/LogsTable.tsx +155 -12
- package/UI/Components/LogsViewer/components/LogsViewerToolbar.tsx +29 -0
- package/UI/Components/LogsViewer/types.ts +23 -0
- package/UI/Components/Markdown.tsx/MarkdownEditor.tsx +9 -2
- package/UI/Components/Modal/Modal.tsx +37 -4
- package/UI/Components/Navbar/NavBarMenuModal.tsx +15 -30
- package/UI/Components/ProjectInvitations/PendingProjectInvitations.tsx +442 -0
- package/UI/Components/SimpleLogViewer/SimpleLogViewer.tsx +23 -1
- package/UI/Components/Table/Table.tsx +49 -16
- package/UI/Components/Table/TableBody.tsx +53 -28
- package/UI/Components/Table/TableHeader.tsx +13 -0
- package/UI/Components/Table/TableRow.tsx +58 -26
- package/UI/Components/TelemetryViewer/components/TelemetryTimeRangePicker.tsx +11 -210
- package/UI/Components/Workflow/ArgumentsForm.tsx +341 -8
- package/UI/Components/Workflow/Component.tsx +28 -26
- package/UI/Components/Workflow/ComponentReturnValueViewer.tsx +26 -0
- package/UI/Components/Workflow/ComponentSettingsModal.tsx +79 -9
- package/UI/Components/Workflow/ComponentValuePickerModal.tsx +135 -7
- package/UI/Components/Workflow/ComponentsModal.tsx +116 -22
- package/UI/Components/Workflow/DocumentationViewer.tsx +59 -9
- package/UI/Components/Workflow/GraphLint.ts +628 -0
- package/UI/Components/Workflow/GraphLintSummary.ts +390 -0
- package/UI/Components/Workflow/ModelColumnEditor.tsx +528 -0
- package/UI/Components/Workflow/ModelSchema.ts +278 -0
- package/UI/Components/Workflow/RunForm.tsx +41 -7
- package/UI/Components/Workflow/RunStatusWatcher.ts +122 -0
- package/UI/Components/Workflow/StepTraceViewer.tsx +186 -0
- package/UI/Components/Workflow/UseRunWatch.ts +212 -0
- package/UI/Components/Workflow/Utils.ts +93 -1
- package/UI/Components/Workflow/VariableModal.tsx +6 -2
- package/UI/Components/Workflow/Workflow.tsx +126 -7
- package/UI/Components/Workflow/WorkflowIssuesModal.tsx +255 -0
- package/UI/Components/Workflow/WorkflowLogModal.tsx +128 -0
- package/UI/Components/Workflow/WorkflowStatusBar.tsx +224 -0
- package/UI/Types/LayeredDismissal.ts +31 -0
- package/UI/Types/UseAnchoredFieldPopup.ts +99 -0
- package/UI/Utils/AIChatExport/ConversationMarkdown.ts +10 -0
- package/UI/Utils/ModelAPI/ModelAPI.ts +7 -1
- package/UI/Utils/Platform.ts +149 -0
- package/UI/Utils/ProjectInvitationDisplay.ts +118 -0
- package/UI/esbuild-config.js +22 -1
- package/Utils/Monitor/NetworkDeviceLinkRuleUtil.ts +187 -0
- package/Utils/Monitor/NetworkDeviceRoleUtil.ts +533 -0
- package/Utils/Monitor/NetworkTopologyUtil.ts +917 -155
- package/Utils/Telemetry/CrossSignalScope.ts +502 -0
- package/Utils/Telemetry/EntityKey.ts +71 -5
- package/Utils/Telemetry/EntityRelationship.ts +1 -1
- package/build/dist/Models/AnalyticsModels/MetricItemAggMV1mByK8sCluster.js +1 -1
- package/build/dist/Models/AnalyticsModels/MetricItemAggMV1mByService.js +1 -1
- package/build/dist/Models/DatabaseModels/AIConversation.js +32 -0
- package/build/dist/Models/DatabaseModels/AIConversation.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AIConversationMessage.js +42 -0
- package/build/dist/Models/DatabaseModels/AIConversationMessage.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertEpisodeMember.js +28 -0
- package/build/dist/Models/DatabaseModels/AlertEpisodeMember.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentEpisodeMember.js +29 -0
- package/build/dist/Models/DatabaseModels/IncidentEpisodeMember.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +12 -4
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/{TelemetryEntity.js → InventoryItem.js} +212 -29
- package/build/dist/Models/DatabaseModels/InventoryItem.js.map +1 -0
- package/build/dist/Models/DatabaseModels/InventoryItemCustomField.js +454 -0
- package/build/dist/Models/DatabaseModels/InventoryItemCustomField.js.map +1 -0
- package/build/dist/Models/DatabaseModels/{TelemetryEntityRelationship.js → InventoryItemRelationship.js} +52 -25
- package/build/dist/Models/DatabaseModels/InventoryItemRelationship.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkDevice.js +141 -0
- package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceLink.js +719 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceLink.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceLinkRule.js +475 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceLinkRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkTopologySuppression.js +446 -0
- package/build/dist/Models/DatabaseModels/NetworkTopologySuppression.js.map +1 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyFeed.js +9 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyFeed.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Project.js +80 -0
- package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserCall.js +46 -2
- package/build/dist/Models/DatabaseModels/UserCall.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserEmail.js +48 -2
- package/build/dist/Models/DatabaseModels/UserEmail.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserNotificationRule.js +424 -55
- package/build/dist/Models/DatabaseModels/UserNotificationRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserOnCallLogTimeline.js +24 -2
- package/build/dist/Models/DatabaseModels/UserOnCallLogTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserPush.js +51 -1
- package/build/dist/Models/DatabaseModels/UserPush.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserSMS.js +47 -2
- package/build/dist/Models/DatabaseModels/UserSMS.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserTelegram.js +65 -3
- package/build/dist/Models/DatabaseModels/UserTelegram.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserWebhook.js +56 -2
- package/build/dist/Models/DatabaseModels/UserWebhook.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserWhatsApp.js +45 -2
- package/build/dist/Models/DatabaseModels/UserWhatsApp.js.map +1 -1
- package/build/dist/Models/DatabaseModels/WorkflowLog.js +39 -0
- package/build/dist/Models/DatabaseModels/WorkflowLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/WorkflowVariable.js +12 -0
- package/build/dist/Models/DatabaseModels/WorkflowVariable.js.map +1 -1
- package/build/dist/Server/API/AIChatAPI.js +237 -1
- package/build/dist/Server/API/AIChatAPI.js.map +1 -1
- package/build/dist/Server/API/DashboardAPI.js +165 -13
- package/build/dist/Server/API/DashboardAPI.js.map +1 -1
- package/build/dist/Server/API/OnCallReadinessAPI.js +599 -0
- package/build/dist/Server/API/OnCallReadinessAPI.js.map +1 -0
- package/build/dist/Server/API/TeamComplianceAPI.js +68 -9
- package/build/dist/Server/API/TeamComplianceAPI.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +129 -18
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/API/UserAPI.js +16 -1
- package/build/dist/Server/API/UserAPI.js.map +1 -1
- package/build/dist/Server/EnvironmentConfig.js +45 -0
- package/build/dist/Server/EnvironmentConfig.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/DataSourceOptions.js +22 -0
- package/build/dist/Server/Infrastructure/Postgres/DataSourceOptions.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786100000000-RestoreServiceLowerNameIndex.js +4 -4
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786551733814-MigrationName.js +20 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786551733814-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786559879134-AddWorkflowLogStepTrace.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786559879134-AddWorkflowLogStepTrace.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786625176831-AddMonitoringMethodToNetworkDevice.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786625176831-AddMonitoringMethodToNetworkDevice.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786634985763-AddNetworkDeviceLink.js +39 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786634985763-AddNetworkDeviceLink.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786639512056-AddNetworkDeviceLinkRule.js +38 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786639512056-AddNetworkDeviceLinkRule.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786639972982-AddNetworkTopologySuppression.js +22 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786639972982-AddNetworkTopologySuppression.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786800000000-RenameTelemetryEntityToInventoryItem.js +150 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786800000000-RenameTelemetryEntityToInventoryItem.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786900000000-AddInventoryItemArchiveAndCustomFields.js +57 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786900000000-AddInventoryItemArchiveAndCustomFields.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787000000000-AddOnCallNotificationFallbackColumns.js +69 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787000000000-AddOnCallNotificationFallbackColumns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787100000000-AddAIConversationPageContext.js +32 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787100000000-AddAIConversationPageContext.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787200000000-AddAIChatMessageFeedback.js +26 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787200000000-AddAIChatMessageFeedback.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787300000000-AddEpisodeMemberNotifyIndexes.js +48 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787300000000-AddEpisodeMemberNotifyIndexes.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +24 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Infrastructure/Queue.js +72 -13
- package/build/dist/Server/Infrastructure/Queue.js.map +1 -1
- package/build/dist/Server/Middleware/MasterAdminAuthorization.js +11 -6
- package/build/dist/Server/Middleware/MasterAdminAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/PublicDashboardRateLimit.js +399 -0
- package/build/dist/Server/Middleware/PublicDashboardRateLimit.js.map +1 -0
- package/build/dist/Server/Services/AIService.js +1 -0
- package/build/dist/Server/Services/AIService.js.map +1 -1
- package/build/dist/Server/Services/AlertEpisodeStateTimelineService.js +24 -3
- package/build/dist/Server/Services/AlertEpisodeStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/AlertSeverityService.js +54 -0
- package/build/dist/Server/Services/AlertSeverityService.js.map +1 -1
- package/build/dist/Server/Services/DashboardService.js +10 -9
- package/build/dist/Server/Services/DashboardService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseService.js +24 -2
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeStateTimelineService.js +24 -3
- package/build/dist/Server/Services/IncidentEpisodeStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentSeverityService.js +67 -0
- package/build/dist/Server/Services/IncidentSeverityService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +12 -4
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/InventoryItemCustomFieldService.js +9 -0
- package/build/dist/Server/Services/InventoryItemCustomFieldService.js.map +1 -0
- package/build/dist/Server/Services/{TelemetryEntityRelationshipService.js → InventoryItemRelationshipService.js} +9 -6
- package/build/dist/Server/Services/InventoryItemRelationshipService.js.map +1 -0
- package/build/dist/Server/Services/{TelemetryEntityService.js → InventoryItemService.js} +158 -23
- package/build/dist/Server/Services/InventoryItemService.js.map +1 -0
- package/build/dist/Server/Services/LogAggregationService.js +27 -8
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MetricAggregationService.js +80 -0
- package/build/dist/Server/Services/MetricAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MetricService.js +6 -6
- package/build/dist/Server/Services/MetricService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceLinkRuleService.js +9 -0
- package/build/dist/Server/Services/NetworkDeviceLinkRuleService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceLinkService.js +71 -0
- package/build/dist/Server/Services/NetworkDeviceLinkService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceService.js +113 -0
- package/build/dist/Server/Services/NetworkDeviceService.js.map +1 -1
- package/build/dist/Server/Services/NetworkSiteService.js +53 -13
- package/build/dist/Server/Services/NetworkSiteService.js.map +1 -1
- package/build/dist/Server/Services/NetworkTopologySuppressionService.js +85 -0
- package/build/dist/Server/Services/NetworkTopologySuppressionService.js.map +1 -0
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleScheduleService.js +48 -32
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleScheduleService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogService.js +8 -0
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.js +51 -12
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js +57 -13
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js.map +1 -1
- package/build/dist/Server/Services/OnCallNotificationAlertingService.js +548 -0
- package/build/dist/Server/Services/OnCallNotificationAlertingService.js.map +1 -0
- package/build/dist/Server/Services/OnCallReadinessService.js +1961 -0
- package/build/dist/Server/Services/OnCallReadinessService.js.map +1 -0
- package/build/dist/Server/Services/OnCallSetupReminderService.js +738 -0
- package/build/dist/Server/Services/OnCallSetupReminderService.js.map +1 -0
- package/build/dist/Server/Services/ProfileAggregationService.js +68 -4
- package/build/dist/Server/Services/ProfileAggregationService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageService.js +11 -10
- package/build/dist/Server/Services/StatusPageService.js.map +1 -1
- package/build/dist/Server/Services/TeamComplianceService.js +312 -160
- package/build/dist/Server/Services/TeamComplianceService.js.map +1 -1
- package/build/dist/Server/Services/UserCallService.js +24 -1
- package/build/dist/Server/Services/UserCallService.js.map +1 -1
- package/build/dist/Server/Services/UserEmailService.js +24 -1
- package/build/dist/Server/Services/UserEmailService.js.map +1 -1
- package/build/dist/Server/Services/UserNotificationRuleAdminService.js +858 -0
- package/build/dist/Server/Services/UserNotificationRuleAdminService.js.map +1 -0
- package/build/dist/Server/Services/UserNotificationRuleService.js +2830 -175
- package/build/dist/Server/Services/UserNotificationRuleService.js.map +1 -1
- package/build/dist/Server/Services/UserOnCallLogService.js +488 -43
- package/build/dist/Server/Services/UserOnCallLogService.js.map +1 -1
- package/build/dist/Server/Services/UserPushService.js +26 -0
- package/build/dist/Server/Services/UserPushService.js.map +1 -1
- package/build/dist/Server/Services/UserService.js +10 -0
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Services/UserSmsService.js +24 -1
- package/build/dist/Server/Services/UserSmsService.js.map +1 -1
- package/build/dist/Server/Services/UserTelegramService.js +22 -1
- package/build/dist/Server/Services/UserTelegramService.js.map +1 -1
- package/build/dist/Server/Services/UserWebhookService.js +25 -1
- package/build/dist/Server/Services/UserWebhookService.js.map +1 -1
- package/build/dist/Server/Services/UserWhatsAppService.js +22 -1
- package/build/dist/Server/Services/UserWhatsAppService.js.map +1 -1
- package/build/dist/Server/Types/Database/Permissions/BasePermission.js +12 -1
- package/build/dist/Server/Types/Database/Permissions/BasePermission.js.map +1 -1
- package/build/dist/Server/Types/Database/Permissions/CreatePermission.js +126 -0
- package/build/dist/Server/Types/Database/Permissions/CreatePermission.js.map +1 -1
- package/build/dist/Server/Types/Database/Permissions/OwnerOnlyColumnPermission.js +254 -0
- package/build/dist/Server/Types/Database/Permissions/OwnerOnlyColumnPermission.js.map +1 -0
- package/build/dist/Server/Types/Database/Permissions/QueryPermission.js +47 -2
- package/build/dist/Server/Types/Database/Permissions/QueryPermission.js.map +1 -1
- package/build/dist/Server/Types/Database/Permissions/TenantPermission.js +7 -0
- package/build/dist/Server/Types/Database/Permissions/TenantPermission.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Delete.js +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Delete.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Get.js +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Get.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Patch.js +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Patch.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Post.js +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Post.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Put.js +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Put.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Utils.js +28 -0
- package/build/dist/Server/Types/Workflow/Components/API/Utils.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/BaseModel/CreateManyBaseModel.js +21 -5
- package/build/dist/Server/Types/Workflow/Components/BaseModel/CreateManyBaseModel.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/BaseModel/CreateOneBaseModel.js +14 -10
- package/build/dist/Server/Types/Workflow/Components/BaseModel/CreateOneBaseModel.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/BaseModel/ModelArguments.js +31 -0
- package/build/dist/Server/Types/Workflow/Components/BaseModel/ModelArguments.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/Conditions/IfElse.js +3 -9
- package/build/dist/Server/Types/Workflow/Components/Conditions/IfElse.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/Email.js +15 -4
- package/build/dist/Server/Types/Workflow/Components/Email.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/JavaScript.js +7 -2
- package/build/dist/Server/Types/Workflow/Components/JavaScript.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/MicrosoftTeams/SendMessageToChannel.js +1 -1
- package/build/dist/Server/Types/Workflow/Components/MicrosoftTeams/SendMessageToChannel.js.map +1 -1
- package/build/dist/Server/Types/Workflow/TriggerCode.js.map +1 -1
- package/build/dist/Server/Utils/AI/Chat/ChatAgentRunner.js +514 -56
- package/build/dist/Server/Utils/AI/Chat/ChatAgentRunner.js.map +1 -1
- package/build/dist/Server/Utils/AI/Chat/ObservabilityAssistant.js +20 -3
- package/build/dist/Server/Utils/AI/Chat/ObservabilityAssistant.js.map +1 -1
- package/build/dist/Server/Utils/AI/Chat/ObservabilityChatPrompt.js +19 -6
- package/build/dist/Server/Utils/AI/Chat/ObservabilityChatPrompt.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/AIInvestigationEngine.js +7 -0
- package/build/dist/Server/Utils/AI/SRE/AIInvestigationEngine.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/AIActionTools.js +2 -2
- package/build/dist/Server/Utils/AI/Toolbox/AIActionTools.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/AIMetaTools.js +692 -0
- package/build/dist/Server/Utils/AI/Toolbox/AIMetaTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/AlertTools.js +148 -12
- package/build/dist/Server/Utils/AI/Toolbox/AlertTools.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/IncidentTools.js +157 -10
- package/build/dist/Server/Utils/AI/Toolbox/IncidentTools.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/Index.js +37 -0
- package/build/dist/Server/Utils/AI/Toolbox/Index.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/MonitorTools.js +259 -14
- package/build/dist/Server/Utils/AI/Toolbox/MonitorTools.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/NoteWriteTools.js +235 -0
- package/build/dist/Server/Utils/AI/Toolbox/NoteWriteTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/OnCallTools.js +1000 -0
- package/build/dist/Server/Utils/AI/Toolbox/OnCallTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/RunbookTools.js +356 -0
- package/build/dist/Server/Utils/AI/Toolbox/RunbookTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/SloTools.js +394 -0
- package/build/dist/Server/Utils/AI/Toolbox/SloTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/StatusPageTools.js +465 -0
- package/build/dist/Server/Utils/AI/Toolbox/StatusPageTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/TeamTools.js +280 -0
- package/build/dist/Server/Utils/AI/Toolbox/TeamTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/TimelineTools.js +527 -0
- package/build/dist/Server/Utils/AI/Toolbox/TimelineTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/WorkflowProbeTools.js +548 -0
- package/build/dist/Server/Utils/AI/Toolbox/WorkflowProbeTools.js.map +1 -0
- package/build/dist/Server/Utils/ClientIp.js +137 -0
- package/build/dist/Server/Utils/ClientIp.js.map +1 -0
- package/build/dist/Server/Utils/Dashboard/PublicDashboardResourceListPolicy.js +38 -0
- package/build/dist/Server/Utils/Dashboard/PublicDashboardResourceListPolicy.js.map +1 -1
- package/build/dist/Server/Utils/Dashboard/PublicDashboardSloHistoryPolicy.js +89 -0
- package/build/dist/Server/Utils/Dashboard/PublicDashboardSloHistoryPolicy.js.map +1 -0
- package/build/dist/Server/Utils/Dashboard/PublicDashboardSloWidget.js +77 -0
- package/build/dist/Server/Utils/Dashboard/PublicDashboardSloWidget.js.map +1 -0
- package/build/dist/Server/Utils/Express.js +12 -12
- package/build/dist/Server/Utils/Express.js.map +1 -1
- package/build/dist/Server/Utils/LLM/LLMService.js +70 -7
- package/build/dist/Server/Utils/LLM/LLMService.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +121 -11
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/SSRFProtection.js +82 -21
- package/build/dist/Server/Utils/SSRFProtection.js.map +1 -1
- package/build/dist/Server/Utils/StartServer.js +12 -4
- package/build/dist/Server/Utils/StartServer.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/EntityRegistry.js +165 -18
- package/build/dist/Server/Utils/Telemetry/EntityRegistry.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/InventoryEntityRegistry.js +507 -0
- package/build/dist/Server/Utils/Telemetry/InventoryEntityRegistry.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js +122 -47
- package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js.map +1 -1
- package/build/dist/Server/Utils/VM/VMAPI.js +51 -4
- package/build/dist/Server/Utils/VM/VMAPI.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +7 -3
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
- package/build/dist/Types/AI/AIChatMessageStatus.js +8 -1
- package/build/dist/Types/AI/AIChatMessageStatus.js.map +1 -1
- package/build/dist/Types/AI/AIChatTypes.js +12 -0
- package/build/dist/Types/AI/AIChatTypes.js.map +1 -1
- package/build/dist/Types/Database/AccessControl/OwnerOnlyColumn.js +60 -0
- package/build/dist/Types/Database/AccessControl/OwnerOnlyColumn.js.map +1 -0
- package/build/dist/Types/Exception/ExceptionCode.js +2 -0
- package/build/dist/Types/Exception/ExceptionCode.js.map +1 -1
- package/build/dist/Types/Exception/ServiceUnavailableException.js +8 -0
- package/build/dist/Types/Exception/ServiceUnavailableException.js.map +1 -0
- package/build/dist/Types/Exception/TooManyRequestsException.js +8 -0
- package/build/dist/Types/Exception/TooManyRequestsException.js.map +1 -0
- package/build/dist/Types/IP/IP.js +87 -43
- package/build/dist/Types/IP/IP.js.map +1 -1
- package/build/dist/Types/NetworkDevice/NetworkDeviceMonitoringMethod.js +50 -0
- package/build/dist/Types/NetworkDevice/NetworkDeviceMonitoringMethod.js.map +1 -0
- package/build/dist/Types/OnCallDutyPolicy/Layer.js +186 -123
- package/build/dist/Types/OnCallDutyPolicy/Layer.js.map +1 -1
- package/build/dist/Types/OnCallDutyPolicy/OnCallDutyPolicyStatus.js +13 -0
- package/build/dist/Types/OnCallDutyPolicy/OnCallDutyPolicyStatus.js.map +1 -1
- package/build/dist/Types/OnCallDutyPolicy/ScheduleShiftUtil.js +105 -11
- package/build/dist/Types/OnCallDutyPolicy/ScheduleShiftUtil.js.map +1 -1
- package/build/dist/Types/Permission.js +174 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/SerializableObjectDictionary.js +133 -39
- package/build/dist/Types/SerializableObjectDictionary.js.map +1 -1
- package/build/dist/Types/Telemetry/EntityRelationshipType.js +1 -1
- package/build/dist/Types/Telemetry/EntitySource.js +39 -0
- package/build/dist/Types/Telemetry/EntitySource.js.map +1 -0
- package/build/dist/Types/Telemetry/EntityType.js +28 -1
- package/build/dist/Types/Telemetry/EntityType.js.map +1 -1
- package/build/dist/Types/Telemetry/EntityTypeGroups.js +57 -0
- package/build/dist/Types/Telemetry/EntityTypeGroups.js.map +1 -0
- package/build/dist/Types/Workflow/Component.js +21 -0
- package/build/dist/Types/Workflow/Component.js.map +1 -1
- package/build/dist/Types/Workflow/Components/API.js +35 -0
- package/build/dist/Types/Workflow/Components/API.js.map +1 -1
- package/build/dist/Types/Workflow/Components/BaseModel.js +68 -26
- package/build/dist/Types/Workflow/Components/BaseModel.js.map +1 -1
- package/build/dist/Types/Workflow/Components/Discord.js +1 -0
- package/build/dist/Types/Workflow/Components/Discord.js.map +1 -1
- package/build/dist/Types/Workflow/Components/Email.js +12 -3
- package/build/dist/Types/Workflow/Components/Email.js.map +1 -1
- package/build/dist/Types/Workflow/Components/JavaScript.js +7 -0
- package/build/dist/Types/Workflow/Components/JavaScript.js.map +1 -1
- package/build/dist/Types/Workflow/Components/MicrosoftTeams.js +3 -2
- package/build/dist/Types/Workflow/Components/MicrosoftTeams.js.map +1 -1
- package/build/dist/Types/Workflow/Components/Slack.js +1 -0
- package/build/dist/Types/Workflow/Components/Slack.js.map +1 -1
- package/build/dist/Types/Workflow/Components/Telegram.js +1 -0
- package/build/dist/Types/Workflow/Components/Telegram.js.map +1 -1
- package/build/dist/Types/Workflow/StepTrace.js +104 -0
- package/build/dist/Types/Workflow/StepTrace.js.map +1 -0
- package/build/dist/Types/Workflow/TemplateSyntax.js +338 -0
- package/build/dist/Types/Workflow/TemplateSyntax.js.map +1 -0
- package/build/dist/Types/Workflow/Templates.js +2111 -0
- package/build/dist/Types/Workflow/Templates.js.map +1 -0
- package/build/dist/UI/Components/Calendar/Calendar.js +1 -1
- package/build/dist/UI/Components/Calendar/Calendar.js.map +1 -1
- package/build/dist/UI/Components/Checkbox/Checkbox.js +1 -1
- package/build/dist/UI/Components/Checkbox/Checkbox.js.map +1 -1
- package/build/dist/UI/Components/Date/CustomTimeRangeModal.js +126 -0
- package/build/dist/UI/Components/Date/CustomTimeRangeModal.js.map +1 -0
- package/build/dist/UI/Components/Date/TimeRangePickerDropdown.js +123 -0
- package/build/dist/UI/Components/Date/TimeRangePickerDropdown.js.map +1 -0
- package/build/dist/UI/Components/Dictionary/Dictionary.js +47 -17
- package/build/dist/UI/Components/Dictionary/Dictionary.js.map +1 -1
- package/build/dist/UI/Components/FormModal/BasicFormModal.js.map +1 -1
- package/build/dist/UI/Components/Forms/Fields/ColorPicker.js +52 -13
- package/build/dist/UI/Components/Forms/Fields/ColorPicker.js.map +1 -1
- package/build/dist/UI/Components/Forms/Fields/IconPicker.js +28 -12
- package/build/dist/UI/Components/Forms/Fields/IconPicker.js.map +1 -1
- package/build/dist/UI/Components/Forms/Validation.js +44 -0
- package/build/dist/UI/Components/Forms/Validation.js.map +1 -1
- package/build/dist/UI/Components/Header/HeaderIconDropdownButton.js +27 -4
- package/build/dist/UI/Components/Header/HeaderIconDropdownButton.js.map +1 -1
- package/build/dist/UI/Components/Input/Input.js +13 -4
- package/build/dist/UI/Components/Input/Input.js.map +1 -1
- package/build/dist/UI/Components/KeyboardShortcut/KeyboardKey.js +163 -0
- package/build/dist/UI/Components/KeyboardShortcut/KeyboardKey.js.map +1 -0
- package/build/dist/UI/Components/KeyboardShortcut/KeyboardShortcut.js +47 -0
- package/build/dist/UI/Components/KeyboardShortcut/KeyboardShortcut.js.map +1 -0
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js +4 -4
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/ActiveFilterChips.js +11 -1
- package/build/dist/UI/Components/LogsViewer/components/ActiveFilterChips.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/KeyboardShortcutsHelp.js +10 -8
- package/build/dist/UI/Components/LogsViewer/components/KeyboardShortcutsHelp.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogDetailsPanel.js +227 -14
- package/build/dist/UI/Components/LogsViewer/components/LogDetailsPanel.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogTimeRangePicker.js +5 -108
- package/build/dist/UI/Components/LogsViewer/components/LogTimeRangePicker.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsAnalyticsView.js +5 -0
- package/build/dist/UI/Components/LogsViewer/components/LogsAnalyticsView.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsTable.js +69 -5
- package/build/dist/UI/Components/LogsViewer/components/LogsTable.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsViewerToolbar.js +8 -0
- package/build/dist/UI/Components/LogsViewer/components/LogsViewerToolbar.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/types.js.map +1 -1
- package/build/dist/UI/Components/Markdown.tsx/MarkdownEditor.js +9 -2
- package/build/dist/UI/Components/Markdown.tsx/MarkdownEditor.js.map +1 -1
- package/build/dist/UI/Components/Modal/Modal.js +31 -5
- package/build/dist/UI/Components/Modal/Modal.js.map +1 -1
- package/build/dist/UI/Components/Navbar/NavBarMenuModal.js +8 -21
- package/build/dist/UI/Components/Navbar/NavBarMenuModal.js.map +1 -1
- package/build/dist/UI/Components/ProjectInvitations/PendingProjectInvitations.js +251 -0
- package/build/dist/UI/Components/ProjectInvitations/PendingProjectInvitations.js.map +1 -0
- package/build/dist/UI/Components/SimpleLogViewer/SimpleLogViewer.js +9 -2
- package/build/dist/UI/Components/SimpleLogViewer/SimpleLogViewer.js.map +1 -1
- package/build/dist/UI/Components/Table/Table.js +27 -15
- package/build/dist/UI/Components/Table/Table.js.map +1 -1
- package/build/dist/UI/Components/Table/TableBody.js +24 -18
- package/build/dist/UI/Components/Table/TableBody.js.map +1 -1
- package/build/dist/UI/Components/Table/TableHeader.js +9 -1
- package/build/dist/UI/Components/Table/TableHeader.js.map +1 -1
- package/build/dist/UI/Components/Table/TableRow.js +29 -21
- package/build/dist/UI/Components/Table/TableRow.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryTimeRangePicker.js +5 -105
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryTimeRangePicker.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ArgumentsForm.js +261 -14
- package/build/dist/UI/Components/Workflow/ArgumentsForm.js.map +1 -1
- package/build/dist/UI/Components/Workflow/Component.js +20 -19
- package/build/dist/UI/Components/Workflow/Component.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentReturnValueViewer.js +10 -1
- package/build/dist/UI/Components/Workflow/ComponentReturnValueViewer.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentSettingsModal.js +35 -7
- package/build/dist/UI/Components/Workflow/ComponentSettingsModal.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentValuePickerModal.js +57 -7
- package/build/dist/UI/Components/Workflow/ComponentValuePickerModal.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentsModal.js +53 -18
- package/build/dist/UI/Components/Workflow/ComponentsModal.js.map +1 -1
- package/build/dist/UI/Components/Workflow/DocumentationViewer.js +19 -6
- package/build/dist/UI/Components/Workflow/DocumentationViewer.js.map +1 -1
- package/build/dist/UI/Components/Workflow/GraphLint.js +425 -0
- package/build/dist/UI/Components/Workflow/GraphLint.js.map +1 -0
- package/build/dist/UI/Components/Workflow/GraphLintSummary.js +231 -0
- package/build/dist/UI/Components/Workflow/GraphLintSummary.js.map +1 -0
- package/build/dist/UI/Components/Workflow/ModelColumnEditor.js +320 -0
- package/build/dist/UI/Components/Workflow/ModelColumnEditor.js.map +1 -0
- package/build/dist/UI/Components/Workflow/ModelSchema.js +156 -0
- package/build/dist/UI/Components/Workflow/ModelSchema.js.map +1 -0
- package/build/dist/UI/Components/Workflow/RunForm.js +22 -6
- package/build/dist/UI/Components/Workflow/RunForm.js.map +1 -1
- package/build/dist/UI/Components/Workflow/RunStatusWatcher.js +76 -0
- package/build/dist/UI/Components/Workflow/RunStatusWatcher.js.map +1 -0
- package/build/dist/UI/Components/Workflow/StepTraceViewer.js +76 -0
- package/build/dist/UI/Components/Workflow/StepTraceViewer.js.map +1 -0
- package/build/dist/UI/Components/Workflow/UseRunWatch.js +123 -0
- package/build/dist/UI/Components/Workflow/UseRunWatch.js.map +1 -0
- package/build/dist/UI/Components/Workflow/Utils.js +73 -1
- package/build/dist/UI/Components/Workflow/Utils.js.map +1 -1
- package/build/dist/UI/Components/Workflow/VariableModal.js +3 -2
- package/build/dist/UI/Components/Workflow/VariableModal.js.map +1 -1
- package/build/dist/UI/Components/Workflow/Workflow.js +92 -7
- package/build/dist/UI/Components/Workflow/Workflow.js.map +1 -1
- package/build/dist/UI/Components/Workflow/WorkflowIssuesModal.js +99 -0
- package/build/dist/UI/Components/Workflow/WorkflowIssuesModal.js.map +1 -0
- package/build/dist/UI/Components/Workflow/WorkflowLogModal.js +56 -0
- package/build/dist/UI/Components/Workflow/WorkflowLogModal.js.map +1 -0
- package/build/dist/UI/Components/Workflow/WorkflowStatusBar.js +92 -0
- package/build/dist/UI/Components/Workflow/WorkflowStatusBar.js.map +1 -0
- package/build/dist/UI/Types/LayeredDismissal.js +21 -0
- package/build/dist/UI/Types/LayeredDismissal.js.map +1 -0
- package/build/dist/UI/Types/UseAnchoredFieldPopup.js +74 -1
- package/build/dist/UI/Types/UseAnchoredFieldPopup.js.map +1 -1
- package/build/dist/UI/Utils/AIChatExport/ConversationMarkdown.js +9 -0
- package/build/dist/UI/Utils/AIChatExport/ConversationMarkdown.js.map +1 -1
- package/build/dist/UI/Utils/ModelAPI/ModelAPI.js +1 -1
- package/build/dist/UI/Utils/ModelAPI/ModelAPI.js.map +1 -1
- package/build/dist/UI/Utils/Platform.js +118 -0
- package/build/dist/UI/Utils/Platform.js.map +1 -0
- package/build/dist/UI/Utils/ProjectInvitationDisplay.js +106 -0
- package/build/dist/UI/Utils/ProjectInvitationDisplay.js.map +1 -0
- package/build/dist/Utils/Monitor/NetworkDeviceLinkRuleUtil.js +108 -0
- package/build/dist/Utils/Monitor/NetworkDeviceLinkRuleUtil.js.map +1 -0
- package/build/dist/Utils/Monitor/NetworkDeviceRoleUtil.js +386 -0
- package/build/dist/Utils/Monitor/NetworkDeviceRoleUtil.js.map +1 -0
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js +661 -126
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js.map +1 -1
- package/build/dist/Utils/Telemetry/CrossSignalScope.js +328 -0
- package/build/dist/Utils/Telemetry/CrossSignalScope.js.map +1 -0
- package/build/dist/Utils/Telemetry/EntityKey.js +57 -5
- package/build/dist/Utils/Telemetry/EntityKey.js.map +1 -1
- package/build/dist/Utils/Telemetry/EntityRelationship.js +1 -1
- package/jest.config.json +1 -0
- package/package.json +1 -1
- package/build/dist/Models/DatabaseModels/TelemetryEntity.js.map +0 -1
- package/build/dist/Models/DatabaseModels/TelemetryEntityRelationship.js.map +0 -1
- package/build/dist/Server/Services/TelemetryEntityRelationshipService.js.map +0 -1
- package/build/dist/Server/Services/TelemetryEntityService.js.map +0 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Pure helpers behind the builder's "what happened to the run I just started"
|
|
3
|
+
* strip.
|
|
4
|
+
*
|
|
5
|
+
* Triggering a run from the builder used to end at a modal saying the workflow
|
|
6
|
+
* had been scheduled and that the Logs tab would know more. That left the one
|
|
7
|
+
* question the builder actually has — did it work — to a different page, a
|
|
8
|
+
* table, and a text blob. The runner does not hand back a log id at enqueue
|
|
9
|
+
* time (RunWorkflow creates the WorkflowLog itself once it picks the job up),
|
|
10
|
+
* so the builder watches for the run instead of being told about it.
|
|
11
|
+
*
|
|
12
|
+
* The logic that decides when to stop watching lives here, separate from the
|
|
13
|
+
* page, because it is the part worth testing.
|
|
14
|
+
*/
|
|
15
|
+
import WorkflowStatus from "../../../Types/Workflow/WorkflowStatus";
|
|
16
|
+
/**
|
|
17
|
+
* Statuses a run never moves on from. Waiting is not one of them — a Sleep
|
|
18
|
+
* step parks a run for as long as it likes and it carries on afterwards.
|
|
19
|
+
*/
|
|
20
|
+
const TERMINAL_STATUSES = [
|
|
21
|
+
WorkflowStatus.Success,
|
|
22
|
+
WorkflowStatus.Error,
|
|
23
|
+
WorkflowStatus.Timeout,
|
|
24
|
+
WorkflowStatus.WorkflowCountExceeded,
|
|
25
|
+
];
|
|
26
|
+
export const isTerminalRunStatus = (status) => {
|
|
27
|
+
if (!status) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
return TERMINAL_STATUSES.includes(status);
|
|
31
|
+
};
|
|
32
|
+
export const isFailedRunStatus = (status) => {
|
|
33
|
+
return (status === WorkflowStatus.Error ||
|
|
34
|
+
status === WorkflowStatus.Timeout ||
|
|
35
|
+
status === WorkflowStatus.WorkflowCountExceeded);
|
|
36
|
+
};
|
|
37
|
+
/*
|
|
38
|
+
* How long to keep watching. A run that suspends on a Sleep step can outlive
|
|
39
|
+
* any sensible watch, so the strip stops following it and points at the Logs
|
|
40
|
+
* tab rather than polling for hours.
|
|
41
|
+
*/
|
|
42
|
+
export const MAX_RUN_WATCH_POLLS = 60;
|
|
43
|
+
export const RUN_WATCH_POLL_INTERVAL_MS = 2000;
|
|
44
|
+
/**
|
|
45
|
+
* What the strip should say, and whether to keep looking.
|
|
46
|
+
*/
|
|
47
|
+
export const decideRunWatch = (params) => {
|
|
48
|
+
if (params.pollCount >= MAX_RUN_WATCH_POLLS) {
|
|
49
|
+
return {
|
|
50
|
+
shouldContinue: false,
|
|
51
|
+
message: "This run is taking a while. Open the Logs tab to follow it from there.",
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
if (!params.run) {
|
|
55
|
+
return { shouldContinue: true, message: "Starting run…" };
|
|
56
|
+
}
|
|
57
|
+
if (isTerminalRunStatus(params.run.status)) {
|
|
58
|
+
return {
|
|
59
|
+
shouldContinue: false,
|
|
60
|
+
message: isFailedRunStatus(params.run.status)
|
|
61
|
+
? `Run ${params.run.status.toLowerCase()}. Open the run log to see why.`
|
|
62
|
+
: "Run finished successfully.",
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
if (params.run.status === WorkflowStatus.Waiting) {
|
|
66
|
+
return {
|
|
67
|
+
shouldContinue: false,
|
|
68
|
+
message: "This run is sleeping and will carry on by itself. Follow it in the Logs tab.",
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
shouldContinue: true,
|
|
73
|
+
message: `Run ${params.run.status.toLowerCase()}…`,
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=RunStatusWatcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RunStatusWatcher.js","sourceRoot":"","sources":["../../../../../UI/Components/Workflow/RunStatusWatcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,cAAc,MAAM,wCAAwC,CAAC;AAEpE;;;GAGG;AACH,MAAM,iBAAiB,GAA0B;IAC/C,cAAc,CAAC,OAAO;IACtB,cAAc,CAAC,KAAK;IACpB,cAAc,CAAC,OAAO;IACtB,cAAc,CAAC,qBAAqB;CACrC,CAAC;AAMF,MAAM,CAAC,MAAM,mBAAmB,GAAgC,CAC9D,MAAyC,EAChC,EAAE;IACX,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,iBAAiB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC5C,CAAC,CAAC;AAMF,MAAM,CAAC,MAAM,iBAAiB,GAA8B,CAC1D,MAAyC,EAChC,EAAE;IACX,OAAO,CACL,MAAM,KAAK,cAAc,CAAC,KAAK;QAC/B,MAAM,KAAK,cAAc,CAAC,OAAO;QACjC,MAAM,KAAK,cAAc,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
|
+
* The raw log is still there and still useful — it carries the component's own
|
|
5
|
+
* log lines and the warnings the runner emits — but "what did this step
|
|
6
|
+
* receive, what did it return, and where did it go next" is a question about
|
|
7
|
+
* structure, and answering it by scanning a newline-joined blob was the whole
|
|
8
|
+
* problem.
|
|
9
|
+
*/
|
|
10
|
+
import Icon from "../Icon/Icon";
|
|
11
|
+
import IconProp from "../../../Types/Icon/IconProp";
|
|
12
|
+
import { WorkflowStepStatus, } from "../../../Types/Workflow/StepTrace";
|
|
13
|
+
import React, { useState } from "react";
|
|
14
|
+
export const formatStepDuration = (durationInMs) => {
|
|
15
|
+
if (durationInMs < 1000) {
|
|
16
|
+
return `${durationInMs}ms`;
|
|
17
|
+
}
|
|
18
|
+
if (durationInMs < 60000) {
|
|
19
|
+
return `${(durationInMs / 1000).toFixed(1)}s`;
|
|
20
|
+
}
|
|
21
|
+
const minutes = Math.floor(durationInMs / 60000);
|
|
22
|
+
const seconds = Math.round((durationInMs % 60000) / 1000);
|
|
23
|
+
return `${minutes}m ${seconds}s`;
|
|
24
|
+
};
|
|
25
|
+
const ValueBlock = (props) => {
|
|
26
|
+
const keys = Object.keys(props.values || {});
|
|
27
|
+
return (React.createElement("div", null,
|
|
28
|
+
React.createElement("p", { className: "text-[11px] font-semibold uppercase tracking-wider text-gray-500 mb-1" }, props.title),
|
|
29
|
+
keys.length === 0 ? (React.createElement("p", { className: "text-sm text-gray-400" }, "None")) : (React.createElement("dl", { className: "space-y-1" }, keys.map((key) => {
|
|
30
|
+
const value = props.values[key];
|
|
31
|
+
const text = typeof value === "string"
|
|
32
|
+
? value
|
|
33
|
+
: JSON.stringify(value, null, 2);
|
|
34
|
+
return (React.createElement("div", { key: key, className: "text-sm" },
|
|
35
|
+
React.createElement("dt", { className: "text-gray-500 font-medium" }, key),
|
|
36
|
+
React.createElement("dd", { className: "text-gray-800 font-mono text-xs whitespace-pre-wrap break-all" }, text)));
|
|
37
|
+
})))));
|
|
38
|
+
};
|
|
39
|
+
const StepRow = (props) => {
|
|
40
|
+
const [isOpen, setIsOpen] = useState(props.step.status === WorkflowStepStatus.Error);
|
|
41
|
+
const isError = props.step.status === WorkflowStepStatus.Error;
|
|
42
|
+
return (React.createElement("div", { className: `rounded-md border ${isError ? "border-red-200 bg-red-50" : "border-gray-200 bg-white"}` },
|
|
43
|
+
React.createElement("button", { type: "button", "aria-expanded": isOpen, className: "w-full text-left p-3 flex items-center gap-3 cursor-pointer", onClick: () => {
|
|
44
|
+
setIsOpen(!isOpen);
|
|
45
|
+
} },
|
|
46
|
+
React.createElement("span", { className: "text-xs text-gray-400 w-5 shrink-0" }, props.index + 1),
|
|
47
|
+
React.createElement(Icon, { icon: isError ? IconProp.Alert : IconProp.CheckCircle, className: `h-4 w-4 shrink-0 ${isError ? "text-red-500" : "text-green-500"}` }),
|
|
48
|
+
React.createElement("span", { className: "flex-1 min-w-0" },
|
|
49
|
+
React.createElement("span", { className: "block text-sm font-medium text-gray-900 truncate" }, props.step.title),
|
|
50
|
+
React.createElement("span", { className: "block text-xs text-gray-500 truncate" }, props.step.componentId)),
|
|
51
|
+
React.createElement("span", { className: "text-xs text-gray-500 shrink-0" }, formatStepDuration(props.step.durationInMs)),
|
|
52
|
+
props.step.executedPort && (React.createElement("span", { className: "text-xs text-gray-500 shrink-0 hidden sm:inline" },
|
|
53
|
+
"\u2192 ",
|
|
54
|
+
props.step.executedPort))),
|
|
55
|
+
isOpen && (React.createElement("div", { className: "border-t border-gray-200 p-3 space-y-3" },
|
|
56
|
+
props.step.errorMessage && (React.createElement("p", { className: "text-sm text-red-700" }, props.step.errorMessage)),
|
|
57
|
+
React.createElement(ValueBlock, { title: "Received", values: props.step.argumentValues }),
|
|
58
|
+
React.createElement(ValueBlock, { title: "Returned", values: props.step.returnValues })))));
|
|
59
|
+
};
|
|
60
|
+
const StepTraceViewer = (props) => {
|
|
61
|
+
var _a;
|
|
62
|
+
const steps = ((_a = props.trace) === null || _a === void 0 ? void 0 : _a.steps) || [];
|
|
63
|
+
if (steps.length === 0) {
|
|
64
|
+
return (React.createElement("p", { className: "text-sm text-gray-500" }, "This run has no recorded steps. Runs from before step recording was added show only their full log."));
|
|
65
|
+
}
|
|
66
|
+
return (React.createElement("div", { className: "space-y-2" },
|
|
67
|
+
props.trace.truncated && (React.createElement("p", { className: "text-sm text-amber-700" },
|
|
68
|
+
"Only the last ",
|
|
69
|
+
steps.length,
|
|
70
|
+
" steps of this run were kept.")),
|
|
71
|
+
steps.map((step, index) => {
|
|
72
|
+
return React.createElement(StepRow, { key: index, step: step, index: index });
|
|
73
|
+
})));
|
|
74
|
+
};
|
|
75
|
+
export default StepTraceViewer;
|
|
76
|
+
//# sourceMappingURL=StepTraceViewer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepTraceViewer.js","sourceRoot":"","sources":["../../../../../UI/Components/Workflow/StepTraceViewer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,IAAI,MAAM,cAAc,CAAC;AAChC,OAAO,QAAQ,MAAM,8BAA8B,CAAC;AAEpD,OAAO,EACL,kBAAkB,GAGnB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,EAAmC,QAAQ,EAAE,MAAM,OAAO,CAAC;AAQzE,MAAM,CAAC,MAAM,kBAAkB,GAA2B,CACxD,YAAoB,EACZ,EAAE;IACV,IAAI,YAAY,GAAG,IAAI,EAAE,CAAC;QACxB,OAAO,GAAG,YAAY,IAAI,CAAC;IAC7B,CAAC;IAED,IAAI,YAAY,GAAG,KAAK,EAAE,CAAC;QACzB,OAAO,GAAG,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IAChD,CAAC;IAED,MAAM,OAAO,GAAW,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC;IACzD,MAAM,OAAO,GAAW,IAAI,CAAC,KAAK,CAAC,CAAC,YAAY,GAAG,KAAK,CAAC,G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IAAI,CAAC,cAAc,GAAI;YAClE,oBAAC,UAAU,IAAC,KAAK,EAAC,UAAU,EAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,YAAY,GAAI,CAC5D,CACP,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,eAAe,GAAsC,CACzD,KAAqB,EACP,EAAE;;IAChB,MAAM,KAAK,GAAkC,CAAA,MAAA,KAAK,CAAC,KAAK,0CAAE,KAAK,KAAI,EAAE,CAAC;IAEtE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,CACL,2BAAG,SAAS,EAAC,uBAAuB,0GAGhC,CACL,CAAC;IACJ,CAAC;IAED,OAAO,CACL,6BAAK,SAAS,EAAC,WAAW;QACvB,KAAK,CAAC,KAAK,CAAC,SAAS,IAAI,CACxB,2BAAG,SAAS,EAAC,wBAAwB;;YACpB,KAAK,CAAC,MAAM;4CACzB,CACL;QAEA,KAAK,CAAC,GAAG,CAAC,CAAC,IAA4B,EAAE,KAAa,EAAE,EAAE;YACzD,OAAO,oBAAC,OAAO,IAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,GAAI,CAAC;QAC3D,CAAC,CAAC,CACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Following the run the builder just started, until it settles.
|
|
3
|
+
*
|
|
4
|
+
* RunStatusWatcher decides what to say and when to stop; this is the part that
|
|
5
|
+
* holds a timer, a generation counter and the run's log, and it lives here
|
|
6
|
+
* rather than in the page so it can be exercised through a real component
|
|
7
|
+
* lifecycle. Fetching is injected: the page knows how to ask the API for a
|
|
8
|
+
* run, and the hook only cares that asking returns one.
|
|
9
|
+
*/
|
|
10
|
+
import { RUN_WATCH_POLL_INTERVAL_MS, decideRunWatch, isFailedRunStatus, } from "./RunStatusWatcher";
|
|
11
|
+
import { emptyTrace, } from "../../../Types/Workflow/StepTrace";
|
|
12
|
+
import { useEffect, useRef, useState } from "react";
|
|
13
|
+
const useRunWatch = (params) => {
|
|
14
|
+
const [message, setMessage] = useState(null);
|
|
15
|
+
const [hasFailed, setHasFailed] = useState(false);
|
|
16
|
+
const [isWatching, setIsWatching] = useState(false);
|
|
17
|
+
const [logs, setLogs] = useState("");
|
|
18
|
+
const [stepTrace, setStepTrace] = useState(emptyTrace());
|
|
19
|
+
/*
|
|
20
|
+
* The page rebuilds its fetch function on every render. Reading it through a
|
|
21
|
+
* ref keeps a poll that is already in flight from being pinned to the
|
|
22
|
+
* function it started with.
|
|
23
|
+
*/
|
|
24
|
+
const fetchLatestRun = useRef(params.fetchLatestRun);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
fetchLatestRun.current = params.fetchLatestRun;
|
|
27
|
+
}, [params.fetchLatestRun]);
|
|
28
|
+
const pollTimer = useRef(null);
|
|
29
|
+
const runIdBeforeTrigger = useRef(null);
|
|
30
|
+
/*
|
|
31
|
+
* Which watch a poll belongs to. A poll is a pending promise, so starting a
|
|
32
|
+
* second run while the first is mid-request leaves that request in flight —
|
|
33
|
+
* it comes back, and without this would report on the wrong run and schedule
|
|
34
|
+
* a second chain of timers alongside the new one.
|
|
35
|
+
*/
|
|
36
|
+
const watchGeneration = useRef(0);
|
|
37
|
+
const isMounted = useRef(true);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
isMounted.current = true;
|
|
40
|
+
return () => {
|
|
41
|
+
isMounted.current = false;
|
|
42
|
+
if (pollTimer.current) {
|
|
43
|
+
clearTimeout(pollTimer.current);
|
|
44
|
+
pollTimer.current = null;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}, []);
|
|
48
|
+
const pollRun = async (pollCount, generation) => {
|
|
49
|
+
let run = null;
|
|
50
|
+
try {
|
|
51
|
+
run = await fetchLatestRun.current();
|
|
52
|
+
}
|
|
53
|
+
catch (_a) {
|
|
54
|
+
/*
|
|
55
|
+
* A failed poll is not a failed run. Keep watching — the next poll may
|
|
56
|
+
* well succeed, and the Logs tab is the fallback either way.
|
|
57
|
+
*/
|
|
58
|
+
run = null;
|
|
59
|
+
}
|
|
60
|
+
// This watch was replaced or the page went away while we were asking.
|
|
61
|
+
if (!isMounted.current || generation !== watchGeneration.current) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
// Not our run yet: the worker has not created its log.
|
|
65
|
+
if (run && run.runId === runIdBeforeTrigger.current) {
|
|
66
|
+
run = null;
|
|
67
|
+
}
|
|
68
|
+
if (run) {
|
|
69
|
+
setLogs(run.logs);
|
|
70
|
+
setStepTrace(run.stepTrace);
|
|
71
|
+
}
|
|
72
|
+
const decision = decideRunWatch({
|
|
73
|
+
run: run,
|
|
74
|
+
pollCount: pollCount,
|
|
75
|
+
});
|
|
76
|
+
setMessage(decision.message);
|
|
77
|
+
setHasFailed(isFailedRunStatus(run === null || run === void 0 ? void 0 : run.status));
|
|
78
|
+
if (!decision.shouldContinue) {
|
|
79
|
+
setIsWatching(false);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
pollTimer.current = setTimeout(() => {
|
|
83
|
+
void pollRun(pollCount + 1, generation);
|
|
84
|
+
}, RUN_WATCH_POLL_INTERVAL_MS);
|
|
85
|
+
};
|
|
86
|
+
const captureRunBeforeTrigger = async () => {
|
|
87
|
+
try {
|
|
88
|
+
const existing = await fetchLatestRun.current();
|
|
89
|
+
runIdBeforeTrigger.current = existing ? existing.runId : null;
|
|
90
|
+
}
|
|
91
|
+
catch (_a) {
|
|
92
|
+
/*
|
|
93
|
+
* Without a baseline the first run we see counts as ours. That is the
|
|
94
|
+
* kinder failure: showing the previous run beats showing nothing.
|
|
95
|
+
*/
|
|
96
|
+
runIdBeforeTrigger.current = null;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
const startWatchingRun = () => {
|
|
100
|
+
if (pollTimer.current) {
|
|
101
|
+
clearTimeout(pollTimer.current);
|
|
102
|
+
pollTimer.current = null;
|
|
103
|
+
}
|
|
104
|
+
watchGeneration.current = watchGeneration.current + 1;
|
|
105
|
+
setHasFailed(false);
|
|
106
|
+
setMessage("Starting run…");
|
|
107
|
+
setLogs("");
|
|
108
|
+
setStepTrace(emptyTrace());
|
|
109
|
+
setIsWatching(true);
|
|
110
|
+
void pollRun(0, watchGeneration.current);
|
|
111
|
+
};
|
|
112
|
+
return {
|
|
113
|
+
message: message,
|
|
114
|
+
hasFailed: hasFailed,
|
|
115
|
+
isWatching: isWatching,
|
|
116
|
+
logs: logs,
|
|
117
|
+
stepTrace: stepTrace,
|
|
118
|
+
captureRunBeforeTrigger: captureRunBeforeTrigger,
|
|
119
|
+
startWatchingRun: startWatchingRun,
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
export default useRunWatch;
|
|
123
|
+
//# sourceMappingURL=UseRunWatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UseRunWatch.js","sourceRoot":"","sources":["../../../../../UI/Components/Workflow/UseRunWatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,0BAA0B,EAG1B,cAAc,EACd,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,UAAU,GACX,MAAM,mCAAmC,CAAC;AAC3C,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAyC3D,MAAM,WAAW,GAAwB,CACvC,MAAyB,EACN,EAAE;IACrB,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAC5D,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IAC3D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IAC7D,MAAM,CAAC,IAAI,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CAAC;IACH,CAAC,CAAC;IAEJ,MAAM,gBAAgB,GAAe,GAAS,EAAE;QAC9C,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;YACtB,YAAY,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YAChC,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC;QAC3B,CAAC;QAED,eAAe,CAAC,OAAO,GAAG,eAAe,CAAC,OAAO,GAAG,CAAC,CAAC;QAEtD,YAAY,CAAC,KAAK,CAAC,CAAC;QACpB,UAAU,CAAC,eAAe,CAAC,CAAC;QAC5B,OAAO,CAAC,EAAE,CAAC,CAAC;QACZ,YAAY,CAAC,UAAU,EAAE,CAAC,CAAC;QAC3B,aAAa,CAAC,IAAI,CAAC,CAAC;QAEpB,KAAK,OAAO,CAAC,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC,CAAC;IAEF,OAAO;QACL,OAAO,EAAE,OAAO;QAChB,SAAS,EAAE,SAAS;QACpB,UAAU,EAAE,UAAU;QACtB,IAAI,EAAE,IAAI;QACV,SAAS,EAAE,SAAS;QACpB,uBAAuB,EAAE,uBAAuB;QAChD,gBAAgB,EAAE,gBAAgB;KACnC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import FormFieldSchemaType from "../Forms/Types/FormFieldSchemaType";
|
|
2
2
|
import IconProp from "../../../Types/Icon/IconProp";
|
|
3
|
+
import JSONFunctions from "../../../Types/JSONFunctions";
|
|
3
4
|
import { ComponentInputType, } from "../../../Types/Workflow/Component";
|
|
4
5
|
import Components, { Categories } from "../../../Types/Workflow/Components";
|
|
5
6
|
import BaseModelComponentFactory from "../../../Types/Workflow/Components/BaseModel";
|
|
@@ -19,6 +20,63 @@ export const loadComponentsAndCategories = () => {
|
|
|
19
20
|
}
|
|
20
21
|
return { components: initComponents, categories: initCategories };
|
|
21
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* The key/value view of a StringDictionary argument, or null when the value
|
|
25
|
+
* cannot be shown that way and belongs in the JSON editor instead.
|
|
26
|
+
*
|
|
27
|
+
* Editable as rows:
|
|
28
|
+
* - nothing yet (a new component)
|
|
29
|
+
* - an object of primitives, whether stored as an object (written by the row
|
|
30
|
+
* editor) or as a JSON string (written by the old JSON editor, and by
|
|
31
|
+
* every workflow that already exists)
|
|
32
|
+
*
|
|
33
|
+
* Not editable as rows, so left in the JSON editor:
|
|
34
|
+
* - a whole-field template such as {{local.components.x.returnValues.headers}},
|
|
35
|
+
* which substitutes an entire object at run time and is not JSON as written
|
|
36
|
+
* - text that does not parse, which is exactly the case where the builder
|
|
37
|
+
* most needs to see and fix what they typed
|
|
38
|
+
* - nested objects or arrays, which the row editor cannot represent and would
|
|
39
|
+
* therefore quietly discard
|
|
40
|
+
*/
|
|
41
|
+
export const parseStringDictionaryValue = (argValue) => {
|
|
42
|
+
if (argValue === null || argValue === undefined || argValue === "") {
|
|
43
|
+
return {};
|
|
44
|
+
}
|
|
45
|
+
let candidate = argValue;
|
|
46
|
+
if (typeof candidate === "string") {
|
|
47
|
+
if (candidate.trim() === "") {
|
|
48
|
+
return {};
|
|
49
|
+
}
|
|
50
|
+
/*
|
|
51
|
+
* JSONFunctions.parse is JSON5, which is what the components themselves use
|
|
52
|
+
* on these values (ApiComponentUtils.sanitizeArgs). Parsing more strictly
|
|
53
|
+
* here than the runtime does would push a value that works today into the
|
|
54
|
+
* JSON editor for no reason.
|
|
55
|
+
*/
|
|
56
|
+
try {
|
|
57
|
+
candidate = JSONFunctions.parse(candidate);
|
|
58
|
+
}
|
|
59
|
+
catch (_a) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (typeof candidate !== "object" ||
|
|
64
|
+
candidate === null ||
|
|
65
|
+
Array.isArray(candidate)) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
const entries = candidate;
|
|
69
|
+
for (const key of Object.keys(entries)) {
|
|
70
|
+
const value = entries[key];
|
|
71
|
+
const isPrimitive = typeof value === "string" ||
|
|
72
|
+
typeof value === "number" ||
|
|
73
|
+
typeof value === "boolean";
|
|
74
|
+
if (!isPrimitive) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return entries;
|
|
79
|
+
};
|
|
22
80
|
export const componentInputTypeToFormFieldType = (componentInputType, argValue) => {
|
|
23
81
|
// first priority.
|
|
24
82
|
if (componentInputType === ComponentInputType.BaseModel) {
|
|
@@ -61,9 +119,23 @@ export const componentInputTypeToFormFieldType = (componentInputType, argValue)
|
|
|
61
119
|
fieldType: FormFieldSchemaType.JSON,
|
|
62
120
|
};
|
|
63
121
|
}
|
|
122
|
+
/*
|
|
123
|
+
* A dictionary of strings is a list of key/value pairs — request headers,
|
|
124
|
+
* query params — and asking someone to hand-write the braces and commas
|
|
125
|
+
* for that is where a good share of workflow JSON mistakes come from. Give
|
|
126
|
+
* it the key/value row editor instead.
|
|
127
|
+
*
|
|
128
|
+
* Values written before this change are JSON strings, and a value can also
|
|
129
|
+
* be something the row editor cannot represent (a whole-field
|
|
130
|
+
* {{...}} substitution, or nested objects). parseStringDictionaryValue
|
|
131
|
+
* decides; anything it cannot represent stays in the JSON editor, so no
|
|
132
|
+
* existing value is ever silently dropped on the floor.
|
|
133
|
+
*/
|
|
64
134
|
if (componentInputType === ComponentInputType.StringDictionary) {
|
|
65
135
|
return {
|
|
66
|
-
fieldType:
|
|
136
|
+
fieldType: parseStringDictionaryValue(argValue) === null
|
|
137
|
+
? FormFieldSchemaType.JSON
|
|
138
|
+
: FormFieldSchemaType.Dictionary,
|
|
67
139
|
};
|
|
68
140
|
}
|
|
69
141
|
if (componentInputType === ComponentInputType.LongText) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../../../UI/Components/Workflow/Utils.ts"],"names":[],"mappings":"AACA,OAAO,mBAAmB,MAAM,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;IACJ,CAAC;IAED,IAAI,kBAAkB,KAAK,kBAAkB,CAAC,QAAQ,EAAE,CAAC;QACvD,OAAO;YACL,SAAS,EAAE,mBAAmB,CAAC,QAAQ;SACxC,CAAC;IACJ,CAAC;IAED,IAAI,kBAAkB,KAAK,kBAAkB,CAAC,GAAG,EAAE,CAAC;QAClD,OAAO;YACL,SAAS,EAAE,mBAAmB,CAAC,GAAG;SACnC,CAAC;IACJ,CAAC;IAED,OAAO;QACL,SAAS,EAAE,mBAAmB,CAAC,IAAI;QACnC,eAAe,EAAE,EAAE;KACpB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import ModelListModal from "../ModelListModal/ModelListModal";
|
|
2
2
|
import EqualToOrNull from "../../../Types/BaseDatabase/EqualToOrNull";
|
|
3
3
|
import WorkflowVariable from "../../../Models/DatabaseModels/WorkflowVariable";
|
|
4
|
+
import { globalVariableReference, variableReference, } from "../../../Types/Workflow/TemplateSyntax";
|
|
4
5
|
import React from "react";
|
|
5
6
|
const VariableModal = (props) => {
|
|
6
7
|
return (React.createElement(ModelListModal, { modalTitle: "Select a variable", query: {
|
|
@@ -19,10 +20,10 @@ const VariableModal = (props) => {
|
|
|
19
20
|
}, onClose: props.onClose, onSave: (variables) => {
|
|
20
21
|
var _a, _b, _c;
|
|
21
22
|
if ((_a = variables[0]) === null || _a === void 0 ? void 0 : _a.workflowId) {
|
|
22
|
-
props.onSave(
|
|
23
|
+
props.onSave(variableReference(((_b = variables[0]) === null || _b === void 0 ? void 0 : _b.name) || ""));
|
|
23
24
|
}
|
|
24
25
|
else {
|
|
25
|
-
props.onSave(
|
|
26
|
+
props.onSave(globalVariableReference(((_c = variables[0]) === null || _c === void 0 ? void 0 : _c.name) || ""));
|
|
26
27
|
}
|
|
27
28
|
} }));
|
|
28
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VariableModal.js","sourceRoot":"","sources":["../../../../../UI/Components/Workflow/VariableModal.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kCAAkC,CAAC;AAC9D,OAAO,aAAa,MAAM,2CAA2C,CAAC;AAEtE,OAAO,gBAAgB,MAAM,iDAAiD,CAAC;AAC/E,OAAO,KAA0C,MAAM,OAAO,CAAC;AAQ/D,MAAM,aAAa,GAAsC,CACvD,KAAqB,EACP,EAAE;IAChB,OAAO,CACL,oBAAC,cAAc,IACb,UAAU,EAAC,mBAAmB,EAC9B,KAAK,EAAE;YACL,UAAU,EAAE,IAAI,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;SAC3D,EACD,eAAe,EAAE,IAAI,EACrB,cAAc,EAAC,qEAAqE,EACpF,gBAAgB,EAAC,wDAAwD,EACzE,UAAU,EAAC,MAAM,EACjB,gBAAgB,EAAC,aAAa,EAC9B,WAAW,EAAE,CAAC,IAAsB,EAAE,EAAE;YACtC,IAAI,YAAY,GAAW,iBAAiB,CAAC;YAE7C,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;gBACpB,YAAY,GAAG,yBAAyB,CAAC;YAC3C,CAAC;YAED,OAAO,2BAAG,SAAS,EAAC,4BAA4B,IAAE,YAAY,CAAK,CAAC;QACtE,CAAC,EACD,SAAS,EAAE,gBAAgB,EAC3B,MAAM,EAAE;YACN,GAAG,EAAE,IAAI;YACT,IAAI,EAAE,IAAI;YACV,WAAW,EAAE,IAAI;YACjB,UAAU,EAAE,IAAI;SACjB,EACD,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,MAAM,EAAE,CAAC,SAAkC,EAAE,EAAE;;YAC7C,IAAI,MAAA,SAAS,CAAC,CAAC,CAAC,0CAAE,UAAU,EAAE,CAAC;gBAC7B,KAAK,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"VariableModal.js","sourceRoot":"","sources":["../../../../../UI/Components/Workflow/VariableModal.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kCAAkC,CAA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,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAA,MAAA,SAAS,CAAC,CAAC,CAAC,0CAAE,IAAI,KAAI,EAAE,CAAC,CAAC,CAAC;YAClE,CAAC;QACH,CAAC,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -2,11 +2,13 @@ import WorkflowComponent from "./Component";
|
|
|
2
2
|
import ComponentSettingsModal from "./ComponentSettingsModal";
|
|
3
3
|
import ComponentsModal from "./ComponentsModal";
|
|
4
4
|
import RunModal from "./RunModal";
|
|
5
|
+
import { lintWorkflowGraph, } from "./GraphLint";
|
|
6
|
+
import { findStepNodeToOpen } from "./GraphLintSummary";
|
|
5
7
|
import { loadComponentsAndCategories } from "./Utils";
|
|
6
8
|
import IconProp from "../../../Types/Icon/IconProp";
|
|
7
9
|
import ObjectID from "../../../Types/ObjectID";
|
|
8
10
|
import { ComponentType, NodeType, } from "../../../Types/Workflow/Component";
|
|
9
|
-
import React, { useCallback, useEffect, useRef, useState, } from "react";
|
|
11
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState, } from "react";
|
|
10
12
|
import ReactFlow, { Background, BackgroundVariant, Controls, MarkerType, MiniMap, addEdge, getConnectedEdges, updateEdge, useEdgesState, useNodesState, } from "reactflow";
|
|
11
13
|
// 👇 you need to import the reactflow styles
|
|
12
14
|
import "reactflow/dist/style.css";
|
|
@@ -146,6 +148,56 @@ const Workflow = (props) => {
|
|
|
146
148
|
props.onWorkflowUpdated(nodes, edges);
|
|
147
149
|
}
|
|
148
150
|
}, [nodes, edges]);
|
|
151
|
+
/*
|
|
152
|
+
* Static checks over the graph, recomputed as it is edited.
|
|
153
|
+
*
|
|
154
|
+
* The results are deliberately NOT written back into node state. Node data is
|
|
155
|
+
* what gets persisted (Builder.saveGraph sends node.data verbatim, minus
|
|
156
|
+
* metadata), so storing lint output there would save today's warnings into
|
|
157
|
+
* the workflow itself and show them again on reload even once they were
|
|
158
|
+
* fixed. Deriving a separate array for rendering keeps the saved graph clean.
|
|
159
|
+
*/
|
|
160
|
+
const lintResult = useMemo(() => {
|
|
161
|
+
return lintWorkflowGraph({
|
|
162
|
+
nodes: nodes,
|
|
163
|
+
edges: edges,
|
|
164
|
+
});
|
|
165
|
+
}, [nodes, edges]);
|
|
166
|
+
useEffect(() => {
|
|
167
|
+
var _a;
|
|
168
|
+
(_a = props.onLintResultChange) === null || _a === void 0 ? void 0 : _a.call(props, lintResult);
|
|
169
|
+
}, [lintResult]);
|
|
170
|
+
/*
|
|
171
|
+
* Opening a step from outside the canvas — the issues panel naming the node
|
|
172
|
+
* it is complaining about. A node that has since been deleted simply opens
|
|
173
|
+
* nothing; the request is still acknowledged so the page does not sit
|
|
174
|
+
* waiting for a step that no longer exists.
|
|
175
|
+
*/
|
|
176
|
+
useEffect(() => {
|
|
177
|
+
var _a;
|
|
178
|
+
if (!props.openStepForNodeId) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
const nodeToOpen = findStepNodeToOpen({
|
|
182
|
+
nodes: nodes,
|
|
183
|
+
nodeId: props.openStepForNodeId,
|
|
184
|
+
});
|
|
185
|
+
if (nodeToOpen) {
|
|
186
|
+
setSelectedNodeData(nodeToOpen.data);
|
|
187
|
+
setShowComponentSettingsModal(true);
|
|
188
|
+
}
|
|
189
|
+
(_a = props.onStepOpened) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
190
|
+
}, [props.openStepForNodeId]);
|
|
191
|
+
const nodesToRender = useMemo(() => {
|
|
192
|
+
return nodes.map((node) => {
|
|
193
|
+
const error = lintResult.errorsByNodeId[node.id] || "";
|
|
194
|
+
// Same object when there is nothing to say, so react-flow can bail early.
|
|
195
|
+
if (!error && !node.data.error) {
|
|
196
|
+
return node;
|
|
197
|
+
}
|
|
198
|
+
return Object.assign(Object.assign({}, node), { data: Object.assign(Object.assign({}, node.data), { error: error }) });
|
|
199
|
+
});
|
|
200
|
+
}, [nodes, lintResult]);
|
|
149
201
|
const proOptions = { hideAttribution: true };
|
|
150
202
|
const onConnect = useCallback((params) => {
|
|
151
203
|
return setEdges((eds) => {
|
|
@@ -309,7 +361,7 @@ const Workflow = (props) => {
|
|
|
309
361
|
stroke-dasharray: 5 5 !important;
|
|
310
362
|
}
|
|
311
363
|
`),
|
|
312
|
-
React.createElement(ReactFlow, { nodes:
|
|
364
|
+
React.createElement(ReactFlow, { nodes: nodesToRender, edges: edges, fitView: true, onEdgeClick: () => {
|
|
313
365
|
refreshEdges();
|
|
314
366
|
}, onNodeClick: () => {
|
|
315
367
|
refreshEdges();
|
|
@@ -349,22 +401,55 @@ const Workflow = (props) => {
|
|
|
349
401
|
setShowTriggersModal(false);
|
|
350
402
|
addToGraph(component);
|
|
351
403
|
} })),
|
|
352
|
-
showComponentSettingsModal && selectedNodeData && (React.createElement(ComponentSettingsModal
|
|
404
|
+
showComponentSettingsModal && selectedNodeData && (React.createElement(ComponentSettingsModal
|
|
405
|
+
/*
|
|
406
|
+
* Placeholder nodes are excluded here rather than defended against
|
|
407
|
+
* downstream. The "click here to add trigger" node carries a partial
|
|
408
|
+
* metadata object — no returnValues, no arguments, an empty id — and
|
|
409
|
+
* passing it on made every consumer responsible for knowing that.
|
|
410
|
+
*/
|
|
411
|
+
, {
|
|
412
|
+
/*
|
|
413
|
+
* Placeholder nodes are excluded here rather than defended against
|
|
414
|
+
* downstream. The "click here to add trigger" node carries a partial
|
|
415
|
+
* metadata object — no returnValues, no arguments, an empty id — and
|
|
416
|
+
* passing it on made every consumer responsible for knowing that.
|
|
417
|
+
*/
|
|
418
|
+
graphComponents: nodes
|
|
419
|
+
.map((node) => {
|
|
353
420
|
return node.data;
|
|
421
|
+
})
|
|
422
|
+
.filter((data) => {
|
|
423
|
+
return data.nodeType !== NodeType.PlaceholderNode;
|
|
354
424
|
}), workflowId: props.workflowId, webhookSecretKey: props.webhookSecretKey, component: selectedNodeData, title: selectedNodeData && selectedNodeData.metadata.title
|
|
355
425
|
? selectedNodeData.metadata.title
|
|
356
426
|
: "Component Properties", onDelete: (component) => {
|
|
357
427
|
deleteNode(component.id);
|
|
358
|
-
},
|
|
428
|
+
},
|
|
429
|
+
/*
|
|
430
|
+
* Triggers have nothing to run on their own — they are the thing
|
|
431
|
+
* that starts a run, so "run just this step" is meaningless for one.
|
|
432
|
+
*/
|
|
433
|
+
onRunStep: props.onRunStep &&
|
|
434
|
+
selectedNodeData.componentType !== ComponentType.Trigger
|
|
435
|
+
? props.onRunStep
|
|
436
|
+
: undefined, description: selectedNodeData && selectedNodeData.metadata.description
|
|
359
437
|
? selectedNodeData.metadata.description
|
|
360
438
|
: "Edit Component Properties and variables here.", onClose: () => {
|
|
361
439
|
setShowComponentSettingsModal(false);
|
|
362
440
|
}, onSave: (componentData) => {
|
|
363
|
-
|
|
441
|
+
/*
|
|
442
|
+
* The settings modal was opened from the rendered node, so what
|
|
443
|
+
* comes back carries whatever lint message was on it. Clear that
|
|
444
|
+
* before it reaches node state — state is what gets saved, and a
|
|
445
|
+
* message about today's mistake has no business being written into
|
|
446
|
+
* the workflow.
|
|
447
|
+
*/
|
|
448
|
+
const dataToStore = Object.assign(Object.assign({}, componentData), { error: "" });
|
|
364
449
|
setNodes((nds) => {
|
|
365
450
|
return nds.map((n) => {
|
|
366
|
-
if (n.data.internalId ===
|
|
367
|
-
n.data =
|
|
451
|
+
if (n.data.internalId === dataToStore.internalId) {
|
|
452
|
+
n.data = dataToStore;
|
|
368
453
|
}
|
|
369
454
|
return n;
|
|
370
455
|
});
|