{"action":"created","comment":{"url":"https://api.github.com/repos/dcos/dcos-ui/pulls/comments/62722784","id":62722784,"diff_hunk":"@@ -151,56 +151,119 @@ class TaskSidePanelContents extends SidePanelContents {\n     });\n   }\n \n-  getBasicInfo(task, node) {\n-    // Hide when no task or when we are viewing debug tab\n-    if (task == null || this.state.currentTab === 'debug') {\n-      return null;\n-    }\n+  getBasicInfo(task) {\n+    let taskIcon = (\n+      <div\n+        className=\"icon icon-large icon-image-container icon-app-container\">\n+        <img src={task.getImages()['icon-large']} />\n+      </div>\n+    );\n \n-    let statusIcon = TaskUtil.getTaskStatusIcon(task);\n-    let statusClassName = `${TaskUtil.getTaskStatusClassName(task)} side-panel-subheader`;\n+    let tabs = (\n+      <ul className=\"tabs list-inline flush-bottom inverse\">\n+        {this.tabs_getUnroutedTabs()}\n+      </ul>\n+    );\n \n     return (\n-      <div>\n-        <div className=\"side-panel-content-header container-fluid container-pod flush-top flush-bottom\">\n-          <h1 className=\"side-panel-content-header-label flush\">\n-            {task.name}\n-          </h1>\n-          <div className=\"media-object-spacing-wrapper media-object-spacing-narrow media-object-offset\">\n-            <div className=\"media-object media-object-align-middle\">\n-              <div className=\"media-object-item\">\n-                {statusIcon}\n-              </div>\n+      <PageHeader\n+        icon={taskIcon}\n+        subTitle={TaskStates[task.state].displayName}\n+        navigationTabs={tabs}\n+        mediaWrapperClassName=\"media-object-spacing-wrapper\"\n+        title={task.getId()} />\n+    );\n+  }\n \n-              <div className=\"media-object-item\">\n-                <span className={statusClassName}>\n-                  {TaskStates[task.state].displayName}\n-                </span>\n-              </div>\n+  getTaskStatus(task) {\n+    if (task == null || task.status == null) {\n+      return 'Unknown';\n+    }\n+    return task.status;\n+  }\n \n-              <div className=\"media-object-item\">\n-                <span className=\"side-panel-subheader side-panel-subheader-emphasize\">\n-                  {node.hostname}\n-                </span>\n-              </div>\n-            </div>\n-          </div>\n-        </div>\n-        <div className=\"container container-pod container-pod-short container-fluid flush\">\n-          {this.getResources(task)}\n-        </div>\n-      </div>\n+  getTaskEndpoints(task) {\n+    let service = MarathonStore.getServiceFromTaskID(task.id);\n+\n+    if ((task.ports == null || task.ports.length === 0) &&\n+        (task.ipAddresses == null || task.ipAddresses.length === 0)) {\n+      return (<dd>None</dd>);\n+    }\n+\n+    if (service != null &&\n+        service.ipAddress != null &&\n+        service.ipAddress.discovery != null &&\n+        service.ipAddress.discovery.ports != null &&\n+        task.ipAddresses != null &&\n+        task.ipAddresses.length > 0) {\n+\n+      let ports = service.ipAddress.discovery.ports;\n+      let endpoints = task.ipAddresses.reduce(function (memo, address) {\n+        ports.forEach(port => {\n+          memo.push(`${address.ipAddress}:${port.number}`);\n+        });\n+        return memo;\n+      }, []);\n+\n+      if (endpoints.length) {\n+        return endpoints.map(function (endpoint) {\n+          return (\n+            <a href={`//${endpoint}`} target=\"_blank\">{endpoint}</a>\n+          );\n+        });\n+      }\n+\n+      return 'n/a';","path":"src/js/components/TaskDetail.js","position":178,"original_position":178,"commit_id":"13210e5e53b76ad47e31bbea9735323d5e3cfdb6","original_commit_id":"13210e5e53b76ad47e31bbea9735323d5e3cfdb6","user":{"login":"aldipower","id":859154,"avatar_url":"https://avatars.githubusercontent.com/u/859154?v=3","gravatar_id":"","url":"https://api.github.com/users/aldipower","html_url":"https://github.com/aldipower","followers_url":"https://api.github.com/users/aldipower/followers","following_url":"https://api.github.com/users/aldipower/following{/other_user}","gists_url":"https://api.github.com/users/aldipower/gists{/gist_id}","starred_url":"https://api.github.com/users/aldipower/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldipower/subscriptions","organizations_url":"https://api.github.com/users/aldipower/orgs","repos_url":"https://api.github.com/users/aldipower/repos","events_url":"https://api.github.com/users/aldipower/events{/privacy}","received_events_url":"https://api.github.com/users/aldipower/received_events","type":"User","site_admin":false},"body":"Did it the other way around.","created_at":"2016-05-10T18:10:36Z","updated_at":"2016-05-10T18:10:36Z","html_url":"https://github.com/dcos/dcos-ui/pull/118#discussion_r62722784","pull_request_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/118","_links":{"self":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/comments/62722784"},"html":{"href":"https://github.com/dcos/dcos-ui/pull/118#discussion_r62722784"},"pull_request":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/118"}}},"pull_request":{"url":"https://api.github.com/repos/dcos/dcos-ui/pulls/118","id":69088875,"html_url":"https://github.com/dcos/dcos-ui/pull/118","diff_url":"https://github.com/dcos/dcos-ui/pull/118.diff","patch_url":"https://github.com/dcos/dcos-ui/pull/118.patch","issue_url":"https://api.github.com/repos/dcos/dcos-ui/issues/118","number":118,"state":"open","locked":false,"title":"[WIP] Feature - Add task detail page","user":{"login":"aldipower","id":859154,"avatar_url":"https://avatars.githubusercontent.com/u/859154?v=3","gravatar_id":"","url":"https://api.github.com/users/aldipower","html_url":"https://github.com/aldipower","followers_url":"https://api.github.com/users/aldipower/followers","following_url":"https://api.github.com/users/aldipower/following{/other_user}","gists_url":"https://api.github.com/users/aldipower/gists{/gist_id}","starred_url":"https://api.github.com/users/aldipower/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldipower/subscriptions","organizations_url":"https://api.github.com/users/aldipower/orgs","repos_url":"https://api.github.com/users/aldipower/repos","events_url":"https://api.github.com/users/aldipower/events{/privacy}","received_events_url":"https://api.github.com/users/aldipower/received_events","type":"User","site_admin":false},"body":"Tests are arriving tomorrow.\r\n\r\n![td1](https://cloud.githubusercontent.com/assets/859154/15132059/ff962a78-1655-11e6-96cf-a1736b1a378c.png)\r\n![td2](https://cloud.githubusercontent.com/assets/859154/15132061/ff9781fc-1655-11e6-9f4c-e17ffa0b191c.png)\r\n![td3](https://cloud.githubusercontent.com/assets/859154/15132062/ff9b6fe2-1655-11e6-902f-21a7065bc21f.png)\r\n![td4](https://cloud.githubusercontent.com/assets/859154/15132060/ff9703e4-1655-11e6-9510-fa703eb19ede.png)\r\n\r\n* The route looks like this now:\r\n`#/services/[serviceID]/task-detail/[taskID]/`\r\n\r\n* I've put in an additional rudimentary 'Marathon Task Configuration' that shows up below the Mesos task information. Extending this Marathon information is a huge task, that should be done outside of this PR. Also I think it needs a refinement together with @leemunroe at some point, how to merge Mesos and Marathon task information.\r\n\r\n* I've adjusted the ServiceBreadcrumbs to be able to display and route the task id. But the ServiceBreadcrumbs are not generic right now, so I disabled them in the 'Node' task view, which is actually the same. @pierlo-upitup \r\n\r\n* The status (Running, Finished, etc) in the PageHeader isn't shown up emphazied, even though it is set as emphasize. This is a Canvas UI definition, that I am not meant to influence. If Canvas UI changes the emphazise setting, this status line will follow automatically, because the 'emphasize' is set.\r\n\r\n* The code container in the logs view needs some adjustment, so the \"Go to bottom\" button isn't shown up accidentally. But this is a Reactjs-components fix. This PR is not responsible for it.\r\n\r\nWithout the help of @kennyt and @mlunoe I would have been screwed up.","created_at":"2016-05-05T23:58:17Z","updated_at":"2016-05-10T18:10:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b243f785f0b82943ff9af56b8aba0d41967ea83c","assignee":{"login":"pierlo-upitup","id":1078545,"avatar_url":"https://avatars.githubusercontent.com/u/1078545?v=3","gravatar_id":"","url":"https://api.github.com/users/pierlo-upitup","html_url":"https://github.com/pierlo-upitup","followers_url":"https://api.github.com/users/pierlo-upitup/followers","following_url":"https://api.github.com/users/pierlo-upitup/following{/other_user}","gists_url":"https://api.github.com/users/pierlo-upitup/gists{/gist_id}","starred_url":"https://api.github.com/users/pierlo-upitup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierlo-upitup/subscriptions","organizations_url":"https://api.github.com/users/pierlo-upitup/orgs","repos_url":"https://api.github.com/users/pierlo-upitup/repos","events_url":"https://api.github.com/users/pierlo-upitup/events{/privacy}","received_events_url":"https://api.github.com/users/pierlo-upitup/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/118/commits","review_comments_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/118/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/118/comments","statuses_url":"https://api.github.com/repos/dcos/dcos-ui/statuses/13210e5e53b76ad47e31bbea9735323d5e3cfdb6","head":{"label":"dcos:feature/add-task-detail-page","ref":"feature/add-task-detail-page","sha":"13210e5e53b76ad47e31bbea9735323d5e3cfdb6","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-05-10T03:24:42Z","pushed_at":"2016-05-10T18:09:53Z","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":12551,"stargazers_count":70,"watchers_count":70,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":11,"forks":8,"open_issues":11,"watchers":70,"default_branch":"master"}},"base":{"label":"dcos:master","ref":"master","sha":"0d4d710545a40430847dd1c4b8c7487d31bc9e66","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-05-10T03:24:42Z","pushed_at":"2016-05-10T18:09:53Z","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":12551,"stargazers_count":70,"watchers_count":70,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":11,"forks":8,"open_issues":11,"watchers":70,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/118"},"html":{"href":"https://github.com/dcos/dcos-ui/pull/118"},"issue":{"href":"https://api.github.com/repos/dcos/dcos-ui/issues/118"},"comments":{"href":"https://api.github.com/repos/dcos/dcos-ui/issues/118/comments"},"review_comments":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/118/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/118/commits"},"statuses":{"href":"https://api.github.com/repos/dcos/dcos-ui/statuses/13210e5e53b76ad47e31bbea9735323d5e3cfdb6"}}}}