Commit 48c18ee8 by Jordan Rinke

fixed 2 coding errors noted by travis

parent f5d5d9a5
...@@ -253,7 +253,7 @@ function (angular, _, kbn, InfluxSeries) { ...@@ -253,7 +253,7 @@ function (angular, _, kbn, InfluxSeries) {
var dashboardClone = angular.copy(dashboard); var dashboardClone = angular.copy(dashboard);
var tags = dashboardClone.tags.join(','); var tags = dashboardClone.tags.join(',');
title = dashboardClone.title = title ? title : dashboard.title; title = dashboardClone.title = title ? title : dashboard.title;
var ttl = dashboard.loader.save_temp_ttl var ttl = dashboard.loader.save_temp_ttl;
var ttlLength = ttl.substring(0, ttl.length-1); var ttlLength = ttl.substring(0, ttl.length-1);
var ttlTerm = ttl.substring(ttl.length-1, ttl.length).toLowerCase(); var ttlTerm = ttl.substring(ttl.length-1, ttl.length).toLowerCase();
var expires = Date.now(); var expires = Date.now();
...@@ -266,6 +266,7 @@ function (angular, _, kbn, InfluxSeries) { ...@@ -266,6 +266,7 @@ function (angular, _, kbn, InfluxSeries) {
break; break;
case "w": case "w":
expires += ttlLength * 604800000; expires += ttlLength * 604800000;
break;
default: default:
throw "Unknown ttl duration format"; throw "Unknown ttl duration format";
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment