Browse Source

Merge branch 'master' of github.com:grafana/grafana

Torkel Ödegaard 9 years ago
parent
commit
10e63e5dd2
1 changed files with 4 additions and 0 deletions
  1. 4 0
      public/app/plugins/datasource/prometheus/datasource.ts

+ 4 - 0
public/app/plugins/datasource/prometheus/datasource.ts

@@ -123,6 +123,10 @@ export function PrometheusDatasource(instanceSettings, $q, backendSrv, templateS
   };
 
   this.performTimeSeriesQuery = function(query, start, end) {
+    if (start > end) {
+      throw { message: 'Invalid time range' };
+    }
+
     var url = '/api/v1/query_range?query=' + encodeURIComponent(query.expr) + '&start=' + start + '&end=' + end + '&step=' + query.step;
     return this._request('GET', url, query.requestId);
   };