Skip to content

Commit

Permalink
Jaeger: Remove advanced options toggle & show advanced options by def…
Browse files Browse the repository at this point in the history
…ault (grafana#53774)

Jaeger: Remove advanced options toggle & show advanced options by default
Jaeger: Make the width of all labels in the search form the same
Jaeger: Fix typo in the tooltip for the "Limit" field
Chore: Re-add durationPlaceholder constant
  • Loading branch information
Hamas Shafiq authored Aug 16, 2022
1 parent e3501df commit 860fd83
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 133 deletions.
131 changes: 0 additions & 131 deletions public/app/plugins/datasource/jaeger/components/AdvancedOptions.tsx

This file was deleted.

51 changes: 49 additions & 2 deletions public/app/plugins/datasource/jaeger/components/SearchForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { JaegerDatasource } from '../datasource';
import { JaegerQuery } from '../types';
import { transformToLogfmt } from '../util';

import { AdvancedOptions } from './AdvancedOptions';
const durationPlaceholder = 'e.g. 1.2s, 100ms, 500us';

type Props = {
datasource: JaegerDatasource;
Expand Down Expand Up @@ -158,7 +158,54 @@ export function SearchForm({ datasource, query, onChange }: Props) {
/>
</InlineField>
</InlineFieldRow>
<AdvancedOptions query={query} onChange={onChange} />
<InlineFieldRow>
<InlineField label="Min Duration" labelWidth={14} grow>
<Input
id="minDuration"
name="minDuration"
value={query.minDuration || ''}
placeholder={durationPlaceholder}
onChange={(v) =>
onChange({
...query,
minDuration: v.currentTarget.value,
})
}
/>
</InlineField>
</InlineFieldRow>
<InlineFieldRow>
<InlineField label="Max Duration" labelWidth={14} grow>
<Input
id="maxDuration"
name="maxDuration"
value={query.maxDuration || ''}
placeholder={durationPlaceholder}
onChange={(v) =>
onChange({
...query,
maxDuration: v.currentTarget.value,
})
}
/>
</InlineField>
</InlineFieldRow>
<InlineFieldRow>
<InlineField label="Limit" labelWidth={14} grow tooltip="Maximum number of returned results">
<Input
id="limit"
name="limit"
value={query.limit || ''}
type="number"
onChange={(v) =>
onChange({
...query,
limit: v.currentTarget.value ? parseInt(v.currentTarget.value, 10) : undefined,
})
}
/>
</InlineField>
</InlineFieldRow>
</div>
);
}
Expand Down

0 comments on commit 860fd83

Please sign in to comment.