{"action":"created","comment":{"url":"https://api.github.com/repos/fxbox/app/pulls/comments/56694964","id":56694964,"diff_hunk":"@@ -149,21 +147,42 @@ export default class ServicesListItem extends React.Component {\n       }\n     }\n \n-    let isConnected = false;\n-    if (this.state.available !== undefined) {\n-      isConnected = this.state.available;\n-    }\n-\n     return (\n-      <li data-icon={icon} data-connected={isConnected}>\n-        <a href={`#services/${this.props.id}`}>\n+      <li className=\"service-list__item\" data-icon={icon} data-connected={isConnected}>\n+        <a className=\"service-list__item-link\" href={`#services/${this.props.id}`}>\n           {serviceType}\n           <small>{` (${this.props.name})`}</small>\n         </a>\n-        <div className=\"colour-picker\" style={{ background: this.getBulbColour.call(this) }}></div>\n-        <input type=\"checkbox\" checked={this.state.on} disabled={!isConnected}\n-          onChange={this.handleLightOnChange.bind(this)}/>\n+        <div className=\"service-list__item-color-picker\"\n+             style={{ background: this.getBulbColour.call(this) }}>\n+        </div>\n+        <label>\n+          <input className=\"service-list__on-off-toggle\" type=\"checkbox\"\n+                 checked={this.state.on} disabled={!isConnected}\n+                 onChange={this.handleLightOnChange.bind(this)} />\n+        </label>\n       </li>\n     );\n   }\n+\n+  renderGenericService(type = 'Unknown service', icon = 'unknown') {\n+    return (\n+      <li className=\"service-list__item\" data-icon={icon} data-connected=\"true\">\n+        <a className=\"service-list__item-link\" href={`#services/${this.props.id}`}>\n+          {type} <small>{` (${this.props.name})`}</small>\n+        </a>\n+      </li>\n+    );\n+  }\n+\n+  render() {\n+    switch (this.props.type) {\n+      case 'Extended color light':\n+        return this.renderLightService();\n+      case 'ipcamera':\n+        return this.renderGenericService('Camera', 'ip-camera');\n+      default:\n+        return this.renderGenericService();\n+    }","path":"app/js/views/services-list-item.jsx","position":79,"original_position":79,"commit_id":"eb49fcf042371e76bdd730cb05e945271faa90b7","original_commit_id":"eb49fcf042371e76bdd730cb05e945271faa90b7","user":{"login":"gmarty","id":333865,"avatar_url":"https://avatars.githubusercontent.com/u/333865?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarty","html_url":"https://github.com/gmarty","followers_url":"https://api.github.com/users/gmarty/followers","following_url":"https://api.github.com/users/gmarty/following{/other_user}","gists_url":"https://api.github.com/users/gmarty/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarty/subscriptions","organizations_url":"https://api.github.com/users/gmarty/orgs","repos_url":"https://api.github.com/users/gmarty/repos","events_url":"https://api.github.com/users/gmarty/events{/privacy}","received_events_url":"https://api.github.com/users/gmarty/received_events","type":"User","site_admin":false},"body":"We probably want to refactor that on the model of `views/services/` and have `views/services/ligh-list-item.jsx` and `views/services/camera-list-item.jsx`.\r\nBut this can be done later.","created_at":"2016-03-18T17:44:14Z","updated_at":"2016-03-18T17:44:14Z","html_url":"https://github.com/fxbox/app/pull/13#discussion_r56694964","pull_request_url":"https://api.github.com/repos/fxbox/app/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/fxbox/app/pulls/comments/56694964"},"html":{"href":"https://github.com/fxbox/app/pull/13#discussion_r56694964"},"pull_request":{"href":"https://api.github.com/repos/fxbox/app/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/fxbox/app/pulls/13","id":62893752,"html_url":"https://github.com/fxbox/app/pull/13","diff_url":"https://github.com/fxbox/app/pull/13.diff","patch_url":"https://github.com/fxbox/app/pull/13.patch","issue_url":"https://api.github.com/repos/fxbox/app/issues/13","number":13,"state":"open","locked":false,"title":"Add IP Camera view. r=gmarty","user":{"login":"azasypkin","id":1713708,"avatar_url":"https://avatars.githubusercontent.com/u/1713708?v=3","gravatar_id":"","url":"https://api.github.com/users/azasypkin","html_url":"https://github.com/azasypkin","followers_url":"https://api.github.com/users/azasypkin/followers","following_url":"https://api.github.com/users/azasypkin/following{/other_user}","gists_url":"https://api.github.com/users/azasypkin/gists{/gist_id}","starred_url":"https://api.github.com/users/azasypkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azasypkin/subscriptions","organizations_url":"https://api.github.com/users/azasypkin/orgs","repos_url":"https://api.github.com/users/azasypkin/repos","events_url":"https://api.github.com/users/azasypkin/events{/privacy}","received_events_url":"https://api.github.com/users/azasypkin/received_events","type":"User","site_admin":false},"body":"PR still depends on several foxbox and users repo PRs, but I want to start discussion early :)","created_at":"2016-03-15T11:53:34Z","updated_at":"2016-03-18T17:44:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"31f8a88beb4bcd50dfebe160abdb99d4fa7e5471","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fxbox/app/pulls/13/commits","review_comments_url":"https://api.github.com/repos/fxbox/app/pulls/13/comments","review_comment_url":"https://api.github.com/repos/fxbox/app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fxbox/app/issues/13/comments","statuses_url":"https://api.github.com/repos/fxbox/app/statuses/eb49fcf042371e76bdd730cb05e945271faa90b7","head":{"label":"azasypkin:ipcamera-view","ref":"ipcamera-view","sha":"eb49fcf042371e76bdd730cb05e945271faa90b7","user":{"login":"azasypkin","id":1713708,"avatar_url":"https://avatars.githubusercontent.com/u/1713708?v=3","gravatar_id":"","url":"https://api.github.com/users/azasypkin","html_url":"https://github.com/azasypkin","followers_url":"https://api.github.com/users/azasypkin/followers","following_url":"https://api.github.com/users/azasypkin/following{/other_user}","gists_url":"https://api.github.com/users/azasypkin/gists{/gist_id}","starred_url":"https://api.github.com/users/azasypkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azasypkin/subscriptions","organizations_url":"https://api.github.com/users/azasypkin/orgs","repos_url":"https://api.github.com/users/azasypkin/repos","events_url":"https://api.github.com/users/azasypkin/events{/privacy}","received_events_url":"https://api.github.com/users/azasypkin/received_events","type":"User","site_admin":false},"repo":{"id":53416420,"name":"app","full_name":"azasypkin/app","owner":{"login":"azasypkin","id":1713708,"avatar_url":"https://avatars.githubusercontent.com/u/1713708?v=3","gravatar_id":"","url":"https://api.github.com/users/azasypkin","html_url":"https://github.com/azasypkin","followers_url":"https://api.github.com/users/azasypkin/followers","following_url":"https://api.github.com/users/azasypkin/following{/other_user}","gists_url":"https://api.github.com/users/azasypkin/gists{/gist_id}","starred_url":"https://api.github.com/users/azasypkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azasypkin/subscriptions","organizations_url":"https://api.github.com/users/azasypkin/orgs","repos_url":"https://api.github.com/users/azasypkin/repos","events_url":"https://api.github.com/users/azasypkin/events{/privacy}","received_events_url":"https://api.github.com/users/azasypkin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/azasypkin/app","description":"An app for Project Link","fork":true,"url":"https://api.github.com/repos/azasypkin/app","forks_url":"https://api.github.com/repos/azasypkin/app/forks","keys_url":"https://api.github.com/repos/azasypkin/app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azasypkin/app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azasypkin/app/teams","hooks_url":"https://api.github.com/repos/azasypkin/app/hooks","issue_events_url":"https://api.github.com/repos/azasypkin/app/issues/events{/number}","events_url":"https://api.github.com/repos/azasypkin/app/events","assignees_url":"https://api.github.com/repos/azasypkin/app/assignees{/user}","branches_url":"https://api.github.com/repos/azasypkin/app/branches{/branch}","tags_url":"https://api.github.com/repos/azasypkin/app/tags","blobs_url":"https://api.github.com/repos/azasypkin/app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azasypkin/app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azasypkin/app/git/refs{/sha}","trees_url":"https://api.github.com/repos/azasypkin/app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azasypkin/app/statuses/{sha}","languages_url":"https://api.github.com/repos/azasypkin/app/languages","stargazers_url":"https://api.github.com/repos/azasypkin/app/stargazers","contributors_url":"https://api.github.com/repos/azasypkin/app/contributors","subscribers_url":"https://api.github.com/repos/azasypkin/app/subscribers","subscription_url":"https://api.github.com/repos/azasypkin/app/subscription","commits_url":"https://api.github.com/repos/azasypkin/app/commits{/sha}","git_commits_url":"https://api.github.com/repos/azasypkin/app/git/commits{/sha}","comments_url":"https://api.github.com/repos/azasypkin/app/comments{/number}","issue_comment_url":"https://api.github.com/repos/azasypkin/app/issues/comments{/number}","contents_url":"https://api.github.com/repos/azasypkin/app/contents/{+path}","compare_url":"https://api.github.com/repos/azasypkin/app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azasypkin/app/merges","archive_url":"https://api.github.com/repos/azasypkin/app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azasypkin/app/downloads","issues_url":"https://api.github.com/repos/azasypkin/app/issues{/number}","pulls_url":"https://api.github.com/repos/azasypkin/app/pulls{/number}","milestones_url":"https://api.github.com/repos/azasypkin/app/milestones{/number}","notifications_url":"https://api.github.com/repos/azasypkin/app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azasypkin/app/labels{/name}","releases_url":"https://api.github.com/repos/azasypkin/app/releases{/id}","deployments_url":"https://api.github.com/repos/azasypkin/app/deployments","created_at":"2016-03-08T13:59:42Z","updated_at":"2016-03-08T13:59:43Z","pushed_at":"2016-03-18T14:36:01Z","git_url":"git://github.com/azasypkin/app.git","ssh_url":"git@github.com:azasypkin/app.git","clone_url":"https://github.com/azasypkin/app.git","svn_url":"https://github.com/azasypkin/app","homepage":"https://fxbox.github.io/app","size":1616,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fxbox:master","ref":"master","sha":"17a09ccda38d7c6568ad2f0c65c4181887959e90","user":{"login":"fxbox","id":17052474,"avatar_url":"https://avatars.githubusercontent.com/u/17052474?v=3","gravatar_id":"","url":"https://api.github.com/users/fxbox","html_url":"https://github.com/fxbox","followers_url":"https://api.github.com/users/fxbox/followers","following_url":"https://api.github.com/users/fxbox/following{/other_user}","gists_url":"https://api.github.com/users/fxbox/gists{/gist_id}","starred_url":"https://api.github.com/users/fxbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fxbox/subscriptions","organizations_url":"https://api.github.com/users/fxbox/orgs","repos_url":"https://api.github.com/users/fxbox/repos","events_url":"https://api.github.com/users/fxbox/events{/privacy}","received_events_url":"https://api.github.com/users/fxbox/received_events","type":"Organization","site_admin":false},"repo":{"id":51533667,"name":"app","full_name":"fxbox/app","owner":{"login":"fxbox","id":17052474,"avatar_url":"https://avatars.githubusercontent.com/u/17052474?v=3","gravatar_id":"","url":"https://api.github.com/users/fxbox","html_url":"https://github.com/fxbox","followers_url":"https://api.github.com/users/fxbox/followers","following_url":"https://api.github.com/users/fxbox/following{/other_user}","gists_url":"https://api.github.com/users/fxbox/gists{/gist_id}","starred_url":"https://api.github.com/users/fxbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fxbox/subscriptions","organizations_url":"https://api.github.com/users/fxbox/orgs","repos_url":"https://api.github.com/users/fxbox/repos","events_url":"https://api.github.com/users/fxbox/events{/privacy}","received_events_url":"https://api.github.com/users/fxbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fxbox/app","description":"An app for Project Link","fork":false,"url":"https://api.github.com/repos/fxbox/app","forks_url":"https://api.github.com/repos/fxbox/app/forks","keys_url":"https://api.github.com/repos/fxbox/app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fxbox/app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fxbox/app/teams","hooks_url":"https://api.github.com/repos/fxbox/app/hooks","issue_events_url":"https://api.github.com/repos/fxbox/app/issues/events{/number}","events_url":"https://api.github.com/repos/fxbox/app/events","assignees_url":"https://api.github.com/repos/fxbox/app/assignees{/user}","branches_url":"https://api.github.com/repos/fxbox/app/branches{/branch}","tags_url":"https://api.github.com/repos/fxbox/app/tags","blobs_url":"https://api.github.com/repos/fxbox/app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fxbox/app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fxbox/app/git/refs{/sha}","trees_url":"https://api.github.com/repos/fxbox/app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fxbox/app/statuses/{sha}","languages_url":"https://api.github.com/repos/fxbox/app/languages","stargazers_url":"https://api.github.com/repos/fxbox/app/stargazers","contributors_url":"https://api.github.com/repos/fxbox/app/contributors","subscribers_url":"https://api.github.com/repos/fxbox/app/subscribers","subscription_url":"https://api.github.com/repos/fxbox/app/subscription","commits_url":"https://api.github.com/repos/fxbox/app/commits{/sha}","git_commits_url":"https://api.github.com/repos/fxbox/app/git/commits{/sha}","comments_url":"https://api.github.com/repos/fxbox/app/comments{/number}","issue_comment_url":"https://api.github.com/repos/fxbox/app/issues/comments{/number}","contents_url":"https://api.github.com/repos/fxbox/app/contents/{+path}","compare_url":"https://api.github.com/repos/fxbox/app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fxbox/app/merges","archive_url":"https://api.github.com/repos/fxbox/app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fxbox/app/downloads","issues_url":"https://api.github.com/repos/fxbox/app/issues{/number}","pulls_url":"https://api.github.com/repos/fxbox/app/pulls{/number}","milestones_url":"https://api.github.com/repos/fxbox/app/milestones{/number}","notifications_url":"https://api.github.com/repos/fxbox/app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fxbox/app/labels{/name}","releases_url":"https://api.github.com/repos/fxbox/app/releases{/id}","deployments_url":"https://api.github.com/repos/fxbox/app/deployments","created_at":"2016-02-11T17:46:54Z","updated_at":"2016-03-04T13:20:59Z","pushed_at":"2016-03-18T17:05:29Z","git_url":"git://github.com/fxbox/app.git","ssh_url":"git@github.com:fxbox/app.git","clone_url":"https://github.com/fxbox/app.git","svn_url":"https://github.com/fxbox/app","homepage":"https://fxbox.github.io/app","size":1647,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":5,"forks":6,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fxbox/app/pulls/13"},"html":{"href":"https://github.com/fxbox/app/pull/13"},"issue":{"href":"https://api.github.com/repos/fxbox/app/issues/13"},"comments":{"href":"https://api.github.com/repos/fxbox/app/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/fxbox/app/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/fxbox/app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fxbox/app/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/fxbox/app/statuses/eb49fcf042371e76bdd730cb05e945271faa90b7"}}}}