mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 01:25:16 +00:00
Merge pull request #2638 from kravets-levko/bug/dashboard-not-rendering-empty-query
Dashboard stops rendering when adding widget with empty query
This commit is contained in:
commit
140d0ae14f
@ -19,32 +19,6 @@ function collectParams(parts) {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
class QueryResultError {
|
||||
constructor(errorMessage) {
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
getError() {
|
||||
return this.errorMessage;
|
||||
}
|
||||
|
||||
static getStatus() {
|
||||
return 'failed';
|
||||
}
|
||||
|
||||
static getData() {
|
||||
return null;
|
||||
}
|
||||
|
||||
static getLog() {
|
||||
return null;
|
||||
}
|
||||
|
||||
static getChartData() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class Parameter {
|
||||
constructor(parameter) {
|
||||
this.title = parameter.title;
|
||||
@ -170,6 +144,36 @@ class Parameters {
|
||||
}
|
||||
|
||||
function QueryResource($resource, $http, $q, $location, currentUser, QueryResult) {
|
||||
class QueryResultError {
|
||||
constructor(errorMessage) {
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
getError() {
|
||||
return this.errorMessage;
|
||||
}
|
||||
|
||||
toPromise() {
|
||||
return $q.reject(this.getError());
|
||||
}
|
||||
|
||||
static getStatus() {
|
||||
return 'failed';
|
||||
}
|
||||
|
||||
static getData() {
|
||||
return null;
|
||||
}
|
||||
|
||||
static getLog() {
|
||||
return null;
|
||||
}
|
||||
|
||||
static getChartData() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
const Query = $resource(
|
||||
'api/queries/:id',
|
||||
{ id: '@id' },
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {
|
||||
isArray, isNumber, isString, isUndefined, includes, min, max, has, find,
|
||||
each, values, sortBy, identity, filter, map, extend, reduce,
|
||||
each, values, sortBy, identity, filter, map, extend, reduce,
|
||||
} from 'lodash';
|
||||
import moment from 'moment';
|
||||
import { createFormatter, formatSimpleTemplate } from '@/lib/value-format';
|
||||
|
Loading…
Reference in New Issue
Block a user