@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,407 @@
1
+ import CriteriaFilterUtil from "../../../../App/FeatureSet/Dashboard/src/Utils/Form/Monitor/CriteriaFilter";
2
+ import ExternalStatusPageMonitorCriteria from "../../../Server/Utils/Monitor/Criteria/ExternalStatusPageMonitorCriteria";
3
+ import FilterCondition from "../../../Types/Filter/FilterCondition";
4
+ import {
5
+ CheckOn,
6
+ CriteriaFilter,
7
+ FilterType,
8
+ } from "../../../Types/Monitor/CriteriaFilter";
9
+ import MonitorCriteriaInstance from "../../../Types/Monitor/MonitorCriteriaInstance";
10
+ import MonitorType from "../../../Types/Monitor/MonitorType";
11
+ import ObjectID from "../../../Types/ObjectID";
12
+ import ProbeMonitorResponse from "../../../Types/Probe/ProbeMonitorResponse";
13
+ import { DropdownOption } from "../../../UI/Components/Dropdown/Dropdown";
14
+ import { describe, expect, test } from "@jest/globals";
15
+
16
+ /*
17
+ * Regression cover for #3412.
18
+ *
19
+ * On an External Status Page monitor, the seeded "no active incidents" filter
20
+ * rendered its Filter Condition dropdown as an empty "Select...", while the
21
+ * sibling "Is Online" filter's condition read "True" and this filter's own
22
+ * value already read 0.
23
+ *
24
+ * The criteria itself was correct — MonitorCriteriaInstance seeds it as
25
+ * EqualTo 0 — but "External Status Page Active Incidents" was grouped with
26
+ * "External Status Page Response Time" in the condition dropdown, and that
27
+ * group only offers the four inequality comparators. With no option matching
28
+ * the stored EqualTo, the dropdown fell through to its placeholder, so the
29
+ * screen implied the condition was unset when it was not.
30
+ *
31
+ * Active incidents is a whole-number count, so "is exactly N" is a condition
32
+ * it should offer; response time is a measurement, where it is noise. Split
33
+ * the two, and the seeded criteria renders what it stores.
34
+ *
35
+ * The generalised invariants — every seeded criteria across every monitor type
36
+ * must be renderable, and every filter the form hands the user must arrive
37
+ * with both dropdowns chosen — live in CriteriaFilterDefaults.test.ts.
38
+ */
39
+
40
+ function optionValues(options: Array<DropdownOption>): Array<string> {
41
+ return options.map((option: DropdownOption) => {
42
+ return option.value.toString();
43
+ });
44
+ }
45
+
46
+ function conditionsOffered(checkOn: CheckOn): Array<string> {
47
+ return optionValues(
48
+ CriteriaFilterUtil.getFilterTypeOptionsByCheckOn(checkOn),
49
+ );
50
+ }
51
+
52
+ /*
53
+ * What the Filter Condition dropdown would display for a stored filter: the
54
+ * option whose value matches, or undefined — which is what makes react-select
55
+ * fall back to its "Select..." placeholder.
56
+ */
57
+ function renderedCondition(
58
+ criteriaFilter: CriteriaFilter,
59
+ ): DropdownOption | undefined {
60
+ return CriteriaFilterUtil.getFilterTypeOptionsByCheckOn(
61
+ criteriaFilter.checkOn,
62
+ ).find((option: DropdownOption) => {
63
+ return option.value === criteriaFilter.filterType;
64
+ });
65
+ }
66
+
67
+ function seededOnlineCriteria(): MonitorCriteriaInstance {
68
+ return MonitorCriteriaInstance.getDefaultOnlineMonitorCriteriaInstance({
69
+ monitorType: MonitorType.ExternalStatusPage,
70
+ monitorStatusId: new ObjectID("aaaaaaaaaaaaaaaaaaaaaaaa"),
71
+ monitorName: "Acme Status",
72
+ })!;
73
+ }
74
+
75
+ function seededOfflineCriteria(): MonitorCriteriaInstance {
76
+ return MonitorCriteriaInstance.getDefaultOfflineMonitorCriteriaInstance({
77
+ monitorType: MonitorType.ExternalStatusPage,
78
+ monitorStatusId: new ObjectID("bbbbbbbbbbbbbbbbbbbbbbbb"),
79
+ incidentSeverityId: new ObjectID("cccccccccccccccccccccccc"),
80
+ alertSeverityId: new ObjectID("dddddddddddddddddddddddd"),
81
+ monitorName: "Acme Status",
82
+ });
83
+ }
84
+
85
+ function activeIncidentsFilterOf(
86
+ instance: MonitorCriteriaInstance,
87
+ ): CriteriaFilter {
88
+ return instance.data!.filters.find((filter: CriteriaFilter) => {
89
+ return filter.checkOn === CheckOn.ExternalStatusPageActiveIncidents;
90
+ })!;
91
+ }
92
+
93
+ async function evaluateActiveIncidents(input: {
94
+ activeIncidentCount: number;
95
+ criteriaFilter: CriteriaFilter;
96
+ }): Promise<string | null> {
97
+ const dataToProcess: ProbeMonitorResponse = {
98
+ projectId: ObjectID.generate(),
99
+ monitorId: ObjectID.generate(),
100
+ monitorStepId: ObjectID.generate(),
101
+ probeId: ObjectID.generate(),
102
+ failureCause: "",
103
+ isOnline: true,
104
+ responseTimeInMs: 100,
105
+ externalStatusPageResponse: {
106
+ isOnline: true,
107
+ overallStatus: "Operational",
108
+ componentStatuses: [],
109
+ activeIncidentCount: input.activeIncidentCount,
110
+ responseTimeInMs: 100,
111
+ failureCause: "",
112
+ },
113
+ monitoredAt: new Date(),
114
+ };
115
+
116
+ return ExternalStatusPageMonitorCriteria.isMonitorInstanceCriteriaFilterMet({
117
+ dataToProcess: dataToProcess,
118
+ criteriaFilter: input.criteriaFilter,
119
+ });
120
+ }
121
+
122
+ describe("External Status Page criteria filter conditions", () => {
123
+ describe("the reported screen", () => {
124
+ test("the seeded 'no active incidents' filter renders its condition instead of a placeholder", () => {
125
+ const criteriaFilter: CriteriaFilter = activeIncidentsFilterOf(
126
+ seededOnlineCriteria(),
127
+ );
128
+
129
+ // What is stored, unchanged by this fix.
130
+ expect(criteriaFilter.filterType).toBe(FilterType.EqualTo);
131
+ expect(criteriaFilter.value).toBe(0);
132
+
133
+ // What the dropdown draws for it. Before the fix this was undefined.
134
+ expect(renderedCondition(criteriaFilter)).toEqual({
135
+ label: FilterType.EqualTo,
136
+ value: FilterType.EqualTo,
137
+ });
138
+ });
139
+
140
+ test("every filter in the seeded online criteria renders its condition", () => {
141
+ const instance: MonitorCriteriaInstance = seededOnlineCriteria();
142
+
143
+ expect(instance.data?.filterCondition).toBe(FilterCondition.All);
144
+ expect(instance.data?.filters).toHaveLength(2);
145
+
146
+ for (const criteriaFilter of instance.data!.filters) {
147
+ expect(renderedCondition(criteriaFilter)).toBeDefined();
148
+ }
149
+ });
150
+
151
+ test("every filter in the seeded offline criteria renders its condition", () => {
152
+ const instance: MonitorCriteriaInstance = seededOfflineCriteria();
153
+
154
+ expect(instance.data?.filterCondition).toBe(FilterCondition.Any);
155
+ expect(instance.data!.filters.length).toBeGreaterThan(0);
156
+
157
+ for (const criteriaFilter of instance.data!.filters) {
158
+ expect(renderedCondition(criteriaFilter)).toBeDefined();
159
+ }
160
+ });
161
+
162
+ test("the sibling 'is online' filter is unchanged", () => {
163
+ const criteriaFilter: CriteriaFilter =
164
+ seededOnlineCriteria().data!.filters[0]!;
165
+
166
+ expect(criteriaFilter.checkOn).toBe(CheckOn.ExternalStatusPageIsOnline);
167
+ expect(criteriaFilter.filterType).toBe(FilterType.True);
168
+ expect(renderedCondition(criteriaFilter)).toBeDefined();
169
+ });
170
+
171
+ /*
172
+ * The 0 the user saw in the Value box on the *newly added* filter is the
173
+ * example placeholder, not a stored value. Keeping it pinned here so the
174
+ * two are not conflated again: the value field was fine, the condition
175
+ * dropdown was not.
176
+ */
177
+ test("the active incidents value box still shows 0 as its example", () => {
178
+ expect(
179
+ CriteriaFilterUtil.getFilterTypePlaceholderValueByCheckOn({
180
+ monitorType: MonitorType.ExternalStatusPage,
181
+ checkOn: CheckOn.ExternalStatusPageActiveIncidents,
182
+ }),
183
+ ).toBe("0");
184
+ });
185
+ });
186
+
187
+ describe("conditions offered for active incidents", () => {
188
+ test("offers exact match alongside the inequalities", () => {
189
+ expect(
190
+ conditionsOffered(CheckOn.ExternalStatusPageActiveIncidents),
191
+ ).toEqual([
192
+ FilterType.EqualTo,
193
+ FilterType.NotEqualTo,
194
+ FilterType.GreaterThan,
195
+ FilterType.LessThan,
196
+ FilterType.GreaterThanOrEqualTo,
197
+ FilterType.LessThanOrEqualTo,
198
+ ]);
199
+ });
200
+
201
+ test("defaults to exact match, which is how the seeded criteria is written", () => {
202
+ expect(
203
+ CriteriaFilterUtil.getDefaultFilterTypeByCheckOn(
204
+ CheckOn.ExternalStatusPageActiveIncidents,
205
+ ),
206
+ ).toBe(FilterType.EqualTo);
207
+
208
+ expect(activeIncidentsFilterOf(seededOnlineCriteria()).filterType).toBe(
209
+ FilterType.EqualTo,
210
+ );
211
+ });
212
+
213
+ test("offers no text or boolean conditions for a count", () => {
214
+ const offered: Array<string> = conditionsOffered(
215
+ CheckOn.ExternalStatusPageActiveIncidents,
216
+ );
217
+
218
+ expect(offered).not.toContain(FilterType.Contains);
219
+ expect(offered).not.toContain(FilterType.True);
220
+ expect(offered).not.toContain(FilterType.IsEmpty);
221
+ expect(offered).not.toContain(FilterType.EvaluatesToTrue);
222
+ });
223
+
224
+ test("takes a value, so the Value box stays on screen", () => {
225
+ expect(
226
+ CriteriaFilterUtil.isDropdownValueField({
227
+ checkOn: CheckOn.ExternalStatusPageActiveIncidents,
228
+ }),
229
+ ).toBe(false);
230
+ });
231
+ });
232
+
233
+ describe("response time is a measurement, and keeps only inequalities", () => {
234
+ test("is not swept along with the count", () => {
235
+ expect(conditionsOffered(CheckOn.ExternalStatusPageResponseTime)).toEqual(
236
+ [
237
+ FilterType.GreaterThan,
238
+ FilterType.LessThan,
239
+ FilterType.GreaterThanOrEqualTo,
240
+ FilterType.LessThanOrEqualTo,
241
+ ],
242
+ );
243
+ });
244
+
245
+ test("does not offer exact match on a millisecond reading", () => {
246
+ const offered: Array<string> = conditionsOffered(
247
+ CheckOn.ExternalStatusPageResponseTime,
248
+ );
249
+
250
+ expect(offered).not.toContain(FilterType.EqualTo);
251
+ expect(offered).not.toContain(FilterType.NotEqualTo);
252
+ });
253
+ });
254
+
255
+ describe("the other External Status Page checks are untouched", () => {
256
+ test("is online stays boolean", () => {
257
+ expect(conditionsOffered(CheckOn.ExternalStatusPageIsOnline)).toEqual([
258
+ FilterType.True,
259
+ FilterType.False,
260
+ ]);
261
+ });
262
+
263
+ test.each([
264
+ CheckOn.ExternalStatusPageOverallStatus,
265
+ CheckOn.ExternalStatusPageComponentStatus,
266
+ ])("%s stays a string comparison", (checkOn: CheckOn) => {
267
+ expect(conditionsOffered(checkOn)).toEqual([
268
+ FilterType.EqualTo,
269
+ FilterType.NotEqualTo,
270
+ FilterType.Contains,
271
+ FilterType.NotContains,
272
+ FilterType.StartsWith,
273
+ FilterType.EndsWith,
274
+ ]);
275
+ });
276
+
277
+ test("the monitor type still offers all five checks", () => {
278
+ expect(
279
+ optionValues(
280
+ CriteriaFilterUtil.getCheckOnOptionsByMonitorType(
281
+ MonitorType.ExternalStatusPage,
282
+ ),
283
+ ).sort(),
284
+ ).toEqual(
285
+ [
286
+ CheckOn.ExternalStatusPageIsOnline,
287
+ CheckOn.ExternalStatusPageOverallStatus,
288
+ CheckOn.ExternalStatusPageComponentStatus,
289
+ CheckOn.ExternalStatusPageActiveIncidents,
290
+ CheckOn.ExternalStatusPageResponseTime,
291
+ ].sort(),
292
+ );
293
+ });
294
+ });
295
+
296
+ /*
297
+ * The dropdown must not offer a condition the evaluator will quietly ignore.
298
+ * Exact match is newly on offer here, so prove the server actually decides
299
+ * on it — including on the seeded criteria exactly as it is stored.
300
+ */
301
+ describe("the newly offered conditions are honoured by the evaluator", () => {
302
+ test("the seeded 'no active incidents' filter is met when there are none", async () => {
303
+ await expect(
304
+ evaluateActiveIncidents({
305
+ activeIncidentCount: 0,
306
+ criteriaFilter: activeIncidentsFilterOf(seededOnlineCriteria()),
307
+ }),
308
+ ).resolves.toContain("equal to 0");
309
+ });
310
+
311
+ test("the seeded 'no active incidents' filter is not met once one opens", async () => {
312
+ await expect(
313
+ evaluateActiveIncidents({
314
+ activeIncidentCount: 1,
315
+ criteriaFilter: activeIncidentsFilterOf(seededOnlineCriteria()),
316
+ }),
317
+ ).resolves.toBeNull();
318
+ });
319
+
320
+ test("exact match fires on the matching count", async () => {
321
+ await expect(
322
+ evaluateActiveIncidents({
323
+ activeIncidentCount: 3,
324
+ criteriaFilter: {
325
+ checkOn: CheckOn.ExternalStatusPageActiveIncidents,
326
+ filterType: FilterType.EqualTo,
327
+ value: 3,
328
+ },
329
+ }),
330
+ ).resolves.toContain("equal to 3");
331
+ });
332
+
333
+ test("exact match stays quiet on a different count", async () => {
334
+ await expect(
335
+ evaluateActiveIncidents({
336
+ activeIncidentCount: 4,
337
+ criteriaFilter: {
338
+ checkOn: CheckOn.ExternalStatusPageActiveIncidents,
339
+ filterType: FilterType.EqualTo,
340
+ value: 3,
341
+ },
342
+ }),
343
+ ).resolves.toBeNull();
344
+ });
345
+
346
+ test("not-equal fires on a different count", async () => {
347
+ await expect(
348
+ evaluateActiveIncidents({
349
+ activeIncidentCount: 2,
350
+ criteriaFilter: {
351
+ checkOn: CheckOn.ExternalStatusPageActiveIncidents,
352
+ filterType: FilterType.NotEqualTo,
353
+ value: 0,
354
+ },
355
+ }),
356
+ ).resolves.toContain("not equal to 0");
357
+ });
358
+
359
+ test("not-equal stays quiet on the matching count", async () => {
360
+ await expect(
361
+ evaluateActiveIncidents({
362
+ activeIncidentCount: 0,
363
+ criteriaFilter: {
364
+ checkOn: CheckOn.ExternalStatusPageActiveIncidents,
365
+ filterType: FilterType.NotEqualTo,
366
+ value: 0,
367
+ },
368
+ }),
369
+ ).resolves.toBeNull();
370
+ });
371
+
372
+ /*
373
+ * Every condition the dropdown offers has to reach a decision, otherwise
374
+ * the form is inviting the user to build a rule that can never be true.
375
+ */
376
+ test.each([
377
+ FilterType.EqualTo,
378
+ FilterType.NotEqualTo,
379
+ FilterType.GreaterThan,
380
+ FilterType.LessThan,
381
+ FilterType.GreaterThanOrEqualTo,
382
+ FilterType.LessThanOrEqualTo,
383
+ ])(
384
+ "%s reaches a decision on some count",
385
+ async (filterType: FilterType) => {
386
+ const outcomes: Array<string | null> = await Promise.all(
387
+ [0, 1, 2].map((activeIncidentCount: number) => {
388
+ return evaluateActiveIncidents({
389
+ activeIncidentCount: activeIncidentCount,
390
+ criteriaFilter: {
391
+ checkOn: CheckOn.ExternalStatusPageActiveIncidents,
392
+ filterType: filterType,
393
+ value: 1,
394
+ },
395
+ });
396
+ }),
397
+ );
398
+
399
+ expect(
400
+ outcomes.some((outcome: string | null) => {
401
+ return Boolean(outcome);
402
+ }),
403
+ ).toBe(true);
404
+ },
405
+ );
406
+ });
407
+ });
@@ -49,7 +49,6 @@ jest.mock("recharts", () => {
49
49
 
50
50
  const getListMock: MockFunction = getJestMockFunction();
51
51
  const fetchExemplarsMock: MockFunction = getJestMockFunction();
52
- const showToastMock: MockFunction = getJestMockFunction();
53
52
 
54
53
  /*
55
54
  * The arrow wrappers are load bearing: jest.mock is hoisted above the
@@ -68,15 +67,6 @@ jest.mock("../../../UI/Utils/ModelAPI/ModelAPI", () => {
68
67
  };
69
68
  });
70
69
 
71
- jest.mock("../../../UI/Components/Toast/ToastInit", () => {
72
- return {
73
- __esModule: true,
74
- ShowToastNotification: (...args: Array<any>) => {
75
- return showToastMock(...args);
76
- },
77
- };
78
- });
79
-
80
70
  /*
81
71
  * Keep the exemplar fetch (fired by MetricCharts whenever the view has a
82
72
  * resolvable window) off the network; everything else on the Metrics util
@@ -188,7 +178,6 @@ let navigateSpy: ReturnType<typeof jest.spyOn>;
188
178
  beforeEach(() => {
189
179
  getListMock.mockReset();
190
180
  fetchExemplarsMock.mockReset();
191
- showToastMock.mockReset();
192
181
  navigateSpy = jest.spyOn(Navigation, "navigate").mockImplementation(() => {
193
182
  return undefined;
194
183
  });
@@ -298,7 +287,7 @@ describe("per-series investigate menu", () => {
298
287
  expect(url).toContain("end=");
299
288
  });
300
289
 
301
- test("View exceptions reports what the exceptions grammar cannot carry", async () => {
290
+ test("View exceptions pivots to the unresolved exceptions list", async () => {
302
291
  render(
303
292
  <MetricCharts
304
293
  metricViewData={buildViewData()}
@@ -314,11 +303,13 @@ describe("per-series investigate menu", () => {
314
303
  expect(navigateSpy).toHaveBeenCalled();
315
304
  });
316
305
 
306
+ /*
307
+ * The host.name narrowing has no exceptions facet, so it is dropped and
308
+ * the list opens on the window alone rather than on nothing.
309
+ */
317
310
  const url: string = getNavigatedUrl();
318
311
  expect(url).toContain("/exceptions");
319
312
  expect(url).toContain("status=all");
320
- // The host.name narrowing has no exceptions facet — the user is told.
321
- expect(showToastMock).toHaveBeenCalled();
322
313
  });
323
314
 
324
315
  test("the host series jumps to the matching Host page", async () => {