Handle failing queries for log viewer

pull/10616/head
Brandon Farmer 2018-06-08 10:49:42 -07:00
parent 7d39f74551
commit 7f7b61d5ec
3 changed files with 12 additions and 7 deletions

View File

@ -279,11 +279,16 @@ export const incrementQueryCount = () => ({
export const executeQueriesAsync = () => async dispatch => { export const executeQueriesAsync = () => async dispatch => {
dispatch(incrementQueryCount()) dispatch(incrementQueryCount())
await Promise.all([ try {
dispatch(executeHistogramQueryAsync()), await Promise.all([
dispatch(executeTableQueryAsync()), dispatch(executeHistogramQueryAsync()),
]) dispatch(executeTableQueryAsync()),
dispatch(decrementQueryCount()) ])
} catch (ex) {
console.error('Could not make query requests')
} finally {
dispatch(decrementQueryCount())
}
} }
export const setSearchTermAsync = (searchTerm: string) => async dispatch => { export const setSearchTermAsync = (searchTerm: string) => async dispatch => {

View File

@ -315,7 +315,7 @@ class LogsTable extends Component<Props, State> {
if (this.isClickable(column)) { if (this.isClickable(column)) {
return ( return (
<div <div
className={classnames(`logs-viewer--cell`, { className={classnames('logs-viewer--cell', {
highlight: highlightRow, highlight: highlightRow,
})} })}
title={`Filter by "${value}"`} title={`Filter by "${value}"`}

View File

@ -122,7 +122,7 @@ class LogsPage extends PureComponent<Props, State> {
} }
private get isSpecificTimeRange(): boolean { private get isSpecificTimeRange(): boolean {
return !!this.props.timeRange.upper return !!getDeep(this.props, 'timeRange.upper', false)
} }
private startUpdating = () => { private startUpdating = () => {