{"action":"created","comment":{"url":"https://api.github.com/repos/fabiand/k8s-start/pulls/comments/71518948","id":71518948,"diff_hunk":"@@ -0,0 +1,142 @@\n+import React from 'react';\n+import $ from \"jquery\"\n+\n+\n+class Volume extends React.Component {\n+  constructor() {\n+      super();\n+\n+      this.state = {\n+         disks: []\n+      }\n+\n+      this.fetchData = this.fetchData.bind(this);\n+    };\n+\n+   componentWillMount() {\n+      this.fetchData();\n+   };\n+\n+   fetchData() {\n+        $.ajax({\n+            type: \"GET\",\n+            dataType: 'json',\n+            url: 'http://localhost:8083/v1/volumes/'+this.props.data.name+\"/\",\n+            success: function(response){\n+            console.log(response);\n+            this.setState({disks: response.disks})\n+            }.bind(this)\n+        });\n+\n+   };\n+   render() {\n+      return (\n+        <tr>\n+        <td>\n+          <table className=\"datatable table table-striped table-bordered\">\n+            <tbody>\n+            <tr>\n+              <td>Volume:{this.props.data.name}\n+                <table className=\"datatable table table-striped table-bordered\">\n+                   <tbody>\n+                      {this.state.disks.map((disk, i) => <Disk key = {i} data = {disk} />)}\n+                   </tbody>\n+                </table>\n+              </td>\n+            </tr>\n+            <tr>\n+              <td>\n+                <form className=\"form-horizontal\">\n+                  <div className=\"form-group\">\n+                    <label className=\"col-sm-2 control-label\">Disk Name</label>\n+                    <div className=\"col-sm-10\">\n+                      <input type=\"text\" id=\"name\" className=\"form-control\"/>\n+                    </div>\n+                    <label className=\"col-sm-2 control-label\">Size in Gb</label>\n+                    <div className=\"col-sm-10\">\n+                      <input type=\"text\" id=\"size\" className=\"form-control\"/>\n+                    </div>\n+                  </div>\n+                  <div className=\"form-group\">\n+                    <div className=\"col-sm-offset-2 col-sm-10\">\n+                      <button type=\"submit\" className=\"btn btn-primary\">Add</button>\n+                    </div>\n+                  </div>\n+                </form>\n+               </td>\n+              </tr>\n+              </tbody>\n+          </table>\n+        </td>\n+        </tr>\n+      );\n+   }\n+}\n+\n+class DiskTable extends React.Component {\n+  constructor() {\n+      super();\n+\n+      this.state = {\n+         volumes: []\n+      }\n+\n+      this.fetchData = this.fetchData.bind(this);\n+    };\n+\n+    fetchData() {\n+        $.ajax({\n+            type: \"GET\",\n+            dataType: 'json',\n+            url: 'http://localhost:8083/v1/volumes',\n+            success: function(response){\n+            console.log(response);\n+            this.setState({volumes: response.volumes})\n+            }.bind(this)\n+        });\n+\n+   };\n+\n+   componentWillMount() {\n+      this.fetchData();\n+   };\n+\n+    render() {\n+      return (\n+        <div>\n+            <table className=\"datatable table table-striped table-bordered\">\n+                <thead>\n+                <tr>\n+                  <th>Volumes</th>\n+                </tr>\n+              </thead>\n+               <tbody>\n+                  {this.state.volumes.map((volume, i) => <Volume key = {i} data = {volume} />)}","path":"kubevirtmng/ui/DiskList.jsx","position":114,"original_position":114,"commit_id":"59d471e2a281bde9e658682795f8d15f20a96253","original_commit_id":"59d471e2a281bde9e658682795f8d15f20a96253","user":{"login":"evol262","id":92212,"avatar_url":"https://avatars.githubusercontent.com/u/92212?v=3","gravatar_id":"","url":"https://api.github.com/users/evol262","html_url":"https://github.com/evol262","followers_url":"https://api.github.com/users/evol262/followers","following_url":"https://api.github.com/users/evol262/following{/other_user}","gists_url":"https://api.github.com/users/evol262/gists{/gist_id}","starred_url":"https://api.github.com/users/evol262/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evol262/subscriptions","organizations_url":"https://api.github.com/users/evol262/orgs","repos_url":"https://api.github.com/users/evol262/repos","events_url":"https://api.github.com/users/evol262/events{/privacy}","received_events_url":"https://api.github.com/users/evol262/received_events","type":"User","site_admin":false},"body":"As above -- no \"real\" logic in return()","created_at":"2016-07-20T12:58:56Z","updated_at":"2016-07-20T12:58:56Z","html_url":"https://github.com/fabiand/k8s-start/pull/22#discussion_r71518948","pull_request_url":"https://api.github.com/repos/fabiand/k8s-start/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/fabiand/k8s-start/pulls/comments/71518948"},"html":{"href":"https://github.com/fabiand/k8s-start/pull/22#discussion_r71518948"},"pull_request":{"href":"https://api.github.com/repos/fabiand/k8s-start/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/fabiand/k8s-start/pulls/22","id":70180435,"html_url":"https://github.com/fabiand/k8s-start/pull/22","diff_url":"https://github.com/fabiand/k8s-start/pull/22.diff","patch_url":"https://github.com/fabiand/k8s-start/pull/22.patch","issue_url":"https://api.github.com/repos/fabiand/k8s-start/issues/22","number":22,"state":"open","locked":false,"title":"Adding UI for VMs and disks","user":{"login":"tlitovsk","id":10279829,"avatar_url":"https://avatars.githubusercontent.com/u/10279829?v=3","gravatar_id":"","url":"https://api.github.com/users/tlitovsk","html_url":"https://github.com/tlitovsk","followers_url":"https://api.github.com/users/tlitovsk/followers","following_url":"https://api.github.com/users/tlitovsk/following{/other_user}","gists_url":"https://api.github.com/users/tlitovsk/gists{/gist_id}","starred_url":"https://api.github.com/users/tlitovsk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlitovsk/subscriptions","organizations_url":"https://api.github.com/users/tlitovsk/orgs","repos_url":"https://api.github.com/users/tlitovsk/repos","events_url":"https://api.github.com/users/tlitovsk/events{/privacy}","received_events_url":"https://api.github.com/users/tlitovsk/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Tolik Litovsky <tlitovsk@redhat.com>","created_at":"2016-05-16T10:56:17Z","updated_at":"2016-07-20T12:58:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f895d9df0bc0775be3acf9d07cc66dbc491d375a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fabiand/k8s-start/pulls/22/commits","review_comments_url":"https://api.github.com/repos/fabiand/k8s-start/pulls/22/comments","review_comment_url":"https://api.github.com/repos/fabiand/k8s-start/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fabiand/k8s-start/issues/22/comments","statuses_url":"https://api.github.com/repos/fabiand/k8s-start/statuses/59d471e2a281bde9e658682795f8d15f20a96253","head":{"label":"tlitovsk:master","ref":"master","sha":"59d471e2a281bde9e658682795f8d15f20a96253","user":{"login":"tlitovsk","id":10279829,"avatar_url":"https://avatars.githubusercontent.com/u/10279829?v=3","gravatar_id":"","url":"https://api.github.com/users/tlitovsk","html_url":"https://github.com/tlitovsk","followers_url":"https://api.github.com/users/tlitovsk/followers","following_url":"https://api.github.com/users/tlitovsk/following{/other_user}","gists_url":"https://api.github.com/users/tlitovsk/gists{/gist_id}","starred_url":"https://api.github.com/users/tlitovsk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlitovsk/subscriptions","organizations_url":"https://api.github.com/users/tlitovsk/orgs","repos_url":"https://api.github.com/users/tlitovsk/repos","events_url":"https://api.github.com/users/tlitovsk/events{/privacy}","received_events_url":"https://api.github.com/users/tlitovsk/received_events","type":"User","site_admin":false},"repo":{"id":55155364,"name":"k8s-start","full_name":"tlitovsk/k8s-start","owner":{"login":"tlitovsk","id":10279829,"avatar_url":"https://avatars.githubusercontent.com/u/10279829?v=3","gravatar_id":"","url":"https://api.github.com/users/tlitovsk","html_url":"https://github.com/tlitovsk","followers_url":"https://api.github.com/users/tlitovsk/followers","following_url":"https://api.github.com/users/tlitovsk/following{/other_user}","gists_url":"https://api.github.com/users/tlitovsk/gists{/gist_id}","starred_url":"https://api.github.com/users/tlitovsk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlitovsk/subscriptions","organizations_url":"https://api.github.com/users/tlitovsk/orgs","repos_url":"https://api.github.com/users/tlitovsk/repos","events_url":"https://api.github.com/users/tlitovsk/events{/privacy}","received_events_url":"https://api.github.com/users/tlitovsk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tlitovsk/k8s-start","description":"k8s playground","fork":true,"url":"https://api.github.com/repos/tlitovsk/k8s-start","forks_url":"https://api.github.com/repos/tlitovsk/k8s-start/forks","keys_url":"https://api.github.com/repos/tlitovsk/k8s-start/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tlitovsk/k8s-start/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tlitovsk/k8s-start/teams","hooks_url":"https://api.github.com/repos/tlitovsk/k8s-start/hooks","issue_events_url":"https://api.github.com/repos/tlitovsk/k8s-start/issues/events{/number}","events_url":"https://api.github.com/repos/tlitovsk/k8s-start/events","assignees_url":"https://api.github.com/repos/tlitovsk/k8s-start/assignees{/user}","branches_url":"https://api.github.com/repos/tlitovsk/k8s-start/branches{/branch}","tags_url":"https://api.github.com/repos/tlitovsk/k8s-start/tags","blobs_url":"https://api.github.com/repos/tlitovsk/k8s-start/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tlitovsk/k8s-start/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tlitovsk/k8s-start/git/refs{/sha}","trees_url":"https://api.github.com/repos/tlitovsk/k8s-start/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tlitovsk/k8s-start/statuses/{sha}","languages_url":"https://api.github.com/repos/tlitovsk/k8s-start/languages","stargazers_url":"https://api.github.com/repos/tlitovsk/k8s-start/stargazers","contributors_url":"https://api.github.com/repos/tlitovsk/k8s-start/contributors","subscribers_url":"https://api.github.com/repos/tlitovsk/k8s-start/subscribers","subscription_url":"https://api.github.com/repos/tlitovsk/k8s-start/subscription","commits_url":"https://api.github.com/repos/tlitovsk/k8s-start/commits{/sha}","git_commits_url":"https://api.github.com/repos/tlitovsk/k8s-start/git/commits{/sha}","comments_url":"https://api.github.com/repos/tlitovsk/k8s-start/comments{/number}","issue_comment_url":"https://api.github.com/repos/tlitovsk/k8s-start/issues/comments{/number}","contents_url":"https://api.github.com/repos/tlitovsk/k8s-start/contents/{+path}","compare_url":"https://api.github.com/repos/tlitovsk/k8s-start/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tlitovsk/k8s-start/merges","archive_url":"https://api.github.com/repos/tlitovsk/k8s-start/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tlitovsk/k8s-start/downloads","issues_url":"https://api.github.com/repos/tlitovsk/k8s-start/issues{/number}","pulls_url":"https://api.github.com/repos/tlitovsk/k8s-start/pulls{/number}","milestones_url":"https://api.github.com/repos/tlitovsk/k8s-start/milestones{/number}","notifications_url":"https://api.github.com/repos/tlitovsk/k8s-start/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tlitovsk/k8s-start/labels{/name}","releases_url":"https://api.github.com/repos/tlitovsk/k8s-start/releases{/id}","deployments_url":"https://api.github.com/repos/tlitovsk/k8s-start/deployments","created_at":"2016-03-31T14:05:57Z","updated_at":"2016-07-17T12:40:39Z","pushed_at":"2016-07-20T06:25:39Z","git_url":"git://github.com/tlitovsk/k8s-start.git","ssh_url":"git@github.com:tlitovsk/k8s-start.git","clone_url":"https://github.com/tlitovsk/k8s-start.git","svn_url":"https://github.com/tlitovsk/k8s-start","homepage":null,"size":300,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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":"fabiand:master","ref":"master","sha":"600e4378f6906490a080e9d5a1c724cef04dceac","user":{"login":"fabiand","id":83456,"avatar_url":"https://avatars.githubusercontent.com/u/83456?v=3","gravatar_id":"","url":"https://api.github.com/users/fabiand","html_url":"https://github.com/fabiand","followers_url":"https://api.github.com/users/fabiand/followers","following_url":"https://api.github.com/users/fabiand/following{/other_user}","gists_url":"https://api.github.com/users/fabiand/gists{/gist_id}","starred_url":"https://api.github.com/users/fabiand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabiand/subscriptions","organizations_url":"https://api.github.com/users/fabiand/orgs","repos_url":"https://api.github.com/users/fabiand/repos","events_url":"https://api.github.com/users/fabiand/events{/privacy}","received_events_url":"https://api.github.com/users/fabiand/received_events","type":"User","site_admin":false},"repo":{"id":55153936,"name":"k8s-start","full_name":"fabiand/k8s-start","owner":{"login":"fabiand","id":83456,"avatar_url":"https://avatars.githubusercontent.com/u/83456?v=3","gravatar_id":"","url":"https://api.github.com/users/fabiand","html_url":"https://github.com/fabiand","followers_url":"https://api.github.com/users/fabiand/followers","following_url":"https://api.github.com/users/fabiand/following{/other_user}","gists_url":"https://api.github.com/users/fabiand/gists{/gist_id}","starred_url":"https://api.github.com/users/fabiand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabiand/subscriptions","organizations_url":"https://api.github.com/users/fabiand/orgs","repos_url":"https://api.github.com/users/fabiand/repos","events_url":"https://api.github.com/users/fabiand/events{/privacy}","received_events_url":"https://api.github.com/users/fabiand/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fabiand/k8s-start","description":"k8s playground","fork":false,"url":"https://api.github.com/repos/fabiand/k8s-start","forks_url":"https://api.github.com/repos/fabiand/k8s-start/forks","keys_url":"https://api.github.com/repos/fabiand/k8s-start/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fabiand/k8s-start/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fabiand/k8s-start/teams","hooks_url":"https://api.github.com/repos/fabiand/k8s-start/hooks","issue_events_url":"https://api.github.com/repos/fabiand/k8s-start/issues/events{/number}","events_url":"https://api.github.com/repos/fabiand/k8s-start/events","assignees_url":"https://api.github.com/repos/fabiand/k8s-start/assignees{/user}","branches_url":"https://api.github.com/repos/fabiand/k8s-start/branches{/branch}","tags_url":"https://api.github.com/repos/fabiand/k8s-start/tags","blobs_url":"https://api.github.com/repos/fabiand/k8s-start/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fabiand/k8s-start/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fabiand/k8s-start/git/refs{/sha}","trees_url":"https://api.github.com/repos/fabiand/k8s-start/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fabiand/k8s-start/statuses/{sha}","languages_url":"https://api.github.com/repos/fabiand/k8s-start/languages","stargazers_url":"https://api.github.com/repos/fabiand/k8s-start/stargazers","contributors_url":"https://api.github.com/repos/fabiand/k8s-start/contributors","subscribers_url":"https://api.github.com/repos/fabiand/k8s-start/subscribers","subscription_url":"https://api.github.com/repos/fabiand/k8s-start/subscription","commits_url":"https://api.github.com/repos/fabiand/k8s-start/commits{/sha}","git_commits_url":"https://api.github.com/repos/fabiand/k8s-start/git/commits{/sha}","comments_url":"https://api.github.com/repos/fabiand/k8s-start/comments{/number}","issue_comment_url":"https://api.github.com/repos/fabiand/k8s-start/issues/comments{/number}","contents_url":"https://api.github.com/repos/fabiand/k8s-start/contents/{+path}","compare_url":"https://api.github.com/repos/fabiand/k8s-start/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fabiand/k8s-start/merges","archive_url":"https://api.github.com/repos/fabiand/k8s-start/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fabiand/k8s-start/downloads","issues_url":"https://api.github.com/repos/fabiand/k8s-start/issues{/number}","pulls_url":"https://api.github.com/repos/fabiand/k8s-start/pulls{/number}","milestones_url":"https://api.github.com/repos/fabiand/k8s-start/milestones{/number}","notifications_url":"https://api.github.com/repos/fabiand/k8s-start/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fabiand/k8s-start/labels{/name}","releases_url":"https://api.github.com/repos/fabiand/k8s-start/releases{/id}","deployments_url":"https://api.github.com/repos/fabiand/k8s-start/deployments","created_at":"2016-03-31T13:46:05Z","updated_at":"2016-03-31T13:46:36Z","pushed_at":"2016-07-20T06:25:40Z","git_url":"git://github.com/fabiand/k8s-start.git","ssh_url":"git@github.com:fabiand/k8s-start.git","clone_url":"https://github.com/fabiand/k8s-start.git","svn_url":"https://github.com/fabiand/k8s-start","homepage":null,"size":120,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fabiand/k8s-start/pulls/22"},"html":{"href":"https://github.com/fabiand/k8s-start/pull/22"},"issue":{"href":"https://api.github.com/repos/fabiand/k8s-start/issues/22"},"comments":{"href":"https://api.github.com/repos/fabiand/k8s-start/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/fabiand/k8s-start/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/fabiand/k8s-start/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fabiand/k8s-start/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/fabiand/k8s-start/statuses/59d471e2a281bde9e658682795f8d15f20a96253"}}}}
{"actor":{"display_login":"evol262"}}