Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic timefilter #314

Merged
merged 20 commits into from
Jun 6, 2017
Merged

Conversation

rbdebeer-zz
Copy link

I have added more dynamic date/time searching.

  • The "start" time range input box supports date/time formatting with ranges. Ranges supported are [+|-|+-][y/m/d/h/m/s]. Eg. you can now search for 2017-08-10 +-3d to search 3 days before and after this data. 2017-08-10 14:21 +5m would search 5 minutes after that date/time.
  • The data/time cells in the datagrid are left clickable. A left click will add the date to the input box of the time range search.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

var offsetRegexp = /(.*?)(-|\+|\+-|-\+)(\d+)(y|d|h|m|s|M|Q|w|ms)/g;
var match = offsetRegexp.exec(datevalue);
if (match != null) {
match[1] = moment(match[1],"YYYY-MM-DD HH:mm:ssZZ");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit hard to follow here without looking at the regexp. Could you put the mathed expressions in variables perhaps? Just to make it easier to read.

Copy link
Contributor

@berggren berggren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small nit, otherwise LGTM.

@rbdebeer-zz
Copy link
Author

Thanks. Added regexp matches in variables for code readability.

Copy link
Contributor

@berggren berggren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@berggren berggren added this to the 2017.05 milestone Jun 6, 2017
@berggren berggren merged commit 871038a into google:master Jun 6, 2017
@berggren
Copy link
Contributor

berggren commented Jun 6, 2017

Ref issue: #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants