diff --git a/src/configuration/DataLink.tsx b/src/configuration/DataLink.tsx index c2cb76c..bfde386 100644 --- a/src/configuration/DataLink.tsx +++ b/src/configuration/DataLink.tsx @@ -30,6 +30,7 @@ export const DataLink = (props: Props) => { const { value, onChange, onDelete, suggestions, className } = props; const styles = useStyles2(getStyles); const [showInternalLink, setShowInternalLink] = useInternalLink(value.datasourceUid); + const [base64TraceId, setBase64TraceId] = useState(true) const handleChange = (field: keyof typeof value) => (event: React.ChangeEvent) => { onChange({ @@ -38,6 +39,11 @@ export const DataLink = (props: Props) => { }); }; + const handleBase64TraceId = (base64TraceId: boolean, config: DataLinkConfig) => { + setBase64TraceId(base64TraceId) + config = {...config, base64TraceId: base64TraceId }; + } + return (
@@ -131,6 +137,17 @@ export const DataLink = (props: Props) => { /> )}
+ +
+ + handleBase64TraceId(!base64TraceId, value)} + /> + +
); };