@odigos/ui-kit 0.0.8 → 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 (85) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/lib/components/badge/index.d.ts +2 -2
  3. package/lib/components/data-card/index.d.ts +1 -0
  4. package/lib/components/data-tab/index.d.ts +2 -2
  5. package/lib/components/describe-row/index.d.ts +2 -2
  6. package/lib/components/divider/index.d.ts +2 -2
  7. package/lib/components/drawer/drawer-header/index.d.ts +1 -1
  8. package/lib/components/icon-group/index.d.ts +2 -2
  9. package/lib/components/icon-wrapped/index.d.ts +2 -2
  10. package/lib/components/interactive-table/index.d.ts +2 -2
  11. package/lib/components/interactive-table/row.d.ts +2 -2
  12. package/lib/components/notification-note/index.d.ts +2 -2
  13. package/lib/components/status/index.d.ts +2 -2
  14. package/lib/components/styled.d.ts +12 -0
  15. package/lib/components/warning-modal/index.d.ts +2 -2
  16. package/lib/components.js +5 -5
  17. package/lib/constants/strings/index.d.ts +1 -0
  18. package/lib/constants.js +1 -1
  19. package/lib/containers/data-flow/nodes/base-node.d.ts +2 -2
  20. package/lib/containers/data-flow/nodes/scroll-node.d.ts +2 -2
  21. package/lib/containers/destination-form/test-connection/index.d.ts +2 -2
  22. package/lib/containers.js +106 -115
  23. package/lib/functions/get-conditions-booleans/index.d.ts +2 -2
  24. package/lib/functions/get-containers-icons/index.d.ts +2 -2
  25. package/lib/functions/get-platform-icon/index.d.ts +1 -1
  26. package/lib/functions/get-platform-label/index.d.ts +1 -1
  27. package/lib/functions/get-programming-language-icon/index.d.ts +2 -2
  28. package/lib/functions/get-status-icon/index.d.ts +2 -2
  29. package/lib/functions.js +4 -4
  30. package/lib/hooks.js +2 -2
  31. package/lib/icons/common/image-error-icon/image-error-icon.stories.d.ts +8 -0
  32. package/lib/icons/common/image-error-icon/index.d.ts +2 -0
  33. package/lib/icons/common/index.d.ts +1 -0
  34. package/lib/icons/index.d.ts +1 -0
  35. package/lib/icons/overview/connections-icon/connections-icon.stories.d.ts +8 -0
  36. package/lib/icons/overview/connections-icon/index.d.ts +2 -0
  37. package/lib/icons/overview/index.d.ts +1 -0
  38. package/lib/icons/programming-languages/c-plus-plus-logo/c-plus-plus-logo.stories.d.ts +8 -0
  39. package/lib/icons/programming-languages/c-plus-plus-logo/index.d.ts +2 -0
  40. package/lib/icons/programming-languages/c-sharp-logo/c-sharp-logo.stories.d.ts +8 -0
  41. package/lib/icons/programming-languages/c-sharp-logo/index.d.ts +2 -0
  42. package/lib/icons/programming-languages/dotnet-logo/dotnet-logo.stories.d.ts +8 -0
  43. package/lib/icons/programming-languages/dotnet-logo/index.d.ts +2 -0
  44. package/lib/icons/programming-languages/elixir-logo/elixir-logo.stories.d.ts +8 -0
  45. package/lib/icons/programming-languages/elixir-logo/index.d.ts +2 -0
  46. package/lib/icons/programming-languages/go-logo/go-logo.stories.d.ts +8 -0
  47. package/lib/icons/programming-languages/go-logo/index.d.ts +2 -0
  48. package/lib/icons/programming-languages/index.d.ts +17 -0
  49. package/lib/icons/programming-languages/java-logo/index.d.ts +2 -0
  50. package/lib/icons/programming-languages/java-logo/java-logo.stories.d.ts +8 -0
  51. package/lib/icons/programming-languages/kafka-logo/index.d.ts +2 -0
  52. package/lib/icons/programming-languages/kafka-logo/kafka-logo.stories.d.ts +8 -0
  53. package/lib/icons/programming-languages/mysql-logo/index.d.ts +2 -0
  54. package/lib/icons/programming-languages/mysql-logo/mysql-logo.stories.d.ts +8 -0
  55. package/lib/icons/programming-languages/nginx-logo/index.d.ts +2 -0
  56. package/lib/icons/programming-languages/nginx-logo/nginx-logo.stories.d.ts +8 -0
  57. package/lib/icons/programming-languages/nodejs-logo/index.d.ts +2 -0
  58. package/lib/icons/programming-languages/nodejs-logo/nodejs-logo.stories.d.ts +8 -0
  59. package/lib/icons/programming-languages/php-logo/index.d.ts +2 -0
  60. package/lib/icons/programming-languages/php-logo/php-logo.stories.d.ts +8 -0
  61. package/lib/icons/programming-languages/postgres-logo/index.d.ts +2 -0
  62. package/lib/icons/programming-languages/postgres-logo/postgres-logo.stories.d.ts +8 -0
  63. package/lib/icons/programming-languages/python-logo/index.d.ts +2 -0
  64. package/lib/icons/programming-languages/python-logo/python-logo.stories.d.ts +8 -0
  65. package/lib/icons/programming-languages/redis-logo/index.d.ts +2 -0
  66. package/lib/icons/programming-languages/redis-logo/redis-logo.stories.d.ts +8 -0
  67. package/lib/icons/programming-languages/ruby-logo/index.d.ts +2 -0
  68. package/lib/icons/programming-languages/ruby-logo/ruby-logo.stories.d.ts +8 -0
  69. package/lib/icons/programming-languages/rust-logo/index.d.ts +2 -0
  70. package/lib/icons/programming-languages/rust-logo/rust-logo.stories.d.ts +8 -0
  71. package/lib/icons/programming-languages/swift-logo/index.d.ts +2 -0
  72. package/lib/icons/programming-languages/swift-logo/swift-logo.stories.d.ts +8 -0
  73. package/lib/icons.js +10 -3
  74. package/lib/{index-BulCzWQI.js → index-DB1gmCsH.js} +29 -31
  75. package/lib/{index-BJxaoI0G.js → index-D_Qn2U89.js} +8 -1
  76. package/lib/{index-Cu2uHOuh.js → index-DnmWFsTQ.js} +1 -0
  77. package/lib/{index-CKUgKtl0.js → index-Do8ODRlA.js} +60 -40
  78. package/lib/{index-CKD2OX24.js → index-eF2JXMVR.js} +11 -7
  79. package/lib/index-ixs381n-.js +466 -0
  80. package/lib/types/common/index.d.ts +3 -3
  81. package/lib/types/connection/index.d.ts +3 -3
  82. package/lib/types.js +9 -9
  83. package/lib/{useSourceSelectionFormData-BY6B70Kf.js → useSourceSelectionFormData-CxdOP9FT.js} +4 -4
  84. package/package.json +10 -10
  85. package/lib/index-DLKEpJJm.js +0 -53
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-CKUgKtl0.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
- import { C as CheckCircledIcon, E as ErrorTriangleIcon, W as WarningTriangleIcon } from './index-DLKEpJJm.js';
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
- import { T as TrashIcon, S as SearchIcon, P as PlusIcon$1, A as ArrowIcon, a as CopyIcon, f as CheckIcon, g as CrossIcon } from './index-BJxaoI0G.js';
16
- import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-BulCzWQI.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-CKD2OX24.js';
15
+ import { T as TrashIcon, S as SearchIcon, P as PlusIcon$1, A as ArrowIcon, a as CopyIcon, f as CheckIcon, g as CrossIcon } from './index-D_Qn2U89.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, connectionStatus }, idx) => (React.createElement(SelectionButton, { key: `platform-${id}`, icon: () => getPlatformIcon(type)({ fill: connectionStatus === NOTIFICATION_TYPE.SUCCESS ? theme.text.success : theme.text.error }), label: `${!!name ? name : getPlatformLabel(type)} (${id})`, isSelected: selected?.id === id, onClick: () => {
902
- if (connectionStatus === 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,
@@ -918,9 +916,9 @@ const ComputePlatformSelect = ({ connections, selected, onSelect, onViewAll }) =
918
916
 
919
917
  const ComputePlatforms = ({ connections, onSelect }) => {
920
918
  const { searchText, platformTypes, statuses } = useFilterStore();
921
- const filtered = connections.filter(({ id, type, connectionStatus }) => (!searchText || id.toLowerCase().includes(searchText)) &&
919
+ const filtered = connections.filter(({ id, type, status }) => (!searchText || id.toLowerCase().includes(searchText)) &&
922
920
  (!platformTypes?.length || platformTypes.find((opt) => opt.id === type)) &&
923
- (!statuses?.length || statuses.find((opt) => opt.id === connectionStatus)));
921
+ (!statuses?.length || statuses.find((opt) => opt.id === status)));
924
922
  return (React.createElement(React.Fragment, null,
925
923
  React.createElement(InteractiveTable, { columns: [
926
924
  { key: 'icon', title: '' },
@@ -928,7 +926,7 @@ const ComputePlatforms = ({ connections, onSelect }) => {
928
926
  { key: 'type', title: 'Type' },
929
927
  { key: 'status', title: 'Status' },
930
928
  { key: 'id', title: 'Unique ID' },
931
- ], rows: filtered.map(({ id, name, type, connectionStatus }) => ({
929
+ ], rows: filtered.map(({ id, name, type, status }) => ({
932
930
  cells: [
933
931
  { columnKey: 'id', value: id },
934
932
  { columnKey: 'type', value: type },
@@ -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: connectionStatus === NOTIFICATION_TYPE.SUCCESS ? 'connection alive' : 'connection lost', status: connectionStatus, 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]) }),
@@ -948,9 +946,9 @@ const ComputePlatforms = ({ connections, onSelect }) => {
948
946
  const ConnectionStatusDropdown = ({ connections, title = '', value, onSelect, onDeselect, ...props }) => {
949
947
  const options = useMemo(() => {
950
948
  const payload = [];
951
- connections?.forEach(({ connectionStatus }) => {
952
- if (!payload.find((opt) => opt.id === connectionStatus)) {
953
- payload.push({ id: connectionStatus, value: connectionStatus });
949
+ connections?.forEach(({ status }) => {
950
+ if (!payload.find((opt) => opt.id === status)) {
951
+ payload.push({ id: status, value: status });
954
952
  }
955
953
  });
956
954
  return payload;
@@ -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,
@@ -13247,7 +13245,7 @@ const mapToNodeData$1 = (entity) => {
13247
13245
  faded: hasDisableds,
13248
13246
  title: getEntityLabel(entity, ENTITY_TYPES.SOURCE, { extended: true }),
13249
13247
  subTitle: `${entity.namespace} • ${entity.kind}`,
13250
- iconSrcs: getContainersIcons(entity.containers),
13248
+ icons: getContainersIcons(entity.containers),
13251
13249
  raw: entity,
13252
13250
  };
13253
13251
  };
@@ -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)),
@@ -15126,17 +15116,18 @@ const Describe$1 = ({ source, fetchDescribeSource }) => {
15126
15116
  return (React.createElement(CenterThis, null,
15127
15117
  React.createElement(FadeLoader, null)));
15128
15118
  }
15129
- return (React.createElement(FlexColumn, { "$gap": 12 }, describe.pods.map(({ podName, nodeName, phase, containers }) => {
15130
- const podHasErrors = phase.status !== NOTIFICATION_TYPE.SUCCESS ||
15131
- !!containers.find(({ instrumentationInstances }) => !!instrumentationInstances.find(({ healthy }) => healthy.status !== NOTIFICATION_TYPE.SUCCESS));
15132
- return (React.createElement(DataCard, { key: `pod-${podName.value}`, title: `Pod: ${podName.value}`, withExtend: true, action: () => (React.createElement(Status, { status: podHasErrors ? NOTIFICATION_TYPE.ERROR : NOTIFICATION_TYPE.SUCCESS, title: podHasErrors ? NOTIFICATION_TYPE.ERROR : NOTIFICATION_TYPE.SUCCESS, withIcon: true, withBorder: true })), data: [
15119
+ return (React.createElement(FlexColumn, { "$gap": 12 }, !describe.pods?.length ? (React.createElement(CenterThis, null,
15120
+ React.createElement(NoDataFound, { subTitle: 'Check if you have any running pods and try again' }))) : (describe.pods.map(({ podName, nodeName, phase, containers }) => {
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;
15124
+ const divider = { type: DATA_CARD_FIELD_TYPES.DIVIDER };
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: [
15133
15126
  {
15134
15127
  type: DATA_CARD_FIELD_TYPES.COPY_TEXT,
15135
15128
  value: `kubectl get pod ${podName.value} -n ${describe?.namespace?.value || source.namespace}`,
15136
15129
  },
15137
- {
15138
- type: DATA_CARD_FIELD_TYPES.DIVIDER,
15139
- },
15130
+ divider,
15140
15131
  {
15141
15132
  type: DATA_CARD_FIELD_TYPES.DESCRIBE_ROW,
15142
15133
  value: JSON.stringify({
@@ -15148,9 +15139,7 @@ const Describe$1 = ({ source, fetchDescribeSource }) => {
15148
15139
  },
15149
15140
  }),
15150
15141
  },
15151
- {
15152
- type: DATA_CARD_FIELD_TYPES.DIVIDER,
15153
- },
15142
+ divider,
15154
15143
  {
15155
15144
  type: DATA_CARD_FIELD_TYPES.DESCRIBE_ROW,
15156
15145
  value: JSON.stringify({
@@ -15162,9 +15151,7 @@ const Describe$1 = ({ source, fetchDescribeSource }) => {
15162
15151
  },
15163
15152
  }),
15164
15153
  },
15165
- {
15166
- type: DATA_CARD_FIELD_TYPES.DIVIDER,
15167
- },
15154
+ divider,
15168
15155
  ...containers.map((container) => {
15169
15156
  return {
15170
15157
  type: DATA_CARD_FIELD_TYPES.POD_CONTAINER,
@@ -15184,7 +15171,7 @@ const Describe$1 = ({ source, fetchDescribeSource }) => {
15184
15171
  };
15185
15172
  }),
15186
15173
  ] }));
15187
- })));
15174
+ }))));
15188
15175
  };
15189
15176
 
15190
15177
  const buildCard = (source) => {
@@ -15580,11 +15567,6 @@ const SourceModal = ({ componentType = 'FAST', namespaces, namespace, namespaces
15580
15567
  React.createElement(SourceSelectionForm, { ref: formRef, componentType: componentType, isModal: true, namespaces: namespaces, namespace: namespace, namespacesLoading: namespacesLoading, selectedNamespace: selectedNamespace, onSelectNamespace: onSelectNamespace })));
15581
15568
  };
15582
15569
 
15583
- const TableWrap = styled.div `
15584
- width: 100%;
15585
- max-height: ${({ $maxHeight }) => $maxHeight || 'unset'};
15586
- overflow-y: auto;
15587
- `;
15588
15570
  const columns = [
15589
15571
  { key: 'checkbox-and-icon', title: '' },
15590
15572
  { key: 'name', title: DISPLAY_TITLES.NAME, sortable: true },
@@ -15597,10 +15579,20 @@ const columns = [
15597
15579
  const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
15598
15580
  const theme = Theme.useTheme();
15599
15581
  const filters = useFilterStore();
15600
- const { sources } = useEntityStore();
15601
15582
  const { isThisPending } = usePendingStore();
15583
+ const { sources, sourcesLoading } = useEntityStore();
15602
15584
  const { setDrawerType, setDrawerEntityId } = useDrawerStore();
15603
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]);
15604
15596
  const [hasSelected, totalSelectedSources] = useMemo(() => {
15605
15597
  let num = 0;
15606
15598
  Object.values(selectedSources).forEach((selectedSources) => {
@@ -15611,7 +15603,7 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
15611
15603
  const onSelectAll = useCallback((bool) => {
15612
15604
  if (bool) {
15613
15605
  const payload = {};
15614
- sources?.forEach((source) => {
15606
+ filtered.forEach((source) => {
15615
15607
  const id = { namespace: source.namespace, name: source.name, kind: source.kind };
15616
15608
  const isPending = isThisPending({ entityType: ENTITY_TYPES.SOURCE, entityId: id });
15617
15609
  if (!isPending) {
@@ -15628,7 +15620,7 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
15628
15620
  else {
15629
15621
  setSelectedSources({});
15630
15622
  }
15631
- }, [sources]);
15623
+ }, [filtered]);
15632
15624
  const onSelectOne = useCallback((source) => {
15633
15625
  const { namespace, name, kind } = source;
15634
15626
  const payload = { ...selectedSources };
@@ -15643,23 +15635,20 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
15643
15635
  }
15644
15636
  setSelectedSources(payload);
15645
15637
  }, [selectedSources]);
15646
- const { isAwaitingInstrumentation, sourcesToCreate, sourcesCreated, sourcesToDelete, sourcesDeleted } = useInstrumentStore();
15647
- const instrumentingPercent = (!!sourcesToCreate ? Math.floor((100 / sourcesToCreate) * sourcesCreated) : !!sourcesToDelete ? Math.floor((100 / sourcesToDelete) * sourcesDeleted) : 0) || 1;
15648
- const filtered = useMemo(() => filterSources(sources, filters), [sources, filters]);
15649
15638
  const rows = useMemo(() => filtered.map((source) => {
15650
15639
  const id = { namespace: source.namespace, name: source.name, kind: source.kind };
15651
15640
  const { hasErrors, hasWarnings, hasDisableds } = getConditionsBooleans(source.conditions || []);
15652
15641
  const isPending = isThisPending({ entityType: ENTITY_TYPES.SOURCE, entityId: id });
15653
15642
  const isChecked = !!selectedSources[id.namespace]?.find((x) => x.namespace === id.namespace && x.name === id.name && x.kind === id.kind);
15654
15643
  return {
15655
- status: hasErrors ? NOTIFICATION_TYPE.ERROR : hasWarnings ? NOTIFICATION_TYPE.WARNING : undefined,
15644
+ status: hasErrors ? STATUS_TYPE.ERROR : hasWarnings ? STATUS_TYPE.WARNING : undefined,
15656
15645
  faded: hasDisableds,
15657
15646
  cells: [
15658
15647
  {
15659
15648
  columnKey: 'checkbox-and-icon',
15660
15649
  component: () => (React.createElement(FlexRow, { "$gap": 16 },
15661
15650
  React.createElement(Checkbox, { disabled: isPending, value: isChecked, onChange: () => onSelectOne(source) }),
15662
- React.createElement(IconGroup, { iconSrcs: getContainersIcons(source.containers) }))),
15651
+ React.createElement(IconGroup, { icons: getContainersIcons(source.containers) }))),
15663
15652
  },
15664
15653
  {
15665
15654
  columnKey: 'name',
@@ -15687,15 +15676,17 @@ const SourceTable = ({ metrics, maxHeight, maxWidth }) => {
15687
15676
  {
15688
15677
  columnKey: 'containers',
15689
15678
  component: () => (React.createElement("div", { style: { lineHeight: 1 } },
15690
- 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 }))),
15691
15680
  },
15692
15681
  ],
15693
15682
  };
15694
15683
  }), [filtered, selectedSources, metrics, onSelectOne]);
15695
- return (React.createElement(FlexColumn, { style: { maxWidth: maxWidth || 'unset', width: '100%' } },
15696
- React.createElement(FlexRow, { "$gap": 16, style: { padding: '16px' } },
15697
- React.createElement(Checkbox, { partiallyChecked: hasSelected && sources?.length !== totalSelectedSources, value: hasSelected && sources?.length === totalSelectedSources, onChange: onSelectAll, disabled: !sources?.length }),
15698
- 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 })),
15699
15690
  React.createElement(TableWrap, { "$maxHeight": maxHeight },
15700
15691
  React.createElement(InteractiveTable, { columns: columns, rows: isAwaitingInstrumentation ? [] : rows, onRowClick: (idx) => {
15701
15692
  setDrawerType(ENTITY_TYPES.SOURCE);
@@ -15763,7 +15754,7 @@ const TokenActions = ({ token, saveToken }) => {
15763
15754
  setIsEdit(false);
15764
15755
  setInputValue(token);
15765
15756
  };
15766
- const SuccessIcon = getStatusIcon(NOTIFICATION_TYPE.SUCCESS, theme);
15757
+ const SuccessIcon = getStatusIcon(STATUS_TYPE.SUCCESS, theme);
15767
15758
  useOnClickOutside(popupRef, onCloseEdit);
15768
15759
  return (React.createElement(FlexRow, { "$gap": 0 },
15769
15760
  React.createElement(IconButton, { size: 32, onClick: () => clickCopy(token) }, isCopied ? React.createElement(SuccessIcon, null) : React.createElement(CopyIcon, null)),
@@ -15842,7 +15833,7 @@ const Describe = ({ fetchDescribeOdigos }) => {
15842
15833
  ]
15843
15834
  : [];
15844
15835
  return (React.createElement(React.Fragment, null,
15845
- React.createElement(DataCard, { title: 'General Information', withExtend: true, data: [
15836
+ React.createElement(DataCard, { title: 'General Information', withExtend: true, initialExtended: true, data: [
15846
15837
  { title: describe?.odigosVersion?.name, value: describe?.odigosVersion?.value },
15847
15838
  { title: describe?.kubernetesVersion?.name, value: describe?.kubernetesVersion?.value },
15848
15839
  { title: describe?.installationMethod?.name, value: describe?.installationMethod?.value },