@oneuptime/common 12.0.6 → 12.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (594) hide show
  1. package/Models/DatabaseModels/AIInsight.ts +1 -1
  2. package/Models/DatabaseModels/DatabaseBaseModel/FileModel.ts +2 -3
  3. package/Models/DatabaseModels/DeletedProject.ts +595 -0
  4. package/Models/DatabaseModels/Index.ts +2 -0
  5. package/Models/DatabaseModels/Monitor.ts +111 -0
  6. package/Models/DatabaseModels/Project.ts +3 -3
  7. package/Models/DatabaseModels/TelemetryEntity.ts +45 -0
  8. package/Models/DatabaseModels/TelemetryEntityRelationship.ts +26 -0
  9. package/Models/DatabaseModels/WorkflowLog.ts +38 -0
  10. package/Models/DatabaseModels/WorkspaceProjectAuthToken.ts +19 -1
  11. package/Server/API/FileAPI.ts +15 -2
  12. package/Server/API/MicrosoftTeamsAPI.ts +6 -1
  13. package/Server/API/ProjectAPI.ts +214 -0
  14. package/Server/API/StatusPageAPI.ts +39 -6
  15. package/Server/API/UserAPI.ts +16 -1
  16. package/Server/Infrastructure/Postgres/SchemaMigrations/1786446545142-MigrationName.ts +50 -0
  17. package/Server/Infrastructure/Postgres/SchemaMigrations/1786449497966-AddMonitorDependency.ts +67 -0
  18. package/Server/Infrastructure/Postgres/SchemaMigrations/1786461136170-AddDeletedProjectTable.ts +39 -0
  19. package/Server/Infrastructure/Postgres/SchemaMigrations/1786551733814-MigrationName.ts +41 -0
  20. package/Server/Infrastructure/Postgres/SchemaMigrations/1786559879134-AddWorkflowLogStepTrace.ts +17 -0
  21. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +10 -0
  22. package/Server/Middleware/MasterAdminAuthorization.ts +11 -6
  23. package/Server/Services/AIAgentService.ts +20 -0
  24. package/Server/Services/DashboardDomainService.ts +73 -28
  25. package/Server/Services/DatabaseService.ts +1 -0
  26. package/Server/Services/DeletedProjectService.ts +138 -0
  27. package/Server/Services/FileService.ts +61 -0
  28. package/Server/Services/IncidentEpisodePublicNoteService.ts +18 -0
  29. package/Server/Services/IncidentPublicNoteService.ts +18 -0
  30. package/Server/Services/Index.ts +2 -0
  31. package/Server/Services/MonitorService.ts +311 -0
  32. package/Server/Services/ProbeService.ts +20 -0
  33. package/Server/Services/ProjectService.ts +297 -1
  34. package/Server/Services/PushNotificationService.ts +71 -0
  35. package/Server/Services/ScheduledMaintenancePublicNoteService.ts +18 -0
  36. package/Server/Services/StatusPageAnnouncementService.ts +53 -0
  37. package/Server/Services/StatusPageDomainService.ts +73 -28
  38. package/Server/Services/TeamMemberService.ts +117 -12
  39. package/Server/Services/TelemetryEntityRelationshipService.ts +3 -0
  40. package/Server/Services/TelemetryEntityService.ts +114 -1
  41. package/Server/Services/TelemetryIngestionKeyService.ts +1 -0
  42. package/Server/Services/UserWebhookService.ts +34 -109
  43. package/Server/Services/WorkspaceNotificationRuleService.ts +69 -0
  44. package/Server/Services/WorkspaceProjectAuthTokenService.ts +37 -1
  45. package/Server/Types/Database/DeleteById.ts +2 -0
  46. package/Server/Types/Database/DeleteOneBy.ts +6 -0
  47. package/Server/Types/Domain.ts +41 -0
  48. package/Server/Types/Workflow/Components/API/Delete.ts +2 -1
  49. package/Server/Types/Workflow/Components/API/Get.ts +2 -1
  50. package/Server/Types/Workflow/Components/API/Patch.ts +2 -1
  51. package/Server/Types/Workflow/Components/API/Post.ts +2 -1
  52. package/Server/Types/Workflow/Components/API/Put.ts +2 -1
  53. package/Server/Types/Workflow/Components/API/Utils.ts +85 -3
  54. package/Server/Types/Workflow/Components/BaseModel/CreateManyBaseModel.ts +25 -19
  55. package/Server/Types/Workflow/Components/BaseModel/CreateOneBaseModel.ts +6 -5
  56. package/Server/Types/Workflow/Components/BaseModel/DeleteManyBaseModel.ts +32 -14
  57. package/Server/Types/Workflow/Components/BaseModel/DeleteOneBaseModel.ts +31 -13
  58. package/Server/Types/Workflow/Components/BaseModel/FindManyBaseModel.ts +29 -20
  59. package/Server/Types/Workflow/Components/BaseModel/FindOneBaseModel.ts +28 -21
  60. package/Server/Types/Workflow/Components/BaseModel/LogComponentError.ts +89 -0
  61. package/Server/Types/Workflow/Components/BaseModel/ModelArguments.ts +208 -0
  62. package/Server/Types/Workflow/Components/BaseModel/OnTriggerBaseModel.ts +11 -0
  63. package/Server/Types/Workflow/Components/BaseModel/UpdateManyBaseModel.ts +41 -18
  64. package/Server/Types/Workflow/Components/BaseModel/UpdateOneBaseModel.ts +45 -19
  65. package/Server/Types/Workflow/Components/Discord/SendMessageToChannel.ts +16 -9
  66. package/Server/Types/Workflow/Components/IncomingWebhookUtils.ts +66 -0
  67. package/Server/Types/Workflow/Components/MicrosoftTeams/SendMessageToChannel.ts +15 -9
  68. package/Server/Types/Workflow/Components/Slack/SendMessageToChannel.ts +17 -0
  69. package/Server/Types/Workflow/TriggerCode.ts +12 -0
  70. package/Server/Types/Workflow/Workflow.ts +5 -0
  71. package/Server/Utils/AI/Chat/ObservabilityChatPrompt.ts +1 -1
  72. package/Server/Utils/AI/CodeFix/CodeAgentWorkspaceGuard.ts +171 -0
  73. package/Server/Utils/AI/SRE/FixFromIncidentTaskTrigger.ts +3 -3
  74. package/Server/Utils/AI/SRE/Insights/FixRouting.ts +3 -2
  75. package/Server/Utils/AI/SRE/TelemetryImprovementTaskTrigger.ts +1 -1
  76. package/Server/Utils/AI/Toolbox/CodeWriteTools.ts +6 -6
  77. package/Server/Utils/CodeRepository/GitHub/GitHub.ts +43 -5
  78. package/Server/Utils/DataSource/EgressGuard.ts +176 -16
  79. package/Server/Utils/DataSource/HttpFetch.ts +6 -45
  80. package/Server/Utils/Execute.ts +8 -0
  81. package/Server/Utils/InlineImageAccessTokenSync.ts +23 -0
  82. package/Server/Utils/LLM/LLMService.ts +57 -12
  83. package/Server/Utils/Monitor/MonitorAlert.ts +40 -0
  84. package/Server/Utils/Monitor/MonitorDependencySuppression.ts +192 -0
  85. package/Server/Utils/Monitor/MonitorIncident.ts +40 -0
  86. package/Server/Utils/Monitor/MonitorResource.ts +36 -0
  87. package/Server/Utils/Response.ts +142 -6
  88. package/Server/Utils/SSRFProtection.ts +273 -60
  89. package/Server/Utils/StartServer.ts +8 -0
  90. package/Server/Utils/Telemetry/InventoryEntityRegistry.ts +689 -0
  91. package/Server/Utils/VM/VMAPI.ts +56 -8
  92. package/Server/Utils/VM/VMRunner.ts +88 -1
  93. package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +555 -49
  94. package/Server/Utils/Workspace/Slack/Slack.ts +25 -2
  95. package/Server/Utils/Workspace/WorkspaceBase.ts +6 -0
  96. package/Tests/App/Dashboard/DangerZone.test.tsx +334 -0
  97. package/Tests/App/Dashboard/DashboardVariableAllContract.test.tsx +539 -0
  98. package/Tests/App/Dashboard/DashboardVariableSelector.test.tsx +678 -0
  99. package/Tests/App/Dashboard/DashboardVariablesDiscard.test.tsx +706 -0
  100. package/Tests/App/Dashboard/DashboardVariablesModal.test.tsx +508 -0
  101. package/Tests/App/Dashboard/MonitorCriteriaAttributeFilter.test.tsx +574 -0
  102. package/Tests/App/PublicDashboard/DashboardVariableSelector.test.tsx +470 -0
  103. package/Tests/App/StatusPage/StatusPageDetailPagesNotFound.test.tsx +308 -0
  104. package/Tests/Models/DatabaseModels/DeletedProjectModel.test.ts +251 -0
  105. package/Tests/Models/DatabaseModels/SavedViewJSONColumnTuples.test.ts +115 -0
  106. package/Tests/Server/API/FileAPIAccessControl.test.ts +316 -0
  107. package/Tests/Server/API/ProjectAPI.test.ts +299 -1
  108. package/Tests/Server/API/ProjectAPIAdjustBalance.test.ts +459 -0
  109. package/Tests/Server/API/ProjectAPIAdjustBalanceBillingDisabled.test.ts +177 -0
  110. package/Tests/Server/API/UserProjectsAPI.test.ts +478 -4
  111. package/Tests/Server/Services/DatabaseServiceDeletionReason.test.ts +123 -0
  112. package/Tests/Server/Services/DeletedProjectService.test.ts +415 -0
  113. package/Tests/Server/Services/DeletedProjectServiceSelfHosted.test.ts +70 -0
  114. package/Tests/Server/Services/DomainSubdomainHooks.test.ts +94 -0
  115. package/Tests/Server/Services/FileIsPublicBooleanMigration.test.ts +244 -0
  116. package/Tests/Server/Services/FileServiceMimeType.test.ts +89 -0
  117. package/Tests/Server/Services/MonitorServiceDependencyValidation.test.ts +702 -0
  118. package/Tests/Server/Services/ProjectServiceAdjustBalance.test.ts +615 -0
  119. package/Tests/Server/Services/ProjectServiceDeleteAudit.test.ts +406 -0
  120. package/Tests/Server/Services/PublishTimeImageVisibility.test.ts +450 -0
  121. package/Tests/Server/Services/TeamMemberAutoAcceptInvitation.test.ts +669 -0
  122. package/Tests/Server/Services/TelemetryEntityManualCreate.test.ts +248 -0
  123. package/Tests/Server/Services/UserWebhookSSRF.test.ts +174 -0
  124. package/Tests/Server/Services/WebPushEndpointAllowlist.test.ts +133 -0
  125. package/Tests/Server/Services/WorkspaceProjectAuthTokenRepoint.test.ts +618 -0
  126. package/Tests/Server/Types/Workflow/Components/ApiComponentErrorPort.test.ts +26 -1
  127. package/Tests/Server/Types/Workflow/Components/ApiComponentHeaders.test.ts +192 -0
  128. package/Tests/Server/Types/Workflow/Components/ApiComponentSsrf.test.ts +215 -0
  129. package/Tests/Server/Types/Workflow/Components/BaseModelDatabaseComponents.test.ts +742 -0
  130. package/Tests/Server/Types/Workflow/Components/ChatWebhookComponents.test.ts +256 -0
  131. package/Tests/Server/Types/Workflow/Components/ModelArguments.test.ts +371 -0
  132. package/Tests/Server/Utils/AI/CodeAgentCommandGuard.test.ts +204 -0
  133. package/Tests/Server/Utils/AI/CodeAgentWriteLimits.test.ts +213 -0
  134. package/Tests/Server/Utils/AI/CodeWriteTools.test.ts +52 -5
  135. package/Tests/Server/Utils/AI/LLMServiceBaseUrl.test.ts +3 -0
  136. package/Tests/Server/Utils/AI/LLMServiceEgressGuard.test.ts +315 -0
  137. package/Tests/Server/Utils/AI/LLMServiceModelCompatibility.test.ts +3 -0
  138. package/Tests/Server/Utils/AI/LLMServiceRequestPolicy.test.ts +17 -5
  139. package/Tests/Server/Utils/AI/LLMServiceToolCalling.test.ts +14 -1
  140. package/Tests/Server/Utils/AI/ObservabilityChatPrompt.test.ts +35 -0
  141. package/Tests/Server/Utils/AI/StubLLMEgressGuard.ts +25 -0
  142. package/Tests/Server/Utils/AnalyticsDatabase/QuerySettingsHelper.test.ts +152 -0
  143. package/Tests/Server/Utils/Dashboard/PublicDashboardResourceListPolicy.test.ts +62 -7
  144. package/Tests/Server/Utils/DataSource/EgressGuard.test.ts +69 -0
  145. package/Tests/Server/Utils/DataSource/EgressGuardPinning.test.ts +330 -0
  146. package/Tests/Server/Utils/GitHubCreatePullRequestWithToken.test.ts +393 -0
  147. package/Tests/Server/Utils/InlineImageAccessTokenSync.test.ts +202 -0
  148. package/Tests/Server/Utils/Monitor/MonitorDependencySuppression.test.ts +811 -0
  149. package/Tests/Server/Utils/Monitor/MonitorDependencySuppressionCreatorSkip.test.ts +604 -0
  150. package/Tests/Server/Utils/ResponseSendFileResponse.test.ts +192 -0
  151. package/Tests/Server/Utils/SSRFProtectionBypasses.test.ts +406 -0
  152. package/Tests/Server/Utils/Telemetry/InventoryEntityRegistry.test.ts +322 -0
  153. package/Tests/Server/Utils/VM/VMAPISubstitution.test.ts +243 -0
  154. package/Tests/Server/Utils/VM/VMRunnerSsrf.test.ts +194 -0
  155. package/Tests/Server/Utils/Workspace/MicrosoftTeamsChannelSend.test.ts +1169 -0
  156. package/Tests/Server/Utils/Workspace/MicrosoftTeamsChannelsList.test.ts +2 -0
  157. package/Tests/Server/Utils/Workspace/MicrosoftTeamsTeamInstalls.test.ts +1605 -0
  158. package/Tests/Server/Utils/Workspace/MicrosoftTeamsTenantResolution.test.ts +1218 -0
  159. package/Tests/Types/AI/AIChatMessageStatus.test.ts +79 -0
  160. package/Tests/Types/AI/AIInsightStatus.test.ts +40 -0
  161. package/Tests/Types/API/HostnameAuthorityParsing.test.ts +157 -0
  162. package/Tests/Types/Dashboard/DashboardTemplateInvariants.test.ts +27 -0
  163. package/Tests/Types/DataSource/DataSourceLimits.test.ts +71 -0
  164. package/Tests/Types/DataSource/DataSourceType.test.ts +181 -0
  165. package/Tests/Types/DomainSubdomainValidation.test.ts +90 -0
  166. package/Tests/Types/JSONFunctions.test.ts +252 -1
  167. package/Tests/Types/Monitor/SnmpMonitor/SnmpAuthProtocol.test.ts +61 -0
  168. package/Tests/Types/Monitor/SnmpMonitor/SnmpPrivProtocol.test.ts +62 -0
  169. package/Tests/Types/Monitor/SnmpMonitor/SnmpSecurityLevel.test.ts +68 -0
  170. package/Tests/Types/Monitor/SnmpMonitor/SnmpVersion.test.ts +51 -0
  171. package/Tests/Types/SerializableObjectDictionaryImportCycle.test.ts +197 -0
  172. package/Tests/Types/Telemetry/EntityTypeGroups.test.ts +140 -0
  173. package/Tests/Types/Workflow/StepTrace.test.ts +235 -0
  174. package/Tests/Types/Workflow/TemplateSyntax.test.ts +379 -0
  175. package/Tests/Types/Workflow/Templates.test.ts +403 -0
  176. package/Tests/UI/Components/404.test.tsx +1 -1
  177. package/Tests/UI/Components/Alert.test.tsx +1 -1
  178. package/Tests/UI/Components/Badge.test.tsx +1 -1
  179. package/Tests/UI/Components/BasicForm.test.tsx +39 -10
  180. package/Tests/UI/Components/Button.test.tsx +1 -1
  181. package/Tests/UI/Components/Card.test.tsx +1 -1
  182. package/Tests/UI/Components/Charts/AxisTickColor.test.tsx +1 -1
  183. package/Tests/UI/Components/ColorViewer.test.tsx +1 -1
  184. package/Tests/UI/Components/ComponentsModal.test.tsx +7 -1
  185. package/Tests/UI/Components/CustomTimeRangeModal.test.tsx +459 -0
  186. package/Tests/UI/Components/DictionaryAttributeFilterRow.test.tsx +477 -0
  187. package/Tests/UI/Components/DictionaryOfStrings.test.tsx +1 -1
  188. package/Tests/UI/Components/Dropdown.test.tsx +1 -1
  189. package/Tests/UI/Components/FilePicker.test.tsx +1 -1
  190. package/Tests/UI/Components/Forms/AnchoredFieldPopupKeyboard.test.tsx +382 -0
  191. package/Tests/UI/Components/Forms/ColorPickerPicking.test.tsx +569 -0
  192. package/Tests/UI/Components/Forms/ValidationJSON.test.ts +241 -0
  193. package/Tests/UI/Components/HiddenText.test.tsx +1 -1
  194. package/Tests/UI/Components/Input.test.tsx +1 -1
  195. package/Tests/UI/Components/Loader.test.tsx +1 -1
  196. package/Tests/UI/Components/LogTimeRangePicker.test.tsx +43 -1
  197. package/Tests/UI/Components/MasterPage.test.tsx +1 -1
  198. package/Tests/UI/Components/ModalPortalDismissal.test.tsx +579 -0
  199. package/Tests/UI/Components/ModelDelete.test.tsx +214 -0
  200. package/Tests/UI/Components/ModelTable/BaseModelTableBulkSelectAll.test.tsx +1 -1
  201. package/Tests/UI/Components/ModelTable/BaseModelTableColumnCustomization.test.tsx +1 -1
  202. package/Tests/UI/Components/ModelTable/BaseModelTableSearchLabels.test.tsx +1 -1
  203. package/Tests/UI/Components/ModelTable/BaseModelTableUrlState.test.tsx +1 -1
  204. package/Tests/UI/Components/ModelTable/CustomFieldColumns.test.tsx +1 -1
  205. package/Tests/UI/Components/NavBar.test.tsx +1 -1
  206. package/Tests/UI/Components/OperatorSelectorKeyboard.test.tsx +1 -1
  207. package/Tests/UI/Components/Pagination.test.tsx +1 -1
  208. package/Tests/UI/Components/Pill.test.tsx +1 -1
  209. package/Tests/UI/Components/Probe.test.tsx +1 -1
  210. package/Tests/UI/Components/ProgressBar.test.tsx +1 -1
  211. package/Tests/UI/Components/RadioButtons.test.tsx +1 -1
  212. package/Tests/UI/Components/SideMenuItem.test.tsx +1 -1
  213. package/Tests/UI/Components/SideOver.test.tsx +500 -6
  214. package/Tests/UI/Components/Tabs.test.tsx +1 -1
  215. package/Tests/UI/Components/TelemetrySearchBar.test.tsx +1 -1
  216. package/Tests/UI/Components/TelemetryTimeRangePicker.test.tsx +50 -8
  217. package/Tests/UI/Components/TextArea.test.tsx +1 -1
  218. package/Tests/UI/Components/TimeRangePickerDropdown.test.tsx +325 -0
  219. package/Tests/UI/Components/Toast.test.tsx +1 -1
  220. package/Tests/UI/Components/Toggle.test.tsx +1 -1
  221. package/Tests/UI/Components/TopSection.test.tsx +1 -1
  222. package/Tests/UI/Components/UseLiveLogsRefresh.test.tsx +1 -1
  223. package/Tests/UI/Components/Workflow/GraphLint.test.ts +821 -0
  224. package/Tests/UI/Components/Workflow/ModelColumnEditor.test.ts +287 -0
  225. package/Tests/UI/Components/Workflow/ModelColumnEditorServerContract.test.ts +185 -0
  226. package/Tests/UI/Components/Workflow/ModelSchema.test.ts +174 -0
  227. package/Tests/UI/Components/Workflow/RunStatusWatcher.test.ts +152 -0
  228. package/Tests/UI/Components/Workflow/Utils.test.ts +192 -0
  229. package/Tests/UI/Monitor/MonitorStepCriteriaView.test.tsx +432 -0
  230. package/Tests/UI/Rum/ReplayScrubber.test.tsx +1 -1
  231. package/Tests/UI/Rum/ReplayStage.test.tsx +1 -1
  232. package/Tests/UI/Telemetry/TelemetrySnapshotWindowAlert.test.tsx +1 -1
  233. package/Tests/UI/Utils/LocalStorageArrayRoundTrip.test.ts +72 -0
  234. package/Tests/Utils/Dashboard/HtmlWidgetDocument.test.ts +19 -2
  235. package/Tests/Utils/Dashboard/ModelQueryVariableInterpolation.test.ts +44 -0
  236. package/Tests/Utils/Dashboard/VariableInterpolation.test.ts +288 -5
  237. package/Tests/Utils/Dashboard/VariableUrlState.test.ts +42 -0
  238. package/Tests/Utils/DataSource/DataSourceQueryText.test.ts +27 -0
  239. package/Tests/Utils/LegacySerializedArray.test.ts +139 -0
  240. package/Tests/Utils/Monitor/MonitorDependencyRule.test.ts +190 -0
  241. package/Tests/Utils/Monitor/NetworkDeviceRoleUtil.test.ts +514 -0
  242. package/Tests/Utils/Monitor/NetworkTopologyUtil.test.ts +240 -0
  243. package/Tests/Utils/Realtime.test.ts +78 -0
  244. package/Tests/Utils/Schema/AnalyticsModelSchema.test.ts +469 -0
  245. package/Tests/Utils/Schema/ModelSchema.test.ts +268 -0
  246. package/Tests/Utils/Telemetry/EntityKeyNonTelemetry.test.ts +193 -0
  247. package/Tests/Utils/Telemetry/SavedViewFilters.test.ts +246 -0
  248. package/Tests/__mocks__/i18next-browser-languagedetector.js +21 -0
  249. package/Types/AI/FixPullRequestCiStatus.ts +1 -1
  250. package/Types/AI/FixVerificationStatus.ts +2 -2
  251. package/Types/API/Hostname.ts +92 -4
  252. package/Types/API/URL.ts +43 -25
  253. package/Types/Billing/BalanceAdjustmentType.ts +14 -0
  254. package/Types/Billing/ProjectBalanceType.ts +13 -0
  255. package/Types/Domain.ts +26 -0
  256. package/Types/File/MimeType.ts +11 -0
  257. package/Types/JSONFunctions.ts +15 -0
  258. package/Types/Monitor/SnmpMonitor/NetworkTopology.ts +31 -0
  259. package/Types/SerializableObjectDictionary.ts +133 -39
  260. package/Types/Telemetry/EntitySource.ts +40 -0
  261. package/Types/Telemetry/EntityType.ts +27 -0
  262. package/Types/Telemetry/EntityTypeGroups.ts +65 -0
  263. package/Types/Telemetry/TelemetrySavedViewState.ts +9 -1
  264. package/Types/Workflow/Component.ts +29 -0
  265. package/Types/Workflow/Components/API.ts +35 -0
  266. package/Types/Workflow/Components/BaseModel.ts +96 -28
  267. package/Types/Workflow/StepTrace.ts +181 -0
  268. package/Types/Workflow/TemplateSyntax.ts +499 -0
  269. package/Types/Workflow/Templates.ts +316 -0
  270. package/Typings/Index.d.ts +12 -0
  271. package/UI/Components/Date/CustomTimeRangeModal.tsx +278 -0
  272. package/UI/Components/Date/TimeRangePickerDropdown.tsx +250 -0
  273. package/UI/Components/Dictionary/Dictionary.tsx +23 -6
  274. package/UI/Components/Forms/Fields/ColorPicker.tsx +66 -10
  275. package/UI/Components/Forms/Fields/IconPicker.tsx +48 -10
  276. package/UI/Components/Forms/Types/Field.ts +7 -0
  277. package/UI/Components/Forms/Validation.ts +63 -1
  278. package/UI/Components/GanttChart/ChartContainer.tsx +4 -3
  279. package/UI/Components/Input/Input.tsx +31 -3
  280. package/UI/Components/LogsViewer/components/LogTimeRangePicker.tsx +11 -216
  281. package/UI/Components/Modal/ConfirmModal.tsx +10 -5
  282. package/UI/Components/Modal/Modal.tsx +64 -51
  283. package/UI/Components/ModelDelete/ModelDelete.tsx +23 -6
  284. package/UI/Components/SideOver/SideOver.tsx +195 -68
  285. package/UI/Components/TelemetryViewer/components/TelemetryTimeRangePicker.tsx +11 -210
  286. package/UI/Components/Workflow/ArgumentsForm.tsx +194 -7
  287. package/UI/Components/Workflow/Component.tsx +28 -26
  288. package/UI/Components/Workflow/ComponentSettingsModal.tsx +69 -8
  289. package/UI/Components/Workflow/GraphLint.ts +591 -0
  290. package/UI/Components/Workflow/ModelColumnEditor.tsx +396 -0
  291. package/UI/Components/Workflow/ModelSchema.ts +196 -0
  292. package/UI/Components/Workflow/RunForm.tsx +41 -7
  293. package/UI/Components/Workflow/RunStatusWatcher.ts +122 -0
  294. package/UI/Components/Workflow/StepTraceViewer.tsx +186 -0
  295. package/UI/Components/Workflow/Utils.ts +93 -1
  296. package/UI/Components/Workflow/Workflow.tsx +77 -4
  297. package/UI/Types/LayeredDismissal.ts +31 -0
  298. package/UI/Types/UseAnchoredFieldPopup.ts +99 -0
  299. package/UI/Utils/PageScrollLock.ts +66 -0
  300. package/Utils/Dashboard/HtmlWidgetDocument.ts +4 -2
  301. package/Utils/Dashboard/VariableInterpolation.ts +19 -1
  302. package/Utils/LegacySerializedArray.ts +60 -0
  303. package/Utils/Monitor/MonitorDependencyRule.ts +88 -0
  304. package/Utils/Monitor/NetworkDeviceRoleUtil.ts +533 -0
  305. package/Utils/Monitor/NetworkTopologyUtil.ts +45 -7
  306. package/Utils/Telemetry/EntityKey.ts +66 -0
  307. package/Utils/Telemetry/SavedViewFilters.ts +88 -0
  308. package/build/dist/Models/DatabaseModels/AIInsight.js +1 -1
  309. package/build/dist/Models/DatabaseModels/AIInsight.js.map +1 -1
  310. package/build/dist/Models/DatabaseModels/DatabaseBaseModel/FileModel.js +2 -3
  311. package/build/dist/Models/DatabaseModels/DatabaseBaseModel/FileModel.js.map +1 -1
  312. package/build/dist/Models/DatabaseModels/DeletedProject.js +640 -0
  313. package/build/dist/Models/DatabaseModels/DeletedProject.js.map +1 -0
  314. package/build/dist/Models/DatabaseModels/Index.js +2 -0
  315. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  316. package/build/dist/Models/DatabaseModels/Monitor.js +106 -0
  317. package/build/dist/Models/DatabaseModels/Monitor.js.map +1 -1
  318. package/build/dist/Models/DatabaseModels/Project.js +3 -3
  319. package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
  320. package/build/dist/Models/DatabaseModels/TelemetryEntity.js +47 -0
  321. package/build/dist/Models/DatabaseModels/TelemetryEntity.js.map +1 -1
  322. package/build/dist/Models/DatabaseModels/TelemetryEntityRelationship.js +27 -0
  323. package/build/dist/Models/DatabaseModels/TelemetryEntityRelationship.js.map +1 -1
  324. package/build/dist/Models/DatabaseModels/WorkflowLog.js +39 -0
  325. package/build/dist/Models/DatabaseModels/WorkflowLog.js.map +1 -1
  326. package/build/dist/Models/DatabaseModels/WorkspaceProjectAuthToken.js.map +1 -1
  327. package/build/dist/Server/API/FileAPI.js +14 -2
  328. package/build/dist/Server/API/FileAPI.js.map +1 -1
  329. package/build/dist/Server/API/MicrosoftTeamsAPI.js +6 -1
  330. package/build/dist/Server/API/MicrosoftTeamsAPI.js.map +1 -1
  331. package/build/dist/Server/API/ProjectAPI.js +157 -4
  332. package/build/dist/Server/API/ProjectAPI.js.map +1 -1
  333. package/build/dist/Server/API/StatusPageAPI.js +27 -3
  334. package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
  335. package/build/dist/Server/API/UserAPI.js +16 -1
  336. package/build/dist/Server/API/UserAPI.js.map +1 -1
  337. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786446545142-MigrationName.js +34 -0
  338. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786446545142-MigrationName.js.map +1 -0
  339. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786449497966-AddMonitorDependency.js +30 -0
  340. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786449497966-AddMonitorDependency.js.map +1 -0
  341. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786461136170-AddDeletedProjectTable.js +20 -0
  342. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786461136170-AddDeletedProjectTable.js.map +1 -0
  343. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786551733814-MigrationName.js +20 -0
  344. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786551733814-MigrationName.js.map +1 -0
  345. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786559879134-AddWorkflowLogStepTrace.js +12 -0
  346. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1786559879134-AddWorkflowLogStepTrace.js.map +1 -0
  347. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +10 -0
  348. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  349. package/build/dist/Server/Middleware/MasterAdminAuthorization.js +11 -6
  350. package/build/dist/Server/Middleware/MasterAdminAuthorization.js.map +1 -1
  351. package/build/dist/Server/Services/AIAgentService.js +17 -0
  352. package/build/dist/Server/Services/AIAgentService.js.map +1 -1
  353. package/build/dist/Server/Services/DashboardDomainService.js +55 -18
  354. package/build/dist/Server/Services/DashboardDomainService.js.map +1 -1
  355. package/build/dist/Server/Services/DatabaseService.js +1 -0
  356. package/build/dist/Server/Services/DatabaseService.js.map +1 -1
  357. package/build/dist/Server/Services/DeletedProjectService.js +124 -0
  358. package/build/dist/Server/Services/DeletedProjectService.js.map +1 -0
  359. package/build/dist/Server/Services/FileService.js +52 -0
  360. package/build/dist/Server/Services/FileService.js.map +1 -1
  361. package/build/dist/Server/Services/IncidentEpisodePublicNoteService.js +10 -1
  362. package/build/dist/Server/Services/IncidentEpisodePublicNoteService.js.map +1 -1
  363. package/build/dist/Server/Services/IncidentPublicNoteService.js +10 -1
  364. package/build/dist/Server/Services/IncidentPublicNoteService.js.map +1 -1
  365. package/build/dist/Server/Services/Index.js +2 -0
  366. package/build/dist/Server/Services/Index.js.map +1 -1
  367. package/build/dist/Server/Services/MonitorService.js +232 -0
  368. package/build/dist/Server/Services/MonitorService.js.map +1 -1
  369. package/build/dist/Server/Services/ProbeService.js +17 -0
  370. package/build/dist/Server/Services/ProbeService.js.map +1 -1
  371. package/build/dist/Server/Services/ProjectService.js +228 -6
  372. package/build/dist/Server/Services/ProjectService.js.map +1 -1
  373. package/build/dist/Server/Services/PushNotificationService.js +56 -0
  374. package/build/dist/Server/Services/PushNotificationService.js.map +1 -1
  375. package/build/dist/Server/Services/ScheduledMaintenancePublicNoteService.js +10 -1
  376. package/build/dist/Server/Services/ScheduledMaintenancePublicNoteService.js.map +1 -1
  377. package/build/dist/Server/Services/StatusPageAnnouncementService.js +54 -0
  378. package/build/dist/Server/Services/StatusPageAnnouncementService.js.map +1 -1
  379. package/build/dist/Server/Services/StatusPageDomainService.js +55 -18
  380. package/build/dist/Server/Services/StatusPageDomainService.js.map +1 -1
  381. package/build/dist/Server/Services/TeamMemberService.js +97 -6
  382. package/build/dist/Server/Services/TeamMemberService.js.map +1 -1
  383. package/build/dist/Server/Services/TelemetryEntityRelationshipService.js +3 -0
  384. package/build/dist/Server/Services/TelemetryEntityRelationshipService.js.map +1 -1
  385. package/build/dist/Server/Services/TelemetryEntityService.js +91 -1
  386. package/build/dist/Server/Services/TelemetryEntityService.js.map +1 -1
  387. package/build/dist/Server/Services/TelemetryIngestionKeyService.js +1 -0
  388. package/build/dist/Server/Services/TelemetryIngestionKeyService.js.map +1 -1
  389. package/build/dist/Server/Services/UserWebhookService.js +31 -87
  390. package/build/dist/Server/Services/UserWebhookService.js.map +1 -1
  391. package/build/dist/Server/Services/WorkspaceNotificationRuleService.js +65 -0
  392. package/build/dist/Server/Services/WorkspaceNotificationRuleService.js.map +1 -1
  393. package/build/dist/Server/Services/WorkspaceProjectAuthTokenService.js +23 -0
  394. package/build/dist/Server/Services/WorkspaceProjectAuthTokenService.js.map +1 -1
  395. package/build/dist/Server/Types/Domain.js +37 -0
  396. package/build/dist/Server/Types/Domain.js.map +1 -1
  397. package/build/dist/Server/Types/Workflow/Components/API/Delete.js +2 -1
  398. package/build/dist/Server/Types/Workflow/Components/API/Delete.js.map +1 -1
  399. package/build/dist/Server/Types/Workflow/Components/API/Get.js +2 -1
  400. package/build/dist/Server/Types/Workflow/Components/API/Get.js.map +1 -1
  401. package/build/dist/Server/Types/Workflow/Components/API/Patch.js +2 -1
  402. package/build/dist/Server/Types/Workflow/Components/API/Patch.js.map +1 -1
  403. package/build/dist/Server/Types/Workflow/Components/API/Post.js +2 -1
  404. package/build/dist/Server/Types/Workflow/Components/API/Post.js.map +1 -1
  405. package/build/dist/Server/Types/Workflow/Components/API/Put.js +2 -1
  406. package/build/dist/Server/Types/Workflow/Components/API/Put.js.map +1 -1
  407. package/build/dist/Server/Types/Workflow/Components/API/Utils.js +63 -2
  408. package/build/dist/Server/Types/Workflow/Components/API/Utils.js.map +1 -1
  409. package/build/dist/Server/Types/Workflow/Components/BaseModel/CreateManyBaseModel.js +15 -11
  410. package/build/dist/Server/Types/Workflow/Components/BaseModel/CreateManyBaseModel.js.map +1 -1
  411. package/build/dist/Server/Types/Workflow/Components/BaseModel/CreateOneBaseModel.js +2 -3
  412. package/build/dist/Server/Types/Workflow/Components/BaseModel/CreateOneBaseModel.js.map +1 -1
  413. package/build/dist/Server/Types/Workflow/Components/BaseModel/DeleteManyBaseModel.js +21 -10
  414. package/build/dist/Server/Types/Workflow/Components/BaseModel/DeleteManyBaseModel.js.map +1 -1
  415. package/build/dist/Server/Types/Workflow/Components/BaseModel/DeleteOneBaseModel.js +21 -10
  416. package/build/dist/Server/Types/Workflow/Components/BaseModel/DeleteOneBaseModel.js.map +1 -1
  417. package/build/dist/Server/Types/Workflow/Components/BaseModel/FindManyBaseModel.js +18 -13
  418. package/build/dist/Server/Types/Workflow/Components/BaseModel/FindManyBaseModel.js.map +1 -1
  419. package/build/dist/Server/Types/Workflow/Components/BaseModel/FindOneBaseModel.js +18 -13
  420. package/build/dist/Server/Types/Workflow/Components/BaseModel/FindOneBaseModel.js.map +1 -1
  421. package/build/dist/Server/Types/Workflow/Components/BaseModel/LogComponentError.js +43 -0
  422. package/build/dist/Server/Types/Workflow/Components/BaseModel/LogComponentError.js.map +1 -0
  423. package/build/dist/Server/Types/Workflow/Components/BaseModel/ModelArguments.js +116 -0
  424. package/build/dist/Server/Types/Workflow/Components/BaseModel/ModelArguments.js.map +1 -0
  425. package/build/dist/Server/Types/Workflow/Components/BaseModel/OnTriggerBaseModel.js +7 -0
  426. package/build/dist/Server/Types/Workflow/Components/BaseModel/OnTriggerBaseModel.js.map +1 -1
  427. package/build/dist/Server/Types/Workflow/Components/BaseModel/UpdateManyBaseModel.js +24 -13
  428. package/build/dist/Server/Types/Workflow/Components/BaseModel/UpdateManyBaseModel.js.map +1 -1
  429. package/build/dist/Server/Types/Workflow/Components/BaseModel/UpdateOneBaseModel.js +27 -13
  430. package/build/dist/Server/Types/Workflow/Components/BaseModel/UpdateOneBaseModel.js.map +1 -1
  431. package/build/dist/Server/Types/Workflow/Components/Discord/SendMessageToChannel.js +14 -6
  432. package/build/dist/Server/Types/Workflow/Components/Discord/SendMessageToChannel.js.map +1 -1
  433. package/build/dist/Server/Types/Workflow/Components/IncomingWebhookUtils.js +42 -0
  434. package/build/dist/Server/Types/Workflow/Components/IncomingWebhookUtils.js.map +1 -0
  435. package/build/dist/Server/Types/Workflow/Components/MicrosoftTeams/SendMessageToChannel.js +15 -6
  436. package/build/dist/Server/Types/Workflow/Components/MicrosoftTeams/SendMessageToChannel.js.map +1 -1
  437. package/build/dist/Server/Types/Workflow/Components/Slack/SendMessageToChannel.js +10 -2
  438. package/build/dist/Server/Types/Workflow/Components/Slack/SendMessageToChannel.js.map +1 -1
  439. package/build/dist/Server/Types/Workflow/TriggerCode.js.map +1 -1
  440. package/build/dist/Server/Utils/AI/Chat/ObservabilityChatPrompt.js +1 -1
  441. package/build/dist/Server/Utils/AI/CodeFix/CodeAgentWorkspaceGuard.js +141 -0
  442. package/build/dist/Server/Utils/AI/CodeFix/CodeAgentWorkspaceGuard.js.map +1 -1
  443. package/build/dist/Server/Utils/AI/SRE/Insights/FixRouting.js.map +1 -1
  444. package/build/dist/Server/Utils/AI/SRE/TelemetryImprovementTaskTrigger.js +1 -1
  445. package/build/dist/Server/Utils/AI/Toolbox/CodeWriteTools.js +6 -6
  446. package/build/dist/Server/Utils/AI/Toolbox/CodeWriteTools.js.map +1 -1
  447. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHub.js +39 -5
  448. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHub.js.map +1 -1
  449. package/build/dist/Server/Utils/DataSource/EgressGuard.js +94 -10
  450. package/build/dist/Server/Utils/DataSource/EgressGuard.js.map +1 -1
  451. package/build/dist/Server/Utils/DataSource/HttpFetch.js +1 -19
  452. package/build/dist/Server/Utils/DataSource/HttpFetch.js.map +1 -1
  453. package/build/dist/Server/Utils/Execute.js +2 -2
  454. package/build/dist/Server/Utils/Execute.js.map +1 -1
  455. package/build/dist/Server/Utils/InlineImageAccessTokenSync.js +13 -0
  456. package/build/dist/Server/Utils/InlineImageAccessTokenSync.js.map +1 -1
  457. package/build/dist/Server/Utils/LLM/LLMService.js +43 -12
  458. package/build/dist/Server/Utils/LLM/LLMService.js.map +1 -1
  459. package/build/dist/Server/Utils/Monitor/MonitorAlert.js +44 -24
  460. package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
  461. package/build/dist/Server/Utils/Monitor/MonitorDependencySuppression.js +158 -0
  462. package/build/dist/Server/Utils/Monitor/MonitorDependencySuppression.js.map +1 -0
  463. package/build/dist/Server/Utils/Monitor/MonitorIncident.js +50 -30
  464. package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
  465. package/build/dist/Server/Utils/Monitor/MonitorResource.js +32 -0
  466. package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
  467. package/build/dist/Server/Utils/Response.js +112 -5
  468. package/build/dist/Server/Utils/Response.js.map +1 -1
  469. package/build/dist/Server/Utils/SSRFProtection.js +219 -53
  470. package/build/dist/Server/Utils/SSRFProtection.js.map +1 -1
  471. package/build/dist/Server/Utils/StartServer.js +7 -0
  472. package/build/dist/Server/Utils/StartServer.js.map +1 -1
  473. package/build/dist/Server/Utils/Telemetry/InventoryEntityRegistry.js +507 -0
  474. package/build/dist/Server/Utils/Telemetry/InventoryEntityRegistry.js.map +1 -0
  475. package/build/dist/Server/Utils/VM/VMAPI.js +51 -4
  476. package/build/dist/Server/Utils/VM/VMAPI.js.map +1 -1
  477. package/build/dist/Server/Utils/VM/VMRunner.js +73 -1
  478. package/build/dist/Server/Utils/VM/VMRunner.js.map +1 -1
  479. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +445 -43
  480. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
  481. package/build/dist/Server/Utils/Workspace/Slack/Slack.js +18 -1
  482. package/build/dist/Server/Utils/Workspace/Slack/Slack.js.map +1 -1
  483. package/build/dist/Server/Utils/Workspace/WorkspaceBase.js.map +1 -1
  484. package/build/dist/Types/AI/FixPullRequestCiStatus.js +1 -1
  485. package/build/dist/Types/AI/FixVerificationStatus.js +2 -2
  486. package/build/dist/Types/API/Hostname.js +73 -4
  487. package/build/dist/Types/API/Hostname.js.map +1 -1
  488. package/build/dist/Types/API/URL.js +42 -24
  489. package/build/dist/Types/API/URL.js.map +1 -1
  490. package/build/dist/Types/Billing/BalanceAdjustmentType.js +15 -0
  491. package/build/dist/Types/Billing/BalanceAdjustmentType.js.map +1 -0
  492. package/build/dist/Types/Billing/ProjectBalanceType.js +14 -0
  493. package/build/dist/Types/Billing/ProjectBalanceType.js.map +1 -0
  494. package/build/dist/Types/Domain.js +22 -0
  495. package/build/dist/Types/Domain.js.map +1 -1
  496. package/build/dist/Types/File/MimeType.js +11 -0
  497. package/build/dist/Types/File/MimeType.js.map +1 -1
  498. package/build/dist/Types/JSONFunctions.js +14 -0
  499. package/build/dist/Types/JSONFunctions.js.map +1 -1
  500. package/build/dist/Types/SerializableObjectDictionary.js +133 -39
  501. package/build/dist/Types/SerializableObjectDictionary.js.map +1 -1
  502. package/build/dist/Types/Telemetry/EntitySource.js +39 -0
  503. package/build/dist/Types/Telemetry/EntitySource.js.map +1 -0
  504. package/build/dist/Types/Telemetry/EntityType.js +27 -0
  505. package/build/dist/Types/Telemetry/EntityType.js.map +1 -1
  506. package/build/dist/Types/Telemetry/EntityTypeGroups.js +57 -0
  507. package/build/dist/Types/Telemetry/EntityTypeGroups.js.map +1 -0
  508. package/build/dist/Types/Workflow/Component.js +21 -0
  509. package/build/dist/Types/Workflow/Component.js.map +1 -1
  510. package/build/dist/Types/Workflow/Components/API.js +35 -0
  511. package/build/dist/Types/Workflow/Components/API.js.map +1 -1
  512. package/build/dist/Types/Workflow/Components/BaseModel.js +87 -28
  513. package/build/dist/Types/Workflow/Components/BaseModel.js.map +1 -1
  514. package/build/dist/Types/Workflow/StepTrace.js +104 -0
  515. package/build/dist/Types/Workflow/StepTrace.js.map +1 -0
  516. package/build/dist/Types/Workflow/TemplateSyntax.js +326 -0
  517. package/build/dist/Types/Workflow/TemplateSyntax.js.map +1 -0
  518. package/build/dist/Types/Workflow/Templates.js +218 -0
  519. package/build/dist/Types/Workflow/Templates.js.map +1 -0
  520. package/build/dist/UI/Components/Date/CustomTimeRangeModal.js +126 -0
  521. package/build/dist/UI/Components/Date/CustomTimeRangeModal.js.map +1 -0
  522. package/build/dist/UI/Components/Date/TimeRangePickerDropdown.js +123 -0
  523. package/build/dist/UI/Components/Date/TimeRangePickerDropdown.js.map +1 -0
  524. package/build/dist/UI/Components/Dictionary/Dictionary.js +22 -6
  525. package/build/dist/UI/Components/Dictionary/Dictionary.js.map +1 -1
  526. package/build/dist/UI/Components/Forms/Fields/ColorPicker.js +52 -13
  527. package/build/dist/UI/Components/Forms/Fields/ColorPicker.js.map +1 -1
  528. package/build/dist/UI/Components/Forms/Fields/IconPicker.js +28 -12
  529. package/build/dist/UI/Components/Forms/Fields/IconPicker.js.map +1 -1
  530. package/build/dist/UI/Components/Forms/Validation.js +44 -0
  531. package/build/dist/UI/Components/Forms/Validation.js.map +1 -1
  532. package/build/dist/UI/Components/GanttChart/ChartContainer.js +4 -3
  533. package/build/dist/UI/Components/GanttChart/ChartContainer.js.map +1 -1
  534. package/build/dist/UI/Components/Input/Input.js +12 -4
  535. package/build/dist/UI/Components/Input/Input.js.map +1 -1
  536. package/build/dist/UI/Components/LogsViewer/components/LogTimeRangePicker.js +5 -108
  537. package/build/dist/UI/Components/LogsViewer/components/LogTimeRangePicker.js.map +1 -1
  538. package/build/dist/UI/Components/Modal/ConfirmModal.js +3 -1
  539. package/build/dist/UI/Components/Modal/ConfirmModal.js.map +1 -1
  540. package/build/dist/UI/Components/Modal/Modal.js +55 -39
  541. package/build/dist/UI/Components/Modal/Modal.js.map +1 -1
  542. package/build/dist/UI/Components/ModelDelete/ModelDelete.js +11 -6
  543. package/build/dist/UI/Components/ModelDelete/ModelDelete.js.map +1 -1
  544. package/build/dist/UI/Components/SideOver/SideOver.js +105 -30
  545. package/build/dist/UI/Components/SideOver/SideOver.js.map +1 -1
  546. package/build/dist/UI/Components/TelemetryViewer/components/TelemetryTimeRangePicker.js +5 -105
  547. package/build/dist/UI/Components/TelemetryViewer/components/TelemetryTimeRangePicker.js.map +1 -1
  548. package/build/dist/UI/Components/Workflow/ArgumentsForm.js +140 -11
  549. package/build/dist/UI/Components/Workflow/ArgumentsForm.js.map +1 -1
  550. package/build/dist/UI/Components/Workflow/Component.js +20 -19
  551. package/build/dist/UI/Components/Workflow/Component.js.map +1 -1
  552. package/build/dist/UI/Components/Workflow/ComponentSettingsModal.js +31 -3
  553. package/build/dist/UI/Components/Workflow/ComponentSettingsModal.js.map +1 -1
  554. package/build/dist/UI/Components/Workflow/GraphLint.js +396 -0
  555. package/build/dist/UI/Components/Workflow/GraphLint.js.map +1 -0
  556. package/build/dist/UI/Components/Workflow/ModelColumnEditor.js +225 -0
  557. package/build/dist/UI/Components/Workflow/ModelColumnEditor.js.map +1 -0
  558. package/build/dist/UI/Components/Workflow/ModelSchema.js +118 -0
  559. package/build/dist/UI/Components/Workflow/ModelSchema.js.map +1 -0
  560. package/build/dist/UI/Components/Workflow/RunForm.js +22 -6
  561. package/build/dist/UI/Components/Workflow/RunForm.js.map +1 -1
  562. package/build/dist/UI/Components/Workflow/RunStatusWatcher.js +76 -0
  563. package/build/dist/UI/Components/Workflow/RunStatusWatcher.js.map +1 -0
  564. package/build/dist/UI/Components/Workflow/StepTraceViewer.js +76 -0
  565. package/build/dist/UI/Components/Workflow/StepTraceViewer.js.map +1 -0
  566. package/build/dist/UI/Components/Workflow/Utils.js +73 -1
  567. package/build/dist/UI/Components/Workflow/Utils.js.map +1 -1
  568. package/build/dist/UI/Components/Workflow/Workflow.js +51 -6
  569. package/build/dist/UI/Components/Workflow/Workflow.js.map +1 -1
  570. package/build/dist/UI/Types/LayeredDismissal.js +21 -0
  571. package/build/dist/UI/Types/LayeredDismissal.js.map +1 -0
  572. package/build/dist/UI/Types/UseAnchoredFieldPopup.js +74 -1
  573. package/build/dist/UI/Types/UseAnchoredFieldPopup.js.map +1 -1
  574. package/build/dist/UI/Utils/PageScrollLock.js +52 -0
  575. package/build/dist/UI/Utils/PageScrollLock.js.map +1 -0
  576. package/build/dist/Utils/Dashboard/HtmlWidgetDocument.js +4 -2
  577. package/build/dist/Utils/Dashboard/HtmlWidgetDocument.js.map +1 -1
  578. package/build/dist/Utils/Dashboard/VariableInterpolation.js +19 -1
  579. package/build/dist/Utils/Dashboard/VariableInterpolation.js.map +1 -1
  580. package/build/dist/Utils/LegacySerializedArray.js +51 -0
  581. package/build/dist/Utils/LegacySerializedArray.js.map +1 -0
  582. package/build/dist/Utils/Monitor/MonitorDependencyRule.js +47 -0
  583. package/build/dist/Utils/Monitor/MonitorDependencyRule.js.map +1 -0
  584. package/build/dist/Utils/Monitor/NetworkDeviceRoleUtil.js +386 -0
  585. package/build/dist/Utils/Monitor/NetworkDeviceRoleUtil.js.map +1 -0
  586. package/build/dist/Utils/Monitor/NetworkTopologyUtil.js +35 -6
  587. package/build/dist/Utils/Monitor/NetworkTopologyUtil.js.map +1 -1
  588. package/build/dist/Utils/Telemetry/EntityKey.js +52 -0
  589. package/build/dist/Utils/Telemetry/EntityKey.js.map +1 -1
  590. package/build/dist/Utils/Telemetry/SavedViewFilters.js +52 -0
  591. package/build/dist/Utils/Telemetry/SavedViewFilters.js.map +1 -0
  592. package/jest.config.json +3 -0
  593. package/package.json +1 -1
  594. package/tsconfig.json +3 -1
@@ -0,0 +1,225 @@
1
+ /*
2
+ * A row-based editor for the two workflow arguments that are keyed on a
3
+ * model's columns: the Query that picks which records a component acts on,
4
+ * and the record of values a create/update writes.
5
+ *
6
+ * Both were bare JSON editors, with the column names — and, for a query, the
7
+ * operator syntax — left entirely to memory. The description on those
8
+ * arguments had to carry a hint about "_id" versus "id" precisely because
9
+ * nothing else told the builder what the columns were called.
10
+ *
11
+ * Everything needed to do better already existed: /model-schema/:tableName
12
+ * knows the columns, and DictionaryForm's operator mode emits exactly the
13
+ * {_type, value} shape that JSONFunctions.deserialize hydrates on the server
14
+ * (FindManyBaseModel and friends). This wires the two together, and keeps a
15
+ * JSON escape hatch for the values rows cannot express.
16
+ */
17
+ import CodeEditor from "../CodeEditor/CodeEditor";
18
+ import ComponentLoader from "../ComponentLoader/ComponentLoader";
19
+ import DictionaryForm, { ValueType } from "../Dictionary/Dictionary";
20
+ import Icon from "../Icon/Icon";
21
+ import { findColumn, useModelSchema, } from "./ModelSchema";
22
+ import CodeType from "../../../Types/Code/CodeType";
23
+ import IconProp from "../../../Types/Icon/IconProp";
24
+ import { ObjectType } from "../../../Types/JSON";
25
+ import React, { useMemo, useRef, useState, } from "react";
26
+ export var ModelColumnEditorMode;
27
+ (function (ModelColumnEditorMode) {
28
+ /** Conditions that select records: column, operator, value. */
29
+ ModelColumnEditorMode["Query"] = "Query";
30
+ /** Values to write: column, value. No operators — you cannot save a ">". */
31
+ ModelColumnEditorMode["Record"] = "Record";
32
+ })(ModelColumnEditorMode || (ModelColumnEditorMode = {}));
33
+ /*
34
+ * Operator wrappers the row editor can show. Anything else in a stored query
35
+ * (an InBetween, a relation sub-object, a raw QueryHelper construct) keeps the
36
+ * JSON editor rather than being silently flattened.
37
+ */
38
+ const REPRESENTABLE_OPERATOR_TYPES = [
39
+ ObjectType.EqualTo,
40
+ ObjectType.NotEqual,
41
+ ObjectType.Search,
42
+ ObjectType.NotContains,
43
+ ObjectType.StartsWith,
44
+ ObjectType.EndsWith,
45
+ ObjectType.GreaterThan,
46
+ ObjectType.GreaterThanOrEqual,
47
+ ObjectType.LessThan,
48
+ ObjectType.LessThanOrEqual,
49
+ ObjectType.IsNull,
50
+ ObjectType.NotNull,
51
+ ObjectType.Includes,
52
+ ObjectType.IncludesNone,
53
+ ];
54
+ const normalizeInitialValue = (value) => {
55
+ if (value === null || value === undefined || value === "") {
56
+ return { text: "", parsed: {} };
57
+ }
58
+ if (typeof value === "object" && !Array.isArray(value)) {
59
+ return { text: JSON.stringify(value, null, 2), parsed: value };
60
+ }
61
+ if (typeof value !== "string") {
62
+ return { text: String(value), parsed: null };
63
+ }
64
+ try {
65
+ const parsed = JSON.parse(value);
66
+ if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
67
+ return { text: value, parsed: parsed };
68
+ }
69
+ return { text: value, parsed: null };
70
+ }
71
+ catch (_a) {
72
+ return { text: value, parsed: null };
73
+ }
74
+ };
75
+ /**
76
+ * Can this value be shown as rows without losing anything?
77
+ *
78
+ * Deliberately conservative: when in doubt the JSON editor stays, because a
79
+ * value silently rewritten into something that means something else is far
80
+ * worse than one the builder has to keep editing as text.
81
+ */
82
+ export const classifyColumnValueCompatibility = (parsed, columns, mode) => {
83
+ if (parsed === null) {
84
+ return {
85
+ compatible: false,
86
+ reasons: ["The current value isn't a JSON object."],
87
+ };
88
+ }
89
+ const reasons = [];
90
+ for (const key of Object.keys(parsed)) {
91
+ /*
92
+ * Columns are only checked when the schema actually loaded. An unknown key
93
+ * is worth saying out loud — it is the "id" versus "_id" mistake — but it
94
+ * does not force the JSON editor, since the runner accepts column names
95
+ * this endpoint does not surface.
96
+ */
97
+ if (columns.length > 0 && !findColumn(columns, key)) {
98
+ reasons.push(`"${key}" isn't a known column on this model.`);
99
+ }
100
+ const value = parsed[key];
101
+ if (value === null) {
102
+ continue;
103
+ }
104
+ if (typeof value === "string" ||
105
+ typeof value === "number" ||
106
+ typeof value === "boolean") {
107
+ continue;
108
+ }
109
+ if (Array.isArray(value)) {
110
+ reasons.push(`"${key}" holds a list. Use the "is any of" operator instead, or keep editing as JSON.`);
111
+ continue;
112
+ }
113
+ if (typeof value === "object") {
114
+ const objectType = value["_type"];
115
+ if (mode === ModelColumnEditorMode.Query &&
116
+ typeof objectType === "string" &&
117
+ REPRESENTABLE_OPERATOR_TYPES.includes(objectType)) {
118
+ continue;
119
+ }
120
+ if (typeof objectType === "string") {
121
+ reasons.push(`"${key}" uses ${objectType}, which the rows can't show.`);
122
+ continue;
123
+ }
124
+ reasons.push(`"${key}" holds a nested record, which the rows can't show.`);
125
+ continue;
126
+ }
127
+ reasons.push(`"${key}" has an unexpected value.`);
128
+ }
129
+ /*
130
+ * An unknown column name is a warning, not a reason to lock the editor —
131
+ * the builder can still fix it in the row that shows it.
132
+ */
133
+ const blocking = reasons.filter((reason) => {
134
+ return !reason.includes("isn't a known column");
135
+ });
136
+ return { compatible: blocking.length === 0, reasons: reasons };
137
+ };
138
+ /**
139
+ * The rows, as the string stored on the workflow argument.
140
+ *
141
+ * Empty collapses to "" rather than "{}" so a required argument still reads as
142
+ * empty to form validation and to the graph linter.
143
+ */
144
+ export const buildColumnValueJson = (value) => {
145
+ const entries = {};
146
+ for (const key of Object.keys(value)) {
147
+ if (key.trim() === "") {
148
+ continue;
149
+ }
150
+ entries[key] = value[key];
151
+ }
152
+ if (Object.keys(entries).length === 0) {
153
+ return "";
154
+ }
155
+ /*
156
+ * The operator wrappers serialize themselves through toJSON() into
157
+ * {_type, value}, which is exactly what the server rehydrates with
158
+ * JSONFunctions.deserialize.
159
+ */
160
+ return JSON.stringify(entries);
161
+ };
162
+ const ModelColumnEditor = (props) => {
163
+ const schema = useModelSchema(props.tableName);
164
+ const isQuery = props.mode === ModelColumnEditorMode.Query;
165
+ const initial = useMemo(() => {
166
+ return normalizeInitialValue(props.initialValue);
167
+ }, []);
168
+ const [jsonText, setJsonText] = useState(initial.text);
169
+ const [viewMode, setViewMode] = useState("builder");
170
+ /*
171
+ * The row editor is uncontrolled after mount (DictionaryForm seeds itself
172
+ * once), so the initial value is captured rather than recomputed.
173
+ */
174
+ const initialRows = useRef((initial.parsed || {}));
175
+ const compatibility = useMemo(() => {
176
+ return classifyColumnValueCompatibility(initial.parsed, schema.columns || [], props.mode);
177
+ }, [schema.columns, props.mode]);
178
+ const columnKeys = useMemo(() => {
179
+ return (schema.columns || []).map((column) => {
180
+ return column.id;
181
+ });
182
+ }, [schema.columns]);
183
+ if (schema.isLoading) {
184
+ return React.createElement(ComponentLoader, null);
185
+ }
186
+ const isLockedToJson = !compatibility.compatible;
187
+ const effectiveMode = isLockedToJson ? "json" : viewMode;
188
+ const onJsonChange = (value) => {
189
+ setJsonText(value);
190
+ props.onChange(value);
191
+ };
192
+ const onRowsChange = (value) => {
193
+ const asJson = buildColumnValueJson(value);
194
+ setJsonText(asJson);
195
+ props.onChange(asJson);
196
+ };
197
+ return (React.createElement("div", null,
198
+ schema.error && (React.createElement("p", { className: "text-sm text-amber-600 mb-2" },
199
+ "Couldn't load this model's columns (",
200
+ schema.error,
201
+ "). You can still write the query as JSON.")),
202
+ isLockedToJson && compatibility.reasons.length > 0 && (React.createElement("div", { className: "mb-2 rounded-md border border-amber-200 bg-amber-50 p-3" },
203
+ React.createElement("p", { className: "text-sm text-amber-800" }, "Editing as JSON, because:"),
204
+ React.createElement("ul", { className: "mt-1 list-disc pl-5 text-sm text-amber-700" }, compatibility.reasons.map((reason, i) => {
205
+ return React.createElement("li", { key: i }, reason);
206
+ })))),
207
+ !isLockedToJson && compatibility.reasons.length > 0 && (React.createElement("div", { className: "mb-2 rounded-md border border-amber-200 bg-amber-50 p-3" },
208
+ React.createElement("ul", { className: "list-disc pl-5 text-sm text-amber-700" }, compatibility.reasons.map((reason, i) => {
209
+ return React.createElement("li", { key: i }, reason);
210
+ })))),
211
+ effectiveMode === "builder" ? (React.createElement(DictionaryForm, { keys: columnKeys, enableOperators: isQuery, valueTypes: [ValueType.Text, ValueType.Number, ValueType.Boolean], addButtonSuffix: isQuery ? "condition" : "field", keyPlaceholder: "Column", valuePlaceholder: "Value", initialValue: initialRows.current, onChange: onRowsChange })) : (React.createElement(CodeEditor, { type: CodeType.JSON, tabIndex: props.tabIndex, error: props.error, initialValue: initial.text, value: jsonText, placeholder: props.placeholder, onChange: onJsonChange })),
212
+ !isLockedToJson && (React.createElement("div", { className: "mt-2" },
213
+ React.createElement("button", { type: "button", className: "text-sm underline text-blue-500 hover:text-blue-600 cursor-pointer inline-flex items-center gap-1", onClick: () => {
214
+ setViewMode(effectiveMode === "builder" ? "json" : "builder");
215
+ } },
216
+ React.createElement(Icon, { icon: IconProp.Code, className: "h-3.5 w-3.5" }),
217
+ effectiveMode === "builder"
218
+ ? "Edit as JSON"
219
+ : isQuery
220
+ ? "Back to conditions"
221
+ : "Back to fields"))),
222
+ props.error && effectiveMode === "builder" && (React.createElement("p", { className: "mt-1 text-sm text-red-400" }, props.error))));
223
+ };
224
+ export default ModelColumnEditor;
225
+ //# sourceMappingURL=ModelColumnEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModelColumnEditor.js","sourceRoot":"","sources":["../../../../../UI/Components/Workflow/ModelColumnEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,eAAe,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AQ,CAAC,IAAI,EACnB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,YAAY,EAAE,OAAO,CAAC,IAAI,EAC1B,KAAK,EAAE,QAAQ,EACf,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,QAAQ,EAAE,YAAY,GACtB,CACH;QAEA,CAAC,cAAc,IAAI,CAClB,6BAAK,SAAS,EAAC,MAAM;YACnB,gCACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,mGAAmG,EAC7G,OAAO,EAAE,GAAG,EAAE;oBACZ,WAAW,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;gBAChE,CAAC;gBAED,oBAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,EAAC,aAAa,GAAG;gBACpD,aAAa,KAAK,SAAS;oBAC1B,CAAC,CAAC,cAAc;oBAChB,CAAC,CAAC,OAAO;wBACP,CAAC,CAAC,oBAAoB;wBACtB,CAAC,CAAC,gBAAgB,CACf,CACL,CACP;QAEA,KAAK,CAAC,KAAK,IAAI,aAAa,KAAK,SAAS,IAAI,CAC7C,2BAAG,SAAS,EAAC,2BAA2B,IAAE,KAAK,CAAC,KAAK,CAAK,CAC3D,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,118 @@
1
+ /*
2
+ * Shared access to the workflow /model-schema/:tableName endpoint.
3
+ *
4
+ * Three builder inputs are backed by a model's column list — the field picker
5
+ * for Select arguments, the query builder for Query arguments, and the record
6
+ * form for create/update arguments — and all three want the same fetch, the
7
+ * same loading and error handling, and the same column shape.
8
+ */
9
+ import HTTPErrorResponse from "../../../Types/API/HTTPErrorResponse";
10
+ import URL from "../../../Types/API/URL";
11
+ import { WORKFLOW_URL } from "../../Config";
12
+ import API from "../../Utils/API/API";
13
+ import { useEffect, useState } from "react";
14
+ export const fetchModelSchema = async (tableName) => {
15
+ const url = URL.fromString(WORKFLOW_URL.toString()).addRoute(`/model-schema/${encodeURIComponent(tableName)}`);
16
+ const result = await API.get({ url });
17
+ if (result instanceof HTTPErrorResponse) {
18
+ throw result;
19
+ }
20
+ const data = result.data;
21
+ return data["columns"] || [];
22
+ };
23
+ /**
24
+ * Load a model's columns, once per table name.
25
+ *
26
+ * Never throws: a failure leaves `columns` as an empty array and puts the
27
+ * message in `error`, so a caller can fall back to its JSON editor rather than
28
+ * showing the builder a blank panel.
29
+ */
30
+ export const useModelSchema = (tableName) => {
31
+ const [columns, setColumns] = useState(null);
32
+ const [isLoading, setIsLoading] = useState(Boolean(tableName));
33
+ const [error, setError] = useState(null);
34
+ useEffect(() => {
35
+ if (!tableName) {
36
+ setColumns([]);
37
+ setIsLoading(false);
38
+ return;
39
+ }
40
+ let cancelled = false;
41
+ const load = async () => {
42
+ setIsLoading(true);
43
+ setError(null);
44
+ try {
45
+ const loaded = await fetchModelSchema(tableName);
46
+ if (cancelled) {
47
+ return;
48
+ }
49
+ setColumns(loaded);
50
+ }
51
+ catch (err) {
52
+ if (cancelled) {
53
+ return;
54
+ }
55
+ setError(API.getFriendlyMessage(err));
56
+ setColumns([]);
57
+ }
58
+ finally {
59
+ if (!cancelled) {
60
+ setIsLoading(false);
61
+ }
62
+ }
63
+ };
64
+ void load();
65
+ return () => {
66
+ cancelled = true;
67
+ };
68
+ }, [tableName]);
69
+ return { columns: columns, isLoading: isLoading, error: error };
70
+ };
71
+ /*
72
+ * Column types that hold a single scalar the builder can sensibly type into a
73
+ * box. Everything else (relations, JSON blobs, buffers) needs the JSON editor.
74
+ */
75
+ const SCALAR_COLUMN_TYPES = [
76
+ "ShortText",
77
+ "LongText",
78
+ "VeryLongText",
79
+ "Slug",
80
+ "Email",
81
+ "Phone",
82
+ "Color",
83
+ "Domain",
84
+ "Name",
85
+ "Description",
86
+ "ObjectID",
87
+ "Number",
88
+ "PositiveNumber",
89
+ "Boolean",
90
+ "Date",
91
+ "Password",
92
+ "HashedString",
93
+ "Port",
94
+ "Hostname",
95
+ "URL",
96
+ "Route",
97
+ "IP",
98
+ "Version",
99
+ "Markdown",
100
+ "HTML",
101
+ "JavaScript",
102
+ "CSS",
103
+ ];
104
+ export const isScalarColumn = (column) => {
105
+ return !column.isRelation && SCALAR_COLUMN_TYPES.includes(column.type);
106
+ };
107
+ export const isNumericColumn = (column) => {
108
+ return column.type === "Number" || column.type === "PositiveNumber";
109
+ };
110
+ export const isBooleanColumn = (column) => {
111
+ return column.type === "Boolean";
112
+ };
113
+ export const findColumn = (columns, columnId) => {
114
+ return columns.find((column) => {
115
+ return column.id === columnId;
116
+ });
117
+ };
118
+ //# sourceMappingURL=ModelSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModelSchema.js","sourceRoot":"","sources":["../../../../../UI/Components/Workflow/ModelSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,iBAAiB,MAAM,sCAAsC,CAAC;AAErE,OAAO,GAAG,MAAM,wBAAwB,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,GAAG,MAAM,qBAAqB,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AA2B5C,MAAM,CAAC,MAAM,gBAAgB,GAA6B,KAAK,EAC7D,SAAiB,EACkB,EAAE;IACrC,MAAM,GAAG,GAAQ,GAAG,CAAC,UAAU,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAC/D,iBAAiB,kBAAkB,CAAC,SAAS,CAAC,EAAE,CACjD,CAAC;IAEF,MAAM,MAAM,GACV,MAAM,GAAG,CAAC,GAAG,CAAa,EAAE,GAAG,EAAE,CAAC,CAAC;IAErC,IAAI,MAAM,YAAY,iBAAiB,EAAE,CAAC;QACxC,MAAM,MAAM,CAAC;IACf,CAAC;IAED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AO,OAAO,CAAC,IAAI,CAAC,CAAC,MAAyB,EAAE,EAAE;QAChD,OAAO,MAAM,CAAC,EAAE,KAAK,QAAQ,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import ErrorMessage from "../ErrorMessage/ErrorMessage";
2
2
  import BasicForm from "../Forms/BasicForm";
3
- import { componentInputTypeToFormFieldType } from "./Utils";
3
+ import { componentInputTypeToFormFieldType, parseStringDictionaryValue, } from "./Utils";
4
+ import { ComponentInputType, } from "../../../Types/Workflow/Component";
4
5
  import React, { useEffect, useRef, useState, } from "react";
5
6
  const RunForm = (props) => {
6
7
  const formRef = useRef(null);
@@ -12,6 +13,23 @@ const RunForm = (props) => {
12
13
  useEffect(() => {
13
14
  props.onFormChange(component);
14
15
  }, [component]);
16
+ /*
17
+ * Same hydration ArgumentsForm does: a StringDictionary renders as key/value
18
+ * rows, and those need a real object rather than the JSON string older
19
+ * workflows stored. The field type is chosen from the same value, so the two
20
+ * cannot disagree about which editor is on screen.
21
+ */
22
+ const formInitialValues = Object.assign({}, (component.arguments || {}));
23
+ for (const argument of component.metadata.runWorkflowManuallyArguments ||
24
+ []) {
25
+ if (argument.type !== ComponentInputType.StringDictionary) {
26
+ continue;
27
+ }
28
+ const parsed = parseStringDictionaryValue(formInitialValues[argument.id]);
29
+ if (parsed !== null) {
30
+ formInitialValues[argument.id] = parsed;
31
+ }
32
+ }
15
33
  return (React.createElement("div", { className: "mb-3 mt-3" },
16
34
  React.createElement("div", { className: "mt-5 mb-5" },
17
35
  React.createElement("h2", { className: "text-base font-medium text-gray-500" },
@@ -21,18 +39,16 @@ const RunForm = (props) => {
21
39
  component.metadata.runWorkflowManuallyArguments &&
22
40
  component.metadata.runWorkflowManuallyArguments.length === 0 && (React.createElement(ErrorMessage, { message: 'This workflow trigger does not take any values. You can run it by clicking the "Run" button below.' })),
23
41
  component.metadata.runWorkflowManuallyArguments &&
24
- component.metadata.runWorkflowManuallyArguments.length > 0 && (React.createElement(BasicForm, { hideSubmitButton: true, ref: formRef, initialValues: Object.assign({}, (component.arguments || {})), onChange: (values) => {
42
+ component.metadata.runWorkflowManuallyArguments.length > 0 && (React.createElement(BasicForm, { hideSubmitButton: true, ref: formRef, initialValues: Object.assign({}, formInitialValues), onChange: (values) => {
25
43
  setComponent(Object.assign(Object.assign({}, component), { arguments: Object.assign(Object.assign({}, (component.arguments || {})), (values || {})) }));
26
44
  }, onFormValidationErrorChanged: (hasError) => {
27
45
  setHasFormValidationErrors(hasError);
28
46
  }, fields: component.metadata.runWorkflowManuallyArguments &&
29
47
  component.metadata.runWorkflowManuallyArguments.map((argument) => {
48
+ var _a;
30
49
  return Object.assign({ title: `${argument.name}`, description: `${argument.required ? "Required" : "Optional"}. ${argument.description}`, field: {
31
50
  [argument.id]: true,
32
- }, required: argument.required, placeholder: argument.placeholder }, componentInputTypeToFormFieldType(argument.type, component.returnValues &&
33
- component.returnValues[argument.id]
34
- ? component.returnValues[argument.id]
35
- : null));
51
+ }, required: argument.required, placeholder: argument.placeholder }, componentInputTypeToFormFieldType(argument.type, (_a = formInitialValues[argument.id]) !== null && _a !== void 0 ? _a : null));
36
52
  }) })))));
37
53
  };
38
54
  export default RunForm;
@@ -1 +1 @@
1
- {"version":3,"file":"RunForm.js","sourceRoot":"","sources":["../../../../../UI/Components/Workflow/RunForm.tsx"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,8BAA8B,CAAC;AACxD,OAAO,SAAwB,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EAAE,iCAAiC,EAAE,MAAM,SAAS,CAAC;AAG5D,OAAO,KAAK,EAAE,EAGZ,SAAS,EACT,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AAQf,MAAM,OAAO,GAAsC,CACjD,KAAqB,EACP,EAAE;IAChB,MAAM,OAAO,GAAQ,MAAM,CAAoC,IAAI,CAAC,CAAC;IACrE,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,G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C,CAClC,QAAQ,CAAC,IAAI,EACb,MAAA,iBAAiB,CAAC,QAAQ,CAAC,EAAE,CAAC,mCAAI,IAAI,CACvC,EACD;oBACJ,CAAC,CACF,GAEH,CACH,CACC,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -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 Logs tab 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,MA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+1,76 @@
1
+ /*
2
+ * A workflow run, read as the list of steps it actually took.
3
+ *
4
+ * 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 the log below."));
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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