{"action":"closed","number":1978,"pull_request":{"url":"https://api.github.com/repos/spinnaker/deck/pulls/1978","id":59588260,"html_url":"https://github.com/spinnaker/deck/pull/1978","diff_url":"https://github.com/spinnaker/deck/pull/1978.diff","patch_url":"https://github.com/spinnaker/deck/pull/1978.patch","issue_url":"https://api.github.com/repos/spinnaker/deck/issues/1978","number":1978,"state":"closed","locked":false,"title":"rewrite application load/refresh handling","user":{"login":"anotherchrisberry","id":73450,"avatar_url":"https://avatars.githubusercontent.com/u/73450?v=3","gravatar_id":"","url":"https://api.github.com/users/anotherchrisberry","html_url":"https://github.com/anotherchrisberry","followers_url":"https://api.github.com/users/anotherchrisberry/followers","following_url":"https://api.github.com/users/anotherchrisberry/following{/other_user}","gists_url":"https://api.github.com/users/anotherchrisberry/gists{/gist_id}","starred_url":"https://api.github.com/users/anotherchrisberry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anotherchrisberry/subscriptions","organizations_url":"https://api.github.com/users/anotherchrisberry/orgs","repos_url":"https://api.github.com/users/anotherchrisberry/repos","events_url":"https://api.github.com/users/anotherchrisberry/events{/privacy}","received_events_url":"https://api.github.com/users/anotherchrisberry/received_events","type":"User","site_admin":false},"body":"Who doesn't like a 3k line pull request?\r\n\r\nI'm not pretending this is reviewable in any meaningful way, so I'll provide a summary of the changes, then ask @duftler , @lwander , @gregturn , @JargoonPard or someone from Azure to pull this down, kick the tires with the browser console open to see if any exceptions are being thrown.\r\n\r\nSo...\r\n\r\n## Summary of the changes\r\n_Load everything as fast as possible and render every view as fast as possible._ An application is made up of (basically) six data components:\r\n * server groups (aka clusters)\r\n * load balancers\r\n * security groups\r\n * pipeline executions\r\n * pipeline configurations\r\n * tasks\r\nIn its current state, the application must load the first four items before it will render anything on the screen. This is due to some decisions made long ago, where we needed to merge a bunch of separate calls to get our data in a presentable form. We've since smoothed over a lot of those problems by adjusting the responses we get from the backend. But we never fully refactored the application load: we still get those four components, then render the page. If the user is on the executions view, and those four components are still loading, the user won't see the executions, even if they are available. The same thing applies to the tasks view.\r\n\r\nThis PR breaks those components into separate buckets, with `rx.Subject`s for each one that consumers can subscribe to. I've also broken out separate buckets for `runningTasks` and `runningExecutions`, since those calls are generally very light and very fast, and it's not worth the headache of trying to manage their state based on which page the user is on (right now, we always fetch running tasks, unless the user switches to the tasks view, at which point we refresh and get all tasks). \r\n\r\nOverall, the code is a little easier to follow, and should be easier to maintain and adapt. Next step would be to get a grip on RxJS and do that part right, and make this pluggable so that, for example, the serverGroups module would register a section that the application reader would use to manage data. We need something like this for our fast properties module, and other integrators may want something similar.\r\n\r\nIn reality, this probably doesn't have any impact on users that have fewer than 1000 instances or 500 pipeline executions in any given application. For them, the UI is probably snappy.\r\n_However_, we have to handle cases where there are several thousand instances, and hundreds of pipeline executions, and we need to get those pixels on the screen faster than we are now. This should help quite a bit.\r\n","created_at":"2016-02-17T02:36:45Z","updated_at":"2016-02-17T18:37:13Z","closed_at":"2016-02-17T18:37:13Z","merged_at":"2016-02-17T18:37:13Z","merge_commit_sha":"754e1c46719de0fa662526526a9b501065b980cc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spinnaker/deck/pulls/1978/commits","review_comments_url":"https://api.github.com/repos/spinnaker/deck/pulls/1978/comments","review_comment_url":"https://api.github.com/repos/spinnaker/deck/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spinnaker/deck/issues/1978/comments","statuses_url":"https://api.github.com/repos/spinnaker/deck/statuses/3cf839c5bccbc16a2225d3b4db1cfeb0a0921025","head":{"label":"anotherchrisberry:app-load-refactor","ref":"app-load-refactor","sha":"3cf839c5bccbc16a2225d3b4db1cfeb0a0921025","user":{"login":"anotherchrisberry","id":73450,"avatar_url":"https://avatars.githubusercontent.com/u/73450?v=3","gravatar_id":"","url":"https://api.github.com/users/anotherchrisberry","html_url":"https://github.com/anotherchrisberry","followers_url":"https://api.github.com/users/anotherchrisberry/followers","following_url":"https://api.github.com/users/anotherchrisberry/following{/other_user}","gists_url":"https://api.github.com/users/anotherchrisberry/gists{/gist_id}","starred_url":"https://api.github.com/users/anotherchrisberry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anotherchrisberry/subscriptions","organizations_url":"https://api.github.com/users/anotherchrisberry/orgs","repos_url":"https://api.github.com/users/anotherchrisberry/repos","events_url":"https://api.github.com/users/anotherchrisberry/events{/privacy}","received_events_url":"https://api.github.com/users/anotherchrisberry/received_events","type":"User","site_admin":false},"repo":{"id":46325253,"name":"deck","full_name":"anotherchrisberry/deck","owner":{"login":"anotherchrisberry","id":73450,"avatar_url":"https://avatars.githubusercontent.com/u/73450?v=3","gravatar_id":"","url":"https://api.github.com/users/anotherchrisberry","html_url":"https://github.com/anotherchrisberry","followers_url":"https://api.github.com/users/anotherchrisberry/followers","following_url":"https://api.github.com/users/anotherchrisberry/following{/other_user}","gists_url":"https://api.github.com/users/anotherchrisberry/gists{/gist_id}","starred_url":"https://api.github.com/users/anotherchrisberry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anotherchrisberry/subscriptions","organizations_url":"https://api.github.com/users/anotherchrisberry/orgs","repos_url":"https://api.github.com/users/anotherchrisberry/repos","events_url":"https://api.github.com/users/anotherchrisberry/events{/privacy}","received_events_url":"https://api.github.com/users/anotherchrisberry/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anotherchrisberry/deck","description":"New and improved management UI","fork":true,"url":"https://api.github.com/repos/anotherchrisberry/deck","forks_url":"https://api.github.com/repos/anotherchrisberry/deck/forks","keys_url":"https://api.github.com/repos/anotherchrisberry/deck/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anotherchrisberry/deck/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anotherchrisberry/deck/teams","hooks_url":"https://api.github.com/repos/anotherchrisberry/deck/hooks","issue_events_url":"https://api.github.com/repos/anotherchrisberry/deck/issues/events{/number}","events_url":"https://api.github.com/repos/anotherchrisberry/deck/events","assignees_url":"https://api.github.com/repos/anotherchrisberry/deck/assignees{/user}","branches_url":"https://api.github.com/repos/anotherchrisberry/deck/branches{/branch}","tags_url":"https://api.github.com/repos/anotherchrisberry/deck/tags","blobs_url":"https://api.github.com/repos/anotherchrisberry/deck/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anotherchrisberry/deck/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anotherchrisberry/deck/git/refs{/sha}","trees_url":"https://api.github.com/repos/anotherchrisberry/deck/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anotherchrisberry/deck/statuses/{sha}","languages_url":"https://api.github.com/repos/anotherchrisberry/deck/languages","stargazers_url":"https://api.github.com/repos/anotherchrisberry/deck/stargazers","contributors_url":"https://api.github.com/repos/anotherchrisberry/deck/contributors","subscribers_url":"https://api.github.com/repos/anotherchrisberry/deck/subscribers","subscription_url":"https://api.github.com/repos/anotherchrisberry/deck/subscription","commits_url":"https://api.github.com/repos/anotherchrisberry/deck/commits{/sha}","git_commits_url":"https://api.github.com/repos/anotherchrisberry/deck/git/commits{/sha}","comments_url":"https://api.github.com/repos/anotherchrisberry/deck/comments{/number}","issue_comment_url":"https://api.github.com/repos/anotherchrisberry/deck/issues/comments{/number}","contents_url":"https://api.github.com/repos/anotherchrisberry/deck/contents/{+path}","compare_url":"https://api.github.com/repos/anotherchrisberry/deck/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anotherchrisberry/deck/merges","archive_url":"https://api.github.com/repos/anotherchrisberry/deck/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anotherchrisberry/deck/downloads","issues_url":"https://api.github.com/repos/anotherchrisberry/deck/issues{/number}","pulls_url":"https://api.github.com/repos/anotherchrisberry/deck/pulls{/number}","milestones_url":"https://api.github.com/repos/anotherchrisberry/deck/milestones{/number}","notifications_url":"https://api.github.com/repos/anotherchrisberry/deck/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anotherchrisberry/deck/labels{/name}","releases_url":"https://api.github.com/repos/anotherchrisberry/deck/releases{/id}","deployments_url":"https://api.github.com/repos/anotherchrisberry/deck/deployments","created_at":"2015-11-17T05:27:30Z","updated_at":"2016-01-12T06:40:01Z","pushed_at":"2016-02-17T18:19:08Z","git_url":"git://github.com/anotherchrisberry/deck.git","ssh_url":"git@github.com:anotherchrisberry/deck.git","clone_url":"https://github.com/anotherchrisberry/deck.git","svn_url":"https://github.com/anotherchrisberry/deck","homepage":null,"size":22176,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"spinnaker:master","ref":"master","sha":"e7f7442950c45967f328d794a6fc282083f0e4d5","user":{"login":"spinnaker","id":7634182,"avatar_url":"https://avatars.githubusercontent.com/u/7634182?v=3","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"repo":{"id":21953642,"name":"deck","full_name":"spinnaker/deck","owner":{"login":"spinnaker","id":7634182,"avatar_url":"https://avatars.githubusercontent.com/u/7634182?v=3","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spinnaker/deck","description":"Management UI for Spinnaker","fork":false,"url":"https://api.github.com/repos/spinnaker/deck","forks_url":"https://api.github.com/repos/spinnaker/deck/forks","keys_url":"https://api.github.com/repos/spinnaker/deck/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spinnaker/deck/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spinnaker/deck/teams","hooks_url":"https://api.github.com/repos/spinnaker/deck/hooks","issue_events_url":"https://api.github.com/repos/spinnaker/deck/issues/events{/number}","events_url":"https://api.github.com/repos/spinnaker/deck/events","assignees_url":"https://api.github.com/repos/spinnaker/deck/assignees{/user}","branches_url":"https://api.github.com/repos/spinnaker/deck/branches{/branch}","tags_url":"https://api.github.com/repos/spinnaker/deck/tags","blobs_url":"https://api.github.com/repos/spinnaker/deck/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spinnaker/deck/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spinnaker/deck/git/refs{/sha}","trees_url":"https://api.github.com/repos/spinnaker/deck/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spinnaker/deck/statuses/{sha}","languages_url":"https://api.github.com/repos/spinnaker/deck/languages","stargazers_url":"https://api.github.com/repos/spinnaker/deck/stargazers","contributors_url":"https://api.github.com/repos/spinnaker/deck/contributors","subscribers_url":"https://api.github.com/repos/spinnaker/deck/subscribers","subscription_url":"https://api.github.com/repos/spinnaker/deck/subscription","commits_url":"https://api.github.com/repos/spinnaker/deck/commits{/sha}","git_commits_url":"https://api.github.com/repos/spinnaker/deck/git/commits{/sha}","comments_url":"https://api.github.com/repos/spinnaker/deck/comments{/number}","issue_comment_url":"https://api.github.com/repos/spinnaker/deck/issues/comments{/number}","contents_url":"https://api.github.com/repos/spinnaker/deck/contents/{+path}","compare_url":"https://api.github.com/repos/spinnaker/deck/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spinnaker/deck/merges","archive_url":"https://api.github.com/repos/spinnaker/deck/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spinnaker/deck/downloads","issues_url":"https://api.github.com/repos/spinnaker/deck/issues{/number}","pulls_url":"https://api.github.com/repos/spinnaker/deck/pulls{/number}","milestones_url":"https://api.github.com/repos/spinnaker/deck/milestones{/number}","notifications_url":"https://api.github.com/repos/spinnaker/deck/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spinnaker/deck/labels{/name}","releases_url":"https://api.github.com/repos/spinnaker/deck/releases{/id}","deployments_url":"https://api.github.com/repos/spinnaker/deck/deployments","created_at":"2014-07-17T18:51:00Z","updated_at":"2016-02-16T19:36:47Z","pushed_at":"2016-02-17T18:37:13Z","git_url":"git://github.com/spinnaker/deck.git","ssh_url":"git@github.com:spinnaker/deck.git","clone_url":"https://github.com/spinnaker/deck.git","svn_url":"https://github.com/spinnaker/deck","homepage":"","size":29283,"stargazers_count":26,"watchers_count":26,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":3,"forks":42,"open_issues":3,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spinnaker/deck/pulls/1978"},"html":{"href":"https://github.com/spinnaker/deck/pull/1978"},"issue":{"href":"https://api.github.com/repos/spinnaker/deck/issues/1978"},"comments":{"href":"https://api.github.com/repos/spinnaker/deck/issues/1978/comments"},"review_comments":{"href":"https://api.github.com/repos/spinnaker/deck/pulls/1978/comments"},"review_comment":{"href":"https://api.github.com/repos/spinnaker/deck/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spinnaker/deck/pulls/1978/commits"},"statuses":{"href":"https://api.github.com/repos/spinnaker/deck/statuses/3cf839c5bccbc16a2225d3b4db1cfeb0a0921025"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"anotherchrisberry","id":73450,"avatar_url":"https://avatars.githubusercontent.com/u/73450?v=3","gravatar_id":"","url":"https://api.github.com/users/anotherchrisberry","html_url":"https://github.com/anotherchrisberry","followers_url":"https://api.github.com/users/anotherchrisberry/followers","following_url":"https://api.github.com/users/anotherchrisberry/following{/other_user}","gists_url":"https://api.github.com/users/anotherchrisberry/gists{/gist_id}","starred_url":"https://api.github.com/users/anotherchrisberry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anotherchrisberry/subscriptions","organizations_url":"https://api.github.com/users/anotherchrisberry/orgs","repos_url":"https://api.github.com/users/anotherchrisberry/repos","events_url":"https://api.github.com/users/anotherchrisberry/events{/privacy}","received_events_url":"https://api.github.com/users/anotherchrisberry/received_events","type":"User","site_admin":false},"comments":5,"review_comments":0,"commits":1,"additions":1401,"deletions":1470,"changed_files":117}}