Browse Source

fix(influxdb_0.8.x): fixed issue with new timepicker ranges like The day so far, fixes #2936

Torkel Ödegaard 10 years ago
parent
commit
dbc1a9cf82
1 changed files with 2 additions and 2 deletions
  1. 2 2
      public/app/plugins/datasource/influxdb_08/datasource.js

+ 2 - 2
public/app/plugins/datasource/influxdb_08/datasource.js

@@ -266,11 +266,11 @@ function (angular, _, dateMath, InfluxSeries, InfluxQueryBuilder) {
     }
     }
 
 
     function getInfluxTime(date, roundUp) {
     function getInfluxTime(date, roundUp) {
-      if (_.isString(date) && date.indexOf('/') === -1) {
+      if (_.isString(date)) {
         if (date === 'now') {
         if (date === 'now') {
           return 'now()';
           return 'now()';
         }
         }
-        if (date.indexOf('now-') >= 0) {
+        if (date.indexOf('now-') >= 0 && date.indexOf('/') === -1) {
           return date.replace('now', 'now()');
           return date.replace('now', 'now()');
         }
         }
         date = dateMath.parse(date, roundUp);
         date = dateMath.parse(date, roundUp);