{"action":"opened","number":2341,"pull_request":{"url":"https://api.github.com/repos/dcos/dcos-ui/pulls/2341","id":132585171,"html_url":"https://github.com/dcos/dcos-ui/pull/2341","diff_url":"https://github.com/dcos/dcos-ui/pull/2341.diff","patch_url":"https://github.com/dcos/dcos-ui/pull/2341.patch","issue_url":"https://api.github.com/repos/dcos/dcos-ui/issues/2341","number":2341,"state":"open","locked":false,"title":"DCOS-17301: not all tasks were shown under the service","user":{"login":"bstavroulakis","id":180432,"avatar_url":"https://avatars0.githubusercontent.com/u/180432?v=4","gravatar_id":"","url":"https://api.github.com/users/bstavroulakis","html_url":"https://github.com/bstavroulakis","followers_url":"https://api.github.com/users/bstavroulakis/followers","following_url":"https://api.github.com/users/bstavroulakis/following{/other_user}","gists_url":"https://api.github.com/users/bstavroulakis/gists{/gist_id}","starred_url":"https://api.github.com/users/bstavroulakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bstavroulakis/subscriptions","organizations_url":"https://api.github.com/users/bstavroulakis/orgs","repos_url":"https://api.github.com/users/bstavroulakis/repos","events_url":"https://api.github.com/users/bstavroulakis/events{/privacy}","received_events_url":"https://api.github.com/users/bstavroulakis/received_events","type":"User","site_admin":false},"body":"If you create a service inside a folder, it won't show all of the tasks under the service.\r\n\r\nIn the MesosStateService we had the following check\r\n\r\n```\r\nconst serviceName = service.getId().split(\"/\").pop();\r\n\r\nif(framework.name === serviceName) { ... }\r\n\r\n```\r\nwith\r\n\r\n```\r\nservice: { id: \"/test/elastic\" }\r\nframework { name: \"test/elastic\" }\r\n```\r\n\r\nThe problem is that if we have a service in a folder the service id is \"/test/elastic\" and with the split pop() we lose the full id.\r\n\r\nAlso the framework's name is \"test/elastic\". So it would compare framework.name = \"test/elastic\" with serviceName = \"elastic\" eventually.\r\n\r\n> So you would see this on one DCOS dashboard\r\n![image](https://user-images.githubusercontent.com/180432/28637255-c528a1f2-71f5-11e7-8352-d0cc1a4e4085.png)\r\n> and this on the Mesos dashboard\r\n![image](https://user-images.githubusercontent.com/180432/28637289-e3318952-71f5-11e7-9217-92888103e569.png)\r\n\r\nI created 2 new methods one **getFullId()** to return **\"test/elastic\"** from the service\r\n and one **getServiceName()** to return **\"test/elastic\"** from the framework.\r\n\r\n> Note concerning the naming for \"getFullId() and getServiceName()\"\r\n> \r\n> I don't like the following method in the Application.js. Although it says getName() it returns part of the Id.\r\n> But we can't change it now easily as a defect since it is used in numerous areas.\r\n\r\n```\r\n  getName() {\r\n    return this.getId().split(\"/\").pop();\r\n  }\r\n```\r\n\r\nCloses DCOS-17301\r\n\r\n**Checklist**\r\n- [ ] Did you add a JIRA issue in a commit message or as part of the branch name?\r\n- [ ] Did you add new unit tests?\r\n- [ ] Did you add new integration tests?\r\n- [ ] If this is a regression, did you write a test to catch this in the future?\r\n\r\n<!-- More info can be found by clicking the \"guidelines for contributing\" link above. -->\r\n","created_at":"2017-07-26T18:39:57Z","updated_at":"2017-07-26T18:39:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/2341/commits","review_comments_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/2341/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/2341/comments","statuses_url":"https://api.github.com/repos/dcos/dcos-ui/statuses/4d16f3e197dc43b2bbd0dd4360538e3985fef8dd","head":{"label":"dcos:bill/fix/DCOS-17301-services-not-show-tasks","ref":"bill/fix/DCOS-17301-services-not-show-tasks","sha":"4d16f3e197dc43b2bbd0dd4360538e3985fef8dd","user":{"login":"dcos","id":17648048,"avatar_url":"https://avatars1.githubusercontent.com/u/17648048?v=4","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://avatars1.githubusercontent.com/u/17648048?v=4","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":"2017-07-18T09:10:29Z","pushed_at":"2017-07-26T18:22:20Z","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":"https://dcos.io/","size":25045,"stargazers_count":138,"watchers_count":138,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":13,"forks":47,"open_issues":13,"watchers":138,"default_branch":"master"}},"base":{"label":"dcos:master","ref":"master","sha":"72874b7043f3bf7c7fed1549424ab04120dd52e3","user":{"login":"dcos","id":17648048,"avatar_url":"https://avatars1.githubusercontent.com/u/17648048?v=4","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://avatars1.githubusercontent.com/u/17648048?v=4","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":"2017-07-18T09:10:29Z","pushed_at":"2017-07-26T18:22:20Z","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":"https://dcos.io/","size":25045,"stargazers_count":138,"watchers_count":138,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":13,"forks":47,"open_issues":13,"watchers":138,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/2341"},"html":{"href":"https://github.com/dcos/dcos-ui/pull/2341"},"issue":{"href":"https://api.github.com/repos/dcos/dcos-ui/issues/2341"},"comments":{"href":"https://api.github.com/repos/dcos/dcos-ui/issues/2341/comments"},"review_comments":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/2341/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/2341/commits"},"statuses":{"href":"https://api.github.com/repos/dcos/dcos-ui/statuses/4d16f3e197dc43b2bbd0dd4360538e3985fef8dd"}},"merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":64,"deletions":7,"changed_files":3}}
{"actor":{"display_login":"bstavroulakis"}}