@odigos/ui-kit 0.0.9 → 0.0.10

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 (34) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/lib/components/badge/index.d.ts +2 -2
  3. package/lib/components/data-tab/index.d.ts +2 -2
  4. package/lib/components/describe-row/index.d.ts +2 -2
  5. package/lib/components/divider/index.d.ts +2 -2
  6. package/lib/components/drawer/drawer-header/index.d.ts +1 -1
  7. package/lib/components/icon-group/index.d.ts +2 -2
  8. package/lib/components/icon-wrapped/index.d.ts +2 -2
  9. package/lib/components/interactive-table/index.d.ts +2 -2
  10. package/lib/components/interactive-table/row.d.ts +2 -2
  11. package/lib/components/notification-note/index.d.ts +2 -2
  12. package/lib/components/status/index.d.ts +2 -2
  13. package/lib/components/styled.d.ts +12 -0
  14. package/lib/components/warning-modal/index.d.ts +2 -2
  15. package/lib/components.js +3 -3
  16. package/lib/constants/strings/index.d.ts +1 -0
  17. package/lib/constants.js +1 -1
  18. package/lib/containers/data-flow/nodes/base-node.d.ts +2 -2
  19. package/lib/containers/data-flow/nodes/scroll-node.d.ts +2 -2
  20. package/lib/containers/destination-form/test-connection/index.d.ts +2 -2
  21. package/lib/containers.js +87 -93
  22. package/lib/functions/get-conditions-booleans/index.d.ts +2 -2
  23. package/lib/functions/get-status-icon/index.d.ts +2 -2
  24. package/lib/functions.js +2 -2
  25. package/lib/hooks.js +2 -2
  26. package/lib/{index-Bc8gi9FH.js → index-DB1gmCsH.js} +6 -6
  27. package/lib/{index-Cu2uHOuh.js → index-DnmWFsTQ.js} +1 -0
  28. package/lib/{index-m62aT4IR.js → index-Do8ODRlA.js} +50 -27
  29. package/lib/{index-g6Twdelv.js → index-eF2JXMVR.js} +6 -6
  30. package/lib/types/common/index.d.ts +3 -3
  31. package/lib/types/connection/index.d.ts +2 -2
  32. package/lib/types.js +9 -9
  33. package/lib/{useSourceSelectionFormData-BY6B70Kf.js → useSourceSelectionFormData-CxdOP9FT.js} +4 -4
  34. package/package.json +10 -10
package/lib/containers.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import React, { useState, useEffect, forwardRef, useImperativeHandle, useRef, useMemo, useId, memo, useContext, createContext, useCallback, useLayoutEffect, Fragment } from 'react';
2
2
  import styled, { css } from 'styled-components';
3
3
  import { A as ACTION_OPTIONS, M as MONITORS_OPTIONS, I as INSTRUMENTATION_RULE_OPTIONS } from './index-CZe2VX28.js';
4
- import { D as DISPLAY_TITLES, F as FORM_ALERTS } from './index-Cu2uHOuh.js';
5
- import { ACTION_TYPE, ENTITY_TYPES, NOTIFICATION_TYPE, CRUD, OTHER_STATUS, NODE_TYPES, ADD_NODE_TYPES, EDGE_TYPES, FIELD_TYPES, SIGNAL_TYPE, CODE_ATTRIBUTES_KEY_TYPES, PAYLOAD_COLLECTION_KEY_TYPES, INSTRUMENTATION_RULE_TYPE } from './types.js';
6
- import { f as DATA_CARD_FIELD_TYPES, p as FieldLabel, b as Checkbox, o as FieldError, v as Input, x as InputTable, K as KeyValueInputsList, w as InputList, U as Text, O as Segment, S as SectionTitle, j as DocsButton, z 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, a2 as ModalBody, A as AutocompleteInput, i as Divider, Q as Status, _ as FlexRow, X as Tooltip, s as IconWrapped, G as MonitorsIcons, $ as FlexColumn, r as IconTitleBadge, y as InteractiveTable, a0 as CenterThis, J as NoDataFound, Y as TraceLoader, a as Badge, B as Button, E as ExtendArrow, n as Dropdown, a3 as getDefaultExportFromCjs, F as FadeLoader, g as DataTab, P as SkeletonLoader, W as Toggle, L as NotificationNote, R as Stepper, I as IconButton, e as DataCardFields, t as IconsNav, q as IconGroup } from './index-m62aT4IR.js';
4
+ import { D as DISPLAY_TITLES, F as FORM_ALERTS } from './index-DnmWFsTQ.js';
5
+ import { ACTION_TYPE, ENTITY_TYPES, STATUS_TYPE, CRUD, OTHER_STATUS, NODE_TYPES, ADD_NODE_TYPES, EDGE_TYPES, FIELD_TYPES, SIGNAL_TYPE, CODE_ATTRIBUTES_KEY_TYPES, PAYLOAD_COLLECTION_KEY_TYPES, INSTRUMENTATION_RULE_TYPE } from './types.js';
6
+ import { f as DATA_CARD_FIELD_TYPES, p as FieldLabel, b as Checkbox, o as FieldError, v as Input, x as InputTable, K as KeyValueInputsList, w as InputList, U as Text, O as Segment, S as SectionTitle, j as DocsButton, z 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, a2 as ModalBody, A as AutocompleteInput, i as Divider, Q as Status, _ as FlexRow, X as Tooltip, s as IconWrapped, G as MonitorsIcons, a3 as TableContainer, a4 as TableTitleWrap, r as IconTitleBadge, a5 as TableWrap, y as InteractiveTable, a0 as CenterThis, J as NoDataFound, $ as FlexColumn, Y as TraceLoader, a as Badge, B as Button, E as ExtendArrow, n as Dropdown, a6 as getDefaultExportFromCjs, F as FadeLoader, g as DataTab, P as SkeletonLoader, W as Toggle, L as NotificationNote, R as Stepper, I as IconButton, e as DataCardFields, t as IconsNav, q as IconGroup } from './index-Do8ODRlA.js';
7
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-DIcomki-.js';
8
8
  import Theme from './theme.js';
9
9
  import { i as isEmpty, s as safeJsonParse } from './index-BZS1ijMm.js';
10
10
  import { i as CheckCircledIcon, h as ErrorTriangleIcon, W as WarningTriangleIcon } from './index-ixs381n-.js';
11
11
  import { C as CrossCircledIcon, E as EditIcon, O as OdigosLogoText, b as OverviewIcon, F as FilterIcon, N as NotificationIcon, S as SlackLogo, a as FolderIcon, K as KeyIcon, T as TerminalIcon } from './index-3KUV6Vlt.js';
12
12
  import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-BumPE6cF.js';
13
- import { u as useActionFormData, a as useClickNode, c as useDestinationFormData, b as useClickNotification, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-BY6B70Kf.js';
13
+ import { u as useActionFormData, a as useClickNode, c as useDestinationFormData, b as useClickNotification, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-CxdOP9FT.js';
14
14
  import { d as useKeyDown, e as useOnClickOutside, u as useContainerSize, c as useInstrumentationRuleFormData, g as useTransition, f as useTimeAgo, a as useCopy } from './useTransition-Dfxjcy-C.js';
15
15
  import { T as TrashIcon, S as SearchIcon, P as PlusIcon$1, A as ArrowIcon, a as CopyIcon, f as CheckIcon, g as CrossIcon } from './index-D_Qn2U89.js';
16
- import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-Bc8gi9FH.js';
17
- import { f as filterActions, g as getConditionsBooleans, j as getEntityLabel, i as getEntityIcon, s as sleep$1, l as getPlatformIcon, m as getPlatformLabel, d as formatBytes, h as getContainersIcons, n as getValueForRange, b as filterSources, a as filterDestinations, c as compareCondition, k as getMetricForEntity, e as getContainersInstrumentedCount, o as isOverTime } from './index-g6Twdelv.js';
16
+ import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-DB1gmCsH.js';
17
+ import { f as filterActions, g as getConditionsBooleans, j as getEntityLabel, i as getEntityIcon, s as sleep$1, l as getPlatformIcon, m as getPlatformLabel, d as formatBytes, h as getContainersIcons, n as getValueForRange, b as filterSources, a as filterDestinations, c as compareCondition, k as getMetricForEntity, e as getContainersInstrumentedCount, o as isOverTime } from './index-eF2JXMVR.js';
18
18
  import require$$1 from 'use-sync-external-store/shim';
19
19
  import { createPortal } from 'react-dom';
20
20
  import { O as OdigosLogo } from './index-BGlk5VhF.js';
@@ -361,7 +361,7 @@ const OverviewDrawer = ({ children, width = 640, title, titleTooltip, icon, icon
361
361
  closeWarningModals();
362
362
  };
363
363
  const clickCancel = () => {
364
- const isTitleDirty = titleRef.current?.getTitle() !== title;
364
+ const isTitleDirty = titleRef.current?.isTitleDirty();
365
365
  if (isFormDirty || isTitleDirty) {
366
366
  setIsCancelModalOpen(true);
367
367
  }
@@ -391,7 +391,7 @@ const OverviewDrawer = ({ children, width = 640, title, titleTooltip, icon, icon
391
391
  }, [drawerType, drawerEntityId]);
392
392
  const handlePending = (action) => {
393
393
  addNotification({
394
- type: NOTIFICATION_TYPE.WARNING,
394
+ type: STATUS_TYPE.WARNING,
395
395
  title: 'Pending',
396
396
  message: `Cannot click ${action}, ${drawerType} is pending`,
397
397
  hideFromHistory: true,
@@ -422,7 +422,7 @@ const OverviewDrawer = ({ children, width = 640, title, titleTooltip, icon, icon
422
422
  iconSrc,
423
423
  title,
424
424
  titleTooltip,
425
- replaceTitleWith: !isSource && isEdit ? () => React.createElement(EditTitle, { ref: titleRef, title: title }) : undefined,
425
+ replaceTitleWith: !isSource && isEdit ? React.createElement(EditTitle, { ref: titleRef, title: title }) : undefined,
426
426
  actionButtons,
427
427
  tabs,
428
428
  }, footer: {
@@ -461,7 +461,8 @@ const EditTitle = forwardRef(({ title }, ref) => {
461
461
  setInputValue(title);
462
462
  }, [title]);
463
463
  useImperativeHandle(ref, () => ({
464
- getTitle: () => inputValue,
464
+ getTitle: () => inputValue || title,
465
+ isTitleDirty: () => inputValue !== title,
465
466
  clearTitle: () => setInputValue(title),
466
467
  }));
467
468
  return React.createElement(Input, { "data-id": 'title', value: inputValue, onChange: (e) => setInputValue(e.target.value) });
@@ -644,28 +645,23 @@ const buildSpecCell$1 = (action) => {
644
645
  };
645
646
 
646
647
  const TableCellConditions = ({ conditions }) => {
647
- const errors = useMemo(() => conditions?.filter(({ status }) => status === NOTIFICATION_TYPE.ERROR) || [], [conditions]);
648
- const warnings = useMemo(() => conditions?.filter(({ status }) => status === NOTIFICATION_TYPE.WARNING) || [], [conditions]);
648
+ const errors = useMemo(() => conditions?.filter(({ status }) => status === STATUS_TYPE.ERROR) || [], [conditions]);
649
+ const warnings = useMemo(() => conditions?.filter(({ status }) => status === STATUS_TYPE.WARNING) || [], [conditions]);
649
650
  const disableds = useMemo(() => conditions?.filter(({ status }) => status === OTHER_STATUS.DISABLED) || [], [conditions]);
650
651
  const isLoading = useMemo(() => !conditions?.length || !!conditions?.find(({ status }) => status === OTHER_STATUS.LOADING), [conditions]);
651
- return (React.createElement("div", { style: { lineHeight: 1 } }, errors.length > 0 ? (React.createElement(ConditionsStatuses, { conditions: errors })) : warnings.length > 0 ? (React.createElement(ConditionsStatuses, { conditions: warnings })) : disableds.length > 0 ? (React.createElement(ConditionsStatuses, { conditions: disableds })) : isLoading ? (React.createElement(Status, { status: OTHER_STATUS.LOADING, title: OTHER_STATUS.LOADING, withBorder: true, withIcon: true })) : (React.createElement(Status, { status: NOTIFICATION_TYPE.SUCCESS, title: NOTIFICATION_TYPE.SUCCESS, withBorder: true, withIcon: true }))));
652
+ return (React.createElement("div", { style: { lineHeight: 1 } }, errors.length > 0 ? (React.createElement(ConditionsStatuses, { conditions: errors })) : warnings.length > 0 ? (React.createElement(ConditionsStatuses, { conditions: warnings })) : disableds.length > 0 ? (React.createElement(ConditionsStatuses, { conditions: disableds })) : isLoading ? (React.createElement(Status, { status: OTHER_STATUS.LOADING, title: OTHER_STATUS.LOADING, withBorder: true, withIcon: true })) : (React.createElement(Status, { status: STATUS_TYPE.SUCCESS, title: STATUS_TYPE.SUCCESS, withBorder: true, withIcon: true }))));
652
653
  };
653
654
  const ConditionsStatuses = ({ conditions }) => {
654
655
  const theme = Theme.useTheme();
655
656
  return (React.createElement(FlexRow, null, mapConditions(conditions).map(({ status, type, reason, message, lastTransitionTime }) => {
656
657
  if (status === 'loading' || status === 'disabled')
657
- status = NOTIFICATION_TYPE.INFO;
658
+ status = STATUS_TYPE.INFO;
658
659
  const icon = getStatusIcon(status, theme);
659
660
  return (React.createElement(Tooltip, { key: useId(), titleIcon: icon, title: type, text: message || reason || '', timestamp: lastTransitionTime },
660
661
  React.createElement(Status, { status: status, title: reason || type, withBorder: true, withIcon: true })));
661
662
  })));
662
663
  };
663
664
 
664
- const TableWrap$3 = styled.div `
665
- width: 100%;
666
- max-height: ${({ $maxHeight }) => $maxHeight || 'unset'};
667
- overflow-y: auto;
668
- `;
669
665
  const columns$3 = [
670
666
  { key: 'icon', title: '' },
671
667
  { key: 'name', title: DISPLAY_TITLES.NAME, sortable: true },
@@ -679,13 +675,13 @@ const columns$3 = [
679
675
  const ActionTable = ({ maxHeight, maxWidth }) => {
680
676
  const theme = Theme.useTheme();
681
677
  const filters = useFilterStore();
682
- const { actions } = useEntityStore();
678
+ const { actions, actionsLoading } = useEntityStore();
683
679
  const { setDrawerType, setDrawerEntityId } = useDrawerStore();
684
680
  const filtered = useMemo(() => filterActions(actions, filters), [actions, filters]);
685
681
  const rows = useMemo(() => filtered.map((act) => {
686
682
  const { hasErrors, hasWarnings, hasDisableds } = getConditionsBooleans(act.conditions || []);
687
683
  return {
688
- status: hasErrors ? NOTIFICATION_TYPE.ERROR : hasWarnings ? NOTIFICATION_TYPE.WARNING : undefined,
684
+ status: hasErrors ? STATUS_TYPE.ERROR : hasWarnings ? STATUS_TYPE.WARNING : undefined,
689
685
  faded: hasDisableds,
690
686
  cells: [
691
687
  {
@@ -724,15 +720,17 @@ const ActionTable = ({ maxHeight, maxWidth }) => {
724
720
  {
725
721
  columnKey: 'active-status',
726
722
  component: () => (React.createElement("div", { style: { lineHeight: 1 } },
727
- React.createElement(Status, { status: act.spec.disabled ? NOTIFICATION_TYPE.ERROR : NOTIFICATION_TYPE.SUCCESS, title: act.spec.disabled ? 'Inactive' : 'Active', withIcon: true, withBorder: true }))),
723
+ React.createElement(Status, { status: act.spec.disabled ? STATUS_TYPE.ERROR : STATUS_TYPE.SUCCESS, title: act.spec.disabled ? 'Inactive' : 'Active', withIcon: true, withBorder: true }))),
728
724
  },
729
725
  ],
730
726
  };
731
727
  }), [filtered]);
732
- return (React.createElement(FlexColumn, { style: { maxWidth: maxWidth || 'unset', width: '100%' } },
733
- React.createElement(FlexRow, { "$gap": 16, style: { padding: '16px' } },
734
- React.createElement(IconTitleBadge, { icon: getEntityIcon(ENTITY_TYPES.ACTION), title: 'Actions', badge: filtered.length !== actions.length ? `${filtered.length}/${actions.length}` : actions.length })),
735
- React.createElement(TableWrap$3, { "$maxHeight": maxHeight },
728
+ const badge = useMemo(() => (filtered.length !== actions.length ? `${filtered.length}/${actions.length}` : actions.length), [filtered, actions]);
729
+ const badgeTooltip = useMemo(() => (filtered.length !== actions.length ? DISPLAY_TITLES.FILTERED_COUNT_TOOLTIP : undefined), [filtered, actions]);
730
+ return (React.createElement(TableContainer, { "$maxWidth": maxWidth },
731
+ React.createElement(TableTitleWrap, null,
732
+ React.createElement(IconTitleBadge, { icon: getEntityIcon(ENTITY_TYPES.ACTION), title: DISPLAY_TITLES.ACTIONS, badge: badge, badgeTooltip: badgeTooltip, loading: actionsLoading })),
733
+ React.createElement(TableWrap, { "$maxHeight": maxHeight },
736
734
  React.createElement(InteractiveTable, { columns: columns$3, rows: rows, onRowClick: (idx) => {
737
735
  setDrawerType(ENTITY_TYPES.ACTION);
738
736
  setDrawerEntityId(filtered[idx].id);
@@ -898,13 +896,13 @@ const ComputePlatformSelect = ({ connections, selected, onSelect, onViewAll }) =
898
896
  isOpen && withSelect && (React.createElement(AbsoluteContainer$2, null,
899
897
  React.createElement(HeadWrap, null,
900
898
  React.createElement(Input, { placeholder: 'Search...', icon: SearchIcon, value: searchText, onChange: (e) => setSearchText(e.target.value.toLowerCase()) })),
901
- React.createElement(VerticalScroll$1, { style: { maxHeight: '240px' } }, filtered.map(({ id, type, name, status }, idx) => (React.createElement(SelectionButton, { key: `platform-${id}`, icon: () => getPlatformIcon(type)({ fill: status === NOTIFICATION_TYPE.SUCCESS ? theme.text.success : theme.text.error }), label: `${!!name ? name : getPlatformLabel(type)} (${id})`, isSelected: selected?.id === id, onClick: () => {
902
- if (status === NOTIFICATION_TYPE.SUCCESS) {
899
+ React.createElement(VerticalScroll$1, { style: { maxHeight: '240px' } }, filtered.map(({ id, type, name, status }, idx) => (React.createElement(SelectionButton, { key: `platform-${id}`, icon: () => getPlatformIcon(type)({ fill: status === STATUS_TYPE.SUCCESS ? theme.text.success : theme.text.error }), label: `${!!name ? name : getPlatformLabel(type)} (${id})`, isSelected: selected?.id === id, onClick: () => {
900
+ if (status === STATUS_TYPE.SUCCESS) {
903
901
  onSelect(filtered[idx]);
904
902
  }
905
903
  else {
906
904
  addNotification({
907
- type: NOTIFICATION_TYPE.WARNING,
905
+ type: STATUS_TYPE.WARNING,
908
906
  title: 'Connection lost',
909
907
  message: 'Cannot connect to this platform',
910
908
  hideFromHistory: true,
@@ -937,7 +935,7 @@ const ComputePlatforms = ({ connections, onSelect }) => {
937
935
  {
938
936
  columnKey: 'status',
939
937
  component: () => (React.createElement("div", { style: { lineHeight: 1 } },
940
- React.createElement(Status, { title: status === NOTIFICATION_TYPE.SUCCESS ? 'connection alive' : 'connection lost', status: status, withIcon: true, withBorder: true }))),
938
+ React.createElement(Status, { title: status === STATUS_TYPE.SUCCESS ? 'connection alive' : 'connection lost', status: status, withIcon: true, withBorder: true }))),
941
939
  },
942
940
  ],
943
941
  })), onRowClick: (idx) => onSelect(filtered[idx]) }),
@@ -980,7 +978,7 @@ const ErrorDropdown = ({ title = 'Error Message', value, onSelect, onDeselect, d
980
978
  // instead, it is now optional and we should fallback to "reason" which is also optional.
981
979
  sources.forEach(({ conditions }) => {
982
980
  mapConditions(conditions || []).forEach(({ status, message, reason }) => {
983
- if (status === NOTIFICATION_TYPE.ERROR && !payload.find((opt) => opt.id === message)) {
981
+ if (status === STATUS_TYPE.ERROR && !payload.find((opt) => opt.id === message)) {
984
982
  if (!!message) {
985
983
  if (!payload.find((opt) => opt.id === message))
986
984
  payload.push({ id: message, value: message });
@@ -12699,7 +12697,7 @@ const BaseNode = memo(({ id: nodeId, data }) => {
12699
12697
  const isPending = isThisPending({ entityType, entityId });
12700
12698
  const renderActions = () => {
12701
12699
  const sourceIsInstrumenting = isSource && (!raw.conditions?.length || raw.conditions?.some(({ status }) => status === 'loading'));
12702
- return (React.createElement(React.Fragment, null, isPending ? (React.createElement(FadeLoader, null)) : status === NOTIFICATION_TYPE.ERROR ? (React.createElement(ErrorTriangleIcon, { size: 20 })) : status === NOTIFICATION_TYPE.WARNING ? (React.createElement(WarningTriangleIcon, { size: 20 })) : sourceIsInstrumenting ? (React.createElement(FadeLoader, null)) : null));
12700
+ return (React.createElement(React.Fragment, null, isPending ? (React.createElement(FadeLoader, null)) : status === STATUS_TYPE.ERROR ? (React.createElement(ErrorTriangleIcon, { size: 20 })) : status === STATUS_TYPE.WARNING ? (React.createElement(WarningTriangleIcon, { size: 20 })) : sourceIsInstrumenting ? (React.createElement(FadeLoader, null)) : null));
12703
12701
  };
12704
12702
  const { selectedSources, setSelectedSources } = useSelectedStore();
12705
12703
  const namespaces = { ...selectedSources };
@@ -13041,7 +13039,7 @@ const buildEdges = ({ theme, nodes, metrics, containerHeight }) => {
13041
13039
  animated: false,
13042
13040
  isMultiTarget: false,
13043
13041
  label: formatBytes(metric?.throughput),
13044
- isError: status === NOTIFICATION_TYPE.ERROR,
13042
+ isError: status === STATUS_TYPE.ERROR,
13045
13043
  }));
13046
13044
  }
13047
13045
  }
@@ -13052,7 +13050,7 @@ const buildEdges = ({ theme, nodes, metrics, containerHeight }) => {
13052
13050
  animated: false,
13053
13051
  isMultiTarget: true,
13054
13052
  label: formatBytes(metric?.throughput),
13055
- isError: status === NOTIFICATION_TYPE.ERROR,
13053
+ isError: status === STATUS_TYPE.ERROR,
13056
13054
  }));
13057
13055
  }
13058
13056
  });
@@ -13085,7 +13083,7 @@ const buildRuleNodes = ({ loading, entities, positions, unfilteredCount }) => {
13085
13083
  },
13086
13084
  data: {
13087
13085
  nodeWidth: nodeWidth$4,
13088
- title: 'Instrumentation Rules',
13086
+ title: DISPLAY_TITLES.INSTRUMENTATION_RULES,
13089
13087
  icon: getEntityIcon(ENTITY_TYPES.INSTRUMENTATION_RULE),
13090
13088
  badge: unfilteredCount,
13091
13089
  isFetching: loading,
@@ -13165,7 +13163,7 @@ const buildActionNodes = ({ loading, entities, positions, unfilteredCount }) =>
13165
13163
  },
13166
13164
  data: {
13167
13165
  nodeWidth: nodeWidth$3,
13168
- title: 'Actions',
13166
+ title: DISPLAY_TITLES.ACTIONS,
13169
13167
  icon: getEntityIcon(ENTITY_TYPES.ACTION),
13170
13168
  badge: unfilteredCount,
13171
13169
  isFetching: loading,
@@ -13264,10 +13262,10 @@ const buildSourceNodes = ({ loading, entities, positions, unfilteredCount, conta
13264
13262
  },
13265
13263
  data: {
13266
13264
  nodeWidth: nodeWidth$2,
13267
- title: 'Sources',
13265
+ title: DISPLAY_TITLES.SOURCES,
13268
13266
  icon: getEntityIcon(ENTITY_TYPES.SOURCE),
13269
13267
  badge: hasFiltersApplied ? `${entities.length}/${unfilteredCount}` : unfilteredCount,
13270
- badgeTooltip: hasFiltersApplied ? 'Represents filtered amount, out of total amount' : undefined,
13268
+ badgeTooltip: hasFiltersApplied ? DISPLAY_TITLES.FILTERED_COUNT_TOOLTIP : undefined,
13271
13269
  isFetching: loading,
13272
13270
  sources: entities,
13273
13271
  },
@@ -13402,7 +13400,7 @@ const buildDestinationNodes = ({ loading, entities, positions, unfilteredCount }
13402
13400
  },
13403
13401
  data: {
13404
13402
  nodeWidth,
13405
- title: 'Destinations',
13403
+ title: DISPLAY_TITLES.DESTINATIONS,
13406
13404
  icon: getEntityIcon(ENTITY_TYPES.DESTINATION),
13407
13405
  badge: unfilteredCount,
13408
13406
  isFetching: loading,
@@ -13947,15 +13945,15 @@ const DestinationForm = ({ isUpdate, categoryItem, formData, formErrors, validat
13947
13945
  !isUpdate && (React.createElement(React.Fragment, null,
13948
13946
  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: () => {
13949
13947
  setIsFormDirty(false);
13950
- setConnectionStatus(NOTIFICATION_TYPE.ERROR);
13948
+ setConnectionStatus(STATUS_TYPE.ERROR);
13951
13949
  }, onSuccess: () => {
13952
13950
  setIsFormDirty(false);
13953
- setConnectionStatus(NOTIFICATION_TYPE.SUCCESS);
13951
+ setConnectionStatus(STATUS_TYPE.SUCCESS);
13954
13952
  } })) }),
13955
13953
  (testConnectionSupported || autoFilled) && (React.createElement(NotesWrapper, null,
13956
- testConnectionSupported && connectionStatus === NOTIFICATION_TYPE.ERROR && (React.createElement(NotificationNote, { type: NOTIFICATION_TYPE.ERROR, message: 'Connection failed. Please check your input and try again.' })),
13957
- testConnectionSupported && connectionStatus === NOTIFICATION_TYPE.SUCCESS && React.createElement(NotificationNote, { type: NOTIFICATION_TYPE.SUCCESS, message: 'Connection succeeded.' }),
13958
- autoFilled && React.createElement(NotificationNote, { type: NOTIFICATION_TYPE.DEFAULT, message: `Odigos autocompleted ${displayName} connection details.` }))),
13954
+ testConnectionSupported && connectionStatus === STATUS_TYPE.ERROR && React.createElement(NotificationNote, { type: STATUS_TYPE.ERROR, message: 'Connection failed. Please check your input and try again.' }),
13955
+ testConnectionSupported && connectionStatus === STATUS_TYPE.SUCCESS && React.createElement(NotificationNote, { type: STATUS_TYPE.SUCCESS, message: 'Connection succeeded.' }),
13956
+ autoFilled && React.createElement(NotificationNote, { type: STATUS_TYPE.DEFAULT, message: `Odigos autocompleted ${displayName} connection details.` }))),
13959
13957
  React.createElement(Divider, null))),
13960
13958
  React.createElement(MonitorsCheckboxes, { title: isUpdate ? '' : 'This connection will monitor:', required: true, allowedSignals: supportedMonitors, selectedSignals: selectedMonitors, setSelectedSignals: handleSelectedSignals, errorMessage: formErrors['exportedSignals'] }),
13961
13959
  !isUpdate && (React.createElement(Input, { title: 'Destination name', placeholder: 'Enter destination name', value: formData['name'], onChange: (e) => {
@@ -14305,7 +14303,7 @@ const DestinationSelectionForm = ({ categories, potentialDestinations, createDes
14305
14303
  return (React.createElement(ContentWrapper, null,
14306
14304
  React.createElement(SectionTitle, { title: 'Configure destinations', description: 'Select destinations where telemetry data will be sent and configure their settings.' }),
14307
14305
  !isLoading && isSourcesListEmpty && (React.createElement(NotificationNoteWrapper, null,
14308
- React.createElement(NotificationNote, { type: NOTIFICATION_TYPE.WARNING, message: 'No sources selected. Please go back to select sources.', action: {
14306
+ React.createElement(NotificationNote, { type: STATUS_TYPE.WARNING, message: 'No sources selected. Please go back to select sources.', action: {
14309
14307
  label: 'Select Sources',
14310
14308
  onClick: goToSources,
14311
14309
  } }))),
@@ -14318,11 +14316,6 @@ const DestinationSelectionForm = ({ categories, potentialDestinations, createDes
14318
14316
  React.createElement(FadeLoader, { scale: 2, cssOverride: { marginTop: '3rem' } }))) : (React.createElement(ConfiguredList, null))));
14319
14317
  };
14320
14318
 
14321
- const TableWrap$2 = styled.div `
14322
- width: 100%;
14323
- max-height: ${({ $maxHeight }) => $maxHeight || 'unset'};
14324
- overflow-y: auto;
14325
- `;
14326
14319
  const columns$2 = [
14327
14320
  { key: 'icon', title: '' },
14328
14321
  { key: 'name', title: DISPLAY_TITLES.NAME, sortable: true },
@@ -14334,13 +14327,13 @@ const columns$2 = [
14334
14327
  const DestinationTable = ({ metrics, maxHeight, maxWidth }) => {
14335
14328
  const theme = Theme.useTheme();
14336
14329
  const filters = useFilterStore();
14337
- const { destinations } = useEntityStore();
14330
+ const { destinations, destinationsLoading } = useEntityStore();
14338
14331
  const { setDrawerType, setDrawerEntityId } = useDrawerStore();
14339
14332
  const filtered = useMemo(() => filterDestinations(destinations, filters), [destinations, filters]);
14340
14333
  const rows = useMemo(() => filtered.map((dest) => {
14341
14334
  const { hasErrors, hasWarnings, hasDisableds } = getConditionsBooleans(dest.conditions || []);
14342
14335
  return {
14343
- status: hasErrors ? NOTIFICATION_TYPE.ERROR : hasWarnings ? NOTIFICATION_TYPE.WARNING : undefined,
14336
+ status: hasErrors ? STATUS_TYPE.ERROR : hasWarnings ? STATUS_TYPE.WARNING : undefined,
14344
14337
  faded: hasDisableds,
14345
14338
  cells: [
14346
14339
  {
@@ -14372,10 +14365,12 @@ const DestinationTable = ({ metrics, maxHeight, maxWidth }) => {
14372
14365
  ],
14373
14366
  };
14374
14367
  }), [filtered, metrics]);
14375
- return (React.createElement(FlexColumn, { style: { maxWidth: maxWidth || 'unset', width: '100%' } },
14376
- React.createElement(FlexRow, { "$gap": 16, style: { padding: '16px' } },
14377
- React.createElement(IconTitleBadge, { icon: getEntityIcon(ENTITY_TYPES.DESTINATION), title: 'Destinations', badge: filtered.length !== destinations.length ? `${filtered.length}/${destinations.length}` : destinations.length })),
14378
- React.createElement(TableWrap$2, { "$maxHeight": maxHeight },
14368
+ const badge = useMemo(() => (filtered.length !== destinations.length ? `${filtered.length}/${destinations.length}` : destinations.length), [filtered, destinations]);
14369
+ const badgeTooltip = useMemo(() => (filtered.length !== destinations.length ? DISPLAY_TITLES.FILTERED_COUNT_TOOLTIP : undefined), [filtered, destinations]);
14370
+ return (React.createElement(TableContainer, { "$maxWidth": maxWidth },
14371
+ React.createElement(TableTitleWrap, null,
14372
+ React.createElement(IconTitleBadge, { icon: getEntityIcon(ENTITY_TYPES.DESTINATION), title: DISPLAY_TITLES.DESTINATIONS, badge: badge, badgeTooltip: badgeTooltip, loading: destinationsLoading })),
14373
+ React.createElement(TableWrap, { "$maxHeight": maxHeight },
14379
14374
  React.createElement(InteractiveTable, { columns: columns$2, rows: rows, onRowClick: (idx) => {
14380
14375
  setDrawerType(ENTITY_TYPES.DESTINATION);
14381
14376
  setDrawerEntityId(filtered[idx].id);
@@ -14638,7 +14633,7 @@ const InstrumentationRuleDrawer = ({ updateInstrumentationRule, deleteInstrument
14638
14633
  const handleEdit = (bool) => {
14639
14634
  if (!thisItem.mutable && (bool || bool === undefined)) {
14640
14635
  addNotification({
14641
- type: NOTIFICATION_TYPE.WARNING,
14636
+ type: STATUS_TYPE.WARNING,
14642
14637
  title: FORM_ALERTS.FORBIDDEN,
14643
14638
  message: FORM_ALERTS.CANNOT_EDIT_RULE,
14644
14639
  crdType: ENTITY_TYPES.INSTRUMENTATION_RULE,
@@ -14658,7 +14653,7 @@ const InstrumentationRuleDrawer = ({ updateInstrumentationRule, deleteInstrument
14658
14653
  const handleDelete = () => {
14659
14654
  if (!thisItem.mutable) {
14660
14655
  addNotification({
14661
- type: NOTIFICATION_TYPE.WARNING,
14656
+ type: STATUS_TYPE.WARNING,
14662
14657
  title: FORM_ALERTS.FORBIDDEN,
14663
14658
  message: FORM_ALERTS.CANNOT_DELETE_RULE,
14664
14659
  crdType: ENTITY_TYPES.INSTRUMENTATION_RULE,
@@ -14724,7 +14719,7 @@ const InstrumentationRuleModal = ({ isEnterprise, createInstrumentationRule }) =
14724
14719
  ] }) },
14725
14720
  React.createElement(ModalBody, null,
14726
14721
  React.createElement(SectionTitle, { title: 'Select Instrumentation Rule', description: 'Define how telemetry is recorded from your application. Choose a rule type and configure the details.' }),
14727
- !isEnterprise && React.createElement(NotificationNote, { type: NOTIFICATION_TYPE.DEFAULT, message: FORM_ALERTS.ENTERPRISE_ONLY('Instrumentation Rules'), style: { marginTop: '24px' } }),
14722
+ !isEnterprise && React.createElement(NotificationNote, { type: STATUS_TYPE.DEFAULT, message: FORM_ALERTS.ENTERPRISE_ONLY('Instrumentation Rules'), style: { marginTop: '24px' } }),
14728
14723
  React.createElement(AutocompleteInput, { options: INSTRUMENTATION_RULE_OPTIONS, selectedOption: selectedItem, onOptionSelect: (opt) => handleSelect(opt), style: { marginTop: isEnterprise ? '24px' : '12px' }, autoFocus: !selectedItem?.type }),
14729
14724
  !!selectedItem?.type ? (React.createElement("div", null,
14730
14725
  React.createElement(Divider, { margin: '16px 0' }),
@@ -14749,11 +14744,6 @@ const buildSpecCell = (rule) => {
14749
14744
  return str;
14750
14745
  };
14751
14746
 
14752
- const TableWrap$1 = styled.div `
14753
- width: 100%;
14754
- max-height: ${({ $maxHeight }) => $maxHeight || 'unset'};
14755
- overflow-y: auto;
14756
- `;
14757
14747
  const columns$1 = [
14758
14748
  { key: 'icon', title: '' },
14759
14749
  { key: 'name', title: DISPLAY_TITLES.NAME, sortable: true },
@@ -14766,8 +14756,8 @@ const columns$1 = [
14766
14756
  ];
14767
14757
  const InstrumentationRuleTable = ({ maxHeight, maxWidth }) => {
14768
14758
  const theme = Theme.useTheme();
14769
- const { instrumentationRules } = useEntityStore();
14770
14759
  const { setDrawerType, setDrawerEntityId } = useDrawerStore();
14760
+ const { instrumentationRules, instrumentationRulesLoading } = useEntityStore();
14771
14761
  const rows = useMemo(() =>
14772
14762
  // note: rules do not have filters yet
14773
14763
  instrumentationRules.map((rule) => {
@@ -14806,20 +14796,20 @@ const InstrumentationRuleTable = ({ maxHeight, maxWidth }) => {
14806
14796
  {
14807
14797
  columnKey: 'active-status',
14808
14798
  component: () => (React.createElement("div", { style: { lineHeight: 1 } },
14809
- React.createElement(Status, { status: rule.disabled ? NOTIFICATION_TYPE.ERROR : NOTIFICATION_TYPE.SUCCESS, title: rule.disabled ? 'Inactive' : 'Active', withIcon: true, withBorder: true }))),
14799
+ React.createElement(Status, { status: rule.disabled ? STATUS_TYPE.ERROR : STATUS_TYPE.SUCCESS, title: rule.disabled ? 'Inactive' : 'Active', withIcon: true, withBorder: true }))),
14810
14800
  },
14811
14801
  {
14812
14802
  columnKey: 'source-count',
14813
14803
  component: () => (React.createElement("div", { style: { lineHeight: 1 } },
14814
- React.createElement(Status, { status: NOTIFICATION_TYPE.INFO, title: 'all sources', withBorder: true }))),
14804
+ React.createElement(Status, { status: STATUS_TYPE.INFO, title: 'all sources', withBorder: true }))),
14815
14805
  },
14816
14806
  ],
14817
14807
  };
14818
14808
  }), [instrumentationRules]);
14819
- return (React.createElement(FlexColumn, { style: { maxWidth: maxWidth || 'unset', width: '100%' } },
14820
- React.createElement(FlexRow, { "$gap": 16, style: { padding: '16px' } },
14821
- React.createElement(IconTitleBadge, { icon: getEntityIcon(ENTITY_TYPES.ACTION), title: 'Instrumentation Rules', badge: instrumentationRules.length })),
14822
- React.createElement(TableWrap$1, { "$maxHeight": maxHeight },
14809
+ return (React.createElement(TableContainer, { "$maxWidth": maxWidth },
14810
+ React.createElement(TableTitleWrap, null,
14811
+ React.createElement(IconTitleBadge, { icon: getEntityIcon(ENTITY_TYPES.ACTION), title: DISPLAY_TITLES.INSTRUMENTATION_RULES, badge: instrumentationRules.length, loading: instrumentationRulesLoading })),
14812
+ React.createElement(TableWrap, { "$maxHeight": maxHeight },
14823
14813
  React.createElement(InteractiveTable, { columns: columns$1, rows: rows, onRowClick: (idx) => {
14824
14814
  setDrawerType(ENTITY_TYPES.INSTRUMENTATION_RULE);
14825
14815
  setDrawerEntityId(instrumentationRules[idx].ruleId);
@@ -15013,7 +15003,7 @@ const NotificationListItem = ({ id, seen, type, title, message, time, crdType, t
15013
15003
  onClickNotification({ id, crdType, target });
15014
15004
  }
15015
15005
  } },
15016
- React.createElement(StatusIcon, { "$type": isDeleted ? NOTIFICATION_TYPE.ERROR : type }, isDeleted ? React.createElement(TrashIcon, null) : React.createElement(Icon, null)),
15006
+ React.createElement(StatusIcon, { "$type": isDeleted ? STATUS_TYPE.ERROR : type }, isDeleted ? React.createElement(TrashIcon, null) : React.createElement(Icon, null)),
15017
15007
  React.createElement(NotifTextWrap, null,
15018
15008
  React.createElement(NotifHeaderTextWrap, null,
15019
15009
  React.createElement(Text, { size: 14 }, message)),
@@ -15128,9 +15118,9 @@ const Describe$1 = ({ source, fetchDescribeSource }) => {
15128
15118
  }
15129
15119
  return (React.createElement(FlexColumn, { "$gap": 12 }, !describe.pods?.length ? (React.createElement(CenterThis, null,
15130
15120
  React.createElement(NoDataFound, { subTitle: 'Check if you have any running pods and try again' }))) : (describe.pods.map(({ podName, nodeName, phase, containers }) => {
15131
- const podHasErrors = phase.status !== NOTIFICATION_TYPE.SUCCESS ||
15132
- containers.findIndex(({ instrumentationInstances }) => instrumentationInstances.findIndex(({ healthy }) => healthy.status !== NOTIFICATION_TYPE.SUCCESS) !== -1) !== -1;
15133
- const podStatus = podHasErrors ? NOTIFICATION_TYPE.ERROR : NOTIFICATION_TYPE.SUCCESS;
15121
+ const podHasErrors = phase.status !== STATUS_TYPE.SUCCESS ||
15122
+ containers.findIndex(({ instrumentationInstances }) => instrumentationInstances.findIndex(({ healthy }) => healthy.status !== STATUS_TYPE.SUCCESS) !== -1) !== -1;
15123
+ const podStatus = podHasErrors ? STATUS_TYPE.ERROR : STATUS_TYPE.SUCCESS;
15134
15124
  const divider = { type: DATA_CARD_FIELD_TYPES.DIVIDER };
15135
15125
  return (React.createElement(DataCard, { key: `pod-${podName.value}`, title: `Pod: ${podName.value}`, withExtend: true, action: () => React.createElement(Status, { status: podStatus, title: podStatus, withIcon: true, withBorder: true }), data: [
15136
15126
  {
@@ -15577,11 +15567,6 @@ const SourceModal = ({ componentType = 'FAST', namespaces, namespace, namespaces
15577
15567
  React.createElement(SourceSelectionForm, { ref: formRef, componentType: componentType, isModal: true, namespaces: namespaces, namespace: namespace, namespacesLoading: namespacesLoading, selectedNamespace: selectedNamespace, onSelectNamespace: onSelectNamespace })));
15578
15568
  };
15579
15569
 
15580
- const TableWrap = styled.div `
15581
- width: 100%;
15582
- max-height: ${({ $maxHeight }) => $maxHeight || 'unset'};
15583
- overflow-y: auto;
15584
- `;
15585
15570
  const columns = [
15586
15571
  { key: 'checkbox-and-icon', title: '' },
15587
15572
  { key: 'name', title: DISPLAY_TITLES.NAME, sortable: true },
@@ -15594,10 +15579,20 @@ const columns = [
15594
15579
  const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
15595
15580
  const theme = Theme.useTheme();
15596
15581
  const filters = useFilterStore();
15597
- const { sources } = useEntityStore();
15598
15582
  const { isThisPending } = usePendingStore();
15583
+ const { sources, sourcesLoading } = useEntityStore();
15599
15584
  const { setDrawerType, setDrawerEntityId } = useDrawerStore();
15600
15585
  const { selectedSources, setSelectedSources } = useSelectedStore();
15586
+ const { isAwaitingInstrumentation, sourcesToCreate, sourcesCreated, sourcesToDelete, sourcesDeleted } = useInstrumentStore();
15587
+ const instrumentingPercent = useMemo(() => {
15588
+ const calculateProgress = (total, completed) => (total > 0 ? Math.floor((100 / total) * completed) || 1 : 1);
15589
+ if (sourcesToCreate)
15590
+ return calculateProgress(sourcesToCreate, sourcesCreated);
15591
+ if (sourcesToDelete)
15592
+ return calculateProgress(sourcesToDelete, sourcesDeleted);
15593
+ return 1;
15594
+ }, [sourcesToCreate, sourcesCreated, sourcesToDelete, sourcesDeleted]);
15595
+ const filtered = useMemo(() => filterSources(sources, filters), [sources, filters]);
15601
15596
  const [hasSelected, totalSelectedSources] = useMemo(() => {
15602
15597
  let num = 0;
15603
15598
  Object.values(selectedSources).forEach((selectedSources) => {
@@ -15608,7 +15603,7 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
15608
15603
  const onSelectAll = useCallback((bool) => {
15609
15604
  if (bool) {
15610
15605
  const payload = {};
15611
- sources?.forEach((source) => {
15606
+ filtered.forEach((source) => {
15612
15607
  const id = { namespace: source.namespace, name: source.name, kind: source.kind };
15613
15608
  const isPending = isThisPending({ entityType: ENTITY_TYPES.SOURCE, entityId: id });
15614
15609
  if (!isPending) {
@@ -15625,7 +15620,7 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
15625
15620
  else {
15626
15621
  setSelectedSources({});
15627
15622
  }
15628
- }, [sources]);
15623
+ }, [filtered]);
15629
15624
  const onSelectOne = useCallback((source) => {
15630
15625
  const { namespace, name, kind } = source;
15631
15626
  const payload = { ...selectedSources };
@@ -15640,16 +15635,13 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
15640
15635
  }
15641
15636
  setSelectedSources(payload);
15642
15637
  }, [selectedSources]);
15643
- const { isAwaitingInstrumentation, sourcesToCreate, sourcesCreated, sourcesToDelete, sourcesDeleted } = useInstrumentStore();
15644
- const instrumentingPercent = (!!sourcesToCreate ? Math.floor((100 / sourcesToCreate) * sourcesCreated) : !!sourcesToDelete ? Math.floor((100 / sourcesToDelete) * sourcesDeleted) : 0) || 1;
15645
- const filtered = useMemo(() => filterSources(sources, filters), [sources, filters]);
15646
15638
  const rows = useMemo(() => filtered.map((source) => {
15647
15639
  const id = { namespace: source.namespace, name: source.name, kind: source.kind };
15648
15640
  const { hasErrors, hasWarnings, hasDisableds } = getConditionsBooleans(source.conditions || []);
15649
15641
  const isPending = isThisPending({ entityType: ENTITY_TYPES.SOURCE, entityId: id });
15650
15642
  const isChecked = !!selectedSources[id.namespace]?.find((x) => x.namespace === id.namespace && x.name === id.name && x.kind === id.kind);
15651
15643
  return {
15652
- status: hasErrors ? NOTIFICATION_TYPE.ERROR : hasWarnings ? NOTIFICATION_TYPE.WARNING : undefined,
15644
+ status: hasErrors ? STATUS_TYPE.ERROR : hasWarnings ? STATUS_TYPE.WARNING : undefined,
15653
15645
  faded: hasDisableds,
15654
15646
  cells: [
15655
15647
  {
@@ -15684,15 +15676,17 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
15684
15676
  {
15685
15677
  columnKey: 'containers',
15686
15678
  component: () => (React.createElement("div", { style: { lineHeight: 1 } },
15687
- React.createElement(Status, { status: NOTIFICATION_TYPE.INFO, title: getContainersInstrumentedCount(source.containers), withBorder: true }))),
15679
+ React.createElement(Status, { status: STATUS_TYPE.INFO, title: getContainersInstrumentedCount(source.containers), withBorder: true }))),
15688
15680
  },
15689
15681
  ],
15690
15682
  };
15691
15683
  }), [filtered, selectedSources, metrics, onSelectOne]);
15692
- return (React.createElement(FlexColumn, { style: { maxWidth: maxWidth || 'unset', width: '100%' } },
15693
- React.createElement(FlexRow, { "$gap": 16, style: { padding: '16px' } },
15694
- React.createElement(Checkbox, { partiallyChecked: hasSelected && sources?.length !== totalSelectedSources, value: hasSelected && sources?.length === totalSelectedSources, onChange: onSelectAll, disabled: !sources?.length }),
15695
- React.createElement(IconTitleBadge, { icon: getEntityIcon(ENTITY_TYPES.SOURCE), title: 'Sources', badge: filtered.length !== sources.length ? `${filtered.length}/${sources.length}` : sources.length })),
15684
+ const badge = useMemo(() => (filtered.length !== sources.length ? `${filtered.length}/${sources.length}` : sources.length), [filtered, sources]);
15685
+ const badgeTooltip = useMemo(() => (filtered.length !== sources.length ? DISPLAY_TITLES.FILTERED_COUNT_TOOLTIP : undefined), [filtered, sources]);
15686
+ return (React.createElement(TableContainer, { "$maxWidth": maxWidth },
15687
+ React.createElement(TableTitleWrap, null,
15688
+ React.createElement(Checkbox, { partiallyChecked: hasSelected && filtered?.length !== totalSelectedSources, value: hasSelected && filtered?.length === totalSelectedSources, onChange: onSelectAll, disabled: !filtered?.length }),
15689
+ React.createElement(IconTitleBadge, { icon: getEntityIcon(ENTITY_TYPES.SOURCE), title: DISPLAY_TITLES.SOURCES, badge: badge, badgeTooltip: badgeTooltip, loading: sourcesLoading && !isAwaitingInstrumentation })),
15696
15690
  React.createElement(TableWrap, { "$maxHeight": maxHeight },
15697
15691
  React.createElement(InteractiveTable, { columns: columns, rows: isAwaitingInstrumentation ? [] : rows, onRowClick: (idx) => {
15698
15692
  setDrawerType(ENTITY_TYPES.SOURCE);
@@ -15760,7 +15754,7 @@ const TokenActions = ({ token, saveToken }) => {
15760
15754
  setIsEdit(false);
15761
15755
  setInputValue(token);
15762
15756
  };
15763
- const SuccessIcon = getStatusIcon(NOTIFICATION_TYPE.SUCCESS, theme);
15757
+ const SuccessIcon = getStatusIcon(STATUS_TYPE.SUCCESS, theme);
15764
15758
  useOnClickOutside(popupRef, onCloseEdit);
15765
15759
  return (React.createElement(FlexRow, { "$gap": 0 },
15766
15760
  React.createElement(IconButton, { size: 32, onClick: () => clickCopy(token) }, isCopied ? React.createElement(SuccessIcon, null) : React.createElement(CopyIcon, null)),
@@ -1,8 +1,8 @@
1
- import { NOTIFICATION_TYPE, type Condition } from '@/types';
1
+ import { STATUS_TYPE, type Condition } from '@/types';
2
2
  export declare const getConditionsBooleans: (conditions: Condition[]) => {
3
3
  hasErrors: boolean;
4
4
  hasWarnings: boolean;
5
5
  hasDisableds: boolean;
6
6
  hasLoadings: boolean;
7
- priorotizedStatus: NOTIFICATION_TYPE | undefined;
7
+ priorotizedStatus: STATUS_TYPE | undefined;
8
8
  };
@@ -1,2 +1,2 @@
1
- import { NOTIFICATION_TYPE, type SVG } from '@/types';
2
- export declare const getStatusIcon: (type: NOTIFICATION_TYPE, theme: Record<"text", Record<NOTIFICATION_TYPE, string>>) => SVG;
1
+ import { STATUS_TYPE, type SVG } from '@/types';
2
+ export declare const getStatusIcon: (type: STATUS_TYPE, theme: Record<"text", Record<STATUS_TYPE, string>>) => SVG;
package/lib/functions.js CHANGED
@@ -1,5 +1,5 @@
1
- export { c as capitalizeFirstLetter, f as flattenObjectKeys, g as getMonitorIcon, a as getProgrammingLanguageIcon, b as getStatusIcon, m as mapConditions, p as parseJsonStringToPrettyString, r as removeEmptyValuesFromObject, s as safeJsonStringify, d as splitCamelString } from './index-Bc8gi9FH.js';
2
- export { c as compareCondition, f as filterActions, a as filterDestinations, b as filterSources, d as formatBytes, g as getConditionsBooleans, h as getContainersIcons, e as getContainersInstrumentedCount, i as getEntityIcon, j as getEntityLabel, k as getMetricForEntity, l as getPlatformIcon, m as getPlatformLabel, n as getValueForRange, o as isOverTime, s as sleep } from './index-g6Twdelv.js';
1
+ export { c as capitalizeFirstLetter, f as flattenObjectKeys, g as getMonitorIcon, a as getProgrammingLanguageIcon, b as getStatusIcon, m as mapConditions, p as parseJsonStringToPrettyString, r as removeEmptyValuesFromObject, s as safeJsonStringify, d as splitCamelString } from './index-DB1gmCsH.js';
2
+ export { c as compareCondition, f as filterActions, a as filterDestinations, b as filterSources, d as formatBytes, g as getConditionsBooleans, h as getContainersIcons, e as getContainersInstrumentedCount, i as getEntityIcon, j as getEntityLabel, k as getMetricForEntity, l as getPlatformIcon, m as getPlatformLabel, n as getValueForRange, o as isOverTime, s as sleep } from './index-eF2JXMVR.js';
3
3
  import { INSTRUMENTATION_RULE_TYPE, ENTITY_TYPES } from './types.js';
4
4
  export { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-BumPE6cF.js';
5
5
  export { k as getEntityId, l as isTimeElapsed } from './index-DIcomki-.js';
package/lib/hooks.js CHANGED
@@ -1,4 +1,4 @@
1
- export { u as useActionFormData, a as useClickNode, b as useClickNotification, c as useDestinationFormData, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-BY6B70Kf.js';
1
+ export { u as useActionFormData, a as useClickNode, b as useClickNotification, c as useDestinationFormData, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-CxdOP9FT.js';
2
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-Dfxjcy-C.js';
3
3
  import './types.js';
4
4
  import 'react';
@@ -9,5 +9,5 @@ import './index-CZe2VX28.js';
9
9
  import './index-BumPE6cF.js';
10
10
  import './index-BGlk5VhF.js';
11
11
  import './theme.js';
12
- import './index-Cu2uHOuh.js';
12
+ import './index-DnmWFsTQ.js';
13
13
  import './index-BFct3S32.js';
@@ -1,4 +1,4 @@
1
- import { PROGRAMMING_LANGUAGES, SIGNAL_TYPE, NOTIFICATION_TYPE } from './types.js';
1
+ import { PROGRAMMING_LANGUAGES, SIGNAL_TYPE, STATUS_TYPE } from './types.js';
2
2
  import 'react';
3
3
  import './index-DIcomki-.js';
4
4
  import 'styled-components';
@@ -110,11 +110,11 @@ const getMonitorIcon = (type) => {
110
110
 
111
111
  const getStatusIcon = (type, theme) => {
112
112
  const LOGOS = {
113
- [NOTIFICATION_TYPE.SUCCESS]: (props) => CheckCircledIcon({ fill: theme.text[type], ...props }),
114
- [NOTIFICATION_TYPE.ERROR]: (props) => ErrorTriangleIcon({ fill: theme.text[type], ...props }),
115
- [NOTIFICATION_TYPE.WARNING]: (props) => WarningTriangleIcon({ fill: theme.text[type], ...props }),
116
- [NOTIFICATION_TYPE.INFO]: (props) => InfoIcon({ fill: theme.text[type], ...props }),
117
- [NOTIFICATION_TYPE.DEFAULT]: (props) => OdigosLogo({ fill: theme.text[type], ...props }),
113
+ [STATUS_TYPE.SUCCESS]: (props) => CheckCircledIcon({ fill: theme.text[type], ...props }),
114
+ [STATUS_TYPE.ERROR]: (props) => ErrorTriangleIcon({ fill: theme.text[type], ...props }),
115
+ [STATUS_TYPE.WARNING]: (props) => WarningTriangleIcon({ fill: theme.text[type], ...props }),
116
+ [STATUS_TYPE.INFO]: (props) => InfoIcon({ fill: theme.text[type], ...props }),
117
+ [STATUS_TYPE.DEFAULT]: (props) => OdigosLogo({ fill: theme.text[type], ...props }),
118
118
  };
119
119
  return LOGOS[type];
120
120
  };
@@ -39,6 +39,7 @@ const DISPLAY_TITLES = {
39
39
  DETECTED_CONTAINERS: 'Detected Containers',
40
40
  DETECTED_CONTAINERS_DESCRIPTION: 'The system automatically instruments the containers it detects with a supported programming language.',
41
41
  CONTAINER_NAME: 'Container Name',
42
+ FILTERED_COUNT_TOOLTIP: 'Represents filtered amount, out of total amount',
42
43
  };
43
44
 
44
45
  export { DISPLAY_TITLES as D, FORM_ALERTS as F };