mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Select Dropdown alignment fix (#56858)
This commit is contained in:
parent
3dbb0f1659
commit
e4b1347ca5
@ -6,7 +6,7 @@ import {
|
|||||||
onUpdateDatasourceJsonDataOptionSelect,
|
onUpdateDatasourceJsonDataOptionSelect,
|
||||||
onUpdateDatasourceJsonDataOptionChecked,
|
onUpdateDatasourceJsonDataOptionChecked,
|
||||||
} from '@grafana/data';
|
} from '@grafana/data';
|
||||||
import { Alert, DataSourceHttpSettings, InlineFormLabel, LegacyForms } from '@grafana/ui';
|
import { Alert, DataSourceHttpSettings, InlineFormLabel, LegacyForms, Select } from '@grafana/ui';
|
||||||
import store from 'app/core/store';
|
import store from 'app/core/store';
|
||||||
|
|
||||||
import { GraphiteOptions, GraphiteType } from '../types';
|
import { GraphiteOptions, GraphiteType } from '../types';
|
||||||
@ -15,7 +15,7 @@ import { DEFAULT_GRAPHITE_VERSION, GRAPHITE_VERSIONS } from '../versions';
|
|||||||
import { MappingsConfiguration } from './MappingsConfiguration';
|
import { MappingsConfiguration } from './MappingsConfiguration';
|
||||||
import { fromString, toString } from './parseLokiLabelMappings';
|
import { fromString, toString } from './parseLokiLabelMappings';
|
||||||
|
|
||||||
const { Select, Switch } = LegacyForms;
|
const { Switch } = LegacyForms;
|
||||||
export const SHOW_MAPPINGS_HELP_KEY = 'grafana.datasources.graphite.config.showMappingsHelp';
|
export const SHOW_MAPPINGS_HELP_KEY = 'grafana.datasources.graphite.config.showMappingsHelp';
|
||||||
|
|
||||||
const graphiteVersions = GRAPHITE_VERSIONS.map((version) => ({ label: `${version}.x`, value: version }));
|
const graphiteVersions = GRAPHITE_VERSIONS.map((version) => ({ label: `${version}.x`, value: version }));
|
||||||
@ -86,7 +86,7 @@ export class ConfigEditor extends PureComponent<Props, State> {
|
|||||||
aria-label="Graphite version"
|
aria-label="Graphite version"
|
||||||
value={currentVersion}
|
value={currentVersion}
|
||||||
options={graphiteVersions}
|
options={graphiteVersions}
|
||||||
width={8}
|
className="width-8"
|
||||||
onChange={onUpdateDatasourceJsonDataOptionSelect(this.props, 'graphiteVersion')}
|
onChange={onUpdateDatasourceJsonDataOptionSelect(this.props, 'graphiteVersion')}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -98,7 +98,7 @@ export class ConfigEditor extends PureComponent<Props, State> {
|
|||||||
aria-label="Graphite backend type"
|
aria-label="Graphite backend type"
|
||||||
options={graphiteTypes}
|
options={graphiteTypes}
|
||||||
value={graphiteTypes.find((type) => type.value === options.jsonData.graphiteType)}
|
value={graphiteTypes.find((type) => type.value === options.jsonData.graphiteType)}
|
||||||
width={8}
|
className="width-8"
|
||||||
onChange={onUpdateDatasourceJsonDataOptionSelect(this.props, 'graphiteType')}
|
onChange={onUpdateDatasourceJsonDataOptionSelect(this.props, 'graphiteType')}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,12 +13,13 @@ import {
|
|||||||
InlineFormLabel,
|
InlineFormLabel,
|
||||||
LegacyForms,
|
LegacyForms,
|
||||||
regexValidation,
|
regexValidation,
|
||||||
|
Select,
|
||||||
} from '@grafana/ui';
|
} from '@grafana/ui';
|
||||||
|
|
||||||
import { PromOptions } from '../types';
|
import { PromOptions } from '../types';
|
||||||
|
|
||||||
import { ExemplarsSettings } from './ExemplarsSettings';
|
import { ExemplarsSettings } from './ExemplarsSettings';
|
||||||
const { Select, Input, FormField } = LegacyForms;
|
const { Input, FormField } = LegacyForms;
|
||||||
|
|
||||||
const httpOptions = [
|
const httpOptions = [
|
||||||
{ value: 'POST', label: 'POST' },
|
{ value: 'POST', label: 'POST' },
|
||||||
@ -89,6 +90,7 @@ export const PromSettings = (props: Props) => {
|
|||||||
options={httpOptions}
|
options={httpOptions}
|
||||||
value={httpOptions.find((o) => o.value === options.jsonData.httpMethod)}
|
value={httpOptions.find((o) => o.value === options.jsonData.httpMethod)}
|
||||||
onChange={onChangeHandler('httpMethod', options, onOptionsChange)}
|
onChange={onChangeHandler('httpMethod', options, onOptionsChange)}
|
||||||
|
className="width-6"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user