@oneuptime/common 10.7.1 → 10.8.0

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 (262) hide show
  1. package/Models/DatabaseModels/CloudResource.ts +846 -0
  2. package/Models/DatabaseModels/CloudResourceInstance.ts +276 -0
  3. package/Models/DatabaseModels/CloudResourceLabelRule.ts +510 -0
  4. package/Models/DatabaseModels/CloudResourceOwnerRule.ts +592 -0
  5. package/Models/DatabaseModels/CloudResourceOwnerTeam.ts +487 -0
  6. package/Models/DatabaseModels/CloudResourceOwnerUser.ts +486 -0
  7. package/Models/DatabaseModels/Host.ts +209 -0
  8. package/Models/DatabaseModels/Index.ts +36 -0
  9. package/Models/DatabaseModels/RumApplication.ts +731 -0
  10. package/Models/DatabaseModels/RumApplicationClient.ts +229 -0
  11. package/Models/DatabaseModels/RumApplicationLabelRule.ts +510 -0
  12. package/Models/DatabaseModels/RumApplicationOwnerRule.ts +592 -0
  13. package/Models/DatabaseModels/RumApplicationOwnerTeam.ts +486 -0
  14. package/Models/DatabaseModels/RumApplicationOwnerUser.ts +485 -0
  15. package/Models/DatabaseModels/ServerlessFunction.ts +881 -0
  16. package/Models/DatabaseModels/ServerlessFunctionInstance.ts +212 -0
  17. package/Models/DatabaseModels/ServerlessFunctionLabelRule.ts +510 -0
  18. package/Models/DatabaseModels/ServerlessFunctionOwnerRule.ts +592 -0
  19. package/Models/DatabaseModels/ServerlessFunctionOwnerTeam.ts +487 -0
  20. package/Models/DatabaseModels/ServerlessFunctionOwnerUser.ts +486 -0
  21. package/Models/DatabaseModels/Service.ts +268 -0
  22. package/Models/DatabaseModels/TelemetryException.ts +15 -1
  23. package/Models/DatabaseModels/WorkflowLog.ts +52 -0
  24. package/Server/Infrastructure/Postgres/SchemaMigrations/1780931746908-AddResumeStateToWorkflowLog.ts +21 -0
  25. package/Server/Infrastructure/Postgres/SchemaMigrations/1780931863719-AddTelemetryResourceMetadataColumns.ts +108 -0
  26. package/Server/Infrastructure/Postgres/SchemaMigrations/1780933132562-AddServerlessFunctionTables.ts +205 -0
  27. package/Server/Infrastructure/Postgres/SchemaMigrations/1780935387827-AddCloudResourceTables.ts +195 -0
  28. package/Server/Infrastructure/Postgres/SchemaMigrations/1780936579718-AddRumApplicationTables.ts +202 -0
  29. package/Server/Infrastructure/Postgres/SchemaMigrations/1780938407319-AddServerlessFunctionRuleTables.ts +156 -0
  30. package/Server/Infrastructure/Postgres/SchemaMigrations/1780940721814-AddCloudResourceRuleTables.ts +149 -0
  31. package/Server/Infrastructure/Postgres/SchemaMigrations/1780940998002-AddRumApplicationRuleTables.ts +149 -0
  32. package/Server/Infrastructure/Postgres/SchemaMigrations/1780941762204-AddTelemetryResourceInventoryTables.ts +95 -0
  33. package/Server/Infrastructure/Postgres/SchemaMigrations/1780985763463-AddRumApplicationSdkLanguage.ts +25 -0
  34. package/Server/Infrastructure/Postgres/SchemaMigrations/1780987192743-RecastCloudResourcesByEnvironment.ts +30 -0
  35. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +22 -0
  36. package/Server/Infrastructure/Queue.ts +11 -0
  37. package/Server/Services/CloudResourceInstanceService.ts +76 -0
  38. package/Server/Services/CloudResourceLabelRuleEngineService.ts +175 -0
  39. package/Server/Services/CloudResourceLabelRuleService.ts +14 -0
  40. package/Server/Services/CloudResourceOwnerRuleEngineService.ts +192 -0
  41. package/Server/Services/CloudResourceOwnerRuleService.ts +14 -0
  42. package/Server/Services/CloudResourceOwnerTeamService.ts +10 -0
  43. package/Server/Services/CloudResourceOwnerUserService.ts +10 -0
  44. package/Server/Services/CloudResourceService.ts +342 -0
  45. package/Server/Services/ExceptionAggregationService.ts +3 -0
  46. package/Server/Services/HostService.ts +42 -0
  47. package/Server/Services/LogAggregationService.ts +3 -0
  48. package/Server/Services/MetricAggregationService.ts +3 -0
  49. package/Server/Services/OpenTelemetryIngestService.ts +148 -1
  50. package/Server/Services/RumApplicationClientService.ts +69 -0
  51. package/Server/Services/RumApplicationLabelRuleEngineService.ts +175 -0
  52. package/Server/Services/RumApplicationLabelRuleService.ts +14 -0
  53. package/Server/Services/RumApplicationOwnerRuleEngineService.ts +192 -0
  54. package/Server/Services/RumApplicationOwnerRuleService.ts +14 -0
  55. package/Server/Services/RumApplicationOwnerTeamService.ts +10 -0
  56. package/Server/Services/RumApplicationOwnerUserService.ts +10 -0
  57. package/Server/Services/RumApplicationService.ts +301 -0
  58. package/Server/Services/ServerlessFunctionInstanceService.ts +61 -0
  59. package/Server/Services/ServerlessFunctionLabelRuleEngineService.ts +182 -0
  60. package/Server/Services/ServerlessFunctionLabelRuleService.ts +14 -0
  61. package/Server/Services/ServerlessFunctionOwnerRuleEngineService.ts +199 -0
  62. package/Server/Services/ServerlessFunctionOwnerRuleService.ts +14 -0
  63. package/Server/Services/ServerlessFunctionOwnerTeamService.ts +10 -0
  64. package/Server/Services/ServerlessFunctionOwnerUserService.ts +10 -0
  65. package/Server/Services/ServerlessFunctionService.ts +351 -0
  66. package/Server/Services/ServiceService.ts +95 -8
  67. package/Server/Services/TraceAggregationService.ts +3 -0
  68. package/Server/Types/Database/Permissions/OwnerTableRegistry.ts +39 -0
  69. package/Server/Types/Workflow/ComponentCode.ts +9 -0
  70. package/Server/Types/Workflow/Components/Index.ts +2 -0
  71. package/Server/Types/Workflow/Components/Sleep.ts +105 -0
  72. package/Server/Types/Workflow/Workflow.ts +6 -0
  73. package/Server/Utils/Telemetry/ResourceFacetResolver.ts +150 -0
  74. package/Tests/Types/Monitor/KubernetesAlertTemplates.test.ts +193 -0
  75. package/Tests/UI/Components/DuplicateModel.test.tsx +2 -2
  76. package/Types/Monitor/KubernetesAlertTemplates.ts +239 -14
  77. package/Types/Permission.ts +692 -1
  78. package/Types/Telemetry/ServiceType.ts +3 -0
  79. package/Types/Workflow/ComponentID.ts +1 -0
  80. package/Types/Workflow/Components/Sleep.ts +71 -0
  81. package/Types/Workflow/Components.ts +2 -0
  82. package/Types/Workflow/WorkflowStatus.ts +1 -0
  83. package/UI/Components/BulkUpdate/BulkLabelActions.tsx +159 -32
  84. package/UI/Components/Navbar/NavBar.tsx +72 -123
  85. package/UI/Components/Navbar/NavBarMenuModal.tsx +642 -0
  86. package/UI/Components/Workflow/WorkflowStatus.tsx +3 -0
  87. package/build/dist/Models/DatabaseModels/CloudResource.js +871 -0
  88. package/build/dist/Models/DatabaseModels/CloudResource.js.map +1 -0
  89. package/build/dist/Models/DatabaseModels/CloudResourceInstance.js +300 -0
  90. package/build/dist/Models/DatabaseModels/CloudResourceInstance.js.map +1 -0
  91. package/build/dist/Models/DatabaseModels/CloudResourceLabelRule.js +520 -0
  92. package/build/dist/Models/DatabaseModels/CloudResourceLabelRule.js.map +1 -0
  93. package/build/dist/Models/DatabaseModels/CloudResourceOwnerRule.js +601 -0
  94. package/build/dist/Models/DatabaseModels/CloudResourceOwnerRule.js.map +1 -0
  95. package/build/dist/Models/DatabaseModels/CloudResourceOwnerTeam.js +503 -0
  96. package/build/dist/Models/DatabaseModels/CloudResourceOwnerTeam.js.map +1 -0
  97. package/build/dist/Models/DatabaseModels/CloudResourceOwnerUser.js +502 -0
  98. package/build/dist/Models/DatabaseModels/CloudResourceOwnerUser.js.map +1 -0
  99. package/build/dist/Models/DatabaseModels/Host.js +215 -0
  100. package/build/dist/Models/DatabaseModels/Host.js.map +1 -1
  101. package/build/dist/Models/DatabaseModels/Index.js +36 -0
  102. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  103. package/build/dist/Models/DatabaseModels/RumApplication.js +751 -0
  104. package/build/dist/Models/DatabaseModels/RumApplication.js.map +1 -0
  105. package/build/dist/Models/DatabaseModels/RumApplicationClient.js +252 -0
  106. package/build/dist/Models/DatabaseModels/RumApplicationClient.js.map +1 -0
  107. package/build/dist/Models/DatabaseModels/RumApplicationLabelRule.js +520 -0
  108. package/build/dist/Models/DatabaseModels/RumApplicationLabelRule.js.map +1 -0
  109. package/build/dist/Models/DatabaseModels/RumApplicationOwnerRule.js +601 -0
  110. package/build/dist/Models/DatabaseModels/RumApplicationOwnerRule.js.map +1 -0
  111. package/build/dist/Models/DatabaseModels/RumApplicationOwnerTeam.js +503 -0
  112. package/build/dist/Models/DatabaseModels/RumApplicationOwnerTeam.js.map +1 -0
  113. package/build/dist/Models/DatabaseModels/RumApplicationOwnerUser.js +502 -0
  114. package/build/dist/Models/DatabaseModels/RumApplicationOwnerUser.js.map +1 -0
  115. package/build/dist/Models/DatabaseModels/ServerlessFunction.js +908 -0
  116. package/build/dist/Models/DatabaseModels/ServerlessFunction.js.map +1 -0
  117. package/build/dist/Models/DatabaseModels/ServerlessFunctionInstance.js +234 -0
  118. package/build/dist/Models/DatabaseModels/ServerlessFunctionInstance.js.map +1 -0
  119. package/build/dist/Models/DatabaseModels/ServerlessFunctionLabelRule.js +520 -0
  120. package/build/dist/Models/DatabaseModels/ServerlessFunctionLabelRule.js.map +1 -0
  121. package/build/dist/Models/DatabaseModels/ServerlessFunctionOwnerRule.js +601 -0
  122. package/build/dist/Models/DatabaseModels/ServerlessFunctionOwnerRule.js.map +1 -0
  123. package/build/dist/Models/DatabaseModels/ServerlessFunctionOwnerTeam.js +503 -0
  124. package/build/dist/Models/DatabaseModels/ServerlessFunctionOwnerTeam.js.map +1 -0
  125. package/build/dist/Models/DatabaseModels/ServerlessFunctionOwnerUser.js +502 -0
  126. package/build/dist/Models/DatabaseModels/ServerlessFunctionOwnerUser.js.map +1 -0
  127. package/build/dist/Models/DatabaseModels/Service.js +276 -0
  128. package/build/dist/Models/DatabaseModels/Service.js.map +1 -1
  129. package/build/dist/Models/DatabaseModels/TelemetryException.js +12 -1
  130. package/build/dist/Models/DatabaseModels/TelemetryException.js.map +1 -1
  131. package/build/dist/Models/DatabaseModels/WorkflowLog.js +53 -0
  132. package/build/dist/Models/DatabaseModels/WorkflowLog.js.map +1 -1
  133. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780931746908-AddResumeStateToWorkflowLog.js +14 -0
  134. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780931746908-AddResumeStateToWorkflowLog.js.map +1 -0
  135. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780931863719-AddTelemetryResourceMetadataColumns.js +53 -0
  136. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780931863719-AddTelemetryResourceMetadataColumns.js.map +1 -0
  137. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780933132562-AddServerlessFunctionTables.js +82 -0
  138. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780933132562-AddServerlessFunctionTables.js.map +1 -0
  139. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780935387827-AddCloudResourceTables.js +82 -0
  140. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780935387827-AddCloudResourceTables.js.map +1 -0
  141. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780936579718-AddRumApplicationTables.js +83 -0
  142. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780936579718-AddRumApplicationTables.js.map +1 -0
  143. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780938407319-AddServerlessFunctionRuleTables.js +67 -0
  144. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780938407319-AddServerlessFunctionRuleTables.js.map +1 -0
  145. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780940721814-AddCloudResourceRuleTables.js +60 -0
  146. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780940721814-AddCloudResourceRuleTables.js.map +1 -0
  147. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780940998002-AddRumApplicationRuleTables.js +60 -0
  148. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780940998002-AddRumApplicationRuleTables.js.map +1 -0
  149. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780941762204-AddTelemetryResourceInventoryTables.js +45 -0
  150. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780941762204-AddTelemetryResourceInventoryTables.js.map +1 -0
  151. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780985763463-AddRumApplicationSdkLanguage.js +18 -0
  152. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780985763463-AddRumApplicationSdkLanguage.js.map +1 -0
  153. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780987192743-RecastCloudResourcesByEnvironment.js +27 -0
  154. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780987192743-RecastCloudResourcesByEnvironment.js.map +1 -0
  155. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +22 -0
  156. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  157. package/build/dist/Server/Infrastructure/Queue.js +3 -0
  158. package/build/dist/Server/Infrastructure/Queue.js.map +1 -1
  159. package/build/dist/Server/Services/CloudResourceInstanceService.js +76 -0
  160. package/build/dist/Server/Services/CloudResourceInstanceService.js.map +1 -0
  161. package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js +160 -0
  162. package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js.map +1 -0
  163. package/build/dist/Server/Services/CloudResourceLabelRuleService.js +13 -0
  164. package/build/dist/Server/Services/CloudResourceLabelRuleService.js.map +1 -0
  165. package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js +179 -0
  166. package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js.map +1 -0
  167. package/build/dist/Server/Services/CloudResourceOwnerRuleService.js +13 -0
  168. package/build/dist/Server/Services/CloudResourceOwnerRuleService.js.map +1 -0
  169. package/build/dist/Server/Services/CloudResourceOwnerTeamService.js +9 -0
  170. package/build/dist/Server/Services/CloudResourceOwnerTeamService.js.map +1 -0
  171. package/build/dist/Server/Services/CloudResourceOwnerUserService.js +9 -0
  172. package/build/dist/Server/Services/CloudResourceOwnerUserService.js.map +1 -0
  173. package/build/dist/Server/Services/CloudResourceService.js +287 -0
  174. package/build/dist/Server/Services/CloudResourceService.js.map +1 -0
  175. package/build/dist/Server/Services/ExceptionAggregationService.js +3 -0
  176. package/build/dist/Server/Services/ExceptionAggregationService.js.map +1 -1
  177. package/build/dist/Server/Services/HostService.js +29 -1
  178. package/build/dist/Server/Services/HostService.js.map +1 -1
  179. package/build/dist/Server/Services/LogAggregationService.js +3 -0
  180. package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
  181. package/build/dist/Server/Services/MetricAggregationService.js +3 -0
  182. package/build/dist/Server/Services/MetricAggregationService.js.map +1 -1
  183. package/build/dist/Server/Services/OpenTelemetryIngestService.js +98 -2
  184. package/build/dist/Server/Services/OpenTelemetryIngestService.js.map +1 -1
  185. package/build/dist/Server/Services/RumApplicationClientService.js +70 -0
  186. package/build/dist/Server/Services/RumApplicationClientService.js.map +1 -0
  187. package/build/dist/Server/Services/RumApplicationLabelRuleEngineService.js +160 -0
  188. package/build/dist/Server/Services/RumApplicationLabelRuleEngineService.js.map +1 -0
  189. package/build/dist/Server/Services/RumApplicationLabelRuleService.js +13 -0
  190. package/build/dist/Server/Services/RumApplicationLabelRuleService.js.map +1 -0
  191. package/build/dist/Server/Services/RumApplicationOwnerRuleEngineService.js +179 -0
  192. package/build/dist/Server/Services/RumApplicationOwnerRuleEngineService.js.map +1 -0
  193. package/build/dist/Server/Services/RumApplicationOwnerRuleService.js +13 -0
  194. package/build/dist/Server/Services/RumApplicationOwnerRuleService.js.map +1 -0
  195. package/build/dist/Server/Services/RumApplicationOwnerTeamService.js +9 -0
  196. package/build/dist/Server/Services/RumApplicationOwnerTeamService.js.map +1 -0
  197. package/build/dist/Server/Services/RumApplicationOwnerUserService.js +9 -0
  198. package/build/dist/Server/Services/RumApplicationOwnerUserService.js.map +1 -0
  199. package/build/dist/Server/Services/RumApplicationService.js +259 -0
  200. package/build/dist/Server/Services/RumApplicationService.js.map +1 -0
  201. package/build/dist/Server/Services/ServerlessFunctionInstanceService.js +64 -0
  202. package/build/dist/Server/Services/ServerlessFunctionInstanceService.js.map +1 -0
  203. package/build/dist/Server/Services/ServerlessFunctionLabelRuleEngineService.js +160 -0
  204. package/build/dist/Server/Services/ServerlessFunctionLabelRuleEngineService.js.map +1 -0
  205. package/build/dist/Server/Services/ServerlessFunctionLabelRuleService.js +13 -0
  206. package/build/dist/Server/Services/ServerlessFunctionLabelRuleService.js.map +1 -0
  207. package/build/dist/Server/Services/ServerlessFunctionOwnerRuleEngineService.js +179 -0
  208. package/build/dist/Server/Services/ServerlessFunctionOwnerRuleEngineService.js.map +1 -0
  209. package/build/dist/Server/Services/ServerlessFunctionOwnerRuleService.js +13 -0
  210. package/build/dist/Server/Services/ServerlessFunctionOwnerRuleService.js.map +1 -0
  211. package/build/dist/Server/Services/ServerlessFunctionOwnerTeamService.js +9 -0
  212. package/build/dist/Server/Services/ServerlessFunctionOwnerTeamService.js.map +1 -0
  213. package/build/dist/Server/Services/ServerlessFunctionOwnerUserService.js +9 -0
  214. package/build/dist/Server/Services/ServerlessFunctionOwnerUserService.js.map +1 -0
  215. package/build/dist/Server/Services/ServerlessFunctionService.js +299 -0
  216. package/build/dist/Server/Services/ServerlessFunctionService.js.map +1 -0
  217. package/build/dist/Server/Services/ServiceService.js +63 -7
  218. package/build/dist/Server/Services/ServiceService.js.map +1 -1
  219. package/build/dist/Server/Services/TraceAggregationService.js +3 -0
  220. package/build/dist/Server/Services/TraceAggregationService.js.map +1 -1
  221. package/build/dist/Server/Types/Database/Permissions/OwnerTableRegistry.js +39 -0
  222. package/build/dist/Server/Types/Database/Permissions/OwnerTableRegistry.js.map +1 -1
  223. package/build/dist/Server/Types/Workflow/ComponentCode.js.map +1 -1
  224. package/build/dist/Server/Types/Workflow/Components/Index.js +2 -0
  225. package/build/dist/Server/Types/Workflow/Components/Index.js.map +1 -1
  226. package/build/dist/Server/Types/Workflow/Components/Sleep.js +85 -0
  227. package/build/dist/Server/Types/Workflow/Components/Sleep.js.map +1 -0
  228. package/build/dist/Server/Utils/Telemetry/ResourceFacetResolver.js +90 -0
  229. package/build/dist/Server/Utils/Telemetry/ResourceFacetResolver.js.map +1 -1
  230. package/build/dist/Tests/Types/Monitor/KubernetesAlertTemplates.test.js +121 -0
  231. package/build/dist/Tests/Types/Monitor/KubernetesAlertTemplates.test.js.map +1 -0
  232. package/build/dist/Tests/UI/Components/DuplicateModel.test.js +2 -2
  233. package/build/dist/Tests/UI/Components/DuplicateModel.test.js.map +1 -1
  234. package/build/dist/Types/Monitor/KubernetesAlertTemplates.js +210 -14
  235. package/build/dist/Types/Monitor/KubernetesAlertTemplates.js.map +1 -1
  236. package/build/dist/Types/Permission.js +609 -1
  237. package/build/dist/Types/Permission.js.map +1 -1
  238. package/build/dist/Types/Telemetry/ServiceType.js +3 -0
  239. package/build/dist/Types/Telemetry/ServiceType.js.map +1 -1
  240. package/build/dist/Types/Workflow/ComponentID.js +1 -0
  241. package/build/dist/Types/Workflow/ComponentID.js.map +1 -1
  242. package/build/dist/Types/Workflow/Components/Sleep.js +64 -0
  243. package/build/dist/Types/Workflow/Components/Sleep.js.map +1 -0
  244. package/build/dist/Types/Workflow/Components.js +2 -0
  245. package/build/dist/Types/Workflow/Components.js.map +1 -1
  246. package/build/dist/Types/Workflow/WorkflowStatus.js +1 -0
  247. package/build/dist/Types/Workflow/WorkflowStatus.js.map +1 -1
  248. package/build/dist/UI/Components/BulkUpdate/BulkLabelActions.js +113 -19
  249. package/build/dist/UI/Components/BulkUpdate/BulkLabelActions.js.map +1 -1
  250. package/build/dist/UI/Components/Navbar/NavBar.js +34 -66
  251. package/build/dist/UI/Components/Navbar/NavBar.js.map +1 -1
  252. package/build/dist/UI/Components/Navbar/NavBarMenuModal.js +412 -0
  253. package/build/dist/UI/Components/Navbar/NavBarMenuModal.js.map +1 -0
  254. package/build/dist/UI/Components/Workflow/WorkflowStatus.js +3 -0
  255. package/build/dist/UI/Components/Workflow/WorkflowStatus.js.map +1 -1
  256. package/package.json +1 -1
  257. package/UI/Components/Navbar/NavBarMenu.tsx +0 -183
  258. package/UI/Components/Navbar/NavBarMenuItem.tsx +0 -146
  259. package/build/dist/UI/Components/Navbar/NavBarMenu.js +0 -82
  260. package/build/dist/UI/Components/Navbar/NavBarMenu.js.map +0 -1
  261. package/build/dist/UI/Components/Navbar/NavBarMenuItem.js +0 -109
  262. package/build/dist/UI/Components/Navbar/NavBarMenuItem.js.map +0 -1
@@ -14,6 +14,9 @@ enum ServiceType {
14
14
  Host = "Host",
15
15
  DockerHost = "DockerHost",
16
16
  KubernetesCluster = "KubernetesCluster",
17
+ ServerlessFunction = "ServerlessFunction",
18
+ CloudResource = "CloudResource",
19
+ RealUserMonitor = "RealUserMonitor",
17
20
  /*
18
21
  * Telemetry that arrived without an OTel service.name and with no
19
22
  * host / docker / k8s resource signal. Instead of synthesising a
@@ -19,6 +19,7 @@ enum ComponentID {
19
19
  SendEmail = "send-email",
20
20
  IfElse = "if-else",
21
21
  WorkflowRun = "workflow-run",
22
+ Sleep = "sleep",
22
23
  }
23
24
 
24
25
  export default ComponentID;
@@ -0,0 +1,71 @@
1
+ import IconProp from "../../Icon/IconProp";
2
+ import ComponentID from "../ComponentID";
3
+ import ComponentMetadata, {
4
+ ComponentInputType,
5
+ ComponentType,
6
+ } from "./../Component";
7
+
8
+ const components: Array<ComponentMetadata> = [
9
+ {
10
+ id: ComponentID.Sleep,
11
+ title: "Sleep",
12
+ category: "Utils",
13
+ description:
14
+ "Pause the workflow for a specified duration, then continue with the next steps. The workflow is suspended while sleeping and does not consume a worker — it resumes automatically when the sleep is over.",
15
+ iconProp: IconProp.Clock,
16
+ componentType: ComponentType.Component,
17
+ arguments: [
18
+ {
19
+ type: ComponentInputType.Number,
20
+ name: "Days",
21
+ description: "Number of days to sleep. Optional. Defaults to 0.",
22
+ required: false,
23
+ id: "days",
24
+ placeholder: "0",
25
+ },
26
+ {
27
+ type: ComponentInputType.Number,
28
+ name: "Hours",
29
+ description: "Number of hours to sleep. Optional. Defaults to 0.",
30
+ required: false,
31
+ id: "hours",
32
+ placeholder: "0",
33
+ },
34
+ {
35
+ type: ComponentInputType.Number,
36
+ name: "Minutes",
37
+ description: "Number of minutes to sleep. Optional. Defaults to 0.",
38
+ required: false,
39
+ id: "minutes",
40
+ placeholder: "0",
41
+ },
42
+ {
43
+ type: ComponentInputType.Number,
44
+ name: "Seconds",
45
+ description: "Number of seconds to sleep. Optional. Defaults to 0.",
46
+ required: false,
47
+ id: "seconds",
48
+ placeholder: "0",
49
+ },
50
+ ],
51
+ returnValues: [],
52
+ inPorts: [
53
+ {
54
+ title: "In",
55
+ description:
56
+ "Please connect components to this port for this component to work.",
57
+ id: "in",
58
+ },
59
+ ],
60
+ outPorts: [
61
+ {
62
+ title: "Out",
63
+ description:
64
+ "Connect components to this port to run them after the sleep is over.",
65
+ id: "out",
66
+ },
67
+ ],
68
+ },
69
+ ];
70
+
71
+ export default components;
@@ -11,6 +11,7 @@ import ManualComponents from "./Components/Manual";
11
11
  import MicrosoftTeamsComponents from "./Components/MicrosoftTeams";
12
12
  import ScheduleComponents from "./Components/Schedule";
13
13
  import SlackComponents from "./Components/Slack";
14
+ import SleepComponents from "./Components/Sleep";
14
15
  import TelegramComponents from "./Components/Telegram";
15
16
  import WebhookComponents from "./Components/Webhook";
16
17
  import WorkflowComponents from "./Components/Workflow";
@@ -30,6 +31,7 @@ const components: Array<ComponentMetadata> = [
30
31
  ...WorkflowComponents,
31
32
  ...ManualComponents,
32
33
  ...MicrosoftTeamsComponents,
34
+ ...SleepComponents,
33
35
  ];
34
36
 
35
37
  export default components;
@@ -1,6 +1,7 @@
1
1
  enum WorkflowStatus {
2
2
  Scheduled = "Scheduled",
3
3
  Running = "Running",
4
+ Waiting = "Waiting",
4
5
  Success = "Success",
5
6
  Error = "Error",
6
7
  Timeout = "Timeout",
@@ -7,12 +7,15 @@ import IconProp from "../../../Types/Icon/IconProp";
7
7
  import { LIMIT_PER_PROJECT } from "../../../Types/Database/LimitMax";
8
8
  import SortOrder from "../../../Types/BaseDatabase/SortOrder";
9
9
  import ListResult from "../../../Types/BaseDatabase/ListResult";
10
+ import Includes from "../../../Types/BaseDatabase/Includes";
10
11
  import ObjectID from "../../../Types/ObjectID";
11
12
  import API from "../../Utils/API/API";
12
13
  import ModelAPI from "../../Utils/ModelAPI/ModelAPI";
13
14
  import ProjectUtil from "../../Utils/Project";
14
15
  import { ButtonStyleType } from "../Button/Button";
15
16
  import BasicFormModal from "../FormModal/BasicFormModal";
17
+ import Modal from "../Modal/Modal";
18
+ import { DropdownOption } from "../Dropdown/Dropdown";
16
19
  import FormFieldSchemaType from "../Forms/Types/FormFieldSchemaType";
17
20
  import {
18
21
  BulkActionButtonSchema,
@@ -50,6 +53,17 @@ function useBulkLabelActions<T extends BaseModel>(
50
53
  const [bulkActionProps, setBulkActionProps] =
51
54
  useState<BulkActionOnClickProps<T> | null>(null);
52
55
 
56
+ /*
57
+ * For "Remove Labels" we only want to offer labels that are actually
58
+ * attached to the selected items (not every label in the project). These
59
+ * are computed from the selected items each time the remove modal opens.
60
+ */
61
+ const [removeLabelDropdownOptions, setRemoveLabelDropdownOptions] = useState<
62
+ Array<DropdownOption>
63
+ >([]);
64
+ const [isLoadingRemoveLabels, setIsLoadingRemoveLabels] =
65
+ useState<boolean>(false);
66
+
53
67
  useEffect(() => {
54
68
  const fetchLabels: () => Promise<void> = async (): Promise<void> => {
55
69
  try {
@@ -187,13 +201,106 @@ function useBulkLabelActions<T extends BaseModel>(
187
201
  setBulkActionProps(null);
188
202
  };
189
203
 
190
- const labelDropdownOptions: Array<{ label: string; value: string }> =
191
- labels.map((label: Label) => {
192
- return {
204
+ /*
205
+ * Build the dropdown options for the "Remove Labels" modal from only the
206
+ * labels actually attached to the selected items. We fetch the selected
207
+ * items (by id) with their labels and take the de-duplicated union, so the
208
+ * modal offers only labels that can really be removed instead of every
209
+ * label in the project.
210
+ */
211
+ const loadLabelsForSelectedItems: (
212
+ items: Array<T>,
213
+ ) => Promise<void> = async (items: Array<T>): Promise<void> => {
214
+ setIsLoadingRemoveLabels(true);
215
+
216
+ try {
217
+ const itemIds: Array<string> = items
218
+ .map((item: T) => {
219
+ return item.id?.toString() || "";
220
+ })
221
+ .filter((id: string) => {
222
+ return id.length > 0;
223
+ });
224
+
225
+ if (itemIds.length === 0) {
226
+ setRemoveLabelDropdownOptions([]);
227
+ return;
228
+ }
229
+
230
+ const result: ListResult<T> = await ModelAPI.getList<T>({
231
+ modelType: config.modelType,
232
+ query: {
233
+ _id: new Includes(itemIds),
234
+ } as any,
235
+ limit: LIMIT_PER_PROJECT,
236
+ skip: 0,
237
+ select: {
238
+ labels: {
239
+ _id: true,
240
+ name: true,
241
+ color: true,
242
+ },
243
+ } as any,
244
+ sort: {},
245
+ });
246
+
247
+ // Union of labels across all selected items, de-duplicated by id.
248
+ const labelById: Map<string, Label> = new Map<string, Label>();
249
+
250
+ for (const item of result.data) {
251
+ const itemLabels: Array<Label> =
252
+ ((item as any).labels as Array<Label> | undefined) || [];
253
+
254
+ for (const label of itemLabels) {
255
+ const id: string = label._id?.toString() || "";
256
+ if (id.length > 0) {
257
+ labelById.set(id, label);
258
+ }
259
+ }
260
+ }
261
+
262
+ const options: Array<DropdownOption> = Array.from(
263
+ labelById.values(),
264
+ ).map((label: Label) => {
265
+ const option: DropdownOption = {
266
+ label: label.name || "",
267
+ value: label._id?.toString() || "",
268
+ };
269
+
270
+ if (label.color) {
271
+ option.color = label.color;
272
+ }
273
+
274
+ return option;
275
+ });
276
+
277
+ options.sort((a: DropdownOption, b: DropdownOption) => {
278
+ return a.label.localeCompare(b.label);
279
+ });
280
+
281
+ setRemoveLabelDropdownOptions(options);
282
+ } catch {
283
+ // on error, show no options rather than every label in the project
284
+ setRemoveLabelDropdownOptions([]);
285
+ } finally {
286
+ setIsLoadingRemoveLabels(false);
287
+ }
288
+ };
289
+
290
+ const labelDropdownOptions: Array<DropdownOption> = labels.map(
291
+ (label: Label) => {
292
+ const option: DropdownOption = {
193
293
  label: label.name || "",
194
294
  value: label._id?.toString() || "",
195
295
  };
196
- });
296
+
297
+ if (label.color) {
298
+ option.color = label.color;
299
+ }
300
+
301
+ return option;
302
+ },
303
+ );
197
304
 
198
305
  const addLabelsAction: BulkActionButtonSchema<T> = {
199
306
  title: "Add Labels",
@@ -211,10 +318,21 @@ function useBulkLabelActions<T extends BaseModel>(
211
318
  icon: IconProp.Close,
212
319
  onClick: async (actionProps: BulkActionOnClickProps<T>): Promise<void> => {
213
320
  setBulkActionProps(actionProps);
321
+ setRemoveLabelDropdownOptions([]);
214
322
  setShowRemoveModal(true);
323
+ await loadLabelsForSelectedItems(actionProps.items);
215
324
  },
216
325
  };
217
326
 
327
+ const closeRemoveModal: () => void = (): void => {
328
+ setShowRemoveModal(false);
329
+ setBulkActionProps(null);
330
+ setRemoveLabelDropdownOptions([]);
331
+ };
332
+
333
+ const hasNoLabelsToRemove: boolean =
334
+ !isLoadingRemoveLabels && removeLabelDropdownOptions.length === 0;
335
+
218
336
  const modals: ReactElement = (
219
337
  <>
220
338
  {showAddModal && (
@@ -247,35 +365,44 @@ function useBulkLabelActions<T extends BaseModel>(
247
365
  />
248
366
  )}
249
367
 
250
- {showRemoveModal && (
251
- <BasicFormModal
252
- title="Remove Labels"
253
- description="Select labels to remove from the selected items. Items that do not have any of these labels will be skipped."
254
- onClose={() => {
255
- setShowRemoveModal(false);
256
- setBulkActionProps(null);
257
- }}
258
- submitButtonText="Remove Labels"
259
- onSubmit={async (formData: { labelIds: Array<string> }) => {
260
- await applyLabels(formData.labelIds || [], "remove");
261
- }}
262
- formProps={{
263
- fields: [
264
- {
265
- field: {
266
- labelIds: true,
368
+ {showRemoveModal &&
369
+ (hasNoLabelsToRemove ? (
370
+ <Modal
371
+ title="No Labels to Remove"
372
+ description="The selected items don't have any labels to remove."
373
+ icon={IconProp.Label}
374
+ onClose={closeRemoveModal}
375
+ closeButtonText="Close"
376
+ >
377
+ <></>
378
+ </Modal>
379
+ ) : (
380
+ <BasicFormModal
381
+ title="Remove Labels"
382
+ description="Select labels to remove from the selected items. Only labels currently applied to the selected items are shown."
383
+ isLoading={isLoadingRemoveLabels}
384
+ onClose={closeRemoveModal}
385
+ submitButtonText="Remove Labels"
386
+ onSubmit={async (formData: { labelIds: Array<string> }) => {
387
+ await applyLabels(formData.labelIds || [], "remove");
388
+ }}
389
+ formProps={{
390
+ fields: [
391
+ {
392
+ field: {
393
+ labelIds: true,
394
+ },
395
+ title: "Select Labels",
396
+ description:
397
+ "These labels will be removed from each selected item.",
398
+ fieldType: FormFieldSchemaType.MultiSelectDropdown,
399
+ required: true,
400
+ dropdownOptions: removeLabelDropdownOptions,
267
401
  },
268
- title: "Select Labels",
269
- description:
270
- "These labels will be removed from each selected item.",
271
- fieldType: FormFieldSchemaType.MultiSelectDropdown,
272
- required: true,
273
- dropdownOptions: labelDropdownOptions,
274
- },
275
- ],
276
- }}
277
- />
278
- )}
402
+ ],
403
+ }}
404
+ />
405
+ ))}
279
406
  </>
280
407
  );
281
408
 
@@ -3,14 +3,12 @@ import React, {
3
3
  ReactElement,
4
4
  useState,
5
5
  useEffect,
6
- useRef,
7
6
  } from "react";
8
7
  import Route from "../../../Types/API/Route";
9
8
  import URL from "../../../Types/API/URL";
10
9
  import IconProp from "../../../Types/Icon/IconProp";
11
10
  import NavBarItem from "./NavBarItem";
12
- import NavBarMenu from "./NavBarMenu";
13
- import NavBarMenuItem from "./NavBarMenuItem";
11
+ import NavBarMenuModal from "./NavBarMenuModal";
14
12
  import Button, { ButtonStyleType } from "../Button/Button";
15
13
  import Navigation from "../../Utils/Navigation";
16
14
  import useComponentOutsideClick from "../../Types/UseComponentOutsideClick";
@@ -41,6 +39,10 @@ export interface ComponentProps {
41
39
  rightElement?: NavItem;
42
40
  moreMenuItems?: MoreMenuItem[];
43
41
  moreMenuTitle?: string; // Title for the more menu (default: "More")
42
+ moreMenuSearchPlaceholder?: string; // Placeholder for the menu search box
43
+ moreMenuNoResultsText?: string; // Empty-state text when search matches nothing
44
+ moreMenuKeyboardHint?: string; // Keyboard hint shown in the menu footer
45
+ moreMenuRecentLabel?: string; // Heading for the recently-visited products row
44
46
  moreMenuFooter?: {
45
47
  title: string;
46
48
  description: string;
@@ -58,11 +60,6 @@ const Navbar: FunctionComponent<ComponentProps> = (
58
60
  const [isMobileMenuVisible, setIsMobileMenuVisible] =
59
61
  useState<boolean>(false);
60
62
  const [isMoreMenuVisible, setIsMoreMenuVisible] = useState<boolean>(false);
61
- const [moreMenuTimeout, setMoreMenuTimeout] = useState<ReturnType<
62
- typeof setTimeout
63
- > | null>(null);
64
- const suppressShowRef: React.MutableRefObject<boolean> =
65
- useRef<boolean>(false);
66
63
 
67
64
  // Use the existing outside click hook for mobile menu
68
65
  const {
@@ -90,41 +87,32 @@ const Navbar: FunctionComponent<ComponentProps> = (
90
87
  };
91
88
  }, []);
92
89
 
93
- // More menu functions
94
- const hideMoreMenu: () => void = (): void => {
95
- if (moreMenuTimeout) {
96
- clearTimeout(moreMenuTimeout);
97
- setMoreMenuTimeout(null);
98
- }
90
+ // Open/close the products menu with Cmd/Ctrl + K from anywhere.
91
+ useEffect(() => {
92
+ const handleGlobalKeyDown: (event: KeyboardEvent) => void = (
93
+ event: KeyboardEvent,
94
+ ): void => {
95
+ if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "k") {
96
+ event.preventDefault();
97
+ setIsMoreMenuVisible((visible: boolean) => {
98
+ return !visible;
99
+ });
100
+ }
101
+ };
99
102
 
100
- const timeout: ReturnType<typeof setTimeout> = setTimeout(() => {
101
- setIsMoreMenuVisible(false);
102
- }, 500);
103
+ document.addEventListener("keydown", handleGlobalKeyDown);
104
+ return () => {
105
+ document.removeEventListener("keydown", handleGlobalKeyDown);
106
+ };
107
+ }, []);
103
108
 
104
- setMoreMenuTimeout(timeout);
109
+ // More menu open/close.
110
+ const openMoreMenu: () => void = (): void => {
111
+ setIsMoreMenuVisible(true);
105
112
  };
106
113
 
107
- const forceHideMoreMenu: () => void = (): void => {
108
- if (moreMenuTimeout) {
109
- clearTimeout(moreMenuTimeout);
110
- setMoreMenuTimeout(null);
111
- }
112
-
114
+ const closeMoreMenu: () => void = (): void => {
113
115
  setIsMoreMenuVisible(false);
114
- suppressShowRef.current = true;
115
- setTimeout(() => {
116
- suppressShowRef.current = false;
117
- }, 300);
118
- };
119
-
120
- const showMoreMenu: () => void = (): void => {
121
- if (suppressShowRef.current) {
122
- return;
123
- }
124
- if (moreMenuTimeout) {
125
- clearTimeout(moreMenuTimeout);
126
- }
127
- setIsMoreMenuVisible(true);
128
116
  };
129
117
 
130
118
  // Legacy support: if children are provided, render the old way
@@ -270,37 +258,6 @@ const Navbar: FunctionComponent<ComponentProps> = (
270
258
  },
271
259
  );
272
260
 
273
- // Group items by category for the menu
274
- const categories: Map<string, MoreMenuItem[]> = new Map();
275
- props.moreMenuItems?.forEach((item: MoreMenuItem) => {
276
- const cat: string = item.category || "Other";
277
- if (!categories.has(cat)) {
278
- categories.set(cat, []);
279
- }
280
- categories.get(cat)!.push(item);
281
- });
282
-
283
- // Convert to sections array for NavBarMenu
284
- const sections: Array<{ title: string; items: Array<ReactElement> }> = [];
285
- categories.forEach((items: MoreMenuItem[], category: string) => {
286
- sections.push({
287
- title: category,
288
- items: items.map((item: MoreMenuItem) => {
289
- return (
290
- <NavBarMenuItem
291
- key={item.title}
292
- title={item.title}
293
- description={item.description}
294
- route={item.route}
295
- icon={item.icon}
296
- iconColor={item.iconColor}
297
- onClick={forceHideMoreMenu}
298
- />
299
- );
300
- }),
301
- });
302
- });
303
-
304
261
  /*
305
262
  * Find Home item from navItems. Match by id so this keeps working when the
306
263
  * title is translated to a non-English language.
@@ -336,34 +293,23 @@ const Navbar: FunctionComponent<ComponentProps> = (
336
293
  {activeMoreItem && (
337
294
  <>
338
295
  <span className="text-gray-400 mx-1">/</span>
339
- <div
340
- onMouseOver={showMoreMenu}
341
- onMouseLeave={hideMoreMenu}
342
- className="relative"
296
+ <button
297
+ onClick={openMoreMenu}
298
+ className="group bg-gray-100 text-gray-900 hover:bg-gray-200 rounded-md py-2 px-3 inline-flex items-center text-sm font-medium transition-colors cursor-pointer"
343
299
  >
344
- <button
345
- onClick={showMoreMenu}
346
- onMouseOver={showMoreMenu}
347
- className="bg-gray-100 text-gray-900 hover:bg-gray-200 rounded-md py-2 px-3 inline-flex items-center text-sm font-medium transition-colors cursor-pointer"
348
- >
349
- <Icon
350
- icon={activeMoreItem.icon}
351
- className="mr-1.5 h-4 w-4"
352
- thick={ThickProp.Thick}
353
- />
354
- <span>{activeMoreItem.title}</span>
355
- <Icon
356
- icon={IconProp.ChevronDown}
357
- className="ml-1.5 h-3 w-3 text-gray-500"
358
- />
359
- </button>
360
- {isMoreMenuVisible && (
361
- <NavBarMenu
362
- sections={sections}
363
- footer={props.moreMenuFooter}
364
- />
365
- )}
366
- </div>
300
+ <Icon
301
+ icon={activeMoreItem.icon}
302
+ className="mr-1.5 h-4 w-4 transition-transform duration-150 group-hover:scale-110"
303
+ thick={ThickProp.Thick}
304
+ />
305
+ <span>{activeMoreItem.title}</span>
306
+ <Icon
307
+ icon={IconProp.ChevronDown}
308
+ className={`ml-1.5 h-3 w-3 text-gray-500 transition-transform duration-200 ${
309
+ isMoreMenuVisible ? "rotate-180" : ""
310
+ }`}
311
+ />
312
+ </button>
367
313
  </>
368
314
  )}
369
315
 
@@ -373,34 +319,23 @@ const Navbar: FunctionComponent<ComponentProps> = (
373
319
  props.moreMenuItems.length > 0 && (
374
320
  <>
375
321
  <span className="text-gray-400 mx-1">/</span>
376
- <div
377
- onMouseOver={showMoreMenu}
378
- onMouseLeave={hideMoreMenu}
379
- className="relative"
322
+ <button
323
+ onClick={openMoreMenu}
324
+ className="group text-gray-500 hover:bg-gray-50 hover:text-gray-900 rounded-md py-2 px-3 inline-flex items-center text-sm font-medium transition-colors cursor-pointer"
380
325
  >
381
- <button
382
- onClick={showMoreMenu}
383
- onMouseOver={showMoreMenu}
384
- className="text-gray-500 hover:bg-gray-50 hover:text-gray-900 rounded-md py-2 px-3 inline-flex items-center text-sm font-medium transition-colors cursor-pointer"
385
- >
386
- <Icon
387
- icon={IconProp.Squares}
388
- className="mr-1.5 h-4 w-4"
389
- thick={ThickProp.Thick}
390
- />
391
- <span>{props.moreMenuTitle || "Products"}</span>
392
- <Icon
393
- icon={IconProp.ChevronDown}
394
- className="ml-1.5 h-3 w-3 text-gray-400"
395
- />
396
- </button>
397
- {isMoreMenuVisible && (
398
- <NavBarMenu
399
- sections={sections}
400
- footer={props.moreMenuFooter}
401
- />
402
- )}
403
- </div>
326
+ <Icon
327
+ icon={IconProp.Squares}
328
+ className="mr-1.5 h-4 w-4 transition-transform duration-150 group-hover:scale-110 group-hover:text-indigo-600"
329
+ thick={ThickProp.Thick}
330
+ />
331
+ <span>{props.moreMenuTitle || "Products"}</span>
332
+ <Icon
333
+ icon={IconProp.ChevronDown}
334
+ className={`ml-1.5 h-3 w-3 text-gray-400 transition-transform duration-200 ${
335
+ isMoreMenuVisible ? "rotate-180" : ""
336
+ }`}
337
+ />
338
+ </button>
404
339
  </>
405
340
  )}
406
341
  </div>
@@ -432,6 +367,20 @@ const Navbar: FunctionComponent<ComponentProps> = (
432
367
  />
433
368
  </div>
434
369
  )}
370
+
371
+ {isMoreMenuVisible &&
372
+ props.moreMenuItems &&
373
+ props.moreMenuItems.length > 0 && (
374
+ <NavBarMenuModal
375
+ items={props.moreMenuItems}
376
+ footer={props.moreMenuFooter}
377
+ searchPlaceholder={props.moreMenuSearchPlaceholder}
378
+ noResultsText={props.moreMenuNoResultsText}
379
+ keyboardHint={props.moreMenuKeyboardHint}
380
+ recentLabel={props.moreMenuRecentLabel}
381
+ onClose={closeMoreMenu}
382
+ />
383
+ )}
435
384
  </nav>
436
385
  );
437
386
  };