@odigos/ui-kit 0.0.74 → 0.0.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.76](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.75...ui-kit-v0.0.76) (2025-08-06)
4
+
5
+
6
+ ### Features
7
+
8
+ * limit source-drawer tabs ([#296](https://github.com/odigos-io/ui-kit/issues/296)) ([7526675](https://github.com/odigos-io/ui-kit/commit/7526675c8de778ecc7e98a3881e9cd185b988077))
9
+
10
+ ## [0.0.75](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.74...ui-kit-v0.0.75) (2025-08-06)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * crash when opening libraries in source drawer ([#294](https://github.com/odigos-io/ui-kit/issues/294)) ([f24fc55](https://github.com/odigos-io/ui-kit/commit/f24fc5572fdda0fbdf6e16049ef18f4249c7ca63))
16
+
3
17
  ## [0.0.74](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.73...ui-kit-v0.0.74) (2025-08-06)
4
18
 
5
19
 
package/lib/containers.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useEffect, forwardRef, useRef, useImperativeHandle, useMemo, Fragment, useCallback, Children } from 'react';
2
2
  import styled, { css } from 'styled-components';
3
3
  import { b as DISPLAY_TITLES, T as Theme, U as usePendingStore, V as useNotificationStore, O as useDrawerStore, B as BUTTON_TEXTS, W as useEntityStore, A as ACTION_OPTIONS, g as getActionIcon, z as useModalStore, F as FORM_ALERTS, X as useFilterStore, D as DISPLAY_LANGUAGES, M as MONITORS_OPTIONS, d as getInstrumentationRuleIcon, Y as useDataStreamStore, Z as useInstrumentStore, c as getEntityId, S as STORAGE_KEYS, a as DEFAULT_DATA_STREAM_NAME, _ as useSetupStore, e as getProgrammingLanguageIcon, I as INSTRUMENTATION_RULE_OPTIONS, $ as useSelectedStore, j as ImageErrorIcon, a0 as useDarkMode } from './index-fdf3a268.js';
4
- import { ActionType, ActionKeyTypes, InputTypes, FieldTypes, EntityTypes, StatusType, Crud, OtherStatus, NodeTypes, EdgeTypes, AddNodeTypes, SignalType, HeadersCollectionKeyTypes, CustomInstrumentationsKeyTypes, CodeAttributesKeyTypes, PayloadCollectionKeyTypes, InstrumentationRuleType, MountMethod, AgentEnvVarsInjectionMethod, Profile, InstallationMethod } from './types.js';
4
+ import { ActionType, ActionKeyTypes, InputTypes, FieldTypes, EntityTypes, StatusType, Crud, OtherStatus, NodeTypes, EdgeTypes, AddNodeTypes, SignalType, HeadersCollectionKeyTypes, CustomInstrumentationsKeyTypes, CodeAttributesKeyTypes, PayloadCollectionKeyTypes, InstrumentationRuleType, K8sResourceKind, ProgrammingLanguages, MountMethod, AgentEnvVarsInjectionMethod, Profile, InstallationMethod } from './types.js';
5
5
  import { e as DataCardFieldTypes, p as FieldLabel, C as Checkbox, o as FieldError, v as Input, x as InputTable, K as KeyValueInputsList, w as InputList, _ as Text, R as Segment, Q as SectionTitle, j as DocsButton, z as MonitorsCheckboxes, $ as TextArea, k as Drawer, c as ConditionDetails, D as DataCard, a5 as FlexColumn, M as Modal, N as NavigationButtons, a9 as ModalBody, L as NotificationNote, A as AutocompleteInput, i as Divider, W as Status, a4 as FlexRow, a1 as Tooltip, s as IconWrapped, G as MonitorsIcons, aa as TableContainer, ab as TableTitleWrap, r as IconTitleBadge, ac as TableWrap, y as InteractiveTable, a6 as CenterThis, J as NoDataFound, a2 as TraceLoader, a as Badge, E as ExtendArrow, a7 as VerticalScroll, U as SelectionButton, B as Button, n as Dropdown, ad as nodeConfig, ae as useNodesState, af as useEdgesState, ag as Flow, ah as applyNodeChanges, P as Popup, a0 as Toggle, I as IconButton, ai as AddButton, F as FadeLoader, g as DataTab, X as Stepper, d as DataCardFields, Z as Tag, aj as MarkerType, t as IconsNav, ak as CopyText, h as DescribeRow, al as PodContainer, am as SourceContainer, q as IconGroup, O as PopupForm } from './index-a1b59a38.js';
6
6
  import { i as isEmpty, s as safeJsonParse, d as deepClone } from './index-5e5f7bda.js';
7
7
  import { C as CheckCircledIcon, O as OdigosLogo } from './index-1d5c06a0.js';
@@ -4301,7 +4301,7 @@ const Libraries = ({ source, fetchSourceLibraries }) => {
4301
4301
  },
4302
4302
  }).then(({ data }) => {
4303
4303
  if (data?.instrumentationInstanceComponents) {
4304
- setLibraries(data.instrumentationInstanceComponents.sort((a, b) => a.name.localeCompare(b.name)));
4304
+ setLibraries(deepClone(data.instrumentationInstanceComponents).sort((a, b) => a.name.localeCompare(b.name)));
4305
4305
  }
4306
4306
  else {
4307
4307
  setFailed(true);
@@ -4339,6 +4339,8 @@ var Tabs;
4339
4339
  Tabs["Pods"] = "Pods";
4340
4340
  Tabs["Libraries"] = "Libraries";
4341
4341
  })(Tabs || (Tabs = {}));
4342
+ const SUPPORTED_KINDS_FOR_DESCRIBE = [K8sResourceKind.Deployment, K8sResourceKind.StatefulSet, K8sResourceKind.DaemonSet];
4343
+ const SUPPORTED_LANGUAGES_FOR_LIBRARIES = [ProgrammingLanguages.Python];
4342
4344
  const FormContainer = styled.div `
4343
4345
  width: 100%;
4344
4346
  height: 100%;
@@ -4386,6 +4388,30 @@ const SourceDrawer = ({ persistSources, updateSource, restartWorkloads, fetchSou
4386
4388
  containers: thisItem?.containers || [],
4387
4389
  };
4388
4390
  }, [thisItem]);
4391
+ const tabs = useMemo(() => {
4392
+ const arr = [
4393
+ {
4394
+ label: Tabs.Overview,
4395
+ onClick: () => setSelectedTab(Tabs.Overview),
4396
+ selected: selectedTab === Tabs.Overview,
4397
+ },
4398
+ ];
4399
+ if (SUPPORTED_KINDS_FOR_DESCRIBE.includes(thisItem?.kind)) {
4400
+ arr.push({
4401
+ label: Tabs.Pods,
4402
+ onClick: () => setSelectedTab(Tabs.Pods),
4403
+ selected: selectedTab === Tabs.Pods,
4404
+ });
4405
+ }
4406
+ if (thisItem?.containers?.some(({ language }) => SUPPORTED_LANGUAGES_FOR_LIBRARIES.includes(language))) {
4407
+ arr.push({
4408
+ label: Tabs.Libraries,
4409
+ onClick: () => setSelectedTab(Tabs.Libraries),
4410
+ selected: selectedTab === Tabs.Libraries,
4411
+ });
4412
+ }
4413
+ return arr;
4414
+ }, [selectedTab, thisItem]);
4389
4415
  if (!thisItem)
4390
4416
  return null;
4391
4417
  const handleEdit = (bool) => {
@@ -4412,23 +4438,7 @@ const SourceDrawer = ({ persistSources, updateSource, restartWorkloads, fetchSou
4412
4438
  setIsFormDirty(false);
4413
4439
  setIsEditing(false);
4414
4440
  };
4415
- return (React.createElement(OverviewDrawer, { ref: drawerRef, title: thisItem.otelServiceName || thisItem.name, titleTooltip: 'This attribute is used to identify the name of the service (service.name) that is generating telemetry data.', hideEditTitleFromEdit: true, icons: getContainersIcons(thisItem.containers), isEdit: isEditing, isFormDirty: isFormDirty, onEdit: selectedTab === Tabs.Overview ? handleEdit : undefined, onSave: handleSave, onDelete: selectedTab === Tabs.Overview ? handleDelete : undefined, onCancel: handleCancel, isLastItem: sourcesByStream.length === 1, tabs: [
4416
- {
4417
- label: Tabs.Overview,
4418
- onClick: () => setSelectedTab(Tabs.Overview),
4419
- selected: selectedTab === Tabs.Overview,
4420
- },
4421
- {
4422
- label: Tabs.Pods,
4423
- onClick: () => setSelectedTab(Tabs.Pods),
4424
- selected: selectedTab === Tabs.Pods,
4425
- },
4426
- {
4427
- label: Tabs.Libraries,
4428
- onClick: () => setSelectedTab(Tabs.Libraries),
4429
- selected: selectedTab === Tabs.Libraries,
4430
- },
4431
- ], headerActionButtons: [
4441
+ return (React.createElement(OverviewDrawer, { ref: drawerRef, title: thisItem.otelServiceName || thisItem.name, titleTooltip: 'This attribute is used to identify the name of the service (service.name) that is generating telemetry data.', hideEditTitleFromEdit: true, icons: getContainersIcons(thisItem.containers), isEdit: isEditing, isFormDirty: isFormDirty, onEdit: selectedTab === Tabs.Overview ? handleEdit : undefined, onSave: handleSave, onDelete: selectedTab === Tabs.Overview ? handleDelete : undefined, onCancel: handleCancel, isLastItem: sourcesByStream.length === 1, tabs: tabs, headerActionButtons: [
4432
4442
  {
4433
4443
  'data-id': 'rollout-restart',
4434
4444
  variant: 'tertiary',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odigos/ui-kit",
3
- "version": "0.0.74",
3
+ "version": "0.0.76",
4
4
  "author": "Odigos",
5
5
  "repository": {
6
6
  "type": "git",