{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/30363465","id":30363465,"diff_hunk":"@@ -0,0 +1,103 @@\n+'use strict';\n+\n+/**\n+ * @ngdoc function\n+ * @name openshiftConsoleExtensions.extension:JavaLinkController\n+ * @description\n+ * # ProjectController\n+ * Controller of the openshiftConsole\n+ */\n+angular.module('openshiftConsoleExtensions', ['openshiftConsole'])\n+\t.factory(\"JavaLinkUtils\", function() {\n+\t\tvar self = {\n+\t\t\tjoin: function() {\n+        var paths = arguments;\n+\t\t    var tmp = [];\n+\t\t    var length = paths.length - 1;\n+\t\t    _.forEach(paths, function (path, index) {\n+\t\t      if (!path || path === \"\" || !angular.isString(path)) {\n+\t\t        return;\n+\t\t      }\n+\t\t      if (index !== 0 && _.startsWith(path, '/')) {\n+\t\t        path = path.slice(1);\n+\t\t      }\n+\t\t      if (index !== length && _.endsWith(path, '/')) {\n+\t\t        path = path.slice(0, path.length - 1);\n+\t\t      }\n+\t\t      if (path.length > 0) {\n+\t\t        tmp.push(path);\n+\t\t      }\n+\t\t    });\n+\t\t    var rc = tmp.join('/');\n+\t\t    return rc;\n+\t\t\t},\n+\t\t\tfindParentWith: function($scope, attribute) {\n+\t\t    if (attribute in $scope) {\n+\t\t      return $scope;\n+\t\t    }\n+\t\t    if (!$scope.$parent) {\n+\t\t      return null;\n+\t\t    }\n+\t\t    // let's go up the scope tree\n+\t\t    return self.findParentWith($scope.$parent, attribute);\n+\t\t\t}\n+\t\t};\n+\t\treturn self;\n+\t})\n+  .factory(\"ProxyPod\", function(API_CFG, JavaLinkUtils) {\n+    return function(namespace, podId, port) {\n+      var kubeProxyURI = new URI(window.location.protocol + '//' + API_CFG.k8s.hostPort + API_CFG.k8s.prefix);\n+      var apiVersion = API_CFG.k8s.version || 'v1beta3';\n+      if (port) {\n+        podId = podId + ':' + port;\n+      }\n+      kubeProxyURI.path(JavaLinkUtils.join(kubeProxyURI.path(), apiVersion, 'proxy/namespaces', namespace, 'pods', podId));\n+      return kubeProxyURI.toString();\n+    };\n+  })\n+  .run(function(ProxyPod, BaseHref, JavaLinkUtils, HawtioExtension, $templateCache, $compile) {\n+    var template =\n+'<span ng-show=\"jolokiaUrl\" title=\"View java details\">' +\n+'  <a ng-click=\"gotoContainerView($event, container, jolokiaUrl)\" ng-href=\"jolokiaUrl\">' +\n+'    <i class=\"fa fa-external-link\"></i>' +\n+'  </a>' +\n+'</span>';\n+    HawtioExtension.add('container-links', function ($scope) {\n+\t\t\tvar container = $scope.container;\n+\t\t\tif (!container) {\n+\t\t\t\treturn;\n+\t\t\t}\n+      var jolokiaPort = _.find((container.ports || []), function(port) {","path":"assets/app/scripts/extensions/javaLink.js","position":70,"original_position":70,"commit_id":"70cdd65d22cf6cec2588108f9e921c7a8cb647b4","original_commit_id":"70cdd65d22cf6cec2588108f9e921c7a8cb647b4","user":{"login":"liggitt","id":980082,"avatar_url":"https://avatars.githubusercontent.com/u/980082?v=3","gravatar_id":"","url":"https://api.github.com/users/liggitt","html_url":"https://github.com/liggitt","followers_url":"https://api.github.com/users/liggitt/followers","following_url":"https://api.github.com/users/liggitt/following{/other_user}","gists_url":"https://api.github.com/users/liggitt/gists{/gist_id}","starred_url":"https://api.github.com/users/liggitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liggitt/subscriptions","organizations_url":"https://api.github.com/users/liggitt/orgs","repos_url":"https://api.github.com/users/liggitt/repos","events_url":"https://api.github.com/users/liggitt/events{/privacy}","received_events_url":"https://api.github.com/users/liggitt/received_events","type":"User","site_admin":false},"body":"is `_` an alias for `angular`?","created_at":"2015-05-14T21:11:20Z","updated_at":"2015-05-14T21:11:20Z","html_url":"https://github.com/openshift/origin/pull/2054#discussion_r30363465","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/2054","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/30363465"},"html":{"href":"https://github.com/openshift/origin/pull/2054#discussion_r30363465"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/2054"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/2054","id":34652267,"html_url":"https://github.com/openshift/origin/pull/2054","diff_url":"https://github.com/openshift/origin/pull/2054.diff","patch_url":"https://github.com/openshift/origin/pull/2054.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/2054","number":2054,"state":"open","locked":false,"title":"Add connect link to pod list for pods that expose jolokia port","user":{"login":"gashcrumb","id":351660,"avatar_url":"https://avatars.githubusercontent.com/u/351660?v=3","gravatar_id":"","url":"https://api.github.com/users/gashcrumb","html_url":"https://github.com/gashcrumb","followers_url":"https://api.github.com/users/gashcrumb/followers","following_url":"https://api.github.com/users/gashcrumb/following{/other_user}","gists_url":"https://api.github.com/users/gashcrumb/gists{/gist_id}","starred_url":"https://api.github.com/users/gashcrumb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gashcrumb/subscriptions","organizations_url":"https://api.github.com/users/gashcrumb/orgs","repos_url":"https://api.github.com/users/gashcrumb/repos","events_url":"https://api.github.com/users/gashcrumb/events{/privacy}","received_events_url":"https://api.github.com/users/gashcrumb/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-04T16:34:07Z","updated_at":"2015-05-14T21:11:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed9b96023d630cc0b5bf8e77b832e5c3910e536e","assignee":{"login":"liggitt","id":980082,"avatar_url":"https://avatars.githubusercontent.com/u/980082?v=3","gravatar_id":"","url":"https://api.github.com/users/liggitt","html_url":"https://github.com/liggitt","followers_url":"https://api.github.com/users/liggitt/followers","following_url":"https://api.github.com/users/liggitt/following{/other_user}","gists_url":"https://api.github.com/users/liggitt/gists{/gist_id}","starred_url":"https://api.github.com/users/liggitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liggitt/subscriptions","organizations_url":"https://api.github.com/users/liggitt/orgs","repos_url":"https://api.github.com/users/liggitt/repos","events_url":"https://api.github.com/users/liggitt/events{/privacy}","received_events_url":"https://api.github.com/users/liggitt/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/2054/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/2054/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/2054/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/70cdd65d22cf6cec2588108f9e921c7a8cb647b4","head":{"label":"gashcrumb:add-console-link","ref":"add-console-link","sha":"70cdd65d22cf6cec2588108f9e921c7a8cb647b4","user":{"login":"gashcrumb","id":351660,"avatar_url":"https://avatars.githubusercontent.com/u/351660?v=3","gravatar_id":"","url":"https://api.github.com/users/gashcrumb","html_url":"https://github.com/gashcrumb","followers_url":"https://api.github.com/users/gashcrumb/followers","following_url":"https://api.github.com/users/gashcrumb/following{/other_user}","gists_url":"https://api.github.com/users/gashcrumb/gists{/gist_id}","starred_url":"https://api.github.com/users/gashcrumb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gashcrumb/subscriptions","organizations_url":"https://api.github.com/users/gashcrumb/orgs","repos_url":"https://api.github.com/users/gashcrumb/repos","events_url":"https://api.github.com/users/gashcrumb/events{/privacy}","received_events_url":"https://api.github.com/users/gashcrumb/received_events","type":"User","site_admin":false},"repo":{"id":26607697,"name":"origin","full_name":"gashcrumb/origin","owner":{"login":"gashcrumb","id":351660,"avatar_url":"https://avatars.githubusercontent.com/u/351660?v=3","gravatar_id":"","url":"https://api.github.com/users/gashcrumb","html_url":"https://github.com/gashcrumb","followers_url":"https://api.github.com/users/gashcrumb/followers","following_url":"https://api.github.com/users/gashcrumb/following{/other_user}","gists_url":"https://api.github.com/users/gashcrumb/gists{/gist_id}","starred_url":"https://api.github.com/users/gashcrumb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gashcrumb/subscriptions","organizations_url":"https://api.github.com/users/gashcrumb/orgs","repos_url":"https://api.github.com/users/gashcrumb/repos","events_url":"https://api.github.com/users/gashcrumb/events{/privacy}","received_events_url":"https://api.github.com/users/gashcrumb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gashcrumb/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/gashcrumb/origin","forks_url":"https://api.github.com/repos/gashcrumb/origin/forks","keys_url":"https://api.github.com/repos/gashcrumb/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gashcrumb/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gashcrumb/origin/teams","hooks_url":"https://api.github.com/repos/gashcrumb/origin/hooks","issue_events_url":"https://api.github.com/repos/gashcrumb/origin/issues/events{/number}","events_url":"https://api.github.com/repos/gashcrumb/origin/events","assignees_url":"https://api.github.com/repos/gashcrumb/origin/assignees{/user}","branches_url":"https://api.github.com/repos/gashcrumb/origin/branches{/branch}","tags_url":"https://api.github.com/repos/gashcrumb/origin/tags","blobs_url":"https://api.github.com/repos/gashcrumb/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gashcrumb/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gashcrumb/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/gashcrumb/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gashcrumb/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/gashcrumb/origin/languages","stargazers_url":"https://api.github.com/repos/gashcrumb/origin/stargazers","contributors_url":"https://api.github.com/repos/gashcrumb/origin/contributors","subscribers_url":"https://api.github.com/repos/gashcrumb/origin/subscribers","subscription_url":"https://api.github.com/repos/gashcrumb/origin/subscription","commits_url":"https://api.github.com/repos/gashcrumb/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/gashcrumb/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/gashcrumb/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/gashcrumb/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/gashcrumb/origin/contents/{+path}","compare_url":"https://api.github.com/repos/gashcrumb/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gashcrumb/origin/merges","archive_url":"https://api.github.com/repos/gashcrumb/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gashcrumb/origin/downloads","issues_url":"https://api.github.com/repos/gashcrumb/origin/issues{/number}","pulls_url":"https://api.github.com/repos/gashcrumb/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/gashcrumb/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/gashcrumb/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gashcrumb/origin/labels{/name}","releases_url":"https://api.github.com/repos/gashcrumb/origin/releases{/id}","created_at":"2014-11-13T20:57:25Z","updated_at":"2015-05-06T12:52:48Z","pushed_at":"2015-05-14T15:23:19Z","git_url":"git://github.com/gashcrumb/origin.git","ssh_url":"git@github.com:gashcrumb/origin.git","clone_url":"https://github.com/gashcrumb/origin.git","svn_url":"https://github.com/gashcrumb/origin","homepage":"https://openshift.github.io","size":110176,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"openshift:master","ref":"master","sha":"0189d1eee2ff2f22fb56d03c4fb07021704cb438","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":22442668,"name":"origin","full_name":"openshift/origin","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":false,"url":"https://api.github.com/repos/openshift/origin","forks_url":"https://api.github.com/repos/openshift/origin/forks","keys_url":"https://api.github.com/repos/openshift/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/origin/teams","hooks_url":"https://api.github.com/repos/openshift/origin/hooks","issue_events_url":"https://api.github.com/repos/openshift/origin/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/origin/events","assignees_url":"https://api.github.com/repos/openshift/origin/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/origin/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/origin/tags","blobs_url":"https://api.github.com/repos/openshift/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/origin/languages","stargazers_url":"https://api.github.com/repos/openshift/origin/stargazers","contributors_url":"https://api.github.com/repos/openshift/origin/contributors","subscribers_url":"https://api.github.com/repos/openshift/origin/subscribers","subscription_url":"https://api.github.com/repos/openshift/origin/subscription","commits_url":"https://api.github.com/repos/openshift/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/origin/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/origin/merges","archive_url":"https://api.github.com/repos/openshift/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/origin/downloads","issues_url":"https://api.github.com/repos/openshift/origin/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/origin/labels{/name}","releases_url":"https://api.github.com/repos/openshift/origin/releases{/id}","created_at":"2014-07-30T20:04:05Z","updated_at":"2015-05-14T09:16:09Z","pushed_at":"2015-05-14T21:08:03Z","git_url":"git://github.com/openshift/origin.git","ssh_url":"git@github.com:openshift/origin.git","clone_url":"https://github.com/openshift/origin.git","svn_url":"https://github.com/openshift/origin","homepage":"http://www.openshift.org","size":183758,"stargazers_count":423,"watchers_count":423,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":202,"mirror_url":null,"open_issues_count":232,"forks":202,"open_issues":232,"watchers":423,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/2054"},"html":{"href":"https://github.com/openshift/origin/pull/2054"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/2054"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/2054/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/2054/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/2054/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/70cdd65d22cf6cec2588108f9e921c7a8cb647b4"}}}}