@odigos/ui-kit 0.0.31 → 0.0.33
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.js +10 -13
- package/lib/constants/strings/index.d.ts +1 -0
- package/lib/constants.js +3 -6
- 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-form/custom-fields/headers-collection.d.ts +5 -0
- package/lib/containers/setup-summary/index.d.ts +2 -0
- package/lib/containers.js +73 -76
- package/lib/functions/get-yaml-fields-for-destination/index.d.ts +2 -0
- package/lib/functions/index.d.ts +3 -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.js +8 -10
- package/lib/hooks/useInstrumentationRuleFormData.d.ts +1 -1
- package/lib/hooks.js +6 -9
- package/lib/icons/instrumentation-rules/headers-collection-icon/headers-collection-icon.stories.d.ts +8 -0
- package/lib/icons/instrumentation-rules/headers-collection-icon/index.d.ts +2 -0
- package/lib/icons/instrumentation-rules/index.d.ts +1 -0
- package/lib/icons.js +7 -8
- package/lib/{index-BbbCCewR.js → index-1N9wymEq.js} +1 -1
- package/lib/{index-CWbxXTof.js → index-BQQZyvRz.js} +1 -1
- package/lib/{index-CJs4RDHU.js → index-B_Gl6Qa6.js} +2 -3
- package/lib/{index-nltUpkWT.js → index-BedCNcwV.js} +7 -9
- package/lib/{index-B46Mcu9H.js → index-BjVl4-os.js} +5 -6
- package/lib/{index-BJxaoI0G.js → index-CNfdJ1X8.js} +1 -1
- package/lib/index-CVH8Q8Sl.js +1178 -0
- package/lib/{index-BGK1nMOD.js → index-CaAOgaiC.js} +2 -2
- package/lib/{index-7-KCQK-x.js → index-CnZlllYu.js} +10 -1
- package/lib/{index-IKusBlIE.js → index-Do3CYz7N.js} +1 -1
- package/lib/{index-DYNMhZMX.js → index-Iq7U_fzb.js} +42 -7
- package/lib/{index-CamnKrev.js → index-f8FRaVkE.js} +1 -1
- package/lib/index-mOgS3e5E.js +101 -0
- package/lib/snippets.js +10 -13
- package/lib/store.js +2 -2
- package/lib/theme.js +3 -233
- package/lib/types/instrumentation-rules/index.d.ts +26 -18
- package/lib/types.js +15 -9
- package/lib/{useSourceSelectionFormData-BWz8fTJr.js → useSourceSelectionFormData-DiwzViqL.js} +9 -5
- package/lib/{useTransition-B65KBqdK.js → useTransition-B0eagOib.js} +1 -2
- package/package.json +1 -1
- package/lib/index-CFnxjzaW.js +0 -37
- package/lib/index-DGel4E-Z.js +0 -67
- package/lib/index-DGuOxbBR.js +0 -227
- package/lib/index-DMXaEyAB.js +0 -720
- package/lib/{index-BZS1ijMm.js → index-BV85P9UP.js} +14 -14
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { _ as WarningModal } from './index-
|
|
2
|
+
import { _ as WarningModal } from './index-BedCNcwV.js';
|
|
3
3
|
import { StatusType, EntityTypes } from './types.js';
|
|
4
|
-
import './index-
|
|
4
|
+
import './index-CVH8Q8Sl.js';
|
|
5
5
|
import 'styled-components';
|
|
6
6
|
|
|
7
7
|
const CancelWarning = ({ isOpen, noOverlay, name, onApprove, onDeny }) => {
|
|
@@ -19,4 +19,13 @@ const getIdFromSseTarget = (target, type) => {
|
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
const isLegalK8sLabel = (name) => {
|
|
23
|
+
if (!name)
|
|
24
|
+
return false;
|
|
25
|
+
if (name.length > 63)
|
|
26
|
+
return false;
|
|
27
|
+
const regex = /^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$/;
|
|
28
|
+
return regex.test(name);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { getIdFromSseTarget as g, isLegalK8sLabel as i };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { StatusType, OtherStatus, DestinationTypes, EntityTypes, PlatformType } from './types.js';
|
|
2
|
-
import {
|
|
2
|
+
import { K as K8sLogo } from './index-CVH8Q8Sl.js';
|
|
3
|
+
import { D as DEFAULT_DATA_STREAM_NAME } from './index-mOgS3e5E.js';
|
|
4
|
+
import { a as getProgrammingLanguageIcon } from './index-B_Gl6Qa6.js';
|
|
3
5
|
import 'react';
|
|
4
|
-
import './index-DMXaEyAB.js';
|
|
5
6
|
import 'styled-components';
|
|
6
|
-
import { e as AwsXrayLogo, a2 as VictoriaMetricsLogo, a1 as UptraceLogo, a0 as TraceloopLogo, $ as TingyunLogo, _ as TempoLogo, Z as TelemetryHubLogo, Y as SumoLogicLogo, X as SplunkLogo, W as SignozLogo, U as SeqLogo, d as AwsS3Logo, T as QuickwitLogo, G as GigapipeLogo, S as QrynLogo, R as PrometheusLogo, F as OpenTelemetryLogo, Q as OracleLogo, P as OpsVerseLogo, z as OpenObserveLogo, y as OneUptimeLogo, O as ObserveLogo, N as NewRelicLogo, M as MiddlewareLogo, x as LumigoLogo, w as LokiLogo, v as LogzioLogo, u as LightstepLogo, L as Last9Logo, K as KloudmateLogo, J as JaegerLogo, I as InstanaLogo, t as HyperDxLogo, H as HoneycombLogo, s as GroundcoverLogo, r as GreptimeLogo, q as GrafanaLogo, p as GoogleCloudPlatformLogo, o as ElasticSearchLogo, E as ElasticApmLogo, n as DynatraceLogo, m as DatadogLogo, D as Dash0Logo, l as CoralogixLogo, c as AwsCloudwatchLogo, k as ClickhouseLogo, j as ChronosphereLogo, i as ChecklyLogo, C as CauselyLogo, h as BonreeLogo, B as BetterStackLogo, g as BlobStorageLogo, f as AxiomLogo, b as AppDynamicsLogo, a as AlibabaCloudLogo, A as AlaudaLogo, a6 as RulesIcon, a3 as ActionsIcon, a4 as DestinationsIcon, a7 as SourcesIcon, a5 as NamespacesIcon, V as VmLogo } from './index-
|
|
7
|
-
import { K as KafkaLogo, O as OdigosLogo } from './index-
|
|
8
|
-
import {
|
|
7
|
+
import { e as AwsXrayLogo, a2 as VictoriaMetricsLogo, a1 as UptraceLogo, a0 as TraceloopLogo, $ as TingyunLogo, _ as TempoLogo, Z as TelemetryHubLogo, Y as SumoLogicLogo, X as SplunkLogo, W as SignozLogo, U as SeqLogo, d as AwsS3Logo, T as QuickwitLogo, G as GigapipeLogo, S as QrynLogo, R as PrometheusLogo, F as OpenTelemetryLogo, Q as OracleLogo, P as OpsVerseLogo, z as OpenObserveLogo, y as OneUptimeLogo, O as ObserveLogo, N as NewRelicLogo, M as MiddlewareLogo, x as LumigoLogo, w as LokiLogo, v as LogzioLogo, u as LightstepLogo, L as Last9Logo, K as KloudmateLogo, J as JaegerLogo, I as InstanaLogo, t as HyperDxLogo, H as HoneycombLogo, s as GroundcoverLogo, r as GreptimeLogo, q as GrafanaLogo, p as GoogleCloudPlatformLogo, o as ElasticSearchLogo, E as ElasticApmLogo, n as DynatraceLogo, m as DatadogLogo, D as Dash0Logo, l as CoralogixLogo, c as AwsCloudwatchLogo, k as ClickhouseLogo, j as ChronosphereLogo, i as ChecklyLogo, C as CauselyLogo, h as BonreeLogo, B as BetterStackLogo, g as BlobStorageLogo, f as AxiomLogo, b as AppDynamicsLogo, a as AlibabaCloudLogo, A as AlaudaLogo, a6 as RulesIcon, a3 as ActionsIcon, a4 as DestinationsIcon, a7 as SourcesIcon, a5 as NamespacesIcon, V as VmLogo } from './index-1N9wymEq.js';
|
|
8
|
+
import { K as KafkaLogo, O as OdigosLogo } from './index-Do3CYz7N.js';
|
|
9
|
+
import { s as safeJsonParse } from './index-BV85P9UP.js';
|
|
9
10
|
|
|
10
11
|
const compareCondition = (renderCondition, fields) => {
|
|
11
12
|
if (!renderCondition || !renderCondition.length)
|
|
@@ -84,7 +85,7 @@ const filterSourcesByStream = (sources, streamName) => {
|
|
|
84
85
|
// if no stream is selected, return nothing (to prevent glitchy rendering)
|
|
85
86
|
if (!streamName)
|
|
86
87
|
return [];
|
|
87
|
-
return sources.filter((source) => source.dataStreamNames.includes(streamName));
|
|
88
|
+
return sources.filter((source) => source.dataStreamNames.includes(streamName) || (streamName === DEFAULT_DATA_STREAM_NAME && !source.dataStreamNames.length));
|
|
88
89
|
};
|
|
89
90
|
|
|
90
91
|
const formatBytes = (bytes) => {
|
|
@@ -287,12 +288,46 @@ const getWorkloadId = ({ namespace, name, kind }) => {
|
|
|
287
288
|
return { namespace, name, kind };
|
|
288
289
|
};
|
|
289
290
|
|
|
291
|
+
const getYamlFieldsForDestination = (categories, destination) => {
|
|
292
|
+
const fields = [];
|
|
293
|
+
const parsedCategories = JSON.parse(JSON.stringify(categories));
|
|
294
|
+
for (const category of parsedCategories) {
|
|
295
|
+
const autoFilledFields = safeJsonParse(destination.fields, {});
|
|
296
|
+
const idx = category.items.findIndex((item) => item.type === destination.destinationType.type);
|
|
297
|
+
if (idx !== -1) {
|
|
298
|
+
fields.push(...category.items[idx].fields.map((field) => ({
|
|
299
|
+
...field,
|
|
300
|
+
initialValue: autoFilledFields[field.name],
|
|
301
|
+
})));
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
return fields;
|
|
305
|
+
};
|
|
306
|
+
|
|
290
307
|
const isOverTime = (originDate, difference = 0) => {
|
|
291
308
|
const now = new Date().getTime();
|
|
292
309
|
const compareWith = new Date(originDate).getTime();
|
|
293
310
|
return compareWith - now <= difference;
|
|
294
311
|
};
|
|
295
312
|
|
|
313
|
+
const mapDestinationFieldsForDisplay = (destination, yamlFields) => {
|
|
314
|
+
const parsedFields = safeJsonParse(destination.fields, {});
|
|
315
|
+
if (!yamlFields.length) {
|
|
316
|
+
return Object.entries(parsedFields).map(([key, value]) => ({
|
|
317
|
+
key,
|
|
318
|
+
name: key,
|
|
319
|
+
value,
|
|
320
|
+
}));
|
|
321
|
+
}
|
|
322
|
+
return yamlFields
|
|
323
|
+
.map((field) => ({
|
|
324
|
+
key: field.name,
|
|
325
|
+
name: field.displayName || field.name,
|
|
326
|
+
value: parsedFields[field.name] ?? null,
|
|
327
|
+
}))
|
|
328
|
+
.filter((item) => item.value !== null);
|
|
329
|
+
};
|
|
330
|
+
|
|
296
331
|
const mapExportedSignals = (exportedSignals) => {
|
|
297
332
|
if (!exportedSignals)
|
|
298
333
|
return [];
|
|
@@ -301,4 +336,4 @@ const mapExportedSignals = (exportedSignals) => {
|
|
|
301
336
|
|
|
302
337
|
const sleep = async (ms = 1000) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
303
338
|
|
|
304
|
-
export { filterDestinations as a, filterDestinationsByStream as b, compareCondition as c, deepClone as d, filterSources as e, filterActions as f, filterSourcesByStream as g, formatBytes as h, getConditionsBooleans as i, getContainersInstrumentedCount as j, getContainersIcons as k, getDestinationIcon as l, getEntityIcon as m, getEntityLabel as n, getMetricForEntity as o, getPlatformIcon as p, getPlatformLabel as q, getValueForRange as r, getWorkloadId as s,
|
|
339
|
+
export { filterDestinations as a, filterDestinationsByStream as b, compareCondition as c, deepClone as d, filterSources as e, filterActions as f, filterSourcesByStream as g, formatBytes as h, getConditionsBooleans as i, getContainersInstrumentedCount as j, getContainersIcons as k, getDestinationIcon as l, getEntityIcon as m, getEntityLabel as n, getMetricForEntity as o, getPlatformIcon as p, getPlatformLabel as q, getValueForRange as r, getWorkloadId as s, getYamlFieldsForDestination as t, isOverTime as u, mapDestinationFieldsForDisplay as v, mapExportedSignals as w, sleep as x };
|
|
@@ -0,0 +1,101 @@
|
|
|
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 };
|
package/lib/snippets.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
export { A as AddButton } from './index-
|
|
2
|
-
export { E as EditButton, N as NoteBackToSummary } from './index-
|
|
1
|
+
export { A as AddButton } from './index-BedCNcwV.js';
|
|
2
|
+
export { E as EditButton, N as NoteBackToSummary } from './index-BjVl4-os.js';
|
|
3
3
|
import 'react';
|
|
4
|
-
import './
|
|
5
|
-
import './index-DMXaEyAB.js';
|
|
4
|
+
import './index-CVH8Q8Sl.js';
|
|
6
5
|
import './types.js';
|
|
7
6
|
import 'styled-components';
|
|
8
|
-
import './index-
|
|
9
|
-
import './index-
|
|
10
|
-
import './index-
|
|
11
|
-
import './index-
|
|
12
|
-
import './index-
|
|
13
|
-
import './
|
|
14
|
-
import './index-IKusBlIE.js';
|
|
15
|
-
import './useTransition-B65KBqdK.js';
|
|
7
|
+
import './index-CNfdJ1X8.js';
|
|
8
|
+
import './index-BV85P9UP.js';
|
|
9
|
+
import './index-mOgS3e5E.js';
|
|
10
|
+
import './index-B_Gl6Qa6.js';
|
|
11
|
+
import './index-Do3CYz7N.js';
|
|
12
|
+
import './useTransition-B0eagOib.js';
|
|
16
13
|
import 'react-dom';
|
|
17
|
-
import './index-
|
|
14
|
+
import './index-BQQZyvRz.js';
|
package/lib/store.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { u as useDarkMode, a as useDataStreamStore, b as useDrawerStore, c as useEntityStore, d as useFilterStore, e as useInstrumentStore, f as useModalStore, g as useNotificationStore, h as usePendingStore, i as useSelectedStore, j as useSetupStore } from './index-
|
|
2
|
-
import './types.js';
|
|
1
|
+
export { u as useDarkMode, a as useDataStreamStore, b as useDrawerStore, c as useEntityStore, d as useFilterStore, e as useInstrumentStore, f as useModalStore, g as useNotificationStore, h as usePendingStore, i as useSelectedStore, j as useSetupStore } from './index-CVH8Q8Sl.js';
|
|
3
2
|
import 'react';
|
|
3
|
+
import './types.js';
|
|
4
4
|
import 'styled-components';
|
package/lib/theme.js
CHANGED
|
@@ -1,234 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
export { T as default } from './index-CVH8Q8Sl.js';
|
|
2
|
+
import 'styled-components';
|
|
3
|
+
import 'react';
|
|
4
4
|
import './types.js';
|
|
5
|
-
|
|
6
|
-
const baseTheme = {
|
|
7
|
-
colors: {
|
|
8
|
-
// Custom Colors
|
|
9
|
-
majestic_blue: '#444AD9',
|
|
10
|
-
majestic_blue_soft: '#6C7AE8',
|
|
11
|
-
orange_og: '#FE9239',
|
|
12
|
-
orange_soft: '#FFB160',
|
|
13
|
-
dark_red: '#802828',
|
|
14
|
-
darker_red: '#611F1F',
|
|
15
|
-
darkest_red: '#281515',
|
|
16
|
-
darkest_red_hover: '#351515',
|
|
17
|
-
dark_green: '#2D4323',
|
|
18
|
-
},
|
|
19
|
-
font_family: {
|
|
20
|
-
primary: 'Inter, sans-serif',
|
|
21
|
-
secondary: 'Kode Mono, sans-serif',
|
|
22
|
-
code: 'IBM Plex Mono, monospace',
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
const darkModeTheme = {
|
|
26
|
-
darkMode: true,
|
|
27
|
-
colors: {
|
|
28
|
-
...baseTheme.colors,
|
|
29
|
-
// Base Colors
|
|
30
|
-
primary: '#111111',
|
|
31
|
-
secondary: '#F9F9F9',
|
|
32
|
-
border: '#525252',
|
|
33
|
-
dark_grey: '#151515',
|
|
34
|
-
translucent_bg: '#1A1A1A',
|
|
35
|
-
dropdown_bg: '#242424',
|
|
36
|
-
dropdown_bg_2: '#333333',
|
|
37
|
-
// Notification Colors
|
|
38
|
-
warning: '#472300',
|
|
39
|
-
error: '#431919',
|
|
40
|
-
success: '#172013',
|
|
41
|
-
info: '#242424',
|
|
42
|
-
default: '#181944',
|
|
43
|
-
},
|
|
44
|
-
text: {
|
|
45
|
-
// Base Colors
|
|
46
|
-
white: '#FFFFFF',
|
|
47
|
-
primary: '#111111',
|
|
48
|
-
secondary: '#F9F9F9',
|
|
49
|
-
grey: '#B8B8B8',
|
|
50
|
-
dark_grey: '#8F8F8F',
|
|
51
|
-
darker_grey: '#7A7A7A',
|
|
52
|
-
light_grey: '#CCD0D2',
|
|
53
|
-
dark_button: '#0A1824',
|
|
54
|
-
// Notification Colors
|
|
55
|
-
warning: '#E9CF35',
|
|
56
|
-
warning_secondary: '#FFA349',
|
|
57
|
-
error: '#EF7676',
|
|
58
|
-
error_secondary: '#DB5151',
|
|
59
|
-
success: '#81AF65',
|
|
60
|
-
success_secondary: '#51DB51',
|
|
61
|
-
info: '#B8B8B8',
|
|
62
|
-
info_secondary: '#CCDDDD',
|
|
63
|
-
default: '#AABEF7',
|
|
64
|
-
default_secondary: '#8CBEFF',
|
|
65
|
-
},
|
|
66
|
-
font_family: baseTheme.font_family,
|
|
67
|
-
};
|
|
68
|
-
const lightModeTheme = {
|
|
69
|
-
darkMode: false,
|
|
70
|
-
colors: {
|
|
71
|
-
...baseTheme.colors,
|
|
72
|
-
// Base Colors
|
|
73
|
-
primary: '#EEEEEE',
|
|
74
|
-
secondary: '#060606',
|
|
75
|
-
border: '#ADADAD',
|
|
76
|
-
dark_grey: '#EAEAEA',
|
|
77
|
-
translucent_bg: '#E5E5E5',
|
|
78
|
-
dropdown_bg: '#DBDBDB',
|
|
79
|
-
dropdown_bg_2: '#CCCCCC',
|
|
80
|
-
// Notification Colors
|
|
81
|
-
warning: '#F6F092',
|
|
82
|
-
error: '#FACECE',
|
|
83
|
-
success: '#C8DEB8',
|
|
84
|
-
info: '#E0E0E0',
|
|
85
|
-
default: '#CAD9FB',
|
|
86
|
-
},
|
|
87
|
-
text: {
|
|
88
|
-
// Base Colors
|
|
89
|
-
white: '#FFFFFF',
|
|
90
|
-
primary: '#EEEEEE',
|
|
91
|
-
secondary: '#060606',
|
|
92
|
-
grey: '#474747',
|
|
93
|
-
dark_grey: '#707070',
|
|
94
|
-
darker_grey: '#858585',
|
|
95
|
-
light_grey: '#332F2D',
|
|
96
|
-
dark_button: '#F5E7DB',
|
|
97
|
-
// Notification Colors
|
|
98
|
-
warning: '#A56F12',
|
|
99
|
-
warning_secondary: '#CA9416',
|
|
100
|
-
error: '#B63A3A',
|
|
101
|
-
error_secondary: '#DB5151',
|
|
102
|
-
success: '#4E763A',
|
|
103
|
-
success_secondary: '#67964C',
|
|
104
|
-
info: '#525252',
|
|
105
|
-
info_secondary: '#7A7A7A',
|
|
106
|
-
default: '#444AD9',
|
|
107
|
-
default_secondary: '#6C7AE8',
|
|
108
|
-
},
|
|
109
|
-
font_family: baseTheme.font_family,
|
|
110
|
-
};
|
|
111
|
-
const getTheme = (darkMode) => (darkMode ? darkModeTheme : lightModeTheme);
|
|
112
|
-
|
|
113
|
-
const Provider = ({ children }) => {
|
|
114
|
-
const { darkMode } = useDarkMode();
|
|
115
|
-
return React.createElement(ThemeProvider, { theme: getTheme(darkMode) }, children);
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
const hex = {
|
|
119
|
-
'100': 'FF',
|
|
120
|
-
'099': 'FC',
|
|
121
|
-
'098': 'FA',
|
|
122
|
-
'097': 'F7',
|
|
123
|
-
'096': 'F5',
|
|
124
|
-
'095': 'F2',
|
|
125
|
-
'094': 'F0',
|
|
126
|
-
'093': 'ED',
|
|
127
|
-
'092': 'EB',
|
|
128
|
-
'091': 'E8',
|
|
129
|
-
'090': 'E6',
|
|
130
|
-
'089': 'E3',
|
|
131
|
-
'088': 'E0',
|
|
132
|
-
'087': 'DE',
|
|
133
|
-
'086': 'DB',
|
|
134
|
-
'085': 'D9',
|
|
135
|
-
'084': 'D6',
|
|
136
|
-
'083': 'D4',
|
|
137
|
-
'082': 'D1',
|
|
138
|
-
'081': 'CF',
|
|
139
|
-
'080': 'CC',
|
|
140
|
-
'079': 'C9',
|
|
141
|
-
'078': 'C7',
|
|
142
|
-
'077': 'C4',
|
|
143
|
-
'076': 'C2',
|
|
144
|
-
'075': 'BF',
|
|
145
|
-
'074': 'BD',
|
|
146
|
-
'073': 'BA',
|
|
147
|
-
'072': 'B8',
|
|
148
|
-
'071': 'B5',
|
|
149
|
-
'070': 'B3',
|
|
150
|
-
'069': 'B0',
|
|
151
|
-
'068': 'AD',
|
|
152
|
-
'067': 'AB',
|
|
153
|
-
'066': 'A8',
|
|
154
|
-
'065': 'A6',
|
|
155
|
-
'064': 'A3',
|
|
156
|
-
'063': 'A1',
|
|
157
|
-
'062': '9E',
|
|
158
|
-
'061': '9C',
|
|
159
|
-
'060': '99',
|
|
160
|
-
'059': '96',
|
|
161
|
-
'058': '94',
|
|
162
|
-
'057': '91',
|
|
163
|
-
'056': '8F',
|
|
164
|
-
'055': '8C',
|
|
165
|
-
'054': '8A',
|
|
166
|
-
'053': '87',
|
|
167
|
-
'052': '85',
|
|
168
|
-
'051': '82',
|
|
169
|
-
'050': '80',
|
|
170
|
-
'049': '7D',
|
|
171
|
-
'048': '7A',
|
|
172
|
-
'047': '78',
|
|
173
|
-
'046': '75',
|
|
174
|
-
'045': '73',
|
|
175
|
-
'044': '70',
|
|
176
|
-
'043': '6E',
|
|
177
|
-
'042': '6B',
|
|
178
|
-
'041': '69',
|
|
179
|
-
'040': '66',
|
|
180
|
-
'039': '63',
|
|
181
|
-
'038': '61',
|
|
182
|
-
'037': '5E',
|
|
183
|
-
'036': '5C',
|
|
184
|
-
'035': '59',
|
|
185
|
-
'034': '57',
|
|
186
|
-
'033': '54',
|
|
187
|
-
'032': '52',
|
|
188
|
-
'031': '4F',
|
|
189
|
-
'030': '4D',
|
|
190
|
-
'029': '4A',
|
|
191
|
-
'028': '47',
|
|
192
|
-
'027': '45',
|
|
193
|
-
'026': '42',
|
|
194
|
-
'025': '40',
|
|
195
|
-
'024': '3D',
|
|
196
|
-
'023': '3B',
|
|
197
|
-
'022': '38',
|
|
198
|
-
'021': '36',
|
|
199
|
-
'020': '33',
|
|
200
|
-
'019': '30',
|
|
201
|
-
'018': '2E',
|
|
202
|
-
'017': '2B',
|
|
203
|
-
'016': '29',
|
|
204
|
-
'015': '26',
|
|
205
|
-
'014': '24',
|
|
206
|
-
'013': '21',
|
|
207
|
-
'012': '1F',
|
|
208
|
-
'011': '1C',
|
|
209
|
-
'010': '1A',
|
|
210
|
-
'009': '17',
|
|
211
|
-
'008': '14',
|
|
212
|
-
'007': '12',
|
|
213
|
-
'006': '0F',
|
|
214
|
-
'005': '0D',
|
|
215
|
-
'004': '0A',
|
|
216
|
-
'003': '08',
|
|
217
|
-
'002': '05',
|
|
218
|
-
'001': '03',
|
|
219
|
-
'000': '00',
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
var opacity = /*#__PURE__*/Object.freeze({
|
|
223
|
-
__proto__: null,
|
|
224
|
-
hex: hex
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
const Theme = {
|
|
228
|
-
Provider,
|
|
229
|
-
useTheme: useTheme,
|
|
230
|
-
opacity,
|
|
231
|
-
animations,
|
|
232
|
-
};
|
|
233
|
-
|
|
234
|
-
export { Theme as default };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { SVG } from '../common';
|
|
2
2
|
import type { WorkloadId } from '../sources';
|
|
3
3
|
export declare enum InstrumentationRuleType {
|
|
4
|
-
PayloadCollection = "PayloadCollection",
|
|
5
4
|
CodeAttributes = "CodeAttributes",
|
|
5
|
+
HeadersCollection = "HeadersCollection",
|
|
6
|
+
PayloadCollection = "PayloadCollection",
|
|
6
7
|
UnknownType = "UnknownType"
|
|
7
8
|
}
|
|
8
9
|
export interface InstrumentationRule {
|
|
@@ -18,8 +19,31 @@ export interface InstrumentationRule {
|
|
|
18
19
|
language: string;
|
|
19
20
|
library: string;
|
|
20
21
|
}[] | null;
|
|
21
|
-
payloadCollection?: PayloadCollection | null;
|
|
22
22
|
codeAttributes?: CodeAttributes | null;
|
|
23
|
+
headersCollection?: HeadersCollection | null;
|
|
24
|
+
payloadCollection?: PayloadCollection | null;
|
|
25
|
+
}
|
|
26
|
+
export declare enum CodeAttributesKeyTypes {
|
|
27
|
+
Column = "column",
|
|
28
|
+
FilePath = "filePath",
|
|
29
|
+
Function = "function",
|
|
30
|
+
LineNumber = "lineNumber",
|
|
31
|
+
Namespace = "namespace",
|
|
32
|
+
StackTrace = "stacktrace"
|
|
33
|
+
}
|
|
34
|
+
export interface CodeAttributes {
|
|
35
|
+
[CodeAttributesKeyTypes.Column]?: boolean | null;
|
|
36
|
+
[CodeAttributesKeyTypes.FilePath]?: boolean | null;
|
|
37
|
+
[CodeAttributesKeyTypes.Function]?: boolean | null;
|
|
38
|
+
[CodeAttributesKeyTypes.LineNumber]?: boolean | null;
|
|
39
|
+
[CodeAttributesKeyTypes.Namespace]?: boolean | null;
|
|
40
|
+
[CodeAttributesKeyTypes.StackTrace]?: boolean | null;
|
|
41
|
+
}
|
|
42
|
+
export declare enum HeadersCollectionKeyTypes {
|
|
43
|
+
HeaderKeys = "headerKeys"
|
|
44
|
+
}
|
|
45
|
+
export interface HeadersCollection {
|
|
46
|
+
[HeadersCollectionKeyTypes.HeaderKeys]?: string[] | null;
|
|
23
47
|
}
|
|
24
48
|
interface HttpPayloadCollection {
|
|
25
49
|
mimeTypes?: string[] | null;
|
|
@@ -46,22 +70,6 @@ export interface PayloadCollection {
|
|
|
46
70
|
[PayloadCollectionKeyTypes.DbQuery]?: DbQueryPayloadCollection | null;
|
|
47
71
|
[PayloadCollectionKeyTypes.Messaging]?: MessagingPayloadCollection | null;
|
|
48
72
|
}
|
|
49
|
-
export declare enum CodeAttributesKeyTypes {
|
|
50
|
-
Column = "column",
|
|
51
|
-
FilePath = "filePath",
|
|
52
|
-
Function = "function",
|
|
53
|
-
LineNumber = "lineNumber",
|
|
54
|
-
Namespace = "namespace",
|
|
55
|
-
StackTrace = "stacktrace"
|
|
56
|
-
}
|
|
57
|
-
export interface CodeAttributes {
|
|
58
|
-
[CodeAttributesKeyTypes.Column]?: boolean | null;
|
|
59
|
-
[CodeAttributesKeyTypes.FilePath]?: boolean | null;
|
|
60
|
-
[CodeAttributesKeyTypes.Function]?: boolean | null;
|
|
61
|
-
[CodeAttributesKeyTypes.LineNumber]?: boolean | null;
|
|
62
|
-
[CodeAttributesKeyTypes.Namespace]?: boolean | null;
|
|
63
|
-
[CodeAttributesKeyTypes.StackTrace]?: boolean | null;
|
|
64
|
-
}
|
|
65
73
|
export interface InstrumentationRuleOption {
|
|
66
74
|
type: InstrumentationRuleType;
|
|
67
75
|
icon: SVG;
|
package/lib/types.js
CHANGED
|
@@ -199,17 +199,11 @@ var DestinationTypes;
|
|
|
199
199
|
|
|
200
200
|
var InstrumentationRuleType;
|
|
201
201
|
(function (InstrumentationRuleType) {
|
|
202
|
-
InstrumentationRuleType["PayloadCollection"] = "PayloadCollection";
|
|
203
202
|
InstrumentationRuleType["CodeAttributes"] = "CodeAttributes";
|
|
203
|
+
InstrumentationRuleType["HeadersCollection"] = "HeadersCollection";
|
|
204
|
+
InstrumentationRuleType["PayloadCollection"] = "PayloadCollection";
|
|
204
205
|
InstrumentationRuleType["UnknownType"] = "UnknownType";
|
|
205
206
|
})(InstrumentationRuleType || (InstrumentationRuleType = {}));
|
|
206
|
-
var PayloadCollectionKeyTypes;
|
|
207
|
-
(function (PayloadCollectionKeyTypes) {
|
|
208
|
-
PayloadCollectionKeyTypes["HttpRequest"] = "httpRequest";
|
|
209
|
-
PayloadCollectionKeyTypes["HttpResponse"] = "httpResponse";
|
|
210
|
-
PayloadCollectionKeyTypes["DbQuery"] = "dbQuery";
|
|
211
|
-
PayloadCollectionKeyTypes["Messaging"] = "messaging";
|
|
212
|
-
})(PayloadCollectionKeyTypes || (PayloadCollectionKeyTypes = {}));
|
|
213
207
|
// Code Attributes for Instrumentation Rules
|
|
214
208
|
var CodeAttributesKeyTypes;
|
|
215
209
|
(function (CodeAttributesKeyTypes) {
|
|
@@ -220,6 +214,18 @@ var CodeAttributesKeyTypes;
|
|
|
220
214
|
CodeAttributesKeyTypes["Namespace"] = "namespace";
|
|
221
215
|
CodeAttributesKeyTypes["StackTrace"] = "stacktrace";
|
|
222
216
|
})(CodeAttributesKeyTypes || (CodeAttributesKeyTypes = {}));
|
|
217
|
+
// Code Attributes for Instrumentation Rules
|
|
218
|
+
var HeadersCollectionKeyTypes;
|
|
219
|
+
(function (HeadersCollectionKeyTypes) {
|
|
220
|
+
HeadersCollectionKeyTypes["HeaderKeys"] = "headerKeys";
|
|
221
|
+
})(HeadersCollectionKeyTypes || (HeadersCollectionKeyTypes = {}));
|
|
222
|
+
var PayloadCollectionKeyTypes;
|
|
223
|
+
(function (PayloadCollectionKeyTypes) {
|
|
224
|
+
PayloadCollectionKeyTypes["HttpRequest"] = "httpRequest";
|
|
225
|
+
PayloadCollectionKeyTypes["HttpResponse"] = "httpResponse";
|
|
226
|
+
PayloadCollectionKeyTypes["DbQuery"] = "dbQuery";
|
|
227
|
+
PayloadCollectionKeyTypes["Messaging"] = "messaging";
|
|
228
|
+
})(PayloadCollectionKeyTypes || (PayloadCollectionKeyTypes = {}));
|
|
223
229
|
|
|
224
230
|
var SignalType;
|
|
225
231
|
(function (SignalType) {
|
|
@@ -235,4 +241,4 @@ var K8sResourceKind;
|
|
|
235
241
|
K8sResourceKind["StatefulSet"] = "StatefulSet";
|
|
236
242
|
})(K8sResourceKind || (K8sResourceKind = {}));
|
|
237
243
|
|
|
238
|
-
export { ActionType, AddNodeTypes, CodeAttributesKeyTypes, CrdTypes, Crud, DestinationTypes, EdgeTypes, EntityTypes, FieldTypes, InstrumentationRuleType, K8sResourceKind, NodeTypes, OtherStatus, PayloadCollectionKeyTypes, PlatformType, ProgrammingLanguages, SignalType, SortDirection, StatusType, Tier };
|
|
244
|
+
export { ActionType, AddNodeTypes, CodeAttributesKeyTypes, CrdTypes, Crud, DestinationTypes, EdgeTypes, EntityTypes, FieldTypes, HeadersCollectionKeyTypes, InstrumentationRuleType, K8sResourceKind, NodeTypes, OtherStatus, PayloadCollectionKeyTypes, PlatformType, ProgrammingLanguages, SignalType, SortDirection, StatusType, Tier };
|
package/lib/{useSourceSelectionFormData-BWz8fTJr.js → useSourceSelectionFormData-DiwzViqL.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
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-CVH8Q8Sl.js';
|
|
3
|
+
import { F as FORM_ALERTS } from './index-mOgS3e5E.js';
|
|
2
4
|
import { useState, useEffect, useMemo } from 'react';
|
|
3
|
-
import { g as useNotificationStore, f as useModalStore, b as useDrawerStore, c as useEntityStore, a as useDataStreamStore, j as useSetupStore } from './index-DMXaEyAB.js';
|
|
4
5
|
import 'styled-components';
|
|
5
|
-
import { i as isEmpty, s as safeJsonParse } from './index-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { g as getIdFromSseTarget } from './index-7-KCQK-x.js';
|
|
6
|
+
import { i as isEmpty, s as safeJsonParse } from './index-BV85P9UP.js';
|
|
7
|
+
import { b as useGenericForm } from './useTransition-B0eagOib.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)
|
|
@@ -213,6 +213,10 @@ const useDataStreamFormData = (initialFormData) => {
|
|
|
213
213
|
isValid = false;
|
|
214
214
|
errors['name'] = FORM_ALERTS.FIELD_IS_REQUIRED;
|
|
215
215
|
}
|
|
216
|
+
else if (!isLegalK8sLabel(formData['name'])) {
|
|
217
|
+
isValid = false;
|
|
218
|
+
errors['name'] = FORM_ALERTS.ILLEGAL_K8S_LABEL;
|
|
219
|
+
}
|
|
216
220
|
else {
|
|
217
221
|
errors['name'] = undefined;
|
|
218
222
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
2
|
-
import './index-
|
|
3
|
-
import { g as useNotificationStore } from './index-DMXaEyAB.js';
|
|
2
|
+
import { g as useNotificationStore } from './index-CVH8Q8Sl.js';
|
|
4
3
|
import { CodeAttributesKeyTypes, PayloadCollectionKeyTypes } from './types.js';
|
|
5
4
|
import styled from 'styled-components';
|
|
6
5
|
|