@odigos/ui-kit 0.0.36 → 0.0.37
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 +12 -0
- package/lib/containers/destination-form/test-connection/index.d.ts +0 -1
- package/lib/containers.js +9 -5
- package/lib/functions.js +1 -1
- package/lib/{index-CrethNg6.js → index--2v2LKeo.js} +2 -0
- package/lib/types/destinations/index.d.ts +2 -0
- package/lib/types.js +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.37](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.36...ui-kit-v0.0.37) (2025-06-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add 2 Splunk dest types ([#161](https://github.com/odigos-io/ui-kit/issues/161)) ([a634f14](https://github.com/odigos-io/ui-kit/commit/a634f143b99e479b4e956324157e5d540209fb53))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* test connection ([#162](https://github.com/odigos-io/ui-kit/issues/162)) ([d62a3d5](https://github.com/odigos-io/ui-kit/commit/d62a3d506bd9f36175ceba982221ac9e2b44d6f9))
|
|
14
|
+
|
|
3
15
|
## [0.0.36](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.35...ui-kit-v0.0.36) (2025-06-05)
|
|
4
16
|
|
|
5
17
|
|
|
@@ -2,7 +2,6 @@ import { type FC } from 'react';
|
|
|
2
2
|
import { DestinationFormData, StatusType, TestConnectionFunc, TestConnectionResponse } from '@/types';
|
|
3
3
|
interface TestConnectionProps {
|
|
4
4
|
destination: DestinationFormData;
|
|
5
|
-
disabled: boolean;
|
|
6
5
|
validateForm: () => boolean;
|
|
7
6
|
status?: StatusType;
|
|
8
7
|
testConnection: TestConnectionFunc;
|
package/lib/containers.js
CHANGED
|
@@ -12,7 +12,7 @@ import { E as EditIcon } from './index-t3OxxFsp.js';
|
|
|
12
12
|
import { T as TrashIcon, S as SearchIcon, P as PlusIcon$1, f as CheckIcon, A as ArrowIcon, a as CopyIcon, g as CrossIcon } from './index-D8AnbGCE.js';
|
|
13
13
|
import { D as DeleteWarning, C as CancelWarning } from './index-CNbTSsNJ.js';
|
|
14
14
|
import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-BbEmZ4Wj.js';
|
|
15
|
-
import { f as filterActions, i as getConditionsBooleans, n as getEntityLabel, m as getEntityIcon, w as sleep$1, p as getPlatformIcon, q as getPlatformLabel, h as formatBytes, k as getContainersIcons, r as getValueForRange, l as getDestinationIcon, g as filterSourcesByStream, e as filterSources, b as filterDestinationsByStream, a as filterDestinations, v as mapDestinationFieldsForDisplay, c as compareCondition, t as getYamlFieldsForDestination, d as deepClone, o as getMetricForEntity, s as getWorkloadId, j as getContainersInstrumentedCount, u as isOverTime } from './index
|
|
15
|
+
import { f as filterActions, i as getConditionsBooleans, n as getEntityLabel, m as getEntityIcon, w as sleep$1, p as getPlatformIcon, q as getPlatformLabel, h as formatBytes, k as getContainersIcons, r as getValueForRange, l as getDestinationIcon, g as filterSourcesByStream, e as filterSources, b as filterDestinationsByStream, a as filterDestinations, v as mapDestinationFieldsForDisplay, c as compareCondition, t as getYamlFieldsForDestination, d as deepClone, o as getMetricForEntity, s as getWorkloadId, j as getContainersInstrumentedCount, u as isOverTime } from './index--2v2LKeo.js';
|
|
16
16
|
import { createPortal } from 'react-dom';
|
|
17
17
|
import { m as mapExportedSignals } from './index-BlZKWuxe.js';
|
|
18
18
|
import { N as NoteBackToSummary, E as EditButton } from './index-oEjS7cX3.js';
|
|
@@ -14475,13 +14475,17 @@ const ActionButton = styled(Button) `
|
|
|
14475
14475
|
background-color: transparent;
|
|
14476
14476
|
`}
|
|
14477
14477
|
`;
|
|
14478
|
-
const TestConnection = ({ destination,
|
|
14478
|
+
const TestConnection = ({ destination, validateForm, status, testConnection, onSuccess, onError }) => {
|
|
14479
14479
|
const theme = Theme.useTheme();
|
|
14480
|
+
const { selectedStreamName } = useDataStreamStore();
|
|
14480
14481
|
const [loading, setLoading] = useState(false);
|
|
14481
14482
|
const onClick = async () => {
|
|
14482
14483
|
if (validateForm()) {
|
|
14483
14484
|
setLoading(true);
|
|
14484
|
-
const testResult = await testConnection(
|
|
14485
|
+
const testResult = await testConnection({
|
|
14486
|
+
...destination,
|
|
14487
|
+
currentStreamName: selectedStreamName,
|
|
14488
|
+
});
|
|
14485
14489
|
// 1st if - check if we got a response (if undefined, then Apollo Client caught an error)
|
|
14486
14490
|
if (testResult) {
|
|
14487
14491
|
// 2nd if - check if the test was successful or not
|
|
@@ -14496,7 +14500,7 @@ const TestConnection = ({ destination, disabled, validateForm, status, testConne
|
|
|
14496
14500
|
}
|
|
14497
14501
|
};
|
|
14498
14502
|
const Icon = !!status ? getStatusIcon(status, theme) : undefined;
|
|
14499
|
-
return (React.createElement(ActionButton, { "$status": status, variant: 'secondary',
|
|
14503
|
+
return (React.createElement(ActionButton, { "$status": status, variant: 'secondary', onClick: onClick },
|
|
14500
14504
|
loading ? React.createElement(FadeLoader, null) : Icon ? React.createElement(Icon, null) : null,
|
|
14501
14505
|
React.createElement(Text, { family: 'secondary', decoration: 'underline', size: 14, color: !!status ? theme.text[status] : undefined }, loading ? 'Checking' : status === StatusType.Success ? 'Connection OK' : status === 'error' ? 'Connection Failed' : 'Test Connection')));
|
|
14502
14506
|
};
|
|
@@ -14591,7 +14595,7 @@ const DestinationForm = ({ isUpdate, categoryItem, formData, formErrors, validat
|
|
|
14591
14595
|
};
|
|
14592
14596
|
return (React.createElement(Container$a, { "$gap": 24 },
|
|
14593
14597
|
React.createElement(Container$a, { "$gap": 12 },
|
|
14594
|
-
React.createElement(SectionTitle, { title: isUpdate ? 'Update destination' : 'Create destination', description: `Connect ${displayName} with Odigos.`, actionButton: testConnectionSupported && (React.createElement(TestConnection, { destination: formData,
|
|
14598
|
+
React.createElement(SectionTitle, { title: isUpdate ? 'Update destination' : 'Create destination', description: `Connect ${displayName} with Odigos.`, actionButton: testConnectionSupported && (React.createElement(TestConnection, { destination: formData, validateForm: validateForm, status: connection?.type, testConnection: testConnection, onError: onTestConnectionError, onSuccess: onTestConnectionSuccess })) }),
|
|
14595
14599
|
React.createElement(NotesWrapper, null,
|
|
14596
14600
|
testConnectionSupported && connection && React.createElement(NotificationNote, { type: connection.type, title: connection.title, message: connection.message }),
|
|
14597
14601
|
autoFilled && !connection && !isUpdate && React.createElement(NotificationNote, { type: StatusType.Default, message: `Odigos autocompleted ${displayName} destination details.` })),
|
package/lib/functions.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { c as capitalizeFirstLetter, f as flattenObjectKeys, g as getMonitorIcon, a as getProgrammingLanguageIcon, b as getStatusIcon, m as mapConditions, n as numbersOnly, p as parseJsonStringToPrettyString, r as removeEmptyValuesFromObject, s as safeJsonStringify, d as splitCamelString } from './index-BbEmZ4Wj.js';
|
|
2
|
-
export { c as compareCondition, d as deepClone, f as filterActions, a as filterDestinations, b as filterDestinationsByStream, e as filterSources, g as filterSourcesByStream, h as formatBytes, i as getConditionsBooleans, k as getContainersIcons, j as getContainersInstrumentedCount, l as getDestinationIcon, m as getEntityIcon, n as getEntityLabel, o as getMetricForEntity, p as getPlatformIcon, q as getPlatformLabel, r as getValueForRange, s as getWorkloadId, t as getYamlFieldsForDestination, u as isOverTime, v as mapDestinationFieldsForDisplay, w as sleep } from './index
|
|
2
|
+
export { c as compareCondition, d as deepClone, f as filterActions, a as filterDestinations, b as filterDestinationsByStream, e as filterSources, g as filterSourcesByStream, h as formatBytes, i as getConditionsBooleans, k as getContainersIcons, j as getContainersInstrumentedCount, l as getDestinationIcon, m as getEntityIcon, n as getEntityLabel, o as getMetricForEntity, p as getPlatformIcon, q as getPlatformLabel, r as getValueForRange, s as getWorkloadId, t as getYamlFieldsForDestination, u as isOverTime, v as mapDestinationFieldsForDisplay, w as sleep } from './index--2v2LKeo.js';
|
|
3
3
|
export { l as getActionIcon, m as getEntityId, n as getInstrumentationRuleIcon } from './index-aRNtyuuU.js';
|
|
4
4
|
export { g as getIdFromSseTarget, i as isLegalK8sLabel, m as mapExportedSignals } from './index-BlZKWuxe.js';
|
|
5
5
|
import { EntityTypes } from './types.js';
|
|
@@ -177,6 +177,8 @@ const getDestinationIcon = (type, forceFromUrl) => {
|
|
|
177
177
|
[DestinationTypes.Seq]: SeqLogo,
|
|
178
178
|
[DestinationTypes.Signoz]: SignozLogo,
|
|
179
179
|
[DestinationTypes.Splunk]: SplunkLogo,
|
|
180
|
+
[DestinationTypes.SplunkSapm]: SplunkLogo,
|
|
181
|
+
[DestinationTypes.SplunkOtlp]: SplunkLogo,
|
|
180
182
|
[DestinationTypes.SumoLogic]: SumoLogicLogo,
|
|
181
183
|
[DestinationTypes.TelemetryHub]: TelemetryHubLogo,
|
|
182
184
|
[DestinationTypes.Tempo]: TempoLogo,
|
package/lib/types.js
CHANGED
|
@@ -251,6 +251,8 @@ var DestinationTypes;
|
|
|
251
251
|
DestinationTypes["Seq"] = "seq";
|
|
252
252
|
DestinationTypes["Signoz"] = "signoz";
|
|
253
253
|
DestinationTypes["Splunk"] = "splunk";
|
|
254
|
+
DestinationTypes["SplunkSapm"] = "splunksapm";
|
|
255
|
+
DestinationTypes["SplunkOtlp"] = "splunkotlp";
|
|
254
256
|
DestinationTypes["SumoLogic"] = "sumologic";
|
|
255
257
|
DestinationTypes["TelemetryHub"] = "telemetryhub";
|
|
256
258
|
DestinationTypes["Tempo"] = "tempo";
|