{"action":"created","comment":{"url":"https://api.github.com/repos/juju/juju-gui/pulls/comments/56305208","id":56305208,"diff_hunk":"@@ -110,6 +110,76 @@ YUI.add('juju-delta-handlers', function(Y) {\n         result.tags = tags.join(',');\n       }\n       return result;\n+    },\n+\n+    /**\n+      Translates the new JujuStatus and WorkloadStatus's to the legacy Juju 1\n+      values.\n+\n+      This logic is a JS implementation of the Juju core implementation to\n+      accomplish the same task:\n+      https://github.com/\n+        juju/juju/blob/juju-1.26-alpha1/state/status_model.go#L272\n+\n+      @method translateToLegacyAgentState\n+      @param {String} agentStatus JujuStatus.Current\n+      @param {String} workloadStatus WorkloadStatus.Current\n+      @param {String} workloadStatusMessage WorkloadStatus.Message\n+    */\n+    translateToLegacyAgentState: function(\n+      agentStatus, workloadStatus, workloadStatusMessage) {","path":"jujugui/static/gui/src/app/models/handlers.js","position":21,"original_position":21,"commit_id":"a8fec0bc9f0e4224e502ea79b3dc31d8ab5cc7de","original_commit_id":"a8fec0bc9f0e4224e502ea79b3dc31d8ab5cc7de","user":{"login":"frankban","id":1408172,"avatar_url":"https://avatars.githubusercontent.com/u/1408172?v=3","gravatar_id":"","url":"https://api.github.com/users/frankban","html_url":"https://github.com/frankban","followers_url":"https://api.github.com/users/frankban/followers","following_url":"https://api.github.com/users/frankban/following{/other_user}","gists_url":"https://api.github.com/users/frankban/gists{/gist_id}","starred_url":"https://api.github.com/users/frankban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frankban/subscriptions","organizations_url":"https://api.github.com/users/frankban/orgs","repos_url":"https://api.github.com/users/frankban/repos","events_url":"https://api.github.com/users/frankban/events{/privacy}","received_events_url":"https://api.github.com/users/frankban/received_events","type":"User","site_admin":false},"body":"s/agentStatus/currentStatus/ ?","created_at":"2016-03-16T09:44:04Z","updated_at":"2016-03-16T09:44:04Z","html_url":"https://github.com/juju/juju-gui/pull/1474#discussion_r56305208","pull_request_url":"https://api.github.com/repos/juju/juju-gui/pulls/1474","_links":{"self":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/comments/56305208"},"html":{"href":"https://github.com/juju/juju-gui/pull/1474#discussion_r56305208"},"pull_request":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/1474"}}},"pull_request":{"url":"https://api.github.com/repos/juju/juju-gui/pulls/1474","id":63011440,"html_url":"https://github.com/juju/juju-gui/pull/1474","diff_url":"https://github.com/juju/juju-gui/pull/1474.diff","patch_url":"https://github.com/juju/juju-gui/pull/1474.patch","issue_url":"https://api.github.com/repos/juju/juju-gui/issues/1474","number":1474,"state":"open","locked":false,"title":"Add Juju 2.0 support for the new unit delta structure","user":{"login":"hatched","id":532033,"avatar_url":"https://avatars.githubusercontent.com/u/532033?v=3","gravatar_id":"","url":"https://api.github.com/users/hatched","html_url":"https://github.com/hatched","followers_url":"https://api.github.com/users/hatched/followers","following_url":"https://api.github.com/users/hatched/following{/other_user}","gists_url":"https://api.github.com/users/hatched/gists{/gist_id}","starred_url":"https://api.github.com/users/hatched/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hatched/subscriptions","organizations_url":"https://api.github.com/users/hatched/orgs","repos_url":"https://api.github.com/users/hatched/repos","events_url":"https://api.github.com/users/hatched/events{/privacy}","received_events_url":"https://api.github.com/users/hatched/received_events","type":"User","site_admin":false},"body":"Juju 2.0 beta 3 has a modified version of the unit delta. This branch adds support for that new delta format by munging it back into the old format. We'll have to revisit this later to set the Juju 2.0 deltas as the default structure.","created_at":"2016-03-16T04:02:51Z","updated_at":"2016-03-16T09:44:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de8d27c836b0744f68bfb0ef1ac97a868d9160c1","assignee":null,"milestone":{"url":"https://api.github.com/repos/juju/juju-gui/milestones/7","html_url":"https://github.com/juju/juju-gui/milestones/2.1.1","labels_url":"https://api.github.com/repos/juju/juju-gui/milestones/7/labels","id":1597600,"number":7,"title":"2.1.1","description":"","creator":{"login":"hatched","id":532033,"avatar_url":"https://avatars.githubusercontent.com/u/532033?v=3","gravatar_id":"","url":"https://api.github.com/users/hatched","html_url":"https://github.com/hatched","followers_url":"https://api.github.com/users/hatched/followers","following_url":"https://api.github.com/users/hatched/following{/other_user}","gists_url":"https://api.github.com/users/hatched/gists{/gist_id}","starred_url":"https://api.github.com/users/hatched/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hatched/subscriptions","organizations_url":"https://api.github.com/users/hatched/orgs","repos_url":"https://api.github.com/users/hatched/repos","events_url":"https://api.github.com/users/hatched/events{/privacy}","received_events_url":"https://api.github.com/users/hatched/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":8,"state":"open","created_at":"2016-02-22T17:03:23Z","updated_at":"2016-03-16T04:02:51Z","due_on":"2016-03-17T06:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/juju/juju-gui/pulls/1474/commits","review_comments_url":"https://api.github.com/repos/juju/juju-gui/pulls/1474/comments","review_comment_url":"https://api.github.com/repos/juju/juju-gui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/juju/juju-gui/issues/1474/comments","statuses_url":"https://api.github.com/repos/juju/juju-gui/statuses/a8fec0bc9f0e4224e502ea79b3dc31d8ab5cc7de","head":{"label":"hatched:beta3-megawatcher","ref":"beta3-megawatcher","sha":"a8fec0bc9f0e4224e502ea79b3dc31d8ab5cc7de","user":{"login":"hatched","id":532033,"avatar_url":"https://avatars.githubusercontent.com/u/532033?v=3","gravatar_id":"","url":"https://api.github.com/users/hatched","html_url":"https://github.com/hatched","followers_url":"https://api.github.com/users/hatched/followers","following_url":"https://api.github.com/users/hatched/following{/other_user}","gists_url":"https://api.github.com/users/hatched/gists{/gist_id}","starred_url":"https://api.github.com/users/hatched/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hatched/subscriptions","organizations_url":"https://api.github.com/users/hatched/orgs","repos_url":"https://api.github.com/users/hatched/repos","events_url":"https://api.github.com/users/hatched/events{/privacy}","received_events_url":"https://api.github.com/users/hatched/received_events","type":"User","site_admin":false},"repo":{"id":14962756,"name":"juju-gui","full_name":"hatched/juju-gui","owner":{"login":"hatched","id":532033,"avatar_url":"https://avatars.githubusercontent.com/u/532033?v=3","gravatar_id":"","url":"https://api.github.com/users/hatched","html_url":"https://github.com/hatched","followers_url":"https://api.github.com/users/hatched/followers","following_url":"https://api.github.com/users/hatched/following{/other_user}","gists_url":"https://api.github.com/users/hatched/gists{/gist_id}","starred_url":"https://api.github.com/users/hatched/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hatched/subscriptions","organizations_url":"https://api.github.com/users/hatched/orgs","repos_url":"https://api.github.com/users/hatched/repos","events_url":"https://api.github.com/users/hatched/events{/privacy}","received_events_url":"https://api.github.com/users/hatched/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hatched/juju-gui","description":"Juju-GUI is a web-based GUI for Juju <https://juju.ubuntu.com/>.","fork":true,"url":"https://api.github.com/repos/hatched/juju-gui","forks_url":"https://api.github.com/repos/hatched/juju-gui/forks","keys_url":"https://api.github.com/repos/hatched/juju-gui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hatched/juju-gui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hatched/juju-gui/teams","hooks_url":"https://api.github.com/repos/hatched/juju-gui/hooks","issue_events_url":"https://api.github.com/repos/hatched/juju-gui/issues/events{/number}","events_url":"https://api.github.com/repos/hatched/juju-gui/events","assignees_url":"https://api.github.com/repos/hatched/juju-gui/assignees{/user}","branches_url":"https://api.github.com/repos/hatched/juju-gui/branches{/branch}","tags_url":"https://api.github.com/repos/hatched/juju-gui/tags","blobs_url":"https://api.github.com/repos/hatched/juju-gui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hatched/juju-gui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hatched/juju-gui/git/refs{/sha}","trees_url":"https://api.github.com/repos/hatched/juju-gui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hatched/juju-gui/statuses/{sha}","languages_url":"https://api.github.com/repos/hatched/juju-gui/languages","stargazers_url":"https://api.github.com/repos/hatched/juju-gui/stargazers","contributors_url":"https://api.github.com/repos/hatched/juju-gui/contributors","subscribers_url":"https://api.github.com/repos/hatched/juju-gui/subscribers","subscription_url":"https://api.github.com/repos/hatched/juju-gui/subscription","commits_url":"https://api.github.com/repos/hatched/juju-gui/commits{/sha}","git_commits_url":"https://api.github.com/repos/hatched/juju-gui/git/commits{/sha}","comments_url":"https://api.github.com/repos/hatched/juju-gui/comments{/number}","issue_comment_url":"https://api.github.com/repos/hatched/juju-gui/issues/comments{/number}","contents_url":"https://api.github.com/repos/hatched/juju-gui/contents/{+path}","compare_url":"https://api.github.com/repos/hatched/juju-gui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hatched/juju-gui/merges","archive_url":"https://api.github.com/repos/hatched/juju-gui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hatched/juju-gui/downloads","issues_url":"https://api.github.com/repos/hatched/juju-gui/issues{/number}","pulls_url":"https://api.github.com/repos/hatched/juju-gui/pulls{/number}","milestones_url":"https://api.github.com/repos/hatched/juju-gui/milestones{/number}","notifications_url":"https://api.github.com/repos/hatched/juju-gui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hatched/juju-gui/labels{/name}","releases_url":"https://api.github.com/repos/hatched/juju-gui/releases{/id}","deployments_url":"https://api.github.com/repos/hatched/juju-gui/deployments","created_at":"2013-12-05T18:57:16Z","updated_at":"2015-03-19T15:41:36Z","pushed_at":"2016-03-16T04:01:06Z","git_url":"git://github.com/hatched/juju-gui.git","ssh_url":"git@github.com:hatched/juju-gui.git","clone_url":"https://github.com/hatched/juju-gui.git","svn_url":"https://github.com/hatched/juju-gui","homepage":null,"size":113704,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"juju:develop","ref":"develop","sha":"019b2c115d6fcfe07afc9eb4e9d392cff1dc0d5d","user":{"login":"juju","id":4604548,"avatar_url":"https://avatars.githubusercontent.com/u/4604548?v=3","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"repo":{"id":14960387,"name":"juju-gui","full_name":"juju/juju-gui","owner":{"login":"juju","id":4604548,"avatar_url":"https://avatars.githubusercontent.com/u/4604548?v=3","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/juju/juju-gui","description":"Juju-GUI is a web-based GUI for Juju <https://jujucharms.com/>.","fork":false,"url":"https://api.github.com/repos/juju/juju-gui","forks_url":"https://api.github.com/repos/juju/juju-gui/forks","keys_url":"https://api.github.com/repos/juju/juju-gui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juju/juju-gui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juju/juju-gui/teams","hooks_url":"https://api.github.com/repos/juju/juju-gui/hooks","issue_events_url":"https://api.github.com/repos/juju/juju-gui/issues/events{/number}","events_url":"https://api.github.com/repos/juju/juju-gui/events","assignees_url":"https://api.github.com/repos/juju/juju-gui/assignees{/user}","branches_url":"https://api.github.com/repos/juju/juju-gui/branches{/branch}","tags_url":"https://api.github.com/repos/juju/juju-gui/tags","blobs_url":"https://api.github.com/repos/juju/juju-gui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juju/juju-gui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juju/juju-gui/git/refs{/sha}","trees_url":"https://api.github.com/repos/juju/juju-gui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juju/juju-gui/statuses/{sha}","languages_url":"https://api.github.com/repos/juju/juju-gui/languages","stargazers_url":"https://api.github.com/repos/juju/juju-gui/stargazers","contributors_url":"https://api.github.com/repos/juju/juju-gui/contributors","subscribers_url":"https://api.github.com/repos/juju/juju-gui/subscribers","subscription_url":"https://api.github.com/repos/juju/juju-gui/subscription","commits_url":"https://api.github.com/repos/juju/juju-gui/commits{/sha}","git_commits_url":"https://api.github.com/repos/juju/juju-gui/git/commits{/sha}","comments_url":"https://api.github.com/repos/juju/juju-gui/comments{/number}","issue_comment_url":"https://api.github.com/repos/juju/juju-gui/issues/comments{/number}","contents_url":"https://api.github.com/repos/juju/juju-gui/contents/{+path}","compare_url":"https://api.github.com/repos/juju/juju-gui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juju/juju-gui/merges","archive_url":"https://api.github.com/repos/juju/juju-gui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juju/juju-gui/downloads","issues_url":"https://api.github.com/repos/juju/juju-gui/issues{/number}","pulls_url":"https://api.github.com/repos/juju/juju-gui/pulls{/number}","milestones_url":"https://api.github.com/repos/juju/juju-gui/milestones{/number}","notifications_url":"https://api.github.com/repos/juju/juju-gui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juju/juju-gui/labels{/name}","releases_url":"https://api.github.com/repos/juju/juju-gui/releases{/id}","deployments_url":"https://api.github.com/repos/juju/juju-gui/deployments","created_at":"2013-12-05T17:15:48Z","updated_at":"2016-03-11T19:06:42Z","pushed_at":"2016-03-16T04:02:51Z","git_url":"git://github.com/juju/juju-gui.git","ssh_url":"git@github.com:juju/juju-gui.git","clone_url":"https://github.com/juju/juju-gui.git","svn_url":"https://github.com/juju/juju-gui","homepage":"","size":117465,"stargazers_count":79,"watchers_count":79,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":49,"mirror_url":null,"open_issues_count":56,"forks":49,"open_issues":56,"watchers":79,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/1474"},"html":{"href":"https://github.com/juju/juju-gui/pull/1474"},"issue":{"href":"https://api.github.com/repos/juju/juju-gui/issues/1474"},"comments":{"href":"https://api.github.com/repos/juju/juju-gui/issues/1474/comments"},"review_comments":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/1474/comments"},"review_comment":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/1474/commits"},"statuses":{"href":"https://api.github.com/repos/juju/juju-gui/statuses/a8fec0bc9f0e4224e502ea79b3dc31d8ab5cc7de"}}}}