diff --git a/public/app/plugins/datasource/jaeger/components/AdvancedOptions.tsx b/public/app/plugins/datasource/jaeger/components/AdvancedOptions.tsx deleted file mode 100644 index ff7c497ea95..00000000000 --- a/public/app/plugins/datasource/jaeger/components/AdvancedOptions.tsx +++ /dev/null @@ -1,131 +0,0 @@ -import { css } from '@emotion/css'; -import React, { useState } from 'react'; -import { CSSTransition } from 'react-transition-group'; - -import { GrafanaTheme } from '@grafana/data'; -import { Icon, InlineField, InlineFieldRow, InlineLabel, Input, useStyles } from '@grafana/ui'; - -import { JaegerQuery } from '../types'; - -const durationPlaceholder = 'e.g. 1.2s, 100ms, 500us'; - -type Props = { - query: JaegerQuery; - onChange: (value: JaegerQuery) => void; -}; - -export function AdvancedOptions({ query, onChange }: Props) { - const [showAdvancedOptions, setShowAdvancedOptions] = useState(false); - const styles = useStyles(getStyles); - - return ( -
- -
setShowAdvancedOptions(!showAdvancedOptions)}> - - Advanced options{' '} - - -
-
- -
- - - - onChange({ - ...query, - minDuration: v.currentTarget.value, - }) - } - /> - - - - - - onChange({ - ...query, - maxDuration: v.currentTarget.value, - }) - } - /> - - - - - - onChange({ - ...query, - limit: v.currentTarget.value ? parseInt(v.currentTarget.value, 10) : undefined, - }) - } - /> - - -
-
-
- ); -} - -function getStyles(theme: GrafanaTheme) { - return { - advancedOptionsContainer: css` - margin: 0 ${theme.spacing.xs} ${theme.spacing.xs} 0; - width: 100%; - cursor: pointer; - `, - enter: css` - label: enter; - height: 0; - opacity: 0; - `, - enterActive: css` - label: enterActive; - height: 108px; - opacity: 1; - transition: height 300ms ease, opacity 300ms ease; - `, - exit: css` - label: exit; - height: 108px; - opacity: 1; - `, - exitActive: css` - label: exitActive; - height: 0; - opacity: 0; - transition: height 300ms ease, opacity 300ms ease; - `, - angleUp: css` - transform: rotate(-180deg); - transition: transform 300ms; - `, - angleDown: css` - transform: rotate(0deg); - transition: transform 300ms; - `, - }; -} diff --git a/public/app/plugins/datasource/jaeger/components/SearchForm.tsx b/public/app/plugins/datasource/jaeger/components/SearchForm.tsx index 39456625696..5a3b00b0ca3 100644 --- a/public/app/plugins/datasource/jaeger/components/SearchForm.tsx +++ b/public/app/plugins/datasource/jaeger/components/SearchForm.tsx @@ -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; @@ -158,7 +158,54 @@ export function SearchForm({ datasource, query, onChange }: Props) { /> - + + + + onChange({ + ...query, + minDuration: v.currentTarget.value, + }) + } + /> + + + + + + onChange({ + ...query, + maxDuration: v.currentTarget.value, + }) + } + /> + + + + + + onChange({ + ...query, + limit: v.currentTarget.value ? parseInt(v.currentTarget.value, 10) : undefined, + }) + } + /> + + ); }