@odigos/ui-kit 0.0.33 → 0.0.35
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 +22 -0
- package/eslint.config.mjs +17 -0
- package/lib/components/data-card/index.d.ts +2 -1
- package/lib/components/dropdown/index.d.ts +1 -0
- package/lib/components/input/index.d.ts +1 -1
- package/lib/components/input-table/index.d.ts +3 -11
- package/lib/components/input-table/map-columns-to-fields/index.d.ts +15 -0
- package/lib/components/input-table/types.d.ts +15 -0
- package/lib/components.js +9 -10
- package/lib/constants/strings/index.d.ts +6 -0
- package/lib/constants.js +1 -2
- package/lib/containers/action-form/custom-fields/add-cluster-info.d.ts +1 -1
- package/lib/containers/action-form/custom-fields/delete-attributes.d.ts +1 -1
- package/lib/containers/action-form/custom-fields/error-sampler.d.ts +1 -1
- package/lib/containers/action-form/custom-fields/k8s-attributes.d.ts +1 -1
- package/lib/containers/action-form/custom-fields/latency-sampler.d.ts +1 -1
- package/lib/containers/action-form/custom-fields/pii-masking.d.ts +1 -1
- package/lib/containers/action-form/custom-fields/probabilistic-sampler.d.ts +1 -1
- package/lib/containers/action-form/custom-fields/rename-attributes.d.ts +1 -1
- package/lib/containers/action-form/custom-fields/service-name-sampler.d.ts +5 -0
- package/lib/containers/action-form/custom-fields/span-attribute-sampler.d.ts +5 -0
- package/lib/containers/data-flow/helpers/build-action-nodes.d.ts +7 -1
- package/lib/containers/data-flow/helpers/build-destination-nodes.d.ts +7 -1
- package/lib/containers/data-flow/helpers/build-rule-nodes.d.ts +7 -1
- package/lib/containers/destination-modal/choose-destination/destinations-list/index.d.ts +1 -1
- package/lib/containers/destination-modal/choose-destination/index.d.ts +2 -2
- package/lib/containers/instrumentation-rule-drawer/build-card.d.ts +1 -1
- package/lib/containers.js +515 -201
- package/lib/functions/get-action-icon/index.d.ts +2 -2
- package/lib/functions/index.d.ts +1 -0
- package/lib/functions/numbers-only/index.d.ts +1 -0
- package/lib/functions.js +6 -7
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/useSessionStorage.d.ts +5 -0
- package/lib/hooks.js +4 -5
- package/lib/icons.js +7 -7
- package/lib/{index-1N9wymEq.js → index-9R2N835W.js} +1 -1
- package/lib/{index-f8FRaVkE.js → index-BDqd3uNm.js} +1 -1
- package/lib/{index-Do3CYz7N.js → index-BVj4fOL3.js} +1 -1
- package/lib/{index-CnZlllYu.js → index-BlZKWuxe.js} +7 -1
- package/lib/{index-B_Gl6Qa6.js → index-CCX1HLUr.js} +9 -3
- package/lib/{index-CNfdJ1X8.js → index-CEWs8CTN.js} +1 -1
- package/lib/{index-CVH8Q8Sl.js → index-CKOBXat_.js} +360 -237
- package/lib/{index-CaAOgaiC.js → index-CyG_tD3y.js} +2 -2
- package/lib/{index-BjVl4-os.js → index-DmCjUtBQ.js} +4 -5
- package/lib/{index-BQQZyvRz.js → index-DqaI44fJ.js} +1 -1
- package/lib/{index-BedCNcwV.js → index-THrvNIPj.js} +112 -64
- package/lib/{index-Iq7U_fzb.js → index-dLZvpGw3.js} +5 -12
- package/lib/mock-data/sources/index.d.ts +2 -0
- package/lib/snippets.js +8 -9
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/actions/index.d.ts +137 -41
- package/lib/types/common/index.d.ts +10 -16
- package/lib/types.js +85 -20
- package/lib/{useSourceSelectionFormData-DiwzViqL.js → useSourceSelectionFormData-DqSNROtZ.js} +73 -37
- package/lib/{useTransition-B0eagOib.js → useTransition-D9f1CP9n.js} +1 -1
- package/package.json +20 -23
- package/lib/index-mOgS3e5E.js +0 -101
|
@@ -73,22 +73,10 @@ export declare enum FieldTypes {
|
|
|
73
73
|
Checkbox = "checkbox",
|
|
74
74
|
Toggle = "toggle"
|
|
75
75
|
}
|
|
76
|
-
export declare enum
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
InstrumentationConfig = "InstrumentationConfig",
|
|
81
|
-
InstrumentationInstance = "InstrumentationInstance",
|
|
82
|
-
Destination = "Destination",
|
|
83
|
-
InstrumentationRule = "InstrumentationRule",
|
|
84
|
-
Processor = "Processor",
|
|
85
|
-
AddClusterInfo = "AddClusterInfo",
|
|
86
|
-
DeleteAttributes = "DeleteAttribute",
|
|
87
|
-
RenameAttributes = "RenameAttribute",
|
|
88
|
-
PiiMasking = "PiiMasking",
|
|
89
|
-
ErrorSampler = "ErrorSampler",
|
|
90
|
-
LatencySampler = "LatencySampler",
|
|
91
|
-
ProbabilisticSampler = "ProbabilisticSampler"
|
|
76
|
+
export declare enum InputTypes {
|
|
77
|
+
Text = "text",
|
|
78
|
+
Password = "password",
|
|
79
|
+
Number = "number"
|
|
92
80
|
}
|
|
93
81
|
export declare enum StatusType {
|
|
94
82
|
Warning = "warning",
|
|
@@ -97,6 +85,12 @@ export declare enum StatusType {
|
|
|
97
85
|
Info = "info",
|
|
98
86
|
Default = "default"
|
|
99
87
|
}
|
|
88
|
+
export declare enum IntrumentationStatus {
|
|
89
|
+
INSTRUMNETED = "Instrumented",
|
|
90
|
+
INSTRUMENTING = "Instrumenting",
|
|
91
|
+
UNINSTRUMENTED = "Uninstrumented",
|
|
92
|
+
NOT_INSTRUMENTED = "Not Instrumented"
|
|
93
|
+
}
|
|
100
94
|
export declare enum OtherStatus {
|
|
101
95
|
Loading = "loading",
|
|
102
96
|
Disabled = "disabled"
|
package/lib/types.js
CHANGED
|
@@ -1,14 +1,84 @@
|
|
|
1
|
+
var ActionCategory;
|
|
2
|
+
(function (ActionCategory) {
|
|
3
|
+
ActionCategory["Attributes"] = "attributes";
|
|
4
|
+
ActionCategory["Samplers"] = "samplers";
|
|
5
|
+
})(ActionCategory || (ActionCategory = {}));
|
|
1
6
|
var ActionType;
|
|
2
7
|
(function (ActionType) {
|
|
3
8
|
ActionType["K8sAttributes"] = "K8sAttributesResolver";
|
|
4
9
|
ActionType["AddClusterInfo"] = "AddClusterInfo";
|
|
5
10
|
ActionType["DeleteAttributes"] = "DeleteAttribute";
|
|
6
11
|
ActionType["RenameAttributes"] = "RenameAttribute";
|
|
12
|
+
ActionType["PiiMasking"] = "PiiMasking";
|
|
7
13
|
ActionType["ErrorSampler"] = "ErrorSampler";
|
|
8
14
|
ActionType["ProbabilisticSampler"] = "ProbabilisticSampler";
|
|
9
15
|
ActionType["LatencySampler"] = "LatencySampler";
|
|
10
|
-
ActionType["
|
|
16
|
+
ActionType["ServiceNameSampler"] = "ServiceNameSampler";
|
|
17
|
+
ActionType["SpanAttributeSampler"] = "SpanAttributeSampler";
|
|
11
18
|
})(ActionType || (ActionType = {}));
|
|
19
|
+
var ActionKeyTypes;
|
|
20
|
+
(function (ActionKeyTypes) {
|
|
21
|
+
// K8sAttributes
|
|
22
|
+
ActionKeyTypes["CollectContainerAttributes"] = "collectContainerAttributes";
|
|
23
|
+
ActionKeyTypes["CollectReplicaSetAttributes"] = "collectReplicaSetAttributes";
|
|
24
|
+
ActionKeyTypes["CollectWorkloadId"] = "collectWorkloadId";
|
|
25
|
+
ActionKeyTypes["CollectClusterId"] = "collectClusterId";
|
|
26
|
+
ActionKeyTypes["LabelsAttributes"] = "labelsAttributes";
|
|
27
|
+
ActionKeyTypes["AnnotationsAttributes"] = "annotationsAttributes";
|
|
28
|
+
// AddClusterInfo
|
|
29
|
+
ActionKeyTypes["ClusterAttributes"] = "clusterAttributes";
|
|
30
|
+
// DeleteAttributes
|
|
31
|
+
ActionKeyTypes["AttributeNamesToDelete"] = "attributeNamesToDelete";
|
|
32
|
+
// RenameAttributes
|
|
33
|
+
ActionKeyTypes["Renames"] = "renames";
|
|
34
|
+
// PiiMasking
|
|
35
|
+
ActionKeyTypes["PiiCategories"] = "piiCategories";
|
|
36
|
+
// ErrorSampler
|
|
37
|
+
ActionKeyTypes["FallbackSamplingRatio"] = "fallbackSamplingRatio";
|
|
38
|
+
// ProbabilisticSampler
|
|
39
|
+
ActionKeyTypes["SamplingPercentage"] = "samplingPercentage";
|
|
40
|
+
// LatencySampler
|
|
41
|
+
ActionKeyTypes["EndpointsFilters"] = "endpointsFilters";
|
|
42
|
+
// ServiceNameSampler
|
|
43
|
+
ActionKeyTypes["ServicesNameFilters"] = "servicesNameFilters";
|
|
44
|
+
// SpanAttributeSampler
|
|
45
|
+
ActionKeyTypes["AttributeFilters"] = "attributeFilters";
|
|
46
|
+
})(ActionKeyTypes || (ActionKeyTypes = {}));
|
|
47
|
+
var StringOperation;
|
|
48
|
+
(function (StringOperation) {
|
|
49
|
+
StringOperation["EXISTS"] = "exists";
|
|
50
|
+
StringOperation["EQUALS"] = "equals";
|
|
51
|
+
StringOperation["NOT_EQUALS"] = "not_equals";
|
|
52
|
+
StringOperation["CONTAINS"] = "contains";
|
|
53
|
+
StringOperation["NOT_CONTAINS"] = "not_contains";
|
|
54
|
+
StringOperation["REGEX"] = "regex";
|
|
55
|
+
})(StringOperation || (StringOperation = {}));
|
|
56
|
+
var NumberOperation;
|
|
57
|
+
(function (NumberOperation) {
|
|
58
|
+
NumberOperation["EXISTS"] = "exists";
|
|
59
|
+
NumberOperation["EQUALS"] = "equals";
|
|
60
|
+
NumberOperation["NOT_EQUALS"] = "not_equals";
|
|
61
|
+
NumberOperation["GREATER_THAN"] = "greater_than";
|
|
62
|
+
NumberOperation["LESS_THAN"] = "less_than";
|
|
63
|
+
NumberOperation["GREATER_THAN_OR_EQUAL"] = "greater_than_or_equal";
|
|
64
|
+
NumberOperation["LESS_THAN_OR_EQUAL"] = "less_than_or_equal";
|
|
65
|
+
})(NumberOperation || (NumberOperation = {}));
|
|
66
|
+
var BooleanOperation;
|
|
67
|
+
(function (BooleanOperation) {
|
|
68
|
+
BooleanOperation["EXISTS"] = "exists";
|
|
69
|
+
BooleanOperation["EQUALS"] = "equals";
|
|
70
|
+
})(BooleanOperation || (BooleanOperation = {}));
|
|
71
|
+
var JsonOperation;
|
|
72
|
+
(function (JsonOperation) {
|
|
73
|
+
JsonOperation["EXISTS"] = "exists";
|
|
74
|
+
JsonOperation["EQUALS"] = "equals";
|
|
75
|
+
JsonOperation["NOT_EQUALS"] = "not_equals";
|
|
76
|
+
JsonOperation["IS_VALID_JSON"] = "is_valid_json";
|
|
77
|
+
JsonOperation["IS_INVALID_JSON"] = "is_invalid_json";
|
|
78
|
+
JsonOperation["JSONPATH_EXISTS"] = "jsonpath_exists";
|
|
79
|
+
JsonOperation["KEY_EQUALS"] = "key_equals";
|
|
80
|
+
JsonOperation["KEY_NOT_EQUALS"] = "key_not_equals";
|
|
81
|
+
})(JsonOperation || (JsonOperation = {}));
|
|
12
82
|
|
|
13
83
|
var Tier;
|
|
14
84
|
(function (Tier) {
|
|
@@ -72,24 +142,12 @@ var FieldTypes;
|
|
|
72
142
|
FieldTypes["Checkbox"] = "checkbox";
|
|
73
143
|
FieldTypes["Toggle"] = "toggle";
|
|
74
144
|
})(FieldTypes || (FieldTypes = {}));
|
|
75
|
-
var
|
|
76
|
-
(function (
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
CrdTypes["InstrumentationInstance"] = "InstrumentationInstance";
|
|
82
|
-
CrdTypes["Destination"] = "Destination";
|
|
83
|
-
CrdTypes["InstrumentationRule"] = "InstrumentationRule";
|
|
84
|
-
CrdTypes["Processor"] = "Processor";
|
|
85
|
-
CrdTypes["AddClusterInfo"] = "AddClusterInfo";
|
|
86
|
-
CrdTypes["DeleteAttributes"] = "DeleteAttribute";
|
|
87
|
-
CrdTypes["RenameAttributes"] = "RenameAttribute";
|
|
88
|
-
CrdTypes["PiiMasking"] = "PiiMasking";
|
|
89
|
-
CrdTypes["ErrorSampler"] = "ErrorSampler";
|
|
90
|
-
CrdTypes["LatencySampler"] = "LatencySampler";
|
|
91
|
-
CrdTypes["ProbabilisticSampler"] = "ProbabilisticSampler";
|
|
92
|
-
})(CrdTypes || (CrdTypes = {}));
|
|
145
|
+
var InputTypes;
|
|
146
|
+
(function (InputTypes) {
|
|
147
|
+
InputTypes["Text"] = "text";
|
|
148
|
+
InputTypes["Password"] = "password";
|
|
149
|
+
InputTypes["Number"] = "number";
|
|
150
|
+
})(InputTypes || (InputTypes = {}));
|
|
93
151
|
var StatusType;
|
|
94
152
|
(function (StatusType) {
|
|
95
153
|
StatusType["Warning"] = "warning";
|
|
@@ -98,6 +156,13 @@ var StatusType;
|
|
|
98
156
|
StatusType["Info"] = "info";
|
|
99
157
|
StatusType["Default"] = "default";
|
|
100
158
|
})(StatusType || (StatusType = {}));
|
|
159
|
+
var IntrumentationStatus;
|
|
160
|
+
(function (IntrumentationStatus) {
|
|
161
|
+
IntrumentationStatus["INSTRUMNETED"] = "Instrumented";
|
|
162
|
+
IntrumentationStatus["INSTRUMENTING"] = "Instrumenting";
|
|
163
|
+
IntrumentationStatus["UNINSTRUMENTED"] = "Uninstrumented";
|
|
164
|
+
IntrumentationStatus["NOT_INSTRUMENTED"] = "Not Instrumented";
|
|
165
|
+
})(IntrumentationStatus || (IntrumentationStatus = {}));
|
|
101
166
|
var OtherStatus;
|
|
102
167
|
(function (OtherStatus) {
|
|
103
168
|
OtherStatus["Loading"] = "loading";
|
|
@@ -241,4 +306,4 @@ var K8sResourceKind;
|
|
|
241
306
|
K8sResourceKind["StatefulSet"] = "StatefulSet";
|
|
242
307
|
})(K8sResourceKind || (K8sResourceKind = {}));
|
|
243
308
|
|
|
244
|
-
export { ActionType, AddNodeTypes,
|
|
309
|
+
export { ActionCategory, ActionKeyTypes, ActionType, AddNodeTypes, BooleanOperation, CodeAttributesKeyTypes, Crud, DestinationTypes, EdgeTypes, EntityTypes, FieldTypes, HeadersCollectionKeyTypes, InputTypes, InstrumentationRuleType, IntrumentationStatus, JsonOperation, K8sResourceKind, NodeTypes, NumberOperation, OtherStatus, PayloadCollectionKeyTypes, PlatformType, ProgrammingLanguages, SignalType, SortDirection, StatusType, StringOperation, Tier };
|
package/lib/{useSourceSelectionFormData-DiwzViqL.js → useSourceSelectionFormData-DqSNROtZ.js}
RENAMED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { ActionType, StatusType, AddNodeTypes, EntityTypes, FieldTypes } from './types.js';
|
|
2
|
-
import { g as useNotificationStore, f as useModalStore, b as useDrawerStore, c as useEntityStore, a as useDataStreamStore, j as useSetupStore } from './index-
|
|
3
|
-
import { F as FORM_ALERTS } from './index-mOgS3e5E.js';
|
|
1
|
+
import { ActionKeyTypes, ActionType, StatusType, AddNodeTypes, EntityTypes, FieldTypes } from './types.js';
|
|
2
|
+
import { g as useNotificationStore, F as FORM_ALERTS, f as useModalStore, b as useDrawerStore, c as useEntityStore, a as useDataStreamStore, j as useSetupStore } from './index-CKOBXat_.js';
|
|
4
3
|
import { useState, useEffect, useMemo } from 'react';
|
|
5
4
|
import 'styled-components';
|
|
6
5
|
import { i as isEmpty, s as safeJsonParse } from './index-BV85P9UP.js';
|
|
7
|
-
import { b as useGenericForm } from './useTransition-
|
|
8
|
-
import { g as getIdFromSseTarget, i as isLegalK8sLabel } from './index-
|
|
6
|
+
import { b as useGenericForm } from './useTransition-D9f1CP9n.js';
|
|
7
|
+
import { g as getIdFromSseTarget, i as isLegalK8sLabel, m as mapExportedSignals } from './index-BlZKWuxe.js';
|
|
9
8
|
|
|
10
9
|
const INITIAL$2 = {
|
|
11
10
|
// @ts-ignore (TS complains about empty string because we expect an "ActionsType", but it's fine)
|
|
@@ -21,6 +20,8 @@ const INITIAL$2 = {
|
|
|
21
20
|
fallbackSamplingRatio: null,
|
|
22
21
|
samplingPercentage: null,
|
|
23
22
|
endpointsFilters: null,
|
|
23
|
+
servicesNameFilters: null,
|
|
24
|
+
attributeFilters: null,
|
|
24
25
|
};
|
|
25
26
|
const useActionFormData = () => {
|
|
26
27
|
const { addNotification } = useNotificationStore();
|
|
@@ -35,31 +36,31 @@ const useActionFormData = () => {
|
|
|
35
36
|
if (isEmpty(v))
|
|
36
37
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
37
38
|
break;
|
|
38
|
-
case
|
|
39
|
+
case ActionKeyTypes.ClusterAttributes:
|
|
39
40
|
if (formData.type === ActionType.AddClusterInfo && isEmpty(v))
|
|
40
41
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
41
42
|
break;
|
|
42
|
-
case
|
|
43
|
+
case ActionKeyTypes.Renames:
|
|
43
44
|
if (formData.type === ActionType.RenameAttributes && isEmpty(v))
|
|
44
45
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
45
46
|
break;
|
|
46
|
-
case
|
|
47
|
+
case ActionKeyTypes.AttributeNamesToDelete:
|
|
47
48
|
if (formData.type === ActionType.DeleteAttributes && isEmpty(v))
|
|
48
49
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
49
50
|
break;
|
|
50
|
-
case
|
|
51
|
+
case ActionKeyTypes.PiiCategories:
|
|
51
52
|
if (formData.type === ActionType.PiiMasking && isEmpty(v))
|
|
52
53
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
53
54
|
break;
|
|
54
|
-
case
|
|
55
|
+
case ActionKeyTypes.FallbackSamplingRatio:
|
|
55
56
|
if (formData.type === ActionType.ErrorSampler && isEmpty(v))
|
|
56
57
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
57
58
|
break;
|
|
58
|
-
case
|
|
59
|
+
case ActionKeyTypes.SamplingPercentage:
|
|
59
60
|
if (formData.type === ActionType.ProbabilisticSampler && isEmpty(v))
|
|
60
61
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
61
62
|
break;
|
|
62
|
-
case
|
|
63
|
+
case ActionKeyTypes.EndpointsFilters:
|
|
63
64
|
if (formData.type === ActionType.LatencySampler) {
|
|
64
65
|
if (isEmpty(v))
|
|
65
66
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
@@ -69,6 +70,20 @@ const useActionFormData = () => {
|
|
|
69
70
|
});
|
|
70
71
|
}
|
|
71
72
|
break;
|
|
73
|
+
case ActionKeyTypes.ServicesNameFilters:
|
|
74
|
+
if (formData.type === ActionType.ServiceNameSampler) {
|
|
75
|
+
if (isEmpty(v))
|
|
76
|
+
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
77
|
+
v?.forEach((objV) => {
|
|
78
|
+
if (isEmpty(objV))
|
|
79
|
+
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
break;
|
|
83
|
+
case ActionKeyTypes.AttributeFilters:
|
|
84
|
+
if (formData.type === ActionType.SpanAttributeSampler && isEmpty(v))
|
|
85
|
+
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
86
|
+
break;
|
|
72
87
|
}
|
|
73
88
|
});
|
|
74
89
|
ok = !Object.values(errors).length;
|
|
@@ -99,19 +114,21 @@ const useActionFormData = () => {
|
|
|
99
114
|
case 'notes':
|
|
100
115
|
case 'signals':
|
|
101
116
|
case 'disabled':
|
|
102
|
-
case
|
|
103
|
-
case
|
|
104
|
-
case
|
|
105
|
-
case
|
|
106
|
-
case
|
|
107
|
-
case
|
|
108
|
-
case
|
|
109
|
-
case
|
|
110
|
-
case
|
|
111
|
-
case
|
|
112
|
-
case
|
|
113
|
-
case
|
|
114
|
-
case
|
|
117
|
+
case ActionKeyTypes.CollectContainerAttributes:
|
|
118
|
+
case ActionKeyTypes.CollectReplicaSetAttributes:
|
|
119
|
+
case ActionKeyTypes.CollectWorkloadId:
|
|
120
|
+
case ActionKeyTypes.CollectClusterId:
|
|
121
|
+
case ActionKeyTypes.LabelsAttributes:
|
|
122
|
+
case ActionKeyTypes.AnnotationsAttributes:
|
|
123
|
+
case ActionKeyTypes.ClusterAttributes:
|
|
124
|
+
case ActionKeyTypes.AttributeNamesToDelete:
|
|
125
|
+
case ActionKeyTypes.Renames:
|
|
126
|
+
case ActionKeyTypes.PiiCategories:
|
|
127
|
+
case ActionKeyTypes.FallbackSamplingRatio:
|
|
128
|
+
case ActionKeyTypes.SamplingPercentage:
|
|
129
|
+
case ActionKeyTypes.EndpointsFilters:
|
|
130
|
+
case ActionKeyTypes.ServicesNameFilters:
|
|
131
|
+
case ActionKeyTypes.AttributeFilters: {
|
|
115
132
|
// @ts-ignore
|
|
116
133
|
updatedData[k] = v;
|
|
117
134
|
break;
|
|
@@ -330,19 +347,24 @@ const useDestinationFormData = (params) => {
|
|
|
330
347
|
}
|
|
331
348
|
}, [yamlFields, preLoadedFields]);
|
|
332
349
|
useEffect(() => {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
350
|
+
if (dynamicFields) {
|
|
351
|
+
const mapped = dynamicFields.map((field) => ({
|
|
352
|
+
key: field.name,
|
|
353
|
+
value: field.value,
|
|
354
|
+
}));
|
|
355
|
+
handleFormChange('fields', mapped);
|
|
356
|
+
}
|
|
337
357
|
}, [dynamicFields]);
|
|
338
358
|
useEffect(() => {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
359
|
+
if (supportedSignals && mapExportedSignals(formData.exportedSignals).length === 0) {
|
|
360
|
+
const { logs, metrics, traces } = supportedSignals;
|
|
361
|
+
handleFormChange('exportedSignals', {
|
|
362
|
+
logs: logs.supported,
|
|
363
|
+
metrics: metrics.supported,
|
|
364
|
+
traces: traces.supported,
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
}, [supportedSignals, formData]);
|
|
346
368
|
const validateForm = (params) => {
|
|
347
369
|
const errors = {};
|
|
348
370
|
let ok = true;
|
|
@@ -388,6 +410,20 @@ const useDestinationFormData = (params) => {
|
|
|
388
410
|
};
|
|
389
411
|
};
|
|
390
412
|
|
|
413
|
+
const useSessionStorage = () => {
|
|
414
|
+
const getItemSS = (key, defaultValue) => {
|
|
415
|
+
const item = sessionStorage.getItem(key);
|
|
416
|
+
return item ? safeJsonParse(item, defaultValue) : defaultValue;
|
|
417
|
+
};
|
|
418
|
+
const setItemSS = (key, value) => {
|
|
419
|
+
sessionStorage.setItem(key, JSON.stringify(value));
|
|
420
|
+
};
|
|
421
|
+
const removeItemSS = (key) => {
|
|
422
|
+
sessionStorage.removeItem(key);
|
|
423
|
+
};
|
|
424
|
+
return { getItemSS, setItemSS, removeItemSS };
|
|
425
|
+
};
|
|
426
|
+
|
|
391
427
|
const INITIAL = {
|
|
392
428
|
otelServiceName: '',
|
|
393
429
|
currentStreamName: '',
|
|
@@ -586,4 +622,4 @@ const useSourceSelectionFormData = (params) => {
|
|
|
586
622
|
};
|
|
587
623
|
};
|
|
588
624
|
|
|
589
|
-
export { useClickNode as a, useClickNotification as b, useDataStreamFormData as c, useDestinationFormData as d,
|
|
625
|
+
export { useClickNode as a, useClickNotification as b, useDataStreamFormData as c, useDestinationFormData as d, useSessionStorage as e, useSourceFormData as f, useSourceSelectionFormData as g, useActionFormData as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
2
|
-
import { g as useNotificationStore } from './index-
|
|
2
|
+
import { g as useNotificationStore } from './index-CKOBXat_.js';
|
|
3
3
|
import { CodeAttributesKeyTypes, PayloadCollectionKeyTypes } from './types.js';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odigos/ui-kit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.35",
|
|
4
4
|
"author": "Odigos",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -73,56 +73,53 @@
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@xyflow/react": "^12.
|
|
76
|
+
"@xyflow/react": "^12.6.4",
|
|
77
77
|
"javascript-time-ago": "^2.5.11",
|
|
78
78
|
"lottie-react": "^2.4.1",
|
|
79
79
|
"prism-react-renderer": "^2.4.1",
|
|
80
80
|
"react": "^19.1.0",
|
|
81
81
|
"react-dom": "^19.1.0",
|
|
82
|
-
"react-error-boundary": "^
|
|
82
|
+
"react-error-boundary": "^6.0.0",
|
|
83
83
|
"styled-components": "6.1.15",
|
|
84
|
-
"zustand": "^5.0.
|
|
84
|
+
"zustand": "^5.0.5"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@xyflow/react": "^12.6.
|
|
87
|
+
"@xyflow/react": "^12.6.4",
|
|
88
88
|
"javascript-time-ago": "^2.5.11",
|
|
89
89
|
"lottie-react": "^2.4.1",
|
|
90
90
|
"prism-react-renderer": "^2.4.1",
|
|
91
91
|
"react": "^19.1.0",
|
|
92
92
|
"react-dom": "^19.1.0",
|
|
93
|
-
"react-error-boundary": "^
|
|
93
|
+
"react-error-boundary": "^6.0.0",
|
|
94
94
|
"styled-components": "6.1.15",
|
|
95
|
-
"zustand": "^5.0.
|
|
95
|
+
"zustand": "^5.0.5"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
|
-
"@babel/core": "^7.27.
|
|
98
|
+
"@babel/core": "^7.27.3",
|
|
99
99
|
"@babel/preset-env": "^7.27.2",
|
|
100
100
|
"@babel/preset-react": "^7.27.1",
|
|
101
101
|
"@babel/preset-typescript": "^7.27.1",
|
|
102
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
102
103
|
"@rollup/plugin-commonjs": "^28.0.3",
|
|
103
104
|
"@rollup/plugin-json": "^6.1.0",
|
|
104
105
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
105
|
-
"@storybook/addon-essentials": "^8.6.
|
|
106
|
+
"@storybook/addon-essentials": "^8.6.14",
|
|
106
107
|
"@storybook/addon-webpack5-compiler-babel": "^3.0.6",
|
|
107
|
-
"@storybook/react": "^8.6.
|
|
108
|
-
"@storybook/react-webpack5": "^8.6.
|
|
109
|
-
"@types/node": "^22.15.
|
|
110
|
-
"@types/react": "^19.1.
|
|
108
|
+
"@storybook/react": "^8.6.14",
|
|
109
|
+
"@storybook/react-webpack5": "^8.6.14",
|
|
110
|
+
"@types/node": "^22.15.24",
|
|
111
|
+
"@types/react": "^19.1.6",
|
|
111
112
|
"@types/react-dom": "^19.1.5",
|
|
112
|
-
"@types/react-lottie": "^1.2.10",
|
|
113
|
-
"@typescript-eslint/eslint-plugin": "^8.32.1",
|
|
114
|
-
"@typescript-eslint/parser": "^8.32.1",
|
|
115
113
|
"babel-loader": "^10.0.0",
|
|
116
114
|
"babel-plugin-styled-components": "^2.1.4",
|
|
117
|
-
"eslint": "^9.
|
|
118
|
-
"eslint-
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"rollup": "^4.40.2",
|
|
115
|
+
"eslint": "^9.27.0",
|
|
116
|
+
"eslint-config-next": "^15.3.2",
|
|
117
|
+
"next": "^15.3.2",
|
|
118
|
+
"postcss": "^8.5.4",
|
|
119
|
+
"rollup": "^4.41.1",
|
|
123
120
|
"rollup-plugin-postcss": "^4.0.2",
|
|
124
121
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
125
|
-
"storybook": "^8.6.
|
|
122
|
+
"storybook": "^8.6.14",
|
|
126
123
|
"typescript": "^5.8.3"
|
|
127
124
|
}
|
|
128
125
|
}
|
package/lib/index-mOgS3e5E.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
const DEFAULT_DATA_STREAM_NAME = 'default';
|
|
2
|
-
const FORM_ALERTS = {
|
|
3
|
-
REQUIRED_FIELDS: 'Required fields are missing',
|
|
4
|
-
FIELD_IS_REQUIRED: 'This field is required',
|
|
5
|
-
FORBIDDEN: 'Forbidden',
|
|
6
|
-
ENTERPRISE_ONLY: (str = 'This') => `${str} is an Enterprise feature. Please upgrade your plan.`,
|
|
7
|
-
DEFINED_FOR_ALL_STREAMS: (str) => `${str} are defined for all Data Streams.`,
|
|
8
|
-
CANNOT_EDIT_RULE: 'Cannot edit a system-managed instrumentation rule',
|
|
9
|
-
CANNOT_DELETE_RULE: 'Cannot delete a system-managed instrumentation rule',
|
|
10
|
-
LATENCY_HTTP_ROUTE: 'HTTP route must start with a forward slash "/"',
|
|
11
|
-
READONLY_WARNING: "You're not allowed to create/update/delete in readonly mode",
|
|
12
|
-
ILLEGAL_K8S_LABEL: 'Must be 63 characters or less, must consist of alphanumeric characters, "-", "_", or ".", and must start & end with an alphanumeric character (e.g., my-name, 123.abc).',
|
|
13
|
-
};
|
|
14
|
-
const DISPLAY_TITLES = {
|
|
15
|
-
NAMESPACE: 'Namespace',
|
|
16
|
-
NAME: 'Name',
|
|
17
|
-
KIND: 'Kind',
|
|
18
|
-
CONNECTION: 'Connection',
|
|
19
|
-
CONNECTIONS: 'Connections',
|
|
20
|
-
DATA_STREAM: 'Data Stream',
|
|
21
|
-
DATA_STREAMS: 'Data Streams',
|
|
22
|
-
STREAM_NAME: 'Data Stream Name',
|
|
23
|
-
NAME_YOUR_STREAM: 'Name your Data Stream',
|
|
24
|
-
NAME_YOUR_STREAM_PLACEHOLDER: 'e.g. Highest priority',
|
|
25
|
-
STREAM_DESCRIPTION: 'Provide a clear and descriptive name for your pipeline to ensure its purpose is easily understood by you and your team.',
|
|
26
|
-
STREAM_CONFIRM: 'Confirm your new Data Stream',
|
|
27
|
-
ACTION: 'Action',
|
|
28
|
-
ACTIONS: 'Actions',
|
|
29
|
-
ADD_ACTION: 'Add Action',
|
|
30
|
-
ACTION_DETAILS: 'Action Details',
|
|
31
|
-
INSTRUMENTATION_RULE: 'Instrumentation Rule',
|
|
32
|
-
INSTRUMENTATION_RULES: 'Instrumentation Rules',
|
|
33
|
-
ADD_INSTRUMENTATION_RULE: 'Add Instrumentation Rule',
|
|
34
|
-
INSTRUMENTATION_RULE_DETAILS: 'Instrumentation Rule Details',
|
|
35
|
-
DESTINATION: 'Destination',
|
|
36
|
-
DESTINATIONS: 'Destinations',
|
|
37
|
-
ADD_DESTINATION: 'Add Destination',
|
|
38
|
-
ADD_DESTINATIONS: 'Add Destinations',
|
|
39
|
-
ADD_DESTINATION_DESCRIPTION: 'Add a destination to send your telemetry data to. You can add multiple destinations.',
|
|
40
|
-
DESTINATION_DETAILS: 'Destination Details',
|
|
41
|
-
SELECTED_DESTINATIONS: 'Selected Destinations',
|
|
42
|
-
SOURCE: 'Source',
|
|
43
|
-
SOURCES: 'Sources',
|
|
44
|
-
ADD_SOURCE: 'Add Source',
|
|
45
|
-
SOURCE_DETAILS: 'Source Details',
|
|
46
|
-
SELECT_SOURCES: 'Select Sources',
|
|
47
|
-
SELECTED_SOURCES: 'Selected Sources',
|
|
48
|
-
SELECT_SOURCES_DESCRIPTION: 'Select apps to monitor in each namespace. Odigos will instrument them and send telemetry data to your destinations.',
|
|
49
|
-
NO_SOURCES: 'No sources',
|
|
50
|
-
NO_SOURCES_GO_BACK: 'No sources selected. Please go back to select sources.',
|
|
51
|
-
PLEASE_ADD_SOURCE: 'Please add a source',
|
|
52
|
-
NO_SOURCES_NAMESPACE: 'No sources available in this namespace',
|
|
53
|
-
TRY_SEARCH_OR_OTHER_NAMESPACE: 'Try searching again or select another namespace.',
|
|
54
|
-
PLEASE_MAKE_SURE_UNIGNORED_NAMESPACES: 'Please make sure your cluster has unignored namespaces',
|
|
55
|
-
INSTALLATION: 'Installation',
|
|
56
|
-
SUMMARY: 'Summary',
|
|
57
|
-
TYPE: 'Type',
|
|
58
|
-
NOTES: 'Notes',
|
|
59
|
-
STATUS: 'Status',
|
|
60
|
-
READONLY: 'Readonly',
|
|
61
|
-
LANGUAGE: 'Language',
|
|
62
|
-
MONITORS: 'Monitors',
|
|
63
|
-
SIGNALS_FOR_PROCESSING: 'Signals for Processing',
|
|
64
|
-
MANAGED_BY_PROFILE: 'Managed by Profile',
|
|
65
|
-
API_TOKEN: 'API Token',
|
|
66
|
-
API_TOKENS: 'API Tokens',
|
|
67
|
-
DESCRIBE_ODIGOS: 'Describe Odigos',
|
|
68
|
-
DESCRIBE_SOURCE: 'Describe Source',
|
|
69
|
-
DETECTED_CONTAINERS: 'Detected Containers',
|
|
70
|
-
DETECTED_CONTAINERS_DESCRIPTION: 'The system automatically instruments the containers it detects with a supported programming language.',
|
|
71
|
-
CONTAINER_NAME: 'Container Name',
|
|
72
|
-
FILTERED_COUNT_TOOLTIP: 'Represents filtered amount, out of total amount',
|
|
73
|
-
SEARCH_NAMESPACES: 'Search Namespaces',
|
|
74
|
-
SHOW_SELECTED_ONLY: 'Show selected only',
|
|
75
|
-
TO_COLLECT_OTEL_DATA: 'To collect OpenTelemetry data',
|
|
76
|
-
TO_MONITOR_OTEL_DATA: 'To monitor OpenTelemetry data',
|
|
77
|
-
TO_MODIFY_OTEL_DATA: 'To modify OpenTelemetry data',
|
|
78
|
-
QUICK_BACK_TO_SUMMARY: 'When you finish editing you can quickly go back to the summary.',
|
|
79
|
-
GO_TO_SUMMARY: 'Go to summary',
|
|
80
|
-
};
|
|
81
|
-
const BUTTON_TEXTS = {
|
|
82
|
-
ADD: 'Add',
|
|
83
|
-
ADD_NEW: 'Add New',
|
|
84
|
-
NEW: 'New',
|
|
85
|
-
SELECT: 'Select',
|
|
86
|
-
CREATE: 'Create',
|
|
87
|
-
UPDATE: 'Update',
|
|
88
|
-
EDIT: 'Edit',
|
|
89
|
-
DELETE: 'Delete',
|
|
90
|
-
CANCEL: 'Cancel',
|
|
91
|
-
DONE: 'Done',
|
|
92
|
-
SAVE: 'Save',
|
|
93
|
-
BACK: 'Back',
|
|
94
|
-
NEXT: 'Next',
|
|
95
|
-
TEST: 'Test',
|
|
96
|
-
TEST_CONNECTION: 'Test Connection',
|
|
97
|
-
INSTRUMENT: 'Instrument',
|
|
98
|
-
UNINSTRUMENT: 'Uninstrument',
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
export { BUTTON_TEXTS as B, DEFAULT_DATA_STREAM_NAME as D, FORM_ALERTS as F, DISPLAY_TITLES as a };
|