You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ap...@apache.org on 2018/12/04 18:26:18 UTC
[incubator-pinot] branch master updated: [TE] frontend -
harleyjj/manage - align startDate at startOf() instead of endOf() (#3582)
This is an automated email from the ASF dual-hosted git repository.
apucher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 366bb39 [TE] frontend - harleyjj/manage - align startDate at startOf() instead of endOf() (#3582)
366bb39 is described below
commit 366bb399f28b6705c3d233399b981ecc36cfe63d
Author: Harley Jackson <ha...@gmail.com>
AuthorDate: Tue Dec 4 10:26:12 2018 -0800
[TE] frontend - harleyjj/manage - align startDate at startOf() instead of endOf() (#3582)
This accomplishes two things:
1) Starting timestamp is now aligned at 00:00, which should invoke better response from endpoint
2) Defaults date picker time to 00:00
The trailing zero issue on the graph is resolved in some cases, but not all
---
thirdeye/thirdeye-frontend/app/utils/utils.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/thirdeye/thirdeye-frontend/app/utils/utils.js b/thirdeye/thirdeye-frontend/app/utils/utils.js
index 667e8dd..8a0bbae 100644
--- a/thirdeye/thirdeye-frontend/app/utils/utils.js
+++ b/thirdeye/thirdeye-frontend/app/utils/utils.js
@@ -1,7 +1,7 @@
import d3 from 'd3';
import { isNone } from '@ember/utils';
import moment from 'moment';
-import { splitFilterFragment, toFilterMap } from 'thirdeye-frontend/utils/rca-utils';
+import { splitFilterFragment, toFilterMap, makeTime } from 'thirdeye-frontend/utils/rca-utils';
/**
* The Promise returned from fetch() won't reject on HTTP error status even if the response is an HTTP 404 or 500.
@@ -94,7 +94,10 @@ export function humanizeScore(f) {
* Helps with shorthand for repetitive date generation
*/
export function buildDateEod(unit, type) {
- return moment().subtract(unit, type).endOf('day').utc();
+ if (unit === 1) {
+ return makeTime().startOf('day');
+ }
+ return makeTime().subtract(unit-1, type).startOf('day');
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org