@odigos/ui-kit 0.0.32 → 0.0.34
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/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 +11 -11
- package/lib/constants/strings/index.d.ts +1 -0
- package/lib/constants.js +2 -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-stream-drawer/index.d.ts +1 -1
- package/lib/containers/data-stream-form/index.d.ts +1 -0
- package/lib/containers/destination-selection-form/destination-list/index.d.ts +2 -0
- package/lib/containers/instrumentation-rule-drawer/build-card.d.ts +1 -1
- package/lib/containers/setup-summary/index.d.ts +2 -0
- package/lib/containers.js +379 -189
- package/lib/functions/get-action-icon/index.d.ts +2 -2
- package/lib/functions/get-yaml-fields-for-destination/index.d.ts +2 -0
- package/lib/functions/index.d.ts +4 -0
- package/lib/functions/is-legal-k8s-label/index.d.ts +1 -0
- package/lib/functions/map-destination-fields-for-display/index.d.ts +6 -0
- package/lib/functions/numbers-only/index.d.ts +1 -0
- package/lib/functions.js +8 -8
- package/lib/hooks.js +6 -6
- package/lib/icons.js +7 -7
- package/lib/{index-DR5ryS5d.js → index--RecCPGA.js} +1 -1
- package/lib/{index-cG2lNgzz.js → index-BBjwRlta.js} +41 -6
- package/lib/{index-B3j_QWzh.js → index-BWZT-ipR.js} +1 -1
- package/lib/{index-BxckQJom.js → index-BZq0yNL-.js} +90 -45
- package/lib/{index-DuSmjoDs.js → index-Bd8ZAEvq.js} +1 -1
- package/lib/{index-DAbcw-wM.js → index-CIKkezVt.js} +1 -1
- package/lib/{index-C7YDojNh.js → index-ChYtqgBW.js} +9 -3
- package/lib/{index-7-KCQK-x.js → index-CnZlllYu.js} +10 -1
- package/lib/{index-PfG5pvFK.js → index-Cq8NT9Hr.js} +1 -1
- package/lib/{index-ivnS3eWW.js → index-DJGe2YeC.js} +128 -111
- package/lib/{index-rbphz5kH.js → index-a_WA-82O.js} +2 -2
- package/lib/{index-B9cvsYnj.js → index-mOgS3e5E.js} +1 -0
- package/lib/{index-DeD-SIlN.js → index-ovjVbVQq.js} +5 -5
- package/lib/snippets.js +10 -10
- 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 +4 -16
- package/lib/types.js +78 -20
- package/lib/{useSourceSelectionFormData-A5_zhn1C.js → useSourceSelectionFormData-DBNf1uEe.js} +48 -26
- package/lib/{useTransition-9tDdAS9s.js → useTransition-dZ92VxT2.js} +1 -1
- package/package.json +12 -12
- package/lib/{index-BZS1ijMm.js → index-BV85P9UP.js} +14 -14
|
@@ -1,14 +1,37 @@
|
|
|
1
1
|
import { SignalType } from '../signals';
|
|
2
2
|
import type { Condition, SVG } from '../common';
|
|
3
|
+
export declare enum ActionCategory {
|
|
4
|
+
Attributes = "attributes",
|
|
5
|
+
Samplers = "samplers"
|
|
6
|
+
}
|
|
3
7
|
export declare enum ActionType {
|
|
4
8
|
K8sAttributes = "K8sAttributesResolver",
|
|
5
9
|
AddClusterInfo = "AddClusterInfo",
|
|
6
10
|
DeleteAttributes = "DeleteAttribute",
|
|
7
11
|
RenameAttributes = "RenameAttribute",
|
|
12
|
+
PiiMasking = "PiiMasking",
|
|
8
13
|
ErrorSampler = "ErrorSampler",
|
|
9
14
|
ProbabilisticSampler = "ProbabilisticSampler",
|
|
10
15
|
LatencySampler = "LatencySampler",
|
|
11
|
-
|
|
16
|
+
ServiceNameSampler = "ServiceNameSampler",
|
|
17
|
+
SpanAttributeSampler = "SpanAttributeSampler"
|
|
18
|
+
}
|
|
19
|
+
export declare enum ActionKeyTypes {
|
|
20
|
+
CollectContainerAttributes = "collectContainerAttributes",
|
|
21
|
+
CollectReplicaSetAttributes = "collectReplicaSetAttributes",
|
|
22
|
+
CollectWorkloadId = "collectWorkloadId",
|
|
23
|
+
CollectClusterId = "collectClusterId",
|
|
24
|
+
LabelsAttributes = "labelsAttributes",
|
|
25
|
+
AnnotationsAttributes = "annotationsAttributes",
|
|
26
|
+
ClusterAttributes = "clusterAttributes",
|
|
27
|
+
AttributeNamesToDelete = "attributeNamesToDelete",
|
|
28
|
+
Renames = "renames",
|
|
29
|
+
PiiCategories = "piiCategories",
|
|
30
|
+
FallbackSamplingRatio = "fallbackSamplingRatio",
|
|
31
|
+
SamplingPercentage = "samplingPercentage",
|
|
32
|
+
EndpointsFilters = "endpointsFilters",
|
|
33
|
+
ServicesNameFilters = "servicesNameFilters",
|
|
34
|
+
AttributeFilters = "attributeFilters"
|
|
12
35
|
}
|
|
13
36
|
export interface Action {
|
|
14
37
|
id: string;
|
|
@@ -19,35 +42,23 @@ export interface Action {
|
|
|
19
42
|
notes?: string;
|
|
20
43
|
signals: SignalType[];
|
|
21
44
|
disabled?: boolean;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
annotationKey: string;
|
|
32
|
-
attributeKey: string;
|
|
33
|
-
}[] | null;
|
|
34
|
-
clusterAttributes?: {
|
|
35
|
-
attributeName: string;
|
|
36
|
-
attributeStringValue: string;
|
|
37
|
-
}[] | null;
|
|
38
|
-
attributeNamesToDelete?: string[] | null;
|
|
39
|
-
renames?: {
|
|
45
|
+
[ActionKeyTypes.CollectContainerAttributes]?: boolean | null;
|
|
46
|
+
[ActionKeyTypes.CollectReplicaSetAttributes]?: boolean | null;
|
|
47
|
+
[ActionKeyTypes.CollectWorkloadId]?: boolean | null;
|
|
48
|
+
[ActionKeyTypes.CollectClusterId]?: boolean | null;
|
|
49
|
+
[ActionKeyTypes.LabelsAttributes]?: LabelsAttributes[] | null;
|
|
50
|
+
[ActionKeyTypes.AnnotationsAttributes]?: AnnotationsAttributes[] | null;
|
|
51
|
+
[ActionKeyTypes.ClusterAttributes]?: ClusterAttributes[] | null;
|
|
52
|
+
[ActionKeyTypes.AttributeNamesToDelete]?: string[] | null;
|
|
53
|
+
[ActionKeyTypes.Renames]?: {
|
|
40
54
|
[oldKey: string]: string;
|
|
41
55
|
} | null;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
minimumLatencyThreshold: number;
|
|
49
|
-
fallbackSamplingRatio: number;
|
|
50
|
-
}[] | null;
|
|
56
|
+
[ActionKeyTypes.PiiCategories]?: string[] | null;
|
|
57
|
+
[ActionKeyTypes.FallbackSamplingRatio]?: number | null;
|
|
58
|
+
[ActionKeyTypes.SamplingPercentage]?: number | null;
|
|
59
|
+
[ActionKeyTypes.EndpointsFilters]?: EndpointsFilters[] | null;
|
|
60
|
+
[ActionKeyTypes.ServicesNameFilters]?: ServicesNameFilters[] | null;
|
|
61
|
+
[ActionKeyTypes.AttributeFilters]?: AttributeFilters[] | null;
|
|
51
62
|
};
|
|
52
63
|
}
|
|
53
64
|
export interface ActionOption {
|
|
@@ -66,17 +77,102 @@ export interface ActionFormData {
|
|
|
66
77
|
notes: Action['spec']['notes'];
|
|
67
78
|
signals: Action['spec']['signals'];
|
|
68
79
|
disabled: Action['spec']['disabled'];
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
[ActionKeyTypes.CollectContainerAttributes]: Action['spec'][ActionKeyTypes.CollectContainerAttributes];
|
|
81
|
+
[ActionKeyTypes.CollectReplicaSetAttributes]: Action['spec'][ActionKeyTypes.CollectReplicaSetAttributes];
|
|
82
|
+
[ActionKeyTypes.CollectWorkloadId]: Action['spec'][ActionKeyTypes.CollectWorkloadId];
|
|
83
|
+
[ActionKeyTypes.CollectClusterId]: Action['spec'][ActionKeyTypes.CollectClusterId];
|
|
84
|
+
[ActionKeyTypes.LabelsAttributes]: Action['spec'][ActionKeyTypes.LabelsAttributes];
|
|
85
|
+
[ActionKeyTypes.AnnotationsAttributes]: Action['spec'][ActionKeyTypes.AnnotationsAttributes];
|
|
86
|
+
[ActionKeyTypes.ClusterAttributes]: Action['spec'][ActionKeyTypes.ClusterAttributes];
|
|
87
|
+
[ActionKeyTypes.AttributeNamesToDelete]: Action['spec'][ActionKeyTypes.AttributeNamesToDelete];
|
|
88
|
+
[ActionKeyTypes.Renames]: Action['spec'][ActionKeyTypes.Renames];
|
|
89
|
+
[ActionKeyTypes.PiiCategories]: Action['spec'][ActionKeyTypes.PiiCategories];
|
|
90
|
+
[ActionKeyTypes.FallbackSamplingRatio]: Action['spec'][ActionKeyTypes.FallbackSamplingRatio];
|
|
91
|
+
[ActionKeyTypes.SamplingPercentage]: Action['spec'][ActionKeyTypes.SamplingPercentage];
|
|
92
|
+
[ActionKeyTypes.EndpointsFilters]: Action['spec'][ActionKeyTypes.EndpointsFilters];
|
|
93
|
+
[ActionKeyTypes.ServicesNameFilters]: Action['spec'][ActionKeyTypes.ServicesNameFilters];
|
|
94
|
+
[ActionKeyTypes.AttributeFilters]: Action['spec'][ActionKeyTypes.AttributeFilters];
|
|
95
|
+
}
|
|
96
|
+
export interface LabelsAttributes {
|
|
97
|
+
labelKey: string;
|
|
98
|
+
attributeKey: string;
|
|
99
|
+
}
|
|
100
|
+
export interface AnnotationsAttributes {
|
|
101
|
+
annotationKey: string;
|
|
102
|
+
attributeKey: string;
|
|
103
|
+
}
|
|
104
|
+
export interface ClusterAttributes {
|
|
105
|
+
attributeName: string;
|
|
106
|
+
attributeStringValue: string;
|
|
107
|
+
}
|
|
108
|
+
export interface EndpointsFilters {
|
|
109
|
+
serviceName: string;
|
|
110
|
+
httpRoute: string;
|
|
111
|
+
minimumLatencyThreshold: number;
|
|
112
|
+
fallbackSamplingRatio: number;
|
|
113
|
+
}
|
|
114
|
+
export interface ServicesNameFilters {
|
|
115
|
+
serviceName: string;
|
|
116
|
+
samplingRatio: number;
|
|
117
|
+
fallbackSamplingRatio: number;
|
|
118
|
+
}
|
|
119
|
+
export declare enum StringOperation {
|
|
120
|
+
EXISTS = "exists",
|
|
121
|
+
EQUALS = "equals",
|
|
122
|
+
NOT_EQUALS = "not_equals",
|
|
123
|
+
CONTAINS = "contains",
|
|
124
|
+
NOT_CONTAINS = "not_contains",
|
|
125
|
+
REGEX = "regex"
|
|
126
|
+
}
|
|
127
|
+
export declare enum NumberOperation {
|
|
128
|
+
EXISTS = "exists",
|
|
129
|
+
EQUALS = "equals",
|
|
130
|
+
NOT_EQUALS = "not_equals",
|
|
131
|
+
GREATER_THAN = "greater_than",
|
|
132
|
+
LESS_THAN = "less_than",
|
|
133
|
+
GREATER_THAN_OR_EQUAL = "greater_than_or_equal",
|
|
134
|
+
LESS_THAN_OR_EQUAL = "less_than_or_equal"
|
|
135
|
+
}
|
|
136
|
+
export declare enum BooleanOperation {
|
|
137
|
+
EXISTS = "exists",
|
|
138
|
+
EQUALS = "equals"
|
|
139
|
+
}
|
|
140
|
+
export declare enum JsonOperation {
|
|
141
|
+
EXISTS = "exists",
|
|
142
|
+
EQUALS = "equals",
|
|
143
|
+
NOT_EQUALS = "not_equals",
|
|
144
|
+
IS_VALID_JSON = "is_valid_json",
|
|
145
|
+
IS_INVALID_JSON = "is_invalid_json",
|
|
146
|
+
JSONPATH_EXISTS = "jsonpath_exists",
|
|
147
|
+
KEY_EQUALS = "key_equals",
|
|
148
|
+
KEY_NOT_EQUALS = "key_not_equals"
|
|
149
|
+
}
|
|
150
|
+
export interface StringCondition {
|
|
151
|
+
operation: StringOperation;
|
|
152
|
+
expectedValue?: string;
|
|
153
|
+
}
|
|
154
|
+
export interface NumberCondition {
|
|
155
|
+
operation: NumberOperation;
|
|
156
|
+
expectedValue?: string | number;
|
|
157
|
+
}
|
|
158
|
+
export interface BooleanCondition {
|
|
159
|
+
operation: BooleanOperation;
|
|
160
|
+
expectedValue?: string | boolean;
|
|
161
|
+
}
|
|
162
|
+
export interface JsonCondition {
|
|
163
|
+
operation: JsonOperation;
|
|
164
|
+
expectedValue?: string;
|
|
165
|
+
jsonPath?: string;
|
|
166
|
+
}
|
|
167
|
+
export interface AttributeFiltersCondition {
|
|
168
|
+
stringCondition?: StringCondition;
|
|
169
|
+
numberCondition?: NumberCondition;
|
|
170
|
+
booleanCondition?: BooleanCondition;
|
|
171
|
+
jsonCondition?: JsonCondition;
|
|
172
|
+
}
|
|
173
|
+
export interface AttributeFilters {
|
|
174
|
+
serviceName: string;
|
|
175
|
+
attributeKey: string;
|
|
176
|
+
fallbackSamplingRatio: number;
|
|
177
|
+
condition: AttributeFiltersCondition;
|
|
82
178
|
}
|
|
@@ -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",
|
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";
|
|
@@ -241,4 +299,4 @@ var K8sResourceKind;
|
|
|
241
299
|
K8sResourceKind["StatefulSet"] = "StatefulSet";
|
|
242
300
|
})(K8sResourceKind || (K8sResourceKind = {}));
|
|
243
301
|
|
|
244
|
-
export { ActionType, AddNodeTypes,
|
|
302
|
+
export { ActionCategory, ActionKeyTypes, ActionType, AddNodeTypes, BooleanOperation, CodeAttributesKeyTypes, Crud, DestinationTypes, EdgeTypes, EntityTypes, FieldTypes, HeadersCollectionKeyTypes, InputTypes, InstrumentationRuleType, JsonOperation, K8sResourceKind, NodeTypes, NumberOperation, OtherStatus, PayloadCollectionKeyTypes, PlatformType, ProgrammingLanguages, SignalType, SortDirection, StatusType, StringOperation, Tier };
|
package/lib/{useSourceSelectionFormData-A5_zhn1C.js → useSourceSelectionFormData-DBNf1uEe.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
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-
|
|
1
|
+
import { ActionKeyTypes, 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-DJGe2YeC.js';
|
|
3
|
+
import { F as FORM_ALERTS } from './index-mOgS3e5E.js';
|
|
4
4
|
import { useState, useEffect, useMemo } from 'react';
|
|
5
5
|
import 'styled-components';
|
|
6
|
-
import { i as isEmpty, s as safeJsonParse } from './index-
|
|
7
|
-
import { b as useGenericForm } from './useTransition-
|
|
8
|
-
import { g as getIdFromSseTarget } from './index-
|
|
6
|
+
import { i as isEmpty, s as safeJsonParse } from './index-BV85P9UP.js';
|
|
7
|
+
import { b as useGenericForm } from './useTransition-dZ92VxT2.js';
|
|
8
|
+
import { g as getIdFromSseTarget, i as isLegalK8sLabel } from './index-CnZlllYu.js';
|
|
9
9
|
|
|
10
10
|
const INITIAL$2 = {
|
|
11
11
|
// @ts-ignore (TS complains about empty string because we expect an "ActionsType", but it's fine)
|
|
@@ -21,6 +21,8 @@ const INITIAL$2 = {
|
|
|
21
21
|
fallbackSamplingRatio: null,
|
|
22
22
|
samplingPercentage: null,
|
|
23
23
|
endpointsFilters: null,
|
|
24
|
+
servicesNameFilters: null,
|
|
25
|
+
attributeFilters: null,
|
|
24
26
|
};
|
|
25
27
|
const useActionFormData = () => {
|
|
26
28
|
const { addNotification } = useNotificationStore();
|
|
@@ -35,31 +37,31 @@ const useActionFormData = () => {
|
|
|
35
37
|
if (isEmpty(v))
|
|
36
38
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
37
39
|
break;
|
|
38
|
-
case
|
|
40
|
+
case ActionKeyTypes.ClusterAttributes:
|
|
39
41
|
if (formData.type === ActionType.AddClusterInfo && isEmpty(v))
|
|
40
42
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
41
43
|
break;
|
|
42
|
-
case
|
|
44
|
+
case ActionKeyTypes.Renames:
|
|
43
45
|
if (formData.type === ActionType.RenameAttributes && isEmpty(v))
|
|
44
46
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
45
47
|
break;
|
|
46
|
-
case
|
|
48
|
+
case ActionKeyTypes.AttributeNamesToDelete:
|
|
47
49
|
if (formData.type === ActionType.DeleteAttributes && isEmpty(v))
|
|
48
50
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
49
51
|
break;
|
|
50
|
-
case
|
|
52
|
+
case ActionKeyTypes.PiiCategories:
|
|
51
53
|
if (formData.type === ActionType.PiiMasking && isEmpty(v))
|
|
52
54
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
53
55
|
break;
|
|
54
|
-
case
|
|
56
|
+
case ActionKeyTypes.FallbackSamplingRatio:
|
|
55
57
|
if (formData.type === ActionType.ErrorSampler && isEmpty(v))
|
|
56
58
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
57
59
|
break;
|
|
58
|
-
case
|
|
60
|
+
case ActionKeyTypes.SamplingPercentage:
|
|
59
61
|
if (formData.type === ActionType.ProbabilisticSampler && isEmpty(v))
|
|
60
62
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
61
63
|
break;
|
|
62
|
-
case
|
|
64
|
+
case ActionKeyTypes.EndpointsFilters:
|
|
63
65
|
if (formData.type === ActionType.LatencySampler) {
|
|
64
66
|
if (isEmpty(v))
|
|
65
67
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
@@ -69,6 +71,20 @@ const useActionFormData = () => {
|
|
|
69
71
|
});
|
|
70
72
|
}
|
|
71
73
|
break;
|
|
74
|
+
case ActionKeyTypes.ServicesNameFilters:
|
|
75
|
+
if (formData.type === ActionType.ServiceNameSampler) {
|
|
76
|
+
if (isEmpty(v))
|
|
77
|
+
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
78
|
+
v?.forEach((objV) => {
|
|
79
|
+
if (isEmpty(objV))
|
|
80
|
+
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
break;
|
|
84
|
+
case ActionKeyTypes.AttributeFilters:
|
|
85
|
+
if (formData.type === ActionType.SpanAttributeSampler && isEmpty(v))
|
|
86
|
+
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
87
|
+
break;
|
|
72
88
|
}
|
|
73
89
|
});
|
|
74
90
|
ok = !Object.values(errors).length;
|
|
@@ -99,19 +115,21 @@ const useActionFormData = () => {
|
|
|
99
115
|
case 'notes':
|
|
100
116
|
case 'signals':
|
|
101
117
|
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
|
|
118
|
+
case ActionKeyTypes.CollectContainerAttributes:
|
|
119
|
+
case ActionKeyTypes.CollectReplicaSetAttributes:
|
|
120
|
+
case ActionKeyTypes.CollectWorkloadId:
|
|
121
|
+
case ActionKeyTypes.CollectClusterId:
|
|
122
|
+
case ActionKeyTypes.LabelsAttributes:
|
|
123
|
+
case ActionKeyTypes.AnnotationsAttributes:
|
|
124
|
+
case ActionKeyTypes.ClusterAttributes:
|
|
125
|
+
case ActionKeyTypes.AttributeNamesToDelete:
|
|
126
|
+
case ActionKeyTypes.Renames:
|
|
127
|
+
case ActionKeyTypes.PiiCategories:
|
|
128
|
+
case ActionKeyTypes.FallbackSamplingRatio:
|
|
129
|
+
case ActionKeyTypes.SamplingPercentage:
|
|
130
|
+
case ActionKeyTypes.EndpointsFilters:
|
|
131
|
+
case ActionKeyTypes.ServicesNameFilters:
|
|
132
|
+
case ActionKeyTypes.AttributeFilters: {
|
|
115
133
|
// @ts-ignore
|
|
116
134
|
updatedData[k] = v;
|
|
117
135
|
break;
|
|
@@ -213,6 +231,10 @@ const useDataStreamFormData = (initialFormData) => {
|
|
|
213
231
|
isValid = false;
|
|
214
232
|
errors['name'] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
215
233
|
}
|
|
234
|
+
else if (!isLegalK8sLabel(formData['name'])) {
|
|
235
|
+
isValid = false;
|
|
236
|
+
errors['name'] = FORM_ALERTS.ILLEGAL_K8S_LABEL;
|
|
237
|
+
}
|
|
216
238
|
else {
|
|
217
239
|
errors['name'] = undefined;
|
|
218
240
|
}
|
|
@@ -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-DJGe2YeC.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.34",
|
|
4
4
|
"author": "Odigos",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -84,15 +84,15 @@
|
|
|
84
84
|
"zustand": "^5.0.3"
|
|
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
98
|
"@babel/core": "^7.27.1",
|
|
@@ -102,27 +102,27 @@
|
|
|
102
102
|
"@rollup/plugin-commonjs": "^28.0.3",
|
|
103
103
|
"@rollup/plugin-json": "^6.1.0",
|
|
104
104
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
105
|
-
"@storybook/addon-essentials": "^8.6.
|
|
105
|
+
"@storybook/addon-essentials": "^8.6.14",
|
|
106
106
|
"@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.
|
|
107
|
+
"@storybook/react": "^8.6.14",
|
|
108
|
+
"@storybook/react-webpack5": "^8.6.14",
|
|
109
|
+
"@types/node": "^22.15.21",
|
|
110
|
+
"@types/react": "^19.1.5",
|
|
111
111
|
"@types/react-dom": "^19.1.5",
|
|
112
112
|
"@types/react-lottie": "^1.2.10",
|
|
113
113
|
"@typescript-eslint/eslint-plugin": "^8.32.1",
|
|
114
114
|
"@typescript-eslint/parser": "^8.32.1",
|
|
115
115
|
"babel-loader": "^10.0.0",
|
|
116
116
|
"babel-plugin-styled-components": "^2.1.4",
|
|
117
|
-
"eslint": "^9.
|
|
117
|
+
"eslint": "^9.27.0",
|
|
118
118
|
"eslint-plugin-react": "^7.37.5",
|
|
119
119
|
"eslint-plugin-storybook": "^0.12.0",
|
|
120
120
|
"html-webpack-plugin": "^5.6.3",
|
|
121
121
|
"postcss": "^8.5.3",
|
|
122
|
-
"rollup": "^4.
|
|
122
|
+
"rollup": "^4.41.1",
|
|
123
123
|
"rollup-plugin-postcss": "^4.0.2",
|
|
124
124
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
125
|
-
"storybook": "^8.6.
|
|
125
|
+
"storybook": "^8.6.14",
|
|
126
126
|
"typescript": "^5.8.3"
|
|
127
127
|
}
|
|
128
128
|
}
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
// Sometimes we need to allow "zero" values, and a simple "!val" check would result in false positives.
|
|
2
|
-
// This function is a strict check for empty values, permitting values like "0" and "false".
|
|
3
|
-
const isEmpty = (val) => {
|
|
4
|
-
if (Array.isArray(val)) {
|
|
5
|
-
return !val?.length;
|
|
6
|
-
}
|
|
7
|
-
else if (typeof val === 'object') {
|
|
8
|
-
return !Object.keys(val || {}).length;
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
return [undefined, null, ''].includes(val);
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
|
|
15
1
|
function safeJsonParse(val, fallback) {
|
|
16
2
|
if (!val)
|
|
17
3
|
return fallback;
|
|
@@ -27,4 +13,18 @@ function safeJsonParse(val, fallback) {
|
|
|
27
13
|
}
|
|
28
14
|
}
|
|
29
15
|
|
|
16
|
+
// Sometimes we need to allow "zero" values, and a simple "!val" check would result in false positives.
|
|
17
|
+
// This function is a strict check for empty values, permitting values like "0" and "false".
|
|
18
|
+
const isEmpty = (val) => {
|
|
19
|
+
if (Array.isArray(val)) {
|
|
20
|
+
return !val?.length;
|
|
21
|
+
}
|
|
22
|
+
else if (typeof val === 'object') {
|
|
23
|
+
return !Object.keys(val || {}).length;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return [undefined, null, ''].includes(val);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
30
|
export { isEmpty as i, safeJsonParse as s };
|