{"action":"opened","number":903,"pull_request":{"url":"https://api.github.com/repos/dcos/dcos-ui/pulls/903","id":79906674,"html_url":"https://github.com/dcos/dcos-ui/pull/903","diff_url":"https://github.com/dcos/dcos-ui/pull/903.diff","patch_url":"https://github.com/dcos/dcos-ui/pull/903.patch","issue_url":"https://api.github.com/repos/dcos/dcos-ui/issues/903","number":903,"state":"open","locked":false,"title":"DCOS-8808 & DCOS-8904: rethink the struct approach in the service form modal","user":{"login":"Poltergeist","id":156010,"avatar_url":"https://avatars.githubusercontent.com/u/156010?v=3","gravatar_id":"","url":"https://api.github.com/users/Poltergeist","html_url":"https://github.com/Poltergeist","followers_url":"https://api.github.com/users/Poltergeist/followers","following_url":"https://api.github.com/users/Poltergeist/following{/other_user}","gists_url":"https://api.github.com/users/Poltergeist/gists{/gist_id}","starred_url":"https://api.github.com/users/Poltergeist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Poltergeist/subscriptions","organizations_url":"https://api.github.com/users/Poltergeist/orgs","repos_url":"https://api.github.com/users/Poltergeist/repos","events_url":"https://api.github.com/users/Poltergeist/events{/privacy}","received_events_url":"https://api.github.com/users/Poltergeist/received_events","type":"User","site_admin":false},"body":"This PR introduces a `getJSON` method to the Item struct which will return a JSON of the `_itemData` this enables us to\r\n\r\n- Make unknown fields which have been added in JSON mode persistent after switching back to the form.\r\n- Keep fields in edit mode which are not present in the form, for example `requirePorts`, `updateStrategy`, `residency` to name a few. Those are also exposed to the JSON mode. \r\n- Remove fields which have been set in an earlier version for example `user` right now it is only possible to rename the user but not to remove it from the form. because if the value is `null` the field was removed.\r\n\r\nIn general the JSON is now a lot more verbose but it is necessary.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/156010/17367214/6e24020e-598f-11e6-97ee-8046e8597bc1.png)\r\n\r\n![image](https://cloud.githubusercontent.com/assets/156010/17367241/7f978b50-598f-11e6-9571-750cfeea6f12.png)\r\n","created_at":"2016-08-03T13:33:47Z","updated_at":"2016-08-03T13:33:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39736033a78a822741f1e0b4782893182167be91","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/903/commits","review_comments_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/903/comments","review_comment_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dcos/dcos-ui/issues/903/comments","statuses_url":"https://api.github.com/repos/dcos/dcos-ui/statuses/d733df0e6118c1a88c9b8365a1aac95307cb5cd3","head":{"label":"dcos:ph/feat/revamp-structs","ref":"ph/feat/revamp-structs","sha":"d733df0e6118c1a88c9b8365a1aac95307cb5cd3","user":{"login":"dcos","id":17648048,"avatar_url":"https://avatars.githubusercontent.com/u/17648048?v=3","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"repo":{"id":56547504,"name":"dcos-ui","full_name":"dcos/dcos-ui","owner":{"login":"dcos","id":17648048,"avatar_url":"https://avatars.githubusercontent.com/u/17648048?v=3","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dcos/dcos-ui","description":"The UI for The Datacenter Operating System","fork":false,"url":"https://api.github.com/repos/dcos/dcos-ui","forks_url":"https://api.github.com/repos/dcos/dcos-ui/forks","keys_url":"https://api.github.com/repos/dcos/dcos-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dcos/dcos-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dcos/dcos-ui/teams","hooks_url":"https://api.github.com/repos/dcos/dcos-ui/hooks","issue_events_url":"https://api.github.com/repos/dcos/dcos-ui/issues/events{/number}","events_url":"https://api.github.com/repos/dcos/dcos-ui/events","assignees_url":"https://api.github.com/repos/dcos/dcos-ui/assignees{/user}","branches_url":"https://api.github.com/repos/dcos/dcos-ui/branches{/branch}","tags_url":"https://api.github.com/repos/dcos/dcos-ui/tags","blobs_url":"https://api.github.com/repos/dcos/dcos-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dcos/dcos-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dcos/dcos-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/dcos/dcos-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dcos/dcos-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/dcos/dcos-ui/languages","stargazers_url":"https://api.github.com/repos/dcos/dcos-ui/stargazers","contributors_url":"https://api.github.com/repos/dcos/dcos-ui/contributors","subscribers_url":"https://api.github.com/repos/dcos/dcos-ui/subscribers","subscription_url":"https://api.github.com/repos/dcos/dcos-ui/subscription","commits_url":"https://api.github.com/repos/dcos/dcos-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/dcos/dcos-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/dcos/dcos-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/dcos/dcos-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/dcos/dcos-ui/contents/{+path}","compare_url":"https://api.github.com/repos/dcos/dcos-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dcos/dcos-ui/merges","archive_url":"https://api.github.com/repos/dcos/dcos-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dcos/dcos-ui/downloads","issues_url":"https://api.github.com/repos/dcos/dcos-ui/issues{/number}","pulls_url":"https://api.github.com/repos/dcos/dcos-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/dcos/dcos-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/dcos/dcos-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dcos/dcos-ui/labels{/name}","releases_url":"https://api.github.com/repos/dcos/dcos-ui/releases{/id}","deployments_url":"https://api.github.com/repos/dcos/dcos-ui/deployments","created_at":"2016-04-18T22:48:06Z","updated_at":"2016-07-30T02:04:41Z","pushed_at":"2016-08-03T13:33:47Z","git_url":"git://github.com/dcos/dcos-ui.git","ssh_url":"git@github.com:dcos/dcos-ui.git","clone_url":"https://github.com/dcos/dcos-ui.git","svn_url":"https://github.com/dcos/dcos-ui","homepage":null,"size":19079,"stargazers_count":89,"watchers_count":89,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":15,"forks":20,"open_issues":15,"watchers":89,"default_branch":"master"}},"base":{"label":"dcos:master","ref":"master","sha":"f0d4256bb3df83751fef11c191db7651dd198d5d","user":{"login":"dcos","id":17648048,"avatar_url":"https://avatars.githubusercontent.com/u/17648048?v=3","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"repo":{"id":56547504,"name":"dcos-ui","full_name":"dcos/dcos-ui","owner":{"login":"dcos","id":17648048,"avatar_url":"https://avatars.githubusercontent.com/u/17648048?v=3","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dcos/dcos-ui","description":"The UI for The Datacenter Operating System","fork":false,"url":"https://api.github.com/repos/dcos/dcos-ui","forks_url":"https://api.github.com/repos/dcos/dcos-ui/forks","keys_url":"https://api.github.com/repos/dcos/dcos-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dcos/dcos-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dcos/dcos-ui/teams","hooks_url":"https://api.github.com/repos/dcos/dcos-ui/hooks","issue_events_url":"https://api.github.com/repos/dcos/dcos-ui/issues/events{/number}","events_url":"https://api.github.com/repos/dcos/dcos-ui/events","assignees_url":"https://api.github.com/repos/dcos/dcos-ui/assignees{/user}","branches_url":"https://api.github.com/repos/dcos/dcos-ui/branches{/branch}","tags_url":"https://api.github.com/repos/dcos/dcos-ui/tags","blobs_url":"https://api.github.com/repos/dcos/dcos-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dcos/dcos-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dcos/dcos-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/dcos/dcos-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dcos/dcos-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/dcos/dcos-ui/languages","stargazers_url":"https://api.github.com/repos/dcos/dcos-ui/stargazers","contributors_url":"https://api.github.com/repos/dcos/dcos-ui/contributors","subscribers_url":"https://api.github.com/repos/dcos/dcos-ui/subscribers","subscription_url":"https://api.github.com/repos/dcos/dcos-ui/subscription","commits_url":"https://api.github.com/repos/dcos/dcos-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/dcos/dcos-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/dcos/dcos-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/dcos/dcos-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/dcos/dcos-ui/contents/{+path}","compare_url":"https://api.github.com/repos/dcos/dcos-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dcos/dcos-ui/merges","archive_url":"https://api.github.com/repos/dcos/dcos-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dcos/dcos-ui/downloads","issues_url":"https://api.github.com/repos/dcos/dcos-ui/issues{/number}","pulls_url":"https://api.github.com/repos/dcos/dcos-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/dcos/dcos-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/dcos/dcos-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dcos/dcos-ui/labels{/name}","releases_url":"https://api.github.com/repos/dcos/dcos-ui/releases{/id}","deployments_url":"https://api.github.com/repos/dcos/dcos-ui/deployments","created_at":"2016-04-18T22:48:06Z","updated_at":"2016-07-30T02:04:41Z","pushed_at":"2016-08-03T13:33:47Z","git_url":"git://github.com/dcos/dcos-ui.git","ssh_url":"git@github.com:dcos/dcos-ui.git","clone_url":"https://github.com/dcos/dcos-ui.git","svn_url":"https://github.com/dcos/dcos-ui","homepage":null,"size":19079,"stargazers_count":89,"watchers_count":89,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":15,"forks":20,"open_issues":15,"watchers":89,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/903"},"html":{"href":"https://github.com/dcos/dcos-ui/pull/903"},"issue":{"href":"https://api.github.com/repos/dcos/dcos-ui/issues/903"},"comments":{"href":"https://api.github.com/repos/dcos/dcos-ui/issues/903/comments"},"review_comments":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/903/comments"},"review_comment":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/903/commits"},"statuses":{"href":"https://api.github.com/repos/dcos/dcos-ui/statuses/d733df0e6118c1a88c9b8365a1aac95307cb5cd3"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":0,"review_comments":0,"commits":7,"additions":87,"deletions":20,"changed_files":6}}
{"actor":{"display_login":"Poltergeist"}}