@oneuptime/common 12.0.22 → 12.0.24

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 (345) hide show
  1. package/Models/DatabaseModels/DetectionRule.ts +55 -0
  2. package/Models/DatabaseModels/Index.ts +2 -0
  3. package/Models/DatabaseModels/NetworkDevice.ts +44 -0
  4. package/Models/DatabaseModels/NetworkDeviceAutoImportRule.ts +584 -0
  5. package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.ts +105 -0
  6. package/Models/DatabaseModels/Project.ts +68 -0
  7. package/Models/DatabaseModels/User.ts +68 -0
  8. package/Server/API/TelemetryAPI.ts +29 -0
  9. package/Server/Infrastructure/Postgres/SchemaMigrations/1789100000000-AddNetworkDeviceAutoImportRule.ts +60 -0
  10. package/Server/Infrastructure/Postgres/SchemaMigrations/1789200000000-AddSysObjectIdPatternToAutoImportRule.ts +26 -0
  11. package/Server/Infrastructure/Postgres/SchemaMigrations/1789300000000-AddAutoApplyVendorHealthTemplate.ts +26 -0
  12. package/Server/Infrastructure/Postgres/SchemaMigrations/1789400000000-AddNameToNetworkDeviceDiscoveryScan.ts +28 -0
  13. package/Server/Infrastructure/Postgres/SchemaMigrations/1789500000000-AddCampaignUtmFields.ts +49 -0
  14. package/Server/Infrastructure/Postgres/SchemaMigrations/1789512000000-AddDetectionRuleDistinctCountColumns.ts +33 -0
  15. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +12 -0
  16. package/Server/Middleware/GzipRequestBody.ts +311 -0
  17. package/Server/Middleware/MultipartFormData.ts +87 -3
  18. package/Server/Services/DetectionRuleService.ts +73 -6
  19. package/Server/Services/Index.ts +207 -0
  20. package/Server/Services/NetworkDeviceAutoImportRuleEngineService.ts +917 -0
  21. package/Server/Services/NetworkDeviceAutoImportRuleService.ts +181 -0
  22. package/Server/Services/NetworkDeviceDiscoveryScanService.ts +59 -0
  23. package/Server/Services/NetworkDeviceService.ts +148 -0
  24. package/Server/Services/OnCallDutyPolicyEscalationRuleScheduleService.ts +65 -0
  25. package/Server/Services/OnCallDutyPolicyFeedService.ts +1 -1
  26. package/Server/Services/ProjectService.ts +29 -19
  27. package/Server/Services/SecurityEventService.ts +90 -13
  28. package/Server/Services/StatusPageResourceService.ts +223 -0
  29. package/Server/Services/TelemetryAttributeService.ts +17 -0
  30. package/Server/Services/UserService.ts +4 -6
  31. package/Server/Types/Markdown.ts +161 -67
  32. package/Server/Utils/AI/Toolbox/OnCallTools.ts +12 -4
  33. package/Server/Utils/AnalyticsDatabase/Statement.ts +13 -1
  34. package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +297 -6
  35. package/Server/Utils/Attribution.ts +4 -0
  36. package/Server/Utils/Marketing/MarketingEventUtil.ts +45 -7
  37. package/Server/Utils/Monitor/NetworkInventoryUtil.ts +39 -1
  38. package/Server/Utils/SecurityEvent/DetectionRuleEvaluator.ts +55 -3
  39. package/Server/Utils/SecurityEvent/Sigma/SigmaClickhouseCompiler.ts +21 -0
  40. package/Server/Utils/StartServer.ts +12 -32
  41. package/Server/Utils/Telemetry/LlmCostBudgetEvaluator.ts +101 -4
  42. package/Server/Utils/Telemetry/LlmMetricSpend.ts +130 -0
  43. package/Server/Views/Partials/AnalyticsConsent.ejs +159 -102
  44. package/Server/Views/Partials/Head.ejs +2 -1
  45. package/Tests/App/Dashboard/AdminUserNotificationMethodsPage.test.tsx +776 -38
  46. package/Tests/App/Dashboard/CorrelateFilterBuilder.test.tsx +359 -0
  47. package/Tests/App/Dashboard/CorrelateGraph.test.tsx +865 -0
  48. package/Tests/App/Dashboard/CorrelationGraph.test.ts +346 -0
  49. package/Tests/App/Dashboard/CriteriaFilterConditionDropdown.test.tsx +256 -0
  50. package/Tests/App/Dashboard/CriteriaFilterDefaults.test.ts +738 -0
  51. package/Tests/App/Dashboard/CriteriaFilterMonitorTypeChange.test.ts +1122 -0
  52. package/Tests/App/Dashboard/DiscoveryScanWizardValidation.test.tsx +283 -0
  53. package/Tests/App/Dashboard/ExternalStatusPageCriteriaFilter.test.ts +407 -0
  54. package/Tests/App/Dashboard/MetricSeriesInvestigateMenu.test.tsx +5 -14
  55. package/Tests/App/Dashboard/MonitorCriteriaActionToggles.test.tsx +426 -0
  56. package/Tests/App/Dashboard/MonitorStepsCriteriaAlignmentWiring.test.tsx +352 -0
  57. package/Tests/App/Dashboard/OnCallLayerCardOverrides.test.tsx +278 -0
  58. package/Tests/App/Dashboard/OnCallLayerShiftPreviewOverrides.test.ts +237 -0
  59. package/Tests/App/Dashboard/OnCallReadinessSurfaces.test.tsx +2 -2
  60. package/Tests/App/Dashboard/OnCallSchedulePreviewOverrides.test.tsx +460 -0
  61. package/Tests/App/Dashboard/SecurityEventAttributeUtil.test.ts +171 -0
  62. package/Tests/App/Dashboard/SecurityEventCorrelation.test.ts +857 -0
  63. package/Tests/App/Dashboard/SecurityEventDetailObservables.test.tsx +194 -0
  64. package/Tests/App/Dashboard/SecurityEventsDetectionRulesPage.test.tsx +124 -0
  65. package/Tests/App/Dashboard/SecurityEventsMonitorStepForm.test.tsx +79 -19
  66. package/Tests/App/Dashboard/SecurityEventsTableColumns.test.tsx +382 -0
  67. package/Tests/App/StatusPage/BulkAddStatusPageMonitors.test.ts +216 -0
  68. package/Tests/App/StatusPage/BulkAddStatusPageMonitorsModal.test.tsx +590 -11
  69. package/Tests/App/StatusPage/StatusPageResourceExplorer.test.tsx +757 -0
  70. package/Tests/Models/DiscoveryScanNameColumn.test.ts +293 -0
  71. package/Tests/Server/API/SecurityEventAttributesAPI.test.ts +564 -0
  72. package/Tests/Server/Infrastructure/Postgres/SchemaMigrationsOrdering.test.ts +120 -4
  73. package/Tests/Server/Middleware/GzipRequestBody.test.ts +725 -0
  74. package/Tests/Server/Middleware/MultipartFormData.test.ts +298 -0
  75. package/Tests/Server/Services/AddDetectionRuleDistinctCountColumnsMigration.test.ts +311 -0
  76. package/Tests/Server/Services/AutoImportScanCredentialSelect.test.ts +205 -0
  77. package/Tests/Server/Services/DetectionRuleService.test.ts +134 -2
  78. package/Tests/Server/Services/DiscoveryScanClaimHookFreeSafety.test.ts +7 -1
  79. package/Tests/Server/Services/FeedRetentionConsistency.test.ts +131 -0
  80. package/Tests/Server/Services/NetworkDeviceAutoImportRuleEngineService.test.ts +933 -0
  81. package/Tests/Server/Services/NetworkDeviceDiscoveryScanService.test.ts +194 -0
  82. package/Tests/Server/Services/NetworkDeviceMonitorStatusStamp.test.ts +800 -0
  83. package/Tests/Server/Services/OnCallScheduleAttachRosterRefresh.test.ts +244 -0
  84. package/Tests/Server/Services/SecurityEventService.test.ts +376 -0
  85. package/Tests/Server/Services/StatusPageResourceDuplicates.test.ts +703 -0
  86. package/Tests/Server/Services/TelemetryAttributeServiceSecurityEvent.test.ts +256 -0
  87. package/Tests/Server/Types/Workflow/Components/ComponentRegistryParity.test.ts +417 -0
  88. package/Tests/Server/Utils/AnalyticsDatabase/StatementGeneratorWhereOperators.test.ts +677 -0
  89. package/Tests/Server/Utils/Marketing/MarketingEventUtil.test.ts +43 -0
  90. package/Tests/Server/Utils/Monitor/Criteria/ProfileMonitorCriteria.test.ts +15 -11
  91. package/Tests/Server/Utils/Monitor/NetworkInventoryUtil.test.ts +97 -1
  92. package/Tests/Server/Utils/SecurityEvent/DetectionRuleEvaluator.test.ts +369 -8
  93. package/Tests/Server/Utils/SecurityEvent/SigmaClickhouseCompiler.test.ts +35 -0
  94. package/Tests/Server/Utils/Telemetry/LlmCostBudgetEvaluator.test.ts +368 -4
  95. package/Tests/Server/Utils/Telemetry/LlmMetricSpend.test.ts +245 -0
  96. package/Tests/Server/Views/AnalyticsConsentPartial.test.ts +48 -5
  97. package/Tests/Types/Code/YamlSyntax.test.ts +396 -0
  98. package/Tests/Types/Monitor/MetricAndProfileDefaultCriteria.test.ts +957 -0
  99. package/Tests/Types/Monitor/MonitorCriteriaActionValidation.test.ts +598 -0
  100. package/Tests/Types/Monitor/MonitorCriteriaInstance.test.ts +49 -0
  101. package/Tests/Types/Monitor/Recommendation/MonitorRecommendationNotificationMode.test.ts +6 -6
  102. package/Tests/Types/Monitor/Recommendation/MonitorRecommendationSeverityMapper.test.ts +4 -4
  103. package/Tests/Types/Monitor/Recommendation/MonitorRecommendationUtil.test.ts +4 -3
  104. package/Tests/Types/Telemetry/LlmMetricConventions.test.ts +193 -0
  105. package/Tests/UI/Components/AiInvestigationSettingsCard.test.tsx +0 -12
  106. package/Tests/UI/Components/CardModelDetailEdit.test.tsx +1 -17
  107. package/Tests/UI/Components/CodeEditor.test.tsx +474 -10
  108. package/Tests/UI/Components/Detail/YamlField.test.tsx +105 -0
  109. package/Tests/UI/Components/EntityDropdownLabelsBulkAdd.test.tsx +319 -0
  110. package/Tests/UI/Components/Forms/FormFieldYaml.test.tsx +231 -0
  111. package/Tests/UI/Components/Forms/Utils/FormFieldSchemaTypeUtil.test.ts +1 -0
  112. package/Tests/UI/Components/Forms/ValidationYAML.test.ts +234 -0
  113. package/Tests/UI/Components/ModelTable/AttributeColumns.test.tsx +573 -0
  114. package/Tests/UI/Components/ModelTable/BaseModelTableAttributeColumns.test.tsx +824 -0
  115. package/Tests/UI/Components/ModelTable/ColumnCustomizationModalAddableColumns.test.tsx +707 -0
  116. package/Tests/UI/Components/SideOver.test.tsx +1 -1
  117. package/Tests/UI/Components/StatusPage/ResourceGridSelection.test.tsx +294 -0
  118. package/Tests/UI/Components/StatusPage/ResourceListSelection.test.tsx +436 -0
  119. package/Tests/UI/Components/TableBulkCsvExport.test.tsx +6 -2
  120. package/Tests/UI/Components/Toggle.test.tsx +25 -0
  121. package/Tests/UI/Components/YamlEditor.test.tsx +847 -0
  122. package/Tests/Utils/NetworkDevice/DeviceReachabilityUtil.test.ts +252 -0
  123. package/Tests/Utils/NetworkDiscovery/AutoImportRuleMatcher.test.ts +516 -0
  124. package/Tests/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.test.ts +272 -0
  125. package/Tests/Utils/NetworkDiscovery/DiscoveredHostUtil.test.ts +221 -0
  126. package/Tests/Utils/NetworkDiscovery/ScanNameUtil.test.ts +312 -0
  127. package/Tests/Utils/NetworkDiscovery/ScanTargetUtil.test.ts +164 -0
  128. package/Tests/Utils/StatusPage/ResourceExplorer.test.ts +468 -0
  129. package/Tests/Utils/Telemetry/LlmMetricQuery.test.ts +472 -0
  130. package/Types/Code/YamlSyntax.ts +396 -0
  131. package/Types/Exception/ExceptionCode.ts +1 -0
  132. package/Types/Exception/PayloadTooLargeException.ts +8 -0
  133. package/Types/Marketing/Attribution.ts +10 -0
  134. package/Types/Marketing/MarketingEvent.ts +4 -0
  135. package/Types/Monitor/MonitorCriteriaInstance.ts +116 -56
  136. package/Types/Monitor/Recommendation/MonitorRecommendationSeverityMapper.ts +2 -1
  137. package/Types/NetworkAutomation/RuleRunResult.ts +84 -0
  138. package/Types/Permission.ts +47 -0
  139. package/Types/SecurityEvent/DetectionFindingConstants.ts +11 -0
  140. package/Types/Telemetry/LlmMetricConventions.ts +124 -0
  141. package/UI/Components/AutocompleteTextInput/AutocompleteTextInput.tsx +3 -0
  142. package/UI/Components/BulkUpdate/BulkUpdateForm.tsx +10 -1
  143. package/UI/Components/CodeEditor/CodeEditor.tsx +241 -79
  144. package/UI/Components/CodeEditor/YamlEditor.tsx +369 -0
  145. package/UI/Components/Detail/Detail.tsx +10 -0
  146. package/UI/Components/EntityDropdown/EntityDropdown.tsx +33 -0
  147. package/UI/Components/Forms/Fields/FormField.tsx +31 -0
  148. package/UI/Components/Forms/Types/Field.ts +8 -0
  149. package/UI/Components/Forms/Types/FormFieldSchemaType.ts +1 -0
  150. package/UI/Components/Forms/Utils/FormFieldSchemaTypeUtil.ts +2 -0
  151. package/UI/Components/Forms/Validation.ts +46 -0
  152. package/UI/Components/Input/Input.tsx +3 -0
  153. package/UI/Components/ModelTable/AttributeColumns.tsx +321 -0
  154. package/UI/Components/ModelTable/BaseModelTable.tsx +263 -14
  155. package/UI/Components/ModelTable/Column.ts +8 -0
  156. package/UI/Components/ModelTable/ColumnCustomizationModal.tsx +310 -0
  157. package/UI/Components/ModelTable/ColumnPreference.ts +13 -1
  158. package/UI/Components/MonitorTemplateVariables/TemplateVariablesModal.tsx +2 -2
  159. package/UI/Components/SideOver/SideOver.tsx +5 -5
  160. package/UI/Components/StatusPage/ResourceGrid.tsx +82 -2
  161. package/UI/Components/StatusPage/ResourceList.tsx +197 -38
  162. package/UI/Components/Toggle/Toggle.tsx +9 -1
  163. package/UI/Components/Types/FieldType.ts +1 -0
  164. package/Utils/NetworkDevice/DeviceReachabilityUtil.ts +73 -1
  165. package/Utils/NetworkDiscovery/AutoImportRuleMatcher.ts +257 -0
  166. package/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.ts +183 -0
  167. package/Utils/NetworkDiscovery/DiscoveredHostUtil.ts +95 -0
  168. package/Utils/NetworkDiscovery/DiscoveryImportEligibility.ts +66 -0
  169. package/Utils/NetworkDiscovery/ScanNameUtil.ts +181 -0
  170. package/Utils/NetworkDiscovery/ScanTargetUtil.ts +82 -0
  171. package/Utils/StatusPage/ResourceExplorer.ts +258 -0
  172. package/Utils/Telemetry/LlmMetricQuery.ts +204 -0
  173. package/build/dist/Models/DatabaseModels/DetectionRule.js +57 -0
  174. package/build/dist/Models/DatabaseModels/DetectionRule.js.map +1 -1
  175. package/build/dist/Models/DatabaseModels/Index.js +2 -0
  176. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  177. package/build/dist/Models/DatabaseModels/NetworkDevice.js +45 -0
  178. package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -1
  179. package/build/dist/Models/DatabaseModels/NetworkDeviceAutoImportRule.js +609 -0
  180. package/build/dist/Models/DatabaseModels/NetworkDeviceAutoImportRule.js.map +1 -0
  181. package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +97 -0
  182. package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js.map +1 -1
  183. package/build/dist/Models/DatabaseModels/Project.js +76 -0
  184. package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
  185. package/build/dist/Models/DatabaseModels/User.js +76 -0
  186. package/build/dist/Models/DatabaseModels/User.js.map +1 -1
  187. package/build/dist/Server/API/TelemetryAPI.js +17 -0
  188. package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
  189. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789100000000-AddNetworkDeviceAutoImportRule.js +35 -0
  190. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789100000000-AddNetworkDeviceAutoImportRule.js.map +1 -0
  191. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789200000000-AddSysObjectIdPatternToAutoImportRule.js +19 -0
  192. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789200000000-AddSysObjectIdPatternToAutoImportRule.js.map +1 -0
  193. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789300000000-AddAutoApplyVendorHealthTemplate.js +19 -0
  194. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789300000000-AddAutoApplyVendorHealthTemplate.js.map +1 -0
  195. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789400000000-AddNameToNetworkDeviceDiscoveryScan.js +21 -0
  196. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789400000000-AddNameToNetworkDeviceDiscoveryScan.js.map +1 -0
  197. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789500000000-AddCampaignUtmFields.js +42 -0
  198. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789500000000-AddCampaignUtmFields.js.map +1 -0
  199. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789512000000-AddDetectionRuleDistinctCountColumns.js +22 -0
  200. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789512000000-AddDetectionRuleDistinctCountColumns.js.map +1 -0
  201. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +12 -0
  202. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  203. package/build/dist/Server/Middleware/GzipRequestBody.js +224 -0
  204. package/build/dist/Server/Middleware/GzipRequestBody.js.map +1 -0
  205. package/build/dist/Server/Middleware/MultipartFormData.js +71 -2
  206. package/build/dist/Server/Middleware/MultipartFormData.js.map +1 -1
  207. package/build/dist/Server/Services/DetectionRuleService.js +49 -4
  208. package/build/dist/Server/Services/DetectionRuleService.js.map +1 -1
  209. package/build/dist/Server/Services/Index.js +206 -0
  210. package/build/dist/Server/Services/Index.js.map +1 -1
  211. package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js +711 -0
  212. package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js.map +1 -0
  213. package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js +155 -0
  214. package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js.map +1 -0
  215. package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js +50 -0
  216. package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js.map +1 -1
  217. package/build/dist/Server/Services/NetworkDeviceService.js +124 -0
  218. package/build/dist/Server/Services/NetworkDeviceService.js.map +1 -1
  219. package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleScheduleService.js +68 -13
  220. package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleScheduleService.js.map +1 -1
  221. package/build/dist/Server/Services/OnCallDutyPolicyFeedService.js +1 -1
  222. package/build/dist/Server/Services/OnCallDutyPolicyFeedService.js.map +1 -1
  223. package/build/dist/Server/Services/ProjectService.js +25 -45
  224. package/build/dist/Server/Services/ProjectService.js.map +1 -1
  225. package/build/dist/Server/Services/SecurityEventService.js +57 -5
  226. package/build/dist/Server/Services/SecurityEventService.js.map +1 -1
  227. package/build/dist/Server/Services/StatusPageResourceService.js +140 -0
  228. package/build/dist/Server/Services/StatusPageResourceService.js.map +1 -1
  229. package/build/dist/Server/Services/TelemetryAttributeService.js +17 -0
  230. package/build/dist/Server/Services/TelemetryAttributeService.js.map +1 -1
  231. package/build/dist/Server/Services/UserService.js +2 -12
  232. package/build/dist/Server/Services/UserService.js.map +1 -1
  233. package/build/dist/Server/Types/Markdown.js +147 -61
  234. package/build/dist/Server/Types/Markdown.js.map +1 -1
  235. package/build/dist/Server/Utils/AI/Toolbox/OnCallTools.js +12 -4
  236. package/build/dist/Server/Utils/AI/Toolbox/OnCallTools.js.map +1 -1
  237. package/build/dist/Server/Utils/AnalyticsDatabase/Statement.js +12 -1
  238. package/build/dist/Server/Utils/AnalyticsDatabase/Statement.js.map +1 -1
  239. package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +246 -9
  240. package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
  241. package/build/dist/Server/Utils/Attribution.js.map +1 -1
  242. package/build/dist/Server/Utils/Marketing/MarketingEventUtil.js +27 -7
  243. package/build/dist/Server/Utils/Marketing/MarketingEventUtil.js.map +1 -1
  244. package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js +26 -0
  245. package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js.map +1 -1
  246. package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js +42 -7
  247. package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js.map +1 -1
  248. package/build/dist/Server/Utils/SecurityEvent/Sigma/SigmaClickhouseCompiler.js +18 -0
  249. package/build/dist/Server/Utils/SecurityEvent/Sigma/SigmaClickhouseCompiler.js.map +1 -1
  250. package/build/dist/Server/Utils/StartServer.js +12 -21
  251. package/build/dist/Server/Utils/StartServer.js.map +1 -1
  252. package/build/dist/Server/Utils/Telemetry/LlmCostBudgetEvaluator.js +76 -5
  253. package/build/dist/Server/Utils/Telemetry/LlmCostBudgetEvaluator.js.map +1 -1
  254. package/build/dist/Server/Utils/Telemetry/LlmMetricSpend.js +102 -0
  255. package/build/dist/Server/Utils/Telemetry/LlmMetricSpend.js.map +1 -0
  256. package/build/dist/Types/Code/YamlSyntax.js +212 -0
  257. package/build/dist/Types/Code/YamlSyntax.js.map +1 -0
  258. package/build/dist/Types/Exception/ExceptionCode.js +1 -0
  259. package/build/dist/Types/Exception/ExceptionCode.js.map +1 -1
  260. package/build/dist/Types/Exception/PayloadTooLargeException.js +8 -0
  261. package/build/dist/Types/Exception/PayloadTooLargeException.js.map +1 -0
  262. package/build/dist/Types/Marketing/Attribution.js +10 -0
  263. package/build/dist/Types/Marketing/Attribution.js.map +1 -1
  264. package/build/dist/Types/Monitor/MonitorCriteriaInstance.js +112 -51
  265. package/build/dist/Types/Monitor/MonitorCriteriaInstance.js.map +1 -1
  266. package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationSeverityMapper.js +2 -1
  267. package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationSeverityMapper.js.map +1 -1
  268. package/build/dist/Types/NetworkAutomation/RuleRunResult.js +24 -0
  269. package/build/dist/Types/NetworkAutomation/RuleRunResult.js.map +1 -1
  270. package/build/dist/Types/Permission.js +41 -0
  271. package/build/dist/Types/Permission.js.map +1 -1
  272. package/build/dist/Types/SecurityEvent/DetectionFindingConstants.js +9 -0
  273. package/build/dist/Types/SecurityEvent/DetectionFindingConstants.js.map +1 -1
  274. package/build/dist/Types/Telemetry/LlmMetricConventions.js +98 -0
  275. package/build/dist/Types/Telemetry/LlmMetricConventions.js.map +1 -0
  276. package/build/dist/UI/Components/AutocompleteTextInput/AutocompleteTextInput.js +1 -1
  277. package/build/dist/UI/Components/AutocompleteTextInput/AutocompleteTextInput.js.map +1 -1
  278. package/build/dist/UI/Components/BulkUpdate/BulkUpdateForm.js +5 -2
  279. package/build/dist/UI/Components/BulkUpdate/BulkUpdateForm.js.map +1 -1
  280. package/build/dist/UI/Components/CodeEditor/CodeEditor.js +206 -76
  281. package/build/dist/UI/Components/CodeEditor/CodeEditor.js.map +1 -1
  282. package/build/dist/UI/Components/CodeEditor/YamlEditor.js +201 -0
  283. package/build/dist/UI/Components/CodeEditor/YamlEditor.js.map +1 -0
  284. package/build/dist/UI/Components/Detail/Detail.js +9 -0
  285. package/build/dist/UI/Components/Detail/Detail.js.map +1 -1
  286. package/build/dist/UI/Components/EntityDropdown/EntityDropdown.js +16 -1
  287. package/build/dist/UI/Components/EntityDropdown/EntityDropdown.js.map +1 -1
  288. package/build/dist/UI/Components/Forms/Fields/FormField.js +14 -1
  289. package/build/dist/UI/Components/Forms/Fields/FormField.js.map +1 -1
  290. package/build/dist/UI/Components/Forms/Types/Field.js.map +1 -1
  291. package/build/dist/UI/Components/Forms/Types/FormFieldSchemaType.js +1 -0
  292. package/build/dist/UI/Components/Forms/Types/FormFieldSchemaType.js.map +1 -1
  293. package/build/dist/UI/Components/Forms/Utils/FormFieldSchemaTypeUtil.js +2 -0
  294. package/build/dist/UI/Components/Forms/Utils/FormFieldSchemaTypeUtil.js.map +1 -1
  295. package/build/dist/UI/Components/Forms/Validation.js +27 -0
  296. package/build/dist/UI/Components/Forms/Validation.js.map +1 -1
  297. package/build/dist/UI/Components/Input/Input.js +1 -1
  298. package/build/dist/UI/Components/Input/Input.js.map +1 -1
  299. package/build/dist/UI/Components/ModelTable/AttributeColumns.js +159 -0
  300. package/build/dist/UI/Components/ModelTable/AttributeColumns.js.map +1 -0
  301. package/build/dist/UI/Components/ModelTable/BaseModelTable.js +179 -17
  302. package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
  303. package/build/dist/UI/Components/ModelTable/ColumnCustomizationModal.js +133 -2
  304. package/build/dist/UI/Components/ModelTable/ColumnCustomizationModal.js.map +1 -1
  305. package/build/dist/UI/Components/ModelTable/ColumnPreference.js +7 -1
  306. package/build/dist/UI/Components/ModelTable/ColumnPreference.js.map +1 -1
  307. package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesModal.js +2 -2
  308. package/build/dist/UI/Components/SideOver/SideOver.js +5 -5
  309. package/build/dist/UI/Components/StatusPage/ResourceGrid.js +28 -2
  310. package/build/dist/UI/Components/StatusPage/ResourceGrid.js.map +1 -1
  311. package/build/dist/UI/Components/StatusPage/ResourceList.js +87 -20
  312. package/build/dist/UI/Components/StatusPage/ResourceList.js.map +1 -1
  313. package/build/dist/UI/Components/Toggle/Toggle.js +9 -1
  314. package/build/dist/UI/Components/Toggle/Toggle.js.map +1 -1
  315. package/build/dist/UI/Components/Types/FieldType.js +1 -0
  316. package/build/dist/UI/Components/Types/FieldType.js.map +1 -1
  317. package/build/dist/Utils/NetworkDevice/DeviceReachabilityUtil.js +37 -1
  318. package/build/dist/Utils/NetworkDevice/DeviceReachabilityUtil.js.map +1 -1
  319. package/build/dist/Utils/NetworkDiscovery/AutoImportRuleMatcher.js +149 -0
  320. package/build/dist/Utils/NetworkDiscovery/AutoImportRuleMatcher.js.map +1 -0
  321. package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js +121 -0
  322. package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js.map +1 -0
  323. package/build/dist/Utils/NetworkDiscovery/DiscoveredHostUtil.js +75 -0
  324. package/build/dist/Utils/NetworkDiscovery/DiscoveredHostUtil.js.map +1 -0
  325. package/build/dist/Utils/NetworkDiscovery/DiscoveryImportEligibility.js +59 -0
  326. package/build/dist/Utils/NetworkDiscovery/DiscoveryImportEligibility.js.map +1 -0
  327. package/build/dist/Utils/NetworkDiscovery/ScanNameUtil.js +120 -0
  328. package/build/dist/Utils/NetworkDiscovery/ScanNameUtil.js.map +1 -0
  329. package/build/dist/Utils/NetworkDiscovery/ScanTargetUtil.js +60 -0
  330. package/build/dist/Utils/NetworkDiscovery/ScanTargetUtil.js.map +1 -1
  331. package/build/dist/Utils/StatusPage/ResourceExplorer.js +171 -0
  332. package/build/dist/Utils/StatusPage/ResourceExplorer.js.map +1 -1
  333. package/build/dist/Utils/Telemetry/LlmMetricQuery.js +119 -0
  334. package/build/dist/Utils/Telemetry/LlmMetricQuery.js.map +1 -0
  335. package/jest.config.json +2 -0
  336. package/package.json +1 -1
  337. package/tsconfig.json +2 -1
  338. package/Tests/UI/Components/Toast.test.tsx +0 -197
  339. package/Tests/UI/Components/ToastStacking.test.tsx +0 -198
  340. package/UI/Components/Toast/Toast.tsx +0 -189
  341. package/UI/Components/Toast/ToastInit.tsx +0 -110
  342. package/build/dist/UI/Components/Toast/Toast.js +0 -123
  343. package/build/dist/UI/Components/Toast/Toast.js.map +0 -1
  344. package/build/dist/UI/Components/Toast/ToastInit.js +0 -53
  345. package/build/dist/UI/Components/Toast/ToastInit.js.map +0 -1
@@ -0,0 +1,212 @@
1
+ import { hasEachBlock, maskTemplateExpressions, } from "../Workflow/TemplateSyntax";
2
+ import yaml from "js-yaml";
3
+ const readMark = (error) => {
4
+ const mark = error === null || error === void 0 ? void 0 : error.mark;
5
+ if (!mark) {
6
+ return { line: null, column: null };
7
+ }
8
+ return {
9
+ line: typeof mark.line === "number" ? mark.line + 1 : null,
10
+ column: typeof mark.column === "number" ? mark.column + 1 : null,
11
+ };
12
+ };
13
+ const readReason = (error) => {
14
+ const reason = error === null || error === void 0 ? void 0 : error.reason;
15
+ if (reason) {
16
+ return reason;
17
+ }
18
+ /*
19
+ * Fall back to the first line of the message: js-yaml appends a multi-line
20
+ * source excerpt to `message`, which is far too much for a form error.
21
+ */
22
+ if (error instanceof Error && error.message) {
23
+ return error.message.split("\n")[0] || "Invalid YAML.";
24
+ }
25
+ return "Invalid YAML.";
26
+ };
27
+ const isScalarOpeningQuote = (line, index) => {
28
+ const before = line.slice(0, index).trimEnd();
29
+ if (before === "") {
30
+ return true;
31
+ }
32
+ return ["-", ":", ",", "[", "{"].includes(before[before.length - 1] || "");
33
+ };
34
+ const scanLine = (line, state) => {
35
+ let index = 0;
36
+ while (index < line.length) {
37
+ const character = line[index] || "";
38
+ if (state.openQuote === '"') {
39
+ if (character === "\\") {
40
+ index += 2;
41
+ continue;
42
+ }
43
+ if (character === '"') {
44
+ state.openQuote = null;
45
+ }
46
+ index++;
47
+ continue;
48
+ }
49
+ if (state.openQuote === "'") {
50
+ // '' is an escaped quote inside a single-quoted scalar, not a close.
51
+ if (character === "'" && line[index + 1] === "'") {
52
+ index += 2;
53
+ continue;
54
+ }
55
+ if (character === "'") {
56
+ state.openQuote = null;
57
+ }
58
+ index++;
59
+ continue;
60
+ }
61
+ const previous = line[index - 1] || "";
62
+ if (character === "#" &&
63
+ (index === 0 || previous === " " || previous === "\t")) {
64
+ return line.slice(0, index);
65
+ }
66
+ if ((character === '"' || character === "'") &&
67
+ isScalarOpeningQuote(line, index)) {
68
+ state.openQuote = character;
69
+ index++;
70
+ continue;
71
+ }
72
+ if (character === "{" || character === "[") {
73
+ state.flowDepth++;
74
+ }
75
+ if (character === "}" || character === "]") {
76
+ state.flowDepth = Math.max(0, state.flowDepth - 1);
77
+ }
78
+ index++;
79
+ }
80
+ return line;
81
+ };
82
+ // `key:` or `- ` — the shapes whose indentation decides the document's tree.
83
+ const BLOCK_NODE_START = /^(?:-(?:\s|$)|[^\s#].*?:(?:\s|$))/;
84
+ // A trailing `|`, `>`, with optional chomping and explicit-indent indicators.
85
+ const BLOCK_SCALAR_HEADER = /(?:^|\s)[|>][+-]?[0-9]*[+-]?\s*$/;
86
+ const findTabIndentation = (text) => {
87
+ var _a;
88
+ const lines = text.split("\n");
89
+ const state = { flowDepth: 0, openQuote: null };
90
+ let blockScalarIndent = null;
91
+ for (let index = 0; index < lines.length; index++) {
92
+ // Tolerate CRLF: the \r is not indentation and must not shift a column.
93
+ const line = (lines[index] || "").replace(/\r$/, "");
94
+ const indentation = ((_a = line.match(/^[ \t]*/)) === null || _a === void 0 ? void 0 : _a[0]) || "";
95
+ const isBlank = line.trim() === "";
96
+ if (blockScalarIndent !== null) {
97
+ // Blank lines and anything indented past the header stay inside it.
98
+ if (isBlank || indentation.length > blockScalarIndent) {
99
+ continue;
100
+ }
101
+ blockScalarIndent = null;
102
+ }
103
+ if (isBlank) {
104
+ continue;
105
+ }
106
+ const wasInsideQuote = state.openQuote !== null;
107
+ const insideFlow = state.flowDepth > 0;
108
+ const code = scanLine(line, state);
109
+ /*
110
+ * Only judge lines that begin a block node in block context. A
111
+ * continuation of a quoted scalar, or a line inside `{}`/`[]`, may hold a
112
+ * leading tab legally.
113
+ */
114
+ if (!wasInsideQuote &&
115
+ !insideFlow &&
116
+ indentation.includes("\t") &&
117
+ BLOCK_NODE_START.test(line.slice(indentation.length))) {
118
+ return {
119
+ line: index + 1,
120
+ column: indentation.indexOf("\t") + 1,
121
+ };
122
+ }
123
+ if (state.openQuote === null &&
124
+ state.flowDepth === 0 &&
125
+ BLOCK_SCALAR_HEADER.test(code)) {
126
+ blockScalarIndent = indentation.length;
127
+ }
128
+ }
129
+ return null;
130
+ };
131
+ /**
132
+ * Parse `value` as YAML and report whether it is well formed.
133
+ */
134
+ export const checkYamlSyntax = (value) => {
135
+ const skipped = {
136
+ isValid: true,
137
+ errorMessage: null,
138
+ wasSkipped: true,
139
+ line: null,
140
+ column: null,
141
+ };
142
+ // Not a string: nothing was typed into an editor, so there is no text to parse.
143
+ if (typeof value !== "string") {
144
+ return skipped;
145
+ }
146
+ // Empty is the job of the required-field check, not this one.
147
+ if (value.trim() === "") {
148
+ return skipped;
149
+ }
150
+ /*
151
+ * A handlebars loop emits its body once per array element, so the document's
152
+ * indentation depends on data that only exists at run time.
153
+ */
154
+ if (hasEachBlock(value)) {
155
+ return skipped;
156
+ }
157
+ const masked = maskTemplateExpressions(value);
158
+ /*
159
+ * Before the parse, not after: js-yaml ACCEPTS tab indentation and returns a
160
+ * silently restructured document, so there is no exception to catch.
161
+ */
162
+ const tab = findTabIndentation(masked);
163
+ if (tab) {
164
+ return {
165
+ isValid: false,
166
+ errorMessage: "a tab character cannot be used for indentation",
167
+ wasSkipped: false,
168
+ line: tab.line,
169
+ column: tab.column,
170
+ };
171
+ }
172
+ try {
173
+ /*
174
+ * loadAll, not load: a YAML stream may hold several `---` separated
175
+ * documents and load() rejects the second one. The parsed values are
176
+ * discarded - only the syntax is being judged here.
177
+ */
178
+ yaml.loadAll(masked);
179
+ return {
180
+ isValid: true,
181
+ errorMessage: null,
182
+ wasSkipped: false,
183
+ line: null,
184
+ column: null,
185
+ };
186
+ }
187
+ catch (err) {
188
+ const { line, column } = readMark(err);
189
+ return {
190
+ isValid: false,
191
+ errorMessage: readReason(err),
192
+ wasSkipped: false,
193
+ line,
194
+ column,
195
+ };
196
+ }
197
+ };
198
+ /**
199
+ * "bad indentation of a mapping entry (line 4, column 3)" - the one-line
200
+ * sentence both the form error and the editor status bar are built from.
201
+ */
202
+ export const describeYamlSyntaxError = (result) => {
203
+ const reason = result.errorMessage || "Invalid YAML.";
204
+ if (result.line === null) {
205
+ return reason;
206
+ }
207
+ if (result.column === null) {
208
+ return `${reason} (line ${result.line})`;
209
+ }
210
+ return `${reason} (line ${result.line}, column ${result.column})`;
211
+ };
212
+ //# sourceMappingURL=YamlSyntax.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"YamlSyntax.js","sourceRoot":"","sources":["../../../../Types/Code/YamlSyntax.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,uBAAuB,GACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,IAAI,MAAM,SAAS,CAAC;AAoD3B,MAAM,QAAQ,GAAqB,CACjC,KAAc,EACkC,EAAE;IAClD,MAAM,IAAI,GAAgC,KAAmC,aAAnC,KAAK,uBAAL,KAAK,CAC3C,IAAI,CAAC;IAET,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACtC,CAAC;IAED,OAAO;QACL,IAAI,EAAE,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI;QAC1D,MAAM,EAAE,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI;KACjE,CAAC;AACJ,CAAC,CAAC;AAI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,MAAM,CAAC,MAAM,GAAG,CAAC;AACpE,CAAC,CAAC"}
@@ -16,6 +16,7 @@ var ExceptionCode;
16
16
  ExceptionCode[ExceptionCode["PaymentRequiredException"] = 402] = "PaymentRequiredException";
17
17
  ExceptionCode[ExceptionCode["NotFoundException"] = 404] = "NotFoundException";
18
18
  ExceptionCode[ExceptionCode["TimeoutException"] = 408] = "TimeoutException";
19
+ ExceptionCode[ExceptionCode["PayloadTooLargeException"] = 413] = "PayloadTooLargeException";
19
20
  ExceptionCode[ExceptionCode["TenantNotFoundException"] = 405] = "TenantNotFoundException";
20
21
  ExceptionCode[ExceptionCode["SsoAuthorizationException"] = 406] = "SsoAuthorizationException";
21
22
  ExceptionCode[ExceptionCode["TooManyRequestsException"] = 429] = "TooManyRequestsException";
@@ -1 +1 @@
1
- {"version":3,"file":"ExceptionCode.js","sourceRoot":"","sources":["../../../../Types/Exception/ExceptionCode.ts"],"names":[],"mappings":"AAAA,IAAK,aAqBJ;AArBD,WAAK,aAAa;IAChB,uFAA2B,CAAA;IAC3B,yEAAoB,CAAA;IACpB,iEAAgB,CAAA;IAChB,qGAAmC,CAAA;IACnC,mFAAyB,CAAA;IACzB,+EAAuB,CAAA;IACvB,2EAAsB,CAAA;IACtB,iFAAyB,CAAA;IACzB,+EAAwB,CAAA;IACxB,mGAAkC,CAAA;IAClC,yEAAqB,CAAA;IACrB,uFAA4B,CAAA;IAC5B,6FAA+B,CAAA;IAC/B,2FAA8B,CAAA;IAC9B,6EAAuB,CAAA;IACvB,2EAAsB,CAAA;IACtB,yFAA6B,CAAA;IAC7B,6FAA+B,CAAA;IAC/B,2FAA8B,CAAA;IAC9B,iGAAiC,CAAA;AACnC,CAAC,EArBI,aAAa,KAAb,aAAa,QAqBjB;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"ExceptionCode.js","sourceRoot":"","sources":["../../../../Types/Exception/ExceptionCode.ts"],"names":[],"mappings":"AAAA,IAAK,aAsBJ;AAtBD,WAAK,aAAa;IAChB,uFAA2B,CAAA;IAC3B,yEAAoB,CAAA;IACpB,iEAAgB,CAAA;IAChB,qGAAmC,CAAA;IACnC,mFAAyB,CAAA;IACzB,+EAAuB,CAAA;IACvB,2EAAsB,CAAA;IACtB,iFAAyB,CAAA;IACzB,+EAAwB,CAAA;IACxB,mGAAkC,CAAA;IAClC,yEAAqB,CAAA;IACrB,uFAA4B,CAAA;IAC5B,6FAA+B,CAAA;IAC/B,2FAA8B,CAAA;IAC9B,6EAAuB,CAAA;IACvB,2EAAsB,CAAA;IACtB,2FAA8B,CAAA;IAC9B,yFAA6B,CAAA;IAC7B,6FAA+B,CAAA;IAC/B,2FAA8B,CAAA;IAC9B,iGAAiC,CAAA;AACnC,CAAC,EAtBI,aAAa,KAAb,aAAa,QAsBjB;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,8 @@
1
+ import Exception from "./Exception";
2
+ import ExceptionCode from "./ExceptionCode";
3
+ export default class PayloadTooLargeException extends Exception {
4
+ constructor(message) {
5
+ super(ExceptionCode.PayloadTooLargeException, message);
6
+ }
7
+ }
8
+ //# sourceMappingURL=PayloadTooLargeException.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PayloadTooLargeException.js","sourceRoot":"","sources":["../../../../Types/Exception/PayloadTooLargeException.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,SAAS;IAC7D,YAAmB,OAAe;QAChC,KAAK,CAAC,aAAa,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;CACF"}
@@ -34,6 +34,16 @@ export const UtmWireKeyToPropertyKey = {
34
34
  utm_campaign: "utmCampaign",
35
35
  utm_term: "utmTerm",
36
36
  utm_content: "utmContent",
37
+ /*
38
+ * GA4's second tier of campaign parameters. Google Ads auto-tagging and the
39
+ * GA4 URL builder emit these alongside the five above, and the booking
40
+ * receiver reports on them, so they are stored rather than dropped at the
41
+ * door.
42
+ */
43
+ utm_id: "utmId",
44
+ utm_source_platform: "utmSourcePlatform",
45
+ utm_creative_format: "utmCreativeFormat",
46
+ utm_marketing_tactic: "utmMarketingTactic",
37
47
  };
38
48
  export const UtmPropertyKeys = Object.values(UtmWireKeyToPropertyKey);
39
49
  /*
@@ -1 +1 @@
1
- {"version":3,"file":"Attribution.js","sourceRoot":"","sources":["../../../../Types/Marketing/Attribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,gFAAgF;AAChF,MAAM,CAAC,MAAM,aAAa,GAAkB;IAC1C,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,WAAW;IACX,QAAQ;IACR,SAAS;CACV,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAA2B;IAC7D,UAAU,EAAE,WAAW;IACvB,UAAU,EAAE,WAAW;IACvB,YAAY,EAAE,aAAa;IAC3B,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,YAAY;CAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAkB,MAAM,CAAC,MAAM,CACzD,uBAAuB,CACxB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAW,QAAQ,CAAC;AAElD;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAkB;IACjD,GAAG,eAAe;IAClB,YAAY;IACZ,UAAU;IACV,WAAW;CACZ,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAW,GAAG,CAAC"}
1
+ {"version":3,"file":"Attribution.js","sourceRoot":"","sources":["../../../../Types/Marketing/Attribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,gFAAgF;AAChF,MAAM,CAAC,MAAM,aAAa,GAAkB;IAC1C,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,WAAW;IACX,QAAQ;IACR,SAAS;CACV,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAA2B;IAC7D,UAAU,EAAE,WAAW;IACvB,UAAU,EAAE,WAAW;IACvB,YAAY,EAAE,aAAa;IAC3B,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,YAAY;IACzB;;;;;OAKG;IACH,MAAM,EAAE,OAAO;IACf,mBAAmB,EAAE,mBAAmB;IACxC,mBAAmB,EAAE,mBAAmB;IACxC,oBAAoB,EAAE,oBAAoB;CAC3C,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAkB,MAAM,CAAC,MAAM,CACzD,uBAAuB,CACxB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAW,QAAQ,CAAC;AAElD;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAkB;IACjD,GAAG,eAAe;IAClB,YAAY;IACZ,UAAU;IACV,WAAW;CACZ,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAW,GAAG,CAAC"}
@@ -22,7 +22,14 @@ class MonitorCriteriaInstance extends DatabaseProperty {
22
22
  filters: [
23
23
  {
24
24
  checkOn: CheckOn.IsOnline,
25
- filterType: undefined,
25
+ /*
26
+ * Seed the condition too, matching
27
+ * getNewMonitorCriteriaInstanceAsJSON. A filter with no filter
28
+ * type shows an empty "Filter Condition" dropdown in the form
29
+ * and never matches anything at evaluation time, because every
30
+ * comparator in CompareCriteria switches on the filter type.
31
+ */
32
+ filterType: FilterType.True,
26
33
  value: undefined,
27
34
  },
28
35
  ],
@@ -36,6 +43,32 @@ class MonitorCriteriaInstance extends DatabaseProperty {
36
43
  description: "",
37
44
  };
38
45
  }
46
+ /*
47
+ * The monitor types whose criteria MonitorCriteriaEvaluator hands to
48
+ * MetricMonitorCriteria. That evaluator reads exactly one thing -
49
+ * CheckOn.MetricValue - so these types share a single pair of defaults:
50
+ * a metric that is reporting a value means online, a metric that has
51
+ * gone to zero means offline.
52
+ *
53
+ * Kept in step with the routing list in MonitorCriteriaEvaluator and
54
+ * with the check-on narrowing in the dashboard's CriteriaFilter util,
55
+ * which offers these types the metric value and nothing else. A type
56
+ * missing here falls through to `new MonitorCriteriaInstance()` and
57
+ * ships an unnamed criteria whose "Is Online" filter no evaluator on
58
+ * this path reads - a rule that can never fire and cannot be saved,
59
+ * since getValidationError requires a name and a description.
60
+ */
61
+ static isMetricBackedMonitorType(monitorType) {
62
+ return (monitorType === MonitorType.Metrics ||
63
+ monitorType === MonitorType.Kubernetes ||
64
+ monitorType === MonitorType.Docker ||
65
+ monitorType === MonitorType.Host ||
66
+ monitorType === MonitorType.Podman ||
67
+ monitorType === MonitorType.DockerSwarm ||
68
+ monitorType === MonitorType.Proxmox ||
69
+ monitorType === MonitorType.Ceph ||
70
+ monitorType === MonitorType.IoTDevice);
71
+ }
39
72
  static getDefaultOnlineMonitorCriteriaInstance(arg) {
40
73
  if (arg.monitorType === MonitorType.IncomingRequest) {
41
74
  const monitorCriteriaInstance = new MonitorCriteriaInstance();
@@ -158,7 +191,7 @@ class MonitorCriteriaInstance extends DatabaseProperty {
158
191
  };
159
192
  return monitorCriteriaInstance;
160
193
  }
161
- if (arg.monitorType === MonitorType.Metrics) {
194
+ if (MonitorCriteriaInstance.isMetricBackedMonitorType(arg.monitorType)) {
162
195
  const monitorCriteriaInstance = new MonitorCriteriaInstance();
163
196
  monitorCriteriaInstance.data = {
164
197
  id: ObjectID.generate().toString(),
@@ -176,7 +209,7 @@ class MonitorCriteriaInstance extends DatabaseProperty {
176
209
  ? arg.metricOptions.metricAliases[0]
177
210
  : undefined,
178
211
  },
179
- value: 0, // if there are some logs then monitor is online.
212
+ value: 0, // the metric is reporting above zero, so the monitor is online.
180
213
  },
181
214
  ],
182
215
  incidents: [],
@@ -189,7 +222,7 @@ class MonitorCriteriaInstance extends DatabaseProperty {
189
222
  };
190
223
  return monitorCriteriaInstance;
191
224
  }
192
- if (arg.monitorType === MonitorType.Kubernetes) {
225
+ if (arg.monitorType === MonitorType.Profiles) {
193
226
  const monitorCriteriaInstance = new MonitorCriteriaInstance();
194
227
  monitorCriteriaInstance.data = {
195
228
  id: ObjectID.generate().toString(),
@@ -197,17 +230,9 @@ class MonitorCriteriaInstance extends DatabaseProperty {
197
230
  filterCondition: FilterCondition.Any,
198
231
  filters: [
199
232
  {
200
- checkOn: CheckOn.MetricValue,
233
+ checkOn: CheckOn.ProfileCount,
201
234
  filterType: FilterType.GreaterThan,
202
- metricMonitorOptions: {
203
- metricAggregationType: EvaluateOverTimeType.AnyValue,
204
- metricAlias: arg.metricOptions &&
205
- arg.metricOptions.metricAliases &&
206
- arg.metricOptions.metricAliases.length > 0
207
- ? arg.metricOptions.metricAliases[0]
208
- : undefined,
209
- },
210
- value: 0,
235
+ value: 0, // if profiles are arriving then the monitor is online.
211
236
  },
212
237
  ],
213
238
  incidents: [],
@@ -966,7 +991,7 @@ class MonitorCriteriaInstance extends DatabaseProperty {
966
991
  description: `This criteria checks if the ${arg.monitorName} has exceptions.`,
967
992
  };
968
993
  }
969
- if (arg.monitorType === MonitorType.Metrics) {
994
+ if (MonitorCriteriaInstance.isMetricBackedMonitorType(arg.monitorType)) {
970
995
  monitorCriteriaInstance.data = {
971
996
  id: ObjectID.generate().toString(),
972
997
  monitorStatusId: arg.monitorStatusId,
@@ -983,7 +1008,15 @@ class MonitorCriteriaInstance extends DatabaseProperty {
983
1008
  ? arg.metricOptions.metricAliases[0]
984
1009
  : undefined,
985
1010
  },
986
- value: 0, // if there are no logs then the monitor is offline
1011
+ /*
1012
+ * A reported value of zero, not an absent one. When the window
1013
+ * holds no samples at all the evaluator honours
1014
+ * metricMonitorOptions.onNoDataPolicy, which defaults to
1015
+ * Ignore, so silence alone does not fire this - a user who
1016
+ * wants "stopped reporting" to page has to opt into
1017
+ * NoDataPolicy.Trigger or TreatAsZero on the filter.
1018
+ */
1019
+ value: 0,
987
1020
  },
988
1021
  ],
989
1022
  incidents: [
@@ -1013,24 +1046,16 @@ class MonitorCriteriaInstance extends DatabaseProperty {
1013
1046
  description: `This criteria checks if the ${arg.monitorName} is offline`,
1014
1047
  };
1015
1048
  }
1016
- if (arg.monitorType === MonitorType.Kubernetes) {
1049
+ if (arg.monitorType === MonitorType.Profiles) {
1017
1050
  monitorCriteriaInstance.data = {
1018
1051
  id: ObjectID.generate().toString(),
1019
1052
  monitorStatusId: arg.monitorStatusId,
1020
1053
  filterCondition: FilterCondition.Any,
1021
1054
  filters: [
1022
1055
  {
1023
- checkOn: CheckOn.MetricValue,
1056
+ checkOn: CheckOn.ProfileCount,
1024
1057
  filterType: FilterType.EqualTo,
1025
- metricMonitorOptions: {
1026
- metricAggregationType: EvaluateOverTimeType.AnyValue,
1027
- metricAlias: arg.metricOptions &&
1028
- arg.metricOptions.metricAliases &&
1029
- arg.metricOptions.metricAliases.length > 0
1030
- ? arg.metricOptions.metricAliases[0]
1031
- : undefined,
1032
- },
1033
- value: 0,
1058
+ value: 0, // if no profiles are arriving then the monitor is offline
1034
1059
  },
1035
1060
  ],
1036
1061
  incidents: [
@@ -1299,38 +1324,74 @@ class MonitorCriteriaInstance extends DatabaseProperty {
1299
1324
  if (!value.data.description) {
1300
1325
  return `Description is required for criteria "${value.data.name}"`;
1301
1326
  }
1302
- for (const incident of value.data.incidents) {
1303
- if (!incident) {
1304
- continue;
1305
- }
1306
- if (!incident.title) {
1307
- return `Incident title is required for criteria "${value.data.name}"`;
1308
- }
1309
- if (!incident.description) {
1310
- return `Incident description is required for criteria "${value.data.name}"`;
1311
- }
1312
- if (!incident.incidentSeverityId) {
1313
- return `Incident severity is required for criteria "${value.data.name}"`;
1327
+ /*
1328
+ * Each "when filters match, ..." action is validated only while its own
1329
+ * switch is on.
1330
+ *
1331
+ * The criteria form keeps the incident / alert rows it seeded when a
1332
+ * switch was turned on, so that turning the switch back on restores what
1333
+ * was typed - the same retained-but-inert config that
1334
+ * MonitorStepsReferenceExtractor documents for project references. The
1335
+ * evaluator ignores those rows entirely while the flag is off
1336
+ * (MonitorIncident.criteriaMetCreateIncidentsAndUpdateMonitorStatus,
1337
+ * MonitorAlert.criteriaMetCreateAlertsAndUpdateMonitorStatus), so
1338
+ * validating them anyway only blocked the form: the row is rendered only
1339
+ * while its switch is on, which left the user staring at "Incident title
1340
+ * is required" with no field on screen to type it into and no way past
1341
+ * Next (issues #3410, #3413).
1342
+ *
1343
+ * The predicate is the falsy one the evaluator uses, not `!== false`, so
1344
+ * a criteria saved before these flags existed - populated rows, no flag -
1345
+ * is treated as off here exactly as it already is at runtime.
1346
+ *
1347
+ * Title and severity are the two fields the form marks required; the
1348
+ * description is not one of them. It sits in a collapsed section labelled
1349
+ * "Optional incident description" / "Optional alert description", and both
1350
+ * Incident.description and Alert.description are nullable columns. So it is
1351
+ * not required here either - demanding it stuck the form on a field the UI
1352
+ * calls optional and keeps folded away, which is the second half of #3410.
1353
+ */
1354
+ if (value.data.createIncidents) {
1355
+ for (const incident of value.data.incidents) {
1356
+ if (!incident) {
1357
+ continue;
1358
+ }
1359
+ if (!incident.title) {
1360
+ return `Incident title is required for criteria "${value.data.name}"`;
1361
+ }
1362
+ if (!incident.incidentSeverityId) {
1363
+ return `Incident severity is required for criteria "${value.data.name}"`;
1364
+ }
1314
1365
  }
1315
1366
  }
1316
- for (const alert of value.data.alerts) {
1317
- if (!alert) {
1318
- continue;
1319
- }
1320
- if (!alert.title) {
1321
- return `Alert title is required for criteria "${value.data.name}"`;
1322
- }
1323
- if (!alert.description) {
1324
- return `Alert description is required for criteria "${value.data.name}"`;
1325
- }
1326
- if (!alert.alertSeverityId) {
1327
- return `Alert severity is required for criteria "${value.data.name}"`;
1367
+ if (value.data.createAlerts) {
1368
+ for (const alert of value.data.alerts) {
1369
+ if (!alert) {
1370
+ continue;
1371
+ }
1372
+ if (!alert.title) {
1373
+ return `Alert title is required for criteria "${value.data.name}"`;
1374
+ }
1375
+ if (!alert.alertSeverityId) {
1376
+ return `Alert severity is required for criteria "${value.data.name}"`;
1377
+ }
1328
1378
  }
1329
1379
  }
1330
1380
  for (const filter of value.data.filters) {
1331
1381
  if (!filter.checkOn) {
1332
1382
  return `Filter Type is required for criteria "${value.data.name}"`;
1333
1383
  }
1384
+ /*
1385
+ * A filter with no condition is silently dead: every comparator in
1386
+ * CompareCriteria switches on the filter type and returns "no
1387
+ * match" for one it does not recognise, so the criteria never
1388
+ * fires. The empty dropdown is easy to walk past when every field
1389
+ * around it is filled in, so refuse the save instead of accepting
1390
+ * a rule that can never be true.
1391
+ */
1392
+ if (!filter.filterType) {
1393
+ return `Filter Condition is required for criteria "${value.data.name}" on filter type: ${filter.checkOn}`;
1394
+ }
1334
1395
  if (monitorType === MonitorType.Ping &&
1335
1396
  filter.checkOn !== CheckOn.IsOnline &&
1336
1397
  filter.checkOn !== CheckOn.ResponseTime &&