Skip to content

Commit 65ff78a

Browse files
committed
Issue #34: design review
1 parent 71578d4 commit 65ff78a

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/configuration/DataLink.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export const DataLink = (props: Props) => {
3131
const styles = useStyles2(getStyles);
3232
const [showInternalLink, setShowInternalLink] = useInternalLink(value.datasourceUid);
3333
const [base64TraceId, setBase64TraceId] = useState(true)
34+
const labelWidth = 24
3435

3536
const handleChange = (field: keyof typeof value) => (event: React.ChangeEvent<HTMLInputElement>) => {
3637
onChange({
@@ -50,7 +51,7 @@ export const DataLink = (props: Props) => {
5051
<InlineField
5152
label="Field"
5253
htmlFor="elasticsearch-datasource-config-field"
53-
labelWidth={12}
54+
labelWidth={labelWidth}
5455
tooltip={'Can be exact field name or a regex pattern that will match on the field name.'}
5556
>
5657
<Input
@@ -74,7 +75,7 @@ export const DataLink = (props: Props) => {
7475

7576
<InlineFieldRow>
7677
<div className={styles.urlField}>
77-
<InlineLabel htmlFor="elasticsearch-datasource-internal-link" width={12}>
78+
<InlineLabel htmlFor="elasticsearch-datasource-internal-link" width={labelWidth}>
7879
{showInternalLink ? 'Query' : 'URL'}
7980
</InlineLabel>
8081
<DataLinkInput
@@ -108,7 +109,16 @@ export const DataLink = (props: Props) => {
108109
</InlineFieldRow>
109110

110111
<div className={styles.row}>
111-
<InlineField label="Internal link" labelWidth={12}>
112+
<InlineField label="Field encoded in base64?" labelWidth={labelWidth} tooltip="Quickwit encodes the traceID in base64 by default whereas Jaeger uses hex">
113+
<InlineSwitch
114+
value={base64TraceId}
115+
onChange={() => handleBase64TraceId(!base64TraceId, value)}
116+
/>
117+
</InlineField>
118+
</div>
119+
120+
<div className={styles.row}>
121+
<InlineField label="Internal link" labelWidth={labelWidth}>
112122
<InlineSwitch
113123
label="Internal link"
114124
value={showInternalLink || false}
@@ -137,16 +147,6 @@ export const DataLink = (props: Props) => {
137147
/>
138148
)}
139149
</div>
140-
141-
<div className={styles.row}>
142-
<InlineField label="Base64" labelWidth={12} title="Base64 traceId">
143-
<InlineSwitch
144-
label="Base64 traceId"
145-
value={base64TraceId}
146-
onChange={() => handleBase64TraceId(!base64TraceId, value)}
147-
/>
148-
</InlineField>
149-
</div>
150150
</div>
151151
);
152152
};

0 commit comments

Comments
 (0)