{"action":"created","comment":{"url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/pulls/comments/116740685","pull_request_review_id":38384490,"id":116740685,"diff_hunk":"@@ -0,0 +1,180 @@\n+import Ember from 'ember'\n+const {isPresent} = Ember\n+import computed, {readOnly} from 'ember-computed-decorators'\n+import {Component} from 'ember-frost-core'\n+import {PropTypes} from 'ember-prop-types'\n+import layout from '../templates/components/frost-guage'\n+\n+function getPercent (max, min, value) {\n+  let valInt = parseInt(value, 10)\n+  let maxInt = parseInt(max, 10)\n+  let minInt = parseInt(min, 10)\n+  let val = Math.min(Math.max(minInt, valInt), maxInt)\n+  return ((val) / max)\n+}\n+\n+export default Component.extend({\n+  layout,\n+  attributeBindings: ['style'],\n+\n+  propTypes: {\n+    // options\n+    elementPrefix: PropTypes.string,\n+    min: PropTypes.number,\n+    max: PropTypes.number,\n+    direction: PropTypes.oneOf(['clockwise', 'counterclockwise']),\n+    orientation: PropTypes.number,\n+    data: PropTypes.arrayOf(PropTypes.object).isRequired,\n+    size: PropTypes.number,\n+    text: PropTypes.string\n+  },\n+\n+  getDefaultProps () {\n+    const elementPrefix = 'frost-guage'\n+\n+    return {\n+      elementPrefix: elementPrefix,\n+      classNames: [elementPrefix],\n+      min: 0,\n+      max: 100,\n+      direction: 'clockwise',\n+      // will move scale to propTypes once it's required. Consider it unsupported for now.\n+      scale: 0,\n+      orientation: 0,\n+      negative: '#000000',\n+      padding: 10\n+    }\n+  },\n+\n+  @readOnly\n+  @computed('direction')\n+  numericalDirection (direction) {\n+    return (direction === 'counterclockwise') ? -1 : 1\n+  },\n+\n+  @readOnly\n+  @computed('size')\n+  style (size) {\n+    return Ember.String.htmlSafe('width: ' + size + 'px; height: ' + size + 'px;')\n+  },\n+\n+  @readOnly\n+  @computed('orientation', 'numericalDirection')\n+  transform (orientation, numericalDirection) {","path":"addon/components/frost-guage.js","position":63,"original_position":63,"commit_id":"153a043f294ad98d32f23a8e01bb04862593d145","original_commit_id":"153a043f294ad98d32f23a8e01bb04862593d145","user":{"login":"dafortin","id":18552536,"avatar_url":"https://avatars2.githubusercontent.com/u/18552536?v=3","gravatar_id":"","url":"https://api.github.com/users/dafortin","html_url":"https://github.com/dafortin","followers_url":"https://api.github.com/users/dafortin/followers","following_url":"https://api.github.com/users/dafortin/following{/other_user}","gists_url":"https://api.github.com/users/dafortin/gists{/gist_id}","starred_url":"https://api.github.com/users/dafortin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dafortin/subscriptions","organizations_url":"https://api.github.com/users/dafortin/orgs","repos_url":"https://api.github.com/users/dafortin/repos","events_url":"https://api.github.com/users/dafortin/events{/privacy}","received_events_url":"https://api.github.com/users/dafortin/received_events","type":"User","site_admin":false},"body":"I think we should split this a bit since most of the computation can be done upfront and only once.","created_at":"2017-05-16T13:23:15Z","updated_at":"2017-05-16T13:23:15Z","html_url":"https://github.com/ciena-frost/ember-frost-chart/pull/14#discussion_r116740685","pull_request_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/ciena-frost/ember-frost-chart/pulls/comments/116740685"},"html":{"href":"https://github.com/ciena-frost/ember-frost-chart/pull/14#discussion_r116740685"},"pull_request":{"href":"https://api.github.com/repos/ciena-frost/ember-frost-chart/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/pulls/14","id":120687896,"html_url":"https://github.com/ciena-frost/ember-frost-chart/pull/14","diff_url":"https://github.com/ciena-frost/ember-frost-chart/pull/14.diff","patch_url":"https://github.com/ciena-frost/ember-frost-chart/pull/14.patch","issue_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/issues/14","number":14,"state":"open","locked":false,"title":"Added Guage","user":{"login":"helrac","id":26879720,"avatar_url":"https://avatars0.githubusercontent.com/u/26879720?v=3","gravatar_id":"","url":"https://api.github.com/users/helrac","html_url":"https://github.com/helrac","followers_url":"https://api.github.com/users/helrac/followers","following_url":"https://api.github.com/users/helrac/following{/other_user}","gists_url":"https://api.github.com/users/helrac/gists{/gist_id}","starred_url":"https://api.github.com/users/helrac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helrac/subscriptions","organizations_url":"https://api.github.com/users/helrac/orgs","repos_url":"https://api.github.com/users/helrac/repos","events_url":"https://api.github.com/users/helrac/events{/privacy}","received_events_url":"https://api.github.com/users/helrac/received_events","type":"User","site_admin":false},"body":"### This project uses [semver](semver.org), please check the scope of this pr:\r\n\r\n- [ ] #none# - documentation fixes and/or test additions\r\n- [ ] #patch# - backwards-compatible bug fix\r\n- [x] #minor# - adding functionality in a backwards-compatible manner\r\n- [ ] #major# - incompatible API change\r\n\r\n# CHANGELOG\r\nAdded guage\r\n","created_at":"2017-05-15T20:31:38Z","updated_at":"2017-05-16T13:23:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96dbf0e8826ab88e804d039c0a7f7ff80ee1691a","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/pulls/14/commits","review_comments_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/pulls/14/comments","review_comment_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/issues/14/comments","statuses_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/statuses/153a043f294ad98d32f23a8e01bb04862593d145","head":{"label":"helrac:master","ref":"master","sha":"153a043f294ad98d32f23a8e01bb04862593d145","user":{"login":"helrac","id":26879720,"avatar_url":"https://avatars0.githubusercontent.com/u/26879720?v=3","gravatar_id":"","url":"https://api.github.com/users/helrac","html_url":"https://github.com/helrac","followers_url":"https://api.github.com/users/helrac/followers","following_url":"https://api.github.com/users/helrac/following{/other_user}","gists_url":"https://api.github.com/users/helrac/gists{/gist_id}","starred_url":"https://api.github.com/users/helrac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helrac/subscriptions","organizations_url":"https://api.github.com/users/helrac/orgs","repos_url":"https://api.github.com/users/helrac/repos","events_url":"https://api.github.com/users/helrac/events{/privacy}","received_events_url":"https://api.github.com/users/helrac/received_events","type":"User","site_admin":false},"repo":{"id":90384675,"name":"ember-frost-chart","full_name":"helrac/ember-frost-chart","owner":{"login":"helrac","id":26879720,"avatar_url":"https://avatars0.githubusercontent.com/u/26879720?v=3","gravatar_id":"","url":"https://api.github.com/users/helrac","html_url":"https://github.com/helrac","followers_url":"https://api.github.com/users/helrac/followers","following_url":"https://api.github.com/users/helrac/following{/other_user}","gists_url":"https://api.github.com/users/helrac/gists{/gist_id}","starred_url":"https://api.github.com/users/helrac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helrac/subscriptions","organizations_url":"https://api.github.com/users/helrac/orgs","repos_url":"https://api.github.com/users/helrac/repos","events_url":"https://api.github.com/users/helrac/events{/privacy}","received_events_url":"https://api.github.com/users/helrac/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/helrac/ember-frost-chart","description":"Composable charts with decoupled axes / plots and some extra pizzazz","fork":true,"url":"https://api.github.com/repos/helrac/ember-frost-chart","forks_url":"https://api.github.com/repos/helrac/ember-frost-chart/forks","keys_url":"https://api.github.com/repos/helrac/ember-frost-chart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/helrac/ember-frost-chart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/helrac/ember-frost-chart/teams","hooks_url":"https://api.github.com/repos/helrac/ember-frost-chart/hooks","issue_events_url":"https://api.github.com/repos/helrac/ember-frost-chart/issues/events{/number}","events_url":"https://api.github.com/repos/helrac/ember-frost-chart/events","assignees_url":"https://api.github.com/repos/helrac/ember-frost-chart/assignees{/user}","branches_url":"https://api.github.com/repos/helrac/ember-frost-chart/branches{/branch}","tags_url":"https://api.github.com/repos/helrac/ember-frost-chart/tags","blobs_url":"https://api.github.com/repos/helrac/ember-frost-chart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/helrac/ember-frost-chart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/helrac/ember-frost-chart/git/refs{/sha}","trees_url":"https://api.github.com/repos/helrac/ember-frost-chart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/helrac/ember-frost-chart/statuses/{sha}","languages_url":"https://api.github.com/repos/helrac/ember-frost-chart/languages","stargazers_url":"https://api.github.com/repos/helrac/ember-frost-chart/stargazers","contributors_url":"https://api.github.com/repos/helrac/ember-frost-chart/contributors","subscribers_url":"https://api.github.com/repos/helrac/ember-frost-chart/subscribers","subscription_url":"https://api.github.com/repos/helrac/ember-frost-chart/subscription","commits_url":"https://api.github.com/repos/helrac/ember-frost-chart/commits{/sha}","git_commits_url":"https://api.github.com/repos/helrac/ember-frost-chart/git/commits{/sha}","comments_url":"https://api.github.com/repos/helrac/ember-frost-chart/comments{/number}","issue_comment_url":"https://api.github.com/repos/helrac/ember-frost-chart/issues/comments{/number}","contents_url":"https://api.github.com/repos/helrac/ember-frost-chart/contents/{+path}","compare_url":"https://api.github.com/repos/helrac/ember-frost-chart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/helrac/ember-frost-chart/merges","archive_url":"https://api.github.com/repos/helrac/ember-frost-chart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/helrac/ember-frost-chart/downloads","issues_url":"https://api.github.com/repos/helrac/ember-frost-chart/issues{/number}","pulls_url":"https://api.github.com/repos/helrac/ember-frost-chart/pulls{/number}","milestones_url":"https://api.github.com/repos/helrac/ember-frost-chart/milestones{/number}","notifications_url":"https://api.github.com/repos/helrac/ember-frost-chart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/helrac/ember-frost-chart/labels{/name}","releases_url":"https://api.github.com/repos/helrac/ember-frost-chart/releases{/id}","deployments_url":"https://api.github.com/repos/helrac/ember-frost-chart/deployments","created_at":"2017-05-05T14:30:49Z","updated_at":"2017-05-05T14:30:50Z","pushed_at":"2017-05-15T20:31:21Z","git_url":"git://github.com/helrac/ember-frost-chart.git","ssh_url":"git@github.com:helrac/ember-frost-chart.git","clone_url":"https://github.com/helrac/ember-frost-chart.git","svn_url":"https://github.com/helrac/ember-frost-chart","homepage":null,"size":100,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ciena-frost:master","ref":"master","sha":"1bc61d4852bd2417a4bfaec7b7303442cc44833a","user":{"login":"ciena-frost","id":16601148,"avatar_url":"https://avatars1.githubusercontent.com/u/16601148?v=3","gravatar_id":"","url":"https://api.github.com/users/ciena-frost","html_url":"https://github.com/ciena-frost","followers_url":"https://api.github.com/users/ciena-frost/followers","following_url":"https://api.github.com/users/ciena-frost/following{/other_user}","gists_url":"https://api.github.com/users/ciena-frost/gists{/gist_id}","starred_url":"https://api.github.com/users/ciena-frost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciena-frost/subscriptions","organizations_url":"https://api.github.com/users/ciena-frost/orgs","repos_url":"https://api.github.com/users/ciena-frost/repos","events_url":"https://api.github.com/users/ciena-frost/events{/privacy}","received_events_url":"https://api.github.com/users/ciena-frost/received_events","type":"Organization","site_admin":false},"repo":{"id":86949493,"name":"ember-frost-chart","full_name":"ciena-frost/ember-frost-chart","owner":{"login":"ciena-frost","id":16601148,"avatar_url":"https://avatars1.githubusercontent.com/u/16601148?v=3","gravatar_id":"","url":"https://api.github.com/users/ciena-frost","html_url":"https://github.com/ciena-frost","followers_url":"https://api.github.com/users/ciena-frost/followers","following_url":"https://api.github.com/users/ciena-frost/following{/other_user}","gists_url":"https://api.github.com/users/ciena-frost/gists{/gist_id}","starred_url":"https://api.github.com/users/ciena-frost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciena-frost/subscriptions","organizations_url":"https://api.github.com/users/ciena-frost/orgs","repos_url":"https://api.github.com/users/ciena-frost/repos","events_url":"https://api.github.com/users/ciena-frost/events{/privacy}","received_events_url":"https://api.github.com/users/ciena-frost/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ciena-frost/ember-frost-chart","description":"Composable charts with decoupled axes / plots and some extra pizzazz","fork":false,"url":"https://api.github.com/repos/ciena-frost/ember-frost-chart","forks_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/forks","keys_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/teams","hooks_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/hooks","issue_events_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/issues/events{/number}","events_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/events","assignees_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/assignees{/user}","branches_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/branches{/branch}","tags_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/tags","blobs_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/git/refs{/sha}","trees_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/statuses/{sha}","languages_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/languages","stargazers_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/stargazers","contributors_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/contributors","subscribers_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/subscribers","subscription_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/subscription","commits_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/commits{/sha}","git_commits_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/git/commits{/sha}","comments_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/comments{/number}","issue_comment_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/issues/comments{/number}","contents_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/contents/{+path}","compare_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/merges","archive_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/downloads","issues_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/issues{/number}","pulls_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/pulls{/number}","milestones_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/milestones{/number}","notifications_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/labels{/name}","releases_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/releases{/id}","deployments_url":"https://api.github.com/repos/ciena-frost/ember-frost-chart/deployments","created_at":"2017-04-01T23:35:40Z","updated_at":"2017-04-02T02:10:56Z","pushed_at":"2017-05-16T01:52:58Z","git_url":"git://github.com/ciena-frost/ember-frost-chart.git","ssh_url":"git@github.com:ciena-frost/ember-frost-chart.git","clone_url":"https://github.com/ciena-frost/ember-frost-chart.git","svn_url":"https://github.com/ciena-frost/ember-frost-chart","homepage":null,"size":101,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":6,"forks":5,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ciena-frost/ember-frost-chart/pulls/14"},"html":{"href":"https://github.com/ciena-frost/ember-frost-chart/pull/14"},"issue":{"href":"https://api.github.com/repos/ciena-frost/ember-frost-chart/issues/14"},"comments":{"href":"https://api.github.com/repos/ciena-frost/ember-frost-chart/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/ciena-frost/ember-frost-chart/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/ciena-frost/ember-frost-chart/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ciena-frost/ember-frost-chart/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/ciena-frost/ember-frost-chart/statuses/153a043f294ad98d32f23a8e01bb04862593d145"}}}}
{"actor":{"display_login":"dafortin"}}