@odigos/ui-kit 0.0.23 → 0.0.25

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 (328) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +3 -2
  3. package/lib/components/auto-complete-input/auto-complete-input.stories.d.ts +9 -0
  4. package/lib/components/auto-complete-input/index.d.ts +2 -0
  5. package/lib/components/badge/badge.stories.d.ts +13 -0
  6. package/lib/components/button/button.stories.d.ts +9 -0
  7. package/lib/components/cancel-warning/cancel-warning.stories.d.ts +9 -0
  8. package/lib/components/checkbox/checkbox.stories.d.ts +9 -0
  9. package/lib/components/code/code.stories.d.ts +9 -0
  10. package/lib/components/condition-details/condition-details.stories.d.ts +14 -0
  11. package/lib/components/data-card/data-card-fields/index.d.ts +8 -7
  12. package/lib/components/data-card/data-card.stories.d.ts +11 -0
  13. package/lib/components/data-card/index.d.ts +3 -3
  14. package/lib/components/data-tab/data-tab.stories.d.ts +15 -0
  15. package/lib/components/delete-warning/delete-warning.stories.d.ts +9 -0
  16. package/lib/components/describe-row/describe-row.stories.d.ts +9 -0
  17. package/lib/components/divider/divider.stories.d.ts +9 -0
  18. package/lib/components/docs-button/docs-button.stories.d.ts +9 -0
  19. package/lib/components/drawer/drawer.stories.d.ts +10 -0
  20. package/lib/components/dropdown/dropdown.stories.d.ts +10 -0
  21. package/lib/components/error-boundary/error-boundary.stories.d.ts +9 -0
  22. package/lib/components/extend-arrow/extend-arrow.stories.d.ts +9 -0
  23. package/lib/components/fade-loader/fade-loader.stories.d.ts +9 -0
  24. package/lib/components/field-error/field-error.stories.d.ts +9 -0
  25. package/lib/components/field-label/field-label.stories.d.ts +9 -0
  26. package/lib/components/header/header.stories.d.ts +9 -0
  27. package/lib/components/icon-button/icon-button.stories.d.ts +9 -0
  28. package/lib/components/icon-group/icon-group.stories.d.ts +16 -0
  29. package/lib/components/icon-title-badge/icon-title-badge.stories.d.ts +9 -0
  30. package/lib/components/icon-wrapped/icon-wrapped.stories.d.ts +10 -0
  31. package/lib/components/icons-nav/icons-nav.stories.d.ts +9 -0
  32. package/lib/components/image-controlled/image-controlled.stories.d.ts +9 -0
  33. package/lib/components/index.d.ts +1 -0
  34. package/lib/components/input/input.stories.d.ts +9 -0
  35. package/lib/components/input-list/input-list.stories.d.ts +9 -0
  36. package/lib/components/input-table/input-table.stories.d.ts +9 -0
  37. package/lib/components/interactive-table/interactive-table.stories.d.ts +12 -0
  38. package/lib/components/key-value-input-list/key-value-input-list.stories.d.ts +9 -0
  39. package/lib/components/modal/modal.stories.d.ts +9 -0
  40. package/lib/components/monitors-checkboxes/monitors-checkboxes.stories.d.ts +9 -0
  41. package/lib/components/monitors-icons/monitors-icons.stories.d.ts +9 -0
  42. package/lib/components/navigation-buttons/navigation-buttons.stories.d.ts +9 -0
  43. package/lib/components/no-data-found/no-data-found.stories.d.ts +9 -0
  44. package/lib/components/notification-note/index.d.ts +2 -1
  45. package/lib/components/notification-note/notification-note.stories.d.ts +10 -0
  46. package/lib/components/scroll-x/scroll-x.stories.d.ts +10 -0
  47. package/lib/components/section-title/section-title.stories.d.ts +9 -0
  48. package/lib/components/segment/segment.stories.d.ts +9 -0
  49. package/lib/{containers/data-flow-actions-menu → components}/selection-button/index.d.ts +3 -3
  50. package/lib/components/selection-button/selection-button.stories.d.ts +9 -0
  51. package/lib/components/skeleton-loader/skeleton-loader.stories.d.ts +9 -0
  52. package/lib/components/status/status.stories.d.ts +9 -0
  53. package/lib/components/stepper/stepper.stories.d.ts +9 -0
  54. package/lib/components/styled.d.ts +2 -0
  55. package/lib/components/text/text.stories.d.ts +9 -0
  56. package/lib/components/textarea/textarea.stories.d.ts +9 -0
  57. package/lib/components/toggle/toggle.stories.d.ts +9 -0
  58. package/lib/components/tooltip/tooltip.stories.d.ts +11 -0
  59. package/lib/components/trace-loader/trace-loader.stories.d.ts +9 -0
  60. package/lib/components/warning-modal/warning-modal.stories.d.ts +9 -0
  61. package/lib/components.js +12 -11
  62. package/lib/constants/destinations/index.d.ts +18 -0
  63. package/lib/constants/index.d.ts +1 -0
  64. package/lib/constants/strings/index.d.ts +56 -10
  65. package/lib/constants.js +4 -4
  66. package/lib/containers/action-drawer/action-drawer.stories.d.ts +9 -0
  67. package/lib/containers/action-drawer/build-card.d.ts +1 -7
  68. package/lib/containers/action-form/action-form.stories.d.ts +9 -0
  69. package/lib/containers/action-modal/action-modal.stories.d.ts +9 -0
  70. package/lib/containers/action-table/action-table.stories.d.ts +9 -0
  71. package/lib/containers/await-pipeline/await-pipeline.stories.d.ts +9 -0
  72. package/lib/containers/compute-platform-select/compute-platform-select.stories.d.ts +9 -0
  73. package/lib/containers/compute-platforms/compute-platforms.stories.d.ts +9 -0
  74. package/lib/containers/compute-platforms-actions-menu/compute-platforms-actions-menu.stories.d.ts +9 -0
  75. package/lib/containers/data-flow/data-flow.stories.d.ts +9 -0
  76. package/lib/containers/data-flow-actions-menu/data-flow-actions-menu.stories.d.ts +11 -0
  77. package/lib/containers/data-flow-actions-menu/data-stream-select/index.d.ts +6 -0
  78. package/lib/containers/data-flow-actions-menu/index.d.ts +2 -1
  79. package/lib/containers/data-stream-selection-form/data-stream-selection-form.stories.d.ts +9 -0
  80. package/lib/containers/data-stream-selection-form/index.d.ts +12 -0
  81. package/lib/containers/destination-drawer/build-card.d.ts +1 -7
  82. package/lib/containers/destination-drawer/destination-drawer.stories.d.ts +9 -0
  83. package/lib/containers/destination-drawer/index.d.ts +2 -5
  84. package/lib/containers/destination-form/destination-form.stories.d.ts +9 -0
  85. package/lib/containers/destination-form/index.d.ts +2 -5
  86. package/lib/containers/destination-form/test-connection/index.d.ts +4 -8
  87. package/lib/containers/destination-modal/choose-destination/destinations-list/index.d.ts +2 -1
  88. package/lib/containers/destination-modal/choose-destination/index.d.ts +3 -3
  89. package/lib/containers/destination-modal/destination-modal.stories.d.ts +9 -0
  90. package/lib/containers/destination-modal/index.d.ts +3 -5
  91. package/lib/containers/destination-selection-form/destination-list/index.d.ts +6 -0
  92. package/lib/containers/destination-selection-form/destination-selection-form.stories.d.ts +9 -0
  93. package/lib/containers/destination-selection-form/index.d.ts +6 -9
  94. package/lib/containers/destination-table/destination-table.stories.d.ts +9 -0
  95. package/lib/containers/dropdowns/connection-status-dropdown/connection-status-dropdown.stories.d.ts +9 -0
  96. package/lib/containers/dropdowns/connection-type-dropdown/connection-type-dropdown.stories.d.ts +9 -0
  97. package/lib/containers/dropdowns/error-dropdown/error-dropdown.stories.d.ts +9 -0
  98. package/lib/containers/dropdowns/error-dropdown/index.d.ts +2 -0
  99. package/lib/containers/dropdowns/kind-dropdown/error-dropdown.stories.d.ts +9 -0
  100. package/lib/containers/dropdowns/kind-dropdown/index.d.ts +2 -0
  101. package/lib/containers/dropdowns/language-dropdown/index.d.ts +2 -0
  102. package/lib/containers/dropdowns/language-dropdown/language-dropdown.stories.d.ts +9 -0
  103. package/lib/containers/dropdowns/monitor-dropdown/monitor-dropdown.stories.d.ts +9 -0
  104. package/lib/containers/dropdowns/namespace-dropdown/index.d.ts +2 -0
  105. package/lib/containers/dropdowns/namespace-dropdown/namespace-dropdown.stories.d.ts +9 -0
  106. package/lib/containers/index.d.ts +3 -0
  107. package/lib/containers/instrumentation-rule-drawer/build-card.d.ts +1 -7
  108. package/lib/containers/instrumentation-rule-drawer/instrumentation-rule-drawer.stories.d.ts +9 -0
  109. package/lib/containers/instrumentation-rule-form/instrumentation-rule-form.stories.d.ts +9 -0
  110. package/lib/containers/instrumentation-rule-modal/instrumentation-rule-modal.stories.d.ts +9 -0
  111. package/lib/containers/instrumentation-rule-table/instrumentation-rule-table.stories.d.ts +9 -0
  112. package/lib/containers/multi-source-control/multi-source-control.stories.d.ts +9 -0
  113. package/lib/containers/notification-manager/notification-manager.stories.d.ts +9 -0
  114. package/lib/containers/overview-drawer/overview-drawer.stories.d.ts +9 -0
  115. package/lib/containers/setup-summary/index.d.ts +7 -0
  116. package/lib/containers/setup-summary/setup-summary.stories.d.ts +9 -0
  117. package/lib/containers/side-nav/side-nav.stories.d.ts +9 -0
  118. package/lib/containers/slack-invite/slack-invite.stories.d.ts +9 -0
  119. package/lib/containers/source-drawer/build-card.d.ts +1 -6
  120. package/lib/containers/source-drawer/source-drawer.stories.d.ts +9 -0
  121. package/lib/containers/source-form/source-form.stories.d.ts +9 -0
  122. package/lib/containers/source-modal/index.d.ts +3 -5
  123. package/lib/containers/source-modal/source-modal.stories.d.ts +9 -0
  124. package/lib/containers/source-selection-form/index.d.ts +4 -5
  125. package/lib/containers/source-selection-form/source-list/index.d.ts +8 -0
  126. package/lib/containers/source-selection-form/source-selection-form.stories.d.ts +9 -0
  127. package/lib/containers/source-table/source-table.stories.d.ts +9 -0
  128. package/lib/containers/system-overview/system-overview.stories.d.ts +9 -0
  129. package/lib/containers/table-cell-conditions/table-cell-conditions.stories.d.ts +9 -0
  130. package/lib/containers/toast-list/toast-list.stories.d.ts +9 -0
  131. package/lib/containers/toggle-dark-mode/toggle-dark-mode.stories.d.ts +9 -0
  132. package/lib/containers.js +598 -476
  133. package/lib/functions/filter-destinations-by-stream/index.d.ts +2 -0
  134. package/lib/functions/filter-sources-by-stream/index.d.ts +2 -0
  135. package/lib/functions/index.d.ts +3 -0
  136. package/lib/functions/map-exported-signals/index.d.ts +2 -0
  137. package/lib/functions.js +7 -11
  138. package/lib/hooks/useSourceFormData.d.ts +1 -1
  139. package/lib/hooks/useSourceSelectionFormData.d.ts +9 -17
  140. package/lib/hooks.js +5 -6
  141. package/lib/icons/actions/add-cluster-info-icon/add-cluster-info-icon.stories.d.ts +8 -0
  142. package/lib/icons/actions/delete-attribute-icon/delete-attribute-icon.stories.d.ts +8 -0
  143. package/lib/icons/actions/pii-masking-icon/pii-masking-icon.stories.d.ts +8 -0
  144. package/lib/icons/actions/rename-attribute-icon/rename-attribute-icon.stories.d.ts +8 -0
  145. package/lib/icons/actions/sampler-icon/sampler-icon.stories.d.ts +8 -0
  146. package/lib/icons/brand/odigos-logo/odigos-logo.stories.d.ts +8 -0
  147. package/lib/icons/brand/odigos-logo-text/odigos-logo-text.stories.d.ts +8 -0
  148. package/lib/icons/common/arrow-icon/arrow-icon.stories.d.ts +8 -0
  149. package/lib/icons/common/code-brackets-icon/code-brackets-icon.stories.d.ts +8 -0
  150. package/lib/icons/common/code-icon/code-icon.stories.d.ts +8 -0
  151. package/lib/icons/common/command-icon/command-icon.stories.d.ts +8 -0
  152. package/lib/icons/common/copy-icon/copy-icon.stories.d.ts +8 -0
  153. package/lib/icons/common/edit-icon/edit-icon.stories.d.ts +8 -0
  154. package/lib/icons/common/extend-arrow-icon/extend-arrow-icon.stories.d.ts +8 -0
  155. package/lib/icons/common/filter-icon/filter-icon.stories.d.ts +8 -0
  156. package/lib/icons/common/folder-icon/folder-icon.stories.d.ts +8 -0
  157. package/lib/icons/common/image-error-icon/image-error-icon.stories.d.ts +8 -0
  158. package/lib/icons/common/key-icon/key-icon.stories.d.ts +8 -0
  159. package/lib/icons/common/list-icon/list-icon.stories.d.ts +8 -0
  160. package/lib/icons/common/no-data-icon/no-data-icon.stories.d.ts +8 -0
  161. package/lib/icons/common/notebook-icon/notebook-icon.stories.d.ts +8 -0
  162. package/lib/icons/common/notification-icon/notification-icon.stories.d.ts +8 -0
  163. package/lib/icons/common/search-icon/search-icon.stories.d.ts +8 -0
  164. package/lib/icons/common/sort-arrows-icon/sort-arrows-icon.stories.d.ts +8 -0
  165. package/lib/icons/common/terminal-icon/terminal-icon.stories.d.ts +8 -0
  166. package/lib/icons/common/trash-icon/trash-icon.stories.d.ts +8 -0
  167. package/lib/icons/common/x-icon/x-icon.stories.d.ts +8 -0
  168. package/lib/icons/compute-platform/k8s-logo/k8s-logo.stories.d.ts +8 -0
  169. package/lib/icons/compute-platform/vm-logo/vm-logo.stories.d.ts +8 -0
  170. package/lib/icons/destinations/alauda-logo/alauda-logo.stories.d.ts +8 -0
  171. package/lib/icons/destinations/alibaba-cloud-logo/alibaba-cloud-logo.stories.d.ts +8 -0
  172. package/lib/icons/destinations/app-dynamics-logo/app-dynamics-logo.stories.d.ts +8 -0
  173. package/lib/icons/destinations/aws-cloudwatch-logo/aws-cloudwatch-logo.stories.d.ts +8 -0
  174. package/lib/icons/destinations/aws-s3-logo/aws-s3-logo.stories.d.ts +8 -0
  175. package/lib/icons/destinations/aws-xray-logo/aws-xray-logo.stories.d.ts +8 -0
  176. package/lib/icons/destinations/axiom-logo/axiom-logo.stories.d.ts +8 -0
  177. package/lib/icons/destinations/better-stack-logo/better-stack-logo.stories.d.ts +8 -0
  178. package/lib/icons/destinations/blob-storage-logo/blob-storage-logo.stories.d.ts +8 -0
  179. package/lib/icons/destinations/bonree-logo/bonree-logo.stories.d.ts +8 -0
  180. package/lib/icons/destinations/causely-logo/causely-logo.stories.d.ts +8 -0
  181. package/lib/icons/destinations/checkly-logo/checkly-logo.stories.d.ts +8 -0
  182. package/lib/icons/destinations/chronosphere-logo/chronosphere-logo.stories.d.ts +8 -0
  183. package/lib/icons/destinations/clickhouse-logo/clickhouse-logo.stories.d.ts +8 -0
  184. package/lib/icons/destinations/coralogix-logo/coralogix-logo.stories.d.ts +8 -0
  185. package/lib/icons/destinations/dash0-logo/dash0-logo.stories.d.ts +8 -0
  186. package/lib/icons/destinations/datadog-logo/datadog-logo.stories.d.ts +8 -0
  187. package/lib/icons/destinations/dynatrace-logo/dynatrace-logo.stories.d.ts +8 -0
  188. package/lib/icons/destinations/elastic-apm-logo/elastic-apm-logo.stories.d.ts +8 -0
  189. package/lib/icons/destinations/elastic-search-logo/elastic-search-logo.stories.d.ts +8 -0
  190. package/lib/icons/destinations/gigapipe-logo/gigapipe-logo.stories.d.ts +8 -0
  191. package/lib/icons/destinations/google-cloud-platform-logo/google-cloud-platform-logo.stories.d.ts +8 -0
  192. package/lib/icons/destinations/google-cloud-storage-logo/google-cloud-storage-logo.stories.d.ts +8 -0
  193. package/lib/icons/destinations/grafana-logo/grafana-logo.stories.d.ts +8 -0
  194. package/lib/icons/destinations/greptime-logo/greptime-logo.stories.d.ts +8 -0
  195. package/lib/icons/destinations/groundcover-logo/groundcover-logo.stories.d.ts +8 -0
  196. package/lib/icons/destinations/honeycomb-logo/honeycomb-logo.stories.d.ts +8 -0
  197. package/lib/icons/destinations/hyperdx-logo/hyperdx-logo.stories.d.ts +8 -0
  198. package/lib/icons/destinations/index.d.ts +1 -0
  199. package/lib/icons/destinations/instana-logo/instana-logo.stories.d.ts +8 -0
  200. package/lib/icons/destinations/jaeger-logo/jaeger-logo.stories.d.ts +8 -0
  201. package/lib/icons/destinations/kafka-logo/kafka-logo.stories.d.ts +8 -0
  202. package/lib/icons/destinations/kloudmate-logo/kloudmate-logo.stories.d.ts +8 -0
  203. package/lib/icons/destinations/last9-logo/last9-logo.stories.d.ts +8 -0
  204. package/lib/icons/destinations/lightstep-logo/lightstep-logo.stories.d.ts +8 -0
  205. package/lib/icons/destinations/logzio-logo/logzio-logo.stories.d.ts +8 -0
  206. package/lib/icons/destinations/loki-logo/loki-logo.stories.d.ts +8 -0
  207. package/lib/icons/destinations/lumigo-logo/lumigo-logo.stories.d.ts +8 -0
  208. package/lib/icons/destinations/middleware-logo/middleware-logo.stories.d.ts +8 -0
  209. package/lib/icons/destinations/new-relic-logo/new-relic-logo.stories.d.ts +8 -0
  210. package/lib/icons/destinations/observe-logo/observe-logo.stories.d.ts +8 -0
  211. package/lib/icons/destinations/one-uptime-logo/one-uptime-logo.stories.d.ts +8 -0
  212. package/lib/icons/destinations/open-observe-logo/open-observe-logo.stories.d.ts +8 -0
  213. package/lib/icons/destinations/open-telemetry-logo/open-telemetry-logo.stories.d.ts +8 -0
  214. package/lib/icons/destinations/ops-verse-logo/ops-verse-logo.stories.d.ts +8 -0
  215. package/lib/icons/destinations/oracle-logo/oracle-logo.stories.d.ts +8 -0
  216. package/lib/icons/destinations/prometheus-logo/prometheus-logo.stories.d.ts +8 -0
  217. package/lib/icons/destinations/qryn-logo/qryn-logo.stories.d.ts +8 -0
  218. package/lib/icons/destinations/quickwit-logo/quickwit-logo.stories.d.ts +8 -0
  219. package/lib/icons/destinations/sentry-logo/sentry-logo.stories.d.ts +8 -0
  220. package/lib/icons/destinations/seq-logo/seq-logo.stories.d.ts +8 -0
  221. package/lib/icons/destinations/signoz-logo/signoz-logo.stories.d.ts +8 -0
  222. package/lib/icons/destinations/splunk-logo/splunk-logo.stories.d.ts +8 -0
  223. package/lib/icons/destinations/sumo-logic-logo/sumo-logic-logo.stories.d.ts +8 -0
  224. package/lib/icons/destinations/telemetry-hub-logo/telemetry-hub-logo.stories.d.ts +8 -0
  225. package/lib/icons/destinations/tempo-logo/tempo-logo.stories.d.ts +8 -0
  226. package/lib/icons/destinations/tingyun-logo/tingyun-logo.stories.d.ts +8 -0
  227. package/lib/icons/destinations/traceloop-logo/traceloop-logo.stories.d.ts +8 -0
  228. package/lib/icons/destinations/uptrace-logo/uptrace-logo.stories.d.ts +8 -0
  229. package/lib/icons/destinations/victoria-metrics-logo/index.d.ts +2 -0
  230. package/lib/icons/destinations/victoria-metrics-logo/victoria-metrics-logo.stories.d.ts +8 -0
  231. package/lib/icons/instrumentation-rules/code-attributes-icon/code-attributes-icon.stories.d.ts +8 -0
  232. package/lib/icons/instrumentation-rules/payload-collection-icon/payload-collection-icon.stories.d.ts +8 -0
  233. package/lib/icons/math/minus-icon/minus-icon.stories.d.ts +8 -0
  234. package/lib/icons/math/plus-icon/plus-icon.stories.d.ts +8 -0
  235. package/lib/icons/monitors/logs-icon/logs-icon.stories.d.ts +8 -0
  236. package/lib/icons/monitors/metrics-icon/metrics-icon.stories.d.ts +8 -0
  237. package/lib/icons/monitors/traces-icon/traces-icon.stories.d.ts +8 -0
  238. package/lib/icons/on-off/eye-closed-icon/eye-closed-icon.stories.d.ts +8 -0
  239. package/lib/icons/on-off/eye-open-icon/eye-open-icon.stories.d.ts +8 -0
  240. package/lib/icons/on-off/light-off-icon/light-off-icon.stories.d.ts +8 -0
  241. package/lib/icons/on-off/light-on-icon/light-on-icon.stories.d.ts +8 -0
  242. package/lib/icons/on-off/moon-icon/moon-icon.stories.d.ts +8 -0
  243. package/lib/icons/on-off/sun-icon/sun-icon.stories.d.ts +8 -0
  244. package/lib/icons/overview/actions-icon/actions-icon.stories.d.ts +8 -0
  245. package/lib/icons/overview/connections-icon/connections-icon.stories.d.ts +8 -0
  246. package/lib/icons/overview/data-streams-icon/data-streams-icon.stories.d.ts +8 -0
  247. package/lib/icons/overview/data-streams-icon/index.d.ts +2 -0
  248. package/lib/icons/overview/destinations-icon/destinations-icon.stories.d.ts +8 -0
  249. package/lib/icons/overview/index.d.ts +1 -0
  250. package/lib/icons/overview/namespaces-icon/namespaces-icon.stories.d.ts +8 -0
  251. package/lib/icons/overview/overview-icon/overview-icon.stories.d.ts +8 -0
  252. package/lib/icons/overview/rules-icon/rules-icon.stories.d.ts +8 -0
  253. package/lib/icons/overview/service-map-icon/service-map-icon.stories.d.ts +8 -0
  254. package/lib/icons/overview/sources-icon/sources-icon.stories.d.ts +8 -0
  255. package/lib/icons/overview/trace-view-icon/trace-view-icon.stories.d.ts +8 -0
  256. package/lib/icons/programming-languages/c-plus-plus-logo/c-plus-plus-logo.stories.d.ts +8 -0
  257. package/lib/icons/programming-languages/c-sharp-logo/c-sharp-logo.stories.d.ts +8 -0
  258. package/lib/icons/programming-languages/dotnet-logo/dotnet-logo.stories.d.ts +8 -0
  259. package/lib/icons/programming-languages/elixir-logo/elixir-logo.stories.d.ts +8 -0
  260. package/lib/icons/programming-languages/go-logo/go-logo.stories.d.ts +8 -0
  261. package/lib/icons/programming-languages/java-logo/java-logo.stories.d.ts +8 -0
  262. package/lib/icons/programming-languages/mysql-logo/mysql-logo.stories.d.ts +8 -0
  263. package/lib/icons/programming-languages/nginx-logo/nginx-logo.stories.d.ts +8 -0
  264. package/lib/icons/programming-languages/nodejs-logo/nodejs-logo.stories.d.ts +8 -0
  265. package/lib/icons/programming-languages/php-logo/php-logo.stories.d.ts +8 -0
  266. package/lib/icons/programming-languages/postgres-logo/postgres-logo.stories.d.ts +8 -0
  267. package/lib/icons/programming-languages/python-logo/python-logo.stories.d.ts +8 -0
  268. package/lib/icons/programming-languages/redis-logo/redis-logo.stories.d.ts +8 -0
  269. package/lib/icons/programming-languages/ruby-logo/ruby-logo.stories.d.ts +8 -0
  270. package/lib/icons/programming-languages/rust-logo/rust-logo.stories.d.ts +8 -0
  271. package/lib/icons/programming-languages/swift-logo/swift-logo.stories.d.ts +8 -0
  272. package/lib/icons/social/slack-logo/slack-logo.stories.d.ts +8 -0
  273. package/lib/icons/status/check-circled-icon/check-circled-icon.stories.d.ts +8 -0
  274. package/lib/icons/status/check-icon/check-icon.stories.d.ts +8 -0
  275. package/lib/icons/status/cross-circled-icon/cross-circled-icon.stories.d.ts +8 -0
  276. package/lib/icons/status/cross-icon/cross-icon.stories.d.ts +8 -0
  277. package/lib/icons/status/error-round-icon/error-round-icon.stories.d.ts +8 -0
  278. package/lib/icons/status/error-triangle-icon/error-triangle-icon.stories.d.ts +8 -0
  279. package/lib/icons/status/info-icon/info-icon.stories.d.ts +8 -0
  280. package/lib/icons/status/warning-triangle-icon/warning-triangle-icon.stories.d.ts +8 -0
  281. package/lib/icons.js +5 -4
  282. package/lib/{index-C48Fe7Pl.js → index-BOkleuyi.js} +32 -5
  283. package/lib/{index-CksKgOxY.js → index-BRW_Nl-n.js} +7 -1
  284. package/lib/{index-C7Y1tYdc.js → index-C0N2DFBu.js} +1 -1
  285. package/lib/{index-BfUUVS8N.js → index-C2m4uddS.js} +2 -2
  286. package/lib/{index-DiTtXTRm.js → index-CK8tITRA.js} +25 -2
  287. package/lib/index-CTdoDQzG.js +36 -0
  288. package/lib/index-CWbxXTof.js +11 -0
  289. package/lib/{index-BKyIuPoq.js → index-CYUrArTm.js} +125 -164
  290. package/lib/{index-KOMAv-TS.js → index-CamnKrev.js} +8 -8
  291. package/lib/index-DE7A6Q_i.js +25 -0
  292. package/lib/index-Dqief9td.js +20 -0
  293. package/lib/{index-D3sp5Hx7.js → index-HOKGoci6.js} +93 -3
  294. package/lib/{index-BsH_egEe.js → index-IKusBlIE.js} +55 -17
  295. package/lib/{data → mock-data}/sources/index.d.ts +1 -0
  296. package/lib/snippets/add-button/index.d.ts +7 -0
  297. package/lib/snippets/edit-button/index.d.ts +7 -0
  298. package/lib/snippets/index.d.ts +3 -0
  299. package/lib/snippets/note-back-to-summary/index.d.ts +6 -0
  300. package/lib/snippets/note-back-to-summary/note-back-to-summary.stories.d.ts +9 -0
  301. package/lib/snippets.js +17 -0
  302. package/lib/store/index.d.ts +1 -0
  303. package/lib/store/useDataStreamStore.d.ts +16 -0
  304. package/lib/store/useSetupStore.d.ts +10 -24
  305. package/lib/store.js +1 -1
  306. package/lib/theme.js +1 -1
  307. package/lib/types/actions/index.d.ts +2 -0
  308. package/lib/types/data-streams/index.d.ts +3 -0
  309. package/lib/types/destinations/index.d.ts +16 -2
  310. package/lib/types/index.d.ts +1 -0
  311. package/lib/types/namespaces/index.d.ts +13 -0
  312. package/lib/types/sources/index.d.ts +4 -1
  313. package/lib/types.js +2 -0
  314. package/lib/{useSourceSelectionFormData-CrKof314.js → useSourceSelectionFormData-Bxm0NBIy.js} +61 -102
  315. package/lib/{useTransition-D0ykOLrk.js → useTransition-DvT5YNul.js} +2 -2
  316. package/package.json +8 -2
  317. package/lib/containers/destination-modal/choose-destination/potential-destinations-list/index.d.ts +0 -8
  318. package/lib/containers/destination-selection-form/configured-list/index.d.ts +0 -5
  319. package/lib/containers/source-selection-form/controls/index.d.ts +0 -7
  320. package/lib/containers/source-selection-form/list/index.d.ts +0 -9
  321. package/lib/index-C_0J5P9M.js +0 -45
  322. /package/lib/{data → mock-data}/actions/index.d.ts +0 -0
  323. /package/lib/{data → mock-data}/describe/index.d.ts +0 -0
  324. /package/lib/{data → mock-data}/destinations/index.d.ts +0 -0
  325. /package/lib/{data → mock-data}/index.d.ts +0 -0
  326. /package/lib/{data → mock-data}/instrumentation-rules/index.d.ts +0 -0
  327. /package/lib/{data → mock-data}/namespaces/index.d.ts +0 -0
  328. /package/lib/{data → mock-data}/tokens/index.d.ts +0 -0
package/lib/containers.js CHANGED
@@ -1,27 +1,30 @@
1
1
  import React, { useState, useEffect, forwardRef, useRef, useImperativeHandle, useMemo, memo, useContext, createContext, useCallback, useLayoutEffect, Fragment } from 'react';
2
2
  import styled, { css } from 'styled-components';
3
- import { A as ACTION_OPTIONS, M as MONITORS_OPTIONS, I as INSTRUMENTATION_RULE_OPTIONS } from './index-D3sp5Hx7.js';
4
- import { D as DISPLAY_TITLES, F as FORM_ALERTS } from './index-C_0J5P9M.js';
3
+ import { D as DISPLAY_TITLES, A as ACTION_OPTIONS, M as MONITORS_OPTIONS, B as BUTTON_TEXTS, I as INSTRUMENTATION_RULE_OPTIONS, F as FORM_ALERTS } from './index-HOKGoci6.js';
5
4
  import { ActionType, EntityTypes, StatusType, Crud, OtherStatus, NodeTypes, AddNodeTypes, EdgeTypes, FieldTypes, SignalType, CodeAttributesKeyTypes, PayloadCollectionKeyTypes, InstrumentationRuleType } from './types.js';
6
- import { f as DataCardFieldTypes, p as FieldLabel, b as Checkbox, o as FieldError, v as Input, x as InputTable, K as KeyValueInputsList, w as InputList, V as Text, P as Segment, O as SectionTitle, j as DocsButton, z as MonitorsCheckboxes, W as TextArea, k as Drawer, h as DeleteWarning, C as CancelWarning, d as ConditionDetails, D as DataCard, M as Modal, N as NavigationButtons, a3 as ModalBody, A as AutocompleteInput, i as Divider, R as Status, $ as FlexRow, Y as Tooltip, s as IconWrapped, G as MonitorsIcons, a4 as TableContainer, a5 as TableTitleWrap, r as IconTitleBadge, a6 as TableWrap, y as InteractiveTable, a1 as CenterThis, J as NoDataFound, a0 as FlexColumn, Z as TraceLoader, a as Badge, B as Button, E as ExtendArrow, n as Dropdown, a7 as getDefaultExportFromCjs, F as FadeLoader, g as DataTab, Q as SkeletonLoader, X as Toggle, L as NotificationNote, U as Stepper, I as IconButton, e as DataCardFields, t as IconsNav, q as IconGroup } from './index-BKyIuPoq.js';
7
- import { g as usePendingStore, f as useNotificationStore, a as useDrawerStore, b as useEntityStore, e as useModalStore, c as useFilterStore, s as styleInject, h as useSelectedStore, d as useInstrumentStore, k as getEntityId, i as useSetupStore, u as useDarkMode } from './index-DiTtXTRm.js';
5
+ import { f as DataCardFieldTypes, o as FieldLabel, C as Checkbox, n as FieldError, u as Input, w as InputTable, K as KeyValueInputsList, v as InputList, V as Text, O as Segment, L as SectionTitle, i as DocsButton, y as MonitorsCheckboxes, W as TextArea, j as Drawer, d as ConditionDetails, D as DataCard, M as Modal, N as NavigationButtons, a4 as ModalBody, a as AutocompleteInput, h as Divider, R as Status, $ as FlexRow, Y as Tooltip, r as IconWrapped, z as MonitorsIcons, a5 as TableContainer, a6 as TableTitleWrap, q as IconTitleBadge, a7 as TableWrap, x as InteractiveTable, a1 as CenterThis, G as NoDataFound, a0 as FlexColumn, Z as TraceLoader, b as Badge, E as ExtendArrow, a2 as VerticalScroll, P as SelectionButton, B as Button, m as Dropdown, a8 as getDefaultExportFromCjs, F as FadeLoader, g as DataTab, Q as SkeletonLoader, X as Toggle, A as AddButton$1, J as NotificationNote, U as Stepper, I as IconButton, e as DataCardFields, s as IconsNav, p as IconGroup } from './index-CYUrArTm.js';
6
+ import { h as usePendingStore, g as useNotificationStore, b as useDrawerStore, c as useEntityStore, f as useModalStore, d as useFilterStore, s as styleInject, i as useSelectedStore, e as useInstrumentStore, a as useDataStreamStore, k as getEntityId, j as useSetupStore, u as useDarkMode } from './index-CK8tITRA.js';
8
7
  import Theme from './theme.js';
9
8
  import { i as isEmpty, s as safeJsonParse } from './index-BZS1ijMm.js';
10
- import { i as CheckCircledIcon, O as OdigosLogo } from './index-BsH_egEe.js';
11
- import { C as CrossCircledIcon, E as EditIcon, O as OdigosLogoText, a as OverviewIcon, F as FilterIcon, N as NotificationIcon, S as SlackLogo, K as KeyIcon, T as TerminalIcon } from './index-KOMAv-TS.js';
12
- import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-C7Y1tYdc.js';
13
- import { u as useActionFormData, a as useClickNode, c as useDestinationFormData, b as useClickNotification, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-CrKof314.js';
14
- import { d as useKeyDown, e as useOnClickOutside, u as useContainerSize, c as useInstrumentationRuleFormData, g as useTransition, f as useTimeAgo, a as useCopy } from './useTransition-D0ykOLrk.js';
15
- import { T as TrashIcon, S as SearchIcon, P as PlusIcon$1, A as ArrowIcon, a as CopyIcon, f as CheckIcon, g as CrossIcon } from './index-BJxaoI0G.js';
16
- import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-BfUUVS8N.js';
17
- import { f as filterActions, g as getConditionsBooleans, k as getEntityLabel, j as getEntityIcon, s as sleep$1, m as getPlatformIcon, n as getPlatformLabel, d as formatBytes, h as getContainersIcons, o as getValueForRange, i as getDestinationIcon, b as filterSources, a as filterDestinations, c as compareCondition, l as getMetricForEntity, p as getWorkloadId, e as getContainersInstrumentedCount, q as isOverTime } from './index-C48Fe7Pl.js';
9
+ import { i as CheckCircledIcon, O as OdigosLogo } from './index-IKusBlIE.js';
10
+ import { C as CrossCircledIcon, O as OdigosLogoText, a as OverviewIcon, F as FilterIcon, D as DataStreamsIcon, N as NotificationIcon, S as SlackLogo, K as KeyIcon, T as TerminalIcon } from './index-CamnKrev.js';
11
+ import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-C0N2DFBu.js';
12
+ import { u as useActionFormData, a as useClickNode, c as useDestinationFormData, b as useClickNotification, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-Bxm0NBIy.js';
13
+ import { d as useKeyDown, e as useOnClickOutside, u as useContainerSize, c as useInstrumentationRuleFormData, g as useTransition, f as useTimeAgo, a as useCopy } from './useTransition-DvT5YNul.js';
14
+ import { E as EditIcon } from './index-CWbxXTof.js';
15
+ import { T as TrashIcon, S as SearchIcon, P as PlusIcon$1, f as CheckIcon, A as ArrowIcon, a as CopyIcon, g as CrossIcon } from './index-BJxaoI0G.js';
16
+ import { D as DeleteWarning, C as CancelWarning } from './index-CTdoDQzG.js';
17
+ import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-C2m4uddS.js';
18
+ import { f as filterActions, i as getConditionsBooleans, n as getEntityLabel, m as getEntityIcon, v as sleep$1, p as getPlatformIcon, q as getPlatformLabel, h as formatBytes, k as getContainersIcons, r as getValueForRange, l as getDestinationIcon, u as mapExportedSignals, g as filterSourcesByStream, e as filterSources, b as filterDestinationsByStream, a as filterDestinations, c as compareCondition, d as deepClone, o as getMetricForEntity, s as getWorkloadId, j as getContainersInstrumentedCount, t as isOverTime } from './index-BOkleuyi.js';
18
19
  import { createPortal } from 'react-dom';
19
- import { a5 as RulesIcon, a6 as SourcesIcon, a2 as ActionsIcon, a3 as DestinationsIcon } from './index-CksKgOxY.js';
20
+ import { N as NoteBackToSummary, E as EditButton } from './index-DE7A6Q_i.js';
21
+ import { D as DESTINATION_CATEGORIES } from './index-Dqief9td.js';
22
+ import { a6 as RulesIcon, a7 as SourcesIcon, a3 as ActionsIcon, a4 as DestinationsIcon } from './index-BRW_Nl-n.js';
20
23
  import './index-DGel4E-Z.js';
21
24
  import './index-7-KCQK-x.js';
22
25
 
23
26
  const buildCard$3 = (action) => {
24
- const { type, spec: { actionName, notes, signals, disabled, collectContainerAttributes, collectWorkloadId, collectClusterId, labelsAttributes, annotationsAttributes, clusterAttributes, attributeNamesToDelete, renames, piiCategories, fallbackSamplingRatio, samplingPercentage, endpointsFilters, }, } = action;
27
+ const { type, spec: { actionName, notes, signals, disabled, collectContainerAttributes, collectReplicaSetAttributes, collectWorkloadId, collectClusterId, labelsAttributes, annotationsAttributes, clusterAttributes, attributeNamesToDelete, renames, piiCategories, fallbackSamplingRatio, samplingPercentage, endpointsFilters, }, } = action;
25
28
  const arr = [
26
29
  { title: DISPLAY_TITLES.TYPE, value: type },
27
30
  { type: DataCardFieldTypes.ActiveStatus, title: DISPLAY_TITLES.STATUS, value: String(!disabled) },
@@ -32,6 +35,7 @@ const buildCard$3 = (action) => {
32
35
  ];
33
36
  if (type === ActionType.K8sAttributes) {
34
37
  arr.push({ title: 'Collect Container Attributes', value: String(collectContainerAttributes) });
38
+ arr.push({ title: 'Collect ReplicaSet Attributes', value: String(collectReplicaSetAttributes) });
35
39
  arr.push({ title: 'Collect Workload ID', value: String(collectWorkloadId) });
36
40
  arr.push({ title: 'Collect Cluster ID', value: String(collectClusterId) });
37
41
  if (!!labelsAttributes?.length)
@@ -158,8 +162,9 @@ const ErrorSampler = ({ value, setValue, formErrors }) => {
158
162
 
159
163
  const K8sAttributes = ({ value, setValue, formErrors }) => {
160
164
  useEffect(() => {
161
- if (!value.collectContainerAttributes && !value.collectWorkloadId && !value.collectClusterId && !value.labelsAttributes?.length && !value.annotationsAttributes?.length) {
165
+ if (!value.collectContainerAttributes && !value.collectWorkloadId && !value.collectReplicaSetAttributes && !value.collectClusterId && !value.labelsAttributes?.length && !value.annotationsAttributes?.length) {
162
166
  setValue('collectContainerAttributes', true);
167
+ setValue('collectReplicaSetAttributes', true);
163
168
  setValue('collectWorkloadId', true);
164
169
  setValue('collectClusterId', true);
165
170
  setValue('labelsAttributes', []);
@@ -169,6 +174,7 @@ const K8sAttributes = ({ value, setValue, formErrors }) => {
169
174
  }, []);
170
175
  return (React.createElement(React.Fragment, null,
171
176
  React.createElement(Checkbox, { title: 'Collect Container Attributes', value: value['collectContainerAttributes'] || false, onChange: (bool) => setValue('collectContainerAttributes', bool), errorMessage: formErrors['collectContainerAttributes'] }),
177
+ React.createElement(Checkbox, { title: 'Collect ReplicaSet Attributes', value: value['collectReplicaSetAttributes'] || false, onChange: (bool) => setValue('collectReplicaSetAttributes', bool), errorMessage: formErrors['collectReplicaSetAttributes'] }),
172
178
  React.createElement(Checkbox, { title: 'Collect Workload ID', value: value['collectWorkloadId'] || false, onChange: (bool) => setValue('collectWorkloadId', bool), errorMessage: formErrors['collectWorkloadId'] }),
173
179
  React.createElement(Checkbox, { title: 'Collect Cluster ID', value: value['collectClusterId'] || false, onChange: (bool) => setValue('collectClusterId', bool), errorMessage: formErrors['collectClusterId'] }),
174
180
  React.createElement(InputTable, { columns: [
@@ -299,7 +305,7 @@ const CustomFields$1 = ({ actionType, value, setValue, formErrors }) => {
299
305
  return Component ? React.createElement(Component, { value: value, setValue: setValue, formErrors: formErrors }) : null;
300
306
  };
301
307
 
302
- const Container$l = styled.div `
308
+ const Container$n = styled.div `
303
309
  display: flex;
304
310
  flex-direction: column;
305
311
  gap: 24px;
@@ -310,7 +316,7 @@ const FieldTitle$1 = styled(Text) `
310
316
  `;
311
317
  const ActionForm = ({ isUpdate, action, formData, formErrors, handleFormChange }) => {
312
318
  const theme = Theme.useTheme();
313
- return (React.createElement(Container$l, null,
319
+ return (React.createElement(Container$n, null,
314
320
  isUpdate && (React.createElement("div", null,
315
321
  React.createElement(FieldTitle$1, null, "Status"),
316
322
  React.createElement(Segment, { options: [
@@ -569,11 +575,13 @@ const ActionModal = ({ createAction }) => {
569
575
  };
570
576
 
571
577
  const buildSpecCell$1 = (action) => {
572
- const { type, spec: { collectContainerAttributes, collectWorkloadId, collectClusterId, labelsAttributes, annotationsAttributes, clusterAttributes, attributeNamesToDelete, renames, piiCategories, fallbackSamplingRatio, samplingPercentage, endpointsFilters, }, } = action;
578
+ const { type, spec: { collectContainerAttributes, collectReplicaSetAttributes, collectWorkloadId, collectClusterId, labelsAttributes, annotationsAttributes, clusterAttributes, attributeNamesToDelete, renames, piiCategories, fallbackSamplingRatio, samplingPercentage, endpointsFilters, }, } = action;
573
579
  let str = '';
574
580
  if (type === ActionType.K8sAttributes) {
575
581
  if (collectContainerAttributes)
576
582
  str += 'Container Attributes, ';
583
+ if (collectReplicaSetAttributes)
584
+ str += 'ReplicaSet Attributes, ';
577
585
  if (collectWorkloadId)
578
586
  str += 'Workload ID, ';
579
587
  if (collectClusterId)
@@ -663,7 +671,7 @@ const ConditionsStatuses = ({ conditions, id }) => {
663
671
  const columns$3 = [
664
672
  { key: 'icon', title: '' },
665
673
  { key: 'name', title: DISPLAY_TITLES.NAME, sortable: true },
666
- { key: 'signals', title: DISPLAY_TITLES.Monitors },
674
+ { key: 'signals', title: DISPLAY_TITLES.MONITORS },
667
675
  { key: 'active-status', title: DISPLAY_TITLES.STATUS },
668
676
  { key: 'conditions', title: 'Conditions' },
669
677
  { key: 'type', title: DISPLAY_TITLES.TYPE, sortable: true },
@@ -731,14 +739,14 @@ const ActionTable = ({ maxHeight, maxWidth }) => {
731
739
  const badgeTooltip = useMemo(() => (filtered.length !== actions.length ? DISPLAY_TITLES.FILTERED_COUNT_TOOLTIP : undefined), [filtered, actions]);
732
740
  return (React.createElement(TableContainer, { "$maxWidth": maxWidth },
733
741
  React.createElement(TableTitleWrap, null,
734
- React.createElement(IconTitleBadge, { icon: getEntityIcon(EntityTypes.Action), title: DISPLAY_TITLES.Actions, badge: badge, badgeTooltip: badgeTooltip, loading: actionsLoading })),
742
+ React.createElement(IconTitleBadge, { icon: getEntityIcon(EntityTypes.Action), title: DISPLAY_TITLES.ACTIONS, badge: badge, badgeTooltip: badgeTooltip, loading: actionsLoading })),
735
743
  React.createElement(TableWrap, { "$maxHeight": maxHeight },
736
744
  React.createElement(InteractiveTable, { columns: columns$3, rows: rows })),
737
745
  !filtered.length && (React.createElement(CenterThis, { style: { marginTop: '2rem' } },
738
746
  React.createElement(NoDataFound, null)))));
739
747
  };
740
748
 
741
- const Container$k = styled(FlexColumn) `
749
+ const Container$m = styled(FlexColumn) `
742
750
  // width: 100vw;
743
751
  // height: 100vh;
744
752
  gap: 64px;
@@ -772,7 +780,7 @@ const AwaitPipeline = () => {
772
780
  useEffect(() => {
773
781
  awaitPipeline();
774
782
  }, []);
775
- return (React.createElement(Container$k, null,
783
+ return (React.createElement(Container$m, null,
776
784
  React.createElement(OdigosLogoText, { size: 100 }),
777
785
  React.createElement(TraceLoader, { width: 400 }),
778
786
  React.createElement(TextWrap, null,
@@ -782,37 +790,6 @@ const AwaitPipeline = () => {
782
790
  React.createElement(Description, null, "It can take up to a few minutes. Grab a cup of coffee, look out a window, and enjoy your free moment!"))));
783
791
  };
784
792
 
785
- const StyledButton = styled(Button) `
786
- gap: 8px;
787
- text-transform: none;
788
- text-decoration: none;
789
- border: ${({ theme, $withBorder }) => `1px solid ${$withBorder ? theme.colors.border : 'transparent'}`};
790
- &.not-selected {
791
- background-color: ${({ theme, $color }) => $color || theme.colors.dropdown_bg_2 + Theme.opacity.hex['060']};
792
- &:hover {
793
- background-color: ${({ theme, $hoverColor }) => $hoverColor || theme.colors.dropdown_bg_2};
794
- }
795
- }
796
- &.selected {
797
- background-color: ${({ theme }) => theme.colors.majestic_blue + Theme.opacity.hex['048']};
798
- }
799
- `;
800
- const TextLimited = styled(Text) `
801
- white-space: nowrap;
802
- overflow: hidden;
803
- text-overflow: ellipsis;
804
- font-size: 14px;
805
- `;
806
- const SelectionButton = ({ label, onClick, icon: Icon, iconSrc, badgeLabel, badgeFilled, isSelected, withBorder, color, hoverColor, style }) => {
807
- return (React.createElement(StyledButton, { onClick: onClick, className: isSelected ? 'selected' : 'not-selected', "$withBorder": withBorder, "$color": color, "$hoverColor": hoverColor, style: style },
808
- Icon && (React.createElement("div", null,
809
- React.createElement(Icon, null))),
810
- iconSrc && (React.createElement("div", null,
811
- React.createElement("img", { src: iconSrc, alt: '', width: 16, height: 16 }))),
812
- React.createElement(TextLimited, null, label),
813
- badgeLabel !== undefined && React.createElement(Badge, { label: badgeLabel, filled: badgeFilled || isSelected })));
814
- };
815
-
816
793
  const Tab = styled(FlexRow) `
817
794
  width: 260px;
818
795
  padding: 4px;
@@ -845,10 +822,10 @@ const PushToEnd$1 = styled.div `
845
822
  margin-left: auto;
846
823
  margin-right: 6px;
847
824
  `;
848
- const RelativeContainer$2 = styled.div `
825
+ const RelativeContainer$3 = styled.div `
849
826
  position: relative;
850
827
  `;
851
- const AbsoluteContainer$2 = styled.div `
828
+ const AbsoluteContainer$3 = styled.div `
852
829
  position: absolute;
853
830
  top: calc(100% + 8px);
854
831
  left: 0;
@@ -858,12 +835,6 @@ const AbsoluteContainer$2 = styled.div `
858
835
  border-radius: 24px;
859
836
  width: 420px;
860
837
  `;
861
- const VerticalScroll$1 = styled.div `
862
- display: flex;
863
- flex-direction: column;
864
- padding: 12px;
865
- overflow-y: scroll;
866
- `;
867
838
  const HeadWrap = styled.div `
868
839
  border-bottom: ${({ theme }) => `1px solid ${theme.colors.border}`};
869
840
  padding: 12px;
@@ -886,16 +857,16 @@ const ComputePlatformSelect = ({ connections, selected, onSelect, onViewAll }) =
886
857
  const withSelect = !!connections.length;
887
858
  const filtered = connections.filter(({ id }) => id.toLowerCase().includes(searchText));
888
859
  const Icon = !!selected?.type ? getPlatformIcon(selected.type) : null;
889
- return (React.createElement(RelativeContainer$2, { ref: containerRef },
860
+ return (React.createElement(RelativeContainer$3, { ref: containerRef },
890
861
  React.createElement(Tab, { "$withSelect": withSelect, onClick: () => setIsOpen((prev) => !prev) },
891
862
  React.createElement(LogoWrap, null, !!Icon ? React.createElement(Icon, { size: 20, fill: theme.text.info }) : React.createElement(OverviewIcon, { fill: theme.text.info })),
892
863
  React.createElement(Title$2, null, selected?.name || selected?.id || 'no platform'),
893
864
  withSelect && (React.createElement(PushToEnd$1, null,
894
865
  React.createElement(ExtendArrow, { extend: isOpen, align: 'right' })))),
895
- isOpen && withSelect && (React.createElement(AbsoluteContainer$2, null,
866
+ isOpen && withSelect && (React.createElement(AbsoluteContainer$3, null,
896
867
  React.createElement(HeadWrap, null,
897
868
  React.createElement(Input, { placeholder: 'Search...', icon: SearchIcon, value: searchText, onChange: (e) => setSearchText(e.target.value.toLowerCase()) })),
898
- React.createElement(VerticalScroll$1, { style: { maxHeight: '240px' } }, filtered.map(({ id, type, name, status }, idx) => (React.createElement(SelectionButton, { key: `platform-${id}`, icon: () => getPlatformIcon(type)({ fill: status === StatusType.Success ? theme.text.success : theme.text.error }), label: `${!!name ? name : getPlatformLabel(type)} (${id})`, isSelected: selected?.id === id, onClick: () => {
869
+ React.createElement(VerticalScroll, { style: { maxHeight: '240px' } }, filtered.map(({ id, type, name, status }, idx) => (React.createElement(SelectionButton, { key: `platform-${id}`, icon: () => getPlatformIcon(type)({ fill: status === StatusType.Success ? theme.text.success : theme.text.error }), label: `${!!name ? name : getPlatformLabel(type)} (${id})`, isSelected: selected?.id === id, onClick: () => {
899
870
  if (status === StatusType.Success) {
900
871
  onSelect(filtered[idx]);
901
872
  }
@@ -970,8 +941,7 @@ const ConnectionTypeDropdown = ({ connections, title = '', value, onSelect, onDe
970
941
  return React.createElement(Dropdown, { disabled: !options?.length, title: title, placeholder: 'All Types', options: options, value: value, onSelect: onSelect, onDeselect: onDeselect, ...props });
971
942
  };
972
943
 
973
- const ErrorDropdown = ({ title = 'Error Message', value, onSelect, onDeselect, disabled, ...props }) => {
974
- const { sources } = useEntityStore();
944
+ const ErrorDropdown = ({ sources, title = 'Error Message', value, onSelect, onDeselect, disabled, ...props }) => {
975
945
  const options = useMemo(() => {
976
946
  const payload = [];
977
947
  // !! note:
@@ -996,8 +966,7 @@ const ErrorDropdown = ({ title = 'Error Message', value, onSelect, onDeselect, d
996
966
  return React.createElement(Dropdown, { disabled: disabled || !options?.length, title: title, placeholder: 'All', options: options, value: value, onSelect: onSelect, onDeselect: onDeselect, ...props });
997
967
  };
998
968
 
999
- const LanguageDropdown = ({ title = 'Programming Language', value, onSelect, onDeselect, ...props }) => {
1000
- const { sources } = useEntityStore();
969
+ const LanguageDropdown = ({ sources, title = 'Programming Language', value, onSelect, onDeselect, ...props }) => {
1001
970
  const options = useMemo(() => {
1002
971
  const payload = [];
1003
972
  sources.forEach(({ containers }) => {
@@ -1024,8 +993,7 @@ const MonitorDropdown = ({ title = 'Monitors', value, onSelect, onDeselect, ...p
1024
993
  return React.createElement(Dropdown, { disabled: !options?.length, title: title, placeholder: 'All', options: options, value: value, onSelect: onSelect, onDeselect: onDeselect, ...props });
1025
994
  };
1026
995
 
1027
- const NamespaceDropdown = ({ title = 'Namespace', value, onSelect, onDeselect, ...props }) => {
1028
- const { namespaces } = useEntityStore();
996
+ const NamespaceDropdown = ({ namespaces, title = 'Namespace', value, onSelect, onDeselect, ...props }) => {
1029
997
  const options = useMemo(() => {
1030
998
  const payload = [];
1031
999
  namespaces?.forEach(({ name }) => {
@@ -1038,8 +1006,7 @@ const NamespaceDropdown = ({ title = 'Namespace', value, onSelect, onDeselect, .
1038
1006
  return React.createElement(Dropdown, { disabled: !options?.length, title: title, placeholder: 'Select namespace', options: options, value: value, onSelect: onSelect, onDeselect: onDeselect, ...props });
1039
1007
  };
1040
1008
 
1041
- const KindDropdown = ({ title = 'Kind', value, onSelect, onDeselect, ...props }) => {
1042
- const { sources } = useEntityStore();
1009
+ const KindDropdown = ({ sources, title = 'Kind', value, onSelect, onDeselect, ...props }) => {
1043
1010
  const options = useMemo(() => {
1044
1011
  const payload = [];
1045
1012
  sources.forEach(({ kind: id }) => {
@@ -1052,7 +1019,7 @@ const KindDropdown = ({ title = 'Kind', value, onSelect, onDeselect, ...props })
1052
1019
  return React.createElement(Dropdown, { disabled: !options?.length, title: title, placeholder: 'All', options: options, value: value, onSelect: onSelect, onDeselect: onDeselect, ...props });
1053
1020
  };
1054
1021
 
1055
- const Container$j = styled.div `
1022
+ const Container$l = styled.div `
1056
1023
  display: flex;
1057
1024
  align-items: center;
1058
1025
  margin: 20px 0;
@@ -1072,7 +1039,7 @@ const ComputePlatformsActionsMenu = ({ connections }) => {
1072
1039
  useEffect(() => {
1073
1040
  return () => clearAll();
1074
1041
  }, [clearAll]);
1075
- return (React.createElement(Container$j, null,
1042
+ return (React.createElement(Container$l, null,
1076
1043
  React.createElement(FlexRow, { "$gap": 16 },
1077
1044
  React.createElement(FlexRow, { "$gap": 12 },
1078
1045
  React.createElement(Title$1, null, "Compute platforms"),
@@ -12470,7 +12437,7 @@ ControlsComponent.displayName = 'Controls';
12470
12437
  * @remarks To extend or customise the controls, you can use the [`<ControlButton />`](/api-reference/components/control-button) component
12471
12438
  *
12472
12439
  */
12473
- const Controls$1 = memo(ControlsComponent);
12440
+ const Controls = memo(ControlsComponent);
12474
12441
 
12475
12442
  function MiniMapNodeComponent({ id, x, y, width, height, style, color, strokeColor, strokeWidth, className, borderRadius, shapeRendering, selected, onClick, }) {
12476
12443
  const { background, backgroundColor } = style || {};
@@ -12789,7 +12756,7 @@ function ResizeControl({ nodeId, position, variant = ResizeControlVariant.Handle
12789
12756
  */
12790
12757
  memo(ResizeControl);
12791
12758
 
12792
- const Container$i = styled(FlexColumn) `
12759
+ const Container$k = styled(FlexColumn) `
12793
12760
  align-items: center !important;
12794
12761
  justify-content: center;
12795
12762
  align-self: stretch;
@@ -12826,7 +12793,7 @@ const AddNode = memo(({ id: nodeId, data }) => {
12826
12793
  const { isThisPending } = usePendingStore();
12827
12794
  const entity = nodeId.split('-')[0];
12828
12795
  const isPending = isThisPending({ entityType: entity });
12829
- return (React.createElement(Container$i, { "$nodeWidth": nodeWidth, className: 'nowheel nodrag' },
12796
+ return (React.createElement(Container$k, { "$nodeWidth": nodeWidth, className: 'nowheel nodrag' },
12830
12797
  isPending ? (React.createElement(Fragment, null,
12831
12798
  React.createElement(TitleWrapper, null,
12832
12799
  React.createElement(FadeLoader, null),
@@ -12843,7 +12810,7 @@ const AddNode = memo(({ id: nodeId, data }) => {
12843
12810
  React.createElement(Handle, { type: 'source', position: Position.Right, style: { visibility: 'hidden' } })));
12844
12811
  });
12845
12812
 
12846
- const Container$h = styled.div `
12813
+ const Container$j = styled.div `
12847
12814
  width: ${({ $nodeWidth }) => `${$nodeWidth}px`};
12848
12815
  `;
12849
12816
  const BaseNode = memo(({ id: nodeId, data }) => {
@@ -12876,7 +12843,7 @@ const BaseNode = memo(({ id: nodeId, data }) => {
12876
12843
  }
12877
12844
  setSelectedSources(namespaces);
12878
12845
  };
12879
- return (React.createElement(Container$h, { "data-id": nodeId, "$nodeWidth": nodeWidth, className: 'nowheel nodrag' },
12846
+ return (React.createElement(Container$j, { "data-id": nodeId, "$nodeWidth": nodeWidth, className: 'nowheel nodrag' },
12880
12847
  React.createElement(DataTab, { title: title, subTitle: subTitle, onClick: () => { }, renderActions: renderActions, iconProps: {
12881
12848
  icon: icon,
12882
12849
  icons: icons,
@@ -12896,19 +12863,19 @@ const BaseNode = memo(({ id: nodeId, data }) => {
12896
12863
  React.createElement(Handle, { type: 'source', position: Position.Right, style: { visibility: 'hidden' } })));
12897
12864
  });
12898
12865
 
12899
- const Container$g = styled.div `
12866
+ const Container$i = styled.div `
12900
12867
  width: ${({ $nodeWidth }) => `${$nodeWidth}px`};
12901
12868
  height: ${({ $nodeHeight }) => `${$nodeHeight}px`};
12902
12869
  opacity: 0;
12903
12870
  `;
12904
12871
  const EdgedNode = memo(({ data }) => {
12905
12872
  const { nodeWidth, nodeHeight } = data;
12906
- return (React.createElement(Container$g, { "$nodeWidth": nodeWidth, "$nodeHeight": nodeHeight, className: 'nowheel nodrag' },
12873
+ return (React.createElement(Container$i, { "$nodeWidth": nodeWidth, "$nodeHeight": nodeHeight, className: 'nowheel nodrag' },
12907
12874
  React.createElement(Handle, { type: 'source', position: Position.Right, style: { visibility: 'hidden' } }),
12908
12875
  React.createElement(Handle, { type: 'target', position: Position.Left, style: { visibility: 'hidden' } })));
12909
12876
  });
12910
12877
 
12911
- const Container$f = styled.div `
12878
+ const Container$h = styled.div `
12912
12879
  width: ${({ $nodeWidth }) => $nodeWidth}px;
12913
12880
  height: ${({ $nodeHeight }) => $nodeHeight}px;
12914
12881
  background: transparent;
@@ -12917,7 +12884,7 @@ const Container$f = styled.div `
12917
12884
  `;
12918
12885
  const FrameNode = memo(({ data }) => {
12919
12886
  const { nodeWidth, nodeHeight } = data;
12920
- return (React.createElement(Container$f, { "$nodeWidth": nodeWidth, "$nodeHeight": nodeHeight, className: 'nowheel nodrag' },
12887
+ return (React.createElement(Container$h, { "$nodeWidth": nodeWidth, "$nodeHeight": nodeHeight, className: 'nowheel nodrag' },
12921
12888
  React.createElement(Handle, { type: 'source', position: Position.Right, style: { visibility: 'hidden' } }),
12922
12889
  React.createElement(Handle, { type: 'target', position: Position.Left, style: { visibility: 'hidden' } })));
12923
12890
  });
@@ -12932,7 +12899,7 @@ const nodeConfig = {
12932
12899
  };
12933
12900
 
12934
12901
  const { framePadding: framePadding$3 } = nodeConfig;
12935
- const Container$e = styled.div `
12902
+ const Container$g = styled.div `
12936
12903
  position: relative;
12937
12904
  z-index: 1;
12938
12905
  width: fit-content;
@@ -12980,7 +12947,7 @@ const ScrollNode = memo(({ data, ...rest }) => {
12980
12947
  current?.addEventListener('scroll', handleScroll);
12981
12948
  return () => current?.removeEventListener('scroll', handleScroll);
12982
12949
  }, [onScroll]);
12983
- return (React.createElement(Container$e, { ref: containerRef, "$nodeHeight": nodeHeight, className: 'nowheel nodrag' },
12950
+ return (React.createElement(Container$g, { ref: containerRef, "$nodeHeight": nodeHeight, className: 'nowheel nodrag' },
12984
12951
  items.map((item) => (React.createElement(BaseNodeWrapper, { key: item.id, onClick: (e) => {
12985
12952
  e.stopPropagation();
12986
12953
  // @ts-ignore
@@ -12990,7 +12957,7 @@ const ScrollNode = memo(({ data, ...rest }) => {
12990
12957
  React.createElement(BottomOverlay, { "$hide": isBottomOfList })));
12991
12958
  });
12992
12959
 
12993
- const Container$d = styled.div `
12960
+ const Container$f = styled.div `
12994
12961
  position: relative;
12995
12962
  width: ${({ $nodeWidth }) => `${$nodeWidth}px`};
12996
12963
  padding: 12px 0px 16px 0px;
@@ -13008,7 +12975,7 @@ const SelectorWrapper = styled(FlexRow) `
13008
12975
  const ActionsWrapper = styled(FlexRow) `
13009
12976
  margin-left: auto;
13010
12977
  `;
13011
- const AddButton$1 = styled(Button) `
12978
+ const AddButton = styled(Button) `
13012
12979
  width: 24px;
13013
12980
  height: 24px;
13014
12981
  padding: 0;
@@ -13059,7 +13026,7 @@ const HeaderNode = memo(({ id: nodeId, data }) => {
13059
13026
  setSelectedSources({});
13060
13027
  }
13061
13028
  };
13062
- return (React.createElement(Container$d, { "$nodeWidth": nodeWidth, className: 'nowheel nodrag' },
13029
+ return (React.createElement(Container$f, { "$nodeWidth": nodeWidth, className: 'nowheel nodrag' },
13063
13030
  entityType === EntityTypes.Source && (React.createElement(SelectorWrapper, null,
13064
13031
  React.createElement(Checkbox, { partiallyChecked: hasSelected && sources?.length !== totalSelectedSources, value: hasSelected && sources?.length === totalSelectedSources, onChange: onSelect, disabled: !sources?.length }))),
13065
13032
  React.createElement(IconTitleBadge, { icon: Icon, title: title, badge: isSourceAwaitingInstrumentation ? `${instrumentingPercent}%` : badge, badgeTooltip: badgeTooltip, loading: isFetching && !isSourceAwaitingInstrumentation }),
@@ -13070,7 +13037,7 @@ const Actions$1 = memo(({ entityType }) => {
13070
13037
  const theme = Theme.useTheme();
13071
13038
  const { onClickNode } = useClickNode();
13072
13039
  return (React.createElement(ActionsWrapper, null,
13073
- React.createElement(AddButton$1, { "data-id": `add-${entityType}`, variant: 'primary', onClick: (e) => {
13040
+ React.createElement(AddButton, { "data-id": `add-${entityType}`, variant: 'primary', onClick: (e) => {
13074
13041
  e.stopPropagation();
13075
13042
  // @ts-ignore
13076
13043
  onClickNode(undefined, {
@@ -13121,12 +13088,12 @@ const LabeledEdge = memo(({ id, sourceX, sourceY, targetX, targetY, sourcePositi
13121
13088
  React.createElement(Tooltip, { text: 'Heads up! The data-flow metrics you see are calculated over 10-second intervals.' }, data?.label)))));
13122
13089
  });
13123
13090
 
13124
- const Container$c = styled.div `
13091
+ const Container$e = styled.div `
13125
13092
  width: ${({ $nodeWidth }) => `${$nodeWidth}px`};
13126
13093
  `;
13127
13094
  const SkeletonNode = memo(({ id: nodeId, data }) => {
13128
13095
  const { nodeWidth } = data;
13129
- return (React.createElement(Container$c, { "data-id": nodeId, "$nodeWidth": nodeWidth, className: 'nowheel nodrag' },
13096
+ return (React.createElement(Container$e, { "data-id": nodeId, "$nodeWidth": nodeWidth, className: 'nowheel nodrag' },
13130
13097
  React.createElement(SkeletonLoader, { size: 3 })));
13131
13098
  });
13132
13099
 
@@ -13168,7 +13135,7 @@ const Flow = ({ nodes, edges, onNodesChange, onEdgesChange }) => {
13168
13135
  return (React.createElement(FlowWrapper, null,
13169
13136
  React.createElement(index, { fitView: false, zoomOnScroll: false, nodes: nodes, nodeTypes: nodeTypes, edges: edges, edgeTypes: edgeTypes, onNodeClick: onClickNode, onNodesChange: (changes) => setTimeout(() => onNodesChange(changes), 0), onEdgesChange: (changes) => setTimeout(() => onEdgesChange(changes), 0) },
13170
13137
  React.createElement(ControllerWrapper, null,
13171
- React.createElement(Controls$1, { position: 'bottom-right', orientation: 'horizontal', showInteractive: false, showZoom: true, showFitView: true, fitViewOptions: {
13138
+ React.createElement(Controls, { position: 'bottom-right', orientation: 'horizontal', showInteractive: false, showZoom: true, showFitView: true, fitViewOptions: {
13172
13139
  duration: 300,
13173
13140
  padding: 0.02,
13174
13141
  includeHiddenNodes: true,
@@ -13248,7 +13215,7 @@ const buildRuleNodes = ({ loading, entities, positions, unfilteredCount }) => {
13248
13215
  },
13249
13216
  data: {
13250
13217
  nodeWidth: nodeWidth$4,
13251
- title: DISPLAY_TITLES.InstrumentationRules,
13218
+ title: DISPLAY_TITLES.INSTRUMENTATION_RULES,
13252
13219
  icon: getEntityIcon(EntityTypes.InstrumentationRule),
13253
13220
  badge: unfilteredCount,
13254
13221
  isFetching: loading,
@@ -13291,8 +13258,8 @@ const buildRuleNodes = ({ loading, entities, positions, unfilteredCount }) => {
13291
13258
  data: {
13292
13259
  nodeWidth: nodeWidth$4,
13293
13260
  type: AddNodeTypes.AddRule,
13294
- title: 'ADD RULE',
13295
- subTitle: 'To modify OpenTelemetry data',
13261
+ title: DISPLAY_TITLES.ADD_INSTRUMENTATION_RULE,
13262
+ subTitle: DISPLAY_TITLES.TO_MODIFY_OTEL_DATA,
13296
13263
  },
13297
13264
  });
13298
13265
  }
@@ -13328,7 +13295,7 @@ const buildActionNodes = ({ loading, entities, positions, unfilteredCount }) =>
13328
13295
  },
13329
13296
  data: {
13330
13297
  nodeWidth: nodeWidth$3,
13331
- title: DISPLAY_TITLES.Actions,
13298
+ title: DISPLAY_TITLES.ACTIONS,
13332
13299
  icon: getEntityIcon(EntityTypes.Action),
13333
13300
  badge: unfilteredCount,
13334
13301
  isFetching: loading,
@@ -13385,8 +13352,8 @@ const buildActionNodes = ({ loading, entities, positions, unfilteredCount }) =>
13385
13352
  data: {
13386
13353
  nodeWidth: nodeWidth$3,
13387
13354
  type: AddNodeTypes.AddAction,
13388
- title: 'ADD Action',
13389
- subTitle: 'To modify OpenTelemetry data',
13355
+ title: DISPLAY_TITLES.ADD_ACTION,
13356
+ subTitle: DISPLAY_TITLES.TO_MODIFY_OTEL_DATA,
13390
13357
  },
13391
13358
  });
13392
13359
  }
@@ -13426,7 +13393,7 @@ const buildSourceNodes = ({ loading, entities, positions, unfilteredCount, conta
13426
13393
  },
13427
13394
  data: {
13428
13395
  nodeWidth: nodeWidth$2,
13429
- title: DISPLAY_TITLES.Sources,
13396
+ title: DISPLAY_TITLES.SOURCES,
13430
13397
  icon: getEntityIcon(EntityTypes.Source),
13431
13398
  badge: hasFiltersApplied ? `${entities.length}/${unfilteredCount}` : unfilteredCount,
13432
13399
  badgeTooltip: hasFiltersApplied ? DISPLAY_TITLES.FILTERED_COUNT_TOOLTIP : undefined,
@@ -13496,8 +13463,8 @@ const buildSourceNodes = ({ loading, entities, positions, unfilteredCount, conta
13496
13463
  data: {
13497
13464
  nodeWidth: nodeWidth$2,
13498
13465
  type: AddNodeTypes.AddSource,
13499
- title: 'ADD Source',
13500
- subTitle: 'To collect OpenTelemetry data',
13466
+ title: DISPLAY_TITLES.ADD_SOURCE,
13467
+ subTitle: DISPLAY_TITLES.TO_COLLECT_OTEL_DATA,
13501
13468
  },
13502
13469
  });
13503
13470
  }
@@ -13554,7 +13521,7 @@ const mapToNodeData = (entity) => {
13554
13521
  subTitle: entity.destinationType.displayName,
13555
13522
  icon,
13556
13523
  iconSrc,
13557
- monitors: Object.keys(entity.exportedSignals).filter((signal) => entity.exportedSignals[signal] === true),
13524
+ monitors: mapExportedSignals(entity.exportedSignals),
13558
13525
  raw: entity,
13559
13526
  };
13560
13527
  };
@@ -13570,7 +13537,7 @@ const buildDestinationNodes = ({ loading, entities, positions, unfilteredCount }
13570
13537
  },
13571
13538
  data: {
13572
13539
  nodeWidth,
13573
- title: DISPLAY_TITLES.Destinations,
13540
+ title: DISPLAY_TITLES.DESTINATIONS,
13574
13541
  icon: getEntityIcon(EntityTypes.Destination),
13575
13542
  badge: unfilteredCount,
13576
13543
  isFetching: loading,
@@ -13613,15 +13580,15 @@ const buildDestinationNodes = ({ loading, entities, positions, unfilteredCount }
13613
13580
  data: {
13614
13581
  nodeWidth,
13615
13582
  type: AddNodeTypes.AddDestination,
13616
- title: 'ADD Destination',
13617
- subTitle: 'To monitor OpenTelemetry data',
13583
+ title: DISPLAY_TITLES.ADD_DESTINATION,
13584
+ subTitle: DISPLAY_TITLES.TO_MONITOR_OTEL_DATA,
13618
13585
  },
13619
13586
  });
13620
13587
  }
13621
13588
  return nodes;
13622
13589
  };
13623
13590
 
13624
- const Container$b = styled.div `
13591
+ const Container$d = styled.div `
13625
13592
  width: 100%;
13626
13593
  height: ${({ $heightToRemove }) => `calc(100vh - ${$heightToRemove})`};
13627
13594
  position: relative;
@@ -13629,6 +13596,7 @@ const Container$b = styled.div `
13629
13596
  const DataFlow = ({ heightToRemove, metrics }) => {
13630
13597
  const theme = Theme.useTheme();
13631
13598
  const filters = useFilterStore();
13599
+ const { selectedStreamName } = useDataStreamStore();
13632
13600
  const { isAwaitingInstrumentation } = useInstrumentStore();
13633
13601
  const { containerRef, containerWidth, containerHeight } = useContainerSize();
13634
13602
  const { sources, sourcesLoading, destinations, destinationsLoading, actions, actionsLoading, instrumentationRules, instrumentationRulesLoading } = useEntityStore();
@@ -13656,25 +13624,27 @@ const DataFlow = ({ heightToRemove, metrics }) => {
13656
13624
  })), prevNodes));
13657
13625
  };
13658
13626
  useEffect(() => {
13627
+ const sourcesByStream = filterSourcesByStream(sources, selectedStreamName);
13659
13628
  const sourceNodes = buildSourceNodes({
13660
- entities: filterSources(sources, filters),
13629
+ entities: filterSources(sourcesByStream, filters),
13661
13630
  loading: sourcesLoading || isAwaitingInstrumentation,
13662
- unfilteredCount: sources.length,
13631
+ unfilteredCount: sourcesByStream.length,
13663
13632
  positions,
13664
13633
  containerHeight,
13665
13634
  onScroll: ({ scrollTop }) => handleNodesScrolled(sourceNodes, EntityTypes.Source, scrollTop),
13666
13635
  });
13667
13636
  handleNodesChanged(sourceNodes, EntityTypes.Source);
13668
- }, [sources, sourcesLoading, isAwaitingInstrumentation, positions[EntityTypes.Source], filters, containerHeight]);
13637
+ }, [selectedStreamName, sources, sourcesLoading, isAwaitingInstrumentation, positions[EntityTypes.Source], filters, containerHeight]);
13669
13638
  useEffect(() => {
13639
+ const destinationsByStream = filterDestinationsByStream(destinations, selectedStreamName);
13670
13640
  const destinationNodes = buildDestinationNodes({
13671
- entities: filterDestinations(destinations, filters),
13641
+ entities: filterDestinations(destinationsByStream, filters),
13672
13642
  loading: destinationsLoading,
13673
- unfilteredCount: destinations.length,
13643
+ unfilteredCount: destinationsByStream.length,
13674
13644
  positions,
13675
13645
  });
13676
13646
  handleNodesChanged(destinationNodes, EntityTypes.Destination);
13677
- }, [destinations, destinationsLoading, positions[EntityTypes.Destination], filters]);
13647
+ }, [selectedStreamName, destinations, destinationsLoading, positions[EntityTypes.Destination], filters]);
13678
13648
  useEffect(() => {
13679
13649
  const actionNodes = buildActionNodes({
13680
13650
  entities: filterActions(actions, filters),
@@ -13694,15 +13664,15 @@ const DataFlow = ({ heightToRemove, metrics }) => {
13694
13664
  });
13695
13665
  handleNodesChanged(ruleNodes, EntityTypes.InstrumentationRule);
13696
13666
  }, [instrumentationRules, instrumentationRulesLoading, positions[EntityTypes.InstrumentationRule]]);
13697
- return (React.createElement(Container$b, { ref: containerRef, "$heightToRemove": heightToRemove },
13667
+ return (React.createElement(Container$d, { ref: containerRef, "$heightToRemove": heightToRemove },
13698
13668
  React.createElement(Flow, { nodes: nodes, edges: edges, onNodesChange: onNodesChange, onEdgesChange: onEdgesChange })));
13699
13669
  };
13700
13670
 
13701
- const RelativeContainer$1 = styled.div `
13671
+ const RelativeContainer$2 = styled.div `
13702
13672
  position: relative;
13703
13673
  max-width: 200px;
13704
13674
  `;
13705
- const AbsoluteContainer$1 = styled.div `
13675
+ const AbsoluteContainer$2 = styled.div `
13706
13676
  position: absolute;
13707
13677
  top: calc(100% + 8px);
13708
13678
  left: 0;
@@ -13779,26 +13749,21 @@ const HorizontalScroll = styled.div `
13779
13749
  border-bottom: ${({ theme }) => `1px solid ${theme.colors.border}`};
13780
13750
  overflow-x: scroll;
13781
13751
  `;
13782
- const VerticalScroll = styled.div `
13783
- display: flex;
13784
- flex-direction: column;
13785
- padding: 12px;
13786
- overflow-y: scroll;
13787
- `;
13788
13752
  const SearchResults = ({ searchText, onClose }) => {
13789
13753
  const theme = Theme.useTheme();
13790
13754
  const { onClickNode } = useClickNode();
13755
+ const { selectedStreamName } = useDataStreamStore();
13791
13756
  const { sources, destinations, actions, instrumentationRules } = useEntityStore();
13792
13757
  const [selectedCategory, setSelectedCategory] = useState('all');
13793
13758
  const { categories, searchResults } = useMemo(() => buildSearchResults({
13794
13759
  instrumentationRules,
13795
- sources,
13760
+ sources: filterSourcesByStream(sources, selectedStreamName),
13796
13761
  actions,
13797
- destinations,
13762
+ destinations: filterDestinationsByStream(destinations, selectedStreamName),
13798
13763
  searchText,
13799
13764
  selectedCategory,
13800
- }), [instrumentationRules, sources, actions, destinations, searchText, selectedCategory]);
13801
- return (React.createElement(AbsoluteContainer$1, null,
13765
+ }), [instrumentationRules, sources, actions, destinations, selectedStreamName, searchText, selectedCategory]);
13766
+ return (React.createElement(AbsoluteContainer$2, null,
13802
13767
  React.createElement(HorizontalScroll, { style: { borderBottom: `1px solid ${!searchResults.length ? 'transparent' : theme.colors.border}` } }, categories.map(({ category, label, count }) => !!count && (React.createElement(SelectionButton, { key: `category-select-${category}`, label: label, badgeLabel: count, isSelected: selectedCategory === category, onClick: () => setSelectedCategory(category) })))),
13803
13768
  searchResults.map(({ category, label, entities }, catIdx) => !!entities.length && (React.createElement(Fragment, { key: `category-list-${category}` },
13804
13769
  React.createElement(VerticalScroll, { style: { maxHeight: selectedCategory !== 'all' ? '240px' : '140px' } },
@@ -13822,7 +13787,7 @@ const Search = () => {
13822
13787
  const containerRef = useRef(null);
13823
13788
  useOnClickOutside(containerRef, () => setFocused(false));
13824
13789
  useKeyDown({ key: 'Escape', active: !!input || focused }, onClose);
13825
- return (React.createElement(RelativeContainer$1, { ref: containerRef },
13790
+ return (React.createElement(RelativeContainer$2, { ref: containerRef },
13826
13791
  React.createElement(Input, { placeholder: 'Search', icon: SearchIcon, value: input, onChange: (e) => setInput(e.target.value.toLowerCase()), onFocus: () => setFocused(true) }),
13827
13792
  !!input || focused ? React.createElement(SearchResults, { searchText: input, onClose: onClose }) : null));
13828
13793
  };
@@ -13862,19 +13827,22 @@ const getFilterCount = (params) => {
13862
13827
  };
13863
13828
  const Filters$1 = () => {
13864
13829
  const theme = Theme.useTheme();
13865
- const { namespaces, kinds, monitors, languages, errors, onlyErrors, setAll, clearAll, getEmptyState } = useFilterStore();
13830
+ const { namespaces, sources } = useEntityStore();
13831
+ const { selectedStreamName } = useDataStreamStore();
13832
+ const { namespaces: namespaceFilters, kinds, monitors, languages, errors, onlyErrors, setAll, clearAll, getEmptyState } = useFilterStore();
13833
+ const sourcesByStream = useMemo(() => filterSourcesByStream(sources, selectedStreamName), [sources, selectedStreamName]);
13866
13834
  // We need local state, because we want to keep the filters in the store only when the user clicks on apply
13867
- const [filters, setFilters] = useState({ namespaces, kinds, monitors, languages, errors, onlyErrors });
13835
+ const [filters, setFilters] = useState({ namespaces: namespaceFilters, kinds, monitors, languages, errors, onlyErrors });
13868
13836
  const [filterCount, setFilterCount] = useState(getFilterCount(filters));
13869
13837
  const [focused, setFocused] = useState(false);
13870
13838
  const toggleFocused = () => setFocused((prev) => !prev);
13871
13839
  useEffect(() => {
13872
13840
  if (!focused) {
13873
- const payload = { namespaces, kinds, monitors, languages, errors, onlyErrors };
13841
+ const payload = { namespaces: namespaceFilters, kinds, monitors, languages, errors, onlyErrors };
13874
13842
  setFilters(payload);
13875
13843
  setFilterCount(getFilterCount(payload));
13876
13844
  }
13877
- }, [focused, namespaces, kinds, monitors, errors, onlyErrors]);
13845
+ }, [focused, namespaceFilters, kinds, monitors, errors, onlyErrors]);
13878
13846
  const onApply = () => {
13879
13847
  // TODO: remove trycatch after debugging
13880
13848
  try {
@@ -13898,17 +13866,17 @@ const Filters$1 = () => {
13898
13866
  const ref = useRef(null);
13899
13867
  useOnClickOutside(ref, onCancel);
13900
13868
  useKeyDown({ key: 'Escape', active: focused }, onCancel);
13901
- return (React.createElement(RelativeContainer$1, { ref: ref },
13869
+ return (React.createElement(RelativeContainer$2, { ref: ref },
13902
13870
  React.createElement(SelectionButton, { label: 'Filters', icon: FilterIcon, badgeLabel: filterCount, badgeFilled: !!filterCount, withBorder: true, color: 'transparent', onClick: toggleFocused }),
13903
- React.createElement(AbsoluteContainer$1, { "$hidden": !focused },
13871
+ React.createElement(AbsoluteContainer$2, { "$hidden": !focused },
13904
13872
  React.createElement(FormWrapper, null,
13905
- React.createElement(NamespaceDropdown, { value: filters['namespaces'], onSelect: (val) => setFilters((prev) => ({ ...prev, namespaces: [...(prev.namespaces || []), val] })), onDeselect: (val) => setFilters((prev) => ({ ...prev, namespaces: (prev.namespaces || []).filter((opt) => opt.id !== val.id) })), showSearch: true, required: true, isMulti: true }),
13906
- React.createElement(KindDropdown, { value: filters['kinds'], onSelect: (val) => setFilters((prev) => ({ ...prev, kinds: [...(prev.kinds || []), val] })), onDeselect: (val) => setFilters((prev) => ({ ...prev, kinds: (prev.kinds || []).filter((opt) => opt.id !== val.id) })), showSearch: true, required: true, isMulti: true }),
13907
- React.createElement(LanguageDropdown, { value: filters['languages'], onSelect: (val) => setFilters((prev) => ({ ...prev, languages: [...(prev.languages || []), val] })), onDeselect: (val) => setFilters((prev) => ({ ...prev, languages: (prev.languages || []).filter((opt) => opt.id !== val.id) })), showSearch: true, required: true, isMulti: true }),
13873
+ React.createElement(NamespaceDropdown, { namespaces: namespaces, value: filters['namespaces'], onSelect: (val) => setFilters((prev) => ({ ...prev, namespaces: [...(prev.namespaces || []), val] })), onDeselect: (val) => setFilters((prev) => ({ ...prev, namespaces: (prev.namespaces || []).filter((opt) => opt.id !== val.id) })), showSearch: true, required: true, isMulti: true }),
13874
+ React.createElement(KindDropdown, { sources: sourcesByStream, value: filters['kinds'], onSelect: (val) => setFilters((prev) => ({ ...prev, kinds: [...(prev.kinds || []), val] })), onDeselect: (val) => setFilters((prev) => ({ ...prev, kinds: (prev.kinds || []).filter((opt) => opt.id !== val.id) })), showSearch: true, required: true, isMulti: true }),
13875
+ React.createElement(LanguageDropdown, { sources: sourcesByStream, value: filters['languages'], onSelect: (val) => setFilters((prev) => ({ ...prev, languages: [...(prev.languages || []), val] })), onDeselect: (val) => setFilters((prev) => ({ ...prev, languages: (prev.languages || []).filter((opt) => opt.id !== val.id) })), showSearch: true, required: true, isMulti: true }),
13908
13876
  React.createElement(MonitorDropdown, { value: filters['monitors'], onSelect: (val) => setFilters((prev) => ({ ...prev, monitors: [...(prev.monitors || []), val] })), onDeselect: (val) => setFilters((prev) => ({ ...prev, monitors: (prev.monitors || []).filter((opt) => opt.id !== val.id) })), showSearch: true, required: true, isMulti: true }),
13909
13877
  React.createElement(ToggleWrapper, null,
13910
13878
  React.createElement(Toggle, { title: 'Show only sources with errors', initialValue: filters['onlyErrors'], onChange: (bool) => setFilters((prev) => ({ ...prev, errors: [], onlyErrors: bool })) })),
13911
- React.createElement(ErrorDropdown, { value: filters['errors'], onSelect: (val) => setFilters((prev) => ({ ...prev, errors: [...(prev.errors || []), val] })), onDeselect: (val) => setFilters((prev) => ({ ...prev, errors: (prev.errors || []).filter((opt) => opt.id !== val.id) })), disabled: !filters['onlyErrors'], showSearch: true, required: true, isMulti: true })),
13879
+ React.createElement(ErrorDropdown, { sources: sourcesByStream, value: filters['errors'], onSelect: (val) => setFilters((prev) => ({ ...prev, errors: [...(prev.errors || []), val] })), onDeselect: (val) => setFilters((prev) => ({ ...prev, errors: (prev.errors || []).filter((opt) => opt.id !== val.id) })), disabled: !filters['onlyErrors'], showSearch: true, required: true, isMulti: true })),
13912
13880
  React.createElement(Actions, null,
13913
13881
  React.createElement(ActionButton$1, { variant: 'primary', onClick: onApply }, "Apply"),
13914
13882
  React.createElement(ActionButton$1, { variant: 'secondary', onClick: onCancel }, "Cancel"),
@@ -13916,7 +13884,60 @@ const Filters$1 = () => {
13916
13884
  React.createElement(ActionButton$1, { variant: 'tertiary', onClick: onReset, "$color": theme.text.error }, "Reset"))))));
13917
13885
  };
13918
13886
 
13919
- const Container$a = styled.div `
13887
+ const RelativeContainer$1 = styled.div `
13888
+ position: relative;
13889
+ `;
13890
+ const Container$c = styled(FlexRow) `
13891
+ border: 1px solid ${({ theme }) => theme.colors.border};
13892
+ border-radius: 32px;
13893
+
13894
+ & button {
13895
+ max-height: 28px;
13896
+ }
13897
+ `;
13898
+ const AbsoluteContainer$1 = styled.div `
13899
+ position: absolute;
13900
+ top: calc(100% + 8px);
13901
+ left: 0;
13902
+ z-index: 1;
13903
+ background-color: ${({ theme }) => theme.colors.dropdown_bg};
13904
+ border: ${({ theme }) => `1px solid ${theme.colors.border}`};
13905
+ border-radius: 24px;
13906
+ width: 420px;
13907
+ `;
13908
+ const SelectionMenuHeadWrap = styled.div `
13909
+ border-bottom: ${({ theme }) => `1px solid ${theme.colors.border}`};
13910
+ padding: 12px;
13911
+ `;
13912
+ const SelectionWrap = styled(VerticalScroll) `
13913
+ max-height: 240px;
13914
+ `;
13915
+ const DataStreamSelect = ({ onClickNewStream }) => {
13916
+ const theme = Theme.useTheme();
13917
+ const { dataStreams, selectedStreamName, setSelectedStreamName } = useDataStreamStore();
13918
+ const containerRef = useRef(null);
13919
+ const [popupOpen, setPopupOpen] = useState(false);
13920
+ useOnClickOutside(containerRef, () => setPopupOpen(false));
13921
+ const [searchText, setSearchText] = useState('');
13922
+ const filteredDataStreams = useMemo(() => dataStreams.filter(({ name }) => !searchText || name.toLowerCase().includes(searchText.toLowerCase())), [dataStreams, searchText]);
13923
+ return (React.createElement(RelativeContainer$1, null,
13924
+ React.createElement(Container$c, { "$gap": 0 },
13925
+ React.createElement(Button, { variant: 'tertiary', onClick: () => setPopupOpen((prev) => !prev) },
13926
+ React.createElement(DataStreamsIcon, { fill: theme.text.info }),
13927
+ React.createElement(Text, null, selectedStreamName),
13928
+ React.createElement(ExtendArrow, { extend: popupOpen })),
13929
+ React.createElement(Divider, { orientation: 'vertical', length: '32px', thickness: 2, margin: '0' }),
13930
+ React.createElement(AddButton$1, { onClick: onClickNewStream, label: BUTTON_TEXTS.NEW })),
13931
+ popupOpen && (React.createElement(AbsoluteContainer$1, { ref: containerRef },
13932
+ React.createElement(SelectionMenuHeadWrap, null,
13933
+ React.createElement(Input, { placeholder: 'Search...', icon: SearchIcon, value: searchText, onChange: (e) => setSearchText(e.target.value) })),
13934
+ React.createElement(SelectionWrap, null, filteredDataStreams.map(({ name }) => (React.createElement(SelectionButton, { key: `stream-${name}`, label: name, isSelected: selectedStreamName === name, onClick: () => {
13935
+ setSelectedStreamName(name);
13936
+ setPopupOpen(false);
13937
+ }, color: 'transparent', style: { width: '100%', justifyContent: 'flex-start' } }))))))));
13938
+ };
13939
+
13940
+ const Container$b = styled.div `
13920
13941
  display: flex;
13921
13942
  align-items: center;
13922
13943
  margin: 20px 0;
@@ -13927,28 +13948,32 @@ const Container$a = styled.div `
13927
13948
  const PushToEnd = styled.div `
13928
13949
  margin-left: auto;
13929
13950
  `;
13930
- const AddButton = styled(Button) `
13931
- display: flex;
13932
- align-items: center;
13933
- justify-content: center;
13934
- gap: 6px;
13935
- min-width: 160px;
13936
- padding-right: 24px;
13937
- `;
13938
- const DataFlowActionsMenu = ({ addEntity }) => {
13939
- const theme = Theme.useTheme();
13951
+ const DataFlowActionsMenu = ({ addEntity, onClickNewStream }) => {
13940
13952
  const { setCurrentModal } = useModalStore();
13941
- return (React.createElement(Container$a, null,
13953
+ return (React.createElement(Container$b, null,
13954
+ onClickNewStream && React.createElement(DataStreamSelect, { onClickNewStream: onClickNewStream }),
13942
13955
  React.createElement(Search, null),
13943
13956
  React.createElement(Filters$1, null),
13944
13957
  addEntity && (React.createElement(PushToEnd, null,
13945
- React.createElement(AddButton, { "data-id": `add-${addEntity}`, onClick: () => setCurrentModal(addEntity) },
13946
- React.createElement(PlusIcon$1, { fill: theme.colors.primary }),
13947
- React.createElement(Text, { size: 14, family: 'secondary', color: theme.text.primary, weight: 600 },
13948
- "ADD ",
13949
- addEntity))))));
13958
+ React.createElement(AddButton$1, { "data-id": `add-${addEntity}`, onClick: () => setCurrentModal(addEntity), label: `${BUTTON_TEXTS.ADD} ${addEntity}`, variant: 'primary' })))));
13950
13959
  };
13951
13960
 
13961
+ const DataStreamSelectionForm = forwardRef(({ isModal, onClickSummary }, ref) => {
13962
+ const { dataStreams } = useDataStreamStore();
13963
+ const [nameInput, setNameInput] = useState('');
13964
+ useImperativeHandle(ref, () => ({
13965
+ getFormValues: () => ({
13966
+ name: nameInput,
13967
+ }),
13968
+ }));
13969
+ const dataStreamOptions = useMemo(() => dataStreams.map(({ name }) => ({ label: name })), [dataStreams]);
13970
+ return (React.createElement(ModalBody, { "$isNotModal": !isModal, "$minHeight": '70vh' },
13971
+ React.createElement(FlexColumn, { "$gap": 24 },
13972
+ onClickSummary && React.createElement(NoteBackToSummary, { onClick: onClickSummary }),
13973
+ React.createElement(SectionTitle, { title: DISPLAY_TITLES.STREAM_NAME, description: DISPLAY_TITLES.STREAM_DESCRIPTION }),
13974
+ React.createElement(AutocompleteInput, { placeholder: DISPLAY_TITLES.STREAM_NAME_PLACEHOLDER, autoFocus: true, options: dataStreamOptions, defaultText: nameInput, onTextChange: setNameInput }))));
13975
+ });
13976
+
13952
13977
  const buildMonitorsList = (exportedSignals) => Object.keys(exportedSignals)
13953
13978
  .filter((key) => exportedSignals[key])
13954
13979
  .join(', ');
@@ -13957,7 +13982,7 @@ const buildCard$2 = (destination, yamlFields) => {
13957
13982
  const arr = [
13958
13983
  { title: DISPLAY_TITLES.NAME, value: destinationType.displayName },
13959
13984
  { title: DISPLAY_TITLES.TYPE, value: destinationType.type },
13960
- { type: DataCardFieldTypes.Monitors, title: DISPLAY_TITLES.Monitors, value: buildMonitorsList(exportedSignals) },
13985
+ { type: DataCardFieldTypes.Monitors, title: DISPLAY_TITLES.MONITORS, value: buildMonitorsList(exportedSignals) },
13961
13986
  ];
13962
13987
  const parsedFields = safeJsonParse(fields, {});
13963
13988
  const sortedParsedFields = yamlFields.map((field) => ({ key: field.name, value: parsedFields[field.name] ?? null })).filter((item) => item.value !== null) ||
@@ -14022,7 +14047,7 @@ const ActionButton = styled(Button) `
14022
14047
  align-items: center;
14023
14048
  gap: 8px;
14024
14049
 
14025
- ${({ $status, theme }) => $status === 'success'
14050
+ ${({ $status, theme }) => $status === StatusType.Success
14026
14051
  ? css `
14027
14052
  border-color: transparent;
14028
14053
  background-color: ${theme.colors.success};
@@ -14036,27 +14061,26 @@ const ActionButton = styled(Button) `
14036
14061
  background-color: transparent;
14037
14062
  `}
14038
14063
  `;
14039
- const TestConnection = ({ destination, disabled, status, onError, onSuccess, validateForm, testConnection, testLoading, testResult }) => {
14064
+ const TestConnection = ({ destination, disabled, validateForm, status, testConnection, onSuccess, onError }) => {
14040
14065
  const theme = Theme.useTheme();
14041
- useEffect(() => {
14042
- if (testResult) {
14043
- if (testResult.succeeded)
14044
- onSuccess();
14045
- else
14046
- onError();
14047
- }
14048
- }, [testResult]);
14066
+ const [loading, setLoading] = useState(false);
14049
14067
  const onClick = async () => {
14050
- if (validateForm())
14051
- await testConnection(destination);
14068
+ if (validateForm()) {
14069
+ setLoading(true);
14070
+ const testResult = await testConnection(destination);
14071
+ if (testResult) {
14072
+ testResult.succeeded ? onSuccess(testResult) : onError(testResult);
14073
+ }
14074
+ setLoading(false);
14075
+ }
14052
14076
  };
14053
14077
  const Icon = !!status ? getStatusIcon(status, theme) : undefined;
14054
14078
  return (React.createElement(ActionButton, { "$status": status, variant: 'secondary', disabled: disabled, onClick: onClick },
14055
- testLoading ? React.createElement(FadeLoader, null) : Icon ? React.createElement(Icon, null) : null,
14056
- React.createElement(Text, { family: 'secondary', decoration: 'underline', size: 14, color: !!status ? theme.text[status] : undefined }, testLoading ? 'Checking' : status === 'success' ? 'Connection OK' : status === 'error' ? 'Connection Failed' : 'Test Connection')));
14079
+ loading ? React.createElement(FadeLoader, null) : Icon ? React.createElement(Icon, null) : null,
14080
+ React.createElement(Text, { family: 'secondary', decoration: 'underline', size: 14, color: !!status ? theme.text[status] : undefined }, loading ? 'Checking' : status === StatusType.Success ? 'Connection OK' : status === 'error' ? 'Connection Failed' : 'Test Connection')));
14057
14081
  };
14058
14082
 
14059
- const Container$9 = styled(FlexColumn) `
14083
+ const Container$a = styled(FlexColumn) `
14060
14084
  align-items: unset;
14061
14085
  padding: 0 4px;
14062
14086
  `;
@@ -14065,11 +14089,11 @@ const NotesWrapper = styled.div `
14065
14089
  flex-direction: column;
14066
14090
  gap: 12px;
14067
14091
  `;
14068
- const DestinationForm = ({ isUpdate, categoryItem, formData, formErrors, validateForm, handleFormChange, dynamicFields, setDynamicFields, testConnection, testLoading, testResult, }) => {
14092
+ const DestinationForm = ({ isUpdate, categoryItem, formData, formErrors, validateForm, handleFormChange, dynamicFields, setDynamicFields, testConnection }) => {
14069
14093
  const { supportedSignals, testConnectionSupported, displayName } = categoryItem || {};
14070
14094
  const [autoFilled, setAutoFilled] = useState(false);
14071
14095
  const [isFormDirty, setIsFormDirty] = useState(false);
14072
- const [connectionStatus, setConnectionStatus] = useState(undefined);
14096
+ const [connection, setConnection] = useState(undefined);
14073
14097
  const autoFillCheckRef = useRef(false);
14074
14098
  useEffect(() => {
14075
14099
  if (!!dynamicFields.length && !autoFillCheckRef.current) {
@@ -14092,7 +14116,7 @@ const DestinationForm = ({ isUpdate, categoryItem, formData, formErrors, validat
14092
14116
  }, [dynamicFields, isFormDirty]);
14093
14117
  const dirtyForm = () => {
14094
14118
  setIsFormDirty(true);
14095
- setConnectionStatus(undefined);
14119
+ setConnection(undefined);
14096
14120
  };
14097
14121
  const supportedMonitors = useMemo(() => {
14098
14122
  const { logs, metrics, traces } = supportedSignals || {};
@@ -14124,19 +14148,28 @@ const DestinationForm = ({ isUpdate, categoryItem, formData, formErrors, validat
14124
14148
  traces: signals.includes(SignalType.Traces),
14125
14149
  });
14126
14150
  };
14127
- return (React.createElement(Container$9, { "$gap": 24 },
14128
- React.createElement(Container$9, { "$gap": 12 },
14129
- React.createElement(SectionTitle, { title: isUpdate ? 'Update destination' : 'Create destination', description: `Connect ${displayName} with Odigos.`, actionButton: testConnectionSupported && (React.createElement(TestConnection, { destination: formData, disabled: !isFormDirty, validateForm: validateForm, status: connectionStatus, testConnection: testConnection, testLoading: testLoading, testResult: testResult, onError: () => {
14130
- setIsFormDirty(false);
14131
- setConnectionStatus(StatusType.Error);
14132
- }, onSuccess: () => {
14133
- setIsFormDirty(false);
14134
- setConnectionStatus(StatusType.Success);
14135
- } })) }),
14151
+ const onTestConnectionError = (testResult) => {
14152
+ setIsFormDirty(false);
14153
+ setConnection({
14154
+ type: StatusType.Error,
14155
+ title: testResult?.reason || 'Connection failed',
14156
+ message: testResult?.message || 'Please check your input and try again.',
14157
+ });
14158
+ };
14159
+ const onTestConnectionSuccess = (testResult) => {
14160
+ setIsFormDirty(false);
14161
+ setConnection({
14162
+ type: StatusType.Success,
14163
+ title: testResult?.reason || 'Connection succeeded',
14164
+ message: testResult?.message || '',
14165
+ });
14166
+ };
14167
+ return (React.createElement(Container$a, { "$gap": 24 },
14168
+ React.createElement(Container$a, { "$gap": 12 },
14169
+ React.createElement(SectionTitle, { title: isUpdate ? 'Update destination' : 'Create destination', description: `Connect ${displayName} with Odigos.`, actionButton: testConnectionSupported && (React.createElement(TestConnection, { destination: formData, disabled: !isFormDirty, validateForm: validateForm, status: connection?.type, testConnection: testConnection, onError: onTestConnectionError, onSuccess: onTestConnectionSuccess })) }),
14136
14170
  React.createElement(NotesWrapper, null,
14137
- testConnectionSupported && connectionStatus === StatusType.Error && React.createElement(NotificationNote, { type: StatusType.Error, message: 'Connection failed. Please check your input and try again.' }),
14138
- testConnectionSupported && connectionStatus === StatusType.Success && React.createElement(NotificationNote, { type: StatusType.Success, message: 'Connection succeeded.' }),
14139
- autoFilled && !connectionStatus && !isUpdate && React.createElement(NotificationNote, { type: StatusType.Default, message: `Odigos autocompleted ${displayName} destination details.` })),
14171
+ testConnectionSupported && connection && React.createElement(NotificationNote, { type: connection.type, title: connection.title, message: connection.message }),
14172
+ autoFilled && !connection && !isUpdate && React.createElement(NotificationNote, { type: StatusType.Default, message: `Odigos autocompleted ${displayName} destination details.` })),
14140
14173
  React.createElement(Divider, null)),
14141
14174
  React.createElement(MonitorsCheckboxes, { title: isUpdate ? '' : 'This connection will monitor:', required: true, allowedSignals: supportedMonitors, selectedSignals: selectedMonitors, setSelectedSignals: handleSelectedSignals, errorMessage: formErrors['exportedSignals'] }),
14142
14175
  !isUpdate && (React.createElement(Input, { title: 'Destination name', placeholder: 'Enter destination name', value: formData['name'], onChange: (e) => {
@@ -14168,9 +14201,11 @@ const DataContainer$2 = styled.div `
14168
14201
  flex-direction: column;
14169
14202
  gap: 12px;
14170
14203
  `;
14171
- const DestinationDrawer = ({ categories, updateDestination, deleteDestination, testConnection, testLoading, testResult }) => {
14204
+ const DestinationDrawer = ({ categories, updateDestination, deleteDestination, testConnection }) => {
14172
14205
  const { destinations } = useEntityStore();
14206
+ const { selectedStreamName } = useDataStreamStore();
14173
14207
  const { drawerType, drawerEntityId } = useDrawerStore();
14208
+ const destinationsByStream = useMemo(() => filterDestinationsByStream(destinations, selectedStreamName), [destinations, selectedStreamName]);
14174
14209
  const drawerRef = useRef(null);
14175
14210
  const isOpen = drawerType !== EntityTypes.Destination;
14176
14211
  const [isEditing, setIsEditing] = useState(false);
@@ -14184,7 +14219,7 @@ const DestinationDrawer = ({ categories, updateDestination, deleteDestination, t
14184
14219
  const thisItem = useMemo(() => {
14185
14220
  if (isOpen)
14186
14221
  return null;
14187
- const found = destinations?.find((x) => x.id === drawerEntityId);
14222
+ const found = destinationsByStream?.find((x) => x.id === drawerEntityId);
14188
14223
  if (!!found) {
14189
14224
  loadFormWithDrawerItem(found);
14190
14225
  const fields = [];
@@ -14202,7 +14237,7 @@ const DestinationDrawer = ({ categories, updateDestination, deleteDestination, t
14202
14237
  setYamlFields(fields);
14203
14238
  }
14204
14239
  return found;
14205
- }, [isOpen, drawerEntityId, destinations]);
14240
+ }, [isOpen, drawerEntityId, destinationsByStream]);
14206
14241
  if (!thisItem)
14207
14242
  return null;
14208
14243
  const thisOptionType = categories.flatMap((category) => category.items).find((option) => option.type === thisItem.destinationType.type);
@@ -14232,32 +14267,34 @@ const DestinationDrawer = ({ categories, updateDestination, deleteDestination, t
14232
14267
  setIsFormDirty(false);
14233
14268
  }
14234
14269
  };
14235
- return (React.createElement(OverviewDrawer, { ref: drawerRef, title: thisItem.name || thisItem.destinationType.displayName, icons: icon ? [icon] : undefined, iconSrcs: iconSrc ? [iconSrc] : undefined, isEdit: isEditing, isFormDirty: isFormDirty, onEdit: handleEdit, onSave: handleSave, onDelete: handleDelete, onCancel: handleCancel, isLastItem: destinations.length === 1 }, isEditing ? (React.createElement(FormContainer$2, null,
14270
+ return (React.createElement(OverviewDrawer, { ref: drawerRef, title: thisItem.name || thisItem.destinationType.displayName, icons: icon ? [icon] : undefined, iconSrcs: iconSrc ? [iconSrc] : undefined, isEdit: isEditing, isFormDirty: isFormDirty, onEdit: handleEdit, onSave: handleSave, onDelete: handleDelete, onCancel: handleCancel, isLastItem: destinationsByStream.length === 1 }, isEditing ? (React.createElement(FormContainer$2, null,
14236
14271
  React.createElement(DestinationForm, { isUpdate: true, categoryItem: thisOptionType, formData: formData, formErrors: formErrors, handleFormChange: (...params) => {
14237
14272
  setIsFormDirty(true);
14238
14273
  handleFormChange(...params);
14239
14274
  }, dynamicFields: dynamicFields, setDynamicFields: (...params) => {
14240
14275
  setIsFormDirty(true);
14241
14276
  setDynamicFields(...params);
14242
- }, validateForm: validateForm, testConnection: testConnection, testLoading: testLoading, testResult: testResult }))) : (React.createElement(DataContainer$2, null,
14277
+ }, validateForm: validateForm, testConnection: testConnection }))) : (React.createElement(DataContainer$2, null,
14243
14278
  React.createElement(ConditionDetails, { conditions: thisItem.conditions || [] }),
14244
14279
  React.createElement(DataCard, { title: DISPLAY_TITLES.DESTINATION_DETAILS, data: !!thisItem ? buildCard$2(thisItem, yamlFields) : [] })))));
14245
14280
  };
14246
14281
 
14247
- const ListsWrapper$1 = styled.div `
14282
+ const ListsWrapper = styled.div `
14248
14283
  display: flex;
14249
14284
  flex-direction: column;
14250
14285
  gap: 12px;
14251
14286
  `;
14252
- const DestinationsList = ({ items, setSelectedItem }) => {
14287
+ const DestinationsList = ({ items, onSelectOption, onSelectConfigured }) => {
14253
14288
  return items.map((category) => {
14254
- return (React.createElement(ListsWrapper$1, { key: `category-${category.name}` },
14255
- React.createElement(SectionTitle, { size: 'small', title: capitalizeFirstLetter(category.name), description: category.description }),
14256
- category.items.map((item, idx) => {
14289
+ const isAlreadyExisting = category.name === DESTINATION_CATEGORIES['EXISTS']['TITLE'];
14290
+ return (React.createElement(ListsWrapper, { key: `category-${category.name}` },
14291
+ React.createElement(SectionTitle, { size: 'small', icon: category.icon, title: capitalizeFirstLetter(category.name), description: category.description }),
14292
+ category.items.map((item) => {
14257
14293
  const { icon, iconSrc } = getDestinationIcon(item.type);
14258
- return (React.createElement(DataTab, { key: `select-destination-${item.type}-${idx}`, "data-id": `select-destination-${item.type}`, title: item.displayName, hoverText: 'Select', onClick: () => setSelectedItem(item), iconProps: {
14259
- icon,
14260
- iconSrc,
14294
+ return (React.createElement(DataTab, { key: `select-${category.name}-destination-${item.type}`, "data-id": `select-${category.name}-destination-${item.type}`, title: item.displayName, hoverText: 'SELECT', onClick: () => (isAlreadyExisting ? onSelectConfigured(item.id) : onSelectOption(item)), iconProps: { icon, iconSrc }, checkboxProps: {
14295
+ withCheckbox: isAlreadyExisting,
14296
+ isChecked: item.selected,
14297
+ onCheckboxChange: () => onSelectConfigured(item.id),
14261
14298
  }, visualProps: {
14262
14299
  monitors: Object.keys(item.supportedSignals).filter((signal) => item.supportedSignals[signal].supported),
14263
14300
  monitorsWithLabels: true,
@@ -14266,29 +14303,7 @@ const DestinationsList = ({ items, setSelectedItem }) => {
14266
14303
  });
14267
14304
  };
14268
14305
 
14269
- const ListsWrapper = styled.div `
14270
- display: flex;
14271
- flex-direction: column;
14272
- gap: 12px;
14273
- `;
14274
- const PotentialDestinationsList = ({ items, setSelectedItem }) => {
14275
- if (!items.length)
14276
- return null;
14277
- return (React.createElement(ListsWrapper, null,
14278
- React.createElement(SectionTitle, { size: 'small', icon: OdigosLogo, title: 'Detected by Odigos', description: 'Odigos detects destinations for which automatic connection is available. All data will be filled out automatically.' }),
14279
- items.map((item, idx) => {
14280
- const { icon, iconSrc } = getDestinationIcon(item.type);
14281
- return (React.createElement(DataTab, { key: `select-potential-destination-${item.type}-${idx}`, "data-id": `select-potential-destination-${item.type}`, title: item.displayName, hoverText: 'Select', onClick: () => setSelectedItem(item), iconProps: {
14282
- icon,
14283
- iconSrc,
14284
- }, visualProps: {
14285
- monitors: Object.keys(item.supportedSignals).filter((signal) => item.supportedSignals[signal].supported),
14286
- monitorsWithLabels: true,
14287
- } }));
14288
- })));
14289
- };
14290
-
14291
- const Container$8 = styled.div `
14306
+ const Container$9 = styled.div `
14292
14307
  display: flex;
14293
14308
  flex-direction: column;
14294
14309
  gap: 24px;
@@ -14299,7 +14314,7 @@ const Filters = styled.div `
14299
14314
  gap: 12px;
14300
14315
  `;
14301
14316
  const WidthConstraint = styled.div `
14302
- width: 160px;
14317
+ width: 170px;
14303
14318
  margin-right: 8px;
14304
14319
  `;
14305
14320
  const ListsContainer = styled.div `
@@ -14314,22 +14329,60 @@ const ListsContainer = styled.div `
14314
14329
  max-height: calc(100vh - 400px);
14315
14330
  }
14316
14331
  `;
14317
- const NoDataFoundWrapper$1 = styled(Container$8) `
14332
+ const NoDataFoundWrapper = styled(Container$9) `
14318
14333
  margin-top: 80px;
14319
14334
  `;
14335
+ const { MANAGED, SELF_HOSTED, DETECTED, EXISTS } = DESTINATION_CATEGORIES;
14320
14336
  const DROPDOWN_OPTIONS = [
14321
14337
  { value: 'All types', id: 'all' },
14322
- { value: 'Managed', id: 'managed' },
14323
- { value: 'Self-hosted', id: 'self hosted' },
14338
+ { value: MANAGED.TITLE, id: MANAGED.TITLE },
14339
+ { value: SELF_HOSTED.TITLE, id: SELF_HOSTED.TITLE },
14340
+ { value: DETECTED.TITLE, id: DETECTED.TITLE },
14341
+ { value: EXISTS.TITLE, id: EXISTS.TITLE },
14324
14342
  ];
14325
14343
  const DEFAULT_CATEGORY = DROPDOWN_OPTIONS[0];
14326
14344
  const DEFAULT_MONITORS = [SignalType.Logs, SignalType.Metrics, SignalType.Traces];
14327
- const ChooseDestinationBody = ({ hidden, categories, potentialDestinations, onSelect }) => {
14345
+ const createConfiguredItems = (destinations, selectedStreamName, configuredDestinationIds) => destinations.map((dest) => {
14346
+ const { type, displayName } = dest.destinationType;
14347
+ const isInSelectedStream = dest.streamNames?.includes(selectedStreamName);
14348
+ const isConfigured = configuredDestinationIds.has(dest.id);
14349
+ return {
14350
+ id: dest.id,
14351
+ type,
14352
+ displayName,
14353
+ selected: isInSelectedStream || isConfigured,
14354
+ fields: [],
14355
+ testConnectionSupported: false,
14356
+ supportedSignals: {
14357
+ [SignalType.Logs]: { supported: dest.exportedSignals.logs },
14358
+ [SignalType.Metrics]: { supported: dest.exportedSignals.metrics },
14359
+ [SignalType.Traces]: { supported: dest.exportedSignals.traces },
14360
+ },
14361
+ };
14362
+ });
14363
+ const ChooseDestinationBody = ({ hidden, categories, potentialDestinations, onSelectOption, onSelectConfigured }) => {
14364
+ const { destinations } = useEntityStore();
14365
+ const { configuredDestinations } = useSetupStore();
14366
+ const { selectedStreamName } = useDataStreamStore();
14328
14367
  const [search, setSearch] = useState('');
14329
14368
  const [selectedCategory, setSelectedCategory] = useState(DEFAULT_CATEGORY);
14330
14369
  const [selectedMonitors, setSelectedMonitors] = useState(DEFAULT_MONITORS);
14331
14370
  const filteredDestinations = useMemo(() => {
14332
- return categories
14371
+ const clonedDestinationsCategories = deepClone(categories);
14372
+ clonedDestinationsCategories.unshift({
14373
+ name: EXISTS.TITLE,
14374
+ description: EXISTS.DESCRIPTION,
14375
+ icon: CheckIcon,
14376
+ // !! do not "filterDestinationsByStream" here, because we need all destinations to select already configured
14377
+ items: createConfiguredItems(destinations, selectedStreamName, new Set(configuredDestinations.map((d) => d.id))),
14378
+ });
14379
+ clonedDestinationsCategories.unshift({
14380
+ name: DETECTED.TITLE,
14381
+ description: DETECTED.DESCRIPTION,
14382
+ icon: OdigosLogo,
14383
+ items: potentialDestinations,
14384
+ });
14385
+ return clonedDestinationsCategories
14333
14386
  .map((category) => {
14334
14387
  const filteredItems = category.items.filter((item) => {
14335
14388
  const matchesSearch = !search || item.displayName.toLowerCase().includes(search.toLowerCase());
@@ -14340,25 +14393,24 @@ const ChooseDestinationBody = ({ hidden, categories, potentialDestinations, onSe
14340
14393
  return { ...category, items: filteredItems };
14341
14394
  })
14342
14395
  .filter(({ items }) => !!items.length); // Filter out empty categories
14343
- }, [categories, search, selectedCategory, selectedMonitors]);
14396
+ }, [categories, potentialDestinations, destinations, search, selectedCategory, selectedMonitors, selectedStreamName, configuredDestinations]);
14344
14397
  if (hidden)
14345
14398
  return null;
14346
- return (React.createElement(Container$8, null,
14399
+ return (React.createElement(Container$9, null,
14347
14400
  React.createElement(SectionTitle, { title: 'Choose destination', description: 'Add backend destination you want to connect with Odigos.' }),
14348
14401
  React.createElement(Filters, null,
14349
14402
  React.createElement(WidthConstraint, null,
14350
14403
  React.createElement(Input, { placeholder: 'Search...', icon: SearchIcon, value: search, onChange: ({ target: { value } }) => setSearch(value) })),
14351
14404
  React.createElement(WidthConstraint, null,
14352
- React.createElement(Dropdown, { options: DROPDOWN_OPTIONS, value: selectedCategory, onSelect: (opt) => setSelectedCategory(opt), onDeselect: () => { } })),
14405
+ React.createElement(Dropdown, { options: DROPDOWN_OPTIONS, value: selectedCategory, onSelect: setSelectedCategory, onDeselect: () => { } })),
14353
14406
  React.createElement(MonitorsCheckboxes, { title: '', selectedSignals: selectedMonitors, setSelectedSignals: setSelectedMonitors })),
14354
14407
  React.createElement(Divider, null),
14355
- !filteredDestinations.length && !potentialDestinations.length ? (React.createElement(NoDataFoundWrapper$1, null,
14408
+ !filteredDestinations.length ? (React.createElement(NoDataFoundWrapper, null,
14356
14409
  React.createElement(NoDataFound, { title: 'No destinations found' }))) : (React.createElement(ListsContainer, null,
14357
- React.createElement(PotentialDestinationsList, { items: potentialDestinations, setSelectedItem: onSelect }),
14358
- React.createElement(DestinationsList, { items: filteredDestinations, setSelectedItem: onSelect })))));
14410
+ React.createElement(DestinationsList, { items: filteredDestinations, onSelectOption: onSelectOption, onSelectConfigured: onSelectConfigured })))));
14359
14411
  };
14360
14412
 
14361
- const Container$7 = styled.div `
14413
+ const Container$8 = styled.div `
14362
14414
  display: flex;
14363
14415
  `;
14364
14416
  const SideMenuWrapper = styled.div `
@@ -14369,7 +14421,9 @@ const SideMenuWrapper = styled.div `
14369
14421
  display: none;
14370
14422
  }
14371
14423
  `;
14372
- const DestinationModal = ({ isOnboarding, categories, potentialDestinations, createDestination, testConnection, testLoading, testResult }) => {
14424
+ const DestinationModal = ({ isOnboarding, categories, potentialDestinations, createDestination, updateDestination, testConnection }) => {
14425
+ const { destinations } = useEntityStore();
14426
+ const { selectedStreamName } = useDataStreamStore();
14373
14427
  const { addConfiguredDestination } = useSetupStore();
14374
14428
  const { currentModal, setCurrentModal } = useModalStore();
14375
14429
  const isOpen = currentModal === EntityTypes.Destination;
@@ -14378,6 +14432,55 @@ const DestinationModal = ({ isOnboarding, categories, potentialDestinations, cre
14378
14432
  supportedSignals: selectedItem?.supportedSignals,
14379
14433
  preLoadedFields: selectedItem?.fields,
14380
14434
  });
14435
+ const handleAddExisting = (alreadyConfigDest) => {
14436
+ const parsedFields = safeJsonParse(alreadyConfigDest.fields, {});
14437
+ const fieldsArray = Object.entries(parsedFields).map(([key, value]) => ({
14438
+ key,
14439
+ value: String(value),
14440
+ }));
14441
+ const payload = {
14442
+ type: alreadyConfigDest.destinationType.type,
14443
+ name: alreadyConfigDest.destinationType.displayName,
14444
+ currentStreamName: selectedStreamName,
14445
+ exportedSignals: alreadyConfigDest.exportedSignals,
14446
+ fields: fieldsArray,
14447
+ };
14448
+ updateDestination(alreadyConfigDest.id, payload);
14449
+ };
14450
+ const handleAddOnboarding = () => {
14451
+ const fields = {};
14452
+ dynamicFields.forEach((f) => {
14453
+ fields[f.name] = (f.componentType === FieldTypes.Dropdown ? f.value?.value || '' : f.value);
14454
+ });
14455
+ addConfiguredDestination({
14456
+ id: formData.type,
14457
+ name: formData.name,
14458
+ streamNames: [],
14459
+ conditions: [],
14460
+ exportedSignals: formData.exportedSignals,
14461
+ fields: JSON.stringify(fields),
14462
+ destinationType: {
14463
+ type: selectedItem.type,
14464
+ displayName: selectedItem.displayName,
14465
+ supportedSignals: {
14466
+ logs: { supported: false },
14467
+ metrics: { supported: false },
14468
+ traces: { supported: false },
14469
+ },
14470
+ },
14471
+ });
14472
+ };
14473
+ const handleAdd = (alreadyConfigDest) => {
14474
+ // Handle case from already configured
14475
+ if (alreadyConfigDest)
14476
+ return handleAddExisting(alreadyConfigDest);
14477
+ // Handle new cases from onboarding
14478
+ if (isOnboarding)
14479
+ return handleAddOnboarding();
14480
+ // Handle new cases from overview
14481
+ else
14482
+ return createDestination(formData);
14483
+ };
14381
14484
  const handleClose = () => {
14382
14485
  resetFormData();
14383
14486
  setSelectedItem(undefined);
@@ -14387,36 +14490,25 @@ const DestinationModal = ({ isOnboarding, categories, potentialDestinations, cre
14387
14490
  resetFormData();
14388
14491
  setSelectedItem(undefined);
14389
14492
  };
14390
- const handleSelect = (item) => {
14493
+ const handleSelectOption = (item) => {
14391
14494
  resetFormData();
14392
14495
  handleFormChange('type', item?.type || '');
14496
+ handleFormChange('currentStreamName', selectedStreamName);
14393
14497
  setYamlFields(item?.fields || []);
14394
14498
  setSelectedItem(item);
14395
14499
  };
14500
+ const handleSelectConfigured = (id) => {
14501
+ // !! do not "filterDestinationsByStream" here, because we need all destinations to select already configured
14502
+ const foundConfigured = destinations.find((dest) => dest.id === id);
14503
+ if (foundConfigured)
14504
+ handleAdd(foundConfigured);
14505
+ };
14396
14506
  const handleSubmit = async () => {
14397
- const isFormOk = validateForm({ withAlert: !isOnboarding, alertTitle: Crud.Create });
14398
- if (!isFormOk)
14399
- return null;
14400
- if (isOnboarding) {
14401
- const destinationTypeDetails = dynamicFields.map((field) => ({
14402
- title: field.title || '',
14403
- value: (field.componentType === FieldTypes.Dropdown ? field.value?.value || '' : field.value),
14404
- }));
14405
- destinationTypeDetails.unshift({
14406
- title: 'Destination name',
14407
- value: formData.name,
14408
- });
14409
- const storedDestination = {
14410
- type: selectedItem.type,
14411
- displayName: selectedItem.displayName,
14412
- exportedSignals: formData.exportedSignals,
14413
- destinationTypeDetails,
14414
- category: '', // Could be handled in a more dynamic way if needed
14415
- };
14416
- addConfiguredDestination({ stored: storedDestination, form: formData });
14417
- }
14418
- else {
14419
- createDestination(formData);
14507
+ if (selectedItem) {
14508
+ const isFormValid = validateForm({ withAlert: !isOnboarding, alertTitle: Crud.Create });
14509
+ if (!isFormValid)
14510
+ return null;
14511
+ handleAdd();
14420
14512
  }
14421
14513
  handleClose();
14422
14514
  };
@@ -14426,10 +14518,9 @@ const DestinationModal = ({ isOnboarding, categories, potentialDestinations, cre
14426
14518
  label: 'DONE',
14427
14519
  variant: 'primary',
14428
14520
  onClick: handleSubmit,
14429
- disabled: !selectedItem,
14430
14521
  },
14431
14522
  ];
14432
- if (!!selectedItem) {
14523
+ if (selectedItem) {
14433
14524
  buttons.unshift({
14434
14525
  label: 'BACK',
14435
14526
  icon: ArrowIcon,
@@ -14440,105 +14531,104 @@ const DestinationModal = ({ isOnboarding, categories, potentialDestinations, cre
14440
14531
  return buttons;
14441
14532
  };
14442
14533
  useKeyDown({ key: 'Enter', active: isOpen }, () => handleSubmit());
14443
- return (React.createElement(Modal, { isOpen: isOpen, onClose: handleClose, header: { title: 'Add Destination' }, actionComponent: React.createElement(NavigationButtons, { buttons: renderHeaderButtons() }) },
14444
- React.createElement(Container$7, null,
14534
+ return (React.createElement(Modal, { isOpen: isOpen, onClose: handleClose, header: { title: DISPLAY_TITLES.ADD_DESTINATION }, actionComponent: React.createElement(NavigationButtons, { buttons: renderHeaderButtons() }) },
14535
+ React.createElement(Container$8, null,
14445
14536
  React.createElement(SideMenuWrapper, null,
14446
- React.createElement(Stepper, { currentStep: !!selectedItem ? 2 : 1, data: [
14447
- { stepNumber: 1, title: 'Destinations' },
14448
- { stepNumber: 2, title: 'CONNECTION' },
14537
+ React.createElement(Stepper, { currentStep: selectedItem ? 2 : 1, data: [
14538
+ { stepNumber: 1, title: DISPLAY_TITLES.DESTINATIONS },
14539
+ { stepNumber: 2, title: DISPLAY_TITLES.CONNECTION },
14449
14540
  ] })),
14450
14541
  React.createElement(ModalBody, { style: { margin: '32px 24px 12px 24px' } },
14451
- React.createElement(ChooseDestinationBody, { hidden: !!selectedItem, categories: categories, potentialDestinations: potentialDestinations, onSelect: handleSelect }),
14452
- !!selectedItem && (React.createElement(DestinationForm, { categoryItem: selectedItem, formData: formData, formErrors: formErrors, handleFormChange: handleFormChange, dynamicFields: dynamicFields, setDynamicFields: setDynamicFields, validateForm: validateForm, testConnection: testConnection, testLoading: testLoading, testResult: testResult }))))));
14542
+ React.createElement(ChooseDestinationBody, { hidden: selectedItem !== undefined, categories: categories, potentialDestinations: potentialDestinations, onSelectOption: handleSelectOption, onSelectConfigured: handleSelectConfigured }),
14543
+ selectedItem && (React.createElement(DestinationForm, { categoryItem: selectedItem, formData: formData, formErrors: formErrors, handleFormChange: handleFormChange, dynamicFields: dynamicFields, setDynamicFields: setDynamicFields, validateForm: validateForm, testConnection: testConnection }))))));
14453
14544
  };
14454
14545
 
14455
- const Container$6 = styled.div `
14546
+ const Container$7 = styled.div `
14456
14547
  display: flex;
14457
14548
  flex-direction: column;
14458
- align-items: flex-start;
14549
+ align-items: center;
14459
14550
  gap: 12px;
14460
- margin-top: 24px;
14461
- max-height: calc(100vh - 400px);
14462
- height: 100%;
14463
- overflow-x: hidden;
14551
+ width: 100%;
14552
+ max-height: calc(100vh - 310px);
14553
+ height: fit-content;
14464
14554
  overflow-y: scroll;
14465
14555
  `;
14466
- const ConfiguredList = () => {
14556
+ const DestinationList = ({ withDelete }) => {
14467
14557
  const { configuredDestinations } = useSetupStore();
14468
- return (React.createElement(Container$6, null, configuredDestinations.map(({ stored }, idx) => (React.createElement(ListItem, { key: `selected-destination-${stored.type}-${idx}`, "data-id": `selected-destination-${stored.type}`, item: stored, isLastItem: configuredDestinations.length === 1 })))));
14558
+ if (!configuredDestinations.length) {
14559
+ return (React.createElement(CenterThis, null,
14560
+ React.createElement(NoDataFound, { title: 'No destinations', subTitle: 'Please add a destination' })));
14561
+ }
14562
+ return (React.createElement(Container$7, null, configuredDestinations.map((dest, idx) => (React.createElement(ListItem, { key: `configured-destination-${dest.destinationType.type}-${idx}`, "data-id": `configured-destination-${dest.destinationType.type}`, item: dest, isLastItem: configuredDestinations.length === 1, withDelete: withDelete })))));
14469
14563
  };
14470
- const ListItem = ({ item, isLastItem }) => {
14564
+ const ListItem = ({ item, isLastItem, withDelete }) => {
14471
14565
  const { removeConfiguredDestination } = useSetupStore();
14472
14566
  const [deleteWarning, setDeleteWarning] = useState(false);
14473
- const { icon, iconSrc } = getDestinationIcon(item.type);
14567
+ const { icon, iconSrc } = getDestinationIcon(item.destinationType.type);
14568
+ const mappedFields = useMemo(() => Object.entries(safeJsonParse(item.fields, {})).map(([k, v]) => ({ title: k, value: v })) || [], [item.fields]);
14474
14569
  return (React.createElement(React.Fragment, null,
14475
- React.createElement(DataTab, { title: item.displayName, iconProps: {
14476
- icon,
14477
- iconSrc,
14478
- }, visualProps: {
14479
- monitors: Object.keys(item.exportedSignals).filter((signal) => item.exportedSignals[signal] === true),
14570
+ React.createElement(DataTab, { title: item.destinationType.displayName || item.name, subTitle: item.destinationType.type, iconProps: { icon, iconSrc }, visualProps: {
14571
+ monitors: mapExportedSignals(item.exportedSignals),
14480
14572
  monitorsWithLabels: true,
14481
14573
  }, extendableProps: {
14482
14574
  withExtend: true,
14483
- renderExtended: () => React.createElement(DataCardFields, { data: item.destinationTypeDetails }),
14484
- }, renderActions: () => (React.createElement(IconButton, { onClick: () => setDeleteWarning(true) },
14485
- React.createElement(TrashIcon, null))) }),
14486
- React.createElement(DeleteWarning, { isOpen: deleteWarning, name: item.displayName || item.type, type: EntityTypes.Destination, isLastItem: isLastItem, onApprove: () => removeConfiguredDestination(item), onDeny: () => setDeleteWarning(false) })));
14575
+ renderExtended: () => React.createElement(DataCardFields, { data: mappedFields }),
14576
+ }, renderActions: withDelete
14577
+ ? () => (React.createElement(IconButton, { onClick: () => setDeleteWarning(true) },
14578
+ React.createElement(TrashIcon, null)))
14579
+ : undefined }),
14580
+ withDelete && (React.createElement(DeleteWarning, { isOpen: deleteWarning, name: item.destinationType.displayName || item.name, type: EntityTypes.Destination, isLastItem: isLastItem, onApprove: () => removeConfiguredDestination(item), onDeny: () => setDeleteWarning(false) }))));
14487
14581
  };
14488
14582
 
14489
- const ContentWrapper = styled.div `
14490
- width: 640px;
14491
- padding-top: 64px;
14492
- `;
14493
- const NotificationNoteWrapper = styled.div `
14494
- margin-top: 24px;
14495
- `;
14496
- const AddDestinationButtonWrapper = styled.div `
14497
- width: 100%;
14498
- margin-top: 24px;
14499
- `;
14500
- const StyledAddDestinationButton = styled(Button) `
14583
+ const LargeAndWideAddButton = styled(Button) `
14501
14584
  display: flex;
14502
14585
  align-items: center;
14503
14586
  justify-content: center;
14504
14587
  gap: 8px;
14505
14588
  width: 100%;
14589
+ padding: 32px;
14590
+ border-radius: 16px;
14591
+ border-style: dashed !important;
14506
14592
  `;
14507
- const DestinationSelectionForm = ({ categories, potentialDestinations, createDestination, isLoading, testConnection, testLoading, testResult, isSourcesListEmpty, goToSources, }) => {
14593
+ const DestinationSelectionForm = ({ isSourcesListEmpty, goToSources, categories, potentialDestinations, updateDestination, testConnection, onClickSummary }) => {
14508
14594
  const theme = Theme.useTheme();
14509
14595
  const { setCurrentModal } = useModalStore();
14596
+ const { configuredDestinations } = useSetupStore();
14510
14597
  const onOpen = () => setCurrentModal(EntityTypes.Destination);
14511
- return (React.createElement(ContentWrapper, null,
14512
- React.createElement(SectionTitle, { title: 'Configure destinations', description: 'Select destinations where telemetry data will be sent and configure their settings.' }),
14513
- !isLoading && isSourcesListEmpty && (React.createElement(NotificationNoteWrapper, null,
14514
- React.createElement(NotificationNote, { type: StatusType.Warning, message: 'No sources selected. Please go back to select sources.', action: {
14515
- label: 'Select Sources',
14516
- onClick: goToSources,
14517
- } }))),
14518
- React.createElement(AddDestinationButtonWrapper, null,
14519
- React.createElement(StyledAddDestinationButton, { variant: 'secondary', disabled: isLoading, onClick: onOpen },
14520
- React.createElement(PlusIcon$1, null),
14521
- React.createElement(Text, { color: theme.colors.secondary, size: 14, decoration: 'underline', family: 'secondary' }, "ADD Destination")),
14522
- React.createElement(DestinationModal, { isOnboarding: true, categories: categories, potentialDestinations: potentialDestinations, createDestination: createDestination, testConnection: testConnection, testLoading: testLoading, testResult: testResult })),
14523
- isLoading ? (React.createElement(CenterThis, null,
14524
- React.createElement(FadeLoader, { scale: 2, cssOverride: { marginTop: '3rem' } }))) : (React.createElement(ConfiguredList, null))));
14598
+ return (React.createElement(React.Fragment, null,
14599
+ React.createElement(ModalBody, { "$isNotModal": true },
14600
+ React.createElement(FlexColumn, { "$gap": 12 },
14601
+ React.createElement(FlexColumn, { "$gap": 24 },
14602
+ onClickSummary && React.createElement(NoteBackToSummary, { onClick: onClickSummary }),
14603
+ React.createElement(SectionTitle, { title: DISPLAY_TITLES.ADD_DESTINATIONS, badgeLabel: configuredDestinations.length, description: DISPLAY_TITLES.ADD_DESTINATION_DESCRIPTION }),
14604
+ isSourcesListEmpty && (React.createElement(NotificationNote, { type: StatusType.Warning, message: DISPLAY_TITLES.NO_SOURCES_GO_BACK, action: {
14605
+ label: DISPLAY_TITLES.SELECT_SOURCES,
14606
+ onClick: goToSources,
14607
+ } })),
14608
+ React.createElement(LargeAndWideAddButton, { variant: 'secondary', onClick: onOpen },
14609
+ React.createElement(PlusIcon$1, null),
14610
+ React.createElement(Text, { color: theme.colors.secondary, size: 14, decoration: 'underline', family: 'secondary' }, DISPLAY_TITLES.ADD_DESTINATION))),
14611
+ React.createElement(DestinationList, { withDelete: true }))),
14612
+ React.createElement(DestinationModal, { isOnboarding: true, categories: categories, potentialDestinations: potentialDestinations, createDestination: () => { }, updateDestination: updateDestination, testConnection: testConnection })));
14525
14613
  };
14526
14614
 
14527
14615
  const columns$2 = [
14528
14616
  { key: 'icon', title: '' },
14529
14617
  { key: 'name', title: DISPLAY_TITLES.NAME, sortable: true },
14530
14618
  { key: 'type', title: DISPLAY_TITLES.TYPE, sortable: true },
14531
- { key: 'signals', title: DISPLAY_TITLES.Monitors },
14619
+ { key: 'signals', title: DISPLAY_TITLES.MONITORS },
14532
14620
  { key: 'conditions', title: 'Conditions' },
14533
14621
  { key: 'throughput', title: 'Throughput', sortable: true },
14534
14622
  ];
14535
14623
  const DestinationTable = ({ metrics, maxHeight, maxWidth }) => {
14536
14624
  const theme = Theme.useTheme();
14537
14625
  const filters = useFilterStore();
14538
- const { destinations, destinationsLoading } = useEntityStore();
14626
+ const { selectedStreamName } = useDataStreamStore();
14539
14627
  const { setDrawerType, setDrawerEntityId } = useDrawerStore();
14540
- const filtered = useMemo(() => filterDestinations(destinations, filters), [destinations, filters]);
14541
- const rows = useMemo(() => filtered.map((dest) => {
14628
+ const { destinations, destinationsLoading } = useEntityStore();
14629
+ const destinationsByStream = useMemo(() => filterDestinationsByStream(destinations, selectedStreamName), [destinations, selectedStreamName]);
14630
+ const filteredDestinations = useMemo(() => filterDestinations(destinationsByStream, filters), [destinationsByStream, filters]);
14631
+ const rows = useMemo(() => filteredDestinations.map((dest) => {
14542
14632
  const { hasErrors, hasWarnings, hasDisableds } = getConditionsBooleans(dest.conditions || []);
14543
14633
  const { icon, iconSrc } = getDestinationIcon(dest.destinationType.type);
14544
14634
  return {
@@ -14573,19 +14663,29 @@ const DestinationTable = ({ metrics, maxHeight, maxWidth }) => {
14573
14663
  },
14574
14664
  {
14575
14665
  columnKey: 'signals',
14576
- component: () => React.createElement(MonitorsIcons, { withLabels: true, monitors: Object.keys(dest.exportedSignals).filter((signal) => dest.exportedSignals[signal] === true) }),
14666
+ component: () => React.createElement(MonitorsIcons, { withLabels: true, monitors: mapExportedSignals(dest.exportedSignals) }),
14577
14667
  },
14578
14668
  ],
14579
14669
  };
14580
- }), [filtered, metrics]);
14581
- const badge = useMemo(() => (filtered.length !== destinations.length ? `${filtered.length}/${destinations.length}` : destinations.length), [filtered, destinations]);
14582
- const badgeTooltip = useMemo(() => (filtered.length !== destinations.length ? DISPLAY_TITLES.FILTERED_COUNT_TOOLTIP : undefined), [filtered, destinations]);
14670
+ }), [filteredDestinations, metrics]);
14671
+ const { badge, badgeTooltip } = useMemo(() => {
14672
+ if (filteredDestinations.length !== destinationsByStream.length) {
14673
+ return {
14674
+ badge: `${filteredDestinations.length}/${destinationsByStream.length}`,
14675
+ badgeTooltip: DISPLAY_TITLES.FILTERED_COUNT_TOOLTIP,
14676
+ };
14677
+ }
14678
+ return {
14679
+ badge: destinationsByStream.length,
14680
+ badgeTooltip: undefined,
14681
+ };
14682
+ }, [filteredDestinations, destinationsByStream]);
14583
14683
  return (React.createElement(TableContainer, { "$maxWidth": maxWidth },
14584
14684
  React.createElement(TableTitleWrap, null,
14585
- React.createElement(IconTitleBadge, { icon: getEntityIcon(EntityTypes.Destination), title: DISPLAY_TITLES.Destinations, badge: badge, badgeTooltip: badgeTooltip, loading: destinationsLoading })),
14685
+ React.createElement(IconTitleBadge, { icon: getEntityIcon(EntityTypes.Destination), title: DISPLAY_TITLES.DESTINATIONS, badge: badge, badgeTooltip: badgeTooltip, loading: destinationsLoading })),
14586
14686
  React.createElement(TableWrap, { "$maxHeight": maxHeight },
14587
14687
  React.createElement(InteractiveTable, { columns: columns$2, rows: rows })),
14588
- !filtered.length && (React.createElement(CenterThis, { style: { marginTop: '2rem' } },
14688
+ !filteredDestinations.length && (React.createElement(CenterThis, { style: { marginTop: '2rem' } },
14589
14689
  React.createElement(NoDataFound, null)))));
14590
14690
  };
14591
14691
 
@@ -14786,7 +14886,7 @@ const CustomFields = ({ ruleType, value, setValue, formErrors }) => {
14786
14886
  return Component ? React.createElement(Component, { value: value, setValue: setValue, formErrors: formErrors }) : null;
14787
14887
  };
14788
14888
 
14789
- const Container$5 = styled.div `
14889
+ const Container$6 = styled.div `
14790
14890
  display: flex;
14791
14891
  flex-direction: column;
14792
14892
  gap: 24px;
@@ -14797,7 +14897,7 @@ const FieldTitle = styled(Text) `
14797
14897
  `;
14798
14898
  const InstrumentationRuleForm = ({ isUpdate, rule, formData, formErrors, handleFormChange }) => {
14799
14899
  const theme = Theme.useTheme();
14800
- return (React.createElement(Container$5, null,
14900
+ return (React.createElement(Container$6, null,
14801
14901
  isUpdate && (React.createElement("div", null,
14802
14902
  React.createElement(FieldTitle, null, "Status"),
14803
14903
  React.createElement(Segment, { options: [
@@ -15019,14 +15119,14 @@ const InstrumentationRuleTable = ({ maxHeight, maxWidth }) => {
15019
15119
  }), [instrumentationRules]);
15020
15120
  return (React.createElement(TableContainer, { "$maxWidth": maxWidth },
15021
15121
  React.createElement(TableTitleWrap, null,
15022
- React.createElement(IconTitleBadge, { icon: getEntityIcon(EntityTypes.Action), title: DISPLAY_TITLES.InstrumentationRules, badge: instrumentationRules.length, loading: instrumentationRulesLoading })),
15122
+ React.createElement(IconTitleBadge, { icon: getEntityIcon(EntityTypes.Action), title: DISPLAY_TITLES.INSTRUMENTATION_RULES, badge: instrumentationRules.length, loading: instrumentationRulesLoading })),
15023
15123
  React.createElement(TableWrap, { "$maxHeight": maxHeight },
15024
15124
  React.createElement(InteractiveTable, { columns: columns$1, rows: rows })),
15025
15125
  !instrumentationRules.length && (React.createElement(CenterThis, { style: { marginTop: '2rem' } },
15026
15126
  React.createElement(NoDataFound, null)))));
15027
15127
  };
15028
15128
 
15029
- const Container$4 = styled.div `
15129
+ const Container$5 = styled.div `
15030
15130
  position: fixed;
15031
15131
  bottom: 0;
15032
15132
  left: 50%;
@@ -15043,7 +15143,7 @@ const Container$4 = styled.div `
15043
15143
  const MultiSourceControl = ({ totalSourceCount, uninstrumentSources }) => {
15044
15144
  const theme = Theme.useTheme();
15045
15145
  const Transition = useTransition({
15046
- container: Container$4,
15146
+ container: Container$5,
15047
15147
  animateIn: Theme.animations.slide.in['center'],
15048
15148
  animateOut: Theme.animations.slide.out['center'],
15049
15149
  });
@@ -15222,6 +15322,124 @@ const NotificationListItem = ({ id, seen, type, title, message, time, crdType, t
15222
15322
  React.createElement(Text, { size: 10, color: theme.colors.orange_soft }, "new")))))));
15223
15323
  };
15224
15324
 
15325
+ const Container$4 = styled.div `
15326
+ display: flex;
15327
+ flex-direction: column;
15328
+ align-items: center;
15329
+
15330
+ gap: 12px;
15331
+ width: 100%;
15332
+ max-height: ${({ $isModal }) => ($isModal ? 'calc(100vh - 510px)' : 'calc(100vh - 310px)')};
15333
+ height: fit-content;
15334
+ overflow-y: scroll;
15335
+ `;
15336
+ const Group = styled.div `
15337
+ width: 100%;
15338
+ padding-bottom: ${({ $isOpen }) => ($isOpen ? '18px' : '0')};
15339
+ border-radius: 16px;
15340
+ background-color: ${({ $selected, theme }) => ($selected ? theme.colors.majestic_blue + Theme.opacity.hex['024'] : theme.colors.dropdown_bg_2 + Theme.opacity.hex['040'])};
15341
+ `;
15342
+ const NamespaceItem = styled.div `
15343
+ display: flex;
15344
+ justify-content: space-between;
15345
+ gap: 12px;
15346
+ margin: 0;
15347
+ padding: 18px;
15348
+ border-radius: 16px;
15349
+ cursor: ${({ $withClick }) => ($withClick ? 'pointer' : 'unset')};
15350
+ &:hover {
15351
+ background-color: ${({ $withClick, $selected, theme }) => $withClick && ($selected ? theme.colors.majestic_blue + Theme.opacity.hex['040'] : theme.colors.dropdown_bg_2 + Theme.opacity.hex['080'])};
15352
+ transition: background-color 0.3s;
15353
+ }
15354
+ `;
15355
+ const SourceItem = styled(NamespaceItem) `
15356
+ width: calc(100% - 50px);
15357
+ margin-left: auto;
15358
+ padding: 8px;
15359
+ `;
15360
+ const RelativeWrapper = styled.div `
15361
+ position: relative;
15362
+ padding-bottom: ${({ $addPadding }) => ($addPadding ? '16px' : '0')};
15363
+ `;
15364
+ const AbsoluteWrapper = styled.div `
15365
+ position: absolute;
15366
+ top: 6px;
15367
+ left: 18px;
15368
+ `;
15369
+ const NotSourcesWrapper = styled(CenterThis) `
15370
+ padding-bottom: ${({ $addPadding }) => ($addPadding ? '16px' : '0')};
15371
+ `;
15372
+ const SelectionCount = styled(Text) `
15373
+ width: 18px;
15374
+ `;
15375
+ const SourceList = ({ isModal = false, withInstances = true, filteredNamespacesAndSources, selectedNamespace, onSelectNamespace, selectedSources, onSelectSource }) => {
15376
+ const theme = Theme.useTheme();
15377
+ const { namespacesLoading } = useEntityStore();
15378
+ const matrix = Object.entries(filteredNamespacesAndSources || {});
15379
+ if (!matrix?.length) {
15380
+ return (React.createElement(CenterThis, null, namespacesLoading ? (React.createElement(FadeLoader, null)) : (React.createElement(NoDataFound, { title: DISPLAY_TITLES.NO_SOURCES, subTitle: onSelectNamespace ? DISPLAY_TITLES.PLEASE_MAKE_SURE_UNIGNORED_NAMESPACES : DISPLAY_TITLES.PLEASE_ADD_SOURCE }))));
15381
+ }
15382
+ return (React.createElement(Container$4, { "$isModal": isModal }, matrix.map(([namespace, sources]) => {
15383
+ const sourcesForNamespace = selectedSources?.[namespace] || [];
15384
+ const onlySelectedSources = sourcesForNamespace.filter(({ selected }) => selected);
15385
+ const isNamespaceLoaded = sourcesForNamespace.length > 0;
15386
+ const isNamespaceSelected = selectedNamespace === namespace;
15387
+ const isNamespaceAllSourcesSelected = onlySelectedSources.length > 0 && onlySelectedSources.length === sources.length;
15388
+ const isNamespacePartiallySourcesSelected = onlySelectedSources.length > 0 && onlySelectedSources.length !== sources.length;
15389
+ const hasSources = sources.length > 0;
15390
+ if (!onSelectNamespace && !hasSources)
15391
+ return null;
15392
+ return (React.createElement(Group, { key: `namespace-${namespace}`, "data-id": `namespace-${namespace}`, "$selected": isNamespaceAllSourcesSelected, "$isOpen": isNamespaceSelected },
15393
+ React.createElement(NamespaceItem, { "$selected": isNamespaceAllSourcesSelected, "$withClick": !!onSelectNamespace, onClick: () => onSelectNamespace?.(namespace) },
15394
+ React.createElement(FlexRow, { "$gap": 12 },
15395
+ onSelectNamespace && React.createElement(Checkbox, { partiallyChecked: isNamespacePartiallySourcesSelected, value: isNamespaceAllSourcesSelected, onChange: (bool) => onSelectNamespace(namespace, bool) }),
15396
+ React.createElement(Text, null, namespace)),
15397
+ React.createElement(FlexRow, { "$gap": 12 },
15398
+ React.createElement(SelectionCount, { size: 10, color: theme.text.grey }, isNamespaceLoaded ? `${onlySelectedSources.length}/${sources.length}` : null),
15399
+ onSelectNamespace && React.createElement(ExtendArrow, { extend: isNamespaceSelected }))),
15400
+ (isNamespaceSelected || !onSelectNamespace) &&
15401
+ (hasSources ? (React.createElement(RelativeWrapper, { "$addPadding": !onSelectSource },
15402
+ React.createElement(AbsoluteWrapper, null,
15403
+ React.createElement(Divider, { orientation: 'vertical', length: `${(sources.length || 0) * 36}px` })),
15404
+ sources.map((source) => {
15405
+ const isSourceSelected = onlySelectedSources.some(({ name }) => name === source.name);
15406
+ return React.createElement(SourceRow, { key: `source-${source.name}`, withInstances: withInstances, source: source, namespace: namespace, isSelected: isSourceSelected, onSelect: onSelectSource });
15407
+ }))) : (React.createElement(NotSourcesWrapper, { "$addPadding": !onSelectSource }, namespacesLoading ? React.createElement(FadeLoader, null) : React.createElement(NoDataFound, { title: DISPLAY_TITLES.NO_SOURCES_NAMESPACE, subTitle: DISPLAY_TITLES.TRY_SEARCH_OR_OTHER_NAMESPACE }))))));
15408
+ })));
15409
+ };
15410
+ const SourceRow = ({ withInstances, source, namespace, isSelected, onSelect, }) => {
15411
+ return (React.createElement(SourceItem, { "data-id": `source-${source.name}`, "$selected": isSelected, "$withClick": !!onSelect, onClick: () => onSelect?.(source) },
15412
+ React.createElement(FlexRow, { "$gap": 12 },
15413
+ onSelect && React.createElement(Checkbox, { value: isSelected, onChange: () => onSelect(source, namespace) }),
15414
+ React.createElement(Text, null, source.name),
15415
+ React.createElement(Text, { opacity: 0.8, size: 10 },
15416
+ withInstances ? `${source.numberOfInstances || 0} running instance${source.numberOfInstances !== 1 ? 's' : ''} • ` : '',
15417
+ source.kind))));
15418
+ };
15419
+
15420
+ const Container$3 = styled.div `
15421
+ display: flex;
15422
+ flex-direction: column;
15423
+ align-items: center;
15424
+ gap: 12px;
15425
+ width: 100%;
15426
+ max-height: calc(100vh - 200px);
15427
+ height: fit-content;
15428
+ overflow-y: scroll;
15429
+ `;
15430
+ const SetupSummary = ({ onEditSources, onEditDestinations }) => {
15431
+ const { configuredSources, configuredDestinations } = useSetupStore();
15432
+ const sourceCount = useMemo(() => Object.values(configuredSources).reduce((total, sourceList) => total + sourceList.filter((s) => s.selected).length, 0), [configuredSources]);
15433
+ return (React.createElement(ModalBody, { "$isNotModal": true },
15434
+ React.createElement(FlexColumn, { "$gap": 12 },
15435
+ React.createElement(SectionTitle, { title: DISPLAY_TITLES.SUMMARY, description: DISPLAY_TITLES.STREAM_CONFIRM }),
15436
+ React.createElement(Container$3, null,
15437
+ React.createElement(DataCard, { title: DISPLAY_TITLES.SELECTED_SOURCES, titleBadge: sourceCount, action: () => React.createElement(EditButton, { onClick: onEditSources }) },
15438
+ React.createElement(SourceList, { filteredNamespacesAndSources: configuredSources, withInstances: false })),
15439
+ React.createElement(DataCard, { title: DISPLAY_TITLES.SELECTED_DESTINATIONS, titleBadge: configuredDestinations.length, action: () => React.createElement(EditButton, { onClick: onEditDestinations }) },
15440
+ React.createElement(DestinationList, null))))));
15441
+ };
15442
+
15225
15443
  var NavIconIds;
15226
15444
  (function (NavIconIds) {
15227
15445
  NavIconIds["Overview"] = "overview";
@@ -15385,21 +15603,21 @@ const Describe$1 = ({ source, fetchDescribeSource }) => {
15385
15603
  const buildCard = (source) => {
15386
15604
  const { name, kind, namespace } = source;
15387
15605
  const arr = [
15388
- { title: DISPLAY_TITLES.Namespace, value: namespace },
15606
+ { title: DISPLAY_TITLES.NAMESPACE, value: namespace },
15389
15607
  { title: DISPLAY_TITLES.KIND, value: kind },
15390
15608
  { title: DISPLAY_TITLES.NAME, value: name, tooltip: 'K8s resource name' },
15391
15609
  ];
15392
15610
  return arr;
15393
15611
  };
15394
15612
 
15395
- const Container$3 = styled.div `
15613
+ const Container$2 = styled.div `
15396
15614
  display: flex;
15397
15615
  flex-direction: column;
15398
15616
  gap: 24px;
15399
15617
  padding: 4px;
15400
15618
  `;
15401
15619
  const SourceForm = ({ formData, handleFormChange }) => {
15402
- return (React.createElement(Container$3, null,
15620
+ return (React.createElement(Container$2, null,
15403
15621
  React.createElement(Input, { name: 'sourceName', title: 'Source name', tooltip: 'This overrides the default service name that runs in your cluster.', placeholder: 'Use a name that overrides the source name', value: formData.otelServiceName, onChange: ({ target: { value } }) => handleFormChange('otelServiceName', value) })));
15404
15622
  };
15405
15623
 
@@ -15422,7 +15640,9 @@ const DataContainer$1 = styled.div `
15422
15640
  `;
15423
15641
  const SourceDrawer = ({ persistSources, updateSource, fetchDescribeSource }) => {
15424
15642
  const { sources } = useEntityStore();
15643
+ const { selectedStreamName } = useDataStreamStore();
15425
15644
  const { drawerType, drawerEntityId } = useDrawerStore();
15645
+ const sourcesByStream = useMemo(() => filterSourcesByStream(sources, selectedStreamName), [sources, selectedStreamName]);
15426
15646
  const drawerRef = useRef(null);
15427
15647
  const isOpen = drawerType !== EntityTypes.Source;
15428
15648
  const [isEditing, setIsEditing] = useState(false);
@@ -15432,11 +15652,11 @@ const SourceDrawer = ({ persistSources, updateSource, fetchDescribeSource }) =>
15432
15652
  const thisItem = useMemo(() => {
15433
15653
  if (isOpen)
15434
15654
  return null;
15435
- const found = sources?.find((x) => x.namespace === drawerEntityId.namespace && x.name === drawerEntityId.name && x.kind === drawerEntityId.kind);
15655
+ const found = sourcesByStream?.find((x) => x.namespace === drawerEntityId.namespace && x.name === drawerEntityId.name && x.kind === drawerEntityId.kind);
15436
15656
  if (!!found)
15437
15657
  loadFormWithDrawerItem(found);
15438
15658
  return found;
15439
- }, [isOpen, drawerEntityId, sources]);
15659
+ }, [isOpen, drawerEntityId, sourcesByStream]);
15440
15660
  if (!thisItem)
15441
15661
  return null;
15442
15662
  const containersData = thisItem.containers?.map((container) => ({
@@ -15453,7 +15673,7 @@ const SourceDrawer = ({ persistSources, updateSource, fetchDescribeSource }) =>
15453
15673
  };
15454
15674
  const handleDelete = async () => {
15455
15675
  const { namespace } = thisItem;
15456
- persistSources({ [namespace]: [{ ...thisItem, selected: false }] }, {});
15676
+ persistSources({ [namespace]: [{ ...thisItem, selected: false, currentStreamName: selectedStreamName }] }, {});
15457
15677
  setIsFormDirty(false);
15458
15678
  setIsEditing(false);
15459
15679
  resetFormData();
@@ -15467,7 +15687,7 @@ const SourceDrawer = ({ persistSources, updateSource, fetchDescribeSource }) =>
15467
15687
  setIsFormDirty(false);
15468
15688
  setIsEditing(false);
15469
15689
  };
15470
- return (React.createElement(OverviewDrawer, { ref: drawerRef, title: thisItem.otelServiceName || thisItem.name, titleTooltip: 'This attribute is used to identify the name of the service (service.name) that is generating telemetry data.', icons: getContainersIcons(thisItem.containers), isEdit: isEditing, isFormDirty: isFormDirty, onEdit: selectedTab === Tabs.Overview ? handleEdit : undefined, onSave: handleSave, onDelete: selectedTab === Tabs.Overview ? handleDelete : undefined, onCancel: handleCancel, isLastItem: sources.length === 1, tabs: [
15690
+ return (React.createElement(OverviewDrawer, { ref: drawerRef, title: thisItem.otelServiceName || thisItem.name, titleTooltip: 'This attribute is used to identify the name of the service (service.name) that is generating telemetry data.', icons: getContainersIcons(thisItem.containers), isEdit: isEditing, isFormDirty: isFormDirty, onEdit: selectedTab === Tabs.Overview ? handleEdit : undefined, onSave: handleSave, onDelete: selectedTab === Tabs.Overview ? handleDelete : undefined, onCancel: handleCancel, isLastItem: sourcesByStream.length === 1, tabs: [
15471
15691
  {
15472
15692
  label: Tabs.Overview,
15473
15693
  onClick: () => setSelectedTab(Tabs.Overview),
@@ -15482,137 +15702,22 @@ const SourceDrawer = ({ persistSources, updateSource, fetchDescribeSource }) =>
15482
15702
  React.createElement(SourceForm, { formData: formData, handleFormChange: (...params) => {
15483
15703
  setIsFormDirty(true);
15484
15704
  handleFormChange(...params);
15705
+ handleFormChange('currentStreamName', selectedStreamName);
15485
15706
  } }))) : (React.createElement(DataContainer$1, null,
15486
15707
  React.createElement(ConditionDetails, { conditions: thisItem.conditions || [] }),
15487
15708
  React.createElement(DataCard, { title: DISPLAY_TITLES.SOURCE_DETAILS, data: !!thisItem ? buildCard(thisItem) : [] }),
15488
15709
  React.createElement(DataCard, { title: DISPLAY_TITLES.DETECTED_CONTAINERS, titleBadge: containersData.length, description: DISPLAY_TITLES.DETECTED_CONTAINERS_DESCRIPTION, data: containersData })))) : (React.createElement(Describe$1, { source: thisItem, fetchDescribeSource: fetchDescribeSource }))));
15489
15710
  };
15490
15711
 
15491
- const Container$2 = styled.div `
15492
- display: flex;
15493
- flex-direction: column;
15494
- align-items: center;
15495
- gap: 12px;
15496
- max-height: ${({ $isModal }) => ($isModal ? 'calc(100vh - 510px)' : 'calc(100vh - 310px)')};
15497
- height: fit-content;
15498
- overflow-y: scroll;
15499
- `;
15500
- const Group = styled.div `
15501
- width: 100%;
15502
- padding-bottom: ${({ $isOpen }) => ($isOpen ? '18px' : '0')};
15503
- border-radius: 16px;
15504
- background-color: ${({ $selected, theme }) => ($selected ? theme.colors.majestic_blue + Theme.opacity.hex['024'] : theme.colors.dropdown_bg_2 + Theme.opacity.hex['040'])};
15505
- `;
15506
- const NamespaceItem = styled.div `
15507
- display: flex;
15508
- justify-content: space-between;
15509
- gap: 12px;
15510
- margin: 0;
15511
- padding: 18px;
15512
- border-radius: 16px;
15513
- cursor: pointer;
15514
- &:hover {
15515
- background-color: ${({ $selected, theme }) => ($selected ? theme.colors.majestic_blue + Theme.opacity.hex['040'] : theme.colors.dropdown_bg_2 + Theme.opacity.hex['080'])};
15516
- transition: background-color 0.3s;
15517
- }
15518
- `;
15519
- const SourceItem = styled(NamespaceItem) `
15520
- width: calc(100% - 50px);
15521
- margin-left: auto;
15522
- padding: 8px;
15523
- `;
15524
- const RelativeWrapper = styled.div `
15525
- position: relative;
15526
- `;
15527
- const AbsoluteWrapper = styled.div `
15528
- position: absolute;
15529
- top: 6px;
15530
- left: 18px;
15531
- `;
15532
- const SelectionCount = styled(Text) `
15533
- width: 18px;
15534
- `;
15535
- const NoDataFoundWrapper = styled.div `
15536
- padding: 50px 0;
15537
- display: flex;
15538
- flex-direction: column;
15539
- align-items: center;
15540
- gap: 12px;
15541
- height: 100%;
15542
- max-height: calc(100vh - 360px);
15543
- overflow-y: auto;
15544
- `;
15545
- const List = ({ isModal = false, filterNamespaces, filterSources, selectedNamespace, onSelectNamespace, selectedSources, onSelectSource, selectedFutureApps, onSelectFutureApps, onSelectAll, }) => {
15546
- const theme = Theme.useTheme();
15547
- const namespaces = filterNamespaces();
15548
- const { namespacesLoading } = useEntityStore();
15549
- if (!namespaces.length) {
15550
- return React.createElement(NoDataFoundWrapper, null, namespacesLoading ? React.createElement(FadeLoader, { scale: 2 }) : React.createElement(NoDataFound, { title: 'No namespaces found' }));
15551
- }
15552
- return (React.createElement(Container$2, { "$isModal": isModal }, namespaces.map(([namespace, sources]) => {
15553
- const sourcesForNamespace = selectedSources[namespace] || [];
15554
- const futureAppsForNamespace = selectedFutureApps[namespace] || false;
15555
- const isNamespaceLoaded = !!sourcesForNamespace.length;
15556
- const isNamespaceSelected = selectedNamespace === namespace;
15557
- const onlySelectedSources = sourcesForNamespace.filter(({ selected }) => selected);
15558
- const filteredSources = filterSources(namespace, { cancelSearch: true });
15559
- const isNamespaceAllSourcesSelected = !!onlySelectedSources.length && onlySelectedSources.length === sources.length;
15560
- const isNamespacePartiallySourcesSelected = !!onlySelectedSources.length && onlySelectedSources.length !== sources.length;
15561
- const hasFilteredSources = !!filteredSources.length;
15562
- return (React.createElement(Group, { key: `namespace-${namespace}`, "data-id": `namespace-${namespace}`, "$selected": isNamespaceAllSourcesSelected, "$isOpen": isNamespaceSelected && hasFilteredSources },
15563
- React.createElement(NamespaceItem, { "$selected": isNamespaceAllSourcesSelected, onClick: () => onSelectNamespace(namespace) },
15564
- React.createElement(FlexRow, { "$gap": 12 },
15565
- React.createElement(Checkbox, { partiallyChecked: isNamespacePartiallySourcesSelected, value: isNamespaceAllSourcesSelected, onChange: (bool) => onSelectAll(bool, namespace) }),
15566
- React.createElement(Text, null, namespace)),
15567
- React.createElement(FlexRow, { "$gap": 12 },
15568
- React.createElement(Toggle, { title: 'Include Future Sources', initialValue: futureAppsForNamespace, onChange: (bool) => onSelectFutureApps(bool, namespace) }),
15569
- React.createElement(Divider, { orientation: 'vertical', length: '12px', margin: '0' }),
15570
- React.createElement(SelectionCount, { size: 10, color: theme.text.grey }, isNamespaceLoaded ? `${onlySelectedSources.length}/${sources.length}` : null),
15571
- React.createElement(ExtendArrow, { extend: isNamespaceSelected }))),
15572
- isNamespaceSelected &&
15573
- (hasFilteredSources ? (React.createElement(RelativeWrapper, null,
15574
- React.createElement(AbsoluteWrapper, null,
15575
- React.createElement(Divider, { orientation: 'vertical', length: `${filteredSources.length * 36 - 12}px` })),
15576
- filteredSources.map((source) => {
15577
- const isSourceSelected = !!onlySelectedSources.find(({ name }) => name === source.name);
15578
- return (React.createElement(SourceItem, { key: `source-${source.name}`, "data-id": `source-${source.name}`, "$selected": isSourceSelected, onClick: () => onSelectSource(source) },
15579
- React.createElement(FlexRow, { "$gap": 12 },
15580
- React.createElement(Checkbox, { value: isSourceSelected, onChange: () => onSelectSource(source, namespace) }),
15581
- React.createElement(Text, null, source.name),
15582
- React.createElement(Text, { opacity: 0.8, size: 10 },
15583
- source.numberOfInstances,
15584
- " running instance",
15585
- source.numberOfInstances !== 1 && 's',
15586
- " \u00B7 ",
15587
- source.kind))));
15588
- }))) : (React.createElement(NoDataFoundWrapper, null, namespacesLoading ? React.createElement(FadeLoader, { scale: 1.5 }) : React.createElement(NoDataFound, { title: 'No sources available in this namespace', subTitle: 'Try searching again or select another namespace.' }))))));
15589
- })));
15590
- };
15591
-
15592
- const FlexContainer = styled.div `
15593
- display: flex;
15594
- align-items: center;
15712
+ const ActionsRow = styled(FlexRow) `
15595
15713
  justify-content: space-between;
15596
15714
  `;
15597
- // when bringin back the "Select all" checkbox, change the following width to 300px
15598
15715
  const SearchWrapper = styled.div `
15599
- width: 444px;
15716
+ width: 420px;
15600
15717
  `;
15601
- const Controls = ({ selectedSources, searchText, setSearchText, showSelectedOnly, setShowSelectedOnly }) => {
15602
- const selectedAppsCount = Object.values(selectedSources).reduce((prev, curr) => prev + curr.filter((s) => s.selected).length, 0);
15603
- return (React.createElement(React.Fragment, null,
15604
- React.createElement(SectionTitle, { title: 'Select Sources for Instrumentation', badgeLabel: selectedAppsCount, description: 'Select apps to monitor in each namespace. Odigos will instrument them and send telemetry data to your destinations.' }),
15605
- React.createElement(FlexContainer, { style: { marginTop: 24 } },
15606
- React.createElement(SearchWrapper, null,
15607
- React.createElement(Input, { placeholder: 'Search Kubernetes Namespaces', icon: SearchIcon, value: searchText, onChange: (e) => setSearchText(e.target.value.toLowerCase()) })),
15608
- React.createElement(Toggle, { title: 'Show selected only', initialValue: showSelectedOnly, onChange: setShowSelectedOnly })),
15609
- React.createElement(Divider, { margin: '16px 0' })));
15610
- };
15611
-
15612
- const SourceSelectionForm = forwardRef((props, ref) => {
15613
- const { isModal, selectedNamespace, onSelectNamespace, namespace } = props;
15614
- const formState = useSourceSelectionFormData({ selectedNamespace, onSelectNamespace, namespace });
15615
- const { recordedInitialSources, getApiSourcesPayload, getApiFutureAppsPayload } = formState;
15718
+ const SourceSelectionForm = forwardRef(({ isModal, fetchSingleNamespace, onClickSummary }, ref) => {
15719
+ const formState = useSourceSelectionFormData({ fetchSingleNamespace });
15720
+ const { recordedInitialSources, selectedSources, getApiSourcesPayload, getApiFutureAppsPayload, searchText, setSearchText, showSelectedOnly, setShowSelectedOnly } = formState;
15616
15721
  useImperativeHandle(ref, () => ({
15617
15722
  getFormValues: () => ({
15618
15723
  initial: recordedInitialSources,
@@ -15620,19 +15725,24 @@ const SourceSelectionForm = forwardRef((props, ref) => {
15620
15725
  futureApps: getApiFutureAppsPayload(),
15621
15726
  }),
15622
15727
  }));
15728
+ const selectedCount = Object.values(selectedSources).reduce((prev, curr) => prev + curr.filter((s) => s.selected).length, 0);
15623
15729
  return (React.createElement(ModalBody, { "$isNotModal": !isModal },
15624
- React.createElement(Controls, { ...props, ...formState }),
15625
- React.createElement(List, { ...props, ...formState })));
15730
+ React.createElement(FlexColumn, { "$gap": 12 },
15731
+ React.createElement(FlexColumn, { "$gap": 24 },
15732
+ onClickSummary && React.createElement(NoteBackToSummary, { onClick: onClickSummary }),
15733
+ React.createElement(SectionTitle, { title: DISPLAY_TITLES.SELECT_SOURCES, badgeLabel: selectedCount, description: DISPLAY_TITLES.SELECT_SOURCES_DESCRIPTION }),
15734
+ React.createElement(ActionsRow, null,
15735
+ React.createElement(SearchWrapper, null,
15736
+ React.createElement(Input, { placeholder: DISPLAY_TITLES.SEARCH_NAMESPACES, icon: SearchIcon, value: searchText, onChange: (e) => setSearchText(e.target.value.toLowerCase()) })),
15737
+ React.createElement(Toggle, { title: DISPLAY_TITLES.SHOW_SELECTED_ONLY, initialValue: showSelectedOnly, onChange: setShowSelectedOnly }))),
15738
+ React.createElement(Divider, null),
15739
+ React.createElement(SourceList, { isModal: isModal, ...formState }))));
15626
15740
  });
15627
15741
 
15628
- const SourceModal = ({ selectedNamespace, setSelectedNamespace, namespace, persistSources }) => {
15742
+ const SourceModal = ({ fetchSingleNamespace, persistSources }) => {
15629
15743
  const { currentModal, setCurrentModal } = useModalStore();
15630
15744
  const isOpen = currentModal === EntityTypes.Source;
15631
- const onSelectNamespace = (ns) => {
15632
- setSelectedNamespace((prev) => (prev === ns ? '' : ns));
15633
- };
15634
15745
  const handleClose = () => {
15635
- setSelectedNamespace('');
15636
15746
  setCurrentModal('');
15637
15747
  };
15638
15748
  const handleSubmit = async () => {
@@ -15651,14 +15761,14 @@ const SourceModal = ({ selectedNamespace, setSelectedNamespace, namespace, persi
15651
15761
  onClick: handleSubmit,
15652
15762
  },
15653
15763
  ] }) },
15654
- React.createElement(SourceSelectionForm, { ref: formRef, isModal: true, selectedNamespace: selectedNamespace, onSelectNamespace: onSelectNamespace, namespace: namespace })));
15764
+ React.createElement(SourceSelectionForm, { ref: formRef, isModal: true, fetchSingleNamespace: fetchSingleNamespace })));
15655
15765
  };
15656
15766
 
15657
15767
  const columns = [
15658
15768
  { key: 'checkbox-and-icon', title: '' },
15659
15769
  { key: 'name', title: DISPLAY_TITLES.NAME, sortable: true },
15660
15770
  { key: 'type', title: 'Kubernetes Type', sortable: true },
15661
- { key: 'namespace', title: DISPLAY_TITLES.Namespace, sortable: true },
15771
+ { key: 'namespace', title: DISPLAY_TITLES.NAMESPACE, sortable: true },
15662
15772
  { key: 'containers', title: DISPLAY_TITLES.DETECTED_CONTAINERS },
15663
15773
  { key: 'conditions', title: 'Conditions' },
15664
15774
  { key: 'throughput', title: 'Throughput', sortable: true },
@@ -15667,6 +15777,7 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
15667
15777
  const theme = Theme.useTheme();
15668
15778
  const filters = useFilterStore();
15669
15779
  const { isThisPending } = usePendingStore();
15780
+ const { selectedStreamName } = useDataStreamStore();
15670
15781
  const { sources, sourcesLoading } = useEntityStore();
15671
15782
  const { setDrawerType, setDrawerEntityId } = useDrawerStore();
15672
15783
  const { selectedSources, setSelectedSources } = useSelectedStore();
@@ -15679,7 +15790,8 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
15679
15790
  return calculateProgress(sourcesToDelete, sourcesDeleted);
15680
15791
  return 1;
15681
15792
  }, [sourcesToCreate, sourcesCreated, sourcesToDelete, sourcesDeleted]);
15682
- const filtered = useMemo(() => filterSources(sources, filters), [sources, filters]);
15793
+ const sourcesByStream = useMemo(() => filterSourcesByStream(sources, selectedStreamName), [sources, selectedStreamName]);
15794
+ const filteredSources = useMemo(() => filterSources(sourcesByStream, filters), [sourcesByStream, filters]);
15683
15795
  const [hasSelected, totalSelectedSources] = useMemo(() => {
15684
15796
  let num = 0;
15685
15797
  Object.values(selectedSources).forEach((selectedSources) => {
@@ -15690,7 +15802,7 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
15690
15802
  const onSelectAll = useCallback((bool) => {
15691
15803
  if (bool) {
15692
15804
  const payload = {};
15693
- filtered.forEach((source) => {
15805
+ filteredSources.forEach((source) => {
15694
15806
  const id = { namespace: source.namespace, name: source.name, kind: source.kind };
15695
15807
  const isPending = isThisPending({ entityType: EntityTypes.Source, entityId: id });
15696
15808
  if (!isPending) {
@@ -15707,7 +15819,7 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
15707
15819
  else {
15708
15820
  setSelectedSources({});
15709
15821
  }
15710
- }, [filtered]);
15822
+ }, [filteredSources]);
15711
15823
  const onSelectOne = useCallback((source) => {
15712
15824
  const { namespace, name, kind } = source;
15713
15825
  const payload = { ...selectedSources };
@@ -15722,7 +15834,7 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
15722
15834
  }
15723
15835
  setSelectedSources(payload);
15724
15836
  }, [selectedSources]);
15725
- const rows = useMemo(() => filtered.map((source) => {
15837
+ const rows = useMemo(() => filteredSources.map((source) => {
15726
15838
  const id = getWorkloadId(source);
15727
15839
  const idString = JSON.stringify(id);
15728
15840
  const { hasErrors, hasWarnings, hasDisableds } = getConditionsBooleans(source.conditions || []);
@@ -15772,13 +15884,23 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
15772
15884
  },
15773
15885
  ],
15774
15886
  };
15775
- }), [filtered, selectedSources, metrics, onSelectOne]);
15776
- const badge = useMemo(() => (filtered.length !== sources.length ? `${filtered.length}/${sources.length}` : sources.length), [filtered, sources]);
15777
- const badgeTooltip = useMemo(() => (filtered.length !== sources.length ? DISPLAY_TITLES.FILTERED_COUNT_TOOLTIP : undefined), [filtered, sources]);
15887
+ }), [filteredSources, selectedSources, metrics, onSelectOne]);
15888
+ const { badge, badgeTooltip } = useMemo(() => {
15889
+ if (filteredSources.length !== sourcesByStream.length) {
15890
+ return {
15891
+ badge: `${filteredSources.length}/${sourcesByStream.length}`,
15892
+ badgeTooltip: DISPLAY_TITLES.FILTERED_COUNT_TOOLTIP,
15893
+ };
15894
+ }
15895
+ return {
15896
+ badge: sourcesByStream.length,
15897
+ badgeTooltip: undefined,
15898
+ };
15899
+ }, [filteredSources, sourcesByStream]);
15778
15900
  return (React.createElement(TableContainer, { "$maxWidth": maxWidth },
15779
15901
  React.createElement(TableTitleWrap, null,
15780
- React.createElement(Checkbox, { partiallyChecked: hasSelected && filtered?.length !== totalSelectedSources, value: hasSelected && filtered?.length === totalSelectedSources, onChange: onSelectAll, disabled: !filtered?.length }),
15781
- React.createElement(IconTitleBadge, { icon: getEntityIcon(EntityTypes.Source), title: DISPLAY_TITLES.Sources, badge: badge, badgeTooltip: badgeTooltip, loading: sourcesLoading && !isAwaitingInstrumentation })),
15902
+ React.createElement(Checkbox, { partiallyChecked: hasSelected && filteredSources?.length !== totalSelectedSources, value: hasSelected && filteredSources?.length === totalSelectedSources, onChange: onSelectAll, disabled: !filteredSources?.length }),
15903
+ React.createElement(IconTitleBadge, { icon: getEntityIcon(EntityTypes.Source), title: DISPLAY_TITLES.SOURCES, badge: badge, badgeTooltip: badgeTooltip, loading: sourcesLoading && !isAwaitingInstrumentation })),
15782
15904
  React.createElement(TableWrap, { "$maxHeight": maxHeight },
15783
15905
  React.createElement(InteractiveTable, { columns: columns, rows: isAwaitingInstrumentation ? [] : rows })),
15784
15906
  isAwaitingInstrumentation ? (React.createElement(CenterThis, { style: { marginTop: '2rem', gap: '24px' } },
@@ -15787,7 +15909,7 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
15787
15909
  React.createElement(Text, { color: theme.text.info },
15788
15910
  !!sourcesToCreate ? 'Instrumenting' : 'Uninstrumenting',
15789
15911
  " workloads..."),
15790
- React.createElement(Badge, { label: `${instrumentingPercent}%` })))) : !filtered.length ? (React.createElement(CenterThis, { style: { marginTop: '2rem' } },
15912
+ React.createElement(Badge, { label: `${instrumentingPercent}%` })))) : !filteredSources.length ? (React.createElement(CenterThis, { style: { marginTop: '2rem' } },
15791
15913
  React.createElement(NoDataFound, null))) : null));
15792
15914
  };
15793
15915
 
@@ -16039,4 +16161,4 @@ const ToggleDarkMode = () => {
16039
16161
  React.createElement(Background, { "$darkMode": darkMode })));
16040
16162
  };
16041
16163
 
16042
- export { ActionDrawer, ActionForm, ActionModal, ActionTable, AwaitPipeline, ComputePlatformSelect, ComputePlatforms, ComputePlatformsActionsMenu, ConnectionStatusDropdown, ConnectionTypeDropdown, DataFlow, DataFlowActionsMenu, DestinationDrawer, DestinationForm, DestinationModal, DestinationSelectionForm, DestinationTable, ErrorDropdown, InstrumentationRuleDrawer, InstrumentationRuleForm, InstrumentationRuleModal, InstrumentationRuleTable, KindDropdown, LanguageDropdown, MonitorDropdown, MultiSourceControl, NamespaceDropdown, NavIconIds, NotificationManager, OverviewDrawer, SideNav, SlackInvite, SourceDrawer, SourceForm, SourceModal, SourceSelectionForm, SourceTable, SystemOverview, ToastList, ToggleDarkMode };
16164
+ export { ActionDrawer, ActionForm, ActionModal, ActionTable, AwaitPipeline, ComputePlatformSelect, ComputePlatforms, ComputePlatformsActionsMenu, ConnectionStatusDropdown, ConnectionTypeDropdown, DataFlow, DataFlowActionsMenu, DataStreamSelectionForm, DestinationDrawer, DestinationForm, DestinationModal, DestinationSelectionForm, DestinationTable, ErrorDropdown, InstrumentationRuleDrawer, InstrumentationRuleForm, InstrumentationRuleModal, InstrumentationRuleTable, KindDropdown, LanguageDropdown, MonitorDropdown, MultiSourceControl, NamespaceDropdown, NavIconIds, NotificationManager, OverviewDrawer, SetupSummary, SideNav, SlackInvite, SourceDrawer, SourceForm, SourceModal, SourceSelectionForm, SourceTable, SystemOverview, TableCellConditions, ToastList, ToggleDarkMode };