@odigos/ui-kit 0.0.10 → 0.0.12
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/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 +9 -8
- package/lib/components/interactive-table/table-row.d.ts +13 -0
- 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 +373 -366
- 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-B5wdZoej.js} +106 -111
- 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/components/interactive-table/row.d.ts +0 -13
- package/lib/functions/derive-type-from-rule/index.d.ts +0 -2
package/lib/types.js
CHANGED
|
@@ -1,166 +1,171 @@
|
|
|
1
|
-
var
|
|
2
|
-
(function (
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
})(
|
|
1
|
+
var ActionType;
|
|
2
|
+
(function (ActionType) {
|
|
3
|
+
ActionType["K8sAttributes"] = "K8sAttributesResolver";
|
|
4
|
+
ActionType["AddClusterInfo"] = "AddClusterInfo";
|
|
5
|
+
ActionType["DeleteAttributes"] = "DeleteAttribute";
|
|
6
|
+
ActionType["RenameAttributes"] = "RenameAttribute";
|
|
7
|
+
ActionType["ErrorSampler"] = "ErrorSampler";
|
|
8
|
+
ActionType["ProbabilisticSampler"] = "ProbabilisticSampler";
|
|
9
|
+
ActionType["LatencySampler"] = "LatencySampler";
|
|
10
|
+
ActionType["PiiMasking"] = "PiiMasking";
|
|
11
|
+
})(ActionType || (ActionType = {}));
|
|
12
12
|
|
|
13
|
-
var
|
|
14
|
-
(function (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
})(
|
|
19
|
-
var
|
|
20
|
-
(function (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
})(
|
|
24
|
-
var
|
|
25
|
-
(function (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
})(
|
|
49
|
-
var
|
|
50
|
-
(function (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
})(
|
|
56
|
-
var
|
|
57
|
-
(function (
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
})(
|
|
63
|
-
var
|
|
64
|
-
(function (
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
})(
|
|
74
|
-
var
|
|
75
|
-
(function (
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
})(
|
|
92
|
-
var
|
|
93
|
-
(function (
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
})(
|
|
100
|
-
var
|
|
101
|
-
(function (
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
})(
|
|
13
|
+
var Tier;
|
|
14
|
+
(function (Tier) {
|
|
15
|
+
Tier["Community"] = "community";
|
|
16
|
+
Tier["Cloud"] = "cloud";
|
|
17
|
+
Tier["Onprem"] = "onprem";
|
|
18
|
+
})(Tier || (Tier = {}));
|
|
19
|
+
var PlatformType;
|
|
20
|
+
(function (PlatformType) {
|
|
21
|
+
PlatformType["K8s"] = "k8s";
|
|
22
|
+
PlatformType["Vm"] = "vm";
|
|
23
|
+
})(PlatformType || (PlatformType = {}));
|
|
24
|
+
var ProgrammingLanguages;
|
|
25
|
+
(function (ProgrammingLanguages) {
|
|
26
|
+
ProgrammingLanguages["Go"] = "go";
|
|
27
|
+
ProgrammingLanguages["JavaScript"] = "javascript";
|
|
28
|
+
ProgrammingLanguages["Python"] = "python";
|
|
29
|
+
ProgrammingLanguages["Java"] = "java";
|
|
30
|
+
ProgrammingLanguages["DotNet"] = "dotnet";
|
|
31
|
+
ProgrammingLanguages["CSharp"] = "csharp";
|
|
32
|
+
ProgrammingLanguages["CPlusPlus"] = "cplusplus";
|
|
33
|
+
ProgrammingLanguages["Php"] = "php";
|
|
34
|
+
ProgrammingLanguages["Ruby"] = "ruby";
|
|
35
|
+
ProgrammingLanguages["Rust"] = "rust";
|
|
36
|
+
ProgrammingLanguages["Swift"] = "swift";
|
|
37
|
+
ProgrammingLanguages["Elixir"] = "elixir";
|
|
38
|
+
ProgrammingLanguages["MySql"] = "mysql";
|
|
39
|
+
ProgrammingLanguages["Nginx"] = "nginx";
|
|
40
|
+
ProgrammingLanguages["Postgres"] = "postgres";
|
|
41
|
+
ProgrammingLanguages["Redis"] = "redis";
|
|
42
|
+
ProgrammingLanguages["Kafka"] = "kafka";
|
|
43
|
+
ProgrammingLanguages["Ignored"] = "ignored";
|
|
44
|
+
ProgrammingLanguages["Unknown"] = "unknown";
|
|
45
|
+
ProgrammingLanguages["Processing"] = "processing";
|
|
46
|
+
ProgrammingLanguages["NoContainers"] = "no containers";
|
|
47
|
+
ProgrammingLanguages["NoRunningPods"] = "no running pods";
|
|
48
|
+
})(ProgrammingLanguages || (ProgrammingLanguages = {}));
|
|
49
|
+
var Crud;
|
|
50
|
+
(function (Crud) {
|
|
51
|
+
Crud["Create"] = "Create";
|
|
52
|
+
Crud["Read"] = "Read";
|
|
53
|
+
Crud["Update"] = "Update";
|
|
54
|
+
Crud["Delete"] = "Delete";
|
|
55
|
+
})(Crud || (Crud = {}));
|
|
56
|
+
var EntityTypes;
|
|
57
|
+
(function (EntityTypes) {
|
|
58
|
+
EntityTypes["Source"] = "source";
|
|
59
|
+
EntityTypes["Destination"] = "destination";
|
|
60
|
+
EntityTypes["Action"] = "action";
|
|
61
|
+
EntityTypes["InstrumentationRule"] = "instrumentation rule";
|
|
62
|
+
})(EntityTypes || (EntityTypes = {}));
|
|
63
|
+
var FieldTypes;
|
|
64
|
+
(function (FieldTypes) {
|
|
65
|
+
FieldTypes["Input"] = "input";
|
|
66
|
+
FieldTypes["MultiInput"] = "multiInput";
|
|
67
|
+
FieldTypes["MultiTabledInput"] = "multiTabledInput";
|
|
68
|
+
FieldTypes["KeyValuePair"] = "keyValuePairs";
|
|
69
|
+
FieldTypes["TextArea"] = "textarea";
|
|
70
|
+
FieldTypes["Dropdown"] = "dropdown";
|
|
71
|
+
FieldTypes["Checkbox"] = "checkbox";
|
|
72
|
+
FieldTypes["Toggle"] = "toggle";
|
|
73
|
+
})(FieldTypes || (FieldTypes = {}));
|
|
74
|
+
var CrdTypes;
|
|
75
|
+
(function (CrdTypes) {
|
|
76
|
+
CrdTypes["OdigosConfig"] = "OdigosConfiguration";
|
|
77
|
+
CrdTypes["CollectorsGroup"] = "CollectorsGroup";
|
|
78
|
+
CrdTypes["Source"] = "Source";
|
|
79
|
+
CrdTypes["InstrumentationConfig"] = "InstrumentationConfig";
|
|
80
|
+
CrdTypes["InstrumentationInstance"] = "InstrumentationInstance";
|
|
81
|
+
CrdTypes["Destination"] = "Destination";
|
|
82
|
+
CrdTypes["InstrumentationRule"] = "InstrumentationRule";
|
|
83
|
+
CrdTypes["Processor"] = "Processor";
|
|
84
|
+
CrdTypes["AddClusterInfo"] = "AddClusterInfo";
|
|
85
|
+
CrdTypes["DeleteAttributes"] = "DeleteAttribute";
|
|
86
|
+
CrdTypes["RenameAttributes"] = "RenameAttribute";
|
|
87
|
+
CrdTypes["PiiMasking"] = "PiiMasking";
|
|
88
|
+
CrdTypes["ErrorSampler"] = "ErrorSampler";
|
|
89
|
+
CrdTypes["LatencySampler"] = "LatencySampler";
|
|
90
|
+
CrdTypes["ProbabilisticSampler"] = "ProbabilisticSampler";
|
|
91
|
+
})(CrdTypes || (CrdTypes = {}));
|
|
92
|
+
var StatusType;
|
|
93
|
+
(function (StatusType) {
|
|
94
|
+
StatusType["Warning"] = "warning";
|
|
95
|
+
StatusType["Error"] = "error";
|
|
96
|
+
StatusType["Success"] = "success";
|
|
97
|
+
StatusType["Info"] = "info";
|
|
98
|
+
StatusType["Default"] = "default";
|
|
99
|
+
})(StatusType || (StatusType = {}));
|
|
100
|
+
var OtherStatus;
|
|
101
|
+
(function (OtherStatus) {
|
|
102
|
+
OtherStatus["Loading"] = "loading";
|
|
103
|
+
OtherStatus["Disabled"] = "disabled";
|
|
104
|
+
})(OtherStatus || (OtherStatus = {}));
|
|
105
|
+
var SortDirection;
|
|
106
|
+
(function (SortDirection) {
|
|
107
|
+
SortDirection["Ascending"] = "asc";
|
|
108
|
+
SortDirection["Descending"] = "desc";
|
|
109
|
+
})(SortDirection || (SortDirection = {}));
|
|
105
110
|
|
|
106
|
-
var
|
|
107
|
-
(function (
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
})(
|
|
116
|
-
var
|
|
117
|
-
(function (
|
|
118
|
-
|
|
119
|
-
})(
|
|
120
|
-
var
|
|
121
|
-
(function (
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
})(
|
|
111
|
+
var NodeTypes;
|
|
112
|
+
(function (NodeTypes) {
|
|
113
|
+
NodeTypes["Header"] = "header";
|
|
114
|
+
NodeTypes["Add"] = "add";
|
|
115
|
+
NodeTypes["Base"] = "base";
|
|
116
|
+
NodeTypes["Edged"] = "edged";
|
|
117
|
+
NodeTypes["Frame"] = "frame";
|
|
118
|
+
NodeTypes["Scroll"] = "scroll";
|
|
119
|
+
NodeTypes["Skeleton"] = "skeleton";
|
|
120
|
+
})(NodeTypes || (NodeTypes = {}));
|
|
121
|
+
var EdgeTypes;
|
|
122
|
+
(function (EdgeTypes) {
|
|
123
|
+
EdgeTypes["Labeled"] = "labeled";
|
|
124
|
+
})(EdgeTypes || (EdgeTypes = {}));
|
|
125
|
+
var AddNodeTypes;
|
|
126
|
+
(function (AddNodeTypes) {
|
|
127
|
+
AddNodeTypes["AddRule"] = "addRule";
|
|
128
|
+
AddNodeTypes["AddSource"] = "addSource";
|
|
129
|
+
AddNodeTypes["AddAction"] = "addAction";
|
|
130
|
+
AddNodeTypes["AddDestination"] = "addDestination";
|
|
131
|
+
})(AddNodeTypes || (AddNodeTypes = {}));
|
|
127
132
|
|
|
128
|
-
var
|
|
129
|
-
(function (
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
})(
|
|
134
|
-
var
|
|
135
|
-
(function (
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
})(
|
|
133
|
+
var InstrumentationRuleType;
|
|
134
|
+
(function (InstrumentationRuleType) {
|
|
135
|
+
InstrumentationRuleType["PayloadCollection"] = "PayloadCollection";
|
|
136
|
+
InstrumentationRuleType["CodeAttributes"] = "CodeAttributes";
|
|
137
|
+
InstrumentationRuleType["UnknownType"] = "UnknownType";
|
|
138
|
+
})(InstrumentationRuleType || (InstrumentationRuleType = {}));
|
|
139
|
+
var PayloadCollectionKeyTypes;
|
|
140
|
+
(function (PayloadCollectionKeyTypes) {
|
|
141
|
+
PayloadCollectionKeyTypes["HttpRequest"] = "httpRequest";
|
|
142
|
+
PayloadCollectionKeyTypes["HttpResponse"] = "httpResponse";
|
|
143
|
+
PayloadCollectionKeyTypes["DbQuery"] = "dbQuery";
|
|
144
|
+
PayloadCollectionKeyTypes["Messaging"] = "messaging";
|
|
145
|
+
})(PayloadCollectionKeyTypes || (PayloadCollectionKeyTypes = {}));
|
|
141
146
|
// Code Attributes for Instrumentation Rules
|
|
142
|
-
var
|
|
143
|
-
(function (
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
})(
|
|
147
|
+
var CodeAttributesKeyTypes;
|
|
148
|
+
(function (CodeAttributesKeyTypes) {
|
|
149
|
+
CodeAttributesKeyTypes["Column"] = "column";
|
|
150
|
+
CodeAttributesKeyTypes["FilePath"] = "filePath";
|
|
151
|
+
CodeAttributesKeyTypes["Function"] = "function";
|
|
152
|
+
CodeAttributesKeyTypes["LineNumber"] = "lineNumber";
|
|
153
|
+
CodeAttributesKeyTypes["Namespace"] = "namespace";
|
|
154
|
+
CodeAttributesKeyTypes["StackTrace"] = "stacktrace";
|
|
155
|
+
})(CodeAttributesKeyTypes || (CodeAttributesKeyTypes = {}));
|
|
151
156
|
|
|
152
|
-
var
|
|
153
|
-
(function (
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
})(
|
|
157
|
+
var SignalType;
|
|
158
|
+
(function (SignalType) {
|
|
159
|
+
SignalType["Logs"] = "logs";
|
|
160
|
+
SignalType["Metrics"] = "metrics";
|
|
161
|
+
SignalType["Traces"] = "traces";
|
|
162
|
+
})(SignalType || (SignalType = {}));
|
|
158
163
|
|
|
159
|
-
var
|
|
160
|
-
(function (
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
})(
|
|
164
|
+
var K8sResourceKind;
|
|
165
|
+
(function (K8sResourceKind) {
|
|
166
|
+
K8sResourceKind["Deployment"] = "Deployment";
|
|
167
|
+
K8sResourceKind["DaemonSet"] = "DaemonSet";
|
|
168
|
+
K8sResourceKind["StatefulSet"] = "StatefulSet";
|
|
169
|
+
})(K8sResourceKind || (K8sResourceKind = {}));
|
|
165
170
|
|
|
166
|
-
export {
|
|
171
|
+
export { ActionType, AddNodeTypes, CodeAttributesKeyTypes, CrdTypes, Crud, EdgeTypes, EntityTypes, FieldTypes, InstrumentationRuleType, K8sResourceKind, NodeTypes, OtherStatus, PayloadCollectionKeyTypes, PlatformType, ProgrammingLanguages, SignalType, SortDirection, StatusType, Tier };
|
package/lib/{useSourceSelectionFormData-CxdOP9FT.js → useSourceSelectionFormData-BnlRp8m3.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ActionType, StatusType, AddNodeTypes, EntityTypes, FieldTypes } from './types.js';
|
|
2
2
|
import { useState, useEffect, useCallback } from 'react';
|
|
3
|
-
import { f as useNotificationStore, e as useModalStore, a as useDrawerStore, i as useSetupStore } from './index-
|
|
3
|
+
import { f as useNotificationStore, e as useModalStore, a as useDrawerStore, i as useSetupStore } from './index-DYEcdkUF.js';
|
|
4
4
|
import 'styled-components';
|
|
5
5
|
import { i as isEmpty, s as safeJsonParse } from './index-BZS1ijMm.js';
|
|
6
|
-
import './index-
|
|
7
|
-
import { F as FORM_ALERTS } from './index-
|
|
8
|
-
import { b as useGenericForm } from './useTransition-
|
|
9
|
-
import { g as getIdFromSseTarget } from './index-
|
|
6
|
+
import './index-CJKFedQi.js';
|
|
7
|
+
import { F as FORM_ALERTS } from './index-C_0J5P9M.js';
|
|
8
|
+
import { b as useGenericForm } from './useTransition-CFmm4scp.js';
|
|
9
|
+
import { g as getIdFromSseTarget } from './index-7-KCQK-x.js';
|
|
10
10
|
|
|
11
11
|
const INITIAL$2 = {
|
|
12
12
|
// @ts-ignore (TS complains about empty string because we expect an "ActionsType", but it's fine)
|
|
@@ -37,31 +37,31 @@ const useActionFormData = () => {
|
|
|
37
37
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
38
38
|
break;
|
|
39
39
|
case 'clusterAttributes':
|
|
40
|
-
if (formData.type ===
|
|
40
|
+
if (formData.type === ActionType.AddClusterInfo && isEmpty(v))
|
|
41
41
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
42
42
|
break;
|
|
43
43
|
case 'renames':
|
|
44
|
-
if (formData.type ===
|
|
44
|
+
if (formData.type === ActionType.RenameAttributes && isEmpty(v))
|
|
45
45
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
46
46
|
break;
|
|
47
47
|
case 'attributeNamesToDelete':
|
|
48
|
-
if (formData.type ===
|
|
48
|
+
if (formData.type === ActionType.DeleteAttributes && isEmpty(v))
|
|
49
49
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
50
50
|
break;
|
|
51
51
|
case 'piiCategories':
|
|
52
|
-
if (formData.type ===
|
|
52
|
+
if (formData.type === ActionType.PiiMasking && isEmpty(v))
|
|
53
53
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
54
54
|
break;
|
|
55
55
|
case 'fallbackSamplingRatio':
|
|
56
|
-
if (formData.type ===
|
|
56
|
+
if (formData.type === ActionType.ErrorSampler && isEmpty(v))
|
|
57
57
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
58
58
|
break;
|
|
59
59
|
case 'samplingPercentage':
|
|
60
|
-
if (formData.type ===
|
|
60
|
+
if (formData.type === ActionType.ProbabilisticSampler && isEmpty(v))
|
|
61
61
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
62
62
|
break;
|
|
63
63
|
case 'endpointsFilters':
|
|
64
|
-
if (formData.type ===
|
|
64
|
+
if (formData.type === ActionType.LatencySampler) {
|
|
65
65
|
if (isEmpty(v))
|
|
66
66
|
errors[k] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
67
67
|
v?.forEach((endpoint) => {
|
|
@@ -75,7 +75,7 @@ const useActionFormData = () => {
|
|
|
75
75
|
ok = !Object.values(errors).length;
|
|
76
76
|
if (!ok && params?.withAlert) {
|
|
77
77
|
addNotification({
|
|
78
|
-
type:
|
|
78
|
+
type: StatusType.Warning,
|
|
79
79
|
title: params.alertTitle,
|
|
80
80
|
message: FORM_ALERTS.REQUIRED_FIELDS,
|
|
81
81
|
hideFromHistory: true,
|
|
@@ -137,24 +137,24 @@ const useClickNode = () => {
|
|
|
137
137
|
const onClickNode = (_, object) => {
|
|
138
138
|
const { data: { id, type }, } = object;
|
|
139
139
|
switch (type) {
|
|
140
|
-
case
|
|
141
|
-
case
|
|
142
|
-
case
|
|
143
|
-
case
|
|
140
|
+
case EntityTypes.Source:
|
|
141
|
+
case EntityTypes.Destination:
|
|
142
|
+
case EntityTypes.Action:
|
|
143
|
+
case EntityTypes.InstrumentationRule:
|
|
144
144
|
setDrawerType(type);
|
|
145
145
|
setDrawerEntityId(id);
|
|
146
146
|
break;
|
|
147
|
-
case
|
|
148
|
-
setCurrentModal(
|
|
147
|
+
case AddNodeTypes.AddSource:
|
|
148
|
+
setCurrentModal(EntityTypes.Source);
|
|
149
149
|
break;
|
|
150
|
-
case
|
|
151
|
-
setCurrentModal(
|
|
150
|
+
case AddNodeTypes.AddDestination:
|
|
151
|
+
setCurrentModal(EntityTypes.Destination);
|
|
152
152
|
break;
|
|
153
|
-
case
|
|
154
|
-
setCurrentModal(
|
|
153
|
+
case AddNodeTypes.AddAction:
|
|
154
|
+
setCurrentModal(EntityTypes.Action);
|
|
155
155
|
break;
|
|
156
|
-
case
|
|
157
|
-
setCurrentModal(
|
|
156
|
+
case AddNodeTypes.AddRule:
|
|
157
|
+
setCurrentModal(EntityTypes.InstrumentationRule);
|
|
158
158
|
break;
|
|
159
159
|
default:
|
|
160
160
|
console.warn('Unhandled node click', object);
|
|
@@ -172,24 +172,24 @@ const useClickNotification = () => {
|
|
|
172
172
|
const { dismissToast } = options || {};
|
|
173
173
|
if (crdType && target) {
|
|
174
174
|
switch (crdType) {
|
|
175
|
-
case
|
|
176
|
-
setDrawerType(
|
|
177
|
-
setDrawerEntityId(getIdFromSseTarget(target,
|
|
175
|
+
case EntityTypes.InstrumentationRule:
|
|
176
|
+
setDrawerType(EntityTypes.InstrumentationRule);
|
|
177
|
+
setDrawerEntityId(getIdFromSseTarget(target, EntityTypes.InstrumentationRule));
|
|
178
178
|
break;
|
|
179
|
-
case
|
|
179
|
+
case EntityTypes.Source:
|
|
180
180
|
case 'InstrumentationConfig':
|
|
181
181
|
case 'InstrumentationInstance':
|
|
182
|
-
setDrawerType(
|
|
183
|
-
setDrawerEntityId(getIdFromSseTarget(target,
|
|
182
|
+
setDrawerType(EntityTypes.Source);
|
|
183
|
+
setDrawerEntityId(getIdFromSseTarget(target, EntityTypes.Source));
|
|
184
184
|
break;
|
|
185
|
-
case
|
|
186
|
-
setDrawerType(
|
|
187
|
-
setDrawerEntityId(getIdFromSseTarget(target,
|
|
185
|
+
case EntityTypes.Action:
|
|
186
|
+
setDrawerType(EntityTypes.Action);
|
|
187
|
+
setDrawerEntityId(getIdFromSseTarget(target, EntityTypes.Action));
|
|
188
188
|
break;
|
|
189
|
-
case
|
|
189
|
+
case EntityTypes.Destination:
|
|
190
190
|
case 'Destination':
|
|
191
|
-
setDrawerType(
|
|
192
|
-
setDrawerEntityId(getIdFromSseTarget(target,
|
|
191
|
+
setDrawerType(EntityTypes.Destination);
|
|
192
|
+
setDrawerEntityId(getIdFromSseTarget(target, EntityTypes.Destination));
|
|
193
193
|
break;
|
|
194
194
|
default:
|
|
195
195
|
console.warn('notif click not handled for:', { crdType, target });
|
|
@@ -219,7 +219,7 @@ const buildFormDynamicFields = (fields) => {
|
|
|
219
219
|
.map((f) => {
|
|
220
220
|
const { name, componentType, componentProperties, displayName, initialValue, renderCondition } = f;
|
|
221
221
|
switch (componentType) {
|
|
222
|
-
case
|
|
222
|
+
case FieldTypes.Dropdown: {
|
|
223
223
|
const componentPropertiesJson = safeJsonParse(componentProperties, {});
|
|
224
224
|
const options = Array.isArray(componentPropertiesJson.values)
|
|
225
225
|
? componentPropertiesJson.values.map((value) => ({
|
|
@@ -308,7 +308,7 @@ const useDestinationFormData = (params) => {
|
|
|
308
308
|
});
|
|
309
309
|
if (!ok && params?.withAlert) {
|
|
310
310
|
addNotification({
|
|
311
|
-
type:
|
|
311
|
+
type: StatusType.Warning,
|
|
312
312
|
title: params.alertTitle,
|
|
313
313
|
message: FORM_ALERTS.REQUIRED_FIELDS,
|
|
314
314
|
hideFromHistory: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
2
|
-
import './index-
|
|
3
|
-
import { f as useNotificationStore } from './index-
|
|
4
|
-
import {
|
|
2
|
+
import './index-CJKFedQi.js';
|
|
3
|
+
import { f as useNotificationStore } from './index-DYEcdkUF.js';
|
|
4
|
+
import { CodeAttributesKeyTypes, PayloadCollectionKeyTypes } from './types.js';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
|
|
7
7
|
const useGenericForm = (initialFormData) => {
|
|
@@ -130,18 +130,18 @@ const INITIAL = {
|
|
|
130
130
|
workloads: null,
|
|
131
131
|
instrumentationLibraries: null,
|
|
132
132
|
payloadCollection: {
|
|
133
|
-
[
|
|
134
|
-
[
|
|
135
|
-
[
|
|
136
|
-
[
|
|
133
|
+
[PayloadCollectionKeyTypes.HttpRequest]: null,
|
|
134
|
+
[PayloadCollectionKeyTypes.HttpResponse]: null,
|
|
135
|
+
[PayloadCollectionKeyTypes.DbQuery]: null,
|
|
136
|
+
[PayloadCollectionKeyTypes.Messaging]: null,
|
|
137
137
|
},
|
|
138
138
|
codeAttributes: {
|
|
139
|
-
[
|
|
140
|
-
[
|
|
141
|
-
[
|
|
142
|
-
[
|
|
143
|
-
[
|
|
144
|
-
[
|
|
139
|
+
[CodeAttributesKeyTypes.Column]: null,
|
|
140
|
+
[CodeAttributesKeyTypes.FilePath]: null,
|
|
141
|
+
[CodeAttributesKeyTypes.Function]: null,
|
|
142
|
+
[CodeAttributesKeyTypes.LineNumber]: null,
|
|
143
|
+
[CodeAttributesKeyTypes.Namespace]: null,
|
|
144
|
+
[CodeAttributesKeyTypes.StackTrace]: null,
|
|
145
145
|
},
|
|
146
146
|
};
|
|
147
147
|
const useInstrumentationRuleFormData = () => {
|
|
@@ -162,20 +162,20 @@ const useInstrumentationRuleFormData = () => {
|
|
|
162
162
|
};
|
|
163
163
|
if (payloadCollection) {
|
|
164
164
|
updatedData['payloadCollection'] = {
|
|
165
|
-
[
|
|
166
|
-
[
|
|
167
|
-
[
|
|
168
|
-
[
|
|
165
|
+
[PayloadCollectionKeyTypes.HttpRequest]: !!payloadCollection[PayloadCollectionKeyTypes.HttpRequest] ? {} : null,
|
|
166
|
+
[PayloadCollectionKeyTypes.HttpResponse]: !!payloadCollection[PayloadCollectionKeyTypes.HttpResponse] ? {} : null,
|
|
167
|
+
[PayloadCollectionKeyTypes.DbQuery]: !!payloadCollection[PayloadCollectionKeyTypes.DbQuery] ? {} : null,
|
|
168
|
+
[PayloadCollectionKeyTypes.Messaging]: !!payloadCollection[PayloadCollectionKeyTypes.Messaging] ? {} : null,
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
171
|
if (codeAttributes) {
|
|
172
172
|
updatedData['codeAttributes'] = {
|
|
173
|
-
[
|
|
174
|
-
[
|
|
175
|
-
[
|
|
176
|
-
[
|
|
177
|
-
[
|
|
178
|
-
[
|
|
173
|
+
[CodeAttributesKeyTypes.Column]: codeAttributes[CodeAttributesKeyTypes.Column] || null,
|
|
174
|
+
[CodeAttributesKeyTypes.FilePath]: codeAttributes[CodeAttributesKeyTypes.FilePath] || null,
|
|
175
|
+
[CodeAttributesKeyTypes.Function]: codeAttributes[CodeAttributesKeyTypes.Function] || null,
|
|
176
|
+
[CodeAttributesKeyTypes.LineNumber]: codeAttributes[CodeAttributesKeyTypes.LineNumber] || null,
|
|
177
|
+
[CodeAttributesKeyTypes.Namespace]: codeAttributes[CodeAttributesKeyTypes.Namespace] || null,
|
|
178
|
+
[CodeAttributesKeyTypes.StackTrace]: codeAttributes[CodeAttributesKeyTypes.StackTrace] || null,
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
181
|
handleFormChange(undefined, undefined, updatedData);
|
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { ColumnCell, RowCell } from '.';
|
|
3
|
-
import { STATUS_TYPE } from '@/types';
|
|
4
|
-
interface RowProps {
|
|
5
|
-
index: number;
|
|
6
|
-
columns: ColumnCell[];
|
|
7
|
-
cells: RowCell[];
|
|
8
|
-
onClick?: () => void;
|
|
9
|
-
status?: STATUS_TYPE;
|
|
10
|
-
faded?: boolean;
|
|
11
|
-
}
|
|
12
|
-
declare const Row: FC<RowProps>;
|
|
13
|
-
export { Row, type RowProps };
|