Skip to content

Commit

Permalink
Fixes timeseries
Browse files Browse the repository at this point in the history
  • Loading branch information
TinaHeiligers committed May 11, 2019
1 parent 57c4ce6 commit 6ef641f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class TimeseriesPanelConfigUi extends Component {
<QueryBar
query={{
language: model.filter.language ? model.filter.language : 'kuery',
query: model.filter.query,
query: model.filter.query || '',
}}
screenTitle={'TimeseriesPanelConfigQuery'}
onSubmit={this.handleSubmit}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const uiSettingsQueryLanguage = uiSettings.get('search:queryLanguage');

export const SplitByFilter = props => {
const { onChange, uiRestrictions } = props;
const defaults = { filter: '' };
const defaults = { filter: { query: '', language: uiSettingsQueryLanguage } };
const model = { ...defaults, ...props.model };
const htmlId = htmlIdGenerator();
const handleSelectChange = createSelectHandler(onChange);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ class FilterItemsUi extends Component {
constructor(props) {
super(props);
this.renderRow = this.renderRow.bind(this);
this.state = {
uiQuerylanguage: uiSettingsQueryLanguage,
};
}

handleChange(item, name) {
Expand All @@ -68,7 +65,7 @@ class FilterItemsUi extends Component {
const newFilter = () => ({
color: this.props.model.color,
id: uuid.v1(),
filter: { language: model.filter.language ? model.filter.language : 'kuery', query: '' },
filter: { language: model.filter.language ? model.filter.language : uiSettingsQueryLanguage, query: '' },
});
const handleAdd = collectionActions.handleAdd
.bind(null, this.props, newFilter);
Expand All @@ -88,7 +85,7 @@ class FilterItemsUi extends Component {
</EuiFlexItem>
<EuiFlexItem>
<QueryBar
query={{ language: model.filter.language ? model.filter.language : this.state.uiQuerylanguage, query: model.filter.query }}
query={{ language: model.filter.language ? model.filter.language : uiSettingsQueryLanguage, query: model.filter.query || '' }}
screenTitle={'DataMetricsGroupByFiltersFilter'}
placeholder={intl.formatMessage({ id: 'tsvb.splits.filterItems.filterPlaceholder', defaultMessage: 'Filter' })}
aria-label={intl.formatMessage({ id: 'tsvb.splits.filterItems.filterAriaLabel', defaultMessage: 'Filter' })}
Expand Down

0 comments on commit 6ef641f

Please sign in to comment.