@odigos/ui-kit 0.0.91 → 0.0.93
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 +15 -0
- package/lib/components.js +3 -3
- package/lib/containers/data-flow/index.d.ts +2 -2
- package/lib/containers/overview-drawer/index.d.ts +1 -0
- package/lib/containers/service-map/index.d.ts +2 -2
- package/lib/containers/trace-view/index.d.ts +1 -2
- package/lib/containers/trace-view/span/index.d.ts +15 -5
- package/lib/containers.js +30 -25
- package/lib/{index-941ea41c.js → index-9a7beddb.js} +1 -1
- package/lib/{index-c616d2a7.js → index-c529b896.js} +1 -1
- package/lib/snippets.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.93](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.92...ui-kit-v0.0.93) (2025-08-25)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **overview-drawer:** add onClose prop to OverviewDrawer and update SourceDrawer to handle close action ([#349](https://github.com/odigos-io/ui-kit/issues/349)) ([ea12dc2](https://github.com/odigos-io/ui-kit/commit/ea12dc23a74779ae45c8efca1aeec32ad08935eb))
|
|
9
|
+
* **tooltip:** comment out cursor style in TooltipContainer ([#351](https://github.com/odigos-io/ui-kit/issues/351)) ([a86cb47](https://github.com/odigos-io/ui-kit/commit/a86cb47ae89966b7300b65953a724b1188d0b01b))
|
|
10
|
+
|
|
11
|
+
## [0.0.92](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.91...ui-kit-v0.0.92) (2025-08-25)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **trace-view:** more visual fixes ([#347](https://github.com/odigos-io/ui-kit/issues/347)) ([defa80c](https://github.com/odigos-io/ui-kit/commit/defa80c9f45a668a365d6b8754ace78444b8ab42))
|
|
17
|
+
|
|
3
18
|
## [0.0.91](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.90...ui-kit-v0.0.91) (2025-08-24)
|
|
4
19
|
|
|
5
20
|
|
package/lib/components.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as Button } from './index-
|
|
2
|
-
export { A as AutocompleteInput, a as Badge, a9 as CenterThis, C as Checkbox, b as Code, c as ConditionDetails, D as DataCard, e as DataCardFieldTypes, d as DataCardFields, f as DataFinger, g as DataTab, h as DescribeRow, i as Divider, j as DocsButton, k as Drawer, m as DrawerFooter, l as DrawerHeader, n as Dropdown, E as ExtendArrow, F as FadeLoader, o as FieldError, p as FieldLabel, a8 as FlexColumn, a7 as FlexRow, H as Header, I as IconButton, q as IconGroup, r as IconTitleBadge, s as IconWrapped, t as IconsNav, u as ImageControlled, v as Input, w as InputList, x as InputTable, y as InteractiveTable, K as KeyValueInputsList, M as Modal, ac as ModalBody, z as MonitorsCheckboxes, G as MonitorsIcons, N as NavigationButtons, J as NoDataFound, L as NotificationNote, ab as Overlay, P as Popup, O as PopupForm, S as ScrollX, Q as SectionTitle, R as Segment, U as SelectionButton, V as SkeletonLoader, W as Status, X as Stepper, Y as TabList, ad as TableContainer, ae as TableTitleWrap, af as TableWrap, Z as Tag, _ as Text, a2 as TextArea, a3 as Toggle, T as ToggleCodeComponent, a4 as Tooltip, a5 as TraceLoader, aa as VerticalScroll, a6 as WarningModal, $ as getLinksFromText, a0 as getStrongsFromText, a1 as renderText } from './index-
|
|
3
|
-
export { C as CancelWarning, D as DeleteWarning } from './index-
|
|
1
|
+
import { B as Button } from './index-c529b896.js';
|
|
2
|
+
export { A as AutocompleteInput, a as Badge, a9 as CenterThis, C as Checkbox, b as Code, c as ConditionDetails, D as DataCard, e as DataCardFieldTypes, d as DataCardFields, f as DataFinger, g as DataTab, h as DescribeRow, i as Divider, j as DocsButton, k as Drawer, m as DrawerFooter, l as DrawerHeader, n as Dropdown, E as ExtendArrow, F as FadeLoader, o as FieldError, p as FieldLabel, a8 as FlexColumn, a7 as FlexRow, H as Header, I as IconButton, q as IconGroup, r as IconTitleBadge, s as IconWrapped, t as IconsNav, u as ImageControlled, v as Input, w as InputList, x as InputTable, y as InteractiveTable, K as KeyValueInputsList, M as Modal, ac as ModalBody, z as MonitorsCheckboxes, G as MonitorsIcons, N as NavigationButtons, J as NoDataFound, L as NotificationNote, ab as Overlay, P as Popup, O as PopupForm, S as ScrollX, Q as SectionTitle, R as Segment, U as SelectionButton, V as SkeletonLoader, W as Status, X as Stepper, Y as TabList, ad as TableContainer, ae as TableTitleWrap, af as TableWrap, Z as Tag, _ as Text, a2 as TextArea, a3 as Toggle, T as ToggleCodeComponent, a4 as Tooltip, a5 as TraceLoader, aa as VerticalScroll, a6 as WarningModal, $ as getLinksFromText, a0 as getStrongsFromText, a1 as renderText } from './index-c529b896.js';
|
|
3
|
+
export { C as CancelWarning, D as DeleteWarning } from './index-9a7beddb.js';
|
|
4
4
|
import React, { createContext, Component, createElement } from 'react';
|
|
5
5
|
import { T as Theme } from './index-40dfa720.js';
|
|
6
6
|
import 'styled-components';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { type Metrics } from '@/types';
|
|
3
3
|
interface DataFlowProps {
|
|
4
|
-
heightToRemove:
|
|
4
|
+
heightToRemove: number;
|
|
5
5
|
metrics: Metrics;
|
|
6
6
|
}
|
|
7
7
|
declare const DataFlow: React.FC<DataFlowProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { type ServiceMapSources } from '@/types';
|
|
3
3
|
interface ServiceMapProps {
|
|
4
|
-
heightToRemove:
|
|
4
|
+
heightToRemove: number;
|
|
5
5
|
serviceMap: ServiceMapSources;
|
|
6
6
|
}
|
|
7
7
|
declare const ServiceMap: React.FC<ServiceMapProps>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
2
|
import type { Trace } from '@/types';
|
|
3
|
-
import { CSSProperties } from 'styled-components';
|
|
4
3
|
interface TraceViewProps {
|
|
5
|
-
heightToRemove:
|
|
4
|
+
heightToRemove: number;
|
|
6
5
|
traces: Trace[];
|
|
7
6
|
}
|
|
8
7
|
declare const TraceView: FC<TraceViewProps>;
|
|
@@ -14,10 +14,20 @@ interface SpanProps {
|
|
|
14
14
|
withToggle?: boolean;
|
|
15
15
|
onToggleOpen?: () => void;
|
|
16
16
|
}
|
|
17
|
+
interface RecursiveSpansProps {
|
|
18
|
+
spans: TraceSpan[];
|
|
19
|
+
logs: TraceLog[];
|
|
20
|
+
depth: number;
|
|
21
|
+
indexInMatrix: number;
|
|
22
|
+
maxDuration: number;
|
|
23
|
+
minStartTime: number;
|
|
24
|
+
maxEndTime: number;
|
|
25
|
+
openSpanIdsState: {
|
|
26
|
+
value: string[];
|
|
27
|
+
set: React.Dispatch<React.SetStateAction<string[]>>;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
17
30
|
export declare const LEFT_MAX_WIDTH = 370;
|
|
18
31
|
declare const Span: FC<SpanProps>;
|
|
19
|
-
declare const
|
|
20
|
-
|
|
21
|
-
set: React.Dispatch<React.SetStateAction<string[]>>;
|
|
22
|
-
}) => React.JSX.Element[];
|
|
23
|
-
export { Span, type SpanProps, renderSpans };
|
|
32
|
+
declare const RecursiveSpans: FC<RecursiveSpansProps>;
|
|
33
|
+
export { Span, type SpanProps, RecursiveSpans };
|
package/lib/containers.js
CHANGED
|
@@ -2,14 +2,14 @@ import React, { useState, useEffect, forwardRef, useRef, useImperativeHandle, us
|
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
import { b as DISPLAY_TITLES, T as Theme, V as usePendingStore, W as useNotificationStore, Q as useDrawerStore, B as BUTTON_TEXTS, X as useEntityStore, A as ACTION_OPTIONS, g as getActionIcon, O as useModalStore, F as FORM_ALERTS, Y as useFilterStore, e as getInstrumentationRuleIcon, Z as useDataStreamStore, _ as useInstrumentStore, d as getEntityId, D as DISPLAY_LANGUAGES, M as MONITORS_OPTIONS, S as STORAGE_KEYS, a as DEFAULT_DATA_STREAM_NAME, c as compareCondition, $ as useSetupStore, f as getProgrammingLanguageIcon, I as INSTRUMENTATION_RULE_OPTIONS, a0 as useSelectedStore, l as ImageErrorIcon, a1 as useDarkMode } from './index-40dfa720.js';
|
|
4
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
|
-
import { e as DataCardFieldTypes, p as FieldLabel, C as Checkbox, o as FieldError, v as Input, x as InputTable, a3 as Toggle, K as KeyValueInputsList, w as InputList, _ as Text, R as Segment, Q as SectionTitle, j as DocsButton, z as MonitorsCheckboxes, a2 as TextArea, k as Drawer, c as ConditionDetails, D as DataCard, a8 as FlexColumn, M as Modal, N as NavigationButtons, ac as ModalBody, L as NotificationNote, A as AutocompleteInput, i as Divider, W as Status, a7 as FlexRow, a4 as Tooltip, s as IconWrapped, G as MonitorsIcons, ad as TableContainer, ae as TableTitleWrap, r as IconTitleBadge, af as TableWrap, y as InteractiveTable, a9 as CenterThis, J as NoDataFound, a5 as TraceLoader, a as Badge, ag as nodeConfig, ah as useNodesState, ai as useEdgesState, aj as Flow, ak as applyNodeChanges, P as Popup, U as SelectionButton, aa as VerticalScroll, n as Dropdown, B as Button, I as IconButton, E as ExtendArrow, al as AddButton, F as FadeLoader, g as DataTab, X as Stepper, d as DataCardFields, Z as Tag, am as MarkerType, t as IconsNav, an as CopyText, h as DescribeRow, ao as PodContainer, ap as SourceContainer, q as IconGroup, O as PopupForm, S as ScrollX } from './index-
|
|
5
|
+
import { e as DataCardFieldTypes, p as FieldLabel, C as Checkbox, o as FieldError, v as Input, x as InputTable, a3 as Toggle, K as KeyValueInputsList, w as InputList, _ as Text, R as Segment, Q as SectionTitle, j as DocsButton, z as MonitorsCheckboxes, a2 as TextArea, k as Drawer, c as ConditionDetails, D as DataCard, a8 as FlexColumn, M as Modal, N as NavigationButtons, ac as ModalBody, L as NotificationNote, A as AutocompleteInput, i as Divider, W as Status, a7 as FlexRow, a4 as Tooltip, s as IconWrapped, G as MonitorsIcons, ad as TableContainer, ae as TableTitleWrap, r as IconTitleBadge, af as TableWrap, y as InteractiveTable, a9 as CenterThis, J as NoDataFound, a5 as TraceLoader, a as Badge, ag as nodeConfig, ah as useNodesState, ai as useEdgesState, aj as Flow, ak as applyNodeChanges, P as Popup, U as SelectionButton, aa as VerticalScroll, n as Dropdown, B as Button, I as IconButton, E as ExtendArrow, al as AddButton, F as FadeLoader, g as DataTab, X as Stepper, d as DataCardFields, Z as Tag, am as MarkerType, t as IconsNav, an as CopyText, h as DescribeRow, ao as PodContainer, ap as SourceContainer, q as IconGroup, O as PopupForm, S as ScrollX } from './index-c529b896.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, E as ErrorTriangleIcon } from './index-eff01b3d.js';
|
|
8
8
|
import { C as CrossCircledIcon, O as OdigosLogoText, F as FilterIcon, D as DataStreamsIcon, A as ArrowIcon, R as RefreshLeftArrowIcon, N as NotificationIcon, U as UserIcon, a as OverviewIcon, S as SlackLogo, K as KeyIcon, T as TerminalIcon, G as GearIcon } from './index-a53852b3.js';
|
|
9
9
|
import { useActionFormData, useSessionStorage, useDataStreamFormData, useDestinationFormData, useClickNotification, useSourceFormData, useSourceSelectionFormData } from './hooks.js';
|
|
10
10
|
import { u as useKeyDown, a as useContainerSize, b as useClickNode, c as usePopup, d as useOnClickOutside, e as useInstrumentationRuleFormData, f as useTransition, g as useTimeAgo, h as useCopy, i as useGenericForm } from './useTransition-2df374a9.js';
|
|
11
11
|
import { E as EditIcon, T as TrashIcon, S as SearchIcon, h as CheckIcon, P as PlusIcon, a as CopyIcon } from './index-1bc2b507.js';
|
|
12
|
-
import { D as DeleteWarning, C as CancelWarning } from './index-
|
|
12
|
+
import { D as DeleteWarning, C as CancelWarning } from './index-9a7beddb.js';
|
|
13
13
|
import { g as getConditionsBooleans, m as mapConditions, b as getStatusIcon, h as splitCamelString, c as capitalizeFirstLetter, i as isStringABoolean, p as parseBooleanFromString } from './index-d92ef50b.js';
|
|
14
14
|
import { f as filterActions, l as getEntityLabel, k as getEntityIcon, u as sleep, e as formatBytes, i as getContainersIcons, o as getValueForRange, j as getDestinationIcon, d as filterSourcesByStream, c as filterSources, b as filterDestinationsByStream, a as filterDestinations, t as mapDestinationFieldsForDisplay, q as getYamlFieldsForDestination, m as getMetricForEntity, p as getWorkloadId, r as hasUnhealthyInstances, h as getContainersInstrumentedCount, s as isOverTime, n as getRecursiveValues, g as formatDuration } from './index-9e75254d.js';
|
|
15
15
|
import { m as mapExportedSignals } from './index-6a6bea6e.js';
|
|
@@ -527,7 +527,7 @@ const ActionForm = ({ isUpdate, action, formData, formErrors, handleFormChange }
|
|
|
527
527
|
React.createElement(TextArea, { title: 'Notes', value: formData['notes'], onChange: ({ target: { value } }) => handleFormChange('notes', value), errorMessage: formErrors['notes'] })));
|
|
528
528
|
};
|
|
529
529
|
|
|
530
|
-
const OverviewDrawer = forwardRef(({ children, width = 640, title, titleTooltip, hideEditTitleFromEdit, icons, iconSrcs, isEdit = false, isFormDirty = false, isLastItem = false, onEdit, onSave, onDelete, onCancel, tabs, headerActionButtons, }, drawerRef) => {
|
|
530
|
+
const OverviewDrawer = forwardRef(({ children, width = 640, title, titleTooltip, hideEditTitleFromEdit, icons, iconSrcs, isEdit = false, isFormDirty = false, isLastItem = false, onClose, onEdit, onSave, onDelete, onCancel, tabs, headerActionButtons, }, drawerRef) => {
|
|
531
531
|
const theme = Theme.useTheme();
|
|
532
532
|
const { isThisPending } = usePendingStore();
|
|
533
533
|
const { addNotification } = useNotificationStore();
|
|
@@ -547,6 +547,7 @@ const OverviewDrawer = forwardRef(({ children, width = 640, title, titleTooltip,
|
|
|
547
547
|
onEdit(false);
|
|
548
548
|
setDrawerType(null);
|
|
549
549
|
setDrawerEntityId(null);
|
|
550
|
+
onClose?.();
|
|
550
551
|
};
|
|
551
552
|
useImperativeHandle(drawerRef, () => ({
|
|
552
553
|
closeDrawer,
|
|
@@ -1614,7 +1615,7 @@ const buildDestinationNodes = ({ loading, entities, positions, unfilteredCount,
|
|
|
1614
1615
|
|
|
1615
1616
|
const Container$h = styled.div `
|
|
1616
1617
|
width: 100%;
|
|
1617
|
-
height: ${({ $heightToRemove }) => `calc(100vh - ${$heightToRemove})`};
|
|
1618
|
+
height: ${({ $heightToRemove }) => `calc(100vh - ${$heightToRemove}px)`};
|
|
1618
1619
|
position: relative;
|
|
1619
1620
|
`;
|
|
1620
1621
|
const DataFlow = ({ heightToRemove, metrics }) => {
|
|
@@ -3821,7 +3822,7 @@ const buildMapNodes = ({ sources, serviceMap, containerHeight, containerWidth })
|
|
|
3821
3822
|
|
|
3822
3823
|
const Container$7 = styled.div `
|
|
3823
3824
|
width: 100%;
|
|
3824
|
-
height: ${({ $heightToRemove }) => `calc(100vh - ${$heightToRemove})`};
|
|
3825
|
+
height: ${({ $heightToRemove }) => `calc(100vh - ${$heightToRemove}px)`};
|
|
3825
3826
|
position: relative;
|
|
3826
3827
|
`;
|
|
3827
3828
|
const userSource = {
|
|
@@ -4267,7 +4268,7 @@ const SourceDrawer = ({ persistSources, updateSource, restartWorkloads, fetchSou
|
|
|
4267
4268
|
const [fetchedSource, setFetchedSource] = useState(null);
|
|
4268
4269
|
// this is used to fetch the source on drawer open, so we ensure we have the latest data
|
|
4269
4270
|
useEffect(() => {
|
|
4270
|
-
if (!isOpen || !drawerEntityId
|
|
4271
|
+
if (!isOpen || !drawerEntityId)
|
|
4271
4272
|
return;
|
|
4272
4273
|
fetchSourceById(drawerEntityId).then((source) => setFetchedSource(source || null));
|
|
4273
4274
|
}, [isOpen, drawerEntityId, fetchedSource]);
|
|
@@ -4275,7 +4276,7 @@ const SourceDrawer = ({ persistSources, updateSource, restartWorkloads, fetchSou
|
|
|
4275
4276
|
const thisItem = useMemo(() => {
|
|
4276
4277
|
if (!isOpen)
|
|
4277
4278
|
return null;
|
|
4278
|
-
const found = fetchedSource ||
|
|
4279
|
+
const found = (!!fetchedSource && JSON.stringify(getWorkloadId(fetchedSource)) === JSON.stringify(getWorkloadId(drawerEntityId)) ? fetchedSource : null) ||
|
|
4279
4280
|
sourcesByStream?.find((x) => x.namespace === drawerEntityId.namespace && x.name === drawerEntityId.name && x.kind === drawerEntityId.kind);
|
|
4280
4281
|
if (!!found)
|
|
4281
4282
|
loadFormWithDrawerItem(found);
|
|
@@ -4341,7 +4342,10 @@ const SourceDrawer = ({ persistSources, updateSource, restartWorkloads, fetchSou
|
|
|
4341
4342
|
setIsFormDirty(false);
|
|
4342
4343
|
setIsEditing(false);
|
|
4343
4344
|
};
|
|
4344
|
-
return (React.createElement(OverviewDrawer, { ref: drawerRef,
|
|
4345
|
+
return (React.createElement(OverviewDrawer, { ref: drawerRef, onClose: () => {
|
|
4346
|
+
setSelectedTab(Tabs.Overview);
|
|
4347
|
+
setFetchedSource(null);
|
|
4348
|
+
}, 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: [
|
|
4345
4349
|
{
|
|
4346
4350
|
'data-id': 'rollout-restart',
|
|
4347
4351
|
variant: 'tertiary',
|
|
@@ -5239,7 +5243,6 @@ const Left = styled(FlexRow) `
|
|
|
5239
5243
|
padding: 12px;
|
|
5240
5244
|
padding-left: ${({ $depth }) => $depth * 12 || 12}px;
|
|
5241
5245
|
width: calc(${LEFT_MAX_WIDTH}px - ${({ $depth }) => $depth * 12}px);
|
|
5242
|
-
overflow: auto;
|
|
5243
5246
|
`;
|
|
5244
5247
|
const Right = styled(FlexRow) `
|
|
5245
5248
|
position: absolute;
|
|
@@ -5266,12 +5269,12 @@ const DurationText = styled(Text) `
|
|
|
5266
5269
|
const Span = ({ span, depth, indexInMatrix, maxDuration, minStartTime, maxEndTime, withErrors, errorTooltip, isOpen, withToggle, onToggleOpen }) => {
|
|
5267
5270
|
const theme = Theme.useTheme();
|
|
5268
5271
|
const textMaxWidth = LEFT_MAX_WIDTH -
|
|
5272
|
+
// 12px times depth is the left padding, 12px is the right padding
|
|
5273
|
+
12 * depth -
|
|
5269
5274
|
// 24px is the width of the toggle icon, 4px is the gap between the toggle icon and the text
|
|
5270
|
-
(
|
|
5275
|
+
(24 - 4) -
|
|
5271
5276
|
// 16px is the width of the error icon, 4px is the gap between the text and the error icon
|
|
5272
|
-
(withErrors ? 16 - 4 : 0)
|
|
5273
|
-
// 12px times depth is the left padding, 12px is the right padding
|
|
5274
|
-
12 * depth;
|
|
5277
|
+
(withErrors ? 16 - 4 : 0);
|
|
5275
5278
|
const withErrorIcon = withErrors && (depth === 1 || span.logs.length > 0);
|
|
5276
5279
|
return (React.createElement(Container$1, { className: 'span-container', "$withErrors": withErrors },
|
|
5277
5280
|
React.createElement(Left, { "$depth": depth, className: 'span-left' },
|
|
@@ -5284,13 +5287,14 @@ const Span = ({ span, depth, indexInMatrix, maxDuration, minStartTime, maxEndTim
|
|
|
5284
5287
|
withErrors &&
|
|
5285
5288
|
(withErrorIcon ? (React.createElement(Tooltip, { ...errorTooltip },
|
|
5286
5289
|
React.createElement(ErrorTriangleIcon, { fill: theme.text.error }))) : (React.createElement("div", { style: { position: 'relative' } },
|
|
5287
|
-
React.createElement("div", { style: { position: 'absolute', top: '-
|
|
5288
|
-
React.createElement(Divider, { type: StatusType.Error, orientation: 'vertical', thickness: 1, length: '
|
|
5290
|
+
React.createElement("div", { style: { position: 'absolute', top: '-24px', right: '8px' } },
|
|
5291
|
+
React.createElement(Divider, { type: StatusType.Error, orientation: 'vertical', thickness: 1, length: '48px', margin: '0', opacity: 0.5 })))))),
|
|
5289
5292
|
React.createElement(Right, { className: 'span-right' },
|
|
5290
5293
|
React.createElement(DurationBar, { "$indexInMatrix": indexInMatrix, "$duration": span.duration, "$maxDuration": maxDuration, "$startTime": span.startTime, "$minStartTime": minStartTime, "$maxEndTime": maxEndTime },
|
|
5291
5294
|
React.createElement(DurationText, null, formatDuration(span.duration))))));
|
|
5292
5295
|
};
|
|
5293
|
-
const
|
|
5296
|
+
const RecursiveSpans = ({ spans, logs, depth, indexInMatrix, maxDuration, minStartTime, maxEndTime, openSpanIdsState }) => {
|
|
5297
|
+
const theme = Theme.useTheme();
|
|
5294
5298
|
return spans.map((span, i) => {
|
|
5295
5299
|
const id = span.spanID;
|
|
5296
5300
|
const isOpen = openSpanIdsState.value.includes(id);
|
|
@@ -5299,7 +5303,7 @@ const renderSpans = (spans, logs, depth, indexInMatrix, maxDuration, minStartTim
|
|
|
5299
5303
|
const withErrors = allLogs.length > 0;
|
|
5300
5304
|
const errorTitle = withErrors ? (allLogs.length > 1 ? `(${allLogs.length}) errors` : allLogs[0].fields.find((field) => field.key === 'exception.message')?.value) : undefined;
|
|
5301
5305
|
const errorMessage = withErrors ? (allLogs.length > 1 ? undefined : allLogs[0].fields.find((field) => field.key === 'exception.stacktrace')?.value) : undefined;
|
|
5302
|
-
return (React.createElement(
|
|
5306
|
+
return (React.createElement("div", { key: `span-${id}`, style: { borderBottom: depth === 1 ? `1px dotted ${theme.colors.border}` : 'none' } },
|
|
5303
5307
|
React.createElement(Span, { span: span, depth: depth, indexInMatrix: indexInMatrix + i + depth, maxDuration: maxDuration, minStartTime: minStartTime, maxEndTime: maxEndTime, withErrors: withErrors, errorTooltip: {
|
|
5304
5308
|
titleIcon: ErrorTriangleIcon,
|
|
5305
5309
|
title: errorTitle,
|
|
@@ -5310,7 +5314,7 @@ const renderSpans = (spans, logs, depth, indexInMatrix, maxDuration, minStartTim
|
|
|
5310
5314
|
return prev.filter((st) => st != id);
|
|
5311
5315
|
return [...prev, id, ...getRecursiveValues(span, 'spans', 'spanID')];
|
|
5312
5316
|
}) }),
|
|
5313
|
-
isOpen && hasChildSpans ?
|
|
5317
|
+
isOpen && hasChildSpans ? (React.createElement(RecursiveSpans, { spans: span.spans || [], logs: allLogs, depth: depth + 1, indexInMatrix: indexInMatrix + i, maxDuration: maxDuration, minStartTime: minStartTime, maxEndTime: maxEndTime, openSpanIdsState: openSpanIdsState })) : null));
|
|
5314
5318
|
});
|
|
5315
5319
|
};
|
|
5316
5320
|
|
|
@@ -5318,7 +5322,7 @@ const Container = styled.div `
|
|
|
5318
5322
|
width: 100%;
|
|
5319
5323
|
`;
|
|
5320
5324
|
const ContainSpans = styled.div `
|
|
5321
|
-
max-height: ${({ $heightToRemove }) => `calc(100vh - ${$heightToRemove} + 2px)`};
|
|
5325
|
+
max-height: ${({ $heightToRemove }) => `calc(100vh - ${$heightToRemove}px + 2px)`};
|
|
5322
5326
|
overflow: auto;
|
|
5323
5327
|
|
|
5324
5328
|
display: flex;
|
|
@@ -5336,8 +5340,9 @@ const ContainTitle = styled.div `
|
|
|
5336
5340
|
const NUM_OF_DURATION_DIVIDERS = 5;
|
|
5337
5341
|
const DurationDivider = styled.div `
|
|
5338
5342
|
width: 1px;
|
|
5339
|
-
height: ${({ $heightToRemove }) => `calc(100vh - ${$heightToRemove} + 2px)`};
|
|
5340
|
-
|
|
5343
|
+
height: ${({ $heightToRemove }) => `calc(100vh - ${$heightToRemove}px + 2px)`};
|
|
5344
|
+
background: ${({ theme }) => `linear-gradient(to bottom, ${theme.colors.border}, transparent)`};
|
|
5345
|
+
|
|
5341
5346
|
position: fixed;
|
|
5342
5347
|
left: calc(${LEFT_MAX_WIDTH + 18}px + ((100% - ${LEFT_MAX_WIDTH}px) / ${NUM_OF_DURATION_DIVIDERS}) * ${({ index }) => index});
|
|
5343
5348
|
z-index: -1;
|
|
@@ -5371,10 +5376,10 @@ const TraceView = ({ heightToRemove, traces }) => {
|
|
|
5371
5376
|
const minStartTime = spans.reduce((min, span) => Math.min(min, span.startTime), Number.MAX_SAFE_INTEGER);
|
|
5372
5377
|
// is equal CSS left: 100%;
|
|
5373
5378
|
const maxEndTime = spans.reduce((max, span) => Math.max(max, span.startTime + span.duration), 0);
|
|
5374
|
-
return
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5379
|
+
return (React.createElement(RecursiveSpans, { key: `recursive-spans-${trace.traceID}`, spans: spans, logs: [], depth: 1, indexInMatrix: i, maxDuration: maxDuration, minStartTime: minStartTime, maxEndTime: maxEndTime, openSpanIdsState: {
|
|
5380
|
+
value: openSpanIds,
|
|
5381
|
+
set: setOpenSpanIds,
|
|
5382
|
+
} }));
|
|
5378
5383
|
}),
|
|
5379
5384
|
new Array(NUM_OF_DURATION_DIVIDERS).fill(null).map((_, i) => (React.createElement(DurationDivider, { key: `${i}-divider`, "$heightToRemove": heightToRemove, index: i },
|
|
5380
5385
|
React.createElement(DurationTitle, null, formatDuration((maxDuration / NUM_OF_DURATION_DIVIDERS) * i))))))) : (React.createElement(CenterThis, { "$height": '50vh' },
|
package/lib/snippets.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as Button, _ as Text, L as NotificationNote } from './index-
|
|
2
|
-
export { al as AddButton, aq as AddNode, ar as BaseNode, an as CopyText, as as EdgedNode, aj as Flow, at as FrameNode, au as HeaderNode, az as LabeledEdge, av as MapItemNode, aw as NoDataNode, ao as PodContainer, ax as ScrollNode, ay as SkeletonNode, ap as SourceContainer, ag as nodeConfig } from './index-
|
|
1
|
+
import { B as Button, _ as Text, L as NotificationNote } from './index-c529b896.js';
|
|
2
|
+
export { al as AddButton, aq as AddNode, ar as BaseNode, an as CopyText, as as EdgedNode, aj as Flow, at as FrameNode, au as HeaderNode, az as LabeledEdge, av as MapItemNode, aw as NoDataNode, ao as PodContainer, ax as ScrollNode, ay as SkeletonNode, ap as SourceContainer, ag as nodeConfig } from './index-c529b896.js';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { T as Theme, B as BUTTON_TEXTS, b as DISPLAY_TITLES } from './index-40dfa720.js';
|
|
5
5
|
import { E as EditIcon } from './index-1bc2b507.js';
|