mirror of https://github.com/apache/druid.git
Web console: better lookup 404 detection (#14108)
* better lookup 404 detection * update snapshot
This commit is contained in:
parent
e8674e2a60
commit
4fffee1776
|
@ -16,6 +16,8 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { deepGet } from './object-change';
|
||||||
|
|
||||||
export function isLookupsUninitialized(error: Error | undefined) {
|
export function isLookupsUninitialized(error: Error | undefined) {
|
||||||
return error && error.message === 'Request failed with status code 404';
|
return deepGet(error || {}, 'response.status') === 404;
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,7 +210,7 @@ exports[`LookupsView matches snapshot 1`] = `
|
||||||
multiSort={true}
|
multiSort={true}
|
||||||
nestingLevelKey="_nestingLevel"
|
nestingLevelKey="_nestingLevel"
|
||||||
nextText="Next"
|
nextText="Next"
|
||||||
noDataText=""
|
noDataText="No lookups"
|
||||||
ofText="of"
|
ofText="of"
|
||||||
onFetchData={[Function]}
|
onFetchData={[Function]}
|
||||||
onFilteredChange={[Function]}
|
onFilteredChange={[Function]}
|
||||||
|
|
|
@ -355,11 +355,7 @@ export class LookupsView extends React.PureComponent<LookupsViewProps, LookupsVi
|
||||||
<ReactTable
|
<ReactTable
|
||||||
data={lookups}
|
data={lookups}
|
||||||
loading={lookupEntriesAndTiersState.loading}
|
loading={lookupEntriesAndTiersState.loading}
|
||||||
noDataText={
|
noDataText={lookupEntriesAndTiersState.getErrorMessage() || 'No lookups'}
|
||||||
!lookupEntriesAndTiersState.loading && !lookups.length
|
|
||||||
? 'No lookups'
|
|
||||||
: lookupEntriesAndTiersState.getErrorMessage() || ''
|
|
||||||
}
|
|
||||||
filterable
|
filterable
|
||||||
filtered={lookupFilter}
|
filtered={lookupFilter}
|
||||||
onFilteredChange={filtered => {
|
onFilteredChange={filtered => {
|
||||||
|
|
Loading…
Reference in New Issue