@oneuptime/common 9.4.7 → 9.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/Models/DatabaseModels/Alert.ts +76 -0
  2. package/Models/DatabaseModels/AlertEpisode.ts +1201 -0
  3. package/Models/DatabaseModels/AlertEpisodeFeed.ts +529 -0
  4. package/Models/DatabaseModels/AlertEpisodeInternalNote.ts +455 -0
  5. package/Models/DatabaseModels/AlertEpisodeMember.ts +586 -0
  6. package/Models/DatabaseModels/AlertEpisodeOwnerTeam.ts +421 -0
  7. package/Models/DatabaseModels/AlertEpisodeOwnerUser.ts +419 -0
  8. package/Models/DatabaseModels/AlertEpisodeStateTimeline.ts +523 -0
  9. package/Models/DatabaseModels/AlertFeed.ts +1 -0
  10. package/Models/DatabaseModels/AlertGroupingRule.ts +1432 -0
  11. package/Models/DatabaseModels/Index.ts +18 -0
  12. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.ts +70 -0
  13. package/Models/DatabaseModels/StatusPageDomain.ts +2 -0
  14. package/Models/DatabaseModels/WorkspaceNotificationLog.ts +57 -0
  15. package/Server/API/SlackAPI.ts +21 -0
  16. package/Server/Infrastructure/Postgres/SchemaMigrations/1768938069147-MigrationName.ts +751 -0
  17. package/Server/Infrastructure/Postgres/SchemaMigrations/1769125561322-MigrationName.ts +41 -0
  18. package/Server/Infrastructure/Postgres/SchemaMigrations/1769170578688-MigrationName.ts +29 -0
  19. package/Server/Infrastructure/Postgres/SchemaMigrations/1769172358833-MigrationName.ts +177 -0
  20. package/Server/Infrastructure/Postgres/SchemaMigrations/1769176450526-MigrationName.ts +71 -0
  21. package/Server/Infrastructure/Postgres/SchemaMigrations/1769190495840-MigrationName.ts +35 -0
  22. package/Server/Infrastructure/Postgres/SchemaMigrations/1769199303656-MigrationName.ts +29 -0
  23. package/Server/Infrastructure/Postgres/SchemaMigrations/1769202898645-MigrationName.ts +29 -0
  24. package/Server/Infrastructure/Postgres/SchemaMigrations/1769428619414-MigrationName.ts +35 -0
  25. package/Server/Infrastructure/Postgres/SchemaMigrations/1769428821686-MigrationName.ts +47 -0
  26. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +20 -0
  27. package/Server/Services/AlertEpisodeFeedService.ts +94 -0
  28. package/Server/Services/AlertEpisodeInternalNoteService.ts +71 -0
  29. package/Server/Services/AlertEpisodeMemberService.ts +267 -0
  30. package/Server/Services/AlertEpisodeOwnerTeamService.ts +10 -0
  31. package/Server/Services/AlertEpisodeOwnerUserService.ts +10 -0
  32. package/Server/Services/AlertEpisodeService.ts +988 -0
  33. package/Server/Services/AlertEpisodeStateTimelineService.ts +557 -0
  34. package/Server/Services/AlertGroupingEngineService.ts +1120 -0
  35. package/Server/Services/AlertGroupingRuleService.ts +14 -0
  36. package/Server/Services/AlertService.ts +12 -0
  37. package/Server/Services/CallService.ts +2 -0
  38. package/Server/Services/Index.ts +21 -0
  39. package/Server/Services/MailService.ts +5 -0
  40. package/Server/Services/OnCallDutyPolicyService.ts +5 -0
  41. package/Server/Services/SmsService.ts +2 -0
  42. package/Server/Services/UserNotificationSettingService.ts +23 -0
  43. package/Server/Services/WhatsAppService.ts +5 -0
  44. package/Server/Services/WorkspaceNotificationRuleService.ts +26 -0
  45. package/Server/Utils/AnalyticsDatabase/Statement.ts +6 -2
  46. package/Server/Utils/WhatsAppTemplateUtil.ts +13 -0
  47. package/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.ts +18 -0
  48. package/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.ts +689 -0
  49. package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +16 -0
  50. package/Server/Utils/Workspace/Slack/Actions/ActionTypes.ts +11 -0
  51. package/Server/Utils/Workspace/Slack/Actions/AlertEpisode.ts +915 -0
  52. package/Server/Utils/Workspace/Slack/Messages/AlertEpisode.ts +120 -0
  53. package/Server/Utils/Workspace/WorkspaceMessages/AlertEpisode.ts +74 -0
  54. package/Tests/Server/Services/AlertEpisodeMemberService.test.ts +200 -0
  55. package/Tests/Server/Services/AlertEpisodeService.test.ts +240 -0
  56. package/Tests/Server/Services/AlertGroupingEngineService.test.ts +542 -0
  57. package/Tests/Server/Services/AlertGroupingRuleService.test.ts +383 -0
  58. package/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.ts +1 -1
  59. package/Tests/UI/Components/Input.test.tsx +1 -1
  60. package/Tests/UI/Components/TextArea.test.tsx +2 -2
  61. package/Types/BaseDatabase/SortOrder.ts +9 -0
  62. package/Types/Email/EmailTemplateType.ts +5 -0
  63. package/Types/NotificationRule/NotificationRuleType.ts +1 -0
  64. package/Types/NotificationSetting/NotificationSettingEventType.ts +7 -0
  65. package/Types/Permission.ts +309 -0
  66. package/Types/UserNotification/UserNotificationEventType.ts +1 -0
  67. package/Types/WhatsApp/WhatsAppTemplates.ts +20 -0
  68. package/Types/Workspace/NotificationRules/EventType.ts +1 -0
  69. package/Types/Workspace/NotificationRules/NotificationRuleCondition.ts +32 -3
  70. package/UI/Components/Accordion/Accordion.tsx +20 -2
  71. package/UI/Components/Alerts/Alert.tsx +1 -0
  72. package/UI/Components/Button/Button.tsx +29 -0
  73. package/UI/Components/CardSelect/CardSelect.tsx +5 -1
  74. package/UI/Components/Checkbox/Checkbox.tsx +7 -3
  75. package/UI/Components/ColorCircle/ColorCircle.tsx +2 -0
  76. package/UI/Components/ColorViewer/ColorViewer.tsx +19 -3
  77. package/UI/Components/CopyableButton/CopyableButton.tsx +22 -5
  78. package/UI/Components/Detail/Detail.tsx +1 -1
  79. package/UI/Components/Dropdown/Dropdown.tsx +14 -1
  80. package/UI/Components/Forms/Fields/FormField.tsx +28 -0
  81. package/UI/Components/FullPageModal/FullPageModal.tsx +35 -4
  82. package/UI/Components/Input/Input.tsx +14 -2
  83. package/UI/Components/Link/Link.tsx +1 -0
  84. package/UI/Components/Loader/Loader.tsx +8 -2
  85. package/UI/Components/Markdown.tsx/MarkdownViewer.tsx +76 -1
  86. package/UI/Components/Modal/Modal.tsx +47 -3
  87. package/UI/Components/ModelTable/BaseModelTable.tsx +42 -1
  88. package/UI/Components/MoreMenu/MoreMenu.tsx +84 -2
  89. package/UI/Components/OrderedStatesList/OrderedStatesList.tsx +30 -8
  90. package/UI/Components/Pagination/Pagination.tsx +113 -8
  91. package/UI/Components/ProgressBar/ProgressBar.tsx +12 -2
  92. package/UI/Components/Radio/Radio.tsx +21 -3
  93. package/UI/Components/SideMenu/CountModelSideMenuItem.tsx +54 -27
  94. package/UI/Components/StatusBubble/StatusBubble.tsx +7 -2
  95. package/UI/Components/Table/TableHeader.tsx +20 -3
  96. package/UI/Components/Tabs/Tab.tsx +16 -1
  97. package/UI/Components/Tabs/Tabs.tsx +12 -1
  98. package/UI/Components/TextArea/TextArea.tsx +12 -2
  99. package/UI/Components/Toggle/Toggle.tsx +14 -3
  100. package/UI/Components/Tooltip/Tooltip.tsx +11 -1
  101. package/UI/Components/TopAlert/TopAlert.tsx +2 -0
  102. package/build/dist/Models/DatabaseModels/Alert.js +77 -0
  103. package/build/dist/Models/DatabaseModels/Alert.js.map +1 -1
  104. package/build/dist/Models/DatabaseModels/AlertEpisode.js +1225 -0
  105. package/build/dist/Models/DatabaseModels/AlertEpisode.js.map +1 -0
  106. package/build/dist/Models/DatabaseModels/AlertEpisodeFeed.js +553 -0
  107. package/build/dist/Models/DatabaseModels/AlertEpisodeFeed.js.map +1 -0
  108. package/build/dist/Models/DatabaseModels/AlertEpisodeInternalNote.js +467 -0
  109. package/build/dist/Models/DatabaseModels/AlertEpisodeInternalNote.js.map +1 -0
  110. package/build/dist/Models/DatabaseModels/AlertEpisodeMember.js +607 -0
  111. package/build/dist/Models/DatabaseModels/AlertEpisodeMember.js.map +1 -0
  112. package/build/dist/Models/DatabaseModels/AlertEpisodeOwnerTeam.js +437 -0
  113. package/build/dist/Models/DatabaseModels/AlertEpisodeOwnerTeam.js.map +1 -0
  114. package/build/dist/Models/DatabaseModels/AlertEpisodeOwnerUser.js +436 -0
  115. package/build/dist/Models/DatabaseModels/AlertEpisodeOwnerUser.js.map +1 -0
  116. package/build/dist/Models/DatabaseModels/AlertEpisodeStateTimeline.js +546 -0
  117. package/build/dist/Models/DatabaseModels/AlertEpisodeStateTimeline.js.map +1 -0
  118. package/build/dist/Models/DatabaseModels/AlertFeed.js +1 -0
  119. package/build/dist/Models/DatabaseModels/AlertFeed.js.map +1 -1
  120. package/build/dist/Models/DatabaseModels/AlertGroupingRule.js +1437 -0
  121. package/build/dist/Models/DatabaseModels/AlertGroupingRule.js.map +1 -0
  122. package/build/dist/Models/DatabaseModels/Index.js +16 -0
  123. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  124. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +69 -0
  125. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js.map +1 -1
  126. package/build/dist/Models/DatabaseModels/StatusPageDomain.js +2 -0
  127. package/build/dist/Models/DatabaseModels/StatusPageDomain.js.map +1 -1
  128. package/build/dist/Models/DatabaseModels/WorkspaceNotificationLog.js +58 -0
  129. package/build/dist/Models/DatabaseModels/WorkspaceNotificationLog.js.map +1 -1
  130. package/build/dist/Server/API/SlackAPI.js +18 -0
  131. package/build/dist/Server/API/SlackAPI.js.map +1 -1
  132. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1768938069147-MigrationName.js +266 -0
  133. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1768938069147-MigrationName.js.map +1 -0
  134. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769125561322-MigrationName.js +20 -0
  135. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769125561322-MigrationName.js.map +1 -0
  136. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769170578688-MigrationName.js +16 -0
  137. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769170578688-MigrationName.js.map +1 -0
  138. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769172358833-MigrationName.js +68 -0
  139. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769172358833-MigrationName.js.map +1 -0
  140. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769176450526-MigrationName.js +30 -0
  141. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769176450526-MigrationName.js.map +1 -0
  142. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769190495840-MigrationName.js +18 -0
  143. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769190495840-MigrationName.js.map +1 -0
  144. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769199303656-MigrationName.js +16 -0
  145. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769199303656-MigrationName.js.map +1 -0
  146. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769202898645-MigrationName.js +16 -0
  147. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769202898645-MigrationName.js.map +1 -0
  148. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769428619414-MigrationName.js +18 -0
  149. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769428619414-MigrationName.js.map +1 -0
  150. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769428821686-MigrationName.js +22 -0
  151. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769428821686-MigrationName.js.map +1 -0
  152. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +20 -0
  153. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  154. package/build/dist/Server/Services/AlertEpisodeFeedService.js +83 -0
  155. package/build/dist/Server/Services/AlertEpisodeFeedService.js.map +1 -0
  156. package/build/dist/Server/Services/AlertEpisodeInternalNoteService.js +70 -0
  157. package/build/dist/Server/Services/AlertEpisodeInternalNoteService.js.map +1 -0
  158. package/build/dist/Server/Services/AlertEpisodeMemberService.js +256 -0
  159. package/build/dist/Server/Services/AlertEpisodeMemberService.js.map +1 -0
  160. package/build/dist/Server/Services/AlertEpisodeOwnerTeamService.js +9 -0
  161. package/build/dist/Server/Services/AlertEpisodeOwnerTeamService.js.map +1 -0
  162. package/build/dist/Server/Services/AlertEpisodeOwnerUserService.js +9 -0
  163. package/build/dist/Server/Services/AlertEpisodeOwnerUserService.js.map +1 -0
  164. package/build/dist/Server/Services/AlertEpisodeService.js +885 -0
  165. package/build/dist/Server/Services/AlertEpisodeService.js.map +1 -0
  166. package/build/dist/Server/Services/AlertEpisodeStateTimelineService.js +494 -0
  167. package/build/dist/Server/Services/AlertEpisodeStateTimelineService.js.map +1 -0
  168. package/build/dist/Server/Services/AlertGroupingEngineService.js +893 -0
  169. package/build/dist/Server/Services/AlertGroupingEngineService.js.map +1 -0
  170. package/build/dist/Server/Services/AlertGroupingRuleService.js +13 -0
  171. package/build/dist/Server/Services/AlertGroupingRuleService.js.map +1 -0
  172. package/build/dist/Server/Services/AlertService.js +11 -0
  173. package/build/dist/Server/Services/AlertService.js.map +1 -1
  174. package/build/dist/Server/Services/CallService.js +11 -10
  175. package/build/dist/Server/Services/CallService.js.map +1 -1
  176. package/build/dist/Server/Services/Index.js +18 -0
  177. package/build/dist/Server/Services/Index.js.map +1 -1
  178. package/build/dist/Server/Services/MailService.js +3 -0
  179. package/build/dist/Server/Services/MailService.js.map +1 -1
  180. package/build/dist/Server/Services/OnCallDutyPolicyService.js +3 -0
  181. package/build/dist/Server/Services/OnCallDutyPolicyService.js.map +1 -1
  182. package/build/dist/Server/Services/SmsService.js +11 -10
  183. package/build/dist/Server/Services/SmsService.js.map +1 -1
  184. package/build/dist/Server/Services/UserNotificationSettingService.js +9 -0
  185. package/build/dist/Server/Services/UserNotificationSettingService.js.map +1 -1
  186. package/build/dist/Server/Services/WhatsAppService.js +3 -0
  187. package/build/dist/Server/Services/WhatsAppService.js.map +1 -1
  188. package/build/dist/Server/Services/WorkspaceNotificationRuleService.js +25 -0
  189. package/build/dist/Server/Services/WorkspaceNotificationRuleService.js.map +1 -1
  190. package/build/dist/Server/Utils/AnalyticsDatabase/Statement.js +4 -2
  191. package/build/dist/Server/Utils/AnalyticsDatabase/Statement.js.map +1 -1
  192. package/build/dist/Server/Utils/WhatsAppTemplateUtil.js +8 -0
  193. package/build/dist/Server/Utils/WhatsAppTemplateUtil.js.map +1 -1
  194. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.js +17 -0
  195. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.js.map +1 -1
  196. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.js +545 -0
  197. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.js.map +1 -0
  198. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +13 -0
  199. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
  200. package/build/dist/Server/Utils/Workspace/Slack/Actions/ActionTypes.js +10 -0
  201. package/build/dist/Server/Utils/Workspace/Slack/Actions/ActionTypes.js.map +1 -1
  202. package/build/dist/Server/Utils/Workspace/Slack/Actions/AlertEpisode.js +651 -0
  203. package/build/dist/Server/Utils/Workspace/Slack/Actions/AlertEpisode.js.map +1 -0
  204. package/build/dist/Server/Utils/Workspace/Slack/Messages/AlertEpisode.js +100 -0
  205. package/build/dist/Server/Utils/Workspace/Slack/Messages/AlertEpisode.js.map +1 -0
  206. package/build/dist/Server/Utils/Workspace/WorkspaceMessages/AlertEpisode.js +70 -0
  207. package/build/dist/Server/Utils/Workspace/WorkspaceMessages/AlertEpisode.js.map +1 -0
  208. package/build/dist/Tests/Server/Services/AlertEpisodeMemberService.test.js +165 -0
  209. package/build/dist/Tests/Server/Services/AlertEpisodeMemberService.test.js.map +1 -0
  210. package/build/dist/Tests/Server/Services/AlertEpisodeService.test.js +193 -0
  211. package/build/dist/Tests/Server/Services/AlertEpisodeService.test.js.map +1 -0
  212. package/build/dist/Tests/Server/Services/AlertGroupingEngineService.test.js +412 -0
  213. package/build/dist/Tests/Server/Services/AlertGroupingEngineService.test.js.map +1 -0
  214. package/build/dist/Tests/Server/Services/AlertGroupingRuleService.test.js +308 -0
  215. package/build/dist/Tests/Server/Services/AlertGroupingRuleService.test.js.map +1 -0
  216. package/build/dist/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.js +1 -1
  217. package/build/dist/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.js.map +1 -1
  218. package/build/dist/Tests/UI/Components/Input.test.js +1 -1
  219. package/build/dist/Tests/UI/Components/Input.test.js.map +1 -1
  220. package/build/dist/Tests/UI/Components/TextArea.test.js +2 -2
  221. package/build/dist/Tests/UI/Components/TextArea.test.js.map +1 -1
  222. package/build/dist/Types/BaseDatabase/SortOrder.js +5 -0
  223. package/build/dist/Types/BaseDatabase/SortOrder.js.map +1 -1
  224. package/build/dist/Types/Email/EmailTemplateType.js +4 -0
  225. package/build/dist/Types/Email/EmailTemplateType.js.map +1 -1
  226. package/build/dist/Types/NotificationRule/NotificationRuleType.js +1 -0
  227. package/build/dist/Types/NotificationRule/NotificationRuleType.js.map +1 -1
  228. package/build/dist/Types/NotificationSetting/NotificationSettingEventType.js +5 -0
  229. package/build/dist/Types/NotificationSetting/NotificationSettingEventType.js.map +1 -1
  230. package/build/dist/Types/Permission.js +264 -0
  231. package/build/dist/Types/Permission.js.map +1 -1
  232. package/build/dist/Types/UserNotification/UserNotificationEventType.js +1 -0
  233. package/build/dist/Types/UserNotification/UserNotificationEventType.js.map +1 -1
  234. package/build/dist/Types/WhatsApp/WhatsAppTemplates.js +12 -0
  235. package/build/dist/Types/WhatsApp/WhatsAppTemplates.js.map +1 -1
  236. package/build/dist/Types/Workspace/NotificationRules/EventType.js +1 -0
  237. package/build/dist/Types/Workspace/NotificationRules/EventType.js.map +1 -1
  238. package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js +28 -3
  239. package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js.map +1 -1
  240. package/build/dist/UI/Components/Accordion/Accordion.js +10 -3
  241. package/build/dist/UI/Components/Accordion/Accordion.js.map +1 -1
  242. package/build/dist/UI/Components/Alerts/Alert.js +1 -1
  243. package/build/dist/UI/Components/Alerts/Alert.js.map +1 -1
  244. package/build/dist/UI/Components/Button/Button.js +8 -2
  245. package/build/dist/UI/Components/Button/Button.js.map +1 -1
  246. package/build/dist/UI/Components/CardSelect/CardSelect.js +1 -1
  247. package/build/dist/UI/Components/CardSelect/CardSelect.js.map +1 -1
  248. package/build/dist/UI/Components/Checkbox/Checkbox.js +2 -2
  249. package/build/dist/UI/Components/Checkbox/Checkbox.js.map +1 -1
  250. package/build/dist/UI/Components/ColorCircle/ColorCircle.js +1 -1
  251. package/build/dist/UI/Components/ColorCircle/ColorCircle.js.map +1 -1
  252. package/build/dist/UI/Components/ColorViewer/ColorViewer.js +12 -3
  253. package/build/dist/UI/Components/ColorViewer/ColorViewer.js.map +1 -1
  254. package/build/dist/UI/Components/CopyableButton/CopyableButton.js +12 -5
  255. package/build/dist/UI/Components/CopyableButton/CopyableButton.js.map +1 -1
  256. package/build/dist/UI/Components/Detail/Detail.js +1 -1
  257. package/build/dist/UI/Components/Detail/Detail.js.map +1 -1
  258. package/build/dist/UI/Components/Dropdown/Dropdown.js +5 -3
  259. package/build/dist/UI/Components/Dropdown/Dropdown.js.map +1 -1
  260. package/build/dist/UI/Components/Forms/Fields/FormField.js +19 -1
  261. package/build/dist/UI/Components/Forms/Fields/FormField.js.map +1 -1
  262. package/build/dist/UI/Components/FullPageModal/FullPageModal.js +24 -5
  263. package/build/dist/UI/Components/FullPageModal/FullPageModal.js.map +1 -1
  264. package/build/dist/UI/Components/Input/Input.js +3 -3
  265. package/build/dist/UI/Components/Input/Input.js.map +1 -1
  266. package/build/dist/UI/Components/Link/Link.js +1 -1
  267. package/build/dist/UI/Components/Link/Link.js.map +1 -1
  268. package/build/dist/UI/Components/Loader/Loader.js +6 -4
  269. package/build/dist/UI/Components/Loader/Loader.js.map +1 -1
  270. package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js +56 -3
  271. package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js.map +1 -1
  272. package/build/dist/UI/Components/Modal/Modal.js +28 -3
  273. package/build/dist/UI/Components/Modal/Modal.js.map +1 -1
  274. package/build/dist/UI/Components/ModelTable/BaseModelTable.js +23 -1
  275. package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
  276. package/build/dist/UI/Components/MoreMenu/MoreMenu.js +67 -6
  277. package/build/dist/UI/Components/MoreMenu/MoreMenu.js.map +1 -1
  278. package/build/dist/UI/Components/OrderedStatesList/OrderedStatesList.js +14 -3
  279. package/build/dist/UI/Components/OrderedStatesList/OrderedStatesList.js.map +1 -1
  280. package/build/dist/UI/Components/Pagination/Pagination.js +69 -13
  281. package/build/dist/UI/Components/Pagination/Pagination.js.map +1 -1
  282. package/build/dist/UI/Components/ProgressBar/ProgressBar.js +2 -2
  283. package/build/dist/UI/Components/ProgressBar/ProgressBar.js.map +1 -1
  284. package/build/dist/UI/Components/Radio/Radio.js +8 -5
  285. package/build/dist/UI/Components/Radio/Radio.js.map +1 -1
  286. package/build/dist/UI/Components/SideMenu/CountModelSideMenuItem.js +23 -4
  287. package/build/dist/UI/Components/SideMenu/CountModelSideMenuItem.js.map +1 -1
  288. package/build/dist/UI/Components/StatusBubble/StatusBubble.js +2 -2
  289. package/build/dist/UI/Components/StatusBubble/StatusBubble.js.map +1 -1
  290. package/build/dist/UI/Components/Table/TableHeader.js +12 -4
  291. package/build/dist/UI/Components/Table/TableHeader.js.map +1 -1
  292. package/build/dist/UI/Components/Tabs/Tab.js +8 -1
  293. package/build/dist/UI/Components/Tabs/Tab.js.map +1 -1
  294. package/build/dist/UI/Components/Tabs/Tabs.js +4 -3
  295. package/build/dist/UI/Components/Tabs/Tabs.js.map +1 -1
  296. package/build/dist/UI/Components/TextArea/TextArea.js +3 -3
  297. package/build/dist/UI/Components/TextArea/TextArea.js.map +1 -1
  298. package/build/dist/UI/Components/Toggle/Toggle.js +7 -4
  299. package/build/dist/UI/Components/Toggle/Toggle.js.map +1 -1
  300. package/build/dist/UI/Components/Tooltip/Tooltip.js +4 -1
  301. package/build/dist/UI/Components/Tooltip/Tooltip.js.map +1 -1
  302. package/build/dist/UI/Components/TopAlert/TopAlert.js +1 -1
  303. package/build/dist/UI/Components/TopAlert/TopAlert.js.map +1 -1
  304. package/package.json +2 -1
@@ -701,6 +701,53 @@ enum Permission {
701
701
  DeleteWorkspaceNotificationRule = "DeleteWorkspaceNotificationRule",
702
702
  EditWorkspaceNotificationRule = "EditWorkspaceNotificationRule",
703
703
  ReadWorkspaceNotificationRule = "ReadWorkspaceNotificationRule",
704
+
705
+ // Alert Episode Permissions
706
+ CreateAlertEpisode = "CreateAlertEpisode",
707
+ DeleteAlertEpisode = "DeleteAlertEpisode",
708
+ EditAlertEpisode = "EditAlertEpisode",
709
+ ReadAlertEpisode = "ReadAlertEpisode",
710
+
711
+ // Alert Episode Member Permissions
712
+ CreateAlertEpisodeMember = "CreateAlertEpisodeMember",
713
+ DeleteAlertEpisodeMember = "DeleteAlertEpisodeMember",
714
+ EditAlertEpisodeMember = "EditAlertEpisodeMember",
715
+ ReadAlertEpisodeMember = "ReadAlertEpisodeMember",
716
+
717
+ // Alert Grouping Rule Permissions
718
+ CreateAlertGroupingRule = "CreateAlertGroupingRule",
719
+ DeleteAlertGroupingRule = "DeleteAlertGroupingRule",
720
+ EditAlertGroupingRule = "EditAlertGroupingRule",
721
+ ReadAlertGroupingRule = "ReadAlertGroupingRule",
722
+
723
+ // Alert Episode State Timeline Permissions
724
+ CreateAlertEpisodeStateTimeline = "CreateAlertEpisodeStateTimeline",
725
+ DeleteAlertEpisodeStateTimeline = "DeleteAlertEpisodeStateTimeline",
726
+ EditAlertEpisodeStateTimeline = "EditAlertEpisodeStateTimeline",
727
+ ReadAlertEpisodeStateTimeline = "ReadAlertEpisodeStateTimeline",
728
+
729
+ // Alert Episode Owner User Permissions
730
+ CreateAlertEpisodeOwnerUser = "CreateAlertEpisodeOwnerUser",
731
+ DeleteAlertEpisodeOwnerUser = "DeleteAlertEpisodeOwnerUser",
732
+ EditAlertEpisodeOwnerUser = "EditAlertEpisodeOwnerUser",
733
+ ReadAlertEpisodeOwnerUser = "ReadAlertEpisodeOwnerUser",
734
+
735
+ // Alert Episode Owner Team Permissions
736
+ CreateAlertEpisodeOwnerTeam = "CreateAlertEpisodeOwnerTeam",
737
+ DeleteAlertEpisodeOwnerTeam = "DeleteAlertEpisodeOwnerTeam",
738
+ EditAlertEpisodeOwnerTeam = "EditAlertEpisodeOwnerTeam",
739
+ ReadAlertEpisodeOwnerTeam = "ReadAlertEpisodeOwnerTeam",
740
+
741
+ // Alert Episode Internal Note Permissions
742
+ CreateAlertEpisodeInternalNote = "CreateAlertEpisodeInternalNote",
743
+ DeleteAlertEpisodeInternalNote = "DeleteAlertEpisodeInternalNote",
744
+ EditAlertEpisodeInternalNote = "EditAlertEpisodeInternalNote",
745
+ ReadAlertEpisodeInternalNote = "ReadAlertEpisodeInternalNote",
746
+
747
+ // Alert Episode Feed Permissions
748
+ CreateAlertEpisodeFeed = "CreateAlertEpisodeFeed",
749
+ EditAlertEpisodeFeed = "EditAlertEpisodeFeed",
750
+ ReadAlertEpisodeFeed = "ReadAlertEpisodeFeed",
704
751
  }
705
752
 
706
753
  export class PermissionHelper {
@@ -5017,6 +5064,268 @@ export class PermissionHelper {
5017
5064
  isAssignableToTenant: true,
5018
5065
  isAccessControlPermission: false,
5019
5066
  },
5067
+
5068
+ // Alert Episode Permissions
5069
+ {
5070
+ permission: Permission.CreateAlertEpisode,
5071
+ title: "Create Alert Episode",
5072
+ description:
5073
+ "This permission can create Alert Episodes in this project.",
5074
+ isAssignableToTenant: true,
5075
+ isAccessControlPermission: true,
5076
+ },
5077
+ {
5078
+ permission: Permission.DeleteAlertEpisode,
5079
+ title: "Delete Alert Episode",
5080
+ description:
5081
+ "This permission can delete Alert Episodes of this project.",
5082
+ isAssignableToTenant: true,
5083
+ isAccessControlPermission: true,
5084
+ },
5085
+ {
5086
+ permission: Permission.EditAlertEpisode,
5087
+ title: "Edit Alert Episode",
5088
+ description: "This permission can edit Alert Episodes of this project.",
5089
+ isAssignableToTenant: true,
5090
+ isAccessControlPermission: true,
5091
+ },
5092
+ {
5093
+ permission: Permission.ReadAlertEpisode,
5094
+ title: "Read Alert Episode",
5095
+ description: "This permission can read Alert Episodes of this project.",
5096
+ isAssignableToTenant: true,
5097
+ isAccessControlPermission: true,
5098
+ },
5099
+
5100
+ // Alert Episode Member Permissions
5101
+ {
5102
+ permission: Permission.CreateAlertEpisodeMember,
5103
+ title: "Create Alert Episode Member",
5104
+ description:
5105
+ "This permission can add alerts to Alert Episodes in this project.",
5106
+ isAssignableToTenant: true,
5107
+ isAccessControlPermission: false,
5108
+ },
5109
+ {
5110
+ permission: Permission.DeleteAlertEpisodeMember,
5111
+ title: "Delete Alert Episode Member",
5112
+ description:
5113
+ "This permission can remove alerts from Alert Episodes of this project.",
5114
+ isAssignableToTenant: true,
5115
+ isAccessControlPermission: false,
5116
+ },
5117
+ {
5118
+ permission: Permission.EditAlertEpisodeMember,
5119
+ title: "Edit Alert Episode Member",
5120
+ description:
5121
+ "This permission can edit Alert Episode Members of this project.",
5122
+ isAssignableToTenant: true,
5123
+ isAccessControlPermission: false,
5124
+ },
5125
+ {
5126
+ permission: Permission.ReadAlertEpisodeMember,
5127
+ title: "Read Alert Episode Member",
5128
+ description:
5129
+ "This permission can read Alert Episode Members of this project.",
5130
+ isAssignableToTenant: true,
5131
+ isAccessControlPermission: false,
5132
+ },
5133
+
5134
+ // Alert Grouping Rule Permissions
5135
+ {
5136
+ permission: Permission.CreateAlertGroupingRule,
5137
+ title: "Create Alert Grouping Rule",
5138
+ description:
5139
+ "This permission can create Alert Grouping Rules in this project.",
5140
+ isAssignableToTenant: true,
5141
+ isAccessControlPermission: false,
5142
+ },
5143
+ {
5144
+ permission: Permission.DeleteAlertGroupingRule,
5145
+ title: "Delete Alert Grouping Rule",
5146
+ description:
5147
+ "This permission can delete Alert Grouping Rules of this project.",
5148
+ isAssignableToTenant: true,
5149
+ isAccessControlPermission: false,
5150
+ },
5151
+ {
5152
+ permission: Permission.EditAlertGroupingRule,
5153
+ title: "Edit Alert Grouping Rule",
5154
+ description:
5155
+ "This permission can edit Alert Grouping Rules of this project.",
5156
+ isAssignableToTenant: true,
5157
+ isAccessControlPermission: false,
5158
+ },
5159
+ {
5160
+ permission: Permission.ReadAlertGroupingRule,
5161
+ title: "Read Alert Grouping Rule",
5162
+ description:
5163
+ "This permission can read Alert Grouping Rules of this project.",
5164
+ isAssignableToTenant: true,
5165
+ isAccessControlPermission: false,
5166
+ },
5167
+
5168
+ // Alert Episode State Timeline Permissions
5169
+ {
5170
+ permission: Permission.CreateAlertEpisodeStateTimeline,
5171
+ title: "Create Alert Episode State Timeline",
5172
+ description:
5173
+ "This permission can create Alert Episode state history in this project.",
5174
+ isAssignableToTenant: true,
5175
+ isAccessControlPermission: false,
5176
+ },
5177
+ {
5178
+ permission: Permission.DeleteAlertEpisodeStateTimeline,
5179
+ title: "Delete Alert Episode State Timeline",
5180
+ description:
5181
+ "This permission can delete Alert Episode state history of this project.",
5182
+ isAssignableToTenant: true,
5183
+ isAccessControlPermission: false,
5184
+ },
5185
+ {
5186
+ permission: Permission.EditAlertEpisodeStateTimeline,
5187
+ title: "Edit Alert Episode State Timeline",
5188
+ description:
5189
+ "This permission can edit Alert Episode state history of this project.",
5190
+ isAssignableToTenant: true,
5191
+ isAccessControlPermission: false,
5192
+ },
5193
+ {
5194
+ permission: Permission.ReadAlertEpisodeStateTimeline,
5195
+ title: "Read Alert Episode State Timeline",
5196
+ description:
5197
+ "This permission can read Alert Episode state history of this project.",
5198
+ isAssignableToTenant: true,
5199
+ isAccessControlPermission: false,
5200
+ },
5201
+
5202
+ // Alert Episode Owner User Permissions
5203
+ {
5204
+ permission: Permission.CreateAlertEpisodeOwnerUser,
5205
+ title: "Create Alert Episode User Owner",
5206
+ description:
5207
+ "This permission can add user owners to Alert Episodes in this project.",
5208
+ isAssignableToTenant: true,
5209
+ isAccessControlPermission: false,
5210
+ },
5211
+ {
5212
+ permission: Permission.DeleteAlertEpisodeOwnerUser,
5213
+ title: "Delete Alert Episode User Owner",
5214
+ description:
5215
+ "This permission can remove user owners from Alert Episodes of this project.",
5216
+ isAssignableToTenant: true,
5217
+ isAccessControlPermission: false,
5218
+ },
5219
+ {
5220
+ permission: Permission.EditAlertEpisodeOwnerUser,
5221
+ title: "Edit Alert Episode User Owner",
5222
+ description:
5223
+ "This permission can edit Alert Episode user owners of this project.",
5224
+ isAssignableToTenant: true,
5225
+ isAccessControlPermission: false,
5226
+ },
5227
+ {
5228
+ permission: Permission.ReadAlertEpisodeOwnerUser,
5229
+ title: "Read Alert Episode User Owner",
5230
+ description:
5231
+ "This permission can read Alert Episode user owners of this project.",
5232
+ isAssignableToTenant: true,
5233
+ isAccessControlPermission: false,
5234
+ },
5235
+
5236
+ // Alert Episode Owner Team Permissions
5237
+ {
5238
+ permission: Permission.CreateAlertEpisodeOwnerTeam,
5239
+ title: "Create Alert Episode Team Owner",
5240
+ description:
5241
+ "This permission can add team owners to Alert Episodes in this project.",
5242
+ isAssignableToTenant: true,
5243
+ isAccessControlPermission: false,
5244
+ },
5245
+ {
5246
+ permission: Permission.DeleteAlertEpisodeOwnerTeam,
5247
+ title: "Delete Alert Episode Team Owner",
5248
+ description:
5249
+ "This permission can remove team owners from Alert Episodes of this project.",
5250
+ isAssignableToTenant: true,
5251
+ isAccessControlPermission: false,
5252
+ },
5253
+ {
5254
+ permission: Permission.EditAlertEpisodeOwnerTeam,
5255
+ title: "Edit Alert Episode Team Owner",
5256
+ description:
5257
+ "This permission can edit Alert Episode team owners of this project.",
5258
+ isAssignableToTenant: true,
5259
+ isAccessControlPermission: false,
5260
+ },
5261
+ {
5262
+ permission: Permission.ReadAlertEpisodeOwnerTeam,
5263
+ title: "Read Alert Episode Team Owner",
5264
+ description:
5265
+ "This permission can read Alert Episode team owners of this project.",
5266
+ isAssignableToTenant: true,
5267
+ isAccessControlPermission: false,
5268
+ },
5269
+
5270
+ // Alert Episode Internal Note Permissions
5271
+ {
5272
+ permission: Permission.CreateAlertEpisodeInternalNote,
5273
+ title: "Create Alert Episode Internal Note",
5274
+ description:
5275
+ "This permission can create Alert Episode internal notes in this project.",
5276
+ isAssignableToTenant: true,
5277
+ isAccessControlPermission: false,
5278
+ },
5279
+ {
5280
+ permission: Permission.DeleteAlertEpisodeInternalNote,
5281
+ title: "Delete Alert Episode Internal Note",
5282
+ description:
5283
+ "This permission can delete Alert Episode internal notes of this project.",
5284
+ isAssignableToTenant: true,
5285
+ isAccessControlPermission: false,
5286
+ },
5287
+ {
5288
+ permission: Permission.EditAlertEpisodeInternalNote,
5289
+ title: "Edit Alert Episode Internal Note",
5290
+ description:
5291
+ "This permission can edit Alert Episode internal notes of this project.",
5292
+ isAssignableToTenant: true,
5293
+ isAccessControlPermission: false,
5294
+ },
5295
+ {
5296
+ permission: Permission.ReadAlertEpisodeInternalNote,
5297
+ title: "Read Alert Episode Internal Note",
5298
+ description:
5299
+ "This permission can read Alert Episode internal notes of this project.",
5300
+ isAssignableToTenant: true,
5301
+ isAccessControlPermission: false,
5302
+ },
5303
+
5304
+ // Alert Episode Feed Permissions
5305
+ {
5306
+ permission: Permission.CreateAlertEpisodeFeed,
5307
+ title: "Create Alert Episode Feed",
5308
+ description:
5309
+ "This permission can create Alert Episode feed items in this project.",
5310
+ isAssignableToTenant: true,
5311
+ isAccessControlPermission: false,
5312
+ },
5313
+ {
5314
+ permission: Permission.EditAlertEpisodeFeed,
5315
+ title: "Edit Alert Episode Feed",
5316
+ description:
5317
+ "This permission can edit Alert Episode feed items of this project.",
5318
+ isAssignableToTenant: true,
5319
+ isAccessControlPermission: false,
5320
+ },
5321
+ {
5322
+ permission: Permission.ReadAlertEpisodeFeed,
5323
+ title: "Read Alert Episode Feed",
5324
+ description:
5325
+ "This permission can read Alert Episode feed items of this project.",
5326
+ isAssignableToTenant: true,
5327
+ isAccessControlPermission: false,
5328
+ },
5020
5329
  ];
5021
5330
 
5022
5331
  return permissions;
@@ -1,6 +1,7 @@
1
1
  enum UserNotificationEventType {
2
2
  IncidentCreated = "Incident Created",
3
3
  AlertCreated = "Alert Created",
4
+ AlertEpisodeCreated = "Alert Episode Created",
4
5
  }
5
6
 
6
7
  export default UserNotificationEventType;
@@ -11,6 +11,10 @@ type TemplateIdsMap = {
11
11
  readonly AlertNotePostedOwnerNotification: "oneuptime_alert_note_posted_owner_notification";
12
12
  readonly AlertStateChangedOwnerNotification: "oneuptime_alert_state_changed_owner_notification";
13
13
  readonly AlertOwnerAddedNotification: "oneuptime_alert_owner_added_notification";
14
+ readonly AlertEpisodeCreatedOwnerNotification: "oneuptime_alert_episode_created_owner_notification";
15
+ readonly AlertEpisodeNotePostedOwnerNotification: "oneuptime_alert_episode_note_posted_owner_notification";
16
+ readonly AlertEpisodeStateChangedOwnerNotification: "oneuptime_alert_episode_state_changed_owner_notification";
17
+ readonly AlertEpisodeOwnerAddedNotification: "oneuptime_alert_episode_owner_added_notification";
14
18
  readonly MonitorOwnerAddedNotification: "oneuptime_monitor_owner_added_notification";
15
19
  readonly MonitorCreatedOwnerNotification: "oneuptime_monitor_created_owner_notification";
16
20
  readonly MonitorStatusChangedOwnerNotification: "oneuptime_monitor_status_changed_owner_notification";
@@ -52,6 +56,14 @@ const templateIds: TemplateIdsMap = {
52
56
  AlertStateChangedOwnerNotification:
53
57
  "oneuptime_alert_state_changed_owner_notification",
54
58
  AlertOwnerAddedNotification: "oneuptime_alert_owner_added_notification",
59
+ AlertEpisodeCreatedOwnerNotification:
60
+ "oneuptime_alert_episode_created_owner_notification",
61
+ AlertEpisodeNotePostedOwnerNotification:
62
+ "oneuptime_alert_episode_note_posted_owner_notification",
63
+ AlertEpisodeStateChangedOwnerNotification:
64
+ "oneuptime_alert_episode_state_changed_owner_notification",
65
+ AlertEpisodeOwnerAddedNotification:
66
+ "oneuptime_alert_episode_owner_added_notification",
55
67
  MonitorOwnerAddedNotification: "oneuptime_monitor_owner_added_notification",
56
68
  MonitorCreatedOwnerNotification:
57
69
  "oneuptime_monitor_created_owner_notification",
@@ -118,6 +130,10 @@ export const WhatsAppTemplateMessages: WhatsAppTemplateMessagesDefinition = {
118
130
  [WhatsAppTemplateIds.AlertNotePostedOwnerNotification]: `A new note was posted on alert #{{alert_number}} ({{alert_title}}). Review the alert using {{alert_link}} on the OneUptime dashboard for updates.`,
119
131
  [WhatsAppTemplateIds.AlertStateChangedOwnerNotification]: `Alert #{{alert_number}} ({{alert_title}}) state changed to {{alert_state}}. Track the alert status using {{alert_link}} on the OneUptime dashboard to stay informed.`,
120
132
  [WhatsAppTemplateIds.AlertOwnerAddedNotification]: `You have been added as an owner of alert #{{alert_number}} ({{alert_title}}). Manage the alert using {{alert_link}} on the OneUptime dashboard to take action.`,
133
+ [WhatsAppTemplateIds.AlertEpisodeCreatedOwnerNotification]: `Alert Episode #{{episode_number}} ({{episode_title}}) has been created for project {{project_name}}. View alert episode details using {{episode_link}} on the OneUptime dashboard.`,
134
+ [WhatsAppTemplateIds.AlertEpisodeNotePostedOwnerNotification]: `A new note was posted on alert episode #{{episode_number}} ({{episode_title}}). Review the alert episode using {{episode_link}} on the OneUptime dashboard for updates.`,
135
+ [WhatsAppTemplateIds.AlertEpisodeStateChangedOwnerNotification]: `Alert Episode #{{episode_number}} ({{episode_title}}) state changed to {{episode_state}}. Track the alert episode status using {{episode_link}} on the OneUptime dashboard.`,
136
+ [WhatsAppTemplateIds.AlertEpisodeOwnerAddedNotification]: `You have been added as an owner of alert episode #{{episode_number}} ({{episode_title}}). Manage the alert episode using {{episode_link}} on the OneUptime dashboard.`,
121
137
  [WhatsAppTemplateIds.MonitorOwnerAddedNotification]: `You have been added as an owner of monitor {{monitor_name}}. Manage the monitor using {{monitor_link}} on the OneUptime dashboard to keep things running.`,
122
138
  [WhatsAppTemplateIds.MonitorCreatedOwnerNotification]: `Monitor {{monitor_name}} has been created. Check monitor {{monitor_link}} on the OneUptime dashboard `,
123
139
  [WhatsAppTemplateIds.MonitorStatusChangedOwnerNotification]: `Monitor {{monitor_name}} status changed to {{monitor_status}}. Check the monitor status using {{monitor_link}} on the OneUptime dashboard to stay informed.`,
@@ -154,6 +170,10 @@ export const WhatsAppTemplateLanguage: Record<WhatsAppTemplateId, string> = {
154
170
  [WhatsAppTemplateIds.AlertNotePostedOwnerNotification]: "en",
155
171
  [WhatsAppTemplateIds.AlertStateChangedOwnerNotification]: "en",
156
172
  [WhatsAppTemplateIds.AlertOwnerAddedNotification]: "en",
173
+ [WhatsAppTemplateIds.AlertEpisodeCreatedOwnerNotification]: "en",
174
+ [WhatsAppTemplateIds.AlertEpisodeNotePostedOwnerNotification]: "en",
175
+ [WhatsAppTemplateIds.AlertEpisodeStateChangedOwnerNotification]: "en",
176
+ [WhatsAppTemplateIds.AlertEpisodeOwnerAddedNotification]: "en",
157
177
  [WhatsAppTemplateIds.MonitorOwnerAddedNotification]: "en",
158
178
  [WhatsAppTemplateIds.MonitorCreatedOwnerNotification]: "en",
159
179
  [WhatsAppTemplateIds.MonitorStatusChangedOwnerNotification]: "en",
@@ -2,6 +2,7 @@ enum NotificationRuleEventType {
2
2
  Incident = "Incident",
3
3
  Monitor = "Monitor",
4
4
  Alert = "Alert",
5
+ AlertEpisode = "Alert Episode",
5
6
  ScheduledMaintenance = "Scheduled Maintenance",
6
7
  OnCallDutyPolicy = "On-Call Duty Policy",
7
8
  }
@@ -25,6 +25,11 @@ export enum NotificationRuleConditionCheckOn {
25
25
  AlertDescription = "Alert Description",
26
26
  AlertSeverity = "Alert Severity",
27
27
  AlertState = "Alert State",
28
+ AlertEpisodeTitle = "Alert Episode Title",
29
+ AlertEpisodeDescription = "Alert Episode Description",
30
+ AlertEpisodeSeverity = "Alert Episode Severity",
31
+ AlertEpisodeState = "Alert Episode State",
32
+ AlertEpisodeLabels = "Alert Episode Labels",
28
33
  ScheduledMaintenanceTitle = "Scheduled Maintenance Title",
29
34
  ScheduledMaintenanceDescription = "Scheduled Maintenance Description",
30
35
  ScheduledMaintenanceState = "Scheduled Maintenance State",
@@ -94,6 +99,7 @@ export class NotificationRuleConditionUtil {
94
99
  if (
95
100
  eventType === NotificationRuleEventType.Incident ||
96
101
  eventType === NotificationRuleEventType.Alert ||
102
+ eventType === NotificationRuleEventType.AlertEpisode ||
97
103
  eventType === NotificationRuleEventType.ScheduledMaintenance
98
104
  ) {
99
105
  // either create slack channel or select existing one should be active.
@@ -154,13 +160,16 @@ export class NotificationRuleConditionUtil {
154
160
  case NotificationRuleConditionCheckOn.MonitorType:
155
161
  case NotificationRuleConditionCheckOn.IncidentState:
156
162
  case NotificationRuleConditionCheckOn.AlertState:
163
+ case NotificationRuleConditionCheckOn.AlertEpisodeState:
157
164
  case NotificationRuleConditionCheckOn.MonitorStatus:
158
165
  case NotificationRuleConditionCheckOn.ScheduledMaintenanceState:
159
166
  case NotificationRuleConditionCheckOn.IncidentSeverity:
160
167
  case NotificationRuleConditionCheckOn.AlertSeverity:
168
+ case NotificationRuleConditionCheckOn.AlertEpisodeSeverity:
161
169
  case NotificationRuleConditionCheckOn.MonitorLabels:
162
170
  case NotificationRuleConditionCheckOn.IncidentLabels:
163
171
  case NotificationRuleConditionCheckOn.AlertLabels:
172
+ case NotificationRuleConditionCheckOn.AlertEpisodeLabels:
164
173
  case NotificationRuleConditionCheckOn.ScheduledMaintenanceLabels:
165
174
  case NotificationRuleConditionCheckOn.Monitors:
166
175
  return true;
@@ -180,7 +189,10 @@ export class NotificationRuleConditionUtil {
180
189
  monitors: Array<Monitor>;
181
190
  checkOn: NotificationRuleConditionCheckOn;
182
191
  }): Array<DropdownOption> {
183
- if (data.checkOn === NotificationRuleConditionCheckOn.AlertSeverity) {
192
+ if (
193
+ data.checkOn === NotificationRuleConditionCheckOn.AlertSeverity ||
194
+ data.checkOn === NotificationRuleConditionCheckOn.AlertEpisodeSeverity
195
+ ) {
184
196
  return data.alertSeverities.map((severity: AlertSeverity) => {
185
197
  return {
186
198
  value: severity.id!.toString(),
@@ -234,6 +246,7 @@ export class NotificationRuleConditionUtil {
234
246
  data.checkOn === NotificationRuleConditionCheckOn.MonitorLabels ||
235
247
  data.checkOn === NotificationRuleConditionCheckOn.IncidentLabels ||
236
248
  data.checkOn === NotificationRuleConditionCheckOn.AlertLabels ||
249
+ data.checkOn === NotificationRuleConditionCheckOn.AlertEpisodeLabels ||
237
250
  data.checkOn ===
238
251
  NotificationRuleConditionCheckOn.ScheduledMaintenanceLabels
239
252
  ) {
@@ -254,8 +267,11 @@ export class NotificationRuleConditionUtil {
254
267
  });
255
268
  }
256
269
 
257
- // alert states
258
- if (data.checkOn === NotificationRuleConditionCheckOn.AlertState) {
270
+ // alert states (also used for alert episodes)
271
+ if (
272
+ data.checkOn === NotificationRuleConditionCheckOn.AlertState ||
273
+ data.checkOn === NotificationRuleConditionCheckOn.AlertEpisodeState
274
+ ) {
259
275
  return data.alertStates.map((state: AlertState) => {
260
276
  return {
261
277
  value: state.id!.toString(),
@@ -298,6 +314,14 @@ export class NotificationRuleConditionUtil {
298
314
 
299
315
  NotificationRuleConditionCheckOn.Monitors,
300
316
  ];
317
+ case NotificationRuleEventType.AlertEpisode:
318
+ return [
319
+ NotificationRuleConditionCheckOn.AlertEpisodeTitle,
320
+ NotificationRuleConditionCheckOn.AlertEpisodeDescription,
321
+ NotificationRuleConditionCheckOn.AlertEpisodeSeverity,
322
+ NotificationRuleConditionCheckOn.AlertEpisodeState,
323
+ NotificationRuleConditionCheckOn.AlertEpisodeLabels,
324
+ ];
301
325
  case NotificationRuleEventType.Monitor:
302
326
  return [
303
327
  NotificationRuleConditionCheckOn.MonitorName,
@@ -329,6 +353,8 @@ export class NotificationRuleConditionUtil {
329
353
  case NotificationRuleConditionCheckOn.IncidentDescription:
330
354
  case NotificationRuleConditionCheckOn.AlertTitle:
331
355
  case NotificationRuleConditionCheckOn.AlertDescription:
356
+ case NotificationRuleConditionCheckOn.AlertEpisodeTitle:
357
+ case NotificationRuleConditionCheckOn.AlertEpisodeDescription:
332
358
  case NotificationRuleConditionCheckOn.ScheduledMaintenanceTitle:
333
359
  case NotificationRuleConditionCheckOn.ScheduledMaintenanceDescription:
334
360
  return [
@@ -341,15 +367,18 @@ export class NotificationRuleConditionUtil {
341
367
  ];
342
368
  case NotificationRuleConditionCheckOn.IncidentSeverity:
343
369
  case NotificationRuleConditionCheckOn.AlertSeverity:
370
+ case NotificationRuleConditionCheckOn.AlertEpisodeSeverity:
344
371
  return [ConditionType.ContainsAny, ConditionType.NotContains];
345
372
  case NotificationRuleConditionCheckOn.IncidentState:
346
373
  case NotificationRuleConditionCheckOn.AlertState:
374
+ case NotificationRuleConditionCheckOn.AlertEpisodeState:
347
375
  case NotificationRuleConditionCheckOn.MonitorStatus:
348
376
  case NotificationRuleConditionCheckOn.ScheduledMaintenanceState:
349
377
  return [ConditionType.ContainsAny, ConditionType.NotContains];
350
378
  case NotificationRuleConditionCheckOn.MonitorType:
351
379
  return [ConditionType.ContainsAny, ConditionType.NotContains];
352
380
  case NotificationRuleConditionCheckOn.AlertLabels:
381
+ case NotificationRuleConditionCheckOn.AlertEpisodeLabels:
353
382
  case NotificationRuleConditionCheckOn.IncidentLabels:
354
383
  case NotificationRuleConditionCheckOn.MonitorLabels:
355
384
  case NotificationRuleConditionCheckOn.ScheduledMaintenanceLabels:
@@ -60,15 +60,30 @@ const Accordion: FunctionComponent<ComponentProps> = (
60
60
  className = "-ml-5 -mr-5 p-5 mt-1";
61
61
  }
62
62
 
63
+ const accordionId: string = `accordion-content-${React.useId()}`;
64
+
65
+ const handleKeyDown: (event: React.KeyboardEvent) => void = (
66
+ event: React.KeyboardEvent,
67
+ ): void => {
68
+ if (event.key === "Enter" || event.key === " ") {
69
+ event.preventDefault();
70
+ setIsOpen(!isOpen);
71
+ }
72
+ };
73
+
63
74
  return (
64
75
  <div className={className}>
65
76
  <div>
66
77
  <div
67
78
  className={`flex justify-between cursor-pointer`}
68
- role="alert"
79
+ role="button"
80
+ tabIndex={0}
81
+ aria-expanded={isOpen}
82
+ aria-controls={accordionId}
69
83
  onClick={() => {
70
84
  setIsOpen(!isOpen);
71
85
  }}
86
+ onKeyDown={handleKeyDown}
72
87
  >
73
88
  <div className="flex">
74
89
  {props.title && (
@@ -109,7 +124,10 @@ const Accordion: FunctionComponent<ComponentProps> = (
109
124
  {!isOpen && <div className="">{props.rightElement}</div>}
110
125
  </div>
111
126
  {isOpen && (
112
- <div className={`space-y-5 ${props.title ? "mt-4" : ""}`}>
127
+ <div
128
+ id={accordionId}
129
+ className={`space-y-5 ${props.title ? "mt-4" : ""}`}
130
+ >
113
131
  {props.children}
114
132
  </div>
115
133
  )}
@@ -82,6 +82,7 @@ const Alert: FunctionComponent<ComponentProps> = (
82
82
  data-testid={props.dataTestId}
83
83
  onClick={props.onClick}
84
84
  role="alert"
85
+ aria-live="polite"
85
86
  style={props.color ? { backgroundColor: props.color.toString() } : {}}
86
87
  >
87
88
  <div className="alert-content flex">
@@ -51,6 +51,18 @@ export interface ComponentProps {
51
51
  dataTestId?: string;
52
52
  className?: string | undefined;
53
53
  tooltip?: string | undefined;
54
+ ariaLabel?: string | undefined;
55
+ ariaExpanded?: boolean | undefined;
56
+ ariaHaspopup?:
57
+ | "menu"
58
+ | "listbox"
59
+ | "dialog"
60
+ | "tree"
61
+ | "grid"
62
+ | "true"
63
+ | "false"
64
+ | undefined;
65
+ ariaControls?: string | undefined;
54
66
  }
55
67
 
56
68
  const Button: FunctionComponent<ComponentProps> = ({
@@ -69,6 +81,10 @@ const Button: FunctionComponent<ComponentProps> = ({
69
81
  dataTestId,
70
82
  className,
71
83
  tooltip,
84
+ ariaLabel,
85
+ ariaExpanded,
86
+ ariaHaspopup,
87
+ ariaControls,
72
88
  }: ComponentProps): ReactElement => {
73
89
  useEffect(() => {
74
90
  // componentDidMount
@@ -233,6 +249,14 @@ const Button: FunctionComponent<ComponentProps> = ({
233
249
  buttonStyleCssClass += ` ` + className;
234
250
  }
235
251
 
252
+ // For icon-only buttons, use title as aria-label for accessibility
253
+ const computedAriaLabel: string | undefined =
254
+ ariaLabel ||
255
+ (buttonStyle === ButtonStyleType.ICON ||
256
+ buttonStyle === ButtonStyleType.ICON_LIGHT
257
+ ? title || tooltip
258
+ : undefined);
259
+
236
260
  const getButton: GetReactElementFunction = (): ReactElement => {
237
261
  return (
238
262
  <button
@@ -247,6 +271,11 @@ const Button: FunctionComponent<ComponentProps> = ({
247
271
  type={type}
248
272
  disabled={disabled || isLoading}
249
273
  className={buttonStyleCssClass}
274
+ aria-label={computedAriaLabel}
275
+ aria-disabled={disabled || isLoading}
276
+ aria-expanded={ariaExpanded}
277
+ aria-haspopup={ariaHaspopup}
278
+ aria-controls={ariaControls}
250
279
  >
251
280
  {isLoading && buttonStyle !== ButtonStyleType.ICON && (
252
281
  <Icon icon={IconProp.Spinner} className={loadingIconClassName} />
@@ -23,7 +23,11 @@ const CardSelect: FunctionComponent<ComponentProps> = (
23
23
  ): ReactElement => {
24
24
  return (
25
25
  <div data-testid={props.dataTestId}>
26
- <div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3">
26
+ <div
27
+ role="radiogroup"
28
+ aria-label="Select an option"
29
+ className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3"
30
+ >
27
31
  {props.options.map((option: CardSelectOption, index: number) => {
28
32
  const isSelected: boolean = props.value === option.value;
29
33
 
@@ -67,8 +67,10 @@ const CheckboxElement: FunctionComponent<CategoryProps> = (
67
67
  onFocus={props.onFocus}
68
68
  onBlur={props.onBlur}
69
69
  data-testid={props.dataTestId}
70
- aria-describedby="comments-description"
71
- name="comments"
70
+ aria-describedby={
71
+ props.description ? "checkbox-description" : undefined
72
+ }
73
+ aria-invalid={props.error ? "true" : undefined}
72
74
  type="checkbox"
73
75
  className={`accent-indigo-600 h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600 ${
74
76
  props.className || ""
@@ -78,7 +80,9 @@ const CheckboxElement: FunctionComponent<CategoryProps> = (
78
80
  <div className="ml-3 text-sm leading-6">
79
81
  <label className="font-medium text-gray-900">{props.title}</label>
80
82
  {props.description && (
81
- <div className="text-gray-500">{props.description}</div>
83
+ <div id="checkbox-description" className="text-gray-500">
84
+ {props.description}
85
+ </div>
82
86
  )}
83
87
  </div>
84
88
  </div>
@@ -17,6 +17,8 @@ const ColorCircle: FunctionComponent<ComponentProps> = (
17
17
  style={{
18
18
  backgroundColor: props.color.toString(),
19
19
  }}
20
+ role="img"
21
+ aria-label={props.tooltip}
20
22
  ></div>
21
23
  </Tooltip>
22
24
  );