Commit 5e19fdb4 by Mitsuhiro Tanda

fix prometheus time conversion

parent 5e34823e
...@@ -271,12 +271,6 @@ function (angular, _, moment, dateMath) { ...@@ -271,12 +271,6 @@ function (angular, _, moment, dateMath) {
function getPrometheusTime(date, roundUp) { function getPrometheusTime(date, roundUp) {
if (_.isString(date)) { if (_.isString(date)) {
if (date === 'now') {
return 'now()';
}
if (date.indexOf('now-') >= 0 && date.indexOf('/') === -1) {
return date.replace('now', 'now()').replace('-', ' - ');
}
date = dateMath.parse(date, roundUp); date = dateMath.parse(date, roundUp);
} }
return (date.valueOf() / 1000).toFixed(0); return (date.valueOf() / 1000).toFixed(0);
......
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