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 => {
dispatch(incrementQueryCount())
await Promise.all([
dispatch(executeHistogramQueryAsync()),
dispatch(executeTableQueryAsync()),
])
dispatch(decrementQueryCount())
try {
await Promise.all([
dispatch(executeHistogramQueryAsync()),
dispatch(executeTableQueryAsync()),
])
} catch (ex) {
console.error('Could not make query requests')
} finally {
dispatch(decrementQueryCount())
}
}
export const setSearchTermAsync = (searchTerm: string) => async dispatch => {

View File

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

View File

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