{"action":"created","comment":{"url":"https://api.github.com/repos/dcos/dcos-ui/pulls/comments/200076176","pull_request_review_id":134318546,"id":200076176,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDA3NjE3Ng==","diff_hunk":"@@ -0,0 +1,86 @@\n+import { Confirm } from \"reactjs-components\";\n+import PropTypes from \"prop-types\";\n+import React from \"react\";\n+import ModalHeading from \"#SRC/js/components/modals/ModalHeading\";\n+\n+class JobStopRunModal extends React.Component {\n+  getContentHeader(selectedItems, selectedItemsLength) {\n+    let headerContent = ` ${selectedItemsLength} Job Runs`;\n+    if (selectedItemsLength === 1) {\n+      headerContent = \"this\";\n+    }\n+\n+    return (\n+      <ModalHeading key=\"confirmHeader\">\n+        {`Are you sure you want to stop ${headerContent}?`}\n+      </ModalHeading>\n+    );\n+  }\n+\n+  getConfirmTextBody(selectedItems, selectedItemsLength) {\n+    let bodyText;\n+\n+    if (selectedItemsLength === 1) {\n+      bodyText = `the job run with id ${selectedItems[0]}`;\n+    } else {\n+      bodyText = \"the selected job runs\";\n+    }\n+\n+    return <span key=\"confirmText\">You are about to stop {bodyText}.</span>;\n+  }\n+\n+  getModalContents() {\n+    const { selectedItems } = this.props;\n+    const selectedItemsLength = selectedItems.length;\n+\n+    return (\n+      <div className=\"text-align-center\">\n+        {this.getConfirmTextBody(selectedItems, selectedItemsLength)}","path":"plugins/jobs/src/js/components/JobStopRunModal.js","position":38,"original_position":38,"commit_id":"9f0ed9f0512b6fc577cf87ec493f985b526c2a08","original_commit_id":"523d3c77d672eb3f8f83e385a7f6deedd0f30cf9","user":{"login":"Fabs","id":10524,"node_id":"MDQ6VXNlcjEwNTI0","avatar_url":"https://avatars1.githubusercontent.com/u/10524?v=4","gravatar_id":"","url":"https://api.github.com/users/Fabs","html_url":"https://github.com/Fabs","followers_url":"https://api.github.com/users/Fabs/followers","following_url":"https://api.github.com/users/Fabs/following{/other_user}","gists_url":"https://api.github.com/users/Fabs/gists{/gist_id}","starred_url":"https://api.github.com/users/Fabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fabs/subscriptions","organizations_url":"https://api.github.com/users/Fabs/orgs","repos_url":"https://api.github.com/users/Fabs/repos","events_url":"https://api.github.com/users/Fabs/events{/privacy}","received_events_url":"https://api.github.com/users/Fabs/received_events","type":"User","site_admin":false},"body":"That is also true, but also some presentational logic that I am not willing to touch.","created_at":"2018-07-04T10:08:05Z","updated_at":"2018-07-04T10:08:05Z","html_url":"https://github.com/dcos/dcos-ui/pull/3040#discussion_r200076176","pull_request_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/3040","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/comments/200076176"},"html":{"href":"https://github.com/dcos/dcos-ui/pull/3040#discussion_r200076176"},"pull_request":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/3040"}},"in_reply_to_id":200071791},"pull_request":{"url":"https://api.github.com/repos/dcos/dcos-ui/pulls/3040","id":198322372,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4MzIyMzcy","html_url":"https://github.com/dcos/dcos-ui/pull/3040","diff_url":"https://github.com/dcos/dcos-ui/pull/3040.diff","patch_url":"https://github.com/dcos/dcos-ui/pull/3040.patch","issue_url":"https://api.github.com/repos/dcos/dcos-ui/issues/3040","number":3040,"state":"open","locked":false,"title":"DCOS-38641 stop action","user":{"login":"Fabs","id":10524,"node_id":"MDQ6VXNlcjEwNTI0","avatar_url":"https://avatars1.githubusercontent.com/u/10524?v=4","gravatar_id":"","url":"https://api.github.com/users/Fabs","html_url":"https://github.com/Fabs","followers_url":"https://api.github.com/users/Fabs/followers","following_url":"https://api.github.com/users/Fabs/following{/other_user}","gists_url":"https://api.github.com/users/Fabs/gists{/gist_id}","starred_url":"https://api.github.com/users/Fabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fabs/subscriptions","organizations_url":"https://api.github.com/users/Fabs/orgs","repos_url":"https://api.github.com/users/Fabs/repos","events_url":"https://api.github.com/users/Fabs/events{/privacy}","received_events_url":"https://api.github.com/users/Fabs/received_events","type":"User","site_admin":false},"body":"**SCOPE**\r\n\r\n- Extract the JobStopAction into the mediator pattern\r\n- Minor changes to existing JobStopModal component\r\n\r\n**HOW TO TEST**\r\n\r\nScenario 1: A job\r\n\r\nGo to the Job History page, run a job, and then selected it on the list (via the checkbox), a Stop button appears, you can stop the job there.\r\n\r\n**WHAT WAS TAKEN OUT OF SCOPE**\r\n\r\n- Not using graphql yet.","created_at":"2018-06-29T13:46:28Z","updated_at":"2018-07-04T10:08:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"db9e881886104ee016ef0ea792229aa6bdbfbe3b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":874076449,"node_id":"MDU6TGFiZWw4NzQwNzY0NDk=","url":"https://api.github.com/repos/dcos/dcos-ui/labels/data-layer","name":"data-layer","color":"7E5686","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/3040/commits","review_comments_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/3040/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/3040/comments","statuses_url":"https://api.github.com/repos/dcos/dcos-ui/statuses/9f0ed9f0512b6fc577cf87ec493f985b526c2a08","head":{"label":"dcos:fabs/refactor/DCOS-38641-menu-stop-action","ref":"fabs/refactor/DCOS-38641-menu-stop-action","sha":"9f0ed9f0512b6fc577cf87ec493f985b526c2a08","user":{"login":"dcos","id":17648048,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3NjQ4MDQ4","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,"node_id":"MDEwOlJlcG9zaXRvcnk1NjU0NzUwNA==","name":"dcos-ui","full_name":"dcos/dcos-ui","owner":{"login":"dcos","id":17648048,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3NjQ4MDQ4","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":"2018-07-04T09:53:51Z","pushed_at":"2018-07-04T09:54:55Z","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":44972,"stargazers_count":181,"watchers_count":181,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":68,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":68,"open_issues":11,"watchers":181,"default_branch":"master"}},"base":{"label":"dcos:master","ref":"master","sha":"52033fa64fae28f593a98b0e38bfb5f80235f4f5","user":{"login":"dcos","id":17648048,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3NjQ4MDQ4","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,"node_id":"MDEwOlJlcG9zaXRvcnk1NjU0NzUwNA==","name":"dcos-ui","full_name":"dcos/dcos-ui","owner":{"login":"dcos","id":17648048,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3NjQ4MDQ4","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":"2018-07-04T09:53:51Z","pushed_at":"2018-07-04T09:54:55Z","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":44972,"stargazers_count":181,"watchers_count":181,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":68,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":68,"open_issues":11,"watchers":181,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/3040"},"html":{"href":"https://github.com/dcos/dcos-ui/pull/3040"},"issue":{"href":"https://api.github.com/repos/dcos/dcos-ui/issues/3040"},"comments":{"href":"https://api.github.com/repos/dcos/dcos-ui/issues/3040/comments"},"review_comments":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/3040/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/3040/commits"},"statuses":{"href":"https://api.github.com/repos/dcos/dcos-ui/statuses/9f0ed9f0512b6fc577cf87ec493f985b526c2a08"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Fabs"}}