@odigos/ui-kit 0.0.10 → 0.0.11
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 +8 -0
- package/lib/components/badge/index.d.ts +2 -2
- package/lib/components/data-card/data-card-fields/index.d.ts +14 -14
- package/lib/components/data-card/index.d.ts +2 -2
- package/lib/components/data-tab/index.d.ts +3 -3
- package/lib/components/delete-warning/index.d.ts +2 -2
- package/lib/components/describe-row/index.d.ts +2 -2
- package/lib/components/divider/index.d.ts +2 -2
- package/lib/components/icon-group/index.d.ts +2 -2
- package/lib/components/icon-wrapped/index.d.ts +2 -2
- package/lib/components/interactive-table/index.d.ts +2 -2
- package/lib/components/interactive-table/row.d.ts +2 -2
- package/lib/components/monitors-checkboxes/index.d.ts +4 -4
- package/lib/components/monitors-icons/index.d.ts +2 -2
- package/lib/components/notification-note/index.d.ts +2 -2
- package/lib/components/status/index.d.ts +2 -2
- package/lib/components/stepper/index.d.ts +1 -1
- package/lib/components/warning-modal/index.d.ts +2 -2
- package/lib/components.js +8 -8
- package/lib/constants/strings/index.d.ts +10 -10
- package/lib/constants.js +4 -4
- package/lib/containers/action-drawer/build-card.d.ts +2 -2
- package/lib/containers/action-drawer/index.d.ts +2 -2
- package/lib/containers/action-form/custom-fields/index.d.ts +2 -2
- package/lib/containers/data-flow/edges/labeled-edge.d.ts +2 -2
- package/lib/containers/data-flow/helpers/get-main-container-language.d.ts +2 -2
- package/lib/containers/data-flow/helpers/get-node-positions.d.ts +2 -2
- package/lib/containers/data-flow/nodes/add-node.d.ts +3 -3
- package/lib/containers/data-flow/nodes/base-node.d.ts +5 -5
- package/lib/containers/data-flow/nodes/edged-node.d.ts +2 -2
- package/lib/containers/data-flow/nodes/frame-node.d.ts +2 -2
- package/lib/containers/data-flow/nodes/header-node.d.ts +2 -2
- package/lib/containers/data-flow/nodes/scroll-node.d.ts +5 -5
- package/lib/containers/data-flow/nodes/skeleton-node.d.ts +2 -2
- package/lib/containers/data-flow-actions-menu/index.d.ts +2 -2
- package/lib/containers/data-flow-actions-menu/search/search-results/builder.d.ts +2 -2
- package/lib/containers/destination-drawer/build-card.d.ts +2 -2
- package/lib/containers/destination-form/test-connection/index.d.ts +2 -2
- package/lib/containers/instrumentation-rule-drawer/build-card.d.ts +2 -2
- package/lib/containers/instrumentation-rule-form/custom-fields/index.d.ts +2 -2
- package/lib/containers/side-nav/index.d.ts +8 -8
- package/lib/containers/source-drawer/build-card.d.ts +1 -1
- package/lib/containers.js +341 -340
- package/lib/data/sources/index.d.ts +3 -3
- package/lib/functions/get-action-icon/index.d.ts +2 -2
- package/lib/functions/get-conditions-booleans/index.d.ts +2 -2
- package/lib/functions/get-entity-icon/index.d.ts +2 -2
- package/lib/functions/get-entity-label/index.d.ts +2 -2
- package/lib/functions/get-id-from-sse-target/index.d.ts +2 -2
- package/lib/functions/get-instrumentation-rule-icon/index.d.ts +2 -2
- package/lib/functions/get-metric-for-entity/index.d.ts +2 -2
- package/lib/functions/get-monitor-icon/index.d.ts +2 -2
- package/lib/functions/get-platform-icon/index.d.ts +2 -2
- package/lib/functions/get-platform-label/index.d.ts +2 -2
- package/lib/functions/get-programming-language-icon/index.d.ts +2 -2
- package/lib/functions/get-sse-target-from-id/index.d.ts +2 -2
- package/lib/functions/get-status-icon/index.d.ts +2 -2
- package/lib/functions/index.d.ts +0 -1
- package/lib/functions.js +9 -20
- package/lib/hooks.js +7 -7
- package/lib/icons.js +2 -2
- package/lib/{index-BFct3S32.js → index-7-KCQK-x.js} +2 -2
- package/lib/{index-ixs381n-.js → index-9ObpINp4.js} +4 -4
- package/lib/{index-Do8ODRlA.js → index-B_fzHjxk.js} +87 -92
- package/lib/{index-eF2JXMVR.js → index-BtuW12KL.js} +22 -22
- package/lib/{index-CZe2VX28.js → index-CJKFedQi.js} +31 -31
- package/lib/{index-DB1gmCsH.js → index-CYn62h8x.js} +33 -33
- package/lib/{index-DnmWFsTQ.js → index-C_0J5P9M.js} +10 -10
- package/lib/{index-DIcomki-.js → index-DYEcdkUF.js} +19 -19
- package/lib/{index-BumPE6cF.js → index-Db_ZDrEr.js} +13 -13
- package/lib/store/useDrawerStore.d.ts +2 -2
- package/lib/store/useEntityStore.d.ts +5 -5
- package/lib/store/usePendingStore.d.ts +2 -2
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/actions/index.d.ts +14 -14
- package/lib/types/common/index.d.ts +80 -76
- package/lib/types/connection/index.d.ts +3 -3
- package/lib/types/data-flow/index.d.ts +15 -15
- package/lib/types/destinations/index.d.ts +2 -2
- package/lib/types/instrumentation-rules/index.d.ts +28 -28
- package/lib/types/signals/index.d.ts +5 -5
- package/lib/types/sources/index.d.ts +7 -7
- package/lib/types.js +164 -159
- package/lib/{useSourceSelectionFormData-CxdOP9FT.js → useSourceSelectionFormData-BnlRp8m3.js} +40 -40
- package/lib/{useTransition-Dfxjcy-C.js → useTransition-CFmm4scp.js} +23 -23
- package/package.json +1 -1
- package/lib/functions/derive-type-from-rule/index.d.ts +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-
|
|
1
|
+
import { SignalType, ActionType, InstrumentationRuleType } from './types.js';
|
|
2
|
+
import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-Db_ZDrEr.js';
|
|
3
3
|
import 'react';
|
|
4
|
-
import './index-
|
|
4
|
+
import './index-DYEcdkUF.js';
|
|
5
5
|
import 'styled-components';
|
|
6
6
|
|
|
7
7
|
const ACTION_OPTIONS = [
|
|
@@ -10,47 +10,47 @@ const ACTION_OPTIONS = [
|
|
|
10
10
|
icon: getActionIcon('attributes'),
|
|
11
11
|
items: [
|
|
12
12
|
{
|
|
13
|
-
type:
|
|
14
|
-
icon: getActionIcon(
|
|
13
|
+
type: ActionType.K8sAttributes,
|
|
14
|
+
icon: getActionIcon(ActionType.K8sAttributes),
|
|
15
15
|
label: 'Kubernetes Attributes',
|
|
16
16
|
description: 'Add dynamic k8s resource attributes to your data.',
|
|
17
|
-
allowedSignals: [
|
|
17
|
+
allowedSignals: [SignalType.Traces, SignalType.Metrics, SignalType.Logs],
|
|
18
18
|
docsEndpoint: '/pipeline/actions/attributes/k8sattributes',
|
|
19
19
|
docsDescription: 'This action adds kubernetes related resource attributes to spans, metrics data points and log records.',
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
type:
|
|
23
|
-
icon: getActionIcon(
|
|
22
|
+
type: ActionType.AddClusterInfo,
|
|
23
|
+
icon: getActionIcon(ActionType.AddClusterInfo),
|
|
24
24
|
label: 'Add Cluster Info',
|
|
25
25
|
description: 'Add static cluster-scoped attributes to your data.',
|
|
26
|
-
allowedSignals: [
|
|
26
|
+
allowedSignals: [SignalType.Traces, SignalType.Metrics, SignalType.Logs],
|
|
27
27
|
docsEndpoint: '/pipeline/actions/attributes/addclusterinfo',
|
|
28
28
|
docsDescription: 'This action adds static resource attributes to spans, metrics data points and log records. It is useful to add cluster-wide attributes to all telemetry signals.',
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
|
-
type:
|
|
32
|
-
icon: getActionIcon(
|
|
31
|
+
type: ActionType.DeleteAttributes,
|
|
32
|
+
icon: getActionIcon(ActionType.DeleteAttributes),
|
|
33
33
|
label: 'Delete Attribute',
|
|
34
34
|
description: 'Delete attributes from logs, metrics, and traces.',
|
|
35
|
-
allowedSignals: [
|
|
35
|
+
allowedSignals: [SignalType.Traces, SignalType.Metrics, SignalType.Logs],
|
|
36
36
|
docsEndpoint: '/pipeline/actions/attributes/deleteattribute',
|
|
37
37
|
docsDescription: 'This action will delete the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition.',
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
|
-
type:
|
|
41
|
-
icon: getActionIcon(
|
|
40
|
+
type: ActionType.RenameAttributes,
|
|
41
|
+
icon: getActionIcon(ActionType.RenameAttributes),
|
|
42
42
|
label: 'Rename Attribute',
|
|
43
43
|
description: 'Rename attributes in logs, metrics, and traces.',
|
|
44
|
-
allowedSignals: [
|
|
44
|
+
allowedSignals: [SignalType.Traces, SignalType.Metrics, SignalType.Logs],
|
|
45
45
|
docsEndpoint: '/pipeline/actions/attributes/renameattribute',
|
|
46
46
|
docsDescription: 'This action will rename the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition.',
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
|
-
type:
|
|
50
|
-
icon: getActionIcon(
|
|
49
|
+
type: ActionType.PiiMasking,
|
|
50
|
+
icon: getActionIcon(ActionType.PiiMasking),
|
|
51
51
|
label: 'PII Masking',
|
|
52
52
|
description: 'Mask PII data in your traces.',
|
|
53
|
-
allowedSignals: [
|
|
53
|
+
allowedSignals: [SignalType.Traces],
|
|
54
54
|
docsEndpoint: '/pipeline/actions/attributes/piimasking',
|
|
55
55
|
docsDescription: 'This action processes a list of PII categories to be masked from the traces.',
|
|
56
56
|
},
|
|
@@ -61,29 +61,29 @@ const ACTION_OPTIONS = [
|
|
|
61
61
|
icon: getActionIcon('sampler'),
|
|
62
62
|
items: [
|
|
63
63
|
{
|
|
64
|
-
type:
|
|
64
|
+
type: ActionType.ErrorSampler,
|
|
65
65
|
icon: getActionIcon('sampler'),
|
|
66
66
|
label: 'Error Sampler',
|
|
67
67
|
description: 'Sample errors based on percentage.',
|
|
68
|
-
allowedSignals: [
|
|
68
|
+
allowedSignals: [SignalType.Traces],
|
|
69
69
|
docsEndpoint: '/pipeline/actions/sampling/errorsampler',
|
|
70
70
|
docsDescription: 'This action is a Global Action that supports error sampling by filtering out non-error traces.',
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
|
-
type:
|
|
73
|
+
type: ActionType.LatencySampler,
|
|
74
74
|
icon: getActionIcon('sampler'),
|
|
75
75
|
label: 'Latency Sampler',
|
|
76
76
|
description: 'Add latency to your traces.',
|
|
77
|
-
allowedSignals: [
|
|
77
|
+
allowedSignals: [SignalType.Traces],
|
|
78
78
|
docsEndpoint: '/pipeline/actions/sampling/latencysampler',
|
|
79
79
|
docsDescription: 'This action is an Endpoint Action that samples traces based on their duration for a specific service and endpoint (HTTP route) filter.',
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
|
-
type:
|
|
82
|
+
type: ActionType.ProbabilisticSampler,
|
|
83
83
|
icon: getActionIcon('sampler'),
|
|
84
84
|
label: 'Probabilistic Sampler',
|
|
85
85
|
description: 'Sample traces based on percentage.',
|
|
86
|
-
allowedSignals: [
|
|
86
|
+
allowedSignals: [SignalType.Traces],
|
|
87
87
|
docsEndpoint: '/pipeline/actions/sampling/probabilisticsampler',
|
|
88
88
|
docsDescription: 'This action supports probabilistic sampling based on a configured sampling percentage applied to the TraceID.',
|
|
89
89
|
},
|
|
@@ -93,16 +93,16 @@ const ACTION_OPTIONS = [
|
|
|
93
93
|
|
|
94
94
|
const INSTRUMENTATION_RULE_OPTIONS = [
|
|
95
95
|
{
|
|
96
|
-
type:
|
|
97
|
-
icon: getInstrumentationRuleIcon(
|
|
96
|
+
type: InstrumentationRuleType.PayloadCollection,
|
|
97
|
+
icon: getInstrumentationRuleIcon(InstrumentationRuleType.PayloadCollection),
|
|
98
98
|
label: 'Payload Collection',
|
|
99
99
|
description: 'Collect span attributes containing payload data to traces.',
|
|
100
100
|
docsEndpoint: '/pipeline/rules/payloadcollection',
|
|
101
101
|
docsDescription: 'The “Payload Collection” Rule can be used to add span attributes containing payload data to traces.',
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
|
-
type:
|
|
105
|
-
icon: getInstrumentationRuleIcon(
|
|
104
|
+
type: InstrumentationRuleType.CodeAttributes,
|
|
105
|
+
icon: getInstrumentationRuleIcon(InstrumentationRuleType.CodeAttributes),
|
|
106
106
|
label: 'Code Attributes',
|
|
107
107
|
description: 'Collect code attributes containing payload data to traces.',
|
|
108
108
|
docsEndpoint: '/pipeline/rules/codeattributes',
|
|
@@ -112,15 +112,15 @@ const INSTRUMENTATION_RULE_OPTIONS = [
|
|
|
112
112
|
|
|
113
113
|
const MONITORS_OPTIONS = [
|
|
114
114
|
{
|
|
115
|
-
id:
|
|
115
|
+
id: SignalType.Logs,
|
|
116
116
|
value: 'Logs',
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
|
-
id:
|
|
119
|
+
id: SignalType.Metrics,
|
|
120
120
|
value: 'Metrics',
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
|
-
id:
|
|
123
|
+
id: SignalType.Traces,
|
|
124
124
|
value: 'Traces',
|
|
125
125
|
},
|
|
126
126
|
];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ProgrammingLanguages, SignalType, StatusType } from './types.js';
|
|
2
2
|
import 'react';
|
|
3
|
-
import './index-
|
|
3
|
+
import './index-DYEcdkUF.js';
|
|
4
4
|
import 'styled-components';
|
|
5
5
|
import { O as OdigosLogo } from './index-BGlk5VhF.js';
|
|
6
|
-
import { K as KafkaLogo, R as RedisLogo, P as PostgresLogo, N as NginxLogo, M as MysqlLogo, E as ElixirLogo, S as SwiftLogo, a as RustLogo, b as RubyLogo, c as PhpLogo, C as CPlusPlusLogo, d as CSharpLogo, D as DotnetLogo, e as PythonLogo, f as NodejsLogo, G as GoLogo, J as JavaLogo, T as TracesIcon, g as MetricsIcon, L as LogsIcon, I as InfoIcon, W as WarningTriangleIcon, h as ErrorTriangleIcon, i as CheckCircledIcon } from './index-
|
|
6
|
+
import { K as KafkaLogo, R as RedisLogo, P as PostgresLogo, N as NginxLogo, M as MysqlLogo, E as ElixirLogo, S as SwiftLogo, a as RustLogo, b as RubyLogo, c as PhpLogo, C as CPlusPlusLogo, d as CSharpLogo, D as DotnetLogo, e as PythonLogo, f as NodejsLogo, G as GoLogo, J as JavaLogo, T as TracesIcon, g as MetricsIcon, L as LogsIcon, I as InfoIcon, W as WarningTriangleIcon, h as ErrorTriangleIcon, i as CheckCircledIcon } from './index-9ObpINp4.js';
|
|
7
7
|
|
|
8
8
|
const capitalizeFirstLetter = (string) => {
|
|
9
9
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
@@ -73,48 +73,48 @@ const flattenObjectKeys = (obj, prefix = '', result = {}) => {
|
|
|
73
73
|
|
|
74
74
|
const getProgrammingLanguageIcon = (language) => {
|
|
75
75
|
const LOGOS = {
|
|
76
|
-
[
|
|
77
|
-
[
|
|
78
|
-
[
|
|
79
|
-
[
|
|
80
|
-
[
|
|
81
|
-
[
|
|
82
|
-
[
|
|
83
|
-
[
|
|
84
|
-
[
|
|
85
|
-
[
|
|
86
|
-
[
|
|
87
|
-
[
|
|
88
|
-
[
|
|
89
|
-
[
|
|
90
|
-
[
|
|
91
|
-
[
|
|
92
|
-
[
|
|
93
|
-
[
|
|
94
|
-
[
|
|
95
|
-
[
|
|
96
|
-
[
|
|
97
|
-
[
|
|
76
|
+
[ProgrammingLanguages.Java]: JavaLogo,
|
|
77
|
+
[ProgrammingLanguages.Go]: GoLogo,
|
|
78
|
+
[ProgrammingLanguages.JavaScript]: NodejsLogo,
|
|
79
|
+
[ProgrammingLanguages.Python]: PythonLogo,
|
|
80
|
+
[ProgrammingLanguages.DotNet]: DotnetLogo,
|
|
81
|
+
[ProgrammingLanguages.CSharp]: CSharpLogo,
|
|
82
|
+
[ProgrammingLanguages.CPlusPlus]: CPlusPlusLogo,
|
|
83
|
+
[ProgrammingLanguages.Php]: PhpLogo,
|
|
84
|
+
[ProgrammingLanguages.Ruby]: RubyLogo,
|
|
85
|
+
[ProgrammingLanguages.Rust]: RustLogo,
|
|
86
|
+
[ProgrammingLanguages.Swift]: SwiftLogo,
|
|
87
|
+
[ProgrammingLanguages.Elixir]: ElixirLogo,
|
|
88
|
+
[ProgrammingLanguages.MySql]: MysqlLogo,
|
|
89
|
+
[ProgrammingLanguages.Nginx]: NginxLogo,
|
|
90
|
+
[ProgrammingLanguages.Postgres]: PostgresLogo,
|
|
91
|
+
[ProgrammingLanguages.Redis]: RedisLogo,
|
|
92
|
+
[ProgrammingLanguages.Kafka]: KafkaLogo,
|
|
93
|
+
[ProgrammingLanguages.Ignored]: OdigosLogo, // TODO: good icon
|
|
94
|
+
[ProgrammingLanguages.Unknown]: OdigosLogo, // TODO: good icon
|
|
95
|
+
[ProgrammingLanguages.Processing]: OdigosLogo, // TODO: good icon
|
|
96
|
+
[ProgrammingLanguages.NoContainers]: OdigosLogo, // TODO: good icon
|
|
97
|
+
[ProgrammingLanguages.NoRunningPods]: OdigosLogo, // TODO: good icon
|
|
98
98
|
};
|
|
99
99
|
return LOGOS[language];
|
|
100
100
|
};
|
|
101
101
|
|
|
102
102
|
const getMonitorIcon = (type) => {
|
|
103
103
|
const LOGOS = {
|
|
104
|
-
[
|
|
105
|
-
[
|
|
106
|
-
[
|
|
104
|
+
[SignalType.Logs]: LogsIcon,
|
|
105
|
+
[SignalType.Metrics]: MetricsIcon,
|
|
106
|
+
[SignalType.Traces]: TracesIcon,
|
|
107
107
|
};
|
|
108
108
|
return LOGOS[type];
|
|
109
109
|
};
|
|
110
110
|
|
|
111
111
|
const getStatusIcon = (type, theme) => {
|
|
112
112
|
const LOGOS = {
|
|
113
|
-
[
|
|
114
|
-
[
|
|
115
|
-
[
|
|
116
|
-
[
|
|
117
|
-
[
|
|
113
|
+
[StatusType.Success]: (props) => CheckCircledIcon({ fill: theme.text[type], ...props }),
|
|
114
|
+
[StatusType.Error]: (props) => ErrorTriangleIcon({ fill: theme.text[type], ...props }),
|
|
115
|
+
[StatusType.Warning]: (props) => WarningTriangleIcon({ fill: theme.text[type], ...props }),
|
|
116
|
+
[StatusType.Info]: (props) => InfoIcon({ fill: theme.text[type], ...props }),
|
|
117
|
+
[StatusType.Default]: (props) => OdigosLogo({ fill: theme.text[type], ...props }),
|
|
118
118
|
};
|
|
119
119
|
return LOGOS[type];
|
|
120
120
|
};
|
|
@@ -9,27 +9,27 @@ const FORM_ALERTS = {
|
|
|
9
9
|
READONLY_WARNING: "You're not allowed to create/update/delete in readonly mode",
|
|
10
10
|
};
|
|
11
11
|
const DISPLAY_TITLES = {
|
|
12
|
-
|
|
12
|
+
Namespace: 'Namespace',
|
|
13
13
|
NAME: 'Name',
|
|
14
14
|
KIND: 'Kind',
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
Action: 'Action',
|
|
16
|
+
Actions: 'Actions',
|
|
17
17
|
ACTION_DETAILS: 'Action Details',
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
InstrumentationRule: 'Instrumentation Rule',
|
|
19
|
+
InstrumentationRules: 'Instrumentation Rules',
|
|
20
20
|
INSTRUMENTATION_RULE_DETAILS: 'Instrumentation Rule Details',
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
Destination: 'Destination',
|
|
22
|
+
Destinations: 'Destinations',
|
|
23
23
|
DESTINATION_DETAILS: 'Destination Details',
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
Source: 'Source',
|
|
25
|
+
Sources: 'Sources',
|
|
26
26
|
SOURCE_DETAILS: 'Source Details',
|
|
27
27
|
TYPE: 'Type',
|
|
28
28
|
NOTES: 'Notes',
|
|
29
29
|
STATUS: 'Status',
|
|
30
30
|
READONLY: 'Readonly',
|
|
31
31
|
LANGUAGE: 'Language',
|
|
32
|
-
|
|
32
|
+
Monitors: 'Monitors',
|
|
33
33
|
SIGNALS_FOR_PROCESSING: 'Signals for Processing',
|
|
34
34
|
MANAGED_BY_PROFILE: 'Managed by Profile',
|
|
35
35
|
API_TOKEN: 'API Token',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EntityTypes } from './types.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { keyframes } from 'styled-components';
|
|
4
4
|
|
|
@@ -285,13 +285,13 @@ const useEntityStore = create((set) => ({
|
|
|
285
285
|
instrumentationRulesLoading: false,
|
|
286
286
|
instrumentationRules: [],
|
|
287
287
|
setEntitiesLoading: (entityType, bool) => {
|
|
288
|
-
const KEY = entityType ===
|
|
288
|
+
const KEY = entityType === EntityTypes.Source
|
|
289
289
|
? 'sourcesLoading'
|
|
290
|
-
: entityType ===
|
|
290
|
+
: entityType === EntityTypes.Destination
|
|
291
291
|
? 'destinationsLoading'
|
|
292
|
-
: entityType ===
|
|
292
|
+
: entityType === EntityTypes.Action
|
|
293
293
|
? 'actionsLoading'
|
|
294
|
-
: entityType ===
|
|
294
|
+
: entityType === EntityTypes.InstrumentationRule
|
|
295
295
|
? 'instrumentationRulesLoading'
|
|
296
296
|
: 'NONE';
|
|
297
297
|
if (KEY === 'NONE')
|
|
@@ -299,13 +299,13 @@ const useEntityStore = create((set) => ({
|
|
|
299
299
|
set({ [KEY]: bool });
|
|
300
300
|
},
|
|
301
301
|
setEntities: (entityType, payload) => {
|
|
302
|
-
const KEY = entityType ===
|
|
302
|
+
const KEY = entityType === EntityTypes.Source
|
|
303
303
|
? 'sources'
|
|
304
|
-
: entityType ===
|
|
304
|
+
: entityType === EntityTypes.Destination
|
|
305
305
|
? 'destinations'
|
|
306
|
-
: entityType ===
|
|
306
|
+
: entityType === EntityTypes.Action
|
|
307
307
|
? 'actions'
|
|
308
|
-
: entityType ===
|
|
308
|
+
: entityType === EntityTypes.InstrumentationRule
|
|
309
309
|
? 'instrumentationRules'
|
|
310
310
|
: 'NONE';
|
|
311
311
|
if (KEY === 'NONE')
|
|
@@ -313,13 +313,13 @@ const useEntityStore = create((set) => ({
|
|
|
313
313
|
set({ [KEY]: payload });
|
|
314
314
|
},
|
|
315
315
|
addEntities: (entityType, entities) => {
|
|
316
|
-
const KEY = entityType ===
|
|
316
|
+
const KEY = entityType === EntityTypes.Source
|
|
317
317
|
? 'sources'
|
|
318
|
-
: entityType ===
|
|
318
|
+
: entityType === EntityTypes.Destination
|
|
319
319
|
? 'destinations'
|
|
320
|
-
: entityType ===
|
|
320
|
+
: entityType === EntityTypes.Action
|
|
321
321
|
? 'actions'
|
|
322
|
-
: entityType ===
|
|
322
|
+
: entityType === EntityTypes.InstrumentationRule
|
|
323
323
|
? 'instrumentationRules'
|
|
324
324
|
: 'NONE';
|
|
325
325
|
if (KEY === 'NONE')
|
|
@@ -339,13 +339,13 @@ const useEntityStore = create((set) => ({
|
|
|
339
339
|
});
|
|
340
340
|
},
|
|
341
341
|
removeEntities: (entityType, entityIds) => {
|
|
342
|
-
const KEY = entityType ===
|
|
342
|
+
const KEY = entityType === EntityTypes.Source
|
|
343
343
|
? 'sources'
|
|
344
|
-
: entityType ===
|
|
344
|
+
: entityType === EntityTypes.Destination
|
|
345
345
|
? 'destinations'
|
|
346
|
-
: entityType ===
|
|
346
|
+
: entityType === EntityTypes.Action
|
|
347
347
|
? 'actions'
|
|
348
|
-
: entityType ===
|
|
348
|
+
: entityType === EntityTypes.InstrumentationRule
|
|
349
349
|
? 'instrumentationRules'
|
|
350
350
|
: 'NONE';
|
|
351
351
|
if (KEY === 'NONE')
|
|
@@ -353,7 +353,7 @@ const useEntityStore = create((set) => ({
|
|
|
353
353
|
set((state) => {
|
|
354
354
|
const prev = [...state[KEY]];
|
|
355
355
|
entityIds.forEach((id) => {
|
|
356
|
-
const foundIdx = prev.findIndex((entity) => entityType ===
|
|
356
|
+
const foundIdx = prev.findIndex((entity) => entityType === EntityTypes.Source ? JSON.stringify(getEntityId(entity)) === JSON.stringify(getEntityId(id)) : getEntityId(entity) === id);
|
|
357
357
|
if (foundIdx !== -1) {
|
|
358
358
|
prev.splice(foundIdx, 1);
|
|
359
359
|
}
|
|
@@ -520,7 +520,7 @@ const usePendingStore = create((set, get) => ({
|
|
|
520
520
|
const pendingItem = pendingItems[i];
|
|
521
521
|
if (pendingItem.entityType === item.entityType &&
|
|
522
522
|
(!item.entityId ||
|
|
523
|
-
(pendingItem.entityType ===
|
|
523
|
+
(pendingItem.entityType === EntityTypes.Source
|
|
524
524
|
? !!pendingItem.entityId &&
|
|
525
525
|
!!item.entityId &&
|
|
526
526
|
pendingItem.entityId.namespace === item.entityId.namespace &&
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ActionType, InstrumentationRuleType } from './types.js';
|
|
2
2
|
import { S as SamplerIcon, P as PiiMaskingIcon, R as RenameAttributeIcon, D as DeleteAttributeIcon, A as AddClusterInfoIcon, K as K8sLogo, O as OdigosLogo, C as CodeAttributesIcon, a as PayloadCollectionIcon } from './index-BGlk5VhF.js';
|
|
3
3
|
import 'react';
|
|
4
|
-
import './index-
|
|
4
|
+
import './index-DYEcdkUF.js';
|
|
5
5
|
import 'styled-components';
|
|
6
6
|
|
|
7
7
|
const getActionIcon = (type) => {
|
|
@@ -13,23 +13,23 @@ const getActionIcon = (type) => {
|
|
|
13
13
|
if (isAttributesCategory)
|
|
14
14
|
return PiiMaskingIcon;
|
|
15
15
|
const LOGOS = {
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
16
|
+
[ActionType.K8sAttributes]: K8sLogo,
|
|
17
|
+
[ActionType.AddClusterInfo]: AddClusterInfoIcon,
|
|
18
|
+
[ActionType.DeleteAttributes]: DeleteAttributeIcon,
|
|
19
|
+
[ActionType.PiiMasking]: PiiMaskingIcon,
|
|
20
|
+
[ActionType.RenameAttributes]: RenameAttributeIcon,
|
|
21
|
+
[ActionType.ErrorSampler]: SamplerIcon,
|
|
22
|
+
[ActionType.ProbabilisticSampler]: SamplerIcon,
|
|
23
|
+
[ActionType.LatencySampler]: SamplerIcon,
|
|
24
24
|
};
|
|
25
25
|
return LOGOS[type];
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const getInstrumentationRuleIcon = (type) => {
|
|
29
29
|
const LOGOS = {
|
|
30
|
-
[
|
|
31
|
-
[
|
|
32
|
-
[
|
|
30
|
+
[InstrumentationRuleType.PayloadCollection]: PayloadCollectionIcon,
|
|
31
|
+
[InstrumentationRuleType.CodeAttributes]: CodeAttributesIcon,
|
|
32
|
+
[InstrumentationRuleType.UnknownType]: OdigosLogo,
|
|
33
33
|
};
|
|
34
34
|
return LOGOS[type];
|
|
35
35
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EntityTypes, type WorkloadId } from '@/types';
|
|
2
2
|
export interface DrawerStoreState {
|
|
3
|
-
drawerType:
|
|
3
|
+
drawerType: EntityTypes | null;
|
|
4
4
|
drawerEntityId: string | WorkloadId | null;
|
|
5
5
|
}
|
|
6
6
|
interface DrawerStoreStateSetters {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Action, type Destination,
|
|
1
|
+
import { type Action, type Destination, EntityTypes, type InstrumentationRule, type Source, type WorkloadId } from '@/types';
|
|
2
2
|
interface IEntityState {
|
|
3
3
|
sourcesLoading: boolean;
|
|
4
4
|
sources: Source[];
|
|
@@ -12,10 +12,10 @@ interface IEntityState {
|
|
|
12
12
|
type EntityId = string | WorkloadId;
|
|
13
13
|
type EntityItems = IEntityState['sources'] | IEntityState['destinations'] | IEntityState['actions'] | IEntityState['instrumentationRules'];
|
|
14
14
|
interface IEntityStateSetters {
|
|
15
|
-
setEntitiesLoading: (entityType:
|
|
16
|
-
setEntities: (entityType:
|
|
17
|
-
addEntities: (entityType:
|
|
18
|
-
removeEntities: (entityType:
|
|
15
|
+
setEntitiesLoading: (entityType: EntityTypes, bool: boolean) => void;
|
|
16
|
+
setEntities: (entityType: EntityTypes, entities: EntityItems) => void;
|
|
17
|
+
addEntities: (entityType: EntityTypes, entities: EntityItems) => void;
|
|
18
|
+
removeEntities: (entityType: EntityTypes, entityIds: EntityId[]) => void;
|
|
19
19
|
resetEntityStore: () => void;
|
|
20
20
|
}
|
|
21
21
|
export declare const useEntityStore: import("zustand").UseBoundStore<import("zustand").StoreApi<IEntityState & IEntityStateSetters>>;
|
package/lib/store.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { u as useDarkMode, a as useDrawerStore, b as useEntityStore, c as useFilterStore, d as useInstrumentStore, e as useModalStore, f as useNotificationStore, g as usePendingStore, h as useSelectedStore, i as useSetupStore } from './index-
|
|
1
|
+
export { u as useDarkMode, a as useDrawerStore, b as useEntityStore, c as useFilterStore, d as useInstrumentStore, e as useModalStore, f as useNotificationStore, g as usePendingStore, h as useSelectedStore, i as useSetupStore } from './index-DYEcdkUF.js';
|
|
2
2
|
import './types.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'styled-components';
|
package/lib/theme.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SignalType } from '../signals';
|
|
2
2
|
import type { Condition, SVG } from '../common';
|
|
3
|
-
export declare enum
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
export declare enum ActionType {
|
|
4
|
+
K8sAttributes = "K8sAttributesResolver",
|
|
5
|
+
AddClusterInfo = "AddClusterInfo",
|
|
6
|
+
DeleteAttributes = "DeleteAttribute",
|
|
7
|
+
RenameAttributes = "RenameAttribute",
|
|
8
|
+
ErrorSampler = "ErrorSampler",
|
|
9
|
+
ProbabilisticSampler = "ProbabilisticSampler",
|
|
10
|
+
LatencySampler = "LatencySampler",
|
|
11
|
+
PiiMasking = "PiiMasking"
|
|
12
12
|
}
|
|
13
13
|
export interface Action {
|
|
14
14
|
id: string;
|
|
15
|
-
type:
|
|
15
|
+
type: ActionType;
|
|
16
16
|
conditions: Condition[] | null;
|
|
17
17
|
spec: {
|
|
18
18
|
actionName?: string;
|
|
19
19
|
notes?: string;
|
|
20
|
-
signals:
|
|
20
|
+
signals: SignalType[];
|
|
21
21
|
disabled?: boolean;
|
|
22
22
|
collectContainerAttributes?: boolean | null;
|
|
23
23
|
collectWorkloadId?: boolean | null;
|
|
@@ -50,11 +50,11 @@ export interface Action {
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
export interface ActionOption {
|
|
53
|
-
type?:
|
|
53
|
+
type?: ActionType;
|
|
54
54
|
icon?: SVG;
|
|
55
55
|
label: string;
|
|
56
56
|
description?: string;
|
|
57
|
-
allowedSignals?:
|
|
57
|
+
allowedSignals?: SignalType[];
|
|
58
58
|
docsEndpoint?: string;
|
|
59
59
|
docsDescription?: string;
|
|
60
60
|
items?: ActionOption[];
|