@odigos/ui-kit 0.0.15 → 0.0.17
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.
- package/CHANGELOG.md +26 -0
- package/lib/components/data-tab/index.d.ts +17 -6
- package/lib/components/drawer/drawer-header/index.d.ts +2 -2
- package/lib/components/icon-group/index.d.ts +1 -0
- package/lib/components.js +45 -14
- package/lib/constants.js +9 -5
- package/lib/containers/data-flow-actions-menu/filters/index.d.ts +0 -3
- package/lib/containers/data-flow-actions-menu/index.d.ts +0 -3
- package/lib/containers/dropdowns/namespace-dropdown/index.d.ts +0 -3
- package/lib/containers/overview-drawer/index.d.ts +2 -2
- package/lib/containers/source-modal/index.d.ts +1 -5
- package/lib/containers/source-selection-form/index.d.ts +1 -4
- package/lib/containers/source-selection-form/{fast/list → list}/index.d.ts +0 -1
- package/lib/containers/table-cell-conditions/index.d.ts +1 -0
- package/lib/containers.js +214 -230
- package/lib/data/destinations/index.d.ts +1 -1
- package/lib/functions/get-destination-icon/index.d.ts +5 -1
- package/lib/functions.js +17 -21
- package/lib/hooks/useSourceSelectionFormData.d.ts +1 -2
- package/lib/hooks.js +10 -10
- package/lib/icons/destinations/app-dynamics-logo/index.d.ts +2 -0
- package/lib/icons/destinations/aws-cloudwatch-logo/index.d.ts +2 -0
- package/lib/icons/destinations/aws-s3-logo/index.d.ts +2 -0
- package/lib/icons/destinations/aws-xray-logo/index.d.ts +2 -0
- package/lib/icons/destinations/axiom-logo/index.d.ts +2 -0
- package/lib/icons/destinations/better-stack-logo/index.d.ts +2 -0
- package/lib/icons/destinations/blob-storage-logo/index.d.ts +2 -0
- package/lib/icons/destinations/causely-logo/index.d.ts +2 -0
- package/lib/icons/destinations/chronosphere-logo/index.d.ts +2 -0
- package/lib/icons/destinations/clickhouse-logo/index.d.ts +2 -0
- package/lib/icons/destinations/coralogix-logo/index.d.ts +2 -0
- package/lib/icons/destinations/dash0-logo/index.d.ts +2 -0
- package/lib/icons/destinations/datadog-logo/index.d.ts +2 -0
- package/lib/icons/destinations/dynatrace-logo/index.d.ts +2 -0
- package/lib/icons/destinations/elastic-apm-logo/index.d.ts +2 -0
- package/lib/icons/destinations/elastic-search-logo/index.d.ts +2 -0
- package/lib/icons/destinations/gigapipe-logo/index.d.ts +2 -0
- package/lib/icons/destinations/google-cloud-platform-logo/index.d.ts +2 -0
- package/lib/icons/destinations/google-cloud-storage-logo/index.d.ts +2 -0
- package/lib/icons/destinations/grafana-logo/index.d.ts +2 -0
- package/lib/icons/destinations/groundcover-logo/index.d.ts +2 -0
- package/lib/icons/destinations/honeycomb-logo/index.d.ts +2 -0
- package/lib/icons/destinations/hyperdx-logo/index.d.ts +2 -0
- package/lib/icons/destinations/index.d.ts +46 -0
- package/lib/icons/destinations/instana-logo/index.d.ts +2 -0
- package/lib/icons/destinations/jaeger-logo/index.d.ts +2 -0
- package/lib/icons/destinations/kloudmate-logo/index.d.ts +2 -0
- package/lib/icons/destinations/last9-logo/index.d.ts +2 -0
- package/lib/icons/destinations/lightstep-logo/index.d.ts +2 -0
- package/lib/icons/destinations/logzio-logo/index.d.ts +2 -0
- package/lib/icons/destinations/loki-logo/index.d.ts +2 -0
- package/lib/icons/destinations/lumigo-logo/index.d.ts +2 -0
- package/lib/icons/destinations/middleware-logo/index.d.ts +2 -0
- package/lib/icons/destinations/new-relic-logo/index.d.ts +2 -0
- package/lib/icons/destinations/open-telemetry-logo/index.d.ts +2 -0
- package/lib/icons/destinations/ops-verse-logo/index.d.ts +2 -0
- package/lib/icons/destinations/prometheus-logo/index.d.ts +2 -0
- package/lib/icons/destinations/qryn-logo/index.d.ts +2 -0
- package/lib/icons/destinations/quickwit-logo/index.d.ts +2 -0
- package/lib/icons/destinations/sentry-logo/index.d.ts +2 -0
- package/lib/icons/destinations/signoz-logo/index.d.ts +2 -0
- package/lib/icons/destinations/splunk-logo/index.d.ts +2 -0
- package/lib/icons/destinations/sumo-logic-logo/index.d.ts +2 -0
- package/lib/icons/destinations/tempo-logo/index.d.ts +2 -0
- package/lib/icons/destinations/traceloop-logo/index.d.ts +2 -0
- package/lib/icons/destinations/uptrace-logo/index.d.ts +2 -0
- package/lib/icons/index.d.ts +1 -0
- package/lib/icons/overview/index.d.ts +1 -0
- package/lib/icons/overview/namespaces-icon/index.d.ts +2 -0
- package/lib/icons/programming-languages/index.d.ts +0 -1
- package/lib/icons.js +40 -8
- package/lib/index-B72aw6tI.js +23 -0
- package/lib/{index-D_Qn2U89.js → index-BJxaoI0G.js} +1 -8
- package/lib/{index-BtuW12KL.js → index-BQW5EUgp.js} +74 -8
- package/lib/index-BQs4sULy.js +32 -0
- package/lib/index-BVVVevuY.js +100 -0
- package/lib/index-BWqrekK4.js +11 -0
- package/lib/{index-zMKRaKMY.js → index-BiNX-Cge.js} +119 -156
- package/lib/{index-9ObpINp4.js → index-BsH_egEe.js} +15 -6
- package/lib/{index-CYn62h8x.js → index-BxQTUOME.js} +10 -12
- package/lib/index-C1PCuZgw.js +18 -0
- package/lib/{index-Db_ZDrEr.js → index-C3nz3TIx.js} +6 -8
- package/lib/{index-BGlk5VhF.js → index-CIXQeSHu.js} +1 -10
- package/lib/index-CIgHU72d.js +52 -0
- package/lib/index-DB8Djrsy.js +487 -0
- package/lib/index-DbfrGXPH.js +8 -0
- package/lib/{index-CJKFedQi.js → index-G4WmxXds.js} +4 -21
- package/lib/{index-7-KCQK-x.js → index-Hz7AAE0t.js} +1 -1
- package/lib/{index-3KUV6Vlt.js → index-KOMAv-TS.js} +6 -10
- package/lib/index-RBS1MqCQ.js +37 -0
- package/lib/react-CjImwkhV.js +44 -0
- package/lib/store/useEntityStore.d.ts +4 -2
- package/lib/store/useSetupStore.d.ts +2 -3
- package/lib/store.js +6 -3
- package/lib/theme.js +86 -3
- package/lib/types/common/index.d.ts +1 -0
- package/lib/types/destinations/index.d.ts +50 -3
- package/lib/types.js +6 -163
- package/lib/useDarkMode-DxhIuVNi.js +201 -0
- package/lib/useSelectedStore-93bIo1kE.js +97 -0
- package/lib/useSetupStore-CoYx1UQw.js +211 -0
- package/lib/{useTransition-CFmm4scp.js → useTimeAgo-weEj7br6.js} +544 -113
- package/lib/useTransition-D0wUpPGk.js +128 -0
- package/package.json +13 -12
- package/lib/components/auto-complete-input/auto-complete-input.stories.d.ts +0 -9
- package/lib/components/badge/badge.stories.d.ts +0 -13
- package/lib/components/button/button.stories.d.ts +0 -9
- package/lib/components/cancel-warning/cancel-warning.stories.d.ts +0 -9
- package/lib/components/checkbox/checkbox.stories.d.ts +0 -9
- package/lib/components/code/code.stories.d.ts +0 -9
- package/lib/components/condition-details/condition-details.stories.d.ts +0 -14
- package/lib/components/data-card/data-card.stories.d.ts +0 -10
- package/lib/components/data-tab/data-tab.stories.d.ts +0 -15
- package/lib/components/delete-warning/delete-warning.stories.d.ts +0 -9
- package/lib/components/describe-row/describe-row.stories.d.ts +0 -9
- package/lib/components/divider/divider.stories.d.ts +0 -9
- package/lib/components/docs-button/docs-button.stories.d.ts +0 -9
- package/lib/components/drawer/drawer.stories.d.ts +0 -10
- package/lib/components/dropdown/dropdown.stories.d.ts +0 -10
- package/lib/components/error-boundary/error-boundary.stories.d.ts +0 -9
- package/lib/components/extend-arrow/extend-arrow.stories.d.ts +0 -9
- package/lib/components/fade-loader/fade-loader.stories.d.ts +0 -9
- package/lib/components/field-error/field-error.stories.d.ts +0 -9
- package/lib/components/field-label/field-label.stories.d.ts +0 -9
- package/lib/components/header/header.stories.d.ts +0 -9
- package/lib/components/icon-button/icon-button.stories.d.ts +0 -9
- package/lib/components/icon-group/icon-group.stories.d.ts +0 -14
- package/lib/components/icon-title-badge/icon-title-badge.stories.d.ts +0 -9
- package/lib/components/icon-wrapped/icon-wrapped.stories.d.ts +0 -10
- package/lib/components/icons-nav/icons-nav.stories.d.ts +0 -9
- package/lib/components/image-controlled/image-controlled.stories.d.ts +0 -9
- package/lib/components/input/input.stories.d.ts +0 -9
- package/lib/components/input-list/input-list.stories.d.ts +0 -9
- package/lib/components/input-table/input-table.stories.d.ts +0 -9
- package/lib/components/interactive-table/interactive-table.stories.d.ts +0 -12
- package/lib/components/key-value-input-list/key-value-input-list.stories.d.ts +0 -9
- package/lib/components/modal/modal.stories.d.ts +0 -9
- package/lib/components/monitors-checkboxes/monitors-checkboxes.stories.d.ts +0 -9
- package/lib/components/monitors-icons/monitors-icons.stories.d.ts +0 -9
- package/lib/components/navigation-buttons/navigation-buttons.stories.d.ts +0 -9
- package/lib/components/no-data-found/no-data-found.stories.d.ts +0 -9
- package/lib/components/notification-note/notification-note.stories.d.ts +0 -10
- package/lib/components/section-title/section-title.stories.d.ts +0 -9
- package/lib/components/segment/segment.stories.d.ts +0 -9
- package/lib/components/skeleton-loader/skeleton-loader.stories.d.ts +0 -9
- package/lib/components/status/status.stories.d.ts +0 -9
- package/lib/components/stepper/stepper.stories.d.ts +0 -9
- package/lib/components/text/text.stories.d.ts +0 -9
- package/lib/components/textarea/textarea.stories.d.ts +0 -9
- package/lib/components/toggle/toggle.stories.d.ts +0 -9
- package/lib/components/tooltip/tooltip.stories.d.ts +0 -9
- package/lib/components/trace-loader/trace-loader.stories.d.ts +0 -9
- package/lib/components/warning-modal/warning-modal.stories.d.ts +0 -9
- package/lib/containers/action-drawer/action-drawer.stories.d.ts +0 -9
- package/lib/containers/action-form/action-form.stories.d.ts +0 -9
- package/lib/containers/action-modal/action-modal.stories.d.ts +0 -9
- package/lib/containers/action-table/action-table.stories.d.ts +0 -9
- package/lib/containers/await-pipeline/await-pipeline.stories.d.ts +0 -9
- package/lib/containers/compute-platform-select/compute-platform-select.stories.d.ts +0 -9
- package/lib/containers/compute-platforms/compute-platforms.stories.d.ts +0 -9
- package/lib/containers/compute-platforms-actions-menu/compute-platforms-actions-menu.stories.d.ts +0 -9
- package/lib/containers/data-flow/data-flow.stories.d.ts +0 -9
- package/lib/containers/data-flow-actions-menu/data-flow.stories.d.ts +0 -11
- package/lib/containers/destination-drawer/destination-drawer.stories.d.ts +0 -9
- package/lib/containers/destination-form/destination-form.stories.d.ts +0 -9
- package/lib/containers/destination-modal/destination-modal.stories.d.ts +0 -9
- package/lib/containers/destination-selection-form/destination-selection-form.stories.d.ts +0 -9
- package/lib/containers/destination-table/destination-table.stories.d.ts +0 -9
- package/lib/containers/dropdowns/connection-status-dropdown/connection-status-dropdown.stories.d.ts +0 -9
- package/lib/containers/dropdowns/connection-type-dropdown/connection-type-dropdown.stories.d.ts +0 -9
- package/lib/containers/dropdowns/error-dropdown/error-dropdown.stories.d.ts +0 -9
- package/lib/containers/dropdowns/kind-dropdown/error-dropdown.stories.d.ts +0 -9
- package/lib/containers/dropdowns/language-dropdown/language-dropdown.stories.d.ts +0 -9
- package/lib/containers/dropdowns/monitor-dropdown/monitor-dropdown.stories.d.ts +0 -9
- package/lib/containers/dropdowns/namespace-dropdown/namespace-dropdown.stories.d.ts +0 -9
- package/lib/containers/instrumentation-rule-drawer/instrumentation-rule-drawer.stories.d.ts +0 -9
- package/lib/containers/instrumentation-rule-form/instrumentation-rule-form.stories.d.ts +0 -9
- package/lib/containers/instrumentation-rule-modal/instrumentation-rule-modal.stories.d.ts +0 -9
- package/lib/containers/instrumentation-rule-table/instrumentation-rule-table.stories.d.ts +0 -9
- package/lib/containers/multi-source-control/multi-source-control.stories.d.ts +0 -9
- package/lib/containers/notification-manager/notification-manager.stories.d.ts +0 -9
- package/lib/containers/overview-drawer/overview-drawer.stories.d.ts +0 -9
- package/lib/containers/side-nav/side-nav.stories.d.ts +0 -9
- package/lib/containers/slack-invite/slack-invite.stories.d.ts +0 -9
- package/lib/containers/source-drawer/source-drawer.stories.d.ts +0 -9
- package/lib/containers/source-form/source-form.stories.d.ts +0 -9
- package/lib/containers/source-modal/source-modal.stories.d.ts +0 -9
- package/lib/containers/source-selection-form/fast/index.d.ts +0 -7
- package/lib/containers/source-selection-form/simple/controls/index.d.ts +0 -11
- package/lib/containers/source-selection-form/simple/index.d.ts +0 -7
- package/lib/containers/source-selection-form/simple/list/index.d.ts +0 -9
- package/lib/containers/source-selection-form/source-selection-form.stories.d.ts +0 -9
- package/lib/containers/source-table/source-table.stories.d.ts +0 -9
- package/lib/containers/system-overview/system-overview.stories.d.ts +0 -9
- package/lib/containers/table-cell-conditions/table-cell-conditions.stories.d.ts +0 -9
- package/lib/containers/toast-list/toast-list.stories.d.ts +0 -9
- package/lib/containers/toggle-dark-mode/toggle-dark-mode.stories.d.ts +0 -9
- package/lib/icons/actions/add-cluster-info-icon/add-cluster-info-icon.stories.d.ts +0 -8
- package/lib/icons/actions/delete-attribute-icon/delete-attribute-icon.stories.d.ts +0 -8
- package/lib/icons/actions/pii-masking-icon/pii-masking-icon.stories.d.ts +0 -8
- package/lib/icons/actions/rename-attribute-icon/rename-attribute-icon.stories.d.ts +0 -8
- package/lib/icons/actions/sampler-icon/sampler-icon.stories.d.ts +0 -8
- package/lib/icons/brand/odigos-logo/odigos-logo.stories.d.ts +0 -8
- package/lib/icons/brand/odigos-logo-text/odigos-logo-text.stories.d.ts +0 -8
- package/lib/icons/common/arrow-icon/arrow-icon.stories.d.ts +0 -8
- package/lib/icons/common/code-brackets-icon/code-brackets-icon.stories.d.ts +0 -8
- package/lib/icons/common/code-icon/code-icon.stories.d.ts +0 -8
- package/lib/icons/common/command-icon/command-icon.stories.d.ts +0 -8
- package/lib/icons/common/copy-icon/copy-icon.stories.d.ts +0 -8
- package/lib/icons/common/edit-icon/edit-icon.stories.d.ts +0 -8
- package/lib/icons/common/extend-arrow-icon/extend-arrow-icon.stories.d.ts +0 -8
- package/lib/icons/common/filter-icon/filter-icon.stories.d.ts +0 -8
- package/lib/icons/common/folder-icon/folder-icon.stories.d.ts +0 -8
- package/lib/icons/common/image-error-icon/image-error-icon.stories.d.ts +0 -8
- package/lib/icons/common/key-icon/key-icon.stories.d.ts +0 -8
- package/lib/icons/common/list-icon/list-icon.stories.d.ts +0 -8
- package/lib/icons/common/no-data-icon/no-data-icon.stories.d.ts +0 -8
- package/lib/icons/common/notebook-icon/notebook-icon.stories.d.ts +0 -8
- package/lib/icons/common/notification-icon/notification-icon.stories.d.ts +0 -8
- package/lib/icons/common/search-icon/search-icon.stories.d.ts +0 -8
- package/lib/icons/common/sort-arrows-icon/sort-arrows-icon.stories.d.ts +0 -8
- package/lib/icons/common/terminal-icon/terminal-icon.stories.d.ts +0 -8
- package/lib/icons/common/trash-icon/trash-icon.stories.d.ts +0 -8
- package/lib/icons/common/x-icon/x-icon.stories.d.ts +0 -8
- package/lib/icons/compute-platform/k8s-logo/k8s-logo.stories.d.ts +0 -8
- package/lib/icons/compute-platform/vm-logo/vm-logo.stories.d.ts +0 -8
- package/lib/icons/instrumentation-rules/code-attributes-icon/code-attributes-icon.stories.d.ts +0 -8
- package/lib/icons/instrumentation-rules/payload-collection-icon/payload-collection-icon.stories.d.ts +0 -8
- package/lib/icons/math/minus-icon/minus-icon.stories.d.ts +0 -8
- package/lib/icons/math/plus-icon/plus-icon.stories.d.ts +0 -8
- package/lib/icons/monitors/logs-icon/logs-icon.stories.d.ts +0 -8
- package/lib/icons/monitors/metrics-icon/metrics-icon.stories.d.ts +0 -8
- package/lib/icons/monitors/traces-icon/traces-icon.stories.d.ts +0 -8
- package/lib/icons/on-off/eye-closed-icon/eye-closed-icon.stories.d.ts +0 -8
- package/lib/icons/on-off/eye-open-icon/eye-open-icon.stories.d.ts +0 -8
- package/lib/icons/on-off/light-off-icon/light-off-icon.stories.d.ts +0 -8
- package/lib/icons/on-off/light-on-icon/light-on-icon.stories.d.ts +0 -8
- package/lib/icons/on-off/moon-icon/moon-icon.stories.d.ts +0 -8
- package/lib/icons/on-off/sun-icon/sun-icon.stories.d.ts +0 -8
- package/lib/icons/overview/actions-icon/actions-icon.stories.d.ts +0 -8
- package/lib/icons/overview/connections-icon/connections-icon.stories.d.ts +0 -8
- package/lib/icons/overview/destinations-icon/destinations-icon.stories.d.ts +0 -8
- package/lib/icons/overview/overview-icon/overview-icon.stories.d.ts +0 -8
- package/lib/icons/overview/rules-icon/rules-icon.stories.d.ts +0 -8
- package/lib/icons/overview/service-map-icon/service-map-icon.stories.d.ts +0 -8
- package/lib/icons/overview/sources-icon/sources-icon.stories.d.ts +0 -8
- package/lib/icons/overview/trace-view-icon/trace-view-icon.stories.d.ts +0 -8
- package/lib/icons/programming-languages/c-plus-plus-logo/c-plus-plus-logo.stories.d.ts +0 -8
- package/lib/icons/programming-languages/c-sharp-logo/c-sharp-logo.stories.d.ts +0 -8
- package/lib/icons/programming-languages/dotnet-logo/dotnet-logo.stories.d.ts +0 -8
- package/lib/icons/programming-languages/elixir-logo/elixir-logo.stories.d.ts +0 -8
- package/lib/icons/programming-languages/go-logo/go-logo.stories.d.ts +0 -8
- package/lib/icons/programming-languages/java-logo/java-logo.stories.d.ts +0 -8
- package/lib/icons/programming-languages/kafka-logo/kafka-logo.stories.d.ts +0 -8
- package/lib/icons/programming-languages/mysql-logo/mysql-logo.stories.d.ts +0 -8
- package/lib/icons/programming-languages/nginx-logo/nginx-logo.stories.d.ts +0 -8
- package/lib/icons/programming-languages/nodejs-logo/nodejs-logo.stories.d.ts +0 -8
- package/lib/icons/programming-languages/php-logo/php-logo.stories.d.ts +0 -8
- package/lib/icons/programming-languages/postgres-logo/postgres-logo.stories.d.ts +0 -8
- package/lib/icons/programming-languages/python-logo/python-logo.stories.d.ts +0 -8
- package/lib/icons/programming-languages/redis-logo/redis-logo.stories.d.ts +0 -8
- package/lib/icons/programming-languages/ruby-logo/ruby-logo.stories.d.ts +0 -8
- package/lib/icons/programming-languages/rust-logo/rust-logo.stories.d.ts +0 -8
- package/lib/icons/programming-languages/swift-logo/swift-logo.stories.d.ts +0 -8
- package/lib/icons/social/slack-logo/slack-logo.stories.d.ts +0 -8
- package/lib/icons/status/check-circled-icon/check-circled-icon.stories.d.ts +0 -8
- package/lib/icons/status/check-icon/check-icon.stories.d.ts +0 -8
- package/lib/icons/status/cross-circled-icon/cross-circled-icon.stories.d.ts +0 -8
- package/lib/icons/status/cross-icon/cross-icon.stories.d.ts +0 -8
- package/lib/icons/status/error-round-icon/error-round-icon.stories.d.ts +0 -8
- package/lib/icons/status/error-triangle-icon/error-triangle-icon.stories.d.ts +0 -8
- package/lib/icons/status/info-icon/info-icon.stories.d.ts +0 -8
- package/lib/icons/status/warning-triangle-icon/warning-triangle-icon.stories.d.ts +0 -8
- package/lib/index-BjJpYtF1.js +0 -42
- package/lib/index-DYEcdkUF.js +0 -671
- package/lib/useSourceSelectionFormData-BnlRp8m3.js +0 -561
- /package/lib/containers/source-selection-form/{fast/controls → controls}/index.d.ts +0 -0
- /package/lib/icons/{programming-languages → destinations}/kafka-logo/index.d.ts +0 -0
package/lib/containers.js
CHANGED
|
@@ -1,24 +1,31 @@
|
|
|
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-CJKFedQi.js';
|
|
4
3
|
import { D as DISPLAY_TITLES, F as FORM_ALERTS } from './index-C_0J5P9M.js';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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-DYEcdkUF.js';
|
|
4
|
+
import { f as DataCardFieldTypes, q as FieldLabel, b as Checkbox, p as FieldError, w as Input, y as InputTable, K as KeyValueInputsList, x as InputList, U as Text, O as Segment, S as SectionTitle, j as DocsButton, G as MonitorsCheckboxes, V as TextArea, k as Drawer, h as DeleteWarning, C as CancelWarning, d as ConditionDetails, D as DataCard, M as Modal, N as NavigationButtons, a1 as ModalBody, A as AutocompleteInput, i as Divider, Q as Status, F as FlexRow, X as Tooltip, t as IconWrapped, H as MonitorsIcons, a2 as TableContainer, a3 as TableTitleWrap, s as IconTitleBadge, a4 as TableWrap, z as InteractiveTable, $ as CenterThis, J as NoDataFound, _ as FlexColumn, Y as TraceLoader, a as Badge, B as Button, E as ExtendArrow, n as Dropdown, a5 as getDefaultExportFromCjs, o as FadeLoader, g as DataTab, P as SkeletonLoader, W as Toggle, L as NotificationNote, R as Stepper, I as IconButton, e as DataCardFields, u as IconsNav, r as IconGroup } from './index-BiNX-Cge.js';
|
|
5
|
+
import { A as ActionType, C as CodeAttributesKeyTypes, P as PayloadCollectionKeyTypes, I as InstrumentationRuleType } from './index-RBS1MqCQ.js';
|
|
8
6
|
import Theme from './theme.js';
|
|
9
7
|
import { i as isEmpty, s as safeJsonParse } from './index-BZS1ijMm.js';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
8
|
+
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';
|
|
9
|
+
import { i as CheckCircledIcon, O as OdigosLogo } from './index-BsH_egEe.js';
|
|
10
|
+
import { b as usePendingStore, u as useFilterStore, c as useSelectedStore, a as useInstrumentStore } from './useSelectedStore-93bIo1kE.js';
|
|
11
|
+
import { c as useNotificationStore, u as useDrawerStore, a as useEntityStore, b as useModalStore, d as useSetupStore } from './useSetupStore-CoYx1UQw.js';
|
|
12
|
+
import { b as useKeyDown, c as useOnClickOutside, u as useContainerSize, d as useTransition, a as useCopy } from './useTransition-D0wUpPGk.js';
|
|
13
|
+
import { E as EntityTypes, S as StatusType, C as Crud, O as OtherStatus, F as FieldTypes } from './index-BVVVevuY.js';
|
|
14
|
+
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';
|
|
15
|
+
import { u as useActionFormData, a as useClickNode, c as useDestinationFormData, e as useInstrumentationRuleFormData, h as useTimeAgo, b as useClickNotification, f as useSourceFormData, g as useSourceSelectionFormData } from './useTimeAgo-weEj7br6.js';
|
|
16
|
+
import { A as ACTION_OPTIONS, I as INSTRUMENTATION_RULE_OPTIONS } from './index-G4WmxXds.js';
|
|
17
|
+
import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-C3nz3TIx.js';
|
|
18
|
+
import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-BxQTUOME.js';
|
|
19
|
+
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-BQW5EUgp.js';
|
|
18
20
|
import require$$1 from 'use-sync-external-store/shim';
|
|
19
21
|
import { createPortal } from 'react-dom';
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
+
import { N as NodeTypes, A as AddNodeTypes, E as EdgeTypes } from './index-B72aw6tI.js';
|
|
23
|
+
import { g as getEntityId } from './index-BQs4sULy.js';
|
|
24
|
+
import { M as MONITORS_OPTIONS } from './index-C1PCuZgw.js';
|
|
25
|
+
import { S as SignalType } from './index-DbfrGXPH.js';
|
|
26
|
+
import { R as RulesIcon, W as SourcesIcon, y as ActionsIcon, z as DestinationsIcon } from './index-DB8Djrsy.js';
|
|
27
|
+
import { u as useDarkMode } from './useDarkMode-DxhIuVNi.js';
|
|
28
|
+
import './index-BWqrekK4.js';
|
|
22
29
|
import 'babel-runtime/helpers/extends';
|
|
23
30
|
import 'babel-runtime/core-js/object/get-prototype-of';
|
|
24
31
|
import 'babel-runtime/helpers/classCallCheck';
|
|
@@ -26,7 +33,37 @@ import 'babel-runtime/helpers/createClass';
|
|
|
26
33
|
import 'babel-runtime/helpers/possibleConstructorReturn';
|
|
27
34
|
import 'babel-runtime/helpers/inherits';
|
|
28
35
|
import 'object-assign';
|
|
29
|
-
import './
|
|
36
|
+
import './react-CjImwkhV.js';
|
|
37
|
+
import './index-Hz7AAE0t.js';
|
|
38
|
+
import './index-CIXQeSHu.js';
|
|
39
|
+
import './index-CIgHU72d.js';
|
|
40
|
+
|
|
41
|
+
function styleInject(css, ref) {
|
|
42
|
+
if ( ref === void 0 ) ref = {};
|
|
43
|
+
var insertAt = ref.insertAt;
|
|
44
|
+
|
|
45
|
+
if (typeof document === 'undefined') { return; }
|
|
46
|
+
|
|
47
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
48
|
+
var style = document.createElement('style');
|
|
49
|
+
style.type = 'text/css';
|
|
50
|
+
|
|
51
|
+
if (insertAt === 'top') {
|
|
52
|
+
if (head.firstChild) {
|
|
53
|
+
head.insertBefore(style, head.firstChild);
|
|
54
|
+
} else {
|
|
55
|
+
head.appendChild(style);
|
|
56
|
+
}
|
|
57
|
+
} else {
|
|
58
|
+
head.appendChild(style);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (style.styleSheet) {
|
|
62
|
+
style.styleSheet.cssText = css;
|
|
63
|
+
} else {
|
|
64
|
+
style.appendChild(document.createTextNode(css));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
30
67
|
|
|
31
68
|
const buildCard$3 = (action) => {
|
|
32
69
|
const { type, spec: { actionName, notes, signals, disabled, collectContainerAttributes, collectWorkloadId, collectClusterId, labelsAttributes, annotationsAttributes, clusterAttributes, attributeNamesToDelete, renames, piiCategories, fallbackSamplingRatio, samplingPercentage, endpointsFilters, }, } = action;
|
|
@@ -307,7 +344,7 @@ const CustomFields$1 = ({ actionType, value, setValue, formErrors }) => {
|
|
|
307
344
|
return Component ? React.createElement(Component, { value: value, setValue: setValue, formErrors: formErrors }) : null;
|
|
308
345
|
};
|
|
309
346
|
|
|
310
|
-
const Container$
|
|
347
|
+
const Container$l = styled.div `
|
|
311
348
|
display: flex;
|
|
312
349
|
flex-direction: column;
|
|
313
350
|
gap: 24px;
|
|
@@ -318,7 +355,7 @@ const FieldTitle$1 = styled(Text) `
|
|
|
318
355
|
`;
|
|
319
356
|
const ActionForm = ({ isUpdate, action, formData, formErrors, handleFormChange }) => {
|
|
320
357
|
const theme = Theme.useTheme();
|
|
321
|
-
return (React.createElement(Container$
|
|
358
|
+
return (React.createElement(Container$l, null,
|
|
322
359
|
isUpdate && (React.createElement("div", null,
|
|
323
360
|
React.createElement(FieldTitle$1, null, "Status"),
|
|
324
361
|
React.createElement(Segment, { options: [
|
|
@@ -332,7 +369,7 @@ const ActionForm = ({ isUpdate, action, formData, formErrors, handleFormChange }
|
|
|
332
369
|
React.createElement(TextArea, { title: 'Notes', value: formData['notes'], onChange: ({ target: { value } }) => handleFormChange('notes', value), errorMessage: formErrors['notes'] })));
|
|
333
370
|
};
|
|
334
371
|
|
|
335
|
-
const OverviewDrawer = forwardRef(({ children, width = 640, title, titleTooltip,
|
|
372
|
+
const OverviewDrawer = forwardRef(({ children, width = 640, title, titleTooltip, icons, iconSrcs, isEdit = false, isFormDirty = false, isLastItem = false, onEdit, onSave, onDelete, onCancel, tabs }, drawerRef) => {
|
|
336
373
|
const theme = Theme.useTheme();
|
|
337
374
|
const { isThisPending } = usePendingStore();
|
|
338
375
|
const { addNotification } = useNotificationStore();
|
|
@@ -420,8 +457,8 @@ const OverviewDrawer = forwardRef(({ children, width = 640, title, titleTooltip,
|
|
|
420
457
|
});
|
|
421
458
|
return (React.createElement(React.Fragment, null,
|
|
422
459
|
React.createElement(Drawer, { isOpen: true, onClose: isEdit ? clickCancel : closeDrawer, closeOnEscape: !isDeleteModalOpen && !isCancelModalOpen, width: `${width + 64}px`, header: {
|
|
423
|
-
|
|
424
|
-
|
|
460
|
+
icons,
|
|
461
|
+
iconSrcs,
|
|
425
462
|
title,
|
|
426
463
|
titleTooltip,
|
|
427
464
|
replaceTitleWith: !isSource && isEdit ? React.createElement(EditTitle, { ref: titleRef, title: title }) : undefined,
|
|
@@ -528,7 +565,7 @@ const ActionDrawer = ({ updateAction, deleteAction }) => {
|
|
|
528
565
|
setIsFormDirty(false);
|
|
529
566
|
}
|
|
530
567
|
};
|
|
531
|
-
return (React.createElement(OverviewDrawer, { ref: drawerRef, title: thisItem.spec.actionName || thisItem.type,
|
|
568
|
+
return (React.createElement(OverviewDrawer, { ref: drawerRef, title: thisItem.spec.actionName || thisItem.type, icons: [getActionIcon(thisItem.type)], isEdit: isEditing, isFormDirty: isFormDirty, onEdit: handleEdit, onSave: handleSave, onDelete: handleDelete, onCancel: handleCancel }, isEditing && thisOptionType ? (React.createElement(FormContainer$3, null,
|
|
532
569
|
React.createElement(ActionForm, { isUpdate: true, action: thisOptionType, formData: formData, formErrors: formErrors, handleFormChange: (...params) => {
|
|
533
570
|
setIsFormDirty(true);
|
|
534
571
|
handleFormChange(...params);
|
|
@@ -643,20 +680,27 @@ const buildSpecCell$1 = (action) => {
|
|
|
643
680
|
return str;
|
|
644
681
|
};
|
|
645
682
|
|
|
646
|
-
const TableCellConditions = ({ conditions }) => {
|
|
683
|
+
const TableCellConditions = ({ conditions, id }) => {
|
|
647
684
|
const errors = useMemo(() => conditions?.filter(({ status }) => status === StatusType.Error) || [], [conditions]);
|
|
648
685
|
const warnings = useMemo(() => conditions?.filter(({ status }) => status === StatusType.Warning) || [], [conditions]);
|
|
649
686
|
const disableds = useMemo(() => conditions?.filter(({ status }) => status === OtherStatus.Disabled) || [], [conditions]);
|
|
650
687
|
const isLoading = useMemo(() => !conditions?.length || !!conditions?.find(({ status }) => status === OtherStatus.Loading), [conditions]);
|
|
651
|
-
|
|
688
|
+
const conditionsToShow = errors.length > 0 ? errors : warnings.length > 0 ? warnings : disableds.length > 0 ? disableds : [];
|
|
689
|
+
if (conditionsToShow.length > 0) {
|
|
690
|
+
return (React.createElement("div", { style: { lineHeight: 1 } },
|
|
691
|
+
React.createElement(ConditionsStatuses, { conditions: conditionsToShow, id: id })));
|
|
692
|
+
}
|
|
693
|
+
const elseStatus = isLoading ? OtherStatus.Loading : StatusType.Success;
|
|
694
|
+
return (React.createElement("div", { style: { lineHeight: 1 } },
|
|
695
|
+
React.createElement(Status, { status: elseStatus, title: elseStatus, withBorder: true, withIcon: true })));
|
|
652
696
|
};
|
|
653
|
-
const ConditionsStatuses = ({ conditions }) => {
|
|
697
|
+
const ConditionsStatuses = ({ conditions, id }) => {
|
|
654
698
|
const theme = Theme.useTheme();
|
|
655
|
-
return (React.createElement(FlexRow, null, mapConditions(conditions).map(({ status, type, reason, message, lastTransitionTime }) => {
|
|
699
|
+
return (React.createElement(FlexRow, null, mapConditions(conditions).map(({ status, type, reason, message, lastTransitionTime }, i) => {
|
|
656
700
|
if (status === 'loading' || status === 'disabled')
|
|
657
701
|
status = StatusType.Info;
|
|
658
702
|
const icon = getStatusIcon(status, theme);
|
|
659
|
-
return (React.createElement(Tooltip, { key:
|
|
703
|
+
return (React.createElement(Tooltip, { key: `condition-${id}-${status}-${type}-${i}`, titleIcon: icon, title: type, text: message || reason || '', timestamp: lastTransitionTime },
|
|
660
704
|
React.createElement(Status, { status: status, title: reason || type, withBorder: true, withIcon: true })));
|
|
661
705
|
})));
|
|
662
706
|
};
|
|
@@ -718,7 +762,7 @@ const ActionTable = ({ maxHeight, maxWidth }) => {
|
|
|
718
762
|
},
|
|
719
763
|
{
|
|
720
764
|
columnKey: 'conditions',
|
|
721
|
-
component: () => React.createElement(TableCellConditions, { conditions: act.conditions || [] }),
|
|
765
|
+
component: () => React.createElement(TableCellConditions, { conditions: act.conditions || [], id: act.id }),
|
|
722
766
|
},
|
|
723
767
|
{
|
|
724
768
|
columnKey: 'active-status',
|
|
@@ -739,7 +783,7 @@ const ActionTable = ({ maxHeight, maxWidth }) => {
|
|
|
739
783
|
React.createElement(NoDataFound, null)))));
|
|
740
784
|
};
|
|
741
785
|
|
|
742
|
-
const Container$
|
|
786
|
+
const Container$k = styled(FlexColumn) `
|
|
743
787
|
// width: 100vw;
|
|
744
788
|
// height: 100vh;
|
|
745
789
|
gap: 64px;
|
|
@@ -773,7 +817,7 @@ const AwaitPipeline = () => {
|
|
|
773
817
|
useEffect(() => {
|
|
774
818
|
awaitPipeline();
|
|
775
819
|
}, []);
|
|
776
|
-
return (React.createElement(Container$
|
|
820
|
+
return (React.createElement(Container$k, null,
|
|
777
821
|
React.createElement(OdigosLogoText, { size: 100 }),
|
|
778
822
|
React.createElement(TraceLoader, { width: 400 }),
|
|
779
823
|
React.createElement(TextWrap, null,
|
|
@@ -1025,7 +1069,8 @@ const MonitorDropdown = ({ title = 'Monitors', value, onSelect, onDeselect, ...p
|
|
|
1025
1069
|
return React.createElement(Dropdown, { disabled: !options?.length, title: title, placeholder: 'All', options: options, value: value, onSelect: onSelect, onDeselect: onDeselect, ...props });
|
|
1026
1070
|
};
|
|
1027
1071
|
|
|
1028
|
-
const NamespaceDropdown = ({
|
|
1072
|
+
const NamespaceDropdown = ({ title = 'Namespace', value, onSelect, onDeselect, ...props }) => {
|
|
1073
|
+
const { namespaces } = useEntityStore();
|
|
1029
1074
|
const options = useMemo(() => {
|
|
1030
1075
|
const payload = [];
|
|
1031
1076
|
namespaces?.forEach(({ name }) => {
|
|
@@ -1052,7 +1097,7 @@ const KindDropdown = ({ title = 'Kind', value, onSelect, onDeselect, ...props })
|
|
|
1052
1097
|
return React.createElement(Dropdown, { disabled: !options?.length, title: title, placeholder: 'All', options: options, value: value, onSelect: onSelect, onDeselect: onDeselect, ...props });
|
|
1053
1098
|
};
|
|
1054
1099
|
|
|
1055
|
-
const Container$
|
|
1100
|
+
const Container$j = styled.div `
|
|
1056
1101
|
display: flex;
|
|
1057
1102
|
align-items: center;
|
|
1058
1103
|
margin: 20px 0;
|
|
@@ -1072,7 +1117,7 @@ const ComputePlatformsActionsMenu = ({ connections }) => {
|
|
|
1072
1117
|
useEffect(() => {
|
|
1073
1118
|
return () => clearAll();
|
|
1074
1119
|
}, [clearAll]);
|
|
1075
|
-
return (React.createElement(Container$
|
|
1120
|
+
return (React.createElement(Container$j, null,
|
|
1076
1121
|
React.createElement(FlexRow, { "$gap": 16 },
|
|
1077
1122
|
React.createElement(FlexRow, { "$gap": 12 },
|
|
1078
1123
|
React.createElement(Title$1, null, "Compute platforms"),
|
|
@@ -12324,7 +12369,7 @@ ControlsComponent.displayName = 'Controls';
|
|
|
12324
12369
|
* @remarks To extend or customise the controls, you can use the [`<ControlButton />`](/api-reference/components/control-button) component
|
|
12325
12370
|
*
|
|
12326
12371
|
*/
|
|
12327
|
-
const Controls$
|
|
12372
|
+
const Controls$1 = memo(ControlsComponent);
|
|
12328
12373
|
|
|
12329
12374
|
function MiniMapNodeComponent({ id, x, y, width, height, style, color, strokeColor, strokeWidth, className, borderRadius, shapeRendering, selected, onClick, }) {
|
|
12330
12375
|
const { background, backgroundColor } = style || {};
|
|
@@ -12635,7 +12680,7 @@ function ResizeControl({ nodeId, position, variant = ResizeControlVariant.Handle
|
|
|
12635
12680
|
*/
|
|
12636
12681
|
memo(ResizeControl);
|
|
12637
12682
|
|
|
12638
|
-
const Container$
|
|
12683
|
+
const Container$i = styled(FlexColumn) `
|
|
12639
12684
|
align-items: center !important;
|
|
12640
12685
|
justify-content: center;
|
|
12641
12686
|
align-self: stretch;
|
|
@@ -12672,7 +12717,7 @@ const AddNode = memo(({ id: nodeId, data }) => {
|
|
|
12672
12717
|
const { isThisPending } = usePendingStore();
|
|
12673
12718
|
const entity = nodeId.split('-')[0];
|
|
12674
12719
|
const isPending = isThisPending({ entityType: entity });
|
|
12675
|
-
return (React.createElement(Container$
|
|
12720
|
+
return (React.createElement(Container$i, { "$nodeWidth": nodeWidth, className: 'nowheel nodrag' },
|
|
12676
12721
|
isPending ? (React.createElement(Fragment, null,
|
|
12677
12722
|
React.createElement(TitleWrapper, null,
|
|
12678
12723
|
React.createElement(FadeLoader, null),
|
|
@@ -12689,17 +12734,23 @@ const AddNode = memo(({ id: nodeId, data }) => {
|
|
|
12689
12734
|
React.createElement(Handle, { type: 'source', position: Position.Right, style: { visibility: 'hidden' } })));
|
|
12690
12735
|
});
|
|
12691
12736
|
|
|
12692
|
-
const Container$
|
|
12737
|
+
const Container$h = styled.div `
|
|
12693
12738
|
width: ${({ $nodeWidth }) => `${$nodeWidth}px`};
|
|
12694
12739
|
`;
|
|
12695
12740
|
const BaseNode = memo(({ id: nodeId, data }) => {
|
|
12741
|
+
const theme = Theme.useTheme();
|
|
12696
12742
|
const { nodeWidth, id: entityId, type: entityType, status, faded, title, subTitle, icon, icons, iconSrc, iconSrcs, monitors, isActive, raw } = data;
|
|
12697
12743
|
const isSource = entityType === EntityTypes.Source;
|
|
12744
|
+
const hasActiveBoolean = typeof isActive === 'boolean';
|
|
12698
12745
|
const { isThisPending } = usePendingStore();
|
|
12699
12746
|
const isPending = isThisPending({ entityType, entityId });
|
|
12700
12747
|
const renderActions = () => {
|
|
12748
|
+
const StatusIcon = hasActiveBoolean ? getStatusIcon(isActive ? StatusType.Success : StatusType.Info, theme) : status && getStatusIcon(status, theme);
|
|
12749
|
+
const statusTooltipText = hasActiveBoolean ? `${entityType} is ${isActive ? 'active' : 'inactive'}` : undefined;
|
|
12701
12750
|
const sourceIsInstrumenting = isSource && (!raw.conditions?.length || raw.conditions?.some(({ status }) => status === 'loading'));
|
|
12702
|
-
|
|
12751
|
+
// TODO: handle action/icon to apply instrumentation-rules for individual sources (@Notion GEN-1650)
|
|
12752
|
+
return isPending ? (React.createElement(FadeLoader, null)) : StatusIcon ? (React.createElement(Tooltip, { text: statusTooltipText },
|
|
12753
|
+
React.createElement(StatusIcon, { size: 20 }))) : sourceIsInstrumenting ? (React.createElement(FadeLoader, null)) : null;
|
|
12703
12754
|
};
|
|
12704
12755
|
const { selectedSources, setSelectedSources } = useSelectedStore();
|
|
12705
12756
|
const namespaces = { ...selectedSources };
|
|
@@ -12716,25 +12767,39 @@ const BaseNode = memo(({ id: nodeId, data }) => {
|
|
|
12716
12767
|
}
|
|
12717
12768
|
setSelectedSources(namespaces);
|
|
12718
12769
|
};
|
|
12719
|
-
return (React.createElement(Container$
|
|
12720
|
-
React.createElement(DataTab, { title: title, subTitle: subTitle,
|
|
12770
|
+
return (React.createElement(Container$h, { "data-id": nodeId, "$nodeWidth": nodeWidth, className: 'nowheel nodrag' },
|
|
12771
|
+
React.createElement(DataTab, { title: title, subTitle: subTitle, onClick: () => { }, renderActions: renderActions, iconProps: {
|
|
12772
|
+
icon: icon,
|
|
12773
|
+
icons: icons,
|
|
12774
|
+
iconSrc: iconSrc,
|
|
12775
|
+
iconSrcs: iconSrcs,
|
|
12776
|
+
}, visualProps: {
|
|
12777
|
+
status: status,
|
|
12778
|
+
faded: faded || (hasActiveBoolean && !isActive),
|
|
12779
|
+
monitors: monitors,
|
|
12780
|
+
}, checkboxProps: {
|
|
12781
|
+
withCheckbox: isSource,
|
|
12782
|
+
isChecked: sourceIndex !== -1,
|
|
12783
|
+
onCheckboxChange: onSelectSource,
|
|
12784
|
+
isCheckboxDisabled: isPending,
|
|
12785
|
+
} }),
|
|
12721
12786
|
React.createElement(Handle, { type: 'target', position: Position.Left, style: { visibility: 'hidden' } }),
|
|
12722
12787
|
React.createElement(Handle, { type: 'source', position: Position.Right, style: { visibility: 'hidden' } })));
|
|
12723
12788
|
});
|
|
12724
12789
|
|
|
12725
|
-
const Container$
|
|
12790
|
+
const Container$g = styled.div `
|
|
12726
12791
|
width: ${({ $nodeWidth }) => `${$nodeWidth}px`};
|
|
12727
12792
|
height: ${({ $nodeHeight }) => `${$nodeHeight}px`};
|
|
12728
12793
|
opacity: 0;
|
|
12729
12794
|
`;
|
|
12730
12795
|
const EdgedNode = memo(({ data }) => {
|
|
12731
12796
|
const { nodeWidth, nodeHeight } = data;
|
|
12732
|
-
return (React.createElement(Container$
|
|
12797
|
+
return (React.createElement(Container$g, { "$nodeWidth": nodeWidth, "$nodeHeight": nodeHeight, className: 'nowheel nodrag' },
|
|
12733
12798
|
React.createElement(Handle, { type: 'source', position: Position.Right, style: { visibility: 'hidden' } }),
|
|
12734
12799
|
React.createElement(Handle, { type: 'target', position: Position.Left, style: { visibility: 'hidden' } })));
|
|
12735
12800
|
});
|
|
12736
12801
|
|
|
12737
|
-
const Container$
|
|
12802
|
+
const Container$f = styled.div `
|
|
12738
12803
|
width: ${({ $nodeWidth }) => $nodeWidth}px;
|
|
12739
12804
|
height: ${({ $nodeHeight }) => $nodeHeight}px;
|
|
12740
12805
|
background: transparent;
|
|
@@ -12743,12 +12808,12 @@ const Container$g = styled.div `
|
|
|
12743
12808
|
`;
|
|
12744
12809
|
const FrameNode = memo(({ data }) => {
|
|
12745
12810
|
const { nodeWidth, nodeHeight } = data;
|
|
12746
|
-
return (React.createElement(Container$
|
|
12811
|
+
return (React.createElement(Container$f, { "$nodeWidth": nodeWidth, "$nodeHeight": nodeHeight, className: 'nowheel nodrag' },
|
|
12747
12812
|
React.createElement(Handle, { type: 'source', position: Position.Right, style: { visibility: 'hidden' } }),
|
|
12748
12813
|
React.createElement(Handle, { type: 'target', position: Position.Left, style: { visibility: 'hidden' } })));
|
|
12749
12814
|
});
|
|
12750
12815
|
|
|
12751
|
-
const Container$
|
|
12816
|
+
const Container$e = styled.div `
|
|
12752
12817
|
position: relative;
|
|
12753
12818
|
z-index: 1;
|
|
12754
12819
|
width: ${({ $nodeWidth }) => $nodeWidth}px;
|
|
@@ -12809,7 +12874,7 @@ const ScrollNode = memo(({ data, ...rest }) => {
|
|
|
12809
12874
|
current?.addEventListener('scroll', handleScroll);
|
|
12810
12875
|
return () => current?.removeEventListener('scroll', handleScroll);
|
|
12811
12876
|
}, [onScroll]);
|
|
12812
|
-
return (React.createElement(Container$
|
|
12877
|
+
return (React.createElement(Container$e, { ref: containerRef, "$nodeWidth": nodeWidth, "$nodeHeight": nodeHeight, className: 'nowheel nodrag' },
|
|
12813
12878
|
items.map((item) => (React.createElement(BaseNodeWrapper, { key: item.id, "$framePadding": item.data.framePadding, onClick: (e) => {
|
|
12814
12879
|
e.stopPropagation();
|
|
12815
12880
|
// @ts-ignore
|
|
@@ -12819,7 +12884,7 @@ const ScrollNode = memo(({ data, ...rest }) => {
|
|
|
12819
12884
|
React.createElement(LoadMoreWrapper, { "$hide": isBottomOfList })));
|
|
12820
12885
|
});
|
|
12821
12886
|
|
|
12822
|
-
const Container$
|
|
12887
|
+
const Container$d = styled.div `
|
|
12823
12888
|
position: relative;
|
|
12824
12889
|
width: ${({ $nodeWidth }) => `${$nodeWidth}px`};
|
|
12825
12890
|
padding: 12px 0px 16px 0px;
|
|
@@ -12888,7 +12953,7 @@ const HeaderNode = memo(({ id: nodeId, data }) => {
|
|
|
12888
12953
|
setSelectedSources({});
|
|
12889
12954
|
}
|
|
12890
12955
|
};
|
|
12891
|
-
return (React.createElement(Container$
|
|
12956
|
+
return (React.createElement(Container$d, { "$nodeWidth": nodeWidth, className: 'nowheel nodrag' },
|
|
12892
12957
|
entityType === EntityTypes.Source && (React.createElement(SelectorWrapper, null,
|
|
12893
12958
|
React.createElement(Checkbox, { partiallyChecked: hasSelected && sources?.length !== totalSelectedSources, value: hasSelected && sources?.length === totalSelectedSources, onChange: onSelect, disabled: !sources?.length }))),
|
|
12894
12959
|
React.createElement(IconTitleBadge, { icon: Icon, title: title, badge: isSourceAwaitingInstrumentation ? `${instrumentingPercent}%` : badge, badgeTooltip: badgeTooltip, loading: isFetching && !isSourceAwaitingInstrumentation }),
|
|
@@ -12950,12 +13015,12 @@ const LabeledEdge = memo(({ id, sourceX, sourceY, targetX, targetY, sourcePositi
|
|
|
12950
13015
|
React.createElement(Tooltip, { text: 'Heads up! The data-flow metrics you see are calculated over 10-second intervals.' }, data?.label)))));
|
|
12951
13016
|
});
|
|
12952
13017
|
|
|
12953
|
-
const Container$
|
|
13018
|
+
const Container$c = styled.div `
|
|
12954
13019
|
width: ${({ $nodeWidth }) => `${$nodeWidth}px`};
|
|
12955
13020
|
`;
|
|
12956
13021
|
const SkeletonNode = memo(({ id: nodeId, data }) => {
|
|
12957
13022
|
const { nodeWidth } = data;
|
|
12958
|
-
return (React.createElement(Container$
|
|
13023
|
+
return (React.createElement(Container$c, { "data-id": nodeId, "$nodeWidth": nodeWidth, className: 'nowheel nodrag' },
|
|
12959
13024
|
React.createElement(SkeletonLoader, { size: 3 })));
|
|
12960
13025
|
});
|
|
12961
13026
|
|
|
@@ -12997,7 +13062,7 @@ const Flow = ({ nodes, edges, onNodesChange, onEdgesChange }) => {
|
|
|
12997
13062
|
return (React.createElement(FlowWrapper, null,
|
|
12998
13063
|
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) },
|
|
12999
13064
|
React.createElement(ControllerWrapper, null,
|
|
13000
|
-
React.createElement(Controls$
|
|
13065
|
+
React.createElement(Controls$1, { position: 'bottom-right', orientation: 'horizontal', showInteractive: false, showZoom: true, showFitView: true, fitViewOptions: {
|
|
13001
13066
|
duration: 300,
|
|
13002
13067
|
padding: 0.02,
|
|
13003
13068
|
includeHiddenNodes: true,
|
|
@@ -13349,6 +13414,10 @@ const getNodePositions = ({ containerWidth }) => {
|
|
|
13349
13414
|
const endX = (containerWidth <= 1500 ? 1500 : containerWidth) - nodeWidth$1 - startX;
|
|
13350
13415
|
const getY = (idx) => nodeHeight * ((idx || 0) + 1);
|
|
13351
13416
|
const positions = {
|
|
13417
|
+
[EntityTypes.Namespace]: {
|
|
13418
|
+
x: 0,
|
|
13419
|
+
y: () => 0,
|
|
13420
|
+
},
|
|
13352
13421
|
[EntityTypes.InstrumentationRule]: {
|
|
13353
13422
|
x: startX,
|
|
13354
13423
|
y: getY,
|
|
@@ -13378,6 +13447,7 @@ const getNodePositions = ({ containerWidth }) => {
|
|
|
13378
13447
|
const { nodeWidth } = nodeConfig;
|
|
13379
13448
|
const mapToNodeData = (entity) => {
|
|
13380
13449
|
const { hasDisableds, priorotizedStatus } = getConditionsBooleans(entity.conditions || []);
|
|
13450
|
+
const { icon, iconSrc } = getDestinationIcon(entity.destinationType.type);
|
|
13381
13451
|
return {
|
|
13382
13452
|
nodeWidth,
|
|
13383
13453
|
id: entity.id,
|
|
@@ -13386,7 +13456,8 @@ const mapToNodeData = (entity) => {
|
|
|
13386
13456
|
faded: hasDisableds,
|
|
13387
13457
|
title: getEntityLabel(entity, EntityTypes.Destination, { prioritizeDisplayName: true }),
|
|
13388
13458
|
subTitle: entity.destinationType.displayName,
|
|
13389
|
-
|
|
13459
|
+
icon,
|
|
13460
|
+
iconSrc,
|
|
13390
13461
|
monitors: Object.keys(entity.exportedSignals).filter((signal) => entity.exportedSignals[signal] === true),
|
|
13391
13462
|
raw: entity,
|
|
13392
13463
|
};
|
|
@@ -13454,7 +13525,7 @@ const buildDestinationNodes = ({ loading, entities, positions, unfilteredCount }
|
|
|
13454
13525
|
return nodes;
|
|
13455
13526
|
};
|
|
13456
13527
|
|
|
13457
|
-
const Container$
|
|
13528
|
+
const Container$b = styled.div `
|
|
13458
13529
|
width: 100%;
|
|
13459
13530
|
height: ${({ $heightToRemove }) => `calc(100vh - ${$heightToRemove})`};
|
|
13460
13531
|
position: relative;
|
|
@@ -13527,7 +13598,7 @@ const DataFlow = ({ heightToRemove, metrics }) => {
|
|
|
13527
13598
|
});
|
|
13528
13599
|
handleNodesChanged(ruleNodes, EntityTypes.InstrumentationRule);
|
|
13529
13600
|
}, [instrumentationRules, instrumentationRulesLoading, positions[EntityTypes.InstrumentationRule]]);
|
|
13530
|
-
return (React.createElement(Container$
|
|
13601
|
+
return (React.createElement(Container$b, { ref: containerRef, "$heightToRemove": heightToRemove },
|
|
13531
13602
|
React.createElement(Flow, { nodes: nodes, edges: edges, onNodesChange: onNodesChange, onEdgesChange: onEdgesChange })));
|
|
13532
13603
|
};
|
|
13533
13604
|
|
|
@@ -13666,7 +13737,7 @@ const FormWrapper = styled.div `
|
|
|
13666
13737
|
gap: 12px;
|
|
13667
13738
|
padding: 12px;
|
|
13668
13739
|
`;
|
|
13669
|
-
const ToggleWrapper
|
|
13740
|
+
const ToggleWrapper = styled.div `
|
|
13670
13741
|
padding: 12px 6px 6px 6px;
|
|
13671
13742
|
`;
|
|
13672
13743
|
const Actions = styled.div `
|
|
@@ -13693,7 +13764,7 @@ const getFilterCount = (params) => {
|
|
|
13693
13764
|
count++;
|
|
13694
13765
|
return count;
|
|
13695
13766
|
};
|
|
13696
|
-
const Filters$1 = (
|
|
13767
|
+
const Filters$1 = () => {
|
|
13697
13768
|
const theme = Theme.useTheme();
|
|
13698
13769
|
const { namespaces, kinds, monitors, languages, errors, onlyErrors, setAll, clearAll, getEmptyState } = useFilterStore();
|
|
13699
13770
|
// We need local state, because we want to keep the filters in the store only when the user clicks on apply
|
|
@@ -13735,11 +13806,11 @@ const Filters$1 = ({ namespaces: namespaceItems }) => {
|
|
|
13735
13806
|
React.createElement(SelectionButton, { label: 'Filters', icon: FilterIcon, badgeLabel: filterCount, badgeFilled: !!filterCount, withBorder: true, color: 'transparent', onClick: toggleFocused }),
|
|
13736
13807
|
React.createElement(AbsoluteContainer$1, { "$hidden": !focused },
|
|
13737
13808
|
React.createElement(FormWrapper, null,
|
|
13738
|
-
React.createElement(NamespaceDropdown, {
|
|
13809
|
+
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 }),
|
|
13739
13810
|
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 }),
|
|
13740
13811
|
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 }),
|
|
13741
13812
|
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 }),
|
|
13742
|
-
React.createElement(ToggleWrapper
|
|
13813
|
+
React.createElement(ToggleWrapper, null,
|
|
13743
13814
|
React.createElement(Toggle, { title: 'Show only sources with errors', initialValue: filters['onlyErrors'], onChange: (bool) => setFilters((prev) => ({ ...prev, errors: [], onlyErrors: bool })) })),
|
|
13744
13815
|
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 })),
|
|
13745
13816
|
React.createElement(Actions, null,
|
|
@@ -13749,7 +13820,7 @@ const Filters$1 = ({ namespaces: namespaceItems }) => {
|
|
|
13749
13820
|
React.createElement(ActionButton$1, { variant: 'tertiary', onClick: onReset, "$color": theme.text.error }, "Reset"))))));
|
|
13750
13821
|
};
|
|
13751
13822
|
|
|
13752
|
-
const Container$
|
|
13823
|
+
const Container$a = styled.div `
|
|
13753
13824
|
display: flex;
|
|
13754
13825
|
align-items: center;
|
|
13755
13826
|
margin: 20px 0;
|
|
@@ -13768,12 +13839,12 @@ const AddButton = styled(Button) `
|
|
|
13768
13839
|
min-width: 160px;
|
|
13769
13840
|
padding-right: 24px;
|
|
13770
13841
|
`;
|
|
13771
|
-
const DataFlowActionsMenu = ({
|
|
13842
|
+
const DataFlowActionsMenu = ({ addEntity }) => {
|
|
13772
13843
|
const theme = Theme.useTheme();
|
|
13773
13844
|
const { setCurrentModal } = useModalStore();
|
|
13774
|
-
return (React.createElement(Container$
|
|
13845
|
+
return (React.createElement(Container$a, null,
|
|
13775
13846
|
React.createElement(Search, null),
|
|
13776
|
-
React.createElement(Filters$1,
|
|
13847
|
+
React.createElement(Filters$1, null),
|
|
13777
13848
|
addEntity && (React.createElement(PushToEnd, null,
|
|
13778
13849
|
React.createElement(AddButton, { "data-id": `add-${addEntity}`, onClick: () => setCurrentModal(addEntity) },
|
|
13779
13850
|
React.createElement(PlusIcon$1, { fill: theme.colors.primary }),
|
|
@@ -13835,7 +13906,7 @@ const DynamicFields = ({ fields, onChange, formErrors }) => {
|
|
|
13835
13906
|
case FieldTypes.Input:
|
|
13836
13907
|
return React.createElement(Input, { key: field.name, ...rest, onChange: (e) => onChange(field.name, e.target.value), errorMessage: formErrors[field.name] });
|
|
13837
13908
|
case FieldTypes.Dropdown:
|
|
13838
|
-
return (React.createElement(Dropdown, { key: field.name, ...rest, value: { id: rest.value || '', value: rest.value || '' }, options: rest.options || [], onSelect: (option) => onChange(field.name, option.value), errorMessage: formErrors[field.name] }));
|
|
13909
|
+
return (React.createElement(Dropdown, { key: field.name, ...rest, showSearch: true, value: { id: rest.value || '', value: rest.value || '' }, options: rest.options || [], onSelect: (option) => onChange(field.name, option.value), errorMessage: formErrors[field.name] }));
|
|
13839
13910
|
case FieldTypes.MultiInput:
|
|
13840
13911
|
return (React.createElement(InputList, { key: field.name, ...rest, value: typeof rest.value === 'string' ? safeJsonParse(rest.value, []) : rest.value, onChange: (value) => onChange(field.name, JSON.stringify(value)), errorMessage: formErrors[field.name] }));
|
|
13841
13912
|
case FieldTypes.KeyValuePair:
|
|
@@ -13889,7 +13960,7 @@ const TestConnection = ({ destination, disabled, status, onError, onSuccess, val
|
|
|
13889
13960
|
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')));
|
|
13890
13961
|
};
|
|
13891
13962
|
|
|
13892
|
-
const Container$
|
|
13963
|
+
const Container$9 = styled.div `
|
|
13893
13964
|
display: flex;
|
|
13894
13965
|
flex-direction: column;
|
|
13895
13966
|
gap: 24px;
|
|
@@ -13959,7 +14030,7 @@ const DestinationForm = ({ isUpdate, categoryItem, formData, formErrors, validat
|
|
|
13959
14030
|
traces: signals.includes(SignalType.Traces),
|
|
13960
14031
|
});
|
|
13961
14032
|
};
|
|
13962
|
-
return (React.createElement(Container$
|
|
14033
|
+
return (React.createElement(Container$9, null,
|
|
13963
14034
|
!isUpdate && (React.createElement(React.Fragment, null,
|
|
13964
14035
|
React.createElement(SectionTitle, { title: 'Create connection', 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: () => {
|
|
13965
14036
|
setIsFormDirty(false);
|
|
@@ -14041,6 +14112,7 @@ const DestinationDrawer = ({ categories, updateDestination, deleteDestination, t
|
|
|
14041
14112
|
if (!thisItem)
|
|
14042
14113
|
return null;
|
|
14043
14114
|
const thisOptionType = categories.map(({ items }) => items.filter(({ type }) => type === thisItem.destinationType.type)).filter((arr) => !!arr.length)?.[0]?.[0];
|
|
14115
|
+
const { icon, iconSrc } = getDestinationIcon(thisOptionType.type);
|
|
14044
14116
|
const handleEdit = (bool) => {
|
|
14045
14117
|
setIsEditing(typeof bool === 'boolean' ? bool : true);
|
|
14046
14118
|
};
|
|
@@ -14066,7 +14138,7 @@ const DestinationDrawer = ({ categories, updateDestination, deleteDestination, t
|
|
|
14066
14138
|
setIsFormDirty(false);
|
|
14067
14139
|
}
|
|
14068
14140
|
};
|
|
14069
|
-
return (React.createElement(OverviewDrawer, { ref: drawerRef, title: thisItem.name || thisItem.destinationType.displayName, iconSrc:
|
|
14141
|
+
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,
|
|
14070
14142
|
React.createElement(DestinationForm, { isUpdate: true, categoryItem: thisOptionType, formData: formData, formErrors: formErrors, handleFormChange: (...params) => {
|
|
14071
14143
|
setIsFormDirty(true);
|
|
14072
14144
|
handleFormChange(...params);
|
|
@@ -14087,7 +14159,16 @@ const DestinationsList = ({ items, setSelectedItem }) => {
|
|
|
14087
14159
|
return items.map((category) => {
|
|
14088
14160
|
return (React.createElement(ListsWrapper$1, { key: `category-${category.name}` },
|
|
14089
14161
|
React.createElement(SectionTitle, { size: 'small', title: capitalizeFirstLetter(category.name), description: category.description }),
|
|
14090
|
-
category.items.map((item, idx) =>
|
|
14162
|
+
category.items.map((item, idx) => {
|
|
14163
|
+
const { icon, iconSrc } = getDestinationIcon(item.type);
|
|
14164
|
+
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: {
|
|
14165
|
+
icon,
|
|
14166
|
+
iconSrc,
|
|
14167
|
+
}, visualProps: {
|
|
14168
|
+
monitors: Object.keys(item.supportedSignals).filter((signal) => item.supportedSignals[signal].supported),
|
|
14169
|
+
monitorsWithLabels: true,
|
|
14170
|
+
} }));
|
|
14171
|
+
})));
|
|
14091
14172
|
});
|
|
14092
14173
|
};
|
|
14093
14174
|
|
|
@@ -14101,10 +14182,19 @@ const PotentialDestinationsList = ({ items, setSelectedItem }) => {
|
|
|
14101
14182
|
return null;
|
|
14102
14183
|
return (React.createElement(ListsWrapper, null,
|
|
14103
14184
|
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.' }),
|
|
14104
|
-
items.map((item, idx) =>
|
|
14185
|
+
items.map((item, idx) => {
|
|
14186
|
+
const { icon, iconSrc } = getDestinationIcon(item.type);
|
|
14187
|
+
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: {
|
|
14188
|
+
icon,
|
|
14189
|
+
iconSrc,
|
|
14190
|
+
}, visualProps: {
|
|
14191
|
+
monitors: Object.keys(item.supportedSignals).filter((signal) => item.supportedSignals[signal].supported),
|
|
14192
|
+
monitorsWithLabels: true,
|
|
14193
|
+
} }));
|
|
14194
|
+
})));
|
|
14105
14195
|
};
|
|
14106
14196
|
|
|
14107
|
-
const Container$
|
|
14197
|
+
const Container$8 = styled.div `
|
|
14108
14198
|
display: flex;
|
|
14109
14199
|
flex-direction: column;
|
|
14110
14200
|
gap: 24px;
|
|
@@ -14130,7 +14220,7 @@ const ListsContainer = styled.div `
|
|
|
14130
14220
|
max-height: calc(100vh - 400px);
|
|
14131
14221
|
}
|
|
14132
14222
|
`;
|
|
14133
|
-
const NoDataFoundWrapper$
|
|
14223
|
+
const NoDataFoundWrapper$1 = styled(Container$8) `
|
|
14134
14224
|
margin-top: 80px;
|
|
14135
14225
|
`;
|
|
14136
14226
|
const DROPDOWN_OPTIONS = [
|
|
@@ -14159,7 +14249,7 @@ const ChooseDestinationBody = ({ hidden, categories, potentialDestinations, onSe
|
|
|
14159
14249
|
}, [categories, search, selectedCategory, selectedMonitors]);
|
|
14160
14250
|
if (hidden)
|
|
14161
14251
|
return null;
|
|
14162
|
-
return (React.createElement(Container$
|
|
14252
|
+
return (React.createElement(Container$8, null,
|
|
14163
14253
|
React.createElement(SectionTitle, { title: 'Choose destination', description: 'Add backend destination you want to connect with Odigos.' }),
|
|
14164
14254
|
React.createElement(Filters, null,
|
|
14165
14255
|
React.createElement(WidthConstraint, null,
|
|
@@ -14168,13 +14258,13 @@ const ChooseDestinationBody = ({ hidden, categories, potentialDestinations, onSe
|
|
|
14168
14258
|
React.createElement(Dropdown, { options: DROPDOWN_OPTIONS, value: selectedCategory, onSelect: (opt) => setSelectedCategory(opt), onDeselect: () => { } })),
|
|
14169
14259
|
React.createElement(MonitorsCheckboxes, { title: '', selectedSignals: selectedMonitors, setSelectedSignals: setSelectedMonitors })),
|
|
14170
14260
|
React.createElement(Divider, null),
|
|
14171
|
-
!filteredDestinations.length && !potentialDestinations.length ? (React.createElement(NoDataFoundWrapper$
|
|
14261
|
+
!filteredDestinations.length && !potentialDestinations.length ? (React.createElement(NoDataFoundWrapper$1, null,
|
|
14172
14262
|
React.createElement(NoDataFound, { title: 'No destinations found' }))) : (React.createElement(ListsContainer, null,
|
|
14173
14263
|
React.createElement(PotentialDestinationsList, { items: potentialDestinations, setSelectedItem: onSelect }),
|
|
14174
14264
|
React.createElement(DestinationsList, { items: filteredDestinations, setSelectedItem: onSelect })))));
|
|
14175
14265
|
};
|
|
14176
14266
|
|
|
14177
|
-
const Container$
|
|
14267
|
+
const Container$7 = styled.div `
|
|
14178
14268
|
display: flex;
|
|
14179
14269
|
`;
|
|
14180
14270
|
const SideMenuWrapper = styled.div `
|
|
@@ -14223,9 +14313,8 @@ const DestinationModal = ({ isOnboarding, categories, potentialDestinations, cre
|
|
|
14223
14313
|
value: formData.name,
|
|
14224
14314
|
});
|
|
14225
14315
|
const storedDestination = {
|
|
14226
|
-
type: selectedItem
|
|
14227
|
-
displayName: selectedItem
|
|
14228
|
-
imageUrl: selectedItem?.imageUrl || '',
|
|
14316
|
+
type: selectedItem.type,
|
|
14317
|
+
displayName: selectedItem.displayName,
|
|
14229
14318
|
exportedSignals: formData.exportedSignals,
|
|
14230
14319
|
destinationTypeDetails,
|
|
14231
14320
|
category: '', // Could be handled in a more dynamic way if needed
|
|
@@ -14258,7 +14347,7 @@ const DestinationModal = ({ isOnboarding, categories, potentialDestinations, cre
|
|
|
14258
14347
|
};
|
|
14259
14348
|
useKeyDown({ key: 'Enter', active: isOpen }, () => handleSubmit());
|
|
14260
14349
|
return (React.createElement(Modal, { isOpen: isOpen, onClose: handleClose, header: { title: 'Add Destination' }, actionComponent: React.createElement(NavigationButtons, { buttons: renderHeaderButtons() }) },
|
|
14261
|
-
React.createElement(Container$
|
|
14350
|
+
React.createElement(Container$7, null,
|
|
14262
14351
|
React.createElement(SideMenuWrapper, null,
|
|
14263
14352
|
React.createElement(Stepper, { currentStep: !!selectedItem ? 2 : 1, data: [
|
|
14264
14353
|
{ stepNumber: 1, title: 'Destinations' },
|
|
@@ -14269,7 +14358,7 @@ const DestinationModal = ({ isOnboarding, categories, potentialDestinations, cre
|
|
|
14269
14358
|
!!selectedItem && (React.createElement(DestinationForm, { categoryItem: selectedItem, formData: formData, formErrors: formErrors, handleFormChange: handleFormChange, dynamicFields: dynamicFields, setDynamicFields: setDynamicFields, validateForm: validateForm, testConnection: testConnection, testLoading: testLoading, testResult: testResult }))))));
|
|
14270
14359
|
};
|
|
14271
14360
|
|
|
14272
|
-
const Container$
|
|
14361
|
+
const Container$6 = styled.div `
|
|
14273
14362
|
display: flex;
|
|
14274
14363
|
flex-direction: column;
|
|
14275
14364
|
align-items: flex-start;
|
|
@@ -14282,14 +14371,24 @@ const Container$7 = styled.div `
|
|
|
14282
14371
|
`;
|
|
14283
14372
|
const ConfiguredList = () => {
|
|
14284
14373
|
const { configuredDestinations } = useSetupStore();
|
|
14285
|
-
return (React.createElement(Container$
|
|
14374
|
+
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 })))));
|
|
14286
14375
|
};
|
|
14287
|
-
const ListItem
|
|
14376
|
+
const ListItem = ({ item, isLastItem }) => {
|
|
14288
14377
|
const { removeConfiguredDestination } = useSetupStore();
|
|
14289
14378
|
const [deleteWarning, setDeleteWarning] = useState(false);
|
|
14379
|
+
const { icon, iconSrc } = getDestinationIcon(item.type);
|
|
14290
14380
|
return (React.createElement(React.Fragment, null,
|
|
14291
|
-
React.createElement(DataTab, { title: item.displayName,
|
|
14292
|
-
|
|
14381
|
+
React.createElement(DataTab, { title: item.displayName, iconProps: {
|
|
14382
|
+
icon,
|
|
14383
|
+
iconSrc,
|
|
14384
|
+
}, visualProps: {
|
|
14385
|
+
monitors: Object.keys(item.exportedSignals).filter((signal) => item.exportedSignals[signal] === true),
|
|
14386
|
+
monitorsWithLabels: true,
|
|
14387
|
+
}, extendableProps: {
|
|
14388
|
+
withExtend: true,
|
|
14389
|
+
renderExtended: () => React.createElement(DataCardFields, { data: item.destinationTypeDetails }),
|
|
14390
|
+
}, renderActions: () => (React.createElement(IconButton, { onClick: () => setDeleteWarning(true) },
|
|
14391
|
+
React.createElement(TrashIcon, null))) }),
|
|
14293
14392
|
React.createElement(DeleteWarning, { isOpen: deleteWarning, name: item.displayName || item.type, type: EntityTypes.Destination, isLastItem: isLastItem, onApprove: () => removeConfiguredDestination(item), onDeny: () => setDeleteWarning(false) })));
|
|
14294
14393
|
};
|
|
14295
14394
|
|
|
@@ -14347,6 +14446,7 @@ const DestinationTable = ({ metrics, maxHeight, maxWidth }) => {
|
|
|
14347
14446
|
const filtered = useMemo(() => filterDestinations(destinations, filters), [destinations, filters]);
|
|
14348
14447
|
const rows = useMemo(() => filtered.map((dest) => {
|
|
14349
14448
|
const { hasErrors, hasWarnings, hasDisableds } = getConditionsBooleans(dest.conditions || []);
|
|
14449
|
+
const { icon, iconSrc } = getDestinationIcon(dest.destinationType.type);
|
|
14350
14450
|
return {
|
|
14351
14451
|
status: hasErrors ? StatusType.Error : hasWarnings ? StatusType.Warning : undefined,
|
|
14352
14452
|
faded: hasDisableds,
|
|
@@ -14357,7 +14457,7 @@ const DestinationTable = ({ metrics, maxHeight, maxWidth }) => {
|
|
|
14357
14457
|
cells: [
|
|
14358
14458
|
{
|
|
14359
14459
|
columnKey: 'icon',
|
|
14360
|
-
component: () => React.createElement(IconWrapped, { src:
|
|
14460
|
+
component: () => React.createElement(IconWrapped, { icon: icon, src: iconSrc }),
|
|
14361
14461
|
},
|
|
14362
14462
|
{
|
|
14363
14463
|
columnKey: 'name',
|
|
@@ -14375,7 +14475,7 @@ const DestinationTable = ({ metrics, maxHeight, maxWidth }) => {
|
|
|
14375
14475
|
},
|
|
14376
14476
|
{
|
|
14377
14477
|
columnKey: 'conditions',
|
|
14378
|
-
component: () => React.createElement(TableCellConditions, { conditions: dest.conditions || [] }),
|
|
14478
|
+
component: () => React.createElement(TableCellConditions, { conditions: dest.conditions || [], id: dest.id }),
|
|
14379
14479
|
},
|
|
14380
14480
|
{
|
|
14381
14481
|
columnKey: 'signals',
|
|
@@ -14592,7 +14692,7 @@ const CustomFields = ({ ruleType, value, setValue, formErrors }) => {
|
|
|
14592
14692
|
return Component ? React.createElement(Component, { value: value, setValue: setValue, formErrors: formErrors }) : null;
|
|
14593
14693
|
};
|
|
14594
14694
|
|
|
14595
|
-
const Container$
|
|
14695
|
+
const Container$5 = styled.div `
|
|
14596
14696
|
display: flex;
|
|
14597
14697
|
flex-direction: column;
|
|
14598
14698
|
gap: 24px;
|
|
@@ -14603,7 +14703,7 @@ const FieldTitle = styled(Text) `
|
|
|
14603
14703
|
`;
|
|
14604
14704
|
const InstrumentationRuleForm = ({ isUpdate, rule, formData, formErrors, handleFormChange }) => {
|
|
14605
14705
|
const theme = Theme.useTheme();
|
|
14606
|
-
return (React.createElement(Container$
|
|
14706
|
+
return (React.createElement(Container$5, null,
|
|
14607
14707
|
isUpdate && (React.createElement("div", null,
|
|
14608
14708
|
React.createElement(FieldTitle, null, "Status"),
|
|
14609
14709
|
React.createElement(Segment, { options: [
|
|
@@ -14692,7 +14792,7 @@ const InstrumentationRuleDrawer = ({ updateInstrumentationRule, deleteInstrument
|
|
|
14692
14792
|
setIsFormDirty(false);
|
|
14693
14793
|
}
|
|
14694
14794
|
};
|
|
14695
|
-
return (React.createElement(OverviewDrawer, { ref: drawerRef, title: thisItem.ruleName || thisItem.type,
|
|
14795
|
+
return (React.createElement(OverviewDrawer, { ref: drawerRef, title: thisItem.ruleName || thisItem.type, icons: [getInstrumentationRuleIcon(thisItem.type)], isEdit: isEditing, isFormDirty: isFormDirty, onEdit: handleEdit, onSave: handleSave, onDelete: handleDelete, onCancel: handleCancel }, isEditing && thisOptionType ? (React.createElement(FormContainer$1, null,
|
|
14696
14796
|
React.createElement(InstrumentationRuleForm, { isUpdate: true, rule: thisOptionType, formData: formData, formErrors: formErrors, handleFormChange: (...params) => {
|
|
14697
14797
|
setIsFormDirty(true);
|
|
14698
14798
|
handleFormChange(...params);
|
|
@@ -14832,7 +14932,7 @@ const InstrumentationRuleTable = ({ maxHeight, maxWidth }) => {
|
|
|
14832
14932
|
React.createElement(NoDataFound, null)))));
|
|
14833
14933
|
};
|
|
14834
14934
|
|
|
14835
|
-
const Container$
|
|
14935
|
+
const Container$4 = styled.div `
|
|
14836
14936
|
position: fixed;
|
|
14837
14937
|
bottom: 0;
|
|
14838
14938
|
left: 50%;
|
|
@@ -14849,7 +14949,7 @@ const Container$5 = styled.div `
|
|
|
14849
14949
|
const MultiSourceControl = ({ totalSourceCount, uninstrumentSources }) => {
|
|
14850
14950
|
const theme = Theme.useTheme();
|
|
14851
14951
|
const Transition = useTransition({
|
|
14852
|
-
container: Container$
|
|
14952
|
+
container: Container$4,
|
|
14853
14953
|
animateIn: Theme.animations.slide.in['center'],
|
|
14854
14954
|
animateOut: Theme.animations.slide.out['center'],
|
|
14855
14955
|
});
|
|
@@ -15198,14 +15298,14 @@ const buildCard = (source) => {
|
|
|
15198
15298
|
return arr;
|
|
15199
15299
|
};
|
|
15200
15300
|
|
|
15201
|
-
const Container$
|
|
15301
|
+
const Container$3 = styled.div `
|
|
15202
15302
|
display: flex;
|
|
15203
15303
|
flex-direction: column;
|
|
15204
15304
|
gap: 24px;
|
|
15205
15305
|
padding: 4px;
|
|
15206
15306
|
`;
|
|
15207
15307
|
const SourceForm = ({ formData, handleFormChange }) => {
|
|
15208
|
-
return (React.createElement(Container$
|
|
15308
|
+
return (React.createElement(Container$3, null,
|
|
15209
15309
|
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) })));
|
|
15210
15310
|
};
|
|
15211
15311
|
|
|
@@ -15273,7 +15373,7 @@ const SourceDrawer = ({ persistSources, updateSource, fetchDescribeSource }) =>
|
|
|
15273
15373
|
setIsFormDirty(false);
|
|
15274
15374
|
setIsEditing(false);
|
|
15275
15375
|
};
|
|
15276
|
-
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.',
|
|
15376
|
+
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: [
|
|
15277
15377
|
{
|
|
15278
15378
|
label: Tabs.Overview,
|
|
15279
15379
|
onClick: () => setSelectedTab(Tabs.Overview),
|
|
@@ -15294,7 +15394,7 @@ const SourceDrawer = ({ persistSources, updateSource, fetchDescribeSource }) =>
|
|
|
15294
15394
|
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 }))));
|
|
15295
15395
|
};
|
|
15296
15396
|
|
|
15297
|
-
const Container$
|
|
15397
|
+
const Container$2 = styled.div `
|
|
15298
15398
|
display: flex;
|
|
15299
15399
|
flex-direction: column;
|
|
15300
15400
|
align-items: center;
|
|
@@ -15338,7 +15438,7 @@ const AbsoluteWrapper = styled.div `
|
|
|
15338
15438
|
const SelectionCount = styled(Text) `
|
|
15339
15439
|
width: 18px;
|
|
15340
15440
|
`;
|
|
15341
|
-
const NoDataFoundWrapper
|
|
15441
|
+
const NoDataFoundWrapper = styled.div `
|
|
15342
15442
|
padding: 50px 0;
|
|
15343
15443
|
display: flex;
|
|
15344
15444
|
flex-direction: column;
|
|
@@ -15348,13 +15448,14 @@ const NoDataFoundWrapper$1 = styled.div `
|
|
|
15348
15448
|
max-height: calc(100vh - 360px);
|
|
15349
15449
|
overflow-y: auto;
|
|
15350
15450
|
`;
|
|
15351
|
-
const List
|
|
15451
|
+
const List = ({ isModal = false, filterNamespaces, filterSources, selectedNamespace, onSelectNamespace, selectedSources, onSelectSource, selectedFutureApps, onSelectFutureApps, onSelectAll, }) => {
|
|
15352
15452
|
const theme = Theme.useTheme();
|
|
15353
15453
|
const namespaces = filterNamespaces();
|
|
15454
|
+
const { namespacesLoading } = useEntityStore();
|
|
15354
15455
|
if (!namespaces.length) {
|
|
15355
|
-
return React.createElement(NoDataFoundWrapper
|
|
15456
|
+
return React.createElement(NoDataFoundWrapper, null, namespacesLoading ? React.createElement(FadeLoader, { scale: 2 }) : React.createElement(NoDataFound, { title: 'No namespaces found' }));
|
|
15356
15457
|
}
|
|
15357
|
-
return (React.createElement(Container$
|
|
15458
|
+
return (React.createElement(Container$2, { "$isModal": isModal }, namespaces.map(([namespace, sources]) => {
|
|
15358
15459
|
const sourcesForNamespace = selectedSources[namespace] || [];
|
|
15359
15460
|
const futureAppsForNamespace = selectedFutureApps[namespace] || false;
|
|
15360
15461
|
const isNamespaceLoaded = !!sourcesForNamespace.length;
|
|
@@ -15390,11 +15491,11 @@ const List$1 = ({ isModal = false, filterNamespaces, filterSources, namespacesLo
|
|
|
15390
15491
|
source.numberOfInstances !== 1 && 's',
|
|
15391
15492
|
" \u00B7 ",
|
|
15392
15493
|
source.kind))));
|
|
15393
|
-
}))) : (React.createElement(NoDataFoundWrapper
|
|
15494
|
+
}))) : (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.' }))))));
|
|
15394
15495
|
})));
|
|
15395
15496
|
};
|
|
15396
15497
|
|
|
15397
|
-
const FlexContainer
|
|
15498
|
+
const FlexContainer = styled.div `
|
|
15398
15499
|
display: flex;
|
|
15399
15500
|
align-items: center;
|
|
15400
15501
|
justify-content: space-between;
|
|
@@ -15403,133 +15504,20 @@ const FlexContainer$1 = styled.div `
|
|
|
15403
15504
|
const SearchWrapper = styled.div `
|
|
15404
15505
|
width: 444px;
|
|
15405
15506
|
`;
|
|
15406
|
-
const Controls
|
|
15507
|
+
const Controls = ({ selectedSources, searchText, setSearchText, showSelectedOnly, setShowSelectedOnly }) => {
|
|
15407
15508
|
const selectedAppsCount = Object.values(selectedSources).reduce((prev, curr) => prev + curr.filter((s) => s.selected).length, 0);
|
|
15408
15509
|
return (React.createElement(React.Fragment, null,
|
|
15409
15510
|
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.' }),
|
|
15410
|
-
React.createElement(FlexContainer
|
|
15511
|
+
React.createElement(FlexContainer, { style: { marginTop: 24 } },
|
|
15411
15512
|
React.createElement(SearchWrapper, null,
|
|
15412
15513
|
React.createElement(Input, { placeholder: 'Search Kubernetes Namespaces', icon: SearchIcon, value: searchText, onChange: (e) => setSearchText(e.target.value.toLowerCase()) })),
|
|
15413
15514
|
React.createElement(Toggle, { title: 'Show selected only', initialValue: showSelectedOnly, onChange: setShowSelectedOnly })),
|
|
15414
15515
|
React.createElement(Divider, { margin: '16px 0' })));
|
|
15415
15516
|
};
|
|
15416
15517
|
|
|
15417
|
-
const
|
|
15418
|
-
|
|
15419
|
-
|
|
15420
|
-
React.createElement(List$1, { ...props })));
|
|
15421
|
-
};
|
|
15422
|
-
|
|
15423
|
-
const Container$2 = styled.div `
|
|
15424
|
-
display: flex;
|
|
15425
|
-
align-items: center;
|
|
15426
|
-
flex-direction: column;
|
|
15427
|
-
gap: 12px;
|
|
15428
|
-
height: fit-content;
|
|
15429
|
-
padding-bottom: ${({ $isModal }) => ($isModal ? '48px' : '0')};
|
|
15430
|
-
overflow-y: scroll;
|
|
15431
|
-
`;
|
|
15432
|
-
const ListItem = styled.div `
|
|
15433
|
-
display: flex;
|
|
15434
|
-
align-items: center;
|
|
15435
|
-
justify-content: space-between;
|
|
15436
|
-
width: 100%;
|
|
15437
|
-
padding: 16px 0px;
|
|
15438
|
-
transition: background 0.3s;
|
|
15439
|
-
border-radius: 16px;
|
|
15440
|
-
cursor: pointer;
|
|
15441
|
-
background: ${({ $selected, theme }) => ($selected ? theme.colors.majestic_blue + Theme.opacity.hex['024'] : theme.colors.dropdown_bg_2 + Theme.opacity.hex['040'])};
|
|
15442
|
-
&:hover {
|
|
15443
|
-
background: ${({ $selected, theme }) => ($selected ? theme.colors.majestic_blue + Theme.opacity.hex['040'] : theme.colors.dropdown_bg_2 + Theme.opacity.hex['080'])};
|
|
15444
|
-
}
|
|
15445
|
-
`;
|
|
15446
|
-
const ListItemContent = styled.div `
|
|
15447
|
-
margin-left: 16px;
|
|
15448
|
-
display: flex;
|
|
15449
|
-
gap: 12px;
|
|
15450
|
-
`;
|
|
15451
|
-
const TextWrapper = styled.div `
|
|
15452
|
-
display: flex;
|
|
15453
|
-
flex-direction: column;
|
|
15454
|
-
height: 36px;
|
|
15455
|
-
justify-content: space-between;
|
|
15456
|
-
`;
|
|
15457
|
-
const SelectedTextWrapper = styled.div `
|
|
15458
|
-
margin-right: 24px;
|
|
15459
|
-
`;
|
|
15460
|
-
const NoDataFoundWrapper = styled.div `
|
|
15461
|
-
margin-top: 80px;
|
|
15462
|
-
display: flex;
|
|
15463
|
-
flex-direction: column;
|
|
15464
|
-
align-items: center;
|
|
15465
|
-
gap: 12px;
|
|
15466
|
-
height: 100%;
|
|
15467
|
-
max-height: calc(100vh - 360px);
|
|
15468
|
-
overflow-y: auto;
|
|
15469
|
-
`;
|
|
15470
|
-
const List = ({ isModal = false, namespacesLoading, selectedNamespace, selectedSources, onSelectSource, filterSources, }) => {
|
|
15471
|
-
const sources = selectedSources[selectedNamespace] || [];
|
|
15472
|
-
if (!sources.length) {
|
|
15473
|
-
return React.createElement(NoDataFoundWrapper, null, namespacesLoading ? React.createElement(FadeLoader, { scale: 2 }) : React.createElement(NoDataFound, { title: 'No sources found' }));
|
|
15474
|
-
}
|
|
15475
|
-
return (React.createElement(Container$2, { "$isModal": isModal }, filterSources().map((source) => {
|
|
15476
|
-
const isSelected = selectedSources[selectedNamespace].find(({ name }) => name === source.name)?.selected || false;
|
|
15477
|
-
return (React.createElement(ListItem, { key: `source-${source.name}`, "$selected": isSelected, onClick: () => onSelectSource(source) },
|
|
15478
|
-
React.createElement(ListItemContent, null,
|
|
15479
|
-
React.createElement(IconWrapped, { icon: FolderIcon }),
|
|
15480
|
-
React.createElement(TextWrapper, null,
|
|
15481
|
-
React.createElement(Text, null, source.name),
|
|
15482
|
-
React.createElement(Text, { opacity: 0.8, size: 10 },
|
|
15483
|
-
source.numberOfInstances,
|
|
15484
|
-
" running instance",
|
|
15485
|
-
source.numberOfInstances !== 1 && 's',
|
|
15486
|
-
" \u00B7 ",
|
|
15487
|
-
source.kind))),
|
|
15488
|
-
isSelected && (React.createElement(SelectedTextWrapper, null,
|
|
15489
|
-
React.createElement(Checkbox, { value: true, allowPropagation: true })))));
|
|
15490
|
-
})));
|
|
15491
|
-
};
|
|
15492
|
-
|
|
15493
|
-
const FlexContainer = styled.div `
|
|
15494
|
-
display: flex;
|
|
15495
|
-
align-items: center;
|
|
15496
|
-
justify-content: space-between;
|
|
15497
|
-
gap: 8px;
|
|
15498
|
-
`;
|
|
15499
|
-
const ToggleWrapper = styled.div `
|
|
15500
|
-
display: flex;
|
|
15501
|
-
align-items: center;
|
|
15502
|
-
gap: 32px;
|
|
15503
|
-
`;
|
|
15504
|
-
const Controls = ({ namespaces, selectedNamespace, onSelectNamespace, selectedSources, onSelectAll, selectedFutureApps, onSelectFutureApps, searchText, setSearchText, showSelectedOnly, setShowSelectedOnly, }) => {
|
|
15505
|
-
const futureApps = selectedFutureApps[selectedNamespace] || false;
|
|
15506
|
-
const sources = selectedSources[selectedNamespace] || [];
|
|
15507
|
-
const selectedAppsCount = sources.filter(({ selected }) => selected).length;
|
|
15508
|
-
return (React.createElement(React.Fragment, null,
|
|
15509
|
-
React.createElement(SectionTitle, { title: 'Choose sources', description: "Apps will be automatically instrumented, and data will be sent to the relevant APM's destinations." }),
|
|
15510
|
-
React.createElement(FlexContainer, { style: { marginTop: 24 } },
|
|
15511
|
-
React.createElement(Input, { placeholder: 'Search for sources', icon: SearchIcon, value: searchText, onChange: (e) => setSearchText(e.target.value.toLowerCase()) }),
|
|
15512
|
-
React.createElement(NamespaceDropdown, { namespaces: namespaces, title: '', value: selectedNamespace ? [{ value: selectedNamespace, id: selectedNamespace }] : [], onSelect: ({ id }) => !!id && onSelectNamespace(id), onDeselect: ({ id }) => !!id && onSelectNamespace(id) })),
|
|
15513
|
-
React.createElement(Divider, { margin: '16px 0' }),
|
|
15514
|
-
React.createElement(FlexContainer, null,
|
|
15515
|
-
React.createElement(FlexContainer, null,
|
|
15516
|
-
React.createElement(Text, null, "Selected apps"),
|
|
15517
|
-
React.createElement(Badge, { label: selectedAppsCount, filled: !!selectedAppsCount })),
|
|
15518
|
-
React.createElement(ToggleWrapper, null,
|
|
15519
|
-
React.createElement(Toggle, { title: 'Select all', initialValue: !!selectedAppsCount && selectedAppsCount === sources.length, onChange: onSelectAll }),
|
|
15520
|
-
React.createElement(Toggle, { title: 'Show selected only', initialValue: showSelectedOnly, onChange: setShowSelectedOnly }),
|
|
15521
|
-
React.createElement(Checkbox, { title: 'Future apps', tooltip: 'Automatically instrument all future apps', value: futureApps, onChange: onSelectFutureApps }))),
|
|
15522
|
-
React.createElement(Divider, { margin: '16px 0 24px' })));
|
|
15523
|
-
};
|
|
15524
|
-
|
|
15525
|
-
const Simple = (props) => {
|
|
15526
|
-
return (React.createElement(ModalBody, { "$isNotModal": !props.isModal },
|
|
15527
|
-
React.createElement(Controls, { ...props }),
|
|
15528
|
-
React.createElement(List, { ...props })));
|
|
15529
|
-
};
|
|
15530
|
-
|
|
15531
|
-
const SourceSelectionForm = forwardRef(({ componentType, isModal, namespaces, namespace, namespacesLoading, selectedNamespace, onSelectNamespace }, ref) => {
|
|
15532
|
-
const formState = useSourceSelectionFormData({ namespaces, namespace, selectedNamespace, onSelectNamespace });
|
|
15518
|
+
const SourceSelectionForm = forwardRef((props, ref) => {
|
|
15519
|
+
const { isModal, selectedNamespace, onSelectNamespace, namespace } = props;
|
|
15520
|
+
const formState = useSourceSelectionFormData({ selectedNamespace, onSelectNamespace, namespace });
|
|
15533
15521
|
const { recordedInitialSources, getApiSourcesPayload, getApiFutureAppsPayload } = formState;
|
|
15534
15522
|
useImperativeHandle(ref, () => ({
|
|
15535
15523
|
getFormValues: () => ({
|
|
@@ -15538,17 +15526,12 @@ const SourceSelectionForm = forwardRef(({ componentType, isModal, namespaces, na
|
|
|
15538
15526
|
futureApps: getApiFutureAppsPayload(),
|
|
15539
15527
|
}),
|
|
15540
15528
|
}));
|
|
15541
|
-
|
|
15542
|
-
|
|
15543
|
-
|
|
15544
|
-
case 'FAST':
|
|
15545
|
-
return React.createElement(Fast, { isModal: isModal, namespacesLoading: namespacesLoading, selectedNamespace: selectedNamespace, onSelectNamespace: onSelectNamespace, ...formState });
|
|
15546
|
-
default:
|
|
15547
|
-
return null;
|
|
15548
|
-
}
|
|
15529
|
+
return (React.createElement(ModalBody, { "$isNotModal": !isModal },
|
|
15530
|
+
React.createElement(Controls, { ...props, ...formState }),
|
|
15531
|
+
React.createElement(List, { ...props, ...formState })));
|
|
15549
15532
|
});
|
|
15550
15533
|
|
|
15551
|
-
const SourceModal = ({
|
|
15534
|
+
const SourceModal = ({ selectedNamespace, setSelectedNamespace, namespace, persistSources }) => {
|
|
15552
15535
|
const { currentModal, setCurrentModal } = useModalStore();
|
|
15553
15536
|
const isOpen = currentModal === EntityTypes.Source;
|
|
15554
15537
|
const onSelectNamespace = (ns) => {
|
|
@@ -15574,7 +15557,7 @@ const SourceModal = ({ componentType = 'FAST', namespaces, namespace, namespaces
|
|
|
15574
15557
|
onClick: handleSubmit,
|
|
15575
15558
|
},
|
|
15576
15559
|
] }) },
|
|
15577
|
-
React.createElement(SourceSelectionForm, { ref: formRef,
|
|
15560
|
+
React.createElement(SourceSelectionForm, { ref: formRef, isModal: true, selectedNamespace: selectedNamespace, onSelectNamespace: onSelectNamespace, namespace: namespace })));
|
|
15578
15561
|
};
|
|
15579
15562
|
|
|
15580
15563
|
const columns = [
|
|
@@ -15646,7 +15629,8 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
|
|
|
15646
15629
|
setSelectedSources(payload);
|
|
15647
15630
|
}, [selectedSources]);
|
|
15648
15631
|
const rows = useMemo(() => filtered.map((source) => {
|
|
15649
|
-
const id =
|
|
15632
|
+
const id = getWorkloadId(source);
|
|
15633
|
+
const idString = JSON.stringify(id);
|
|
15650
15634
|
const { hasErrors, hasWarnings, hasDisableds } = getConditionsBooleans(source.conditions || []);
|
|
15651
15635
|
const isPending = isThisPending({ entityType: EntityTypes.Source, entityId: id });
|
|
15652
15636
|
const isChecked = !!selectedSources[id.namespace]?.find((x) => x.namespace === id.namespace && x.name === id.name && x.kind === id.kind);
|
|
@@ -15662,7 +15646,7 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
|
|
|
15662
15646
|
columnKey: 'checkbox-and-icon',
|
|
15663
15647
|
component: () => (React.createElement(FlexRow, { "$gap": 16 },
|
|
15664
15648
|
React.createElement(Checkbox, { disabled: isPending, value: isChecked, onChange: () => onSelectOne(source) }),
|
|
15665
|
-
React.createElement(IconGroup, { icons: getContainersIcons(source.containers) }))),
|
|
15649
|
+
React.createElement(IconGroup, { icons: getContainersIcons(source.containers), id: idString }))),
|
|
15666
15650
|
},
|
|
15667
15651
|
{
|
|
15668
15652
|
columnKey: 'name',
|
|
@@ -15685,7 +15669,7 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
|
|
|
15685
15669
|
},
|
|
15686
15670
|
{
|
|
15687
15671
|
columnKey: 'conditions',
|
|
15688
|
-
component: () => React.createElement(TableCellConditions, { conditions: source.conditions || [] }),
|
|
15672
|
+
component: () => React.createElement(TableCellConditions, { conditions: source.conditions || [], id: idString }),
|
|
15689
15673
|
},
|
|
15690
15674
|
{
|
|
15691
15675
|
columnKey: 'containers',
|
|
@@ -15874,7 +15858,7 @@ const SystemOverview = ({ tokens, saveToken, fetchDescribeOdigos }) => {
|
|
|
15874
15858
|
React.createElement(IconButton, { key: 'cli', onClick: toggleOpen, tooltip: TITLE_TEXT },
|
|
15875
15859
|
React.createElement(TerminalIcon, { size: 18 })),
|
|
15876
15860
|
React.createElement(Drawer, { width: DRAWER_WIDTH, isOpen: isOpen, onClose: toggleOpen, header: {
|
|
15877
|
-
|
|
15861
|
+
icons: [TerminalIcon],
|
|
15878
15862
|
title: TITLE_TEXT,
|
|
15879
15863
|
}, footer: {
|
|
15880
15864
|
isOpen: false,
|