Select Dropdown alignment fix (#56858)

This commit is contained in:
Arpit Bhardwaj 2022-10-14 18:54:08 +05:30 committed by GitHub
parent 3dbb0f1659
commit e4b1347ca5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -6,7 +6,7 @@ import {
onUpdateDatasourceJsonDataOptionSelect,
onUpdateDatasourceJsonDataOptionChecked,
} 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 { GraphiteOptions, GraphiteType } from '../types';
@ -15,7 +15,7 @@ import { DEFAULT_GRAPHITE_VERSION, GRAPHITE_VERSIONS } from '../versions';
import { MappingsConfiguration } from './MappingsConfiguration';
import { fromString, toString } from './parseLokiLabelMappings';
const { Select, Switch } = LegacyForms;
const { Switch } = LegacyForms;
export const SHOW_MAPPINGS_HELP_KEY = 'grafana.datasources.graphite.config.showMappingsHelp';
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"
value={currentVersion}
options={graphiteVersions}
width={8}
className="width-8"
onChange={onUpdateDatasourceJsonDataOptionSelect(this.props, 'graphiteVersion')}
/>
</div>
@ -98,7 +98,7 @@ export class ConfigEditor extends PureComponent<Props, State> {
aria-label="Graphite backend type"
options={graphiteTypes}
value={graphiteTypes.find((type) => type.value === options.jsonData.graphiteType)}
width={8}
className="width-8"
onChange={onUpdateDatasourceJsonDataOptionSelect(this.props, 'graphiteType')}
/>
</div>

View File

@ -13,12 +13,13 @@ import {
InlineFormLabel,
LegacyForms,
regexValidation,
Select,
} from '@grafana/ui';
import { PromOptions } from '../types';
import { ExemplarsSettings } from './ExemplarsSettings';
const { Select, Input, FormField } = LegacyForms;
const { Input, FormField } = LegacyForms;
const httpOptions = [
{ value: 'POST', label: 'POST' },
@ -89,6 +90,7 @@ export const PromSettings = (props: Props) => {
options={httpOptions}
value={httpOptions.find((o) => o.value === options.jsonData.httpMethod)}
onChange={onChangeHandler('httpMethod', options, onOptionsChange)}
className="width-6"
/>
</div>
</div>