@odigos/ui-kit 0.0.36 → 0.0.38

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 (36) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/lib/components/segment/index.d.ts +1 -0
  3. package/lib/components.js +8 -8
  4. package/lib/constants.js +1 -1
  5. package/lib/containers/destination-form/test-connection/index.d.ts +0 -1
  6. package/lib/containers/multi-source-control/index.d.ts +2 -0
  7. package/lib/containers/overview-drawer/index.d.ts +1 -0
  8. package/lib/containers/source-drawer/index.d.ts +1 -0
  9. package/lib/containers/source-selection-form/index.d.ts +1 -1
  10. package/lib/containers.js +56 -24
  11. package/lib/functions.js +5 -5
  12. package/lib/hooks/useSourceSelectionFormData.d.ts +3 -1
  13. package/lib/hooks.js +3 -3
  14. package/lib/icons/common/index.d.ts +1 -0
  15. package/lib/icons/common/retry-icon/index.d.ts +2 -0
  16. package/lib/icons/common/retry-icon/retry-icon.stories.d.ts +8 -0
  17. package/lib/icons.js +7 -7
  18. package/lib/{index-BGzxan6E.js → index-BcuXR1ve.js} +1 -1
  19. package/lib/{index-Be0m3TUg.js → index-BsDmE-1M.js} +700 -3780
  20. package/lib/{index-CNbTSsNJ.js → index-CEBMbbOj.js} +2 -2
  21. package/lib/{index-BbEmZ4Wj.js → index-CMWGlHc6.js} +2 -2
  22. package/lib/{index-DJpBLpwG.js → index-Cn0s9o5b.js} +9 -2
  23. package/lib/{index-7YZOplrB.js → index-Dd01kW5v.js} +1 -1
  24. package/lib/{index-CrethNg6.js → index-DtCiWUAb.js} +6 -4
  25. package/lib/{index-t3OxxFsp.js → index-E-5xGoYC.js} +1 -1
  26. package/lib/{index-oEjS7cX3.js → index-McgJMLSC.js} +4 -4
  27. package/lib/{index-aRNtyuuU.js → index-di3Hlzql.js} +1 -1
  28. package/lib/{index-D8AnbGCE.js → index-jnB_opsW.js} +1 -1
  29. package/lib/snippets.js +8 -8
  30. package/lib/store.js +1 -1
  31. package/lib/theme.js +1 -1
  32. package/lib/types/destinations/index.d.ts +2 -0
  33. package/lib/types.js +2 -0
  34. package/lib/{useSourceSelectionFormData-CH2xUOpu.js → useSourceSelectionFormData-KKJLbIoW.js} +11 -7
  35. package/lib/{useTransition-0Rz0QKmh.js → useTransition-DE4VdDIO.js} +1 -1
  36. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.38](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.37...ui-kit-v0.0.38) (2025-06-11)
4
+
5
+
6
+ ### Features
7
+
8
+ * add buttons to rollout-restart workloads ([#168](https://github.com/odigos-io/ui-kit/issues/168)) ([bd303bb](https://github.com/odigos-io/ui-kit/commit/bd303bb1e4161a2b9a50923d91ff8e9569e20a35))
9
+ * search for sources in source selection form ([#169](https://github.com/odigos-io/ui-kit/issues/169)) ([195f8b8](https://github.com/odigos-io/ui-kit/commit/195f8b85410d46062dc9929b08e371f4d06468d5))
10
+
11
+ ## [0.0.37](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.36...ui-kit-v0.0.37) (2025-06-08)
12
+
13
+
14
+ ### Features
15
+
16
+ * add 2 Splunk dest types ([#161](https://github.com/odigos-io/ui-kit/issues/161)) ([a634f14](https://github.com/odigos-io/ui-kit/commit/a634f143b99e479b4e956324157e5d540209fb53))
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * test connection ([#162](https://github.com/odigos-io/ui-kit/issues/162)) ([d62a3d5](https://github.com/odigos-io/ui-kit/commit/d62a3d506bd9f36175ceba982221ac9e2b44d6f9))
22
+
3
23
  ## [0.0.36](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.35...ui-kit-v0.0.36) (2025-06-05)
4
24
 
5
25
 
@@ -7,6 +7,7 @@ interface SegmentProps {
7
7
  label?: string;
8
8
  value: SelectedValue;
9
9
  selectedBgColor?: CSSProperties['backgroundColor'];
10
+ selectedTextColor?: CSSProperties['color'];
10
11
  }[];
11
12
  selected: SelectedValue;
12
13
  setSelected: (value: SelectedValue) => void;
package/lib/components.js CHANGED
@@ -1,15 +1,15 @@
1
- import { B as Button } from './index-Be0m3TUg.js';
2
- export { a as AutocompleteInput, b as Badge, a1 as CenterThis, C as Checkbox, c as Code, d as ConditionDetails, D as DataCard, f as DataCardFieldTypes, e as DataCardFields, g as DataTab, h as Divider, i as DocsButton, j as Drawer, l as DrawerFooter, k as DrawerHeader, m as Dropdown, E as ExtendArrow, F as FadeLoader, n as FieldError, o as FieldLabel, a0 as FlexColumn, $ as FlexRow, H as Header, I as IconButton, p as IconGroup, q as IconTitleBadge, r as IconWrapped, s as IconsNav, t as ImageControlled, u as Input, v as InputList, w as InputTable, x as InteractiveTable, K as KeyValueInputsList, M as Modal, a4 as ModalBody, y as MonitorsCheckboxes, z as MonitorsIcons, N as NavigationButtons, G as NoDataFound, J as NotificationNote, a3 as Overlay, S as ScrollX, L as SectionTitle, O as Segment, P as SelectionButton, Q as SkeletonLoader, R as Status, U as Stepper, a5 as TableContainer, a6 as TableTitleWrap, a7 as TableWrap, V as Text, W as TextArea, X as Toggle, T as ToggleCodeComponent, Y as Tooltip, Z as TraceLoader, a2 as VerticalScroll, _ as WarningModal } from './index-Be0m3TUg.js';
3
- export { C as CancelWarning, D as DeleteWarning } from './index-CNbTSsNJ.js';
1
+ import { B as Button } from './index-BsDmE-1M.js';
2
+ export { a as AutocompleteInput, b as Badge, a1 as CenterThis, C as Checkbox, c as Code, d as ConditionDetails, D as DataCard, f as DataCardFieldTypes, e as DataCardFields, g as DataTab, h as Divider, i as DocsButton, j as Drawer, l as DrawerFooter, k as DrawerHeader, m as Dropdown, E as ExtendArrow, F as FadeLoader, n as FieldError, o as FieldLabel, a0 as FlexColumn, $ as FlexRow, H as Header, I as IconButton, p as IconGroup, q as IconTitleBadge, r as IconWrapped, s as IconsNav, t as ImageControlled, u as Input, v as InputList, w as InputTable, x as InteractiveTable, K as KeyValueInputsList, M as Modal, a4 as ModalBody, y as MonitorsCheckboxes, z as MonitorsIcons, N as NavigationButtons, G as NoDataFound, J as NotificationNote, a3 as Overlay, S as ScrollX, L as SectionTitle, O as Segment, P as SelectionButton, Q as SkeletonLoader, R as Status, U as Stepper, a5 as TableContainer, a6 as TableTitleWrap, a7 as TableWrap, V as Text, W as TextArea, X as Toggle, T as ToggleCodeComponent, Y as Tooltip, Z as TraceLoader, a2 as VerticalScroll, _ as WarningModal } from './index-BsDmE-1M.js';
3
+ export { C as CancelWarning, D as DeleteWarning } from './index-CEBMbbOj.js';
4
4
  import React, { Component, createElement, createContext } from 'react';
5
- import { T as Theme } from './index-aRNtyuuU.js';
5
+ import { T as Theme } from './index-di3Hlzql.js';
6
6
  import './types.js';
7
- import './index-D8AnbGCE.js';
8
- import './index-BbEmZ4Wj.js';
7
+ import './index-jnB_opsW.js';
8
+ import './index-CMWGlHc6.js';
9
9
  import 'styled-components';
10
- import './index-7YZOplrB.js';
10
+ import './index-Dd01kW5v.js';
11
11
  import './index-BV85P9UP.js';
12
- import './useTransition-0Rz0QKmh.js';
12
+ import './useTransition-DE4VdDIO.js';
13
13
  import 'react-dom';
14
14
 
15
15
  const ErrorBoundaryContext = createContext(null);
package/lib/constants.js CHANGED
@@ -1,4 +1,4 @@
1
- export { A as ACTION_OPTIONS, B as BUTTON_TEXTS, D as DEFAULT_DATA_STREAM_NAME, k as DISPLAY_TITLES, F as FORM_ALERTS, I as INSTRUMENTATION_RULE_OPTIONS, M as MONITORS_OPTIONS, S as STORAGE_KEYS } from './index-aRNtyuuU.js';
1
+ export { A as ACTION_OPTIONS, B as BUTTON_TEXTS, D as DEFAULT_DATA_STREAM_NAME, k as DISPLAY_TITLES, F as FORM_ALERTS, I as INSTRUMENTATION_RULE_OPTIONS, M as MONITORS_OPTIONS, S as STORAGE_KEYS } from './index-di3Hlzql.js';
2
2
  export { D as DESTINATION_CATEGORIES } from './index-Dqief9td.js';
3
3
  import 'react';
4
4
  import './types.js';
@@ -2,7 +2,6 @@ import { type FC } from 'react';
2
2
  import { DestinationFormData, StatusType, TestConnectionFunc, TestConnectionResponse } from '@/types';
3
3
  interface TestConnectionProps {
4
4
  destination: DestinationFormData;
5
- disabled: boolean;
6
5
  validateForm: () => boolean;
7
6
  status?: StatusType;
8
7
  testConnection: TestConnectionFunc;
@@ -1,8 +1,10 @@
1
1
  import React from 'react';
2
+ import { WorkloadId } from '@/types';
2
3
  import { type SelectedState } from '@/store';
3
4
  interface MultiSourceControlProps {
4
5
  totalSourceCount: number;
5
6
  uninstrumentSources: (payload: SelectedState['selectedSources']) => void;
7
+ restartWorkloads: (sourceIds: WorkloadId[]) => Promise<void>;
6
8
  }
7
9
  declare const MultiSourceControl: React.FC<MultiSourceControlProps>;
8
10
  export { MultiSourceControl, type MultiSourceControlProps };
@@ -16,6 +16,7 @@ interface OverviewDrawerProps extends PropsWithChildren {
16
16
  onDelete?: () => void;
17
17
  onCancel?: () => void;
18
18
  tabs?: DrawerProps['header']['tabs'];
19
+ headerActionButtons?: DrawerProps['header']['actionButtons'];
19
20
  }
20
21
  interface OverviewDrawerRef {
21
22
  closeDrawer: () => void;
@@ -10,6 +10,7 @@ interface SourceDrawerProps {
10
10
  describeSource: DescribeSource;
11
11
  };
12
12
  }>;
13
+ restartWorkloads: (sourceIds: WorkloadId[]) => Promise<void>;
13
14
  }
14
15
  declare const SourceDrawer: FC<SourceDrawerProps>;
15
16
  export { SourceDrawer, type SourceDrawerProps };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { FetchSingleNamespace } from '@/types';
2
+ import { type FetchSingleNamespace } from '@/types';
3
3
  import { type AvailableSourcesByNamespace, type NamespaceSelectionFormData, type SourceSelectionFormData } from '@/store';
4
4
  interface SourceSelectionFormProps {
5
5
  isModal?: boolean;
package/lib/containers.js CHANGED
@@ -1,23 +1,23 @@
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 { k as DISPLAY_TITLES, T as Theme, h as usePendingStore, g as useNotificationStore, b as useDrawerStore, B as BUTTON_TEXTS, c as useEntityStore, A as ACTION_OPTIONS, l as getActionIcon, f as useModalStore, F as FORM_ALERTS, d as useFilterStore, M as MONITORS_OPTIONS, t as styleInject, i as useSelectedStore, e as useInstrumentStore, n as getInstrumentationRuleIcon, a as useDataStreamStore, m as getEntityId, S as STORAGE_KEYS, j as useSetupStore, I as INSTRUMENTATION_RULE_OPTIONS, u as useDarkMode } from './index-aRNtyuuU.js';
3
+ import { k as DISPLAY_TITLES, T as Theme, h as usePendingStore, g as useNotificationStore, b as useDrawerStore, B as BUTTON_TEXTS, c as useEntityStore, A as ACTION_OPTIONS, l as getActionIcon, f as useModalStore, F as FORM_ALERTS, d as useFilterStore, M as MONITORS_OPTIONS, t as styleInject, i as useSelectedStore, e as useInstrumentStore, n as getInstrumentationRuleIcon, a as useDataStreamStore, m as getEntityId, S as STORAGE_KEYS, j as useSetupStore, I as INSTRUMENTATION_RULE_OPTIONS, u as useDarkMode } from './index-di3Hlzql.js';
4
4
  import { ActionType, ActionKeyTypes, InputTypes, FieldTypes, EntityTypes, StatusType, Crud, OtherStatus, NodeTypes, AddNodeTypes, EdgeTypes, SignalType, HeadersCollectionKeyTypes, CodeAttributesKeyTypes, PayloadCollectionKeyTypes, InstrumentationRuleType } from './types.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, a0 as FlexColumn, M as Modal, N as NavigationButtons, a4 as ModalBody, J as NotificationNote, 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, 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, U as Stepper, I as IconButton, e as DataCardFields, s as IconsNav, p as IconGroup } from './index-Be0m3TUg.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, a0 as FlexColumn, M as Modal, N as NavigationButtons, a4 as ModalBody, J as NotificationNote, 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, 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, U as Stepper, I as IconButton, e as DataCardFields, s as IconsNav, p as IconGroup } from './index-BsDmE-1M.js';
6
6
  import { i as isEmpty, s as safeJsonParse } from './index-BV85P9UP.js';
7
- import { i as CheckCircledIcon, O as OdigosLogo } from './index-7YZOplrB.js';
8
- 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-DJpBLpwG.js';
9
- import { u as useActionFormData, a as useClickNode, e as useSessionStorage, c as useDataStreamFormData, d as useDestinationFormData, b as useClickNotification, f as useSourceFormData, g as useSourceSelectionFormData } from './useSourceSelectionFormData-CH2xUOpu.js';
10
- import { d as useKeyDown, e as useOnClickOutside, u as useContainerSize, c as useInstrumentationRuleFormData, g as useTransition, f as useTimeAgo, a as useCopy } from './useTransition-0Rz0QKmh.js';
11
- import { E as EditIcon } from './index-t3OxxFsp.js';
12
- 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-D8AnbGCE.js';
13
- import { D as DeleteWarning, C as CancelWarning } from './index-CNbTSsNJ.js';
14
- import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-BbEmZ4Wj.js';
15
- import { f as filterActions, i as getConditionsBooleans, n as getEntityLabel, m as getEntityIcon, w as sleep$1, p as getPlatformIcon, q as getPlatformLabel, h as formatBytes, k as getContainersIcons, r as getValueForRange, l as getDestinationIcon, g as filterSourcesByStream, e as filterSources, b as filterDestinationsByStream, a as filterDestinations, v as mapDestinationFieldsForDisplay, c as compareCondition, t as getYamlFieldsForDestination, d as deepClone, o as getMetricForEntity, s as getWorkloadId, j as getContainersInstrumentedCount, u as isOverTime } from './index-CrethNg6.js';
7
+ import { i as CheckCircledIcon, O as OdigosLogo } from './index-Dd01kW5v.js';
8
+ import { C as CrossCircledIcon, O as OdigosLogoText, a as OverviewIcon, F as FilterIcon, D as DataStreamsIcon, R as RetryIcon, N as NotificationIcon, S as SlackLogo, K as KeyIcon, T as TerminalIcon } from './index-Cn0s9o5b.js';
9
+ import { u as useActionFormData, a as useClickNode, e as useSessionStorage, c as useDataStreamFormData, d as useDestinationFormData, b as useClickNotification, f as useSourceFormData, g as useSourceSelectionFormData } from './useSourceSelectionFormData-KKJLbIoW.js';
10
+ import { d as useKeyDown, e as useOnClickOutside, u as useContainerSize, c as useInstrumentationRuleFormData, g as useTransition, f as useTimeAgo, a as useCopy } from './useTransition-DE4VdDIO.js';
11
+ import { E as EditIcon } from './index-E-5xGoYC.js';
12
+ 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-jnB_opsW.js';
13
+ import { D as DeleteWarning, C as CancelWarning } from './index-CEBMbbOj.js';
14
+ import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-CMWGlHc6.js';
15
+ import { f as filterActions, i as getConditionsBooleans, n as getEntityLabel, m as getEntityIcon, w as sleep$1, p as getPlatformIcon, q as getPlatformLabel, h as formatBytes, k as getContainersIcons, r as getValueForRange, l as getDestinationIcon, g as filterSourcesByStream, e as filterSources, b as filterDestinationsByStream, a as filterDestinations, v as mapDestinationFieldsForDisplay, c as compareCondition, t as getYamlFieldsForDestination, d as deepClone, o as getMetricForEntity, s as getWorkloadId, j as getContainersInstrumentedCount, u as isOverTime } from './index-DtCiWUAb.js';
16
16
  import { createPortal } from 'react-dom';
17
17
  import { m as mapExportedSignals } from './index-BlZKWuxe.js';
18
- import { N as NoteBackToSummary, E as EditButton } from './index-oEjS7cX3.js';
18
+ import { N as NoteBackToSummary, E as EditButton } from './index-McgJMLSC.js';
19
19
  import { D as DESTINATION_CATEGORIES } from './index-Dqief9td.js';
20
- import { a6 as RulesIcon, a7 as SourcesIcon, a3 as ActionsIcon, a4 as DestinationsIcon } from './index-BGzxan6E.js';
20
+ import { a6 as RulesIcon, a7 as SourcesIcon, a3 as ActionsIcon, a4 as DestinationsIcon } from './index-BcuXR1ve.js';
21
21
 
22
22
  const buildCard$3 = (action) => {
23
23
  const { type, spec: { actionName, notes, signals, disabled, collectContainerAttributes, collectReplicaSetAttributes, collectWorkloadId, collectClusterId, labelsAttributes, annotationsAttributes, clusterAttributes, attributeNamesToDelete, renames, piiCategories, fallbackSamplingRatio, samplingPercentage, endpointsFilters, servicesNameFilters, attributeFilters, }, } = action;
@@ -529,7 +529,7 @@ const ActionForm = ({ isUpdate, action, formData, formErrors, handleFormChange }
529
529
  React.createElement(TextArea, { title: 'Notes', value: formData['notes'], onChange: ({ target: { value } }) => handleFormChange('notes', value), errorMessage: formErrors['notes'] })));
530
530
  };
531
531
 
532
- const OverviewDrawer = forwardRef(({ children, width = 640, title, titleTooltip, hideEditTitleFromEdit, icons, iconSrcs, isEdit = false, isFormDirty = false, isLastItem = false, onEdit, onSave, onDelete, onCancel, tabs }, drawerRef) => {
532
+ const OverviewDrawer = forwardRef(({ children, width = 640, title, titleTooltip, hideEditTitleFromEdit, icons, iconSrcs, isEdit = false, isFormDirty = false, isLastItem = false, onEdit, onSave, onDelete, onCancel, tabs, headerActionButtons, }, drawerRef) => {
533
533
  const theme = Theme.useTheme();
534
534
  const { isThisPending } = usePendingStore();
535
535
  const { addNotification } = useNotificationStore();
@@ -596,7 +596,7 @@ const OverviewDrawer = forwardRef(({ children, width = 640, title, titleTooltip,
596
596
  hideFromHistory: true,
597
597
  });
598
598
  };
599
- const actionButtons = [];
599
+ const actionButtons = headerActionButtons || [];
600
600
  if (!!onEdit && !isEdit)
601
601
  actionButtons.push({
602
602
  'data-id': 'drawer-edit',
@@ -668,6 +668,8 @@ const EditTitle = forwardRef(({ title }, ref) => {
668
668
  }));
669
669
  return React.createElement(Input, { "data-id": 'title', value: inputValue, onChange: (e) => setInputValue(e.target.value) });
670
670
  });
671
+ EditTitle.displayName = EditTitle.name;
672
+ OverviewDrawer.displayName = OverviewDrawer.name;
671
673
 
672
674
  const FormContainer$4 = styled.div `
673
675
  width: 100%;
@@ -13406,7 +13408,7 @@ const createEdge = (edgeId, params) => {
13406
13408
  const buildEdges = ({ theme, nodes, metrics, containerHeight }) => {
13407
13409
  const edges = [];
13408
13410
  const actionNodeId = nodes.find(({ id: nodeId }) => [`${EntityTypes.Action}-${NodeTypes.Frame}`, `${EntityTypes.Action}-${NodeTypes.Add}`].includes(nodeId))?.id;
13409
- const scrollTopLimit = -80 / 2 + framePadding$4;
13411
+ const scrollTopLimit = -nodeHeight$5 / 2 + framePadding$4;
13410
13412
  const scrollBottomLimit = Math.floor(containerHeight / nodeHeight$5) * nodeHeight$5 - (nodeHeight$5 / 2 + framePadding$4);
13411
13413
  const isBaseNode = (nodeType) => nodeType === NodeTypes.Base || nodeType === NodeTypes.Edged;
13412
13414
  nodes.forEach(({ type: nodeType, id: nodeId, data: { type: entityType, id: entityId, status }, position }) => {
@@ -14475,13 +14477,17 @@ const ActionButton = styled(Button) `
14475
14477
  background-color: transparent;
14476
14478
  `}
14477
14479
  `;
14478
- const TestConnection = ({ destination, disabled, validateForm, status, testConnection, onSuccess, onError }) => {
14480
+ const TestConnection = ({ destination, validateForm, status, testConnection, onSuccess, onError }) => {
14479
14481
  const theme = Theme.useTheme();
14482
+ const { selectedStreamName } = useDataStreamStore();
14480
14483
  const [loading, setLoading] = useState(false);
14481
14484
  const onClick = async () => {
14482
14485
  if (validateForm()) {
14483
14486
  setLoading(true);
14484
- const testResult = await testConnection(destination);
14487
+ const testResult = await testConnection({
14488
+ ...destination,
14489
+ currentStreamName: selectedStreamName,
14490
+ });
14485
14491
  // 1st if - check if we got a response (if undefined, then Apollo Client caught an error)
14486
14492
  if (testResult) {
14487
14493
  // 2nd if - check if the test was successful or not
@@ -14496,7 +14502,7 @@ const TestConnection = ({ destination, disabled, validateForm, status, testConne
14496
14502
  }
14497
14503
  };
14498
14504
  const Icon = !!status ? getStatusIcon(status, theme) : undefined;
14499
- return (React.createElement(ActionButton, { "$status": status, variant: 'secondary', disabled: disabled, onClick: onClick },
14505
+ return (React.createElement(ActionButton, { "$status": status, variant: 'secondary', onClick: onClick },
14500
14506
  loading ? React.createElement(FadeLoader, null) : Icon ? React.createElement(Icon, null) : null,
14501
14507
  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')));
14502
14508
  };
@@ -14591,7 +14597,7 @@ const DestinationForm = ({ isUpdate, categoryItem, formData, formErrors, validat
14591
14597
  };
14592
14598
  return (React.createElement(Container$a, { "$gap": 24 },
14593
14599
  React.createElement(Container$a, { "$gap": 12 },
14594
- React.createElement(SectionTitle, { title: isUpdate ? 'Update destination' : 'Create destination', description: `Connect ${displayName} with Odigos.`, actionButton: testConnectionSupported && (React.createElement(TestConnection, { destination: formData, disabled: !isFormDirty && !autoFilled, validateForm: validateForm, status: connection?.type, testConnection: testConnection, onError: onTestConnectionError, onSuccess: onTestConnectionSuccess })) }),
14600
+ React.createElement(SectionTitle, { title: isUpdate ? 'Update destination' : 'Create destination', description: `Connect ${displayName} with Odigos.`, actionButton: testConnectionSupported && (React.createElement(TestConnection, { destination: formData, validateForm: validateForm, status: connection?.type, testConnection: testConnection, onError: onTestConnectionError, onSuccess: onTestConnectionSuccess })) }),
14595
14601
  React.createElement(NotesWrapper, null,
14596
14602
  testConnectionSupported && connection && React.createElement(NotificationNote, { type: connection.type, title: connection.title, message: connection.message }),
14597
14603
  autoFilled && !connection && !isUpdate && React.createElement(NotificationNote, { type: StatusType.Default, message: `Odigos autocompleted ${displayName} destination details.` })),
@@ -15600,7 +15606,7 @@ const Container$5 = styled.div `
15600
15606
  border: 1px solid ${({ theme }) => theme.colors.border};
15601
15607
  background-color: ${({ theme }) => theme.colors.dropdown_bg};
15602
15608
  `;
15603
- const MultiSourceControl = ({ totalSourceCount, uninstrumentSources }) => {
15609
+ const MultiSourceControl = ({ totalSourceCount, uninstrumentSources, restartWorkloads }) => {
15604
15610
  const theme = Theme.useTheme();
15605
15611
  const Transition = useTransition({
15606
15612
  container: Container$5,
@@ -15619,6 +15625,14 @@ const MultiSourceControl = ({ totalSourceCount, uninstrumentSources }) => {
15619
15625
  const onDeselect = () => {
15620
15626
  setSelectedSources({});
15621
15627
  };
15628
+ const onRestart = () => {
15629
+ const payload = [];
15630
+ Object.values(selectedSources).forEach((sources) => {
15631
+ payload.push(...sources.map((source) => getWorkloadId(source)));
15632
+ });
15633
+ restartWorkloads(payload);
15634
+ onDeselect();
15635
+ };
15622
15636
  const onDelete = () => {
15623
15637
  const payload = {};
15624
15638
  Object.entries(selectedSources).forEach(([ns, sources]) => {
@@ -15638,6 +15652,9 @@ const MultiSourceControl = ({ totalSourceCount, uninstrumentSources }) => {
15638
15652
  React.createElement(Divider, { orientation: 'vertical', length: '16px' }),
15639
15653
  React.createElement(Button, { variant: 'tertiary', onClick: onDeselect },
15640
15654
  React.createElement(Text, { family: 'secondary', decoration: 'underline' }, "Deselect")),
15655
+ React.createElement(Button, { variant: 'tertiary', onClick: onRestart },
15656
+ React.createElement(RetryIcon, null),
15657
+ React.createElement(Text, { family: 'secondary', decoration: 'underline' }, "Restart")),
15641
15658
  React.createElement(Button, { variant: 'tertiary', onClick: () => setIsWarnModalOpen(true) },
15642
15659
  React.createElement(TrashIcon, null),
15643
15660
  React.createElement(Text, { family: 'secondary', decoration: 'underline', color: theme.text.error }, "Uninstrument"))),
@@ -16117,7 +16134,7 @@ const DataContainer$1 = styled.div `
16117
16134
  flex-direction: column;
16118
16135
  gap: 12px;
16119
16136
  `;
16120
- const SourceDrawer = ({ persistSources, updateSource, fetchDescribeSource }) => {
16137
+ const SourceDrawer = ({ persistSources, updateSource, fetchDescribeSource, restartWorkloads }) => {
16121
16138
  const { sources } = useEntityStore();
16122
16139
  const { selectedStreamName } = useDataStreamStore();
16123
16140
  const { drawerType, drawerEntityId } = useDrawerStore();
@@ -16192,6 +16209,15 @@ const SourceDrawer = ({ persistSources, updateSource, fetchDescribeSource }) =>
16192
16209
  onClick: () => setSelectedTab(Tabs.Pods),
16193
16210
  selected: selectedTab === Tabs.Pods,
16194
16211
  },
16212
+ ], headerActionButtons: [
16213
+ {
16214
+ 'data-id': 'rollout-restart',
16215
+ variant: 'tertiary',
16216
+ onClick: () => restartWorkloads([drawerEntityId]),
16217
+ children: (React.createElement(React.Fragment, null,
16218
+ React.createElement(RetryIcon, null),
16219
+ React.createElement(Text, { size: 14, family: 'secondary', decoration: 'underline' }, "Restart"))),
16220
+ },
16195
16221
  ] }, selectedTab === Tabs.Overview ? (isEditing ? (React.createElement(FormContainer, null,
16196
16222
  React.createElement(SourceForm, { formData: formData, handleFormChange: (...params) => {
16197
16223
  setIsFormDirty(true);
@@ -16207,11 +16233,12 @@ const ActionsRow = styled(FlexRow) `
16207
16233
  justify-content: space-between;
16208
16234
  `;
16209
16235
  const SearchWrapper = styled.div `
16210
- width: 420px;
16236
+ max-width: 350px;
16211
16237
  `;
16212
16238
  const SourceSelectionForm = forwardRef(({ isModal, fetchSingleNamespace, onClickSummary }, ref) => {
16239
+ const theme = Theme.useTheme();
16213
16240
  const formState = useSourceSelectionFormData({ fetchSingleNamespace });
16214
- const { availableSources, selectedSources, getApiSourcesPayload, getApiFutureAppsPayload, searchText, setSearchText, showSelectedOnly, setShowSelectedOnly } = formState;
16241
+ const { availableSources, selectedSources, getApiSourcesPayload, getApiFutureAppsPayload, searchText, setSearchText, searchBy, setSearchBy, showSelectedOnly, setShowSelectedOnly } = formState;
16215
16242
  useImperativeHandle(ref, () => ({
16216
16243
  getFormValues: () => ({
16217
16244
  initial: availableSources,
@@ -16228,10 +16255,15 @@ const SourceSelectionForm = forwardRef(({ isModal, fetchSingleNamespace, onClick
16228
16255
  React.createElement(ActionsRow, null,
16229
16256
  React.createElement(SearchWrapper, null,
16230
16257
  React.createElement(Input, { placeholder: DISPLAY_TITLES.SEARCH_NAMESPACES, icon: SearchIcon, value: searchText, onChange: (e) => setSearchText(e.target.value.toLowerCase()) })),
16258
+ React.createElement(Segment, { options: [
16259
+ { label: DISPLAY_TITLES.SOURCE, value: EntityTypes.Source, selectedBgColor: theme.text.secondary, selectedTextColor: theme.text.primary },
16260
+ { label: DISPLAY_TITLES.NAMESPACE, value: EntityTypes.Namespace, selectedBgColor: theme.text.secondary, selectedTextColor: theme.text.primary },
16261
+ ], selected: searchBy, setSelected: setSearchBy }),
16231
16262
  React.createElement(Toggle, { title: DISPLAY_TITLES.SHOW_SELECTED_ONLY, initialValue: showSelectedOnly, onChange: setShowSelectedOnly }))),
16232
16263
  React.createElement(Divider, null),
16233
16264
  React.createElement(SourceList, { isModal: isModal, ...formState }))));
16234
16265
  });
16266
+ SourceSelectionForm.displayName = SourceSelectionForm.name;
16235
16267
 
16236
16268
  const SourceModal = ({ fetchSingleNamespace, persistSources }) => {
16237
16269
  const { currentModal, setCurrentModal } = useModalStore();
package/lib/functions.js CHANGED
@@ -1,13 +1,13 @@
1
- export { c as capitalizeFirstLetter, f as flattenObjectKeys, g as getMonitorIcon, a as getProgrammingLanguageIcon, b as getStatusIcon, m as mapConditions, n as numbersOnly, p as parseJsonStringToPrettyString, r as removeEmptyValuesFromObject, s as safeJsonStringify, d as splitCamelString } from './index-BbEmZ4Wj.js';
2
- export { c as compareCondition, d as deepClone, f as filterActions, a as filterDestinations, b as filterDestinationsByStream, e as filterSources, g as filterSourcesByStream, h as formatBytes, i as getConditionsBooleans, k as getContainersIcons, j as getContainersInstrumentedCount, l as getDestinationIcon, m as getEntityIcon, n as getEntityLabel, o as getMetricForEntity, p as getPlatformIcon, q as getPlatformLabel, r as getValueForRange, s as getWorkloadId, t as getYamlFieldsForDestination, u as isOverTime, v as mapDestinationFieldsForDisplay, w as sleep } from './index-CrethNg6.js';
3
- export { l as getActionIcon, m as getEntityId, n as getInstrumentationRuleIcon } from './index-aRNtyuuU.js';
1
+ export { c as capitalizeFirstLetter, f as flattenObjectKeys, g as getMonitorIcon, a as getProgrammingLanguageIcon, b as getStatusIcon, m as mapConditions, n as numbersOnly, p as parseJsonStringToPrettyString, r as removeEmptyValuesFromObject, s as safeJsonStringify, d as splitCamelString } from './index-CMWGlHc6.js';
2
+ export { c as compareCondition, d as deepClone, f as filterActions, a as filterDestinations, b as filterDestinationsByStream, e as filterSources, g as filterSourcesByStream, h as formatBytes, i as getConditionsBooleans, k as getContainersIcons, j as getContainersInstrumentedCount, l as getDestinationIcon, m as getEntityIcon, n as getEntityLabel, o as getMetricForEntity, p as getPlatformIcon, q as getPlatformLabel, r as getValueForRange, s as getWorkloadId, t as getYamlFieldsForDestination, u as isOverTime, v as mapDestinationFieldsForDisplay, w as sleep } from './index-DtCiWUAb.js';
3
+ export { l as getActionIcon, m as getEntityId, n as getInstrumentationRuleIcon } from './index-di3Hlzql.js';
4
4
  export { g as getIdFromSseTarget, i as isLegalK8sLabel, m as mapExportedSignals } from './index-BlZKWuxe.js';
5
5
  import { EntityTypes } from './types.js';
6
6
  export { i as isEmpty, s as safeJsonParse } from './index-BV85P9UP.js';
7
7
  import 'react';
8
8
  import 'styled-components';
9
- import './index-7YZOplrB.js';
10
- import './index-BGzxan6E.js';
9
+ import './index-Dd01kW5v.js';
10
+ import './index-BcuXR1ve.js';
11
11
 
12
12
  const cleanObjectEmptyStringsValues = (obj) => {
13
13
  const cleanArray = (arr) => arr.filter((item) => {
@@ -1,5 +1,5 @@
1
1
  import { type Dispatch, type SetStateAction } from 'react';
2
- import type { FetchSingleNamespace } from '@/types';
2
+ import { EntityTypes, type FetchSingleNamespace } from '@/types';
3
3
  import { type AvailableSource, type AvailableSourcesByNamespace, type NamespaceSelectionFormData, type SourceSelectionFormData } from '@/store';
4
4
  export type SelectedNamespace = string;
5
5
  interface UseSourceFormDataParams {
@@ -18,6 +18,8 @@ export interface UseSourceSelectionFormData {
18
18
  onSelectFutureApps: (bool: boolean, namespace?: SelectedNamespace) => void;
19
19
  searchText: string;
20
20
  setSearchText: Dispatch<SetStateAction<string>>;
21
+ searchBy: EntityTypes;
22
+ setSearchBy: Dispatch<SetStateAction<EntityTypes>>;
21
23
  showSelectedOnly: boolean;
22
24
  setShowSelectedOnly: Dispatch<SetStateAction<boolean>>;
23
25
  }
package/lib/hooks.js CHANGED
@@ -1,7 +1,7 @@
1
- export { u as useActionFormData, a as useClickNode, b as useClickNotification, c as useDataStreamFormData, d as useDestinationFormData, e as useSessionStorage, f as useSourceFormData, g as useSourceSelectionFormData } from './useSourceSelectionFormData-CH2xUOpu.js';
2
- export { u as useContainerSize, a as useCopy, b as useGenericForm, c as useInstrumentationRuleFormData, d as useKeyDown, e as useOnClickOutside, f as useTimeAgo, g as useTransition } from './useTransition-0Rz0QKmh.js';
1
+ export { u as useActionFormData, a as useClickNode, b as useClickNotification, c as useDataStreamFormData, d as useDestinationFormData, e as useSessionStorage, f as useSourceFormData, g as useSourceSelectionFormData } from './useSourceSelectionFormData-KKJLbIoW.js';
2
+ export { u as useContainerSize, a as useCopy, b as useGenericForm, c as useInstrumentationRuleFormData, d as useKeyDown, e as useOnClickOutside, f as useTimeAgo, g as useTransition } from './useTransition-DE4VdDIO.js';
3
3
  import './types.js';
4
- import './index-aRNtyuuU.js';
4
+ import './index-di3Hlzql.js';
5
5
  import 'react';
6
6
  import 'styled-components';
7
7
  import './index-BV85P9UP.js';
@@ -13,6 +13,7 @@ export * from './list-icon/index';
13
13
  export * from './no-data-icon/index';
14
14
  export * from './notebook-icon/index';
15
15
  export * from './notification-icon/index';
16
+ export * from './retry-icon/index';
16
17
  export * from './search-icon/index';
17
18
  export * from './sort-arrows-icon/index';
18
19
  export * from './terminal-icon/index';
@@ -0,0 +1,2 @@
1
+ import type { SVG } from '@/types';
2
+ export declare const RetryIcon: SVG;
@@ -0,0 +1,8 @@
1
+ import type { SVG } from '@/types';
2
+ import type { StoryFn } from '@storybook/react';
3
+ declare const _default: {
4
+ title: string;
5
+ component: SVG;
6
+ };
7
+ export default _default;
8
+ export declare const Default: StoryFn<SVG>;
package/lib/icons.js CHANGED
@@ -1,11 +1,11 @@
1
- import { T as Theme } from './index-aRNtyuuU.js';
2
- export { p as AddClusterInfoIcon, C as CodeAttributesIcon, q as DeleteAttributeIcon, H as HeadersCollectionIcon, o as ImageErrorIcon, K as K8sLogo, s as PayloadCollectionIcon, P as PiiMaskingIcon, R as RenameAttributeIcon, r as SamplerIcon } from './index-aRNtyuuU.js';
3
- export { C as CPlusPlusLogo, d as CSharpLogo, i as CheckCircledIcon, D as DotnetLogo, E as ElixirLogo, h as ErrorTriangleIcon, G as GoLogo, I as InfoIcon, J as JavaLogo, K as KafkaLogo, L as LogsIcon, g as MetricsIcon, M as MysqlLogo, N as NginxLogo, f as NodejsLogo, O as OdigosLogo, c as PhpLogo, P as PostgresLogo, e as PythonLogo, R as RedisLogo, b as RubyLogo, a as RustLogo, S as SwiftLogo, T as TracesIcon, W as WarningTriangleIcon } from './index-7YZOplrB.js';
4
- export { C as CrossCircledIcon, D as DataStreamsIcon, F as FilterIcon, K as KeyIcon, N as NotificationIcon, O as OdigosLogoText, a as OverviewIcon, S as SlackLogo, T as TerminalIcon } from './index-DJpBLpwG.js';
5
- export { A as ArrowIcon, f as CheckIcon, C as CodeIcon, a as CopyIcon, g as CrossIcon, E as ExtendArrowIcon, d as EyeClosedIcon, e as EyeOpenIcon, L as ListIcon, M as MinusIcon, N as NoDataIcon, b as NotebookIcon, P as PlusIcon, S as SearchIcon, c as SortArrowsIcon, T as TrashIcon, X as XIcon } from './index-D8AnbGCE.js';
1
+ import { T as Theme } from './index-di3Hlzql.js';
2
+ export { p as AddClusterInfoIcon, C as CodeAttributesIcon, q as DeleteAttributeIcon, H as HeadersCollectionIcon, o as ImageErrorIcon, K as K8sLogo, s as PayloadCollectionIcon, P as PiiMaskingIcon, R as RenameAttributeIcon, r as SamplerIcon } from './index-di3Hlzql.js';
3
+ export { C as CPlusPlusLogo, d as CSharpLogo, i as CheckCircledIcon, D as DotnetLogo, E as ElixirLogo, h as ErrorTriangleIcon, G as GoLogo, I as InfoIcon, J as JavaLogo, K as KafkaLogo, L as LogsIcon, g as MetricsIcon, M as MysqlLogo, N as NginxLogo, f as NodejsLogo, O as OdigosLogo, c as PhpLogo, P as PostgresLogo, e as PythonLogo, R as RedisLogo, b as RubyLogo, a as RustLogo, S as SwiftLogo, T as TracesIcon, W as WarningTriangleIcon } from './index-Dd01kW5v.js';
4
+ export { C as CrossCircledIcon, D as DataStreamsIcon, F as FilterIcon, K as KeyIcon, N as NotificationIcon, O as OdigosLogoText, a as OverviewIcon, R as RetryIcon, S as SlackLogo, T as TerminalIcon } from './index-Cn0s9o5b.js';
5
+ export { A as ArrowIcon, f as CheckIcon, C as CodeIcon, a as CopyIcon, g as CrossIcon, E as ExtendArrowIcon, d as EyeClosedIcon, e as EyeOpenIcon, L as ListIcon, M as MinusIcon, N as NoDataIcon, b as NotebookIcon, P as PlusIcon, S as SearchIcon, c as SortArrowsIcon, T as TrashIcon, X as XIcon } from './index-jnB_opsW.js';
6
6
  import React from 'react';
7
- export { E as EditIcon } from './index-t3OxxFsp.js';
8
- export { a3 as ActionsIcon, A as AlaudaLogo, a as AlibabaCloudLogo, b as AppDynamicsLogo, c as AwsCloudwatchLogo, d as AwsS3Logo, e as AwsXrayLogo, f as AxiomLogo, B as BetterStackLogo, g as BlobStorageLogo, h as BonreeLogo, C as CauselyLogo, i as ChecklyLogo, j as ChronosphereLogo, k as ClickhouseLogo, l as CoralogixLogo, D as Dash0Logo, m as DatadogLogo, a4 as DestinationsIcon, n as DynatraceLogo, E as ElasticApmLogo, o as ElasticSearchLogo, G as GigapipeLogo, p as GoogleCloudPlatformLogo, q as GrafanaLogo, r as GreptimeLogo, s as GroundcoverLogo, H as HoneycombLogo, t as HyperDxLogo, I as InstanaLogo, J as JaegerLogo, K as KloudmateLogo, L as Last9Logo, u as LightstepLogo, v as LogzioLogo, w as LokiLogo, x as LumigoLogo, M as MiddlewareLogo, a5 as NamespacesIcon, N as NewRelicLogo, O as ObserveLogo, y as OneUptimeLogo, z as OpenObserveLogo, F as OpenTelemetryLogo, P as OpsVerseLogo, Q as OracleLogo, R as PrometheusLogo, S as QrynLogo, T as QuickwitLogo, a6 as RulesIcon, U as SeqLogo, W as SignozLogo, a7 as SourcesIcon, X as SplunkLogo, Y as SumoLogicLogo, Z as TelemetryHubLogo, _ as TempoLogo, $ as TingyunLogo, a0 as TraceloopLogo, a1 as UptraceLogo, a2 as VictoriaMetricsLogo, V as VmLogo } from './index-BGzxan6E.js';
7
+ export { E as EditIcon } from './index-E-5xGoYC.js';
8
+ export { a3 as ActionsIcon, A as AlaudaLogo, a as AlibabaCloudLogo, b as AppDynamicsLogo, c as AwsCloudwatchLogo, d as AwsS3Logo, e as AwsXrayLogo, f as AxiomLogo, B as BetterStackLogo, g as BlobStorageLogo, h as BonreeLogo, C as CauselyLogo, i as ChecklyLogo, j as ChronosphereLogo, k as ClickhouseLogo, l as CoralogixLogo, D as Dash0Logo, m as DatadogLogo, a4 as DestinationsIcon, n as DynatraceLogo, E as ElasticApmLogo, o as ElasticSearchLogo, G as GigapipeLogo, p as GoogleCloudPlatformLogo, q as GrafanaLogo, r as GreptimeLogo, s as GroundcoverLogo, H as HoneycombLogo, t as HyperDxLogo, I as InstanaLogo, J as JaegerLogo, K as KloudmateLogo, L as Last9Logo, u as LightstepLogo, v as LogzioLogo, w as LokiLogo, x as LumigoLogo, M as MiddlewareLogo, a5 as NamespacesIcon, N as NewRelicLogo, O as ObserveLogo, y as OneUptimeLogo, z as OpenObserveLogo, F as OpenTelemetryLogo, P as OpsVerseLogo, Q as OracleLogo, R as PrometheusLogo, S as QrynLogo, T as QuickwitLogo, a6 as RulesIcon, U as SeqLogo, W as SignozLogo, a7 as SourcesIcon, X as SplunkLogo, Y as SumoLogicLogo, Z as TelemetryHubLogo, _ as TempoLogo, $ as TingyunLogo, a0 as TraceloopLogo, a1 as UptraceLogo, a2 as VictoriaMetricsLogo, V as VmLogo } from './index-BcuXR1ve.js';
9
9
  import './types.js';
10
10
  import 'styled-components';
11
11
 
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { T as Theme } from './index-aRNtyuuU.js';
2
+ import { T as Theme } from './index-di3Hlzql.js';
3
3
 
4
4
  const VmLogo = ({ size = 16, fill: f, rotate = 0, onClick }) => {
5
5
  const theme = Theme.useTheme();