@odigos/ui-kit 0.0.39 → 0.0.41
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 +14 -0
- package/lib/components/data-tab/index.d.ts +1 -0
- package/lib/components.js +4 -4
- package/lib/containers.js +87 -51
- package/lib/functions/index.d.ts +1 -0
- package/lib/functions/parse-boolean-from-string/index.d.ts +1 -0
- package/lib/functions.js +2 -2
- package/lib/{index-DnKXoQhy.js → index-B1h5g0Hl.js} +14 -1
- package/lib/{index-Quqq11nF.js → index-BrriZrlp.js} +1 -1
- package/lib/{index-1BlMhN86.js → index-C-84NaCL.js} +25 -10
- package/lib/{index-0AME5hOa.js → index-Cph4pNkb.js} +1 -1
- package/lib/{index-B2poxiOR.js → index-DLH1IvyS.js} +1 -1
- package/lib/snippets.js +3 -3
- package/lib/types/describe/index.d.ts +4 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.41](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.40...ui-kit-v0.0.41) (2025-06-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* add parseBooleanFromString function and integrate into Source Describe ([#176](https://github.com/odigos-io/ui-kit/issues/176)) ([7652a17](https://github.com/odigos-io/ui-kit/commit/7652a17ce8e9947511323bf58f8b5969eb69b9dc))
|
|
9
|
+
|
|
10
|
+
## [0.0.40](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.39...ui-kit-v0.0.40) (2025-06-15)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add fields to Describe Source ([#174](https://github.com/odigos-io/ui-kit/issues/174)) ([ae72399](https://github.com/odigos-io/ui-kit/commit/ae7239975090f9e666c6ea196d1e3b8dbd6ee772))
|
|
16
|
+
|
|
3
17
|
## [0.0.39](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.38...ui-kit-v0.0.39) (2025-06-15)
|
|
4
18
|
|
|
5
19
|
|
package/lib/components.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { B as Button } from './index-
|
|
2
|
-
export { a as AutocompleteInput, b as Badge, a1 as CenterThis, C as Checkbox, c as Code, d as ConditionDetails, D as DataCard, f as DataCardFieldTypes, e as DataCardFields, g as DataTab, h as Divider, i as DocsButton, j as Drawer, l as DrawerFooter, k as DrawerHeader, m as Dropdown, E as ExtendArrow, F as FadeLoader, n as FieldError, o as FieldLabel, a0 as FlexColumn, $ as FlexRow, H as Header, I as IconButton, p as IconGroup, q as IconTitleBadge, r as IconWrapped, s as IconsNav, t as ImageControlled, u as Input, v as InputList, w as InputTable, x as InteractiveTable, K as KeyValueInputsList, M as Modal, a4 as ModalBody, y as MonitorsCheckboxes, z as MonitorsIcons, N as NavigationButtons, G as NoDataFound, J as NotificationNote, a3 as Overlay, S as ScrollX, L as SectionTitle, O as Segment, P as SelectionButton, Q as SkeletonLoader, R as Status, U as Stepper, a5 as TableContainer, a6 as TableTitleWrap, a7 as TableWrap, V as Text, W as TextArea, X as Toggle, T as ToggleCodeComponent, Y as Tooltip, Z as TraceLoader, a2 as VerticalScroll, _ as WarningModal } from './index-
|
|
3
|
-
export { C as CancelWarning, D as DeleteWarning } from './index-
|
|
1
|
+
import { B as Button } from './index-C-84NaCL.js';
|
|
2
|
+
export { a as AutocompleteInput, b as Badge, a1 as CenterThis, C as Checkbox, c as Code, d as ConditionDetails, D as DataCard, f as DataCardFieldTypes, e as DataCardFields, g as DataTab, h as Divider, i as DocsButton, j as Drawer, l as DrawerFooter, k as DrawerHeader, m as Dropdown, E as ExtendArrow, F as FadeLoader, n as FieldError, o as FieldLabel, a0 as FlexColumn, $ as FlexRow, H as Header, I as IconButton, p as IconGroup, q as IconTitleBadge, r as IconWrapped, s as IconsNav, t as ImageControlled, u as Input, v as InputList, w as InputTable, x as InteractiveTable, K as KeyValueInputsList, M as Modal, a4 as ModalBody, y as MonitorsCheckboxes, z as MonitorsIcons, N as NavigationButtons, G as NoDataFound, J as NotificationNote, a3 as Overlay, S as ScrollX, L as SectionTitle, O as Segment, P as SelectionButton, Q as SkeletonLoader, R as Status, U as Stepper, a5 as TableContainer, a6 as TableTitleWrap, a7 as TableWrap, V as Text, W as TextArea, X as Toggle, T as ToggleCodeComponent, Y as Tooltip, Z as TraceLoader, a2 as VerticalScroll, _ as WarningModal } from './index-C-84NaCL.js';
|
|
3
|
+
export { C as CancelWarning, D as DeleteWarning } from './index-DLH1IvyS.js';
|
|
4
4
|
import React, { Component, createElement, createContext } from 'react';
|
|
5
5
|
import { T as Theme } from './index-BdZq2vdJ.js';
|
|
6
6
|
import './types.js';
|
|
7
7
|
import './index-Cau7bWmr.js';
|
|
8
|
-
import './index-
|
|
8
|
+
import './index-B1h5g0Hl.js';
|
|
9
9
|
import 'styled-components';
|
|
10
10
|
import './index-BeVb1H9n.js';
|
|
11
11
|
import './index-BV85P9UP.js';
|
package/lib/containers.js
CHANGED
|
@@ -2,7 +2,7 @@ import React, { useState, useEffect, forwardRef, useRef, useImperativeHandle, us
|
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
import { k as DISPLAY_TITLES, T as Theme, h as usePendingStore, g as useNotificationStore, b as useDrawerStore, B as BUTTON_TEXTS, c as useEntityStore, A as ACTION_OPTIONS, l as getActionIcon, f as useModalStore, F as FORM_ALERTS, d as useFilterStore, M as MONITORS_OPTIONS, t as styleInject, i as useSelectedStore, e as useInstrumentStore, n as getInstrumentationRuleIcon, a as useDataStreamStore, m as getEntityId, S as STORAGE_KEYS, j as useSetupStore, I as INSTRUMENTATION_RULE_OPTIONS, u as useDarkMode } from './index-BdZq2vdJ.js';
|
|
4
4
|
import { ActionType, ActionKeyTypes, InputTypes, FieldTypes, EntityTypes, StatusType, Crud, OtherStatus, NodeTypes, AddNodeTypes, EdgeTypes, SignalType, HeadersCollectionKeyTypes, CodeAttributesKeyTypes, PayloadCollectionKeyTypes, InstrumentationRuleType } from './types.js';
|
|
5
|
-
import { f as DataCardFieldTypes, o as FieldLabel, C as Checkbox, n as FieldError, u as Input, w as InputTable, K as KeyValueInputsList, v as InputList, V as Text, O as Segment, L as SectionTitle, i as DocsButton, y as MonitorsCheckboxes, W as TextArea, j as Drawer, d as ConditionDetails, D as DataCard, a0 as FlexColumn, M as Modal, N as NavigationButtons, a4 as ModalBody, J as NotificationNote, a as AutocompleteInput, h as Divider, R as Status, $ as FlexRow, Y as Tooltip, r as IconWrapped, z as MonitorsIcons, a5 as TableContainer, a6 as TableTitleWrap, q as IconTitleBadge, a7 as TableWrap, x as InteractiveTable, a1 as CenterThis, G as NoDataFound, Z as TraceLoader, b as Badge, E as ExtendArrow, a2 as VerticalScroll, P as SelectionButton, B as Button, m as Dropdown, a8 as getDefaultExportFromCjs, F as FadeLoader, g as DataTab, Q as SkeletonLoader, X as Toggle, A as AddButton$1, U as Stepper, I as IconButton, e as DataCardFields, s as IconsNav, p as IconGroup } from './index-
|
|
5
|
+
import { f as DataCardFieldTypes, o as FieldLabel, C as Checkbox, n as FieldError, u as Input, w as InputTable, K as KeyValueInputsList, v as InputList, V as Text, O as Segment, L as SectionTitle, i as DocsButton, y as MonitorsCheckboxes, W as TextArea, j as Drawer, d as ConditionDetails, D as DataCard, a0 as FlexColumn, M as Modal, N as NavigationButtons, a4 as ModalBody, J as NotificationNote, a as AutocompleteInput, h as Divider, R as Status, $ as FlexRow, Y as Tooltip, r as IconWrapped, z as MonitorsIcons, a5 as TableContainer, a6 as TableTitleWrap, q as IconTitleBadge, a7 as TableWrap, x as InteractiveTable, a1 as CenterThis, G as NoDataFound, Z as TraceLoader, b as Badge, E as ExtendArrow, a2 as VerticalScroll, P as SelectionButton, B as Button, m as Dropdown, a8 as getDefaultExportFromCjs, F as FadeLoader, g as DataTab, Q as SkeletonLoader, X as Toggle, A as AddButton$1, U as Stepper, I as IconButton, e as DataCardFields, s as IconsNav, p as IconGroup } from './index-C-84NaCL.js';
|
|
6
6
|
import { i as isEmpty, s as safeJsonParse } from './index-BV85P9UP.js';
|
|
7
7
|
import { i as CheckCircledIcon, O as OdigosLogo } from './index-BeVb1H9n.js';
|
|
8
8
|
import { C as CrossCircledIcon, O as OdigosLogoText, a as OverviewIcon, F as FilterIcon, D as DataStreamsIcon, R as RetryIcon, N as NotificationIcon, S as SlackLogo, K as KeyIcon, T as TerminalIcon } from './index-zXCdgpRU.js';
|
|
@@ -10,12 +10,12 @@ import { u as useActionFormData, a as useClickNode, e as useSessionStorage, c as
|
|
|
10
10
|
import { d as useKeyDown, e as useOnClickOutside, u as useContainerSize, c as useInstrumentationRuleFormData, g as useTransition, f as useTimeAgo, a as useCopy } from './useTransition-BumZECD3.js';
|
|
11
11
|
import { E as EditIcon } from './index-CDHYBh8C.js';
|
|
12
12
|
import { T as TrashIcon, S as SearchIcon, P as PlusIcon$1, f as CheckIcon, A as ArrowIcon, a as CopyIcon, g as CrossIcon } from './index-Cau7bWmr.js';
|
|
13
|
-
import { D as DeleteWarning, C as CancelWarning } from './index-
|
|
14
|
-
import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-
|
|
15
|
-
import { f as filterActions, i as getConditionsBooleans, n as getEntityLabel, m as getEntityIcon, w as sleep$1, p as getPlatformIcon, q as getPlatformLabel, h as formatBytes, k as getContainersIcons, r as getValueForRange, l as getDestinationIcon, g as filterSourcesByStream, e as filterSources, b as filterDestinationsByStream, a as filterDestinations, v as mapDestinationFieldsForDisplay, c as compareCondition, t as getYamlFieldsForDestination, d as deepClone, o as getMetricForEntity, s as getWorkloadId, j as getContainersInstrumentedCount, u as isOverTime } from './index-
|
|
13
|
+
import { D as DeleteWarning, C as CancelWarning } from './index-DLH1IvyS.js';
|
|
14
|
+
import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-B1h5g0Hl.js';
|
|
15
|
+
import { f as filterActions, i as getConditionsBooleans, n as getEntityLabel, m as getEntityIcon, w as sleep$1, p as getPlatformIcon, q as getPlatformLabel, h as formatBytes, k as getContainersIcons, r as getValueForRange, l as getDestinationIcon, g as filterSourcesByStream, e as filterSources, b as filterDestinationsByStream, a as filterDestinations, v as mapDestinationFieldsForDisplay, c as compareCondition, t as getYamlFieldsForDestination, d as deepClone, o as getMetricForEntity, s as getWorkloadId, j as getContainersInstrumentedCount, u as isOverTime } from './index-BrriZrlp.js';
|
|
16
16
|
import { createPortal } from 'react-dom';
|
|
17
17
|
import { m as mapExportedSignals } from './index-BlZKWuxe.js';
|
|
18
|
-
import { N as NoteBackToSummary, E as EditButton } from './index-
|
|
18
|
+
import { N as NoteBackToSummary, E as EditButton } from './index-Cph4pNkb.js';
|
|
19
19
|
import { D as DESTINATION_CATEGORIES } from './index-Dqief9td.js';
|
|
20
20
|
import { a6 as RulesIcon, a7 as SourcesIcon, a3 as ActionsIcon, a4 as DestinationsIcon } from './index-CBgnxpkW.js';
|
|
21
21
|
|
|
@@ -16034,60 +16034,96 @@ const Describe$1 = ({ source, fetchDescribeSource }) => {
|
|
|
16034
16034
|
React.createElement(FadeLoader, null)));
|
|
16035
16035
|
}
|
|
16036
16036
|
return (React.createElement(FlexColumn, { "$gap": 12 }, !describe.pods?.length ? (React.createElement(CenterThis, null,
|
|
16037
|
-
React.createElement(NoDataFound, { subTitle: 'Check if you have any running pods and try again' }))) : (describe.pods.map(({ podName, nodeName, phase, containers }) => {
|
|
16037
|
+
React.createElement(NoDataFound, { subTitle: 'Check if you have any running pods and try again' }))) : (describe.pods.map(({ podName, nodeName, phase, agentInjected, runningLatestWorkloadRevision, containers }) => {
|
|
16038
16038
|
const podHasErrors = phase.status !== StatusType.Success ||
|
|
16039
16039
|
containers.findIndex(({ instrumentationInstances }) => instrumentationInstances.findIndex(({ healthy }) => healthy.status !== StatusType.Success) !== -1) !== -1;
|
|
16040
16040
|
const podStatus = podHasErrors ? StatusType.Error : StatusType.Success;
|
|
16041
16041
|
const divider = { type: DataCardFieldTypes.Divider };
|
|
16042
|
-
|
|
16043
|
-
|
|
16044
|
-
|
|
16045
|
-
|
|
16042
|
+
const data = [];
|
|
16043
|
+
data.push({
|
|
16044
|
+
type: DataCardFieldTypes.CopyText,
|
|
16045
|
+
value: `kubectl get pod ${podName.value} -n ${describe?.namespace?.value || source.namespace}`,
|
|
16046
|
+
});
|
|
16047
|
+
data.push(divider);
|
|
16048
|
+
data.push({
|
|
16049
|
+
type: DataCardFieldTypes.DescribeRow,
|
|
16050
|
+
value: JSON.stringify({
|
|
16051
|
+
title: nodeName.name,
|
|
16052
|
+
tooltip: nodeName.explain,
|
|
16053
|
+
value: {
|
|
16054
|
+
text: nodeName.value,
|
|
16055
|
+
status: undefined,
|
|
16046
16056
|
},
|
|
16047
|
-
|
|
16048
|
-
|
|
16049
|
-
|
|
16050
|
-
|
|
16051
|
-
|
|
16052
|
-
|
|
16053
|
-
|
|
16054
|
-
|
|
16055
|
-
|
|
16056
|
-
|
|
16057
|
-
|
|
16057
|
+
}),
|
|
16058
|
+
});
|
|
16059
|
+
data.push(divider);
|
|
16060
|
+
data.push({
|
|
16061
|
+
type: DataCardFieldTypes.DescribeRow,
|
|
16062
|
+
value: JSON.stringify({
|
|
16063
|
+
title: phase.name,
|
|
16064
|
+
tooltip: phase.explain,
|
|
16065
|
+
value: {
|
|
16066
|
+
text: phase.value,
|
|
16067
|
+
status: phase.status,
|
|
16058
16068
|
},
|
|
16059
|
-
|
|
16060
|
-
|
|
16061
|
-
|
|
16062
|
-
|
|
16063
|
-
|
|
16064
|
-
|
|
16065
|
-
|
|
16066
|
-
|
|
16067
|
-
|
|
16068
|
-
|
|
16069
|
-
|
|
16069
|
+
}),
|
|
16070
|
+
});
|
|
16071
|
+
data.push(divider);
|
|
16072
|
+
data.push({
|
|
16073
|
+
type: DataCardFieldTypes.DescribeRow,
|
|
16074
|
+
value: JSON.stringify({
|
|
16075
|
+
title: agentInjected.name,
|
|
16076
|
+
tooltip: agentInjected.explain,
|
|
16077
|
+
value: {
|
|
16078
|
+
text: agentInjected.value,
|
|
16079
|
+
status: agentInjected.status,
|
|
16070
16080
|
},
|
|
16071
|
-
|
|
16072
|
-
|
|
16073
|
-
|
|
16074
|
-
|
|
16075
|
-
|
|
16076
|
-
|
|
16077
|
-
|
|
16078
|
-
|
|
16079
|
-
|
|
16080
|
-
|
|
16081
|
-
|
|
16082
|
-
|
|
16083
|
-
|
|
16084
|
-
message: instance.message?.value || '',
|
|
16085
|
-
identifyingAttributes: instance.identifyingAttributes || [],
|
|
16086
|
-
})),
|
|
16087
|
-
}),
|
|
16088
|
-
};
|
|
16081
|
+
}),
|
|
16082
|
+
});
|
|
16083
|
+
data.push(divider);
|
|
16084
|
+
if (runningLatestWorkloadRevision?.name) {
|
|
16085
|
+
data.push({
|
|
16086
|
+
type: DataCardFieldTypes.DescribeRow,
|
|
16087
|
+
value: JSON.stringify({
|
|
16088
|
+
title: runningLatestWorkloadRevision?.name || '',
|
|
16089
|
+
tooltip: runningLatestWorkloadRevision?.explain || '',
|
|
16090
|
+
value: {
|
|
16091
|
+
text: runningLatestWorkloadRevision?.value || '',
|
|
16092
|
+
status: runningLatestWorkloadRevision?.status || '',
|
|
16093
|
+
},
|
|
16089
16094
|
}),
|
|
16090
|
-
|
|
16095
|
+
});
|
|
16096
|
+
data.push(divider);
|
|
16097
|
+
}
|
|
16098
|
+
data.push(...containers.map((container) => {
|
|
16099
|
+
return {
|
|
16100
|
+
type: DataCardFieldTypes.PodContainer,
|
|
16101
|
+
value: JSON.stringify({
|
|
16102
|
+
containerName: container.containerName.value,
|
|
16103
|
+
actualDevice: {
|
|
16104
|
+
title: container.actualDevices.name,
|
|
16105
|
+
subTitle: container.actualDevices.value,
|
|
16106
|
+
tooltip: container.actualDevices.explain,
|
|
16107
|
+
},
|
|
16108
|
+
started: {
|
|
16109
|
+
title: container.started?.name || '',
|
|
16110
|
+
subTitle: container.started?.value || '',
|
|
16111
|
+
tooltip: container.started?.explain || '',
|
|
16112
|
+
},
|
|
16113
|
+
ready: {
|
|
16114
|
+
title: container.ready?.name || '',
|
|
16115
|
+
subTitle: container.ready?.value || '',
|
|
16116
|
+
tooltip: container.ready?.explain || '',
|
|
16117
|
+
},
|
|
16118
|
+
processes: container.instrumentationInstances.map((instance) => ({
|
|
16119
|
+
health: instance.healthy.status,
|
|
16120
|
+
message: instance.message?.value || '',
|
|
16121
|
+
identifyingAttributes: instance.identifyingAttributes || [],
|
|
16122
|
+
})),
|
|
16123
|
+
}),
|
|
16124
|
+
};
|
|
16125
|
+
}));
|
|
16126
|
+
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: data });
|
|
16091
16127
|
}))));
|
|
16092
16128
|
};
|
|
16093
16129
|
|
package/lib/functions/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export * from './map-conditions';
|
|
|
37
37
|
export * from './map-destination-fields-for-display';
|
|
38
38
|
export * from './map-exported-signals';
|
|
39
39
|
export * from './numbers-only';
|
|
40
|
+
export * from './parse-boolean-from-string';
|
|
40
41
|
export * from './parse-json-string-to-pretty-string';
|
|
41
42
|
export * from './remove-empty-values-from-object';
|
|
42
43
|
export * from './safe-json-parse';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const parseBooleanFromString: (value: boolean | string | number) => boolean;
|
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, n as numbersOnly, p as parseJsonStringToPrettyString, r as removeEmptyValuesFromObject, s as safeJsonStringify,
|
|
2
|
-
export { c as compareCondition, d as deepClone, f as filterActions, a as filterDestinations, b as filterDestinationsByStream, e as filterSources, g as filterSourcesByStream, h as formatBytes, i as getConditionsBooleans, k as getContainersIcons, j as getContainersInstrumentedCount, l as getDestinationIcon, m as getEntityIcon, n as getEntityLabel, o as getMetricForEntity, p as getPlatformIcon, q as getPlatformLabel, r as getValueForRange, s as getWorkloadId, t as getYamlFieldsForDestination, u as isOverTime, v as mapDestinationFieldsForDisplay, w as sleep } from './index-
|
|
1
|
+
export { c as capitalizeFirstLetter, f as flattenObjectKeys, g as getMonitorIcon, a as getProgrammingLanguageIcon, b as getStatusIcon, m as mapConditions, n as numbersOnly, p as parseBooleanFromString, d as parseJsonStringToPrettyString, r as removeEmptyValuesFromObject, s as safeJsonStringify, e as splitCamelString } from './index-B1h5g0Hl.js';
|
|
2
|
+
export { c as compareCondition, d as deepClone, f as filterActions, a as filterDestinations, b as filterDestinationsByStream, e as filterSources, g as filterSourcesByStream, h as formatBytes, i as getConditionsBooleans, k as getContainersIcons, j as getContainersInstrumentedCount, l as getDestinationIcon, m as getEntityIcon, n as getEntityLabel, o as getMetricForEntity, p as getPlatformIcon, q as getPlatformLabel, r as getValueForRange, s as getWorkloadId, t as getYamlFieldsForDestination, u as isOverTime, v as mapDestinationFieldsForDisplay, w as sleep } from './index-BrriZrlp.js';
|
|
3
3
|
export { l as getActionIcon, m as getEntityId, n as getInstrumentationRuleIcon } from './index-BdZq2vdJ.js';
|
|
4
4
|
export { g as getIdFromSseTarget, i as isLegalK8sLabel, m as mapExportedSignals } from './index-BlZKWuxe.js';
|
|
5
5
|
import { EntityTypes } from './types.js';
|
|
@@ -142,6 +142,19 @@ const numbersOnly = (value) => {
|
|
|
142
142
|
return cleaned;
|
|
143
143
|
};
|
|
144
144
|
|
|
145
|
+
const parseBooleanFromString = (value) => {
|
|
146
|
+
const normalizedValue = String(value).trim().toLowerCase();
|
|
147
|
+
if (normalizedValue === 'true' || normalizedValue === '1') {
|
|
148
|
+
return true;
|
|
149
|
+
}
|
|
150
|
+
else if (normalizedValue === 'false' || normalizedValue === '0') {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
throw new Error(`Cannot parse boolean from string: "${value}"`);
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
|
|
145
158
|
const parseJsonStringToPrettyString = (value) => {
|
|
146
159
|
let str = '';
|
|
147
160
|
try {
|
|
@@ -204,4 +217,4 @@ const safeJsonStringify = (obj, indent = 2) => {
|
|
|
204
217
|
return JSON.stringify(obj || {}, null, indent);
|
|
205
218
|
};
|
|
206
219
|
|
|
207
|
-
export { getProgrammingLanguageIcon as a, getStatusIcon as b, capitalizeFirstLetter as c,
|
|
220
|
+
export { getProgrammingLanguageIcon as a, getStatusIcon as b, capitalizeFirstLetter as c, parseJsonStringToPrettyString as d, splitCamelString as e, flattenObjectKeys as f, getMonitorIcon as g, mapConditions as m, numbersOnly as n, parseBooleanFromString as p, removeEmptyValuesFromObject as r, safeJsonStringify as s };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StatusType, OtherStatus, DestinationTypes, EntityTypes, PlatformType } from './types.js';
|
|
2
2
|
import { D as DEFAULT_DATA_STREAM_NAME, K as K8sLogo } from './index-BdZq2vdJ.js';
|
|
3
|
-
import { a as getProgrammingLanguageIcon } from './index-
|
|
3
|
+
import { a as getProgrammingLanguageIcon } from './index-B1h5g0Hl.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'styled-components';
|
|
6
6
|
import { e as AwsXrayLogo, a2 as VictoriaMetricsLogo, a1 as UptraceLogo, a0 as TraceloopLogo, $ as TingyunLogo, _ as TempoLogo, Z as TelemetryHubLogo, Y as SumoLogicLogo, X as SplunkLogo, W as SignozLogo, U as SeqLogo, d as AwsS3Logo, T as QuickwitLogo, G as GigapipeLogo, S as QrynLogo, R as PrometheusLogo, F as OpenTelemetryLogo, Q as OracleLogo, P as OpsVerseLogo, z as OpenObserveLogo, y as OneUptimeLogo, O as ObserveLogo, N as NewRelicLogo, M as MiddlewareLogo, x as LumigoLogo, w as LokiLogo, v as LogzioLogo, u as LightstepLogo, L as Last9Logo, K as KloudmateLogo, J as JaegerLogo, I as InstanaLogo, t as HyperDxLogo, H as HoneycombLogo, s as GroundcoverLogo, r as GreptimeLogo, q as GrafanaLogo, p as GoogleCloudPlatformLogo, o as ElasticSearchLogo, E as ElasticApmLogo, n as DynatraceLogo, m as DatadogLogo, D as Dash0Logo, l as CoralogixLogo, c as AwsCloudwatchLogo, k as ClickhouseLogo, j as ChronosphereLogo, i as ChecklyLogo, C as CauselyLogo, h as BonreeLogo, B as BetterStackLogo, g as BlobStorageLogo, f as AxiomLogo, b as AppDynamicsLogo, a as AlibabaCloudLogo, A as AlaudaLogo, a6 as RulesIcon, a3 as ActionsIcon, a4 as DestinationsIcon, a7 as SourcesIcon, a5 as NamespacesIcon, V as VmLogo } from './index-CBgnxpkW.js';
|
|
@@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef, forwardRef, createElement, useCallb
|
|
|
2
2
|
import { T as Theme, o as ImageErrorIcon, M as MONITORS_OPTIONS, B as BUTTON_TEXTS } from './index-BdZq2vdJ.js';
|
|
3
3
|
import { StatusType, OtherStatus, SortDirection, ProgrammingLanguages, IntrumentationStatus, InputTypes, FieldTypes } from './types.js';
|
|
4
4
|
import { M as MinusIcon, f as CheckIcon, L as ListIcon, C as CodeIcon, E as ExtendArrowIcon, c as SortArrowsIcon, a as CopyIcon, b as NotebookIcon, X as XIcon, d as EyeClosedIcon, e as EyeOpenIcon, N as NoDataIcon, g as CrossIcon, S as SearchIcon, P as PlusIcon, T as TrashIcon, A as ArrowIcon } from './index-Cau7bWmr.js';
|
|
5
|
-
import { b as getStatusIcon, r as removeEmptyValuesFromObject, s as safeJsonStringify, f as flattenObjectKeys, m as mapConditions, c as capitalizeFirstLetter, g as getMonitorIcon,
|
|
5
|
+
import { b as getStatusIcon, r as removeEmptyValuesFromObject, s as safeJsonStringify, f as flattenObjectKeys, m as mapConditions, c as capitalizeFirstLetter, g as getMonitorIcon, d as parseJsonStringToPrettyString, a as getProgrammingLanguageIcon, e as splitCamelString, p as parseBooleanFromString, n as numbersOnly } from './index-B1h5g0Hl.js';
|
|
6
6
|
import styled, { css } from 'styled-components';
|
|
7
7
|
import { s as safeJsonParse, i as isEmpty } from './index-BV85P9UP.js';
|
|
8
8
|
import { u as useContainerSize, a as useCopy, g as useTransition, d as useKeyDown, e as useOnClickOutside } from './useTransition-BumZECD3.js';
|
|
@@ -3988,7 +3988,7 @@ const Row = styled.div `
|
|
|
3988
3988
|
align-items: center;
|
|
3989
3989
|
gap: 12px;
|
|
3990
3990
|
`;
|
|
3991
|
-
const TextNoWrap = styled(Text) `
|
|
3991
|
+
const TextNoWrap$1 = styled(Text) `
|
|
3992
3992
|
white-space: nowrap;
|
|
3993
3993
|
`;
|
|
3994
3994
|
const IconWrap$1 = styled(FlexColumn) `
|
|
@@ -4038,9 +4038,9 @@ const ConditionDetails = ({ conditions: c, headerLabelError = 'Something Failed'
|
|
|
4038
4038
|
React.createElement(Icon, null)),
|
|
4039
4039
|
React.createElement(FlexRow, { "$gap": 12, style: { width: '100%', justifyContent: 'space-between' } },
|
|
4040
4040
|
React.createElement(Text, { color: color, size: 12 },
|
|
4041
|
-
React.createElement(TextNoWrap, { color: boldColor, size: 12, weight: 700 }, type),
|
|
4041
|
+
React.createElement(TextNoWrap$1, { color: boldColor, size: 12, weight: 700 }, type),
|
|
4042
4042
|
message || reason),
|
|
4043
|
-
React.createElement(TextNoWrap, { color: color, size: 12 }, new Date(lastTransitionTime).toLocaleString()))));
|
|
4043
|
+
React.createElement(TextNoWrap$1, { color: color, size: 12 }, new Date(lastTransitionTime).toLocaleString()))));
|
|
4044
4044
|
})))));
|
|
4045
4045
|
};
|
|
4046
4046
|
|
|
@@ -4072,6 +4072,9 @@ const TextWrapper$1 = styled.div `
|
|
|
4072
4072
|
display: flex;
|
|
4073
4073
|
align-items: center;
|
|
4074
4074
|
`;
|
|
4075
|
+
const TextNoWrap = styled(Text) `
|
|
4076
|
+
text-wrap: nowrap;
|
|
4077
|
+
`;
|
|
4075
4078
|
const Status = ({ title, subtitle, size = 12, family = 'secondary', status = StatusType.Default, withIcon, withBorder, withBackground }) => {
|
|
4076
4079
|
const theme = Theme.useTheme();
|
|
4077
4080
|
const statusType = status === OtherStatus.Loading ? StatusType.Info : status;
|
|
@@ -4080,9 +4083,9 @@ const Status = ({ title, subtitle, size = 12, family = 'secondary', status = Sta
|
|
|
4080
4083
|
withIcon && (React.createElement(IconWrapper$4, null,
|
|
4081
4084
|
React.createElement(StatusIcon, null))),
|
|
4082
4085
|
(!!title || !!subtitle) && (React.createElement(TextWrapper$1, null,
|
|
4083
|
-
!!title && (React.createElement(
|
|
4086
|
+
!!title && (React.createElement(TextNoWrap, { size: size, family: family, color: theme.text[statusType] }, title)),
|
|
4084
4087
|
!!title && !!subtitle && React.createElement(Divider, { orientation: 'vertical', length: `${size - 2}px`, type: statusType }),
|
|
4085
|
-
!!subtitle && (React.createElement(
|
|
4088
|
+
!!subtitle && (React.createElement(TextNoWrap, { size: size - 2, family: family, color: theme.text[`${statusType}_secondary`] }, subtitle))))));
|
|
4086
4089
|
};
|
|
4087
4090
|
|
|
4088
4091
|
const LimitedText = styled(Text) `
|
|
@@ -4303,7 +4306,7 @@ const SubText = styled(Text) `
|
|
|
4303
4306
|
font-size: 10px;
|
|
4304
4307
|
color: ${({ theme }) => theme.text.grey};
|
|
4305
4308
|
`;
|
|
4306
|
-
const DataTab = ({ title, subTitle, hoverText, onClick, renderActions, iconProps: { icon, icons, iconSrc, iconSrcs } = {}, visualProps: { status, faded, bgColor, bgColorHover, monitors, monitorsWithLabels } = {}, checkboxProps: { withCheckbox, isCheckboxDisabled, isChecked, onCheckboxChange } = {}, extendableProps: { withExtend, isExtended, renderExtended } = {}, ...props }) => {
|
|
4309
|
+
const DataTab = ({ title, subTitle, hoverText, onClick, renderActions, iconProps: { icon, icons, iconSrc, iconSrcs } = {}, visualProps: { status, faded, bgColor, bgColorHover, monitors, monitorsWithLabels, componentsUnderTitles } = {}, checkboxProps: { withCheckbox, isCheckboxDisabled, isChecked, onCheckboxChange } = {}, extendableProps: { withExtend, isExtended, renderExtended } = {}, ...props }) => {
|
|
4307
4310
|
const theme = Theme.useTheme();
|
|
4308
4311
|
const [extend, setExtend] = useState(isExtended || false);
|
|
4309
4312
|
const [textMaxWidth, setTextMaxWidth] = useState(0);
|
|
@@ -4332,7 +4335,8 @@ const DataTab = ({ title, subTitle, hoverText, onClick, renderActions, iconProps
|
|
|
4332
4335
|
subTitle && React.createElement(ScrollX, { maxWidth: textMaxWidth - (monitorsRef.current?.clientWidth || 0), text: subTitle, textSize: 10, textColor: theme.text.grey }),
|
|
4333
4336
|
monitors && monitors.length > 0 && (React.createElement(FlexRow, { "$gap": 4, ref: monitorsRef },
|
|
4334
4337
|
subTitle && React.createElement(SubText, null, "\u2022"),
|
|
4335
|
-
React.createElement(MonitorsIcons, { monitors: monitors, withLabels: monitorsWithLabels, size: 10 }))))
|
|
4338
|
+
React.createElement(MonitorsIcons, { monitors: monitors, withLabels: monitorsWithLabels, size: 10 })))),
|
|
4339
|
+
componentsUnderTitles && (React.createElement(FlexRow, { "$gap": 4 }, componentsUnderTitles?.map((component, i) => (React.createElement(Fragment, { key: `componentsUnderTitles-${i}` }, component)))))),
|
|
4336
4340
|
React.createElement(ActionsWrapper, { ref: actionsRef },
|
|
4337
4341
|
!!hoverText && (React.createElement(ControlledVisibility, null,
|
|
4338
4342
|
React.createElement(HoverText, { size: 14, family: 'secondary' }, hoverText))),
|
|
@@ -4638,12 +4642,23 @@ const RenderValue = ({ type, value }) => {
|
|
|
4638
4642
|
React.createElement("pre", null, str)));
|
|
4639
4643
|
}
|
|
4640
4644
|
case DataCardFieldTypes.PodContainer: {
|
|
4641
|
-
const { containerName, actualDevice, processes } = safeJsonParse(value, {
|
|
4645
|
+
const { containerName, actualDevice, started, ready, processes } = safeJsonParse(value, {
|
|
4642
4646
|
containerName: '',
|
|
4643
4647
|
actualDevice: { title: '', subTitle: '', tooltip: '' },
|
|
4648
|
+
started: { title: '', subTitle: '', tooltip: '' },
|
|
4649
|
+
ready: { title: '', subTitle: '', tooltip: '' },
|
|
4644
4650
|
processes: [{ health: StatusType.Info, message: '', identifyingAttributes: [] }],
|
|
4645
4651
|
});
|
|
4646
|
-
|
|
4652
|
+
const componentsUnderTitles = [];
|
|
4653
|
+
if (started?.title) {
|
|
4654
|
+
componentsUnderTitles.push(React.createElement(Status, { status: parseBooleanFromString(started.subTitle) ? StatusType.Success : StatusType.Error, title: started.title, withIcon: true, withBorder: true, size: 8 }));
|
|
4655
|
+
}
|
|
4656
|
+
if (ready?.title) {
|
|
4657
|
+
componentsUnderTitles.push(React.createElement(Status, { status: parseBooleanFromString(ready.subTitle) ? StatusType.Success : StatusType.Error, title: ready.title, withIcon: true, withBorder: true, size: 8 }));
|
|
4658
|
+
}
|
|
4659
|
+
return (React.createElement(DataTab, { title: containerName, subTitle: processes.length ? `${processes.length} Instrumented Processes` : undefined, visualProps: {
|
|
4660
|
+
componentsUnderTitles: componentsUnderTitles.length ? componentsUnderTitles : undefined,
|
|
4661
|
+
}, renderActions: () => {
|
|
4647
4662
|
return React.createElement(Status, { status: StatusType.Info, title: 'Instrumentation Device', subtitle: !actualDevice.subTitle || actualDevice.subTitle === '[]' ? 'none' : actualDevice.subTitle, withBorder: true });
|
|
4648
4663
|
}, extendableProps: {
|
|
4649
4664
|
isExtended: !!processes.length,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { T as Theme, B as BUTTON_TEXTS, k as DISPLAY_TITLES } from './index-BdZq2vdJ.js';
|
|
3
3
|
import { E as EditIcon } from './index-CDHYBh8C.js';
|
|
4
|
-
import { B as Button, V as Text, J as NotificationNote } from './index-
|
|
4
|
+
import { B as Button, V as Text, J as NotificationNote } from './index-C-84NaCL.js';
|
|
5
5
|
import { StatusType } from './types.js';
|
|
6
6
|
import 'styled-components';
|
|
7
7
|
import { I as InfoIcon } from './index-BeVb1H9n.js';
|
package/lib/snippets.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { A as AddButton } from './index-
|
|
2
|
-
export { E as EditButton, N as NoteBackToSummary } from './index-
|
|
1
|
+
export { A as AddButton } from './index-C-84NaCL.js';
|
|
2
|
+
export { E as EditButton, N as NoteBackToSummary } from './index-Cph4pNkb.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './index-BdZq2vdJ.js';
|
|
5
5
|
import './types.js';
|
|
6
6
|
import 'styled-components';
|
|
7
7
|
import './index-Cau7bWmr.js';
|
|
8
|
-
import './index-
|
|
8
|
+
import './index-B1h5g0Hl.js';
|
|
9
9
|
import './index-BeVb1H9n.js';
|
|
10
10
|
import './index-BV85P9UP.js';
|
|
11
11
|
import './useTransition-BumZECD3.js';
|
|
@@ -76,12 +76,16 @@ interface InstrumentationInstanceAnalyze {
|
|
|
76
76
|
interface PodContainerAnalyze {
|
|
77
77
|
containerName: EntityProperty;
|
|
78
78
|
actualDevices: EntityProperty;
|
|
79
|
+
started?: EntityProperty | null;
|
|
80
|
+
ready?: EntityProperty | null;
|
|
79
81
|
instrumentationInstances: InstrumentationInstanceAnalyze[];
|
|
80
82
|
}
|
|
81
83
|
interface PodAnalyze {
|
|
82
84
|
podName: EntityProperty;
|
|
83
85
|
nodeName: EntityProperty;
|
|
84
86
|
phase: EntityProperty;
|
|
87
|
+
agentInjected: EntityProperty;
|
|
88
|
+
runningLatestWorkloadRevision?: EntityProperty | null;
|
|
85
89
|
containers: PodContainerAnalyze[];
|
|
86
90
|
}
|
|
87
91
|
export interface DescribeSource {
|