{"action":"created","comment":{"url":"https://api.github.com/repos/influxdata/chronograf/pulls/comments/182528780","pull_request_review_id":113341912,"id":182528780,"diff_hunk":"@@ -0,0 +1,30 @@\n+import moment from 'moment'\n+import * as time from 'src/dashboards/utils/time'\n+\n+describe('dashboards.utils.time', () => {\n+  describe('millisecondTimeRange', () => {\n+    it('when upper is now() returns valid dates', () => {\n+      const expectedNow = moment()\n+        .subtract()\n+        .seconds(1)\n+        .unix()\n+      const timeRange = {upper: 'now()', lower: moment().format()}\n+      const result = time.millisecondTimeRange(timeRange)\n+\n+      expect(result.since).toBeGreaterThanOrEqual(expectedNow)\n+      expect(result.until).toBeGreaterThanOrEqual(expectedNow)\n+    })\n+\n+    it('when seconds is present returns valid dates', () => {\n+      const timeRange = {seconds: 10}\n+      const expectedSince = moment()\n+        .subtract()\n+        .seconds(10)\n+        .unix()\n+      const result = time.millisecondTimeRange(timeRange)\n+\n+      expect(result.since).toBeGreaterThanOrEqual(expectedSince)\n+      expect(result.until).toBe(null)\n+    })\n+  })\n+})","path":"ui/test/dashboards/utils/time.test.ts","position":30,"original_position":30,"commit_id":"61facc9321626fca20567432558c2efbeb3fa03c","original_commit_id":"61facc9321626fca20567432558c2efbeb3fa03c","user":{"login":"ebb-tide","id":10937678,"avatar_url":"https://avatars2.githubusercontent.com/u/10937678?v=4","gravatar_id":"","url":"https://api.github.com/users/ebb-tide","html_url":"https://github.com/ebb-tide","followers_url":"https://api.github.com/users/ebb-tide/followers","following_url":"https://api.github.com/users/ebb-tide/following{/other_user}","gists_url":"https://api.github.com/users/ebb-tide/gists{/gist_id}","starred_url":"https://api.github.com/users/ebb-tide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebb-tide/subscriptions","organizations_url":"https://api.github.com/users/ebb-tide/orgs","repos_url":"https://api.github.com/users/ebb-tide/repos","events_url":"https://api.github.com/users/ebb-tide/events{/privacy}","received_events_url":"https://api.github.com/users/ebb-tide/received_events","type":"User","site_admin":false},"body":"love tests!","created_at":"2018-04-18T18:37:17Z","updated_at":"2018-04-18T18:38:31Z","html_url":"https://github.com/influxdata/chronograf/pull/3237#discussion_r182528780","pull_request_url":"https://api.github.com/repos/influxdata/chronograf/pulls/3237","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/influxdata/chronograf/pulls/comments/182528780"},"html":{"href":"https://github.com/influxdata/chronograf/pull/3237#discussion_r182528780"},"pull_request":{"href":"https://api.github.com/repos/influxdata/chronograf/pulls/3237"}}},"pull_request":{"url":"https://api.github.com/repos/influxdata/chronograf/pulls/3237","id":182565090,"html_url":"https://github.com/influxdata/chronograf/pull/3237","diff_url":"https://github.com/influxdata/chronograf/pull/3237.diff","patch_url":"https://github.com/influxdata/chronograf/pull/3237.patch","issue_url":"https://api.github.com/repos/influxdata/chronograf/issues/3237","number":3237,"state":"open","locked":false,"title":"Fixes now() time parsing when requesting annotations","user":{"login":"bthesorceror","id":474821,"avatar_url":"https://avatars2.githubusercontent.com/u/474821?v=4","gravatar_id":"","url":"https://api.github.com/users/bthesorceror","html_url":"https://github.com/bthesorceror","followers_url":"https://api.github.com/users/bthesorceror/followers","following_url":"https://api.github.com/users/bthesorceror/following{/other_user}","gists_url":"https://api.github.com/users/bthesorceror/gists{/gist_id}","starred_url":"https://api.github.com/users/bthesorceror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bthesorceror/subscriptions","organizations_url":"https://api.github.com/users/bthesorceror/orgs","repos_url":"https://api.github.com/users/bthesorceror/repos","events_url":"https://api.github.com/users/bthesorceror/events{/privacy}","received_events_url":"https://api.github.com/users/bthesorceror/received_events","type":"User","site_admin":false},"body":"Closes #3218\r\n\r\n  - [ ] CHANGELOG.md updated with a link to the PR (not the Issue)\r\n  - [x] Rebased/mergable\r\n  - [x] Tests pass\r\n  - [x] Sign [CLA](https://influxdata.com/community/cla/) (if not already signed)","created_at":"2018-04-18T18:30:06Z","updated_at":"2018-04-18T18:38:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fef1aca9982acba207a3bbd4ceac7783cc5a5760","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/influxdata/chronograf/pulls/3237/commits","review_comments_url":"https://api.github.com/repos/influxdata/chronograf/pulls/3237/comments","review_comment_url":"https://api.github.com/repos/influxdata/chronograf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/influxdata/chronograf/issues/3237/comments","statuses_url":"https://api.github.com/repos/influxdata/chronograf/statuses/61facc9321626fca20567432558c2efbeb3fa03c","head":{"label":"influxdata:fixes/custom-timerange-now-annotations","ref":"fixes/custom-timerange-now-annotations","sha":"61facc9321626fca20567432558c2efbeb3fa03c","user":{"login":"influxdata","id":5713248,"avatar_url":"https://avatars2.githubusercontent.com/u/5713248?v=4","gravatar_id":"","url":"https://api.github.com/users/influxdata","html_url":"https://github.com/influxdata","followers_url":"https://api.github.com/users/influxdata/followers","following_url":"https://api.github.com/users/influxdata/following{/other_user}","gists_url":"https://api.github.com/users/influxdata/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdata/subscriptions","organizations_url":"https://api.github.com/users/influxdata/orgs","repos_url":"https://api.github.com/users/influxdata/repos","events_url":"https://api.github.com/users/influxdata/events{/privacy}","received_events_url":"https://api.github.com/users/influxdata/received_events","type":"Organization","site_admin":false},"repo":{"id":66506962,"name":"chronograf","full_name":"influxdata/chronograf","owner":{"login":"influxdata","id":5713248,"avatar_url":"https://avatars2.githubusercontent.com/u/5713248?v=4","gravatar_id":"","url":"https://api.github.com/users/influxdata","html_url":"https://github.com/influxdata","followers_url":"https://api.github.com/users/influxdata/followers","following_url":"https://api.github.com/users/influxdata/following{/other_user}","gists_url":"https://api.github.com/users/influxdata/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdata/subscriptions","organizations_url":"https://api.github.com/users/influxdata/orgs","repos_url":"https://api.github.com/users/influxdata/repos","events_url":"https://api.github.com/users/influxdata/events{/privacy}","received_events_url":"https://api.github.com/users/influxdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/influxdata/chronograf","description":"Open source monitoring and visualization UI for the TICK stack","fork":false,"url":"https://api.github.com/repos/influxdata/chronograf","forks_url":"https://api.github.com/repos/influxdata/chronograf/forks","keys_url":"https://api.github.com/repos/influxdata/chronograf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/influxdata/chronograf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/influxdata/chronograf/teams","hooks_url":"https://api.github.com/repos/influxdata/chronograf/hooks","issue_events_url":"https://api.github.com/repos/influxdata/chronograf/issues/events{/number}","events_url":"https://api.github.com/repos/influxdata/chronograf/events","assignees_url":"https://api.github.com/repos/influxdata/chronograf/assignees{/user}","branches_url":"https://api.github.com/repos/influxdata/chronograf/branches{/branch}","tags_url":"https://api.github.com/repos/influxdata/chronograf/tags","blobs_url":"https://api.github.com/repos/influxdata/chronograf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/influxdata/chronograf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/influxdata/chronograf/git/refs{/sha}","trees_url":"https://api.github.com/repos/influxdata/chronograf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/influxdata/chronograf/statuses/{sha}","languages_url":"https://api.github.com/repos/influxdata/chronograf/languages","stargazers_url":"https://api.github.com/repos/influxdata/chronograf/stargazers","contributors_url":"https://api.github.com/repos/influxdata/chronograf/contributors","subscribers_url":"https://api.github.com/repos/influxdata/chronograf/subscribers","subscription_url":"https://api.github.com/repos/influxdata/chronograf/subscription","commits_url":"https://api.github.com/repos/influxdata/chronograf/commits{/sha}","git_commits_url":"https://api.github.com/repos/influxdata/chronograf/git/commits{/sha}","comments_url":"https://api.github.com/repos/influxdata/chronograf/comments{/number}","issue_comment_url":"https://api.github.com/repos/influxdata/chronograf/issues/comments{/number}","contents_url":"https://api.github.com/repos/influxdata/chronograf/contents/{+path}","compare_url":"https://api.github.com/repos/influxdata/chronograf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/influxdata/chronograf/merges","archive_url":"https://api.github.com/repos/influxdata/chronograf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/influxdata/chronograf/downloads","issues_url":"https://api.github.com/repos/influxdata/chronograf/issues{/number}","pulls_url":"https://api.github.com/repos/influxdata/chronograf/pulls{/number}","milestones_url":"https://api.github.com/repos/influxdata/chronograf/milestones{/number}","notifications_url":"https://api.github.com/repos/influxdata/chronograf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/influxdata/chronograf/labels{/name}","releases_url":"https://api.github.com/repos/influxdata/chronograf/releases{/id}","deployments_url":"https://api.github.com/repos/influxdata/chronograf/deployments","created_at":"2016-08-24T23:28:56Z","updated_at":"2018-04-18T18:07:19Z","pushed_at":"2018-04-18T18:30:06Z","git_url":"git://github.com/influxdata/chronograf.git","ssh_url":"git@github.com:influxdata/chronograf.git","clone_url":"https://github.com/influxdata/chronograf.git","svn_url":"https://github.com/influxdata/chronograf","homepage":"https://www.influxdata.com/time-series-platform/chronograf/","size":50279,"stargazers_count":597,"watchers_count":597,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":123,"mirror_url":null,"archived":false,"open_issues_count":562,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":123,"open_issues":562,"watchers":597,"default_branch":"master"}},"base":{"label":"influxdata:master","ref":"master","sha":"0bb99420254c738cbc8c01ee87c560c0ab7eb62f","user":{"login":"influxdata","id":5713248,"avatar_url":"https://avatars2.githubusercontent.com/u/5713248?v=4","gravatar_id":"","url":"https://api.github.com/users/influxdata","html_url":"https://github.com/influxdata","followers_url":"https://api.github.com/users/influxdata/followers","following_url":"https://api.github.com/users/influxdata/following{/other_user}","gists_url":"https://api.github.com/users/influxdata/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdata/subscriptions","organizations_url":"https://api.github.com/users/influxdata/orgs","repos_url":"https://api.github.com/users/influxdata/repos","events_url":"https://api.github.com/users/influxdata/events{/privacy}","received_events_url":"https://api.github.com/users/influxdata/received_events","type":"Organization","site_admin":false},"repo":{"id":66506962,"name":"chronograf","full_name":"influxdata/chronograf","owner":{"login":"influxdata","id":5713248,"avatar_url":"https://avatars2.githubusercontent.com/u/5713248?v=4","gravatar_id":"","url":"https://api.github.com/users/influxdata","html_url":"https://github.com/influxdata","followers_url":"https://api.github.com/users/influxdata/followers","following_url":"https://api.github.com/users/influxdata/following{/other_user}","gists_url":"https://api.github.com/users/influxdata/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdata/subscriptions","organizations_url":"https://api.github.com/users/influxdata/orgs","repos_url":"https://api.github.com/users/influxdata/repos","events_url":"https://api.github.com/users/influxdata/events{/privacy}","received_events_url":"https://api.github.com/users/influxdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/influxdata/chronograf","description":"Open source monitoring and visualization UI for the TICK stack","fork":false,"url":"https://api.github.com/repos/influxdata/chronograf","forks_url":"https://api.github.com/repos/influxdata/chronograf/forks","keys_url":"https://api.github.com/repos/influxdata/chronograf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/influxdata/chronograf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/influxdata/chronograf/teams","hooks_url":"https://api.github.com/repos/influxdata/chronograf/hooks","issue_events_url":"https://api.github.com/repos/influxdata/chronograf/issues/events{/number}","events_url":"https://api.github.com/repos/influxdata/chronograf/events","assignees_url":"https://api.github.com/repos/influxdata/chronograf/assignees{/user}","branches_url":"https://api.github.com/repos/influxdata/chronograf/branches{/branch}","tags_url":"https://api.github.com/repos/influxdata/chronograf/tags","blobs_url":"https://api.github.com/repos/influxdata/chronograf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/influxdata/chronograf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/influxdata/chronograf/git/refs{/sha}","trees_url":"https://api.github.com/repos/influxdata/chronograf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/influxdata/chronograf/statuses/{sha}","languages_url":"https://api.github.com/repos/influxdata/chronograf/languages","stargazers_url":"https://api.github.com/repos/influxdata/chronograf/stargazers","contributors_url":"https://api.github.com/repos/influxdata/chronograf/contributors","subscribers_url":"https://api.github.com/repos/influxdata/chronograf/subscribers","subscription_url":"https://api.github.com/repos/influxdata/chronograf/subscription","commits_url":"https://api.github.com/repos/influxdata/chronograf/commits{/sha}","git_commits_url":"https://api.github.com/repos/influxdata/chronograf/git/commits{/sha}","comments_url":"https://api.github.com/repos/influxdata/chronograf/comments{/number}","issue_comment_url":"https://api.github.com/repos/influxdata/chronograf/issues/comments{/number}","contents_url":"https://api.github.com/repos/influxdata/chronograf/contents/{+path}","compare_url":"https://api.github.com/repos/influxdata/chronograf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/influxdata/chronograf/merges","archive_url":"https://api.github.com/repos/influxdata/chronograf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/influxdata/chronograf/downloads","issues_url":"https://api.github.com/repos/influxdata/chronograf/issues{/number}","pulls_url":"https://api.github.com/repos/influxdata/chronograf/pulls{/number}","milestones_url":"https://api.github.com/repos/influxdata/chronograf/milestones{/number}","notifications_url":"https://api.github.com/repos/influxdata/chronograf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/influxdata/chronograf/labels{/name}","releases_url":"https://api.github.com/repos/influxdata/chronograf/releases{/id}","deployments_url":"https://api.github.com/repos/influxdata/chronograf/deployments","created_at":"2016-08-24T23:28:56Z","updated_at":"2018-04-18T18:07:19Z","pushed_at":"2018-04-18T18:30:06Z","git_url":"git://github.com/influxdata/chronograf.git","ssh_url":"git@github.com:influxdata/chronograf.git","clone_url":"https://github.com/influxdata/chronograf.git","svn_url":"https://github.com/influxdata/chronograf","homepage":"https://www.influxdata.com/time-series-platform/chronograf/","size":50279,"stargazers_count":597,"watchers_count":597,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":123,"mirror_url":null,"archived":false,"open_issues_count":562,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":123,"open_issues":562,"watchers":597,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/influxdata/chronograf/pulls/3237"},"html":{"href":"https://github.com/influxdata/chronograf/pull/3237"},"issue":{"href":"https://api.github.com/repos/influxdata/chronograf/issues/3237"},"comments":{"href":"https://api.github.com/repos/influxdata/chronograf/issues/3237/comments"},"review_comments":{"href":"https://api.github.com/repos/influxdata/chronograf/pulls/3237/comments"},"review_comment":{"href":"https://api.github.com/repos/influxdata/chronograf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/influxdata/chronograf/pulls/3237/commits"},"statuses":{"href":"https://api.github.com/repos/influxdata/chronograf/statuses/61facc9321626fca20567432558c2efbeb3fa03c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ebb-tide"}}