{"action":"created","comment":{"url":"https://api.github.com/repos/kryptnostic/gallery/pulls/comments/81401203","pull_request_review_id":2379296,"id":81401203,"diff_hunk":"@@ -0,0 +1,80 @@\n+import React, { PropTypes } from 'react';\n+import { Button } from 'react-bootstrap';\n+import '../styles.module.css';\n+import { PropertyTypeList } from './PropertyTypeList';\n+import CatalogApi from '../../../../utils/CatalogApi';\n+import Consts from '../../../../utils/AppConsts';\n+import { EntityTypeFqnList } from './EntityTypeFqnList';\n+\n+export class Schema extends React.Component {\n+  static propTypes = {\n+    name: PropTypes.string,\n+    namespace: PropTypes.string,\n+    propertyTypes: PropTypes.string,\n+    entityTypeFqns: PropTypes.string\n+  }\n+\n+  constructor() {\n+    super();\n+    this.handleClick = this.handleClick.bind(this);\n+    this.downloadFile = this.downloadFile.bind(this);\n+    this.displayError = this.displayError.bind(this);\n+    this.enableButton = this.enableButton.bind(this);\n+    this.state = {\n+      error: Consts.ERROR_STATE.hide,\n+      disableJson: false\n+    };\n+  }\n+\n+  handleClick() {\n+    this.downloadFile(Consts.JSON);\n+    this.setState({ disableJson: true });\n+  }\n+\n+  downloadFile(datatype) {\n+    CatalogApi.downloadSchema(\n+      this.props.name,\n+      datatype,\n+      this.props.entityTypeFqns,\n+      this.displayError,\n+      this.enableButton\n+    );\n+  }\n+\n+  displayError() {\n+    this.setState({\n+      error: Consts.ERROR_STATE.show,\n+      disableJson: false\n+    });\n+  }\n+\n+  enableButton() {\n+    this.setState({ disableJson: false });\n+  }\n+\n+  render() {","path":"src/views/Main/Catalog/Components/Schema.js","position":55,"original_position":55,"commit_id":"666f192a2469fb80d00a3d5187f1baf3f0f080b2","original_commit_id":"666f192a2469fb80d00a3d5187f1baf3f0f080b2","user":{"login":"UnsungHero97","id":440299,"avatar_url":"https://avatars.githubusercontent.com/u/440299?v=3","gravatar_id":"","url":"https://api.github.com/users/UnsungHero97","html_url":"https://github.com/UnsungHero97","followers_url":"https://api.github.com/users/UnsungHero97/followers","following_url":"https://api.github.com/users/UnsungHero97/following{/other_user}","gists_url":"https://api.github.com/users/UnsungHero97/gists{/gist_id}","starred_url":"https://api.github.com/users/UnsungHero97/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnsungHero97/subscriptions","organizations_url":"https://api.github.com/users/UnsungHero97/orgs","repos_url":"https://api.github.com/users/UnsungHero97/repos","events_url":"https://api.github.com/users/UnsungHero97/events{/privacy}","received_events_url":"https://api.github.com/users/UnsungHero97/received_events","type":"User","site_admin":false},"body":"this `render()` looks very similar to `render()` in `src/views/Main/Catalog/Components/EntityType.js`.\r\n\r\nthis is fine for now, but I think it's worth trying to extract a common component that is responsible for just the markup, and here, you'll just pass in whatever is needed that is custom to `Schema`.","created_at":"2016-09-30T19:16:10Z","updated_at":"2016-09-30T19:19:42Z","html_url":"https://github.com/kryptnostic/gallery/pull/4#discussion_r81401203","pull_request_url":"https://api.github.com/repos/kryptnostic/gallery/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/kryptnostic/gallery/pulls/comments/81401203"},"html":{"href":"https://github.com/kryptnostic/gallery/pull/4#discussion_r81401203"},"pull_request":{"href":"https://api.github.com/repos/kryptnostic/gallery/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/kryptnostic/gallery/pulls/4","id":87181270,"html_url":"https://github.com/kryptnostic/gallery/pull/4","diff_url":"https://github.com/kryptnostic/gallery/pull/4.diff","patch_url":"https://github.com/kryptnostic/gallery/pull/4.patch","issue_url":"https://api.github.com/repos/kryptnostic/gallery/issues/4","number":4,"state":"open","locked":false,"title":"Feature/catalog","user":{"login":"katherinebernstein","id":8203351,"avatar_url":"https://avatars.githubusercontent.com/u/8203351?v=3","gravatar_id":"","url":"https://api.github.com/users/katherinebernstein","html_url":"https://github.com/katherinebernstein","followers_url":"https://api.github.com/users/katherinebernstein/followers","following_url":"https://api.github.com/users/katherinebernstein/following{/other_user}","gists_url":"https://api.github.com/users/katherinebernstein/gists{/gist_id}","starred_url":"https://api.github.com/users/katherinebernstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katherinebernstein/subscriptions","organizations_url":"https://api.github.com/users/katherinebernstein/orgs","repos_url":"https://api.github.com/users/katherinebernstein/repos","events_url":"https://api.github.com/users/katherinebernstein/events{/privacy}","received_events_url":"https://api.github.com/users/katherinebernstein/received_events","type":"User","site_admin":false},"body":"-login/logout\r\n-view schemas, entity sets, entity types\r\n-download entity sets and entity types as JSON or CSV\r\n-download schemas as JSON","created_at":"2016-09-28T19:09:14Z","updated_at":"2016-09-30T19:19:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b7fc51fc0778700c3f06d3ec7c1a09699c2e63b9","assignee":{"login":"UnsungHero97","id":440299,"avatar_url":"https://avatars.githubusercontent.com/u/440299?v=3","gravatar_id":"","url":"https://api.github.com/users/UnsungHero97","html_url":"https://github.com/UnsungHero97","followers_url":"https://api.github.com/users/UnsungHero97/followers","following_url":"https://api.github.com/users/UnsungHero97/following{/other_user}","gists_url":"https://api.github.com/users/UnsungHero97/gists{/gist_id}","starred_url":"https://api.github.com/users/UnsungHero97/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnsungHero97/subscriptions","organizations_url":"https://api.github.com/users/UnsungHero97/orgs","repos_url":"https://api.github.com/users/UnsungHero97/repos","events_url":"https://api.github.com/users/UnsungHero97/events{/privacy}","received_events_url":"https://api.github.com/users/UnsungHero97/received_events","type":"User","site_admin":false},"assignees":[{"login":"UnsungHero97","id":440299,"avatar_url":"https://avatars.githubusercontent.com/u/440299?v=3","gravatar_id":"","url":"https://api.github.com/users/UnsungHero97","html_url":"https://github.com/UnsungHero97","followers_url":"https://api.github.com/users/UnsungHero97/followers","following_url":"https://api.github.com/users/UnsungHero97/following{/other_user}","gists_url":"https://api.github.com/users/UnsungHero97/gists{/gist_id}","starred_url":"https://api.github.com/users/UnsungHero97/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnsungHero97/subscriptions","organizations_url":"https://api.github.com/users/UnsungHero97/orgs","repos_url":"https://api.github.com/users/UnsungHero97/repos","events_url":"https://api.github.com/users/UnsungHero97/events{/privacy}","received_events_url":"https://api.github.com/users/UnsungHero97/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kryptnostic/gallery/pulls/4/commits","review_comments_url":"https://api.github.com/repos/kryptnostic/gallery/pulls/4/comments","review_comment_url":"https://api.github.com/repos/kryptnostic/gallery/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kryptnostic/gallery/issues/4/comments","statuses_url":"https://api.github.com/repos/kryptnostic/gallery/statuses/666f192a2469fb80d00a3d5187f1baf3f0f080b2","head":{"label":"kryptnostic:feature/catalog","ref":"feature/catalog","sha":"666f192a2469fb80d00a3d5187f1baf3f0f080b2","user":{"login":"kryptnostic","id":5438547,"avatar_url":"https://avatars.githubusercontent.com/u/5438547?v=3","gravatar_id":"","url":"https://api.github.com/users/kryptnostic","html_url":"https://github.com/kryptnostic","followers_url":"https://api.github.com/users/kryptnostic/followers","following_url":"https://api.github.com/users/kryptnostic/following{/other_user}","gists_url":"https://api.github.com/users/kryptnostic/gists{/gist_id}","starred_url":"https://api.github.com/users/kryptnostic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kryptnostic/subscriptions","organizations_url":"https://api.github.com/users/kryptnostic/orgs","repos_url":"https://api.github.com/users/kryptnostic/repos","events_url":"https://api.github.com/users/kryptnostic/events{/privacy}","received_events_url":"https://api.github.com/users/kryptnostic/received_events","type":"Organization","site_admin":false},"repo":{"id":68751663,"name":"gallery","full_name":"kryptnostic/gallery","owner":{"login":"kryptnostic","id":5438547,"avatar_url":"https://avatars.githubusercontent.com/u/5438547?v=3","gravatar_id":"","url":"https://api.github.com/users/kryptnostic","html_url":"https://github.com/kryptnostic","followers_url":"https://api.github.com/users/kryptnostic/followers","following_url":"https://api.github.com/users/kryptnostic/following{/other_user}","gists_url":"https://api.github.com/users/kryptnostic/gists{/gist_id}","starred_url":"https://api.github.com/users/kryptnostic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kryptnostic/subscriptions","organizations_url":"https://api.github.com/users/kryptnostic/orgs","repos_url":"https://api.github.com/users/kryptnostic/repos","events_url":"https://api.github.com/users/kryptnostic/events{/privacy}","received_events_url":"https://api.github.com/users/kryptnostic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kryptnostic/gallery","description":null,"fork":false,"url":"https://api.github.com/repos/kryptnostic/gallery","forks_url":"https://api.github.com/repos/kryptnostic/gallery/forks","keys_url":"https://api.github.com/repos/kryptnostic/gallery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kryptnostic/gallery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kryptnostic/gallery/teams","hooks_url":"https://api.github.com/repos/kryptnostic/gallery/hooks","issue_events_url":"https://api.github.com/repos/kryptnostic/gallery/issues/events{/number}","events_url":"https://api.github.com/repos/kryptnostic/gallery/events","assignees_url":"https://api.github.com/repos/kryptnostic/gallery/assignees{/user}","branches_url":"https://api.github.com/repos/kryptnostic/gallery/branches{/branch}","tags_url":"https://api.github.com/repos/kryptnostic/gallery/tags","blobs_url":"https://api.github.com/repos/kryptnostic/gallery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kryptnostic/gallery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kryptnostic/gallery/git/refs{/sha}","trees_url":"https://api.github.com/repos/kryptnostic/gallery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kryptnostic/gallery/statuses/{sha}","languages_url":"https://api.github.com/repos/kryptnostic/gallery/languages","stargazers_url":"https://api.github.com/repos/kryptnostic/gallery/stargazers","contributors_url":"https://api.github.com/repos/kryptnostic/gallery/contributors","subscribers_url":"https://api.github.com/repos/kryptnostic/gallery/subscribers","subscription_url":"https://api.github.com/repos/kryptnostic/gallery/subscription","commits_url":"https://api.github.com/repos/kryptnostic/gallery/commits{/sha}","git_commits_url":"https://api.github.com/repos/kryptnostic/gallery/git/commits{/sha}","comments_url":"https://api.github.com/repos/kryptnostic/gallery/comments{/number}","issue_comment_url":"https://api.github.com/repos/kryptnostic/gallery/issues/comments{/number}","contents_url":"https://api.github.com/repos/kryptnostic/gallery/contents/{+path}","compare_url":"https://api.github.com/repos/kryptnostic/gallery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kryptnostic/gallery/merges","archive_url":"https://api.github.com/repos/kryptnostic/gallery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kryptnostic/gallery/downloads","issues_url":"https://api.github.com/repos/kryptnostic/gallery/issues{/number}","pulls_url":"https://api.github.com/repos/kryptnostic/gallery/pulls{/number}","milestones_url":"https://api.github.com/repos/kryptnostic/gallery/milestones{/number}","notifications_url":"https://api.github.com/repos/kryptnostic/gallery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kryptnostic/gallery/labels{/name}","releases_url":"https://api.github.com/repos/kryptnostic/gallery/releases{/id}","deployments_url":"https://api.github.com/repos/kryptnostic/gallery/deployments","created_at":"2016-09-20T20:42:10Z","updated_at":"2016-09-20T21:34:11Z","pushed_at":"2016-09-29T20:05:56Z","git_url":"git://github.com/kryptnostic/gallery.git","ssh_url":"git@github.com:kryptnostic/gallery.git","clone_url":"https://github.com/kryptnostic/gallery.git","svn_url":"https://github.com/kryptnostic/gallery","homepage":null,"size":76,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"kryptnostic:develop","ref":"develop","sha":"5c36faf3acf56350368e10486fd60ab419645c36","user":{"login":"kryptnostic","id":5438547,"avatar_url":"https://avatars.githubusercontent.com/u/5438547?v=3","gravatar_id":"","url":"https://api.github.com/users/kryptnostic","html_url":"https://github.com/kryptnostic","followers_url":"https://api.github.com/users/kryptnostic/followers","following_url":"https://api.github.com/users/kryptnostic/following{/other_user}","gists_url":"https://api.github.com/users/kryptnostic/gists{/gist_id}","starred_url":"https://api.github.com/users/kryptnostic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kryptnostic/subscriptions","organizations_url":"https://api.github.com/users/kryptnostic/orgs","repos_url":"https://api.github.com/users/kryptnostic/repos","events_url":"https://api.github.com/users/kryptnostic/events{/privacy}","received_events_url":"https://api.github.com/users/kryptnostic/received_events","type":"Organization","site_admin":false},"repo":{"id":68751663,"name":"gallery","full_name":"kryptnostic/gallery","owner":{"login":"kryptnostic","id":5438547,"avatar_url":"https://avatars.githubusercontent.com/u/5438547?v=3","gravatar_id":"","url":"https://api.github.com/users/kryptnostic","html_url":"https://github.com/kryptnostic","followers_url":"https://api.github.com/users/kryptnostic/followers","following_url":"https://api.github.com/users/kryptnostic/following{/other_user}","gists_url":"https://api.github.com/users/kryptnostic/gists{/gist_id}","starred_url":"https://api.github.com/users/kryptnostic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kryptnostic/subscriptions","organizations_url":"https://api.github.com/users/kryptnostic/orgs","repos_url":"https://api.github.com/users/kryptnostic/repos","events_url":"https://api.github.com/users/kryptnostic/events{/privacy}","received_events_url":"https://api.github.com/users/kryptnostic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kryptnostic/gallery","description":null,"fork":false,"url":"https://api.github.com/repos/kryptnostic/gallery","forks_url":"https://api.github.com/repos/kryptnostic/gallery/forks","keys_url":"https://api.github.com/repos/kryptnostic/gallery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kryptnostic/gallery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kryptnostic/gallery/teams","hooks_url":"https://api.github.com/repos/kryptnostic/gallery/hooks","issue_events_url":"https://api.github.com/repos/kryptnostic/gallery/issues/events{/number}","events_url":"https://api.github.com/repos/kryptnostic/gallery/events","assignees_url":"https://api.github.com/repos/kryptnostic/gallery/assignees{/user}","branches_url":"https://api.github.com/repos/kryptnostic/gallery/branches{/branch}","tags_url":"https://api.github.com/repos/kryptnostic/gallery/tags","blobs_url":"https://api.github.com/repos/kryptnostic/gallery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kryptnostic/gallery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kryptnostic/gallery/git/refs{/sha}","trees_url":"https://api.github.com/repos/kryptnostic/gallery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kryptnostic/gallery/statuses/{sha}","languages_url":"https://api.github.com/repos/kryptnostic/gallery/languages","stargazers_url":"https://api.github.com/repos/kryptnostic/gallery/stargazers","contributors_url":"https://api.github.com/repos/kryptnostic/gallery/contributors","subscribers_url":"https://api.github.com/repos/kryptnostic/gallery/subscribers","subscription_url":"https://api.github.com/repos/kryptnostic/gallery/subscription","commits_url":"https://api.github.com/repos/kryptnostic/gallery/commits{/sha}","git_commits_url":"https://api.github.com/repos/kryptnostic/gallery/git/commits{/sha}","comments_url":"https://api.github.com/repos/kryptnostic/gallery/comments{/number}","issue_comment_url":"https://api.github.com/repos/kryptnostic/gallery/issues/comments{/number}","contents_url":"https://api.github.com/repos/kryptnostic/gallery/contents/{+path}","compare_url":"https://api.github.com/repos/kryptnostic/gallery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kryptnostic/gallery/merges","archive_url":"https://api.github.com/repos/kryptnostic/gallery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kryptnostic/gallery/downloads","issues_url":"https://api.github.com/repos/kryptnostic/gallery/issues{/number}","pulls_url":"https://api.github.com/repos/kryptnostic/gallery/pulls{/number}","milestones_url":"https://api.github.com/repos/kryptnostic/gallery/milestones{/number}","notifications_url":"https://api.github.com/repos/kryptnostic/gallery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kryptnostic/gallery/labels{/name}","releases_url":"https://api.github.com/repos/kryptnostic/gallery/releases{/id}","deployments_url":"https://api.github.com/repos/kryptnostic/gallery/deployments","created_at":"2016-09-20T20:42:10Z","updated_at":"2016-09-20T21:34:11Z","pushed_at":"2016-09-29T20:05:56Z","git_url":"git://github.com/kryptnostic/gallery.git","ssh_url":"git@github.com:kryptnostic/gallery.git","clone_url":"https://github.com/kryptnostic/gallery.git","svn_url":"https://github.com/kryptnostic/gallery","homepage":null,"size":76,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/kryptnostic/gallery/pulls/4"},"html":{"href":"https://github.com/kryptnostic/gallery/pull/4"},"issue":{"href":"https://api.github.com/repos/kryptnostic/gallery/issues/4"},"comments":{"href":"https://api.github.com/repos/kryptnostic/gallery/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/kryptnostic/gallery/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/kryptnostic/gallery/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kryptnostic/gallery/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/kryptnostic/gallery/statuses/666f192a2469fb80d00a3d5187f1baf3f0f080b2"}}}}
{"actor":{"display_login":"UnsungHero97"}}