{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/dashboard/pulls/comments/199423786","pull_request_review_id":133538207,"id":199423786,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTQyMzc4Ng==","diff_hunk":"@@ -0,0 +1,121 @@\n+// Copyright 2017 The Kubernetes Authors.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//     http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+/**\n+ * Controller for the resource card delete menu item component. It deletes card's resource.\n+ * @final\n+ */\n+export class ResourceCardSuspendMenuItemController {\n+  /**\n+   * @param {!ui.router.$state} $state\n+   * @param {!angular.$log} $log\n+   * @param {!angular.$resource} $resource\n+   * @ngInject\n+   */\n+  constructor($state, $log, $resource) {\n+    /**\n+     * Initialized from require just before $onInit is called.\n+     * @export {!./resourcecard_component.ResourceCardController}\n+     */\n+    this.resourceCardCtrl;\n+\n+    /** @private {!ui.router.$state}} */\n+    this.state_ = $state;\n+\n+    /** @private {!angular.$log} */\n+    this.log_ = $log;\n+\n+    /** @private {!angular.$resource} */\n+    this.resource_ = $resource;\n+\n+    /** @export {!backendApi.CronJob} */\n+    this.cron;\n+  }\n+\n+  /**\n+   * @export\n+   */\n+  disable() {\n+    return this.disablePromised()\n+        .update(this.successdisable_.bind(this), this.error_.bind(this))\n+        .$promise;\n+  }\n+\n+  enable() {\n+    return this.enablePromised()\n+        .update(this.successenable_.bind(this), this.error_.bind(this))\n+        .$promise;\n+  }\n+\n+  disablePromised() {\n+    return this.resource_(\n+        `api/v1/suspend/${this.cron.objectMeta.namespace}/${this.cron.objectMeta.name}/`,\n+        {'suspend': 'true'}, {\n+          update: {\n+            // redefine update action defaults\n+            method: 'PUT',\n+            transformRequest: function(headers) {\n+              headers = angular.extend({}, headers, {'Content-Type': 'application/json'});\n+              return angular.toJson(headers);\n+            },\n+          },\n+        });\n+  }\n+\n+  enablePromised() {\n+    return this.resource_(\n+        `api/v1/suspend/${this.cron.objectMeta.namespace}/${this.cron.objectMeta.name}/`,\n+        {'suspend': 'false'}, {\n+          update: {\n+            // redefine update action defaults\n+            method: 'PUT',\n+            transformRequest: function(headers) {\n+              headers = angular.extend({}, headers, {'Content-Type': 'application/json'});\n+              return angular.toJson(headers);\n+            },\n+          },\n+        });\n+  }\n+\n+  successdisable_() {","path":"src/app/frontend/common/components/resourcecard/resourcecardsuspendmenuitem_component.js","position":91,"original_position":91,"commit_id":"5359caa854fda89d25d87878329a758c952a01e5","original_commit_id":"5359caa854fda89d25d87878329a758c952a01e5","user":{"login":"maciaszczykm","id":2823399,"node_id":"MDQ6VXNlcjI4MjMzOTk=","avatar_url":"https://avatars3.githubusercontent.com/u/2823399?v=4","gravatar_id":"","url":"https://api.github.com/users/maciaszczykm","html_url":"https://github.com/maciaszczykm","followers_url":"https://api.github.com/users/maciaszczykm/followers","following_url":"https://api.github.com/users/maciaszczykm/following{/other_user}","gists_url":"https://api.github.com/users/maciaszczykm/gists{/gist_id}","starred_url":"https://api.github.com/users/maciaszczykm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maciaszczykm/subscriptions","organizations_url":"https://api.github.com/users/maciaszczykm/orgs","repos_url":"https://api.github.com/users/maciaszczykm/repos","events_url":"https://api.github.com/users/maciaszczykm/events{/privacy}","received_events_url":"https://api.github.com/users/maciaszczykm/received_events","type":"User","site_admin":false},"body":"Use camelCase.","created_at":"2018-07-02T08:45:50Z","updated_at":"2018-07-02T08:46:57Z","html_url":"https://github.com/kubernetes/dashboard/pull/3107#discussion_r199423786","pull_request_url":"https://api.github.com/repos/kubernetes/dashboard/pulls/3107","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/dashboard/pulls/comments/199423786"},"html":{"href":"https://github.com/kubernetes/dashboard/pull/3107#discussion_r199423786"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/dashboard/pulls/3107"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/dashboard/pulls/3107","id":196834047,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2ODM0MDQ3","html_url":"https://github.com/kubernetes/dashboard/pull/3107","diff_url":"https://github.com/kubernetes/dashboard/pull/3107.diff","patch_url":"https://github.com/kubernetes/dashboard/pull/3107.patch","issue_url":"https://api.github.com/repos/kubernetes/dashboard/issues/3107","number":3107,"state":"open","locked":false,"title":"Fixed part 2 of issue3080: UI suspension button for CronJob","user":{"login":"EdanSneh","id":14003534,"node_id":"MDQ6VXNlcjE0MDAzNTM0","avatar_url":"https://avatars3.githubusercontent.com/u/14003534?v=4","gravatar_id":"","url":"https://api.github.com/users/EdanSneh","html_url":"https://github.com/EdanSneh","followers_url":"https://api.github.com/users/EdanSneh/followers","following_url":"https://api.github.com/users/EdanSneh/following{/other_user}","gists_url":"https://api.github.com/users/EdanSneh/gists{/gist_id}","starred_url":"https://api.github.com/users/EdanSneh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EdanSneh/subscriptions","organizations_url":"https://api.github.com/users/EdanSneh/orgs","repos_url":"https://api.github.com/users/EdanSneh/repos","events_url":"https://api.github.com/users/EdanSneh/events{/privacy}","received_events_url":"https://api.github.com/users/EdanSneh/received_events","type":"User","site_admin":false},"body":"Creates new button for suspending cronjob, with a component and a controller. New suspend API handler in backend, with a suspension library.","created_at":"2018-06-22T20:10:06Z","updated_at":"2018-07-02T08:46:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb7920785b030898af9de462d81ac477884480ea","assignee":{"login":"maciaszczykm","id":2823399,"node_id":"MDQ6VXNlcjI4MjMzOTk=","avatar_url":"https://avatars3.githubusercontent.com/u/2823399?v=4","gravatar_id":"","url":"https://api.github.com/users/maciaszczykm","html_url":"https://github.com/maciaszczykm","followers_url":"https://api.github.com/users/maciaszczykm/followers","following_url":"https://api.github.com/users/maciaszczykm/following{/other_user}","gists_url":"https://api.github.com/users/maciaszczykm/gists{/gist_id}","starred_url":"https://api.github.com/users/maciaszczykm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maciaszczykm/subscriptions","organizations_url":"https://api.github.com/users/maciaszczykm/orgs","repos_url":"https://api.github.com/users/maciaszczykm/repos","events_url":"https://api.github.com/users/maciaszczykm/events{/privacy}","received_events_url":"https://api.github.com/users/maciaszczykm/received_events","type":"User","site_admin":false},"assignees":[{"login":"maciaszczykm","id":2823399,"node_id":"MDQ6VXNlcjI4MjMzOTk=","avatar_url":"https://avatars3.githubusercontent.com/u/2823399?v=4","gravatar_id":"","url":"https://api.github.com/users/maciaszczykm","html_url":"https://github.com/maciaszczykm","followers_url":"https://api.github.com/users/maciaszczykm/followers","following_url":"https://api.github.com/users/maciaszczykm/following{/other_user}","gists_url":"https://api.github.com/users/maciaszczykm/gists{/gist_id}","starred_url":"https://api.github.com/users/maciaszczykm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maciaszczykm/subscriptions","organizations_url":"https://api.github.com/users/maciaszczykm/orgs","repos_url":"https://api.github.com/users/maciaszczykm/repos","events_url":"https://api.github.com/users/maciaszczykm/events{/privacy}","received_events_url":"https://api.github.com/users/maciaszczykm/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":485595234,"node_id":"MDU6TGFiZWw0ODU1OTUyMzQ=","url":"https://api.github.com/repos/kubernetes/dashboard/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":678006719,"node_id":"MDU6TGFiZWw2NzgwMDY3MTk=","url":"https://api.github.com/repos/kubernetes/dashboard/labels/size/L","name":"size/L","color":"ee9900","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/dashboard/pulls/3107/commits","review_comments_url":"https://api.github.com/repos/kubernetes/dashboard/pulls/3107/comments","review_comment_url":"https://api.github.com/repos/kubernetes/dashboard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/dashboard/issues/3107/comments","statuses_url":"https://api.github.com/repos/kubernetes/dashboard/statuses/5359caa854fda89d25d87878329a758c952a01e5","head":{"label":"EdanSneh:issue_3080p2","ref":"issue_3080p2","sha":"5359caa854fda89d25d87878329a758c952a01e5","user":{"login":"EdanSneh","id":14003534,"node_id":"MDQ6VXNlcjE0MDAzNTM0","avatar_url":"https://avatars3.githubusercontent.com/u/14003534?v=4","gravatar_id":"","url":"https://api.github.com/users/EdanSneh","html_url":"https://github.com/EdanSneh","followers_url":"https://api.github.com/users/EdanSneh/followers","following_url":"https://api.github.com/users/EdanSneh/following{/other_user}","gists_url":"https://api.github.com/users/EdanSneh/gists{/gist_id}","starred_url":"https://api.github.com/users/EdanSneh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EdanSneh/subscriptions","organizations_url":"https://api.github.com/users/EdanSneh/orgs","repos_url":"https://api.github.com/users/EdanSneh/repos","events_url":"https://api.github.com/users/EdanSneh/events{/privacy}","received_events_url":"https://api.github.com/users/EdanSneh/received_events","type":"User","site_admin":false},"repo":{"id":137787140,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc3ODcxNDA=","name":"dashboard","full_name":"EdanSneh/dashboard","owner":{"login":"EdanSneh","id":14003534,"node_id":"MDQ6VXNlcjE0MDAzNTM0","avatar_url":"https://avatars3.githubusercontent.com/u/14003534?v=4","gravatar_id":"","url":"https://api.github.com/users/EdanSneh","html_url":"https://github.com/EdanSneh","followers_url":"https://api.github.com/users/EdanSneh/followers","following_url":"https://api.github.com/users/EdanSneh/following{/other_user}","gists_url":"https://api.github.com/users/EdanSneh/gists{/gist_id}","starred_url":"https://api.github.com/users/EdanSneh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EdanSneh/subscriptions","organizations_url":"https://api.github.com/users/EdanSneh/orgs","repos_url":"https://api.github.com/users/EdanSneh/repos","events_url":"https://api.github.com/users/EdanSneh/events{/privacy}","received_events_url":"https://api.github.com/users/EdanSneh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/EdanSneh/dashboard","description":"General-purpose web UI for Kubernetes clusters","fork":true,"url":"https://api.github.com/repos/EdanSneh/dashboard","forks_url":"https://api.github.com/repos/EdanSneh/dashboard/forks","keys_url":"https://api.github.com/repos/EdanSneh/dashboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EdanSneh/dashboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EdanSneh/dashboard/teams","hooks_url":"https://api.github.com/repos/EdanSneh/dashboard/hooks","issue_events_url":"https://api.github.com/repos/EdanSneh/dashboard/issues/events{/number}","events_url":"https://api.github.com/repos/EdanSneh/dashboard/events","assignees_url":"https://api.github.com/repos/EdanSneh/dashboard/assignees{/user}","branches_url":"https://api.github.com/repos/EdanSneh/dashboard/branches{/branch}","tags_url":"https://api.github.com/repos/EdanSneh/dashboard/tags","blobs_url":"https://api.github.com/repos/EdanSneh/dashboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EdanSneh/dashboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EdanSneh/dashboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/EdanSneh/dashboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EdanSneh/dashboard/statuses/{sha}","languages_url":"https://api.github.com/repos/EdanSneh/dashboard/languages","stargazers_url":"https://api.github.com/repos/EdanSneh/dashboard/stargazers","contributors_url":"https://api.github.com/repos/EdanSneh/dashboard/contributors","subscribers_url":"https://api.github.com/repos/EdanSneh/dashboard/subscribers","subscription_url":"https://api.github.com/repos/EdanSneh/dashboard/subscription","commits_url":"https://api.github.com/repos/EdanSneh/dashboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/EdanSneh/dashboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/EdanSneh/dashboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/EdanSneh/dashboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/EdanSneh/dashboard/contents/{+path}","compare_url":"https://api.github.com/repos/EdanSneh/dashboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EdanSneh/dashboard/merges","archive_url":"https://api.github.com/repos/EdanSneh/dashboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EdanSneh/dashboard/downloads","issues_url":"https://api.github.com/repos/EdanSneh/dashboard/issues{/number}","pulls_url":"https://api.github.com/repos/EdanSneh/dashboard/pulls{/number}","milestones_url":"https://api.github.com/repos/EdanSneh/dashboard/milestones{/number}","notifications_url":"https://api.github.com/repos/EdanSneh/dashboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EdanSneh/dashboard/labels{/name}","releases_url":"https://api.github.com/repos/EdanSneh/dashboard/releases{/id}","deployments_url":"https://api.github.com/repos/EdanSneh/dashboard/deployments","created_at":"2018-06-18T17:53:41Z","updated_at":"2018-06-18T17:53:46Z","pushed_at":"2018-06-23T00:10:28Z","git_url":"git://github.com/EdanSneh/dashboard.git","ssh_url":"git@github.com:EdanSneh/dashboard.git","clone_url":"https://github.com/EdanSneh/dashboard.git","svn_url":"https://github.com/EdanSneh/dashboard","homepage":"","size":115875,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"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":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"f93b31ebc1c730096663efe73dc76c70b209e2cf","user":{"login":"kubernetes","id":13629408,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjI5NDA4","avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":44350607,"node_id":"MDEwOlJlcG9zaXRvcnk0NDM1MDYwNw==","name":"dashboard","full_name":"kubernetes/dashboard","owner":{"login":"kubernetes","id":13629408,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjI5NDA4","avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/dashboard","description":"General-purpose web UI for Kubernetes clusters","fork":false,"url":"https://api.github.com/repos/kubernetes/dashboard","forks_url":"https://api.github.com/repos/kubernetes/dashboard/forks","keys_url":"https://api.github.com/repos/kubernetes/dashboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/dashboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/dashboard/teams","hooks_url":"https://api.github.com/repos/kubernetes/dashboard/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/dashboard/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/dashboard/events","assignees_url":"https://api.github.com/repos/kubernetes/dashboard/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/dashboard/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/dashboard/tags","blobs_url":"https://api.github.com/repos/kubernetes/dashboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/dashboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/dashboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/dashboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/dashboard/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/dashboard/languages","stargazers_url":"https://api.github.com/repos/kubernetes/dashboard/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/dashboard/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/dashboard/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/dashboard/subscription","commits_url":"https://api.github.com/repos/kubernetes/dashboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/dashboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/dashboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/dashboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/dashboard/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/dashboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/dashboard/merges","archive_url":"https://api.github.com/repos/kubernetes/dashboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/dashboard/downloads","issues_url":"https://api.github.com/repos/kubernetes/dashboard/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/dashboard/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/dashboard/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/dashboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/dashboard/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/dashboard/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/dashboard/deployments","created_at":"2015-10-15T23:09:14Z","updated_at":"2018-07-02T08:15:21Z","pushed_at":"2018-07-02T08:22:39Z","git_url":"git://github.com/kubernetes/dashboard.git","ssh_url":"git@github.com:kubernetes/dashboard.git","clone_url":"https://github.com/kubernetes/dashboard.git","svn_url":"https://github.com/kubernetes/dashboard","homepage":"","size":119856,"stargazers_count":2833,"watchers_count":2833,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":836,"mirror_url":null,"archived":false,"open_issues_count":168,"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":836,"open_issues":168,"watchers":2833,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/dashboard/pulls/3107"},"html":{"href":"https://github.com/kubernetes/dashboard/pull/3107"},"issue":{"href":"https://api.github.com/repos/kubernetes/dashboard/issues/3107"},"comments":{"href":"https://api.github.com/repos/kubernetes/dashboard/issues/3107/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/dashboard/pulls/3107/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/dashboard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/dashboard/pulls/3107/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/dashboard/statuses/5359caa854fda89d25d87878329a758c952a01e5"}},"author_association":"NONE"}}
{"actor":{"display_login":"maciaszczykm"}}