InfluxDB: fix accessibility problems (#42553)

* influxdb: influxql: query editor a11y fixes

* configure datasource page a11y fixes

* fixed unit test

* better a11y

* better a11y for the query editor

* simplify code

* updated tests

* removed explicit aria-label
This commit is contained in:
Gábor Farkas
2021-12-15 15:57:08 +01:00
committed by GitHub
parent 1569529808
commit 50c6c7a528
8 changed files with 83 additions and 170 deletions

View File

@@ -12,11 +12,14 @@ import { InlineFieldRow } from '../Forms/InlineFieldRow';
*/ */
export const SegmentSection = ({ export const SegmentSection = ({
label, label,
htmlFor,
children, children,
fill, fill,
}: { }: {
// Name of the section // Name of the section
label: string; label: string;
// htmlFor for the label
htmlFor?: string;
// List of components in the section // List of components in the section
children: React.ReactNode; children: React.ReactNode;
// Fill the space at the end // Fill the space at the end
@@ -26,7 +29,7 @@ export const SegmentSection = ({
return ( return (
<> <>
<InlineFieldRow> <InlineFieldRow>
<InlineLabel width={12} className={styles.label}> <InlineLabel htmlFor={htmlFor} width={12} className={styles.label}>
{label} {label}
</InlineLabel> </InlineLabel>
{children} {children}

View File

@@ -2,6 +2,17 @@ import React from 'react';
import { shallow } from 'enzyme'; import { shallow } from 'enzyme';
import ConfigEditor, { Props } from './ConfigEditor'; import ConfigEditor, { Props } from './ConfigEditor';
jest.mock('lodash', () => {
const uniqueId = (prefix: string) => `${prefix}42`;
const orig = jest.requireActual('lodash');
return {
...orig,
uniqueId,
};
});
const setup = (propOverrides?: object) => { const setup = (propOverrides?: object) => {
const props: Props = { const props: Props = {
options: { options: {

View File

@@ -1,4 +1,5 @@
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import { uniqueId } from 'lodash';
import { import {
DataSourcePluginOptionsEditorProps, DataSourcePluginOptionsEditorProps,
SelectableValue, SelectableValue,
@@ -9,8 +10,8 @@ import {
onUpdateDatasourceSecureJsonDataOption, onUpdateDatasourceSecureJsonDataOption,
updateDatasourcePluginJsonDataOption, updateDatasourcePluginJsonDataOption,
} from '@grafana/data'; } from '@grafana/data';
import { Alert, DataSourceHttpSettings, InfoBox, InlineField, InlineFormLabel, LegacyForms } from '@grafana/ui'; import { Alert, DataSourceHttpSettings, InfoBox, InlineField, InlineFormLabel, LegacyForms, Select } from '@grafana/ui';
const { Select, Input, SecretFormField } = LegacyForms; const { Input, SecretFormField } = LegacyForms;
import { InfluxOptions, InfluxSecureJsonData, InfluxVersion } from '../types'; import { InfluxOptions, InfluxSecureJsonData, InfluxVersion } from '../types';
const httpModes = [ const httpModes = [
@@ -41,9 +42,12 @@ export class ConfigEditor extends PureComponent<Props, State> {
maxSeries: '', maxSeries: '',
}; };
htmlPrefix: string;
constructor(props: Props) { constructor(props: Props) {
super(props); super(props);
this.state.maxSeries = props.options.jsonData.maxSeries?.toString() || ''; this.state.maxSeries = props.options.jsonData.maxSeries?.toString() || '';
this.htmlPrefix = uniqueId('influxdb-config');
} }
// 1x // 1x
@@ -83,14 +87,18 @@ export class ConfigEditor extends PureComponent<Props, State> {
const { options } = this.props; const { options } = this.props;
const { secureJsonFields } = options; const { secureJsonFields } = options;
const secureJsonData = (options.secureJsonData || {}) as InfluxSecureJsonData; const secureJsonData = (options.secureJsonData || {}) as InfluxSecureJsonData;
const { htmlPrefix } = this;
return ( return (
<> <>
<div className="gf-form-inline"> <div className="gf-form-inline">
<div className="gf-form"> <div className="gf-form">
<InlineFormLabel className="width-10">Organization</InlineFormLabel> <InlineFormLabel htmlFor={`${htmlPrefix}-org`} className="width-10">
Organization
</InlineFormLabel>
<div className="width-10"> <div className="width-10">
<Input <Input
id={`${htmlPrefix}-org`}
className="width-20" className="width-20"
value={options.jsonData.organization || ''} value={options.jsonData.organization || ''}
onChange={onUpdateDatasourceJsonDataOption(this.props, 'organization')} onChange={onUpdateDatasourceJsonDataOption(this.props, 'organization')}
@@ -152,6 +160,7 @@ export class ConfigEditor extends PureComponent<Props, State> {
const { options } = this.props; const { options } = this.props;
const { secureJsonFields } = options; const { secureJsonFields } = options;
const secureJsonData = (options.secureJsonData || {}) as InfluxSecureJsonData; const secureJsonData = (options.secureJsonData || {}) as InfluxSecureJsonData;
const { htmlPrefix } = this;
return ( return (
<> <>
@@ -169,9 +178,12 @@ export class ConfigEditor extends PureComponent<Props, State> {
</InfoBox> </InfoBox>
<div className="gf-form-inline"> <div className="gf-form-inline">
<div className="gf-form"> <div className="gf-form">
<InlineFormLabel className="width-10">Database</InlineFormLabel> <InlineFormLabel htmlFor={`${htmlPrefix}-db`} className="width-10">
Database
</InlineFormLabel>
<div className="width-20"> <div className="width-20">
<Input <Input
id={`${htmlPrefix}-db`}
className="width-20" className="width-20"
value={options.database || ''} value={options.database || ''}
onChange={onUpdateDatasourceOption(this.props, 'database')} onChange={onUpdateDatasourceOption(this.props, 'database')}
@@ -181,9 +193,12 @@ export class ConfigEditor extends PureComponent<Props, State> {
</div> </div>
<div className="gf-form-inline"> <div className="gf-form-inline">
<div className="gf-form"> <div className="gf-form">
<InlineFormLabel className="width-10">User</InlineFormLabel> <InlineFormLabel htmlFor={`${htmlPrefix}-user`} className="width-10">
User
</InlineFormLabel>
<div className="width-10"> <div className="width-10">
<Input <Input
id={`${htmlPrefix}-user`}
className="width-20" className="width-20"
value={options.user || ''} value={options.user || ''}
onChange={onUpdateDatasourceOption(this.props, 'user')} onChange={onUpdateDatasourceOption(this.props, 'user')}
@@ -207,6 +222,7 @@ export class ConfigEditor extends PureComponent<Props, State> {
<div className="gf-form-inline"> <div className="gf-form-inline">
<div className="gf-form"> <div className="gf-form">
<InlineFormLabel <InlineFormLabel
htmlFor={`${htmlPrefix}-http-method`}
className="width-10" className="width-10"
tooltip="You can use either GET or POST HTTP method to query your InfluxDB database. The POST tooltip="You can use either GET or POST HTTP method to query your InfluxDB database. The POST
method allows you to perform heavy requests (with a lots of WHERE clause) while the GET method method allows you to perform heavy requests (with a lots of WHERE clause) while the GET method
@@ -215,6 +231,7 @@ export class ConfigEditor extends PureComponent<Props, State> {
HTTP Method HTTP Method
</InlineFormLabel> </InlineFormLabel>
<Select <Select
inputId={`${htmlPrefix}-http-method`}
menuShouldPortal menuShouldPortal
className="width-10" className="width-10"
value={httpModes.find((httpMode) => httpMode.value === options.jsonData.httpMode)} value={httpModes.find((httpMode) => httpMode.value === options.jsonData.httpMode)}
@@ -258,6 +275,7 @@ export class ConfigEditor extends PureComponent<Props, State> {
<div className="gf-form-inline"> <div className="gf-form-inline">
<div className="gf-form"> <div className="gf-form">
<Select <Select
aria-label="Query language"
menuShouldPortal menuShouldPortal
className="width-30" className="width-30"
value={options.jsonData.version === InfluxVersion.Flux ? versions[1] : versions[0]} value={options.jsonData.version === InfluxVersion.Flux ? versions[1] : versions[0]}

View File

@@ -18,6 +18,7 @@ export const QueryEditorModeSwitcher = ({ isRaw, onChange }: Props): JSX.Element
return ( return (
<> <>
<Button <Button
aria-label="Switch to visual editor"
icon="pen" icon="pen"
variant="secondary" variant="secondary"
type="button" type="button"
@@ -44,6 +45,7 @@ export const QueryEditorModeSwitcher = ({ isRaw, onChange }: Props): JSX.Element
} else { } else {
return ( return (
<Button <Button
aria-label="Switch to text editor"
icon="pen" icon="pen"
variant="secondary" variant="secondary"
type="button" type="button"

View File

@@ -29,6 +29,7 @@ import { getNewSelectPartOptions, getNewGroupByPartOptions, makePartList } from
import { InlineLabel, SegmentSection, useStyles2 } from '@grafana/ui'; import { InlineLabel, SegmentSection, useStyles2 } from '@grafana/ui';
import { GrafanaTheme2 } from '@grafana/data'; import { GrafanaTheme2 } from '@grafana/data';
import { css } from '@emotion/css'; import { css } from '@emotion/css';
import { useUniqueId } from '../useUniqueId';
type Props = { type Props = {
query: InfluxQuery; query: InfluxQuery;
@@ -53,6 +54,10 @@ function withTemplateVariableOptions(optionsPromise: Promise<string[]>): Promise
} }
export const Editor = (props: Props): JSX.Element => { export const Editor = (props: Props): JSX.Element => {
const uniqueId = useUniqueId();
const formatAsId = `influxdb-qe-format-as-${uniqueId}`;
const orderByTimeId = `influxdb-qe-order-by${uniqueId}`;
const styles = useStyles2(getStyles); const styles = useStyles2(getStyles);
const query = normalizeQuery(props.query); const query = normalizeQuery(props.query);
const { datasource } = props; const { datasource } = props;
@@ -172,10 +177,11 @@ export const Editor = (props: Props): JSX.Element => {
onAppliedChange({ ...query, tz }); onAppliedChange({ ...query, tz });
}} }}
/> />
<InlineLabel width="auto" className={styles.inlineLabel}> <InlineLabel htmlFor={orderByTimeId} width="auto" className={styles.inlineLabel}>
ORDER BY TIME ORDER BY TIME
</InlineLabel> </InlineLabel>
<OrderByTimeSection <OrderByTimeSection
inputId={orderByTimeId}
value={query.orderByTime === 'DESC' ? 'DESC' : 'ASC' /* FIXME: make this shared with influx_query_model */} value={query.orderByTime === 'DESC' ? 'DESC' : 'ASC' /* FIXME: make this shared with influx_query_model */}
onChange={(v) => { onChange={(v) => {
onAppliedChange({ ...query, orderByTime: v }); onAppliedChange({ ...query, orderByTime: v });
@@ -206,8 +212,9 @@ export const Editor = (props: Props): JSX.Element => {
}} }}
/> />
</SegmentSection> </SegmentSection>
<SegmentSection label="FORMAT AS" fill={true}> <SegmentSection htmlFor={formatAsId} label="FORMAT AS" fill={true}>
<FormatAsSection <FormatAsSection
inputId={formatAsId}
format={query.resultFormat ?? DEFAULT_RESULT_FORMAT} format={query.resultFormat ?? DEFAULT_RESULT_FORMAT}
onChange={(format) => { onChange={(format) => {
onAppliedChange({ ...query, resultFormat: format }); onAppliedChange({ ...query, resultFormat: format });

View File

@@ -7,15 +7,17 @@ import { RESULT_FORMATS } from '../constants';
import { paddingRightClass } from './styles'; import { paddingRightClass } from './styles';
type Props = { type Props = {
inputId?: string;
format: ResultFormat; format: ResultFormat;
onChange: (newFormat: ResultFormat) => void; onChange: (newFormat: ResultFormat) => void;
}; };
const className = cx('width-8', paddingRightClass); const className = cx('width-8', paddingRightClass);
export const FormatAsSection = ({ format, onChange }: Props): JSX.Element => { export const FormatAsSection = ({ format, inputId, onChange }: Props): JSX.Element => {
return ( return (
<Select<ResultFormat> <Select<ResultFormat>
inputId={inputId}
className={className} className={className}
onChange={(v) => { onChange={(v) => {
onChange(unwrap(v.value)); onChange(unwrap(v.value));

View File

@@ -17,12 +17,14 @@ const className = cx('width-9', paddingRightClass);
type Props = { type Props = {
value: Mode; value: Mode;
onChange: (value: Mode) => void; onChange: (value: Mode) => void;
inputId?: string;
}; };
export const OrderByTimeSection = ({ value, onChange }: Props): JSX.Element => { export const OrderByTimeSection = ({ value, onChange, inputId }: Props): JSX.Element => {
return ( return (
<> <>
<Select<Mode> <Select<Mode>
inputId={inputId}
className={className} className={className}
onChange={(v) => { onChange={(v) => {
onChange(unwrap(v.value)); onChange(unwrap(v.value));

View File

@@ -17,19 +17,8 @@ exports[`Render should disable basic auth password input 1`] = `
className="gf-form" className="gf-form"
> >
<Select <Select
allowCustomValue={false} aria-label="Query language"
autoFocus={false}
backspaceRemovesValue={true}
className="width-30" className="width-30"
components={
Object {
"Group": [Function],
"IndicatorsContainer": [Function],
"MenuList": [Function],
"Option": [Function],
"SingleValue": [Function],
}
}
defaultValue={ defaultValue={
Object { Object {
"description": "The InfluxDB SQL-like query language.", "description": "The InfluxDB SQL-like query language.",
@@ -37,15 +26,8 @@ exports[`Render should disable basic auth password input 1`] = `
"value": "InfluxQL", "value": "InfluxQL",
} }
} }
isClearable={false}
isDisabled={false}
isLoading={false}
isMulti={false}
isSearchable={true}
maxMenuHeight={300}
menuShouldPortal={true} menuShouldPortal={true}
onChange={[Function]} onChange={[Function]}
openMenuOnFocus={false}
options={ options={
Array [ Array [
Object { Object {
@@ -60,7 +42,6 @@ exports[`Render should disable basic auth password input 1`] = `
}, },
] ]
} }
tabSelectsValue={true}
value={ value={
Object { Object {
"description": "The InfluxDB SQL-like query language.", "description": "The InfluxDB SQL-like query language.",
@@ -141,6 +122,7 @@ exports[`Render should disable basic auth password input 1`] = `
> >
<FormLabel <FormLabel
className="width-10" className="width-10"
htmlFor="influxdb-config42-db"
> >
Database Database
</FormLabel> </FormLabel>
@@ -149,6 +131,7 @@ exports[`Render should disable basic auth password input 1`] = `
> >
<Input <Input
className="width-20" className="width-20"
id="influxdb-config42-db"
onChange={[Function]} onChange={[Function]}
value="" value=""
/> />
@@ -163,6 +146,7 @@ exports[`Render should disable basic auth password input 1`] = `
> >
<FormLabel <FormLabel
className="width-10" className="width-10"
htmlFor="influxdb-config42-user"
> >
User User
</FormLabel> </FormLabel>
@@ -171,6 +155,7 @@ exports[`Render should disable basic auth password input 1`] = `
> >
<Input <Input
className="width-20" className="width-20"
id="influxdb-config42-user"
onChange={[Function]} onChange={[Function]}
value="" value=""
/> />
@@ -201,6 +186,7 @@ exports[`Render should disable basic auth password input 1`] = `
> >
<FormLabel <FormLabel
className="width-10" className="width-10"
htmlFor="influxdb-config42-http-method"
tooltip="You can use either GET or POST HTTP method to query your InfluxDB database. The POST tooltip="You can use either GET or POST HTTP method to query your InfluxDB database. The POST
method allows you to perform heavy requests (with a lots of WHERE clause) while the GET method method allows you to perform heavy requests (with a lots of WHERE clause) while the GET method
will restrict you and return an error if the query is too large." will restrict you and return an error if the query is too large."
@@ -208,29 +194,11 @@ exports[`Render should disable basic auth password input 1`] = `
HTTP Method HTTP Method
</FormLabel> </FormLabel>
<Select <Select
allowCustomValue={false}
autoFocus={false}
backspaceRemovesValue={true}
className="width-10" className="width-10"
components={
Object {
"Group": [Function],
"IndicatorsContainer": [Function],
"MenuList": [Function],
"Option": [Function],
"SingleValue": [Function],
}
}
defaultValue="POST" defaultValue="POST"
isClearable={false} inputId="influxdb-config42-http-method"
isDisabled={false}
isLoading={false}
isMulti={false}
isSearchable={true}
maxMenuHeight={300}
menuShouldPortal={true} menuShouldPortal={true}
onChange={[Function]} onChange={[Function]}
openMenuOnFocus={false}
options={ options={
Array [ Array [
Object { Object {
@@ -243,7 +211,6 @@ exports[`Render should disable basic auth password input 1`] = `
}, },
] ]
} }
tabSelectsValue={true}
value={ value={
Object { Object {
"label": "POST", "label": "POST",
@@ -316,19 +283,8 @@ exports[`Render should hide basic auth fields when switch off 1`] = `
className="gf-form" className="gf-form"
> >
<Select <Select
allowCustomValue={false} aria-label="Query language"
autoFocus={false}
backspaceRemovesValue={true}
className="width-30" className="width-30"
components={
Object {
"Group": [Function],
"IndicatorsContainer": [Function],
"MenuList": [Function],
"Option": [Function],
"SingleValue": [Function],
}
}
defaultValue={ defaultValue={
Object { Object {
"description": "The InfluxDB SQL-like query language.", "description": "The InfluxDB SQL-like query language.",
@@ -336,15 +292,8 @@ exports[`Render should hide basic auth fields when switch off 1`] = `
"value": "InfluxQL", "value": "InfluxQL",
} }
} }
isClearable={false}
isDisabled={false}
isLoading={false}
isMulti={false}
isSearchable={true}
maxMenuHeight={300}
menuShouldPortal={true} menuShouldPortal={true}
onChange={[Function]} onChange={[Function]}
openMenuOnFocus={false}
options={ options={
Array [ Array [
Object { Object {
@@ -359,7 +308,6 @@ exports[`Render should hide basic auth fields when switch off 1`] = `
}, },
] ]
} }
tabSelectsValue={true}
value={ value={
Object { Object {
"description": "The InfluxDB SQL-like query language.", "description": "The InfluxDB SQL-like query language.",
@@ -440,6 +388,7 @@ exports[`Render should hide basic auth fields when switch off 1`] = `
> >
<FormLabel <FormLabel
className="width-10" className="width-10"
htmlFor="influxdb-config42-db"
> >
Database Database
</FormLabel> </FormLabel>
@@ -448,6 +397,7 @@ exports[`Render should hide basic auth fields when switch off 1`] = `
> >
<Input <Input
className="width-20" className="width-20"
id="influxdb-config42-db"
onChange={[Function]} onChange={[Function]}
value="" value=""
/> />
@@ -462,6 +412,7 @@ exports[`Render should hide basic auth fields when switch off 1`] = `
> >
<FormLabel <FormLabel
className="width-10" className="width-10"
htmlFor="influxdb-config42-user"
> >
User User
</FormLabel> </FormLabel>
@@ -470,6 +421,7 @@ exports[`Render should hide basic auth fields when switch off 1`] = `
> >
<Input <Input
className="width-20" className="width-20"
id="influxdb-config42-user"
onChange={[Function]} onChange={[Function]}
value="" value=""
/> />
@@ -500,6 +452,7 @@ exports[`Render should hide basic auth fields when switch off 1`] = `
> >
<FormLabel <FormLabel
className="width-10" className="width-10"
htmlFor="influxdb-config42-http-method"
tooltip="You can use either GET or POST HTTP method to query your InfluxDB database. The POST tooltip="You can use either GET or POST HTTP method to query your InfluxDB database. The POST
method allows you to perform heavy requests (with a lots of WHERE clause) while the GET method method allows you to perform heavy requests (with a lots of WHERE clause) while the GET method
will restrict you and return an error if the query is too large." will restrict you and return an error if the query is too large."
@@ -507,29 +460,11 @@ exports[`Render should hide basic auth fields when switch off 1`] = `
HTTP Method HTTP Method
</FormLabel> </FormLabel>
<Select <Select
allowCustomValue={false}
autoFocus={false}
backspaceRemovesValue={true}
className="width-10" className="width-10"
components={
Object {
"Group": [Function],
"IndicatorsContainer": [Function],
"MenuList": [Function],
"Option": [Function],
"SingleValue": [Function],
}
}
defaultValue="POST" defaultValue="POST"
isClearable={false} inputId="influxdb-config42-http-method"
isDisabled={false}
isLoading={false}
isMulti={false}
isSearchable={true}
maxMenuHeight={300}
menuShouldPortal={true} menuShouldPortal={true}
onChange={[Function]} onChange={[Function]}
openMenuOnFocus={false}
options={ options={
Array [ Array [
Object { Object {
@@ -542,7 +477,6 @@ exports[`Render should hide basic auth fields when switch off 1`] = `
}, },
] ]
} }
tabSelectsValue={true}
value={ value={
Object { Object {
"label": "POST", "label": "POST",
@@ -615,19 +549,8 @@ exports[`Render should hide white listed cookies input when browser access chose
className="gf-form" className="gf-form"
> >
<Select <Select
allowCustomValue={false} aria-label="Query language"
autoFocus={false}
backspaceRemovesValue={true}
className="width-30" className="width-30"
components={
Object {
"Group": [Function],
"IndicatorsContainer": [Function],
"MenuList": [Function],
"Option": [Function],
"SingleValue": [Function],
}
}
defaultValue={ defaultValue={
Object { Object {
"description": "The InfluxDB SQL-like query language.", "description": "The InfluxDB SQL-like query language.",
@@ -635,15 +558,8 @@ exports[`Render should hide white listed cookies input when browser access chose
"value": "InfluxQL", "value": "InfluxQL",
} }
} }
isClearable={false}
isDisabled={false}
isLoading={false}
isMulti={false}
isSearchable={true}
maxMenuHeight={300}
menuShouldPortal={true} menuShouldPortal={true}
onChange={[Function]} onChange={[Function]}
openMenuOnFocus={false}
options={ options={
Array [ Array [
Object { Object {
@@ -658,7 +574,6 @@ exports[`Render should hide white listed cookies input when browser access chose
}, },
] ]
} }
tabSelectsValue={true}
value={ value={
Object { Object {
"description": "The InfluxDB SQL-like query language.", "description": "The InfluxDB SQL-like query language.",
@@ -739,6 +654,7 @@ exports[`Render should hide white listed cookies input when browser access chose
> >
<FormLabel <FormLabel
className="width-10" className="width-10"
htmlFor="influxdb-config42-db"
> >
Database Database
</FormLabel> </FormLabel>
@@ -747,6 +663,7 @@ exports[`Render should hide white listed cookies input when browser access chose
> >
<Input <Input
className="width-20" className="width-20"
id="influxdb-config42-db"
onChange={[Function]} onChange={[Function]}
value="" value=""
/> />
@@ -761,6 +678,7 @@ exports[`Render should hide white listed cookies input when browser access chose
> >
<FormLabel <FormLabel
className="width-10" className="width-10"
htmlFor="influxdb-config42-user"
> >
User User
</FormLabel> </FormLabel>
@@ -769,6 +687,7 @@ exports[`Render should hide white listed cookies input when browser access chose
> >
<Input <Input
className="width-20" className="width-20"
id="influxdb-config42-user"
onChange={[Function]} onChange={[Function]}
value="" value=""
/> />
@@ -799,6 +718,7 @@ exports[`Render should hide white listed cookies input when browser access chose
> >
<FormLabel <FormLabel
className="width-10" className="width-10"
htmlFor="influxdb-config42-http-method"
tooltip="You can use either GET or POST HTTP method to query your InfluxDB database. The POST tooltip="You can use either GET or POST HTTP method to query your InfluxDB database. The POST
method allows you to perform heavy requests (with a lots of WHERE clause) while the GET method method allows you to perform heavy requests (with a lots of WHERE clause) while the GET method
will restrict you and return an error if the query is too large." will restrict you and return an error if the query is too large."
@@ -806,29 +726,11 @@ exports[`Render should hide white listed cookies input when browser access chose
HTTP Method HTTP Method
</FormLabel> </FormLabel>
<Select <Select
allowCustomValue={false}
autoFocus={false}
backspaceRemovesValue={true}
className="width-10" className="width-10"
components={
Object {
"Group": [Function],
"IndicatorsContainer": [Function],
"MenuList": [Function],
"Option": [Function],
"SingleValue": [Function],
}
}
defaultValue="POST" defaultValue="POST"
isClearable={false} inputId="influxdb-config42-http-method"
isDisabled={false}
isLoading={false}
isMulti={false}
isSearchable={true}
maxMenuHeight={300}
menuShouldPortal={true} menuShouldPortal={true}
onChange={[Function]} onChange={[Function]}
openMenuOnFocus={false}
options={ options={
Array [ Array [
Object { Object {
@@ -841,7 +743,6 @@ exports[`Render should hide white listed cookies input when browser access chose
}, },
] ]
} }
tabSelectsValue={true}
value={ value={
Object { Object {
"label": "POST", "label": "POST",
@@ -914,19 +815,8 @@ exports[`Render should render component 1`] = `
className="gf-form" className="gf-form"
> >
<Select <Select
allowCustomValue={false} aria-label="Query language"
autoFocus={false}
backspaceRemovesValue={true}
className="width-30" className="width-30"
components={
Object {
"Group": [Function],
"IndicatorsContainer": [Function],
"MenuList": [Function],
"Option": [Function],
"SingleValue": [Function],
}
}
defaultValue={ defaultValue={
Object { Object {
"description": "The InfluxDB SQL-like query language.", "description": "The InfluxDB SQL-like query language.",
@@ -934,15 +824,8 @@ exports[`Render should render component 1`] = `
"value": "InfluxQL", "value": "InfluxQL",
} }
} }
isClearable={false}
isDisabled={false}
isLoading={false}
isMulti={false}
isSearchable={true}
maxMenuHeight={300}
menuShouldPortal={true} menuShouldPortal={true}
onChange={[Function]} onChange={[Function]}
openMenuOnFocus={false}
options={ options={
Array [ Array [
Object { Object {
@@ -957,7 +840,6 @@ exports[`Render should render component 1`] = `
}, },
] ]
} }
tabSelectsValue={true}
value={ value={
Object { Object {
"description": "The InfluxDB SQL-like query language.", "description": "The InfluxDB SQL-like query language.",
@@ -1038,6 +920,7 @@ exports[`Render should render component 1`] = `
> >
<FormLabel <FormLabel
className="width-10" className="width-10"
htmlFor="influxdb-config42-db"
> >
Database Database
</FormLabel> </FormLabel>
@@ -1046,6 +929,7 @@ exports[`Render should render component 1`] = `
> >
<Input <Input
className="width-20" className="width-20"
id="influxdb-config42-db"
onChange={[Function]} onChange={[Function]}
value="" value=""
/> />
@@ -1060,6 +944,7 @@ exports[`Render should render component 1`] = `
> >
<FormLabel <FormLabel
className="width-10" className="width-10"
htmlFor="influxdb-config42-user"
> >
User User
</FormLabel> </FormLabel>
@@ -1068,6 +953,7 @@ exports[`Render should render component 1`] = `
> >
<Input <Input
className="width-20" className="width-20"
id="influxdb-config42-user"
onChange={[Function]} onChange={[Function]}
value="" value=""
/> />
@@ -1098,6 +984,7 @@ exports[`Render should render component 1`] = `
> >
<FormLabel <FormLabel
className="width-10" className="width-10"
htmlFor="influxdb-config42-http-method"
tooltip="You can use either GET or POST HTTP method to query your InfluxDB database. The POST tooltip="You can use either GET or POST HTTP method to query your InfluxDB database. The POST
method allows you to perform heavy requests (with a lots of WHERE clause) while the GET method method allows you to perform heavy requests (with a lots of WHERE clause) while the GET method
will restrict you and return an error if the query is too large." will restrict you and return an error if the query is too large."
@@ -1105,29 +992,11 @@ exports[`Render should render component 1`] = `
HTTP Method HTTP Method
</FormLabel> </FormLabel>
<Select <Select
allowCustomValue={false}
autoFocus={false}
backspaceRemovesValue={true}
className="width-10" className="width-10"
components={
Object {
"Group": [Function],
"IndicatorsContainer": [Function],
"MenuList": [Function],
"Option": [Function],
"SingleValue": [Function],
}
}
defaultValue="POST" defaultValue="POST"
isClearable={false} inputId="influxdb-config42-http-method"
isDisabled={false}
isLoading={false}
isMulti={false}
isSearchable={true}
maxMenuHeight={300}
menuShouldPortal={true} menuShouldPortal={true}
onChange={[Function]} onChange={[Function]}
openMenuOnFocus={false}
options={ options={
Array [ Array [
Object { Object {
@@ -1140,7 +1009,6 @@ exports[`Render should render component 1`] = `
}, },
] ]
} }
tabSelectsValue={true}
value={ value={
Object { Object {
"label": "POST", "label": "POST",