@odigos/ui-kit 0.0.47 → 0.0.49
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/eslint.config.mjs +16 -2
- package/lib/components/data-card/data-card-fields/index.d.ts +2 -1
- package/lib/components/error-boundary/error-boundary.stories.d.ts +3 -1
- package/lib/components/error-boundary/index.d.ts +1 -2
- package/lib/components/field-error/field-error.stories.d.ts +3 -1
- package/lib/components/field-error/index.d.ts +1 -2
- package/lib/components/key-value-input-list/index.d.ts +2 -0
- package/lib/components/key-value-input-list/key-value-input-list.stories.d.ts +2 -0
- package/lib/components/segment/index.d.ts +8 -7
- package/lib/components/styled.d.ts +5 -1
- package/lib/components.js +9 -9
- package/lib/constants.js +1 -1
- package/lib/containers/await-pipeline/await-pipeline.stories.d.ts +1 -1
- package/lib/containers/await-pipeline/index.d.ts +1 -2
- package/lib/containers/data-flow-actions-menu/add-entity/index.d.ts +2 -3
- package/lib/containers/data-flow-actions-menu/filters/index.d.ts +2 -3
- package/lib/containers/data-flow-actions-menu/search/index.d.ts +2 -3
- package/lib/containers/data-stream-modal/data-stream-modal.stories.d.ts +2 -2
- package/lib/containers/data-stream-modal/index.d.ts +1 -2
- package/lib/containers/index.d.ts +1 -0
- package/lib/containers/instrumentation-rule-form/custom-fields/custom-instrumentation.d.ts +5 -0
- package/lib/containers/notification-manager/index.d.ts +1 -2
- package/lib/containers/notification-manager/notification-manager.stories.d.ts +1 -1
- package/lib/containers/service-map/helpers/build-edges.d.ts +10 -0
- package/lib/containers/service-map/helpers/build-map-nodes.d.ts +11 -0
- package/lib/containers/service-map/index.d.ts +8 -0
- package/lib/containers/service-map/service-map.stories.d.ts +9 -0
- package/lib/containers/slack-invite/index.d.ts +1 -2
- package/lib/containers/slack-invite/slack-invite.stories.d.ts +1 -1
- package/lib/containers/toast-list/index.d.ts +1 -2
- package/lib/containers/toast-list/toast-list.stories.d.ts +1 -1
- package/lib/containers/toggle-dark-mode/index.d.ts +1 -2
- package/lib/containers/toggle-dark-mode/toggle-dark-mode.stories.d.ts +1 -1
- package/lib/containers.js +439 -12485
- package/lib/functions/clean-object-empty-strings-values/index.d.ts +2 -1
- package/lib/functions/compare-condition/index.d.ts +1 -1
- package/lib/functions/flatten-object-keys/index.d.ts +2 -1
- package/lib/functions/get-entity-id/index.d.ts +2 -2
- package/lib/functions/get-entity-label/index.d.ts +2 -2
- package/lib/functions/index.d.ts +1 -0
- package/lib/functions/map-destination-fields-for-display/index.d.ts +1 -1
- package/lib/functions/remove-empty-values-from-object/index.d.ts +2 -1
- package/lib/functions/safe-json-parse/index.d.ts +2 -1
- package/lib/functions/safe-json-stringify/index.d.ts +2 -1
- package/lib/functions/stringify-non-string-values/index.d.ts +2 -1
- package/lib/functions.js +35 -9
- package/lib/hooks/useGenericForm.d.ts +2 -1
- package/lib/hooks/useInstrumentationRuleFormData.d.ts +3 -6
- package/lib/hooks/useSessionStorage.d.ts +2 -2
- package/lib/hooks/useSourceFormData.d.ts +1 -4
- package/lib/hooks.js +4 -4
- package/lib/icons/common/index.d.ts +1 -0
- package/lib/icons/common/user-icon/index.d.ts +2 -0
- package/lib/icons/common/user-icon/user-icon.stories.d.ts +8 -0
- package/lib/icons/instrumentation-rules/custom-instrumentation-icon/custom-instrumentation-icon.stories.d.ts +7 -0
- package/lib/icons/instrumentation-rules/custom-instrumentation-icon/index.d.ts +2 -0
- package/lib/icons/instrumentation-rules/index.d.ts +1 -0
- package/lib/icons.js +6 -6
- package/lib/{index-BV85P9UP.js → index-BnvrwbRB.js} +4 -0
- package/lib/{index-BRGQ84pJ.js → index-Bw7RE2T2.js} +21 -4
- package/lib/{index-B1IScVBT.js → index-C1V7D2ey.js} +12728 -363
- package/lib/{index-fEP_guwb.js → index-CeBxw8J4.js} +4 -4
- package/lib/{index-C4aVlsHh.js → index-CeDmxXUE.js} +10 -2
- package/lib/{index-BUCure0Q.js → index-CkTdd3MS.js} +1 -1
- package/lib/{index-C8vqcUbP.js → index-DOU0EdZP.js} +2 -2
- package/lib/{index-BJpPcCBm.js → index-DsEoqSQn.js} +3 -3
- package/lib/{index-CeHgnkLY.js → index-DxR7e2Cq.js} +1 -1
- package/lib/{index-DypjdLnz.js → index-ZTzxu5fz.js} +1 -1
- package/lib/{index-CpT8LSxY.js → index-w9lkC6fb.js} +10 -8
- package/lib/mock-data/index.d.ts +1 -0
- package/lib/mock-data/service-map/index.d.ts +2 -0
- package/lib/snippets/index.d.ts +1 -0
- package/lib/{containers/data-flow → snippets/react-flow}/edges/labeled-edge.d.ts +4 -4
- package/lib/{containers/data-flow → snippets/react-flow}/flow.d.ts +2 -0
- package/lib/snippets/react-flow/index.d.ts +13 -0
- package/lib/{containers/data-flow → snippets/react-flow}/nodes/add-node.d.ts +4 -4
- package/lib/{containers/data-flow → snippets/react-flow}/nodes/base-node.d.ts +4 -4
- package/lib/{containers/data-flow → snippets/react-flow}/nodes/edged-node.d.ts +4 -4
- package/lib/{containers/data-flow → snippets/react-flow}/nodes/frame-node.d.ts +4 -4
- package/lib/{containers/data-flow → snippets/react-flow}/nodes/header-node.d.ts +4 -4
- package/lib/snippets/react-flow/nodes/map-item-node.d.ts +12 -0
- package/lib/snippets/react-flow/nodes/no-data-node.d.ts +9 -0
- package/lib/{containers/data-flow → snippets/react-flow}/nodes/scroll-node.d.ts +4 -4
- package/lib/snippets/react-flow/nodes/skeleton-node.d.ts +8 -0
- package/lib/snippets.js +8 -8
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/common/index.d.ts +1 -0
- package/lib/types/data-flow/index.d.ts +3 -1
- package/lib/types/describe/index.d.ts +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/instrumentation-rules/index.d.ts +12 -0
- package/lib/types/service-map/index.d.ts +10 -0
- package/lib/types.js +10 -2
- package/lib/{useSourceSelectionFormData-CMXqoHZs.js → useSourceSelectionFormData-C5VMfWEf.js} +13 -48
- package/lib/{useTransition-DsrDiKOV.js → useTransition-mupXsbop.js} +56 -10
- package/package.json +3 -2
- package/lib/containers/data-flow/nodes/skeleton-node.d.ts +0 -8
- /package/lib/{containers/data-flow/helpers/get-main-container-language.d.ts → functions/get-main-container-language/index.d.ts} +0 -0
- /package/lib/{containers/data-flow/helpers → snippets/react-flow}/node-config.d.ts +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { T as Theme, B as BUTTON_TEXTS, l as DISPLAY_TITLES } from './index-
|
|
3
|
-
import { E as EditIcon } from './index-
|
|
4
|
-
import {
|
|
2
|
+
import { T as Theme, B as BUTTON_TEXTS, l as DISPLAY_TITLES } from './index-Bw7RE2T2.js';
|
|
3
|
+
import { E as EditIcon } from './index-CkTdd3MS.js';
|
|
4
|
+
import { d as Button, a5 as Text, Z as NotificationNote } from './index-C1V7D2ey.js';
|
|
5
5
|
import { StatusType } from './types.js';
|
|
6
6
|
import 'styled-components';
|
|
7
|
-
import { I as InfoIcon } from './index-
|
|
7
|
+
import { I as InfoIcon } from './index-DxR7e2Cq.js';
|
|
8
8
|
|
|
9
9
|
const EditButton = ({ label, onClick, variant = 'tertiary', ...props }) => {
|
|
10
10
|
const theme = Theme.useTheme();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { T as Theme } from './index-
|
|
2
|
+
import { T as Theme } from './index-Bw7RE2T2.js';
|
|
3
3
|
|
|
4
4
|
const OdigosLogoText = ({ size = 16, fill: f, rotate = 0, onClick }) => {
|
|
5
5
|
const theme = Theme.useTheme();
|
|
@@ -56,6 +56,14 @@ const TerminalIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
|
|
|
56
56
|
React.createElement("path", { stroke: fill, strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M7 12L9 10L7 8M12 12H15M3 11C3 8.19974 3 6.79961 3.54497 5.73005C4.02433 4.78924 4.78924 4.02433 5.73005 3.54497C6.79961 3 8.19974 3 11 3H13C15.8003 3 17.2004 3 18.27 3.54497C19.2108 4.02433 19.9757 4.78924 20.455 5.73005C21 6.79961 21 8.19974 21 11V13C21 15.8003 21 17.2004 20.455 18.27C19.9757 19.2108 19.2108 19.9757 18.27 20.455C17.2004 21 15.8003 21 13 21H11C8.19974 21 6.79961 21 5.73005 20.455C4.78924 19.9757 4.02433 19.2108 3.54497 18.27C3 17.2004 3 15.8003 3 13V11Z' })));
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
+
const UserIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
|
|
60
|
+
const theme = Theme.useTheme();
|
|
61
|
+
const fill = f || theme.text.secondary;
|
|
62
|
+
return (React.createElement("svg", { width: size, height: size, viewBox: '0 0 24 24', xmlns: 'http://www.w3.org/2000/svg', fill: 'none', style: { transform: `rotate(${rotate}deg)` }, onClick: onClick },
|
|
63
|
+
React.createElement("path", { stroke: fill, strokeWidth: '1', strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M16 7C16 9.20914 14.2091 11 12 11C9.79086 11 8 9.20914 8 7C8 4.79086 9.79086 3 12 3C14.2091 3 16 4.79086 16 7Z' }),
|
|
64
|
+
React.createElement("path", { stroke: fill, strokeWidth: '1', strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M16 15H8C5.79086 15 4 16.7909 4 19C4 20.1046 4.89543 21 6 21H18C19.1046 21 20 20.1046 20 19C20 16.7909 18.2091 15 16 15Z' })));
|
|
65
|
+
};
|
|
66
|
+
|
|
59
67
|
const OverviewIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
|
|
60
68
|
const theme = Theme.useTheme();
|
|
61
69
|
const fill = f || theme.text.secondary;
|
|
@@ -89,4 +97,4 @@ const CrossCircledIcon = ({ size = 16, fill: f, rotate = 0, onClick }) => {
|
|
|
89
97
|
React.createElement("path", { stroke: fill, strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M6.75049 10.0005L8.75049 8.00049M8.75049 8.00049L10.7505 6.00049M8.75049 8.00049L6.75049 6.00049M8.75049 8.00049L10.7505 10.0005M8.75039 14.1004C5.38145 14.1004 2.65039 11.3693 2.65039 8.00039C2.65039 4.63145 5.38145 1.90039 8.75039 1.90039C12.1193 1.90039 14.8504 4.63145 14.8504 8.00039C14.8504 11.3693 12.1193 14.1004 8.75039 14.1004Z' })));
|
|
90
98
|
};
|
|
91
99
|
|
|
92
|
-
export { CrossCircledIcon as C, DataStreamsIcon as D, FilterIcon as F, KeyIcon as K, NotificationIcon as N, OdigosLogoText as O, RetryIcon as R, SlackLogo as S, TerminalIcon as T, OverviewIcon as a };
|
|
100
|
+
export { CrossCircledIcon as C, DataStreamsIcon as D, FilterIcon as F, KeyIcon as K, NotificationIcon as N, OdigosLogoText as O, RetryIcon as R, SlackLogo as S, TerminalIcon as T, UserIcon as U, OverviewIcon as a };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { aa as WarningModal } from './index-C1V7D2ey.js';
|
|
3
3
|
import { StatusType, EntityTypes } from './types.js';
|
|
4
|
-
import './index-
|
|
4
|
+
import './index-Bw7RE2T2.js';
|
|
5
5
|
import 'styled-components';
|
|
6
6
|
|
|
7
7
|
const CancelWarning = ({ isOpen, noOverlay, name, onApprove, onDeny }) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { StatusType, OtherStatus, SignalType } from './types.js';
|
|
2
2
|
import 'react';
|
|
3
|
-
import './index-
|
|
3
|
+
import './index-Bw7RE2T2.js';
|
|
4
4
|
import 'styled-components';
|
|
5
|
-
import { T as TracesIcon, M as MetricsIcon, L as LogsIcon, O as OdigosLogo, I as InfoIcon, W as WarningTriangleIcon, E as ErrorTriangleIcon, C as CheckCircledIcon } from './index-
|
|
5
|
+
import { T as TracesIcon, M as MetricsIcon, L as LogsIcon, O as OdigosLogo, I as InfoIcon, W as WarningTriangleIcon, E as ErrorTriangleIcon, C as CheckCircledIcon } from './index-DxR7e2Cq.js';
|
|
6
6
|
|
|
7
7
|
const capitalizeFirstLetter = (string) => {
|
|
8
8
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
@@ -179,7 +179,7 @@ const parseJsonStringToPrettyString = (value) => {
|
|
|
179
179
|
str = value;
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
catch (
|
|
182
|
+
catch (_) {
|
|
183
183
|
str = value;
|
|
184
184
|
}
|
|
185
185
|
return str;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { StatusType, DestinationTypes, EntityTypes, PlatformType } from './types.js';
|
|
2
|
-
import { k as DEFAULT_DATA_STREAM_NAME, p as getProgrammingLanguageIcon, v as KafkaLogo, K as K8sLogo } from './index-
|
|
2
|
+
import { k as DEFAULT_DATA_STREAM_NAME, p as getProgrammingLanguageIcon, v as KafkaLogo, K as K8sLogo } from './index-Bw7RE2T2.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'styled-components';
|
|
5
|
-
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-
|
|
6
|
-
import { O as OdigosLogo } from './index-
|
|
7
|
-
import { s as safeJsonParse } from './index-
|
|
5
|
+
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-ZTzxu5fz.js';
|
|
6
|
+
import { O as OdigosLogo } from './index-DxR7e2Cq.js';
|
|
7
|
+
import { s as safeJsonParse } from './index-BnvrwbRB.js';
|
|
8
8
|
|
|
9
9
|
const compareCondition = (renderCondition, fields) => {
|
|
10
10
|
if (!renderCondition || !renderCondition.length)
|
|
@@ -25,19 +25,20 @@ const compareCondition = (renderCondition, fields) => {
|
|
|
25
25
|
case '!=':
|
|
26
26
|
return field.value !== val;
|
|
27
27
|
case '>':
|
|
28
|
-
return field.value > val;
|
|
28
|
+
return Number(field.value) > Number(val);
|
|
29
29
|
case '<':
|
|
30
|
-
return field.value < val;
|
|
30
|
+
return Number(field.value) < Number(val);
|
|
31
31
|
case '>=':
|
|
32
|
-
return field.value >= val;
|
|
32
|
+
return Number(field.value) >= Number(val);
|
|
33
33
|
case '<=':
|
|
34
|
-
return field.value <= val;
|
|
34
|
+
return Number(field.value) <= Number(val);
|
|
35
35
|
default:
|
|
36
36
|
console.warn(`Invalid condition ${cond}, condition will be skipped`);
|
|
37
37
|
return true;
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
41
42
|
const deepClone = (item) => {
|
|
42
43
|
return JSON.parse(JSON.stringify(item));
|
|
43
44
|
};
|
|
@@ -257,6 +258,7 @@ const getPlatformLabel = (type) => {
|
|
|
257
258
|
return LABELS[type];
|
|
258
259
|
};
|
|
259
260
|
|
|
261
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
260
262
|
const getValueForRange = (current, matrix) => {
|
|
261
263
|
// CURRENT: represents the current value (such as window width)
|
|
262
264
|
// MATRIX: represents the ranges (index[0] == min, index[1] == max, index[2] == value to get)
|
package/lib/mock-data/index.d.ts
CHANGED
package/lib/snippets/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
2
|
import { EdgeTypes } from '@/types';
|
|
3
3
|
import { type EdgeProps, type Edge } from '@xyflow/react';
|
|
4
|
-
|
|
4
|
+
type LabeledEdgeProps = EdgeProps<Edge<{
|
|
5
5
|
label: string;
|
|
6
6
|
isMultiTarget?: boolean;
|
|
7
7
|
isError?: boolean;
|
|
8
|
-
}, EdgeTypes.Labeled
|
|
9
|
-
|
|
10
|
-
export
|
|
8
|
+
}, EdgeTypes.Labeled>>;
|
|
9
|
+
declare const LabeledEdge: FC<LabeledEdgeProps>;
|
|
10
|
+
export { LabeledEdge, type LabeledEdgeProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import nodeConfig from './node-config';
|
|
2
|
+
export { nodeConfig };
|
|
3
|
+
export * from './flow';
|
|
4
|
+
export * from './nodes/add-node';
|
|
5
|
+
export * from './nodes/base-node';
|
|
6
|
+
export * from './nodes/edged-node';
|
|
7
|
+
export * from './nodes/frame-node';
|
|
8
|
+
export * from './nodes/header-node';
|
|
9
|
+
export * from './nodes/map-item-node';
|
|
10
|
+
export * from './nodes/no-data-node';
|
|
11
|
+
export * from './nodes/scroll-node';
|
|
12
|
+
export * from './nodes/skeleton-node';
|
|
13
|
+
export * from './edges/labeled-edge';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AddNodeTypes, NodeTypes } from '@/types';
|
|
3
3
|
import { type Node, type NodeProps } from '@xyflow/react';
|
|
4
|
-
|
|
4
|
+
type AddNodeProps = NodeProps<Node<{
|
|
5
5
|
nodeWidth: number;
|
|
6
6
|
type: AddNodeTypes;
|
|
7
7
|
title: string;
|
|
8
8
|
subTitle: string;
|
|
9
|
-
}, NodeTypes.Add
|
|
10
|
-
|
|
11
|
-
export
|
|
9
|
+
}, NodeTypes.Add>>;
|
|
10
|
+
declare const AddNode: React.FC<AddNodeProps>;
|
|
11
|
+
export { AddNode, type AddNodeProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type Node, type NodeProps } from '@xyflow/react';
|
|
3
3
|
import { type Action, type Destination, EntityTypes, type InstrumentationRule, NodeTypes, StatusType, SignalType, type Source, type SVG, type WorkloadId } from '@/types';
|
|
4
|
-
|
|
4
|
+
type BaseNodeProps = NodeProps<Node<{
|
|
5
5
|
nodeWidth: number;
|
|
6
6
|
id: string | WorkloadId;
|
|
7
7
|
type: EntityTypes;
|
|
@@ -16,6 +16,6 @@ export interface BaseNodeProps extends NodeProps<Node<{
|
|
|
16
16
|
monitors?: SignalType[];
|
|
17
17
|
isActive?: boolean;
|
|
18
18
|
raw: Source | Destination | Action | InstrumentationRule;
|
|
19
|
-
}, NodeTypes.Base
|
|
20
|
-
|
|
21
|
-
export
|
|
19
|
+
}, NodeTypes.Base>>;
|
|
20
|
+
declare const BaseNode: React.FC<BaseNodeProps>;
|
|
21
|
+
export { BaseNode, type BaseNodeProps };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { NodeTypes } from '@/types';
|
|
3
3
|
import { type Node, type NodeProps } from '@xyflow/react';
|
|
4
|
-
|
|
4
|
+
type EdgedNodeProps = NodeProps<Node<{
|
|
5
5
|
nodeWidth: number;
|
|
6
6
|
nodeHeight: number;
|
|
7
|
-
}, NodeTypes.Edged
|
|
8
|
-
|
|
9
|
-
export
|
|
7
|
+
}, NodeTypes.Edged>>;
|
|
8
|
+
declare const EdgedNode: React.FC<EdgedNodeProps>;
|
|
9
|
+
export { EdgedNode, type EdgedNodeProps };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { NodeTypes } from '@/types';
|
|
3
3
|
import { type Node, type NodeProps } from '@xyflow/react';
|
|
4
|
-
|
|
4
|
+
type FrameNodeProps = NodeProps<Node<{
|
|
5
5
|
nodeWidth: number;
|
|
6
6
|
nodeHeight: number;
|
|
7
|
-
}, NodeTypes.Frame
|
|
8
|
-
|
|
9
|
-
export
|
|
7
|
+
}, NodeTypes.Frame>>;
|
|
8
|
+
declare const FrameNode: React.FC<FrameNodeProps>;
|
|
9
|
+
export { FrameNode, type FrameNodeProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Node, NodeProps } from '@xyflow/react';
|
|
3
3
|
import { NodeTypes, type Source, type SVG } from '@/types';
|
|
4
|
-
|
|
4
|
+
type HeaderNodeProps = NodeProps<Node<{
|
|
5
5
|
nodeWidth: number;
|
|
6
6
|
icon: SVG;
|
|
7
7
|
title: string;
|
|
@@ -9,6 +9,6 @@ export interface HeaderNodeProps extends NodeProps<Node<{
|
|
|
9
9
|
badgeTooltip?: string;
|
|
10
10
|
isFetching?: boolean;
|
|
11
11
|
sources?: Source[];
|
|
12
|
-
}, NodeTypes.Header
|
|
13
|
-
|
|
14
|
-
export
|
|
12
|
+
}, NodeTypes.Header>>;
|
|
13
|
+
declare const HeaderNode: React.FC<HeaderNodeProps>;
|
|
14
|
+
export { HeaderNode, type HeaderNodeProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type Node, type NodeProps } from '@xyflow/react';
|
|
3
|
+
import { NodeTypes, type ServiceMapFromSource, StatusType, type SVG } from '@/types';
|
|
4
|
+
type MapItemNodeProps = NodeProps<Node<{
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
icons: SVG[];
|
|
8
|
+
status?: StatusType;
|
|
9
|
+
serviceMapEntry?: ServiceMapFromSource;
|
|
10
|
+
}, NodeTypes.Base>>;
|
|
11
|
+
declare const MapItemNode: React.FC<MapItemNodeProps>;
|
|
12
|
+
export { MapItemNode, type MapItemNodeProps };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NodeTypes } from '@/types';
|
|
3
|
+
import { type Node, type NodeProps } from '@xyflow/react';
|
|
4
|
+
type NoDataNodeProps = NodeProps<Node<{
|
|
5
|
+
title?: string;
|
|
6
|
+
subTitle?: string;
|
|
7
|
+
}, NodeTypes.Base>>;
|
|
8
|
+
declare const NoDataNode: React.FC<NoDataNodeProps>;
|
|
9
|
+
export { NoDataNode, type NoDataNodeProps };
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { NodeTypes } from '@/types';
|
|
3
3
|
import type { Node, NodeProps } from '@xyflow/react';
|
|
4
4
|
import { BaseNodeProps } from './base-node';
|
|
5
|
-
|
|
5
|
+
type ScrollNodeProps = NodeProps<Node<{
|
|
6
6
|
nodeHeight: number;
|
|
7
7
|
items: BaseNodeProps[];
|
|
8
8
|
onScroll: (params: {
|
|
@@ -10,6 +10,6 @@ export interface ScrollNodeProps extends NodeProps<Node<{
|
|
|
10
10
|
scrollHeight: number;
|
|
11
11
|
scrollTop: number;
|
|
12
12
|
}) => void;
|
|
13
|
-
}, NodeTypes.Scroll
|
|
14
|
-
|
|
15
|
-
export
|
|
13
|
+
}, NodeTypes.Scroll>>;
|
|
14
|
+
declare const ScrollNode: React.FC<ScrollNodeProps>;
|
|
15
|
+
export { ScrollNode, type ScrollNodeProps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NodeTypes } from '@/types';
|
|
3
|
+
import { type Node, type NodeProps } from '@xyflow/react';
|
|
4
|
+
type SkeletonNodeProps = NodeProps<Node<{
|
|
5
|
+
nodeWidth: number;
|
|
6
|
+
}, NodeTypes.Skeleton>>;
|
|
7
|
+
declare const SkeletonNode: React.FC<SkeletonNodeProps>;
|
|
8
|
+
export { SkeletonNode, type SkeletonNodeProps };
|
package/lib/snippets.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { A as AddButton } from './index-
|
|
2
|
-
export { E as EditButton, N as NoteBackToSummary } from './index-
|
|
1
|
+
export { A as AddButton, a as AddNode, B as BaseNode, E as EdgedNode, F as Flow, b as FrameNode, H as HeaderNode, L as LabeledEdge, M as MapItemNode, N as NoDataNode, S as ScrollNode, c as SkeletonNode, n as nodeConfig } from './index-C1V7D2ey.js';
|
|
2
|
+
export { E as EditButton, N as NoteBackToSummary } from './index-CeBxw8J4.js';
|
|
3
3
|
import 'react';
|
|
4
|
-
import './index-
|
|
4
|
+
import './index-Bw7RE2T2.js';
|
|
5
5
|
import './types.js';
|
|
6
6
|
import 'styled-components';
|
|
7
|
-
import './index-
|
|
8
|
-
import './index-
|
|
9
|
-
import './index-
|
|
10
|
-
import './index-
|
|
11
|
-
import './useTransition-
|
|
7
|
+
import './index-CkTdd3MS.js';
|
|
8
|
+
import './index-DsEoqSQn.js';
|
|
9
|
+
import './index-DxR7e2Cq.js';
|
|
10
|
+
import './index-BnvrwbRB.js';
|
|
11
|
+
import './useTransition-mupXsbop.js';
|
|
12
12
|
import 'react-dom';
|
package/lib/store.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { u as useDarkMode, a as useDataStreamStore, b as useDrawerStore, c as useEntityStore, d as useFilterStore, e as useInstrumentStore, f as useModalStore, g as useNotificationStore, h as usePendingStore, i as useSelectedStore, j as useSetupStore } from './index-
|
|
1
|
+
export { u as useDarkMode, a as useDataStreamStore, b as useDrawerStore, c as useEntityStore, d as useFilterStore, e as useInstrumentStore, f as useModalStore, g as useNotificationStore, h as usePendingStore, i as useSelectedStore, j as useSetupStore } from './index-Bw7RE2T2.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import './types.js';
|
|
4
4
|
import 'styled-components';
|
package/lib/theme.js
CHANGED
package/lib/types/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export declare enum InstrumentationRuleType {
|
|
|
4
4
|
CodeAttributes = "CodeAttributes",
|
|
5
5
|
HeadersCollection = "HeadersCollection",
|
|
6
6
|
PayloadCollection = "PayloadCollection",
|
|
7
|
+
CustomInstrumentation = "CustomInstrumentation",
|
|
7
8
|
UnknownType = "UnknownType"
|
|
8
9
|
}
|
|
9
10
|
export interface InstrumentationRule {
|
|
@@ -22,6 +23,7 @@ export interface InstrumentationRule {
|
|
|
22
23
|
codeAttributes?: CodeAttributes | null;
|
|
23
24
|
headersCollection?: HeadersCollection | null;
|
|
24
25
|
payloadCollection?: PayloadCollection | null;
|
|
26
|
+
customInstrumentations?: CustomInstrumentations | null;
|
|
25
27
|
}
|
|
26
28
|
export declare enum CodeAttributesKeyTypes {
|
|
27
29
|
Column = "column",
|
|
@@ -45,6 +47,16 @@ export declare enum HeadersCollectionKeyTypes {
|
|
|
45
47
|
export interface HeadersCollection {
|
|
46
48
|
[HeadersCollectionKeyTypes.HeaderKeys]?: string[] | null;
|
|
47
49
|
}
|
|
50
|
+
export declare enum CustomInstrumentationsKeyTypes {
|
|
51
|
+
Probes = "probes"
|
|
52
|
+
}
|
|
53
|
+
export interface CustomInstrumentationProbe {
|
|
54
|
+
className: string;
|
|
55
|
+
methodName: string;
|
|
56
|
+
}
|
|
57
|
+
export interface CustomInstrumentations {
|
|
58
|
+
[CustomInstrumentationsKeyTypes.Probes]?: CustomInstrumentationProbe[] | null;
|
|
59
|
+
}
|
|
48
60
|
interface HttpPayloadCollection {
|
|
49
61
|
mimeTypes?: string[] | null;
|
|
50
62
|
maxPayloadLength?: number | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface ServiceMapFromSource {
|
|
2
|
+
serviceName: string;
|
|
3
|
+
services: ServiceMapToSource[];
|
|
4
|
+
}
|
|
5
|
+
export interface ServiceMapToSource {
|
|
6
|
+
serviceName: string;
|
|
7
|
+
requests: number;
|
|
8
|
+
dateTime: string;
|
|
9
|
+
}
|
|
10
|
+
export type ServiceMapSources = ServiceMapFromSource[];
|
package/lib/types.js
CHANGED
|
@@ -187,6 +187,8 @@ var NodeTypes;
|
|
|
187
187
|
NodeTypes["Frame"] = "frame";
|
|
188
188
|
NodeTypes["Scroll"] = "scroll";
|
|
189
189
|
NodeTypes["Skeleton"] = "skeleton";
|
|
190
|
+
NodeTypes["MapItem"] = "map-item";
|
|
191
|
+
NodeTypes["NoData"] = "no-data";
|
|
190
192
|
})(NodeTypes || (NodeTypes = {}));
|
|
191
193
|
var EdgeTypes;
|
|
192
194
|
(function (EdgeTypes) {
|
|
@@ -273,6 +275,7 @@ var InstrumentationRuleType;
|
|
|
273
275
|
InstrumentationRuleType["CodeAttributes"] = "CodeAttributes";
|
|
274
276
|
InstrumentationRuleType["HeadersCollection"] = "HeadersCollection";
|
|
275
277
|
InstrumentationRuleType["PayloadCollection"] = "PayloadCollection";
|
|
278
|
+
InstrumentationRuleType["CustomInstrumentation"] = "CustomInstrumentation";
|
|
276
279
|
InstrumentationRuleType["UnknownType"] = "UnknownType";
|
|
277
280
|
})(InstrumentationRuleType || (InstrumentationRuleType = {}));
|
|
278
281
|
// Code Attributes for Instrumentation Rules
|
|
@@ -285,11 +288,16 @@ var CodeAttributesKeyTypes;
|
|
|
285
288
|
CodeAttributesKeyTypes["Namespace"] = "namespace";
|
|
286
289
|
CodeAttributesKeyTypes["StackTrace"] = "stacktrace";
|
|
287
290
|
})(CodeAttributesKeyTypes || (CodeAttributesKeyTypes = {}));
|
|
288
|
-
//
|
|
291
|
+
// Headers Collection for Instrumentation Rules
|
|
289
292
|
var HeadersCollectionKeyTypes;
|
|
290
293
|
(function (HeadersCollectionKeyTypes) {
|
|
291
294
|
HeadersCollectionKeyTypes["HeaderKeys"] = "headerKeys";
|
|
292
295
|
})(HeadersCollectionKeyTypes || (HeadersCollectionKeyTypes = {}));
|
|
296
|
+
// Custom Instrumentations for Instrumentation Rules
|
|
297
|
+
var CustomInstrumentationsKeyTypes;
|
|
298
|
+
(function (CustomInstrumentationsKeyTypes) {
|
|
299
|
+
CustomInstrumentationsKeyTypes["Probes"] = "probes";
|
|
300
|
+
})(CustomInstrumentationsKeyTypes || (CustomInstrumentationsKeyTypes = {}));
|
|
293
301
|
var PayloadCollectionKeyTypes;
|
|
294
302
|
(function (PayloadCollectionKeyTypes) {
|
|
295
303
|
PayloadCollectionKeyTypes["HttpRequest"] = "httpRequest";
|
|
@@ -313,4 +321,4 @@ var K8sResourceKind;
|
|
|
313
321
|
K8sResourceKind["CronJob"] = "CronJob";
|
|
314
322
|
})(K8sResourceKind || (K8sResourceKind = {}));
|
|
315
323
|
|
|
316
|
-
export { ActionCategory, ActionKeyTypes, ActionType, AddNodeTypes, BooleanOperation, CodeAttributesKeyTypes, Crud, DestinationTypes, EdgeTypes, EntityTypes, FieldTypes, HeadersCollectionKeyTypes, InputTypes, InstrumentationRuleType, IntrumentationStatus, JsonOperation, K8sResourceKind, NodeTypes, NumberOperation, OtherEntityTypes, OtherStatus, PayloadCollectionKeyTypes, PlatformType, ProgrammingLanguages, SignalType, SortDirection, StatusType, StringOperation, Tier };
|
|
324
|
+
export { ActionCategory, ActionKeyTypes, ActionType, AddNodeTypes, BooleanOperation, CodeAttributesKeyTypes, Crud, CustomInstrumentationsKeyTypes, DestinationTypes, EdgeTypes, EntityTypes, FieldTypes, HeadersCollectionKeyTypes, InputTypes, InstrumentationRuleType, IntrumentationStatus, JsonOperation, K8sResourceKind, NodeTypes, NumberOperation, OtherEntityTypes, OtherStatus, PayloadCollectionKeyTypes, PlatformType, ProgrammingLanguages, SignalType, SortDirection, StatusType, StringOperation, Tier };
|
package/lib/{useSourceSelectionFormData-CMXqoHZs.js → useSourceSelectionFormData-C5VMfWEf.js}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ActionKeyTypes, ActionType, StatusType,
|
|
2
|
-
import { g as useNotificationStore, F as FORM_ALERTS,
|
|
1
|
+
import { ActionKeyTypes, ActionType, StatusType, EntityTypes, FieldTypes } from './types.js';
|
|
2
|
+
import { g as useNotificationStore, F as FORM_ALERTS, b as useDrawerStore, c as useEntityStore, a as useDataStreamStore, j as useSetupStore } from './index-Bw7RE2T2.js';
|
|
3
3
|
import { useState, useEffect, useMemo } from 'react';
|
|
4
4
|
import 'styled-components';
|
|
5
|
-
import { i as isEmpty, s as safeJsonParse } from './index-
|
|
6
|
-
import {
|
|
5
|
+
import { i as isEmpty, s as safeJsonParse } from './index-BnvrwbRB.js';
|
|
6
|
+
import { c as useGenericForm } from './useTransition-mupXsbop.js';
|
|
7
7
|
import { g as getIdFromSseTarget, i as isLegalK8sLabel, m as mapExportedSignals } from './index-BlZKWuxe.js';
|
|
8
8
|
|
|
9
9
|
const INITIAL$2 = {
|
|
10
|
-
// @ts-
|
|
10
|
+
// @ts-expect-error - we know that the field name is in the parsedFields
|
|
11
11
|
type: '',
|
|
12
12
|
name: '',
|
|
13
13
|
notes: '',
|
|
@@ -129,7 +129,7 @@ const useActionFormData = () => {
|
|
|
129
129
|
case ActionKeyTypes.EndpointsFilters:
|
|
130
130
|
case ActionKeyTypes.ServicesNameFilters:
|
|
131
131
|
case ActionKeyTypes.AttributeFilters: {
|
|
132
|
-
// @ts-
|
|
132
|
+
// @ts-expect-error - we know that the field name is in the parsedFields
|
|
133
133
|
updatedData[k] = v;
|
|
134
134
|
break;
|
|
135
135
|
}
|
|
@@ -148,39 +148,6 @@ const useActionFormData = () => {
|
|
|
148
148
|
};
|
|
149
149
|
};
|
|
150
150
|
|
|
151
|
-
const useClickNode = () => {
|
|
152
|
-
const { setCurrentModal } = useModalStore();
|
|
153
|
-
const { setDrawerType, setDrawerEntityId } = useDrawerStore();
|
|
154
|
-
const onClickNode = (_, object) => {
|
|
155
|
-
const { data: { id, type }, } = object;
|
|
156
|
-
switch (type) {
|
|
157
|
-
case EntityTypes.Source:
|
|
158
|
-
case EntityTypes.Destination:
|
|
159
|
-
case EntityTypes.Action:
|
|
160
|
-
case EntityTypes.InstrumentationRule:
|
|
161
|
-
setDrawerType(type);
|
|
162
|
-
setDrawerEntityId(id);
|
|
163
|
-
break;
|
|
164
|
-
case AddNodeTypes.AddSource:
|
|
165
|
-
setCurrentModal(EntityTypes.Source);
|
|
166
|
-
break;
|
|
167
|
-
case AddNodeTypes.AddDestination:
|
|
168
|
-
setCurrentModal(EntityTypes.Destination);
|
|
169
|
-
break;
|
|
170
|
-
case AddNodeTypes.AddAction:
|
|
171
|
-
setCurrentModal(EntityTypes.Action);
|
|
172
|
-
break;
|
|
173
|
-
case AddNodeTypes.AddRule:
|
|
174
|
-
setCurrentModal(EntityTypes.InstrumentationRule);
|
|
175
|
-
break;
|
|
176
|
-
default:
|
|
177
|
-
console.warn('Unhandled node click', object);
|
|
178
|
-
break;
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
return { onClickNode };
|
|
182
|
-
};
|
|
183
|
-
|
|
184
151
|
const useClickNotification = () => {
|
|
185
152
|
const { setDrawerType, setDrawerEntityId } = useDrawerStore();
|
|
186
153
|
const { markAsDismissed, markAsSeen } = useNotificationStore();
|
|
@@ -266,7 +233,7 @@ const useDataStreamFormData = (initialFormData) => {
|
|
|
266
233
|
};
|
|
267
234
|
|
|
268
235
|
const INITIAL$1 = {
|
|
269
|
-
// @ts-
|
|
236
|
+
// @ts-expect-error - form should be initialized with empty values
|
|
270
237
|
type: '',
|
|
271
238
|
name: '',
|
|
272
239
|
exportedSignals: {
|
|
@@ -334,7 +301,7 @@ const useDestinationFormData = (params) => {
|
|
|
334
301
|
if (field.name in parsedFields) {
|
|
335
302
|
return {
|
|
336
303
|
...field,
|
|
337
|
-
// @ts-
|
|
304
|
+
// @ts-expect-error - we know that the field name is in the parsedFields
|
|
338
305
|
value: parsedFields[field.name],
|
|
339
306
|
};
|
|
340
307
|
}
|
|
@@ -429,13 +396,11 @@ const INITIAL = {
|
|
|
429
396
|
currentStreamName: '',
|
|
430
397
|
};
|
|
431
398
|
const useSourceFormData = () => {
|
|
432
|
-
const { addNotification } = useNotificationStore();
|
|
433
399
|
const { formData, formErrors, handleFormChange, handleErrorChange, resetFormData } = useGenericForm(INITIAL);
|
|
434
|
-
const validateForm = (
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
return ok;
|
|
400
|
+
const validateForm = () => {
|
|
401
|
+
// We don't have any specific validations for this form yet
|
|
402
|
+
handleErrorChange(undefined, undefined, {});
|
|
403
|
+
return true;
|
|
439
404
|
};
|
|
440
405
|
const loadFormWithDrawerItem = ({ otelServiceName, name }) => {
|
|
441
406
|
const updatedData = {
|
|
@@ -646,4 +611,4 @@ const useSourceSelectionFormData = (params) => {
|
|
|
646
611
|
};
|
|
647
612
|
};
|
|
648
613
|
|
|
649
|
-
export {
|
|
614
|
+
export { useClickNotification as a, useDataStreamFormData as b, useDestinationFormData as c, useSessionStorage as d, useSourceFormData as e, useSourceSelectionFormData as f, useActionFormData as u };
|