{"action":"created","comment":{"url":"https://api.github.com/repos/juju/juju-gui/pulls/comments/59791291","id":59791291,"diff_hunk":"@@ -45,13 +45,17 @@ YUI.add('app-renderer-extension', function(Y) {\n       // is rendered in the callback for generateSocketUrl because an env\n       // has not yet been created.\n       var env = this.env;\n-      if(!env ||\n-         env.findFacadeVersion('ModelManager') === null &&\n-         env.findFacadeVersion('EnvironmentManager') === null) {\n-        // We do not want to show the model switcher if it isn't supported as\n-        // it throws an error in the browser console and confuses the user\n-        // as it's visible but not functional.\n-        showEnvSwitcher = false;\n+      // If gisf is enabled then we won't be connected to a model to know\n+      // what facades are supported but we can reliably assume it'll be Juju 2\n+      // or higher which will support the necessary api calls.\n+      if (!this.get('gisf')) {\n+        if(!env || env.findFacadeVersion('ModelManager') === null &&\n+           env.findFacadeVersion('EnvironmentManager') === null) {\n+          // We do not want to show the model switcher if it isn't supported as\n+          // it throws an error in the browser console and confuses the user\n+          // as it's visible but not functional.\n+          showEnvSwitcher = false;","path":"jujugui/static/gui/src/app/extensions/app-renderer-extension.js","position":20,"original_position":20,"commit_id":"8584d9c92f53927f79804bac002f75c7389d24fe","original_commit_id":"8584d9c92f53927f79804bac002f75c7389d24fe","user":{"login":"bac","id":617845,"avatar_url":"https://avatars.githubusercontent.com/u/617845?v=3","gravatar_id":"","url":"https://api.github.com/users/bac","html_url":"https://github.com/bac","followers_url":"https://api.github.com/users/bac/followers","following_url":"https://api.github.com/users/bac/following{/other_user}","gists_url":"https://api.github.com/users/bac/gists{/gist_id}","starred_url":"https://api.github.com/users/bac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bac/subscriptions","organizations_url":"https://api.github.com/users/bac/orgs","repos_url":"https://api.github.com/users/bac/repos","events_url":"https://api.github.com/users/bac/events{/privacy}","received_events_url":"https://api.github.com/users/bac/received_events","type":"User","site_admin":false},"body":"thank you!","created_at":"2016-04-14T21:02:01Z","updated_at":"2016-04-14T21:02:01Z","html_url":"https://github.com/juju/juju-gui/pull/1557#discussion_r59791291","pull_request_url":"https://api.github.com/repos/juju/juju-gui/pulls/1557","_links":{"self":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/comments/59791291"},"html":{"href":"https://github.com/juju/juju-gui/pull/1557#discussion_r59791291"},"pull_request":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/1557"}}},"pull_request":{"url":"https://api.github.com/repos/juju/juju-gui/pulls/1557","id":66548426,"html_url":"https://github.com/juju/juju-gui/pull/1557","diff_url":"https://github.com/juju/juju-gui/pull/1557.diff","patch_url":"https://github.com/juju/juju-gui/pull/1557.patch","issue_url":"https://api.github.com/repos/juju/juju-gui/issues/1557","number":1557,"state":"open","locked":false,"title":"The breadcrumb should be shown in gisf mode","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":"The model switcher was not shown in gisf mode because there was no env and the supported facades has not yet been populated. This branch fixes that by skipping this facade check if the user is in gisf mode and displaying the breadcrumb.","created_at":"2016-04-14T20:28:39Z","updated_at":"2016-04-14T21:02:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eaa0bb232fc342af9bc40cb741f56fea06ef28e5","assignee":null,"milestone":{"url":"https://api.github.com/repos/juju/juju-gui/milestones/8","html_url":"https://github.com/juju/juju-gui/milestones/2.2.0","labels_url":"https://api.github.com/repos/juju/juju-gui/milestones/8/labels","id":1646049,"number":8,"title":"2.2.0","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":22,"closed_issues":27,"state":"open","created_at":"2016-03-15T16:39:15Z","updated_at":"2016-04-14T20:44:52Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/juju/juju-gui/pulls/1557/commits","review_comments_url":"https://api.github.com/repos/juju/juju-gui/pulls/1557/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/1557/comments","statuses_url":"https://api.github.com/repos/juju/juju-gui/statuses/8584d9c92f53927f79804bac002f75c7389d24fe","head":{"label":"hatched:fix-breadcrumb-onlogin","ref":"fix-breadcrumb-onlogin","sha":"8584d9c92f53927f79804bac002f75c7389d24fe","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-04-14T20:26:10Z","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":114184,"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":"f6993f197d7b321ba6a58da3d79e1dd467d4c4ed","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-04-12T05:23:27Z","pushed_at":"2016-04-14T20:28:40Z","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":118430,"stargazers_count":83,"watchers_count":83,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":50,"mirror_url":null,"open_issues_count":75,"forks":50,"open_issues":75,"watchers":83,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/1557"},"html":{"href":"https://github.com/juju/juju-gui/pull/1557"},"issue":{"href":"https://api.github.com/repos/juju/juju-gui/issues/1557"},"comments":{"href":"https://api.github.com/repos/juju/juju-gui/issues/1557/comments"},"review_comments":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/1557/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/1557/commits"},"statuses":{"href":"https://api.github.com/repos/juju/juju-gui/statuses/8584d9c92f53927f79804bac002f75c7389d24fe"}}}}