{"action":"created","comment":{"url":"https://api.github.com/repos/ceph/ceph/pulls/comments/235069507","pull_request_review_id":176850448,"id":235069507,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTA2OTUwNw==","diff_hunk":"@@ -0,0 +1,164 @@\n+import { Component, OnInit } from '@angular/core';\n+import { FormControl, Validators } from '@angular/forms';\n+import { BsModalRef } from 'ngx-bootstrap/modal';\n+\n+import * as _ from 'lodash';\n+import { forkJoin as observableForkJoin, of } from 'rxjs';\n+import { mergeMap } from 'rxjs/internal/operators';\n+\n+import { ConfigurationService } from '../../../../shared/api/configuration.service';\n+import { NotificationType } from '../../../../shared/enum/notification-type.enum';\n+import { CdFormGroup } from '../../../../shared/forms/cd-form-group';\n+import { NotificationService } from '../../../../shared/services/notification.service';\n+import { OsdRecvSpeedProfiles } from './osd-recv-speed-modal.profiles';\n+\n+@Component({\n+  selector: 'cd-osd-recv-speed-modal',\n+  templateUrl: './osd-recv-speed-modal.component.html',\n+  styleUrls: ['./osd-recv-speed-modal.component.scss']\n+})\n+export class OsdRecvSpeedModalComponent implements OnInit {\n+  osdRecvSpeedForm: CdFormGroup;\n+  profiles = OsdRecvSpeedProfiles.KNOWN_PROFILES;\n+  profileAttrs = [\n+    'osd_max_backfills',\n+    'osd_recovery_max_active',\n+    'osd_recovery_max_single_start',\n+    'osd_recovery_sleep'\n+  ];\n+\n+  constructor(\n+    public bsModalRef: BsModalRef,\n+    private configService: ConfigurationService,\n+    private notificationService: NotificationService\n+  ) {\n+    this.osdRecvSpeedForm = new CdFormGroup({\n+      profile: new FormControl(null, { validators: [Validators.required] }),\n+      customizeProfile: new FormControl(false)\n+    });\n+    this.profileAttrs.forEach((attr) => {\n+      this.osdRecvSpeedForm.addControl(\n+        attr,\n+        new FormControl(null, { validators: [Validators.required] })\n+      );\n+    });\n+  }\n+\n+  ngOnInit() {\n+    this.getStoredProfile((profile) => {\n+      this.setProfile(profile);\n+    });\n+  }\n+\n+  setProfile(profile: any) {\n+    const customProfile = _.find(this.profiles, (p) => {\n+      return p.name === 'custom';\n+    });\n+\n+    if (profile.name === 'custom') {\n+      if (!customProfile) {\n+        this.profiles.push(profile);\n+      }\n+    } else {\n+      if (customProfile) {\n+        this.profiles.splice(this.profiles.indexOf(customProfile), 1);\n+      }\n+    }\n+\n+    this.osdRecvSpeedForm.controls.profile.setValue(profile.name);\n+    Object.entries(profile.values).forEach(([name, value]) => {\n+      this.osdRecvSpeedForm.controls[name].setValue(value);\n+    });\n+  }\n+\n+  onCustomizeProfileChange() {\n+    if (this.osdRecvSpeedForm.getValue('customizeProfile')) {\n+      const values = {};\n+      this.profileAttrs.forEach((attr) => {\n+        values[attr] = this.osdRecvSpeedForm.getValue(attr);\n+      });\n+      const customProfile = {\n+        name: 'custom',\n+        text: 'Custom',","path":"src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-recv-speed-modal/osd-recv-speed-modal.component.ts","position":82,"original_position":82,"commit_id":"a4be451b64c9bfbb0b4b0fd9b48aa44727f7ddc9","original_commit_id":"d3fdcf5f5a37bee5e469c18f525297a106b31ba4","user":{"login":"s0nea","id":8761082,"node_id":"MDQ6VXNlcjg3NjEwODI=","avatar_url":"https://avatars2.githubusercontent.com/u/8761082?v=4","gravatar_id":"","url":"https://api.github.com/users/s0nea","html_url":"https://github.com/s0nea","followers_url":"https://api.github.com/users/s0nea/followers","following_url":"https://api.github.com/users/s0nea/following{/other_user}","gists_url":"https://api.github.com/users/s0nea/gists{/gist_id}","starred_url":"https://api.github.com/users/s0nea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s0nea/subscriptions","organizations_url":"https://api.github.com/users/s0nea/orgs","repos_url":"https://api.github.com/users/s0nea/repos","events_url":"https://api.github.com/users/s0nea/events{/privacy}","received_events_url":"https://api.github.com/users/s0nea/received_events","type":"User","site_admin":false},"body":"Urgh... good question. I don't think this would be a good idea as I'm using it here: https://github.com/ceph/ceph/pull/24968/files#diff-e6f9474d1d71f5d57be376f98e8c85caR126\r\nDo you have an idea how we should handle these things?","created_at":"2018-11-20T16:15:47Z","updated_at":"2018-11-20T16:15:47Z","html_url":"https://github.com/ceph/ceph/pull/24968#discussion_r235069507","pull_request_url":"https://api.github.com/repos/ceph/ceph/pulls/24968","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph/pulls/comments/235069507"},"html":{"href":"https://github.com/ceph/ceph/pull/24968#discussion_r235069507"},"pull_request":{"href":"https://api.github.com/repos/ceph/ceph/pulls/24968"}},"in_reply_to_id":234670674},"pull_request":{"url":"https://api.github.com/repos/ceph/ceph/pulls/24968","id":228982804,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4OTgyODA0","html_url":"https://github.com/ceph/ceph/pull/24968","diff_url":"https://github.com/ceph/ceph/pull/24968.diff","patch_url":"https://github.com/ceph/ceph/pull/24968.patch","issue_url":"https://api.github.com/repos/ceph/ceph/issues/24968","number":24968,"state":"open","locked":false,"title":"[WIP] mgr/dashboard: add profiles to set cluster's rebuild performance","user":{"login":"s0nea","id":8761082,"node_id":"MDQ6VXNlcjg3NjEwODI=","avatar_url":"https://avatars2.githubusercontent.com/u/8761082?v=4","gravatar_id":"","url":"https://api.github.com/users/s0nea","html_url":"https://github.com/s0nea","followers_url":"https://api.github.com/users/s0nea/followers","following_url":"https://api.github.com/users/s0nea/following{/other_user}","gists_url":"https://api.github.com/users/s0nea/gists{/gist_id}","starred_url":"https://api.github.com/users/s0nea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s0nea/subscriptions","organizations_url":"https://api.github.com/users/s0nea/orgs","repos_url":"https://api.github.com/users/s0nea/repos","events_url":"https://api.github.com/users/s0nea/events{/privacy}","received_events_url":"https://api.github.com/users/s0nea/received_events","type":"User","site_admin":false},"body":"The pull requests adds profiles to set the cluster's rebuild performance. Therefor it contains a form to set the OSD recovery speed. There are three predefined profiles available: 'Slow', 'Default' and 'Fast'. By setting the profile the config options 'osd_max_backfills',  'osd_recovery_max_active', 'osd_recovery_max_single_start', 'osd_recovery_sleep' will be updated with predefined values. It's also possible to set custom values.\r\n\r\nSigned-off-by: Tatjana Dehler <tdehler@suse.com>\r\n\r\nhttps://tracker.ceph.com/issues/35540\r\n\r\n<!--\r\nThank you for opening a pull request!  Here are some tips on creating\r\na well formatted contribution.\r\n\r\nPlease give your pull request a title like \"[component]: [short description]\"\r\n\r\nThis is the format for commit messages:\r\n\r\n\"\"\"\r\n[component]: [short description]\r\n\r\n[A longer multiline description]\r\n\r\nFixes: [ticket URL on tracker.ceph.com, create one if necessary]\r\nSigned-off-by: [Your Name] <[your email]>\r\n\"\"\"\r\n\r\nThe Signed-off-by line is important, and it is your certification that\r\nyour contributions satisfy the Developers Certificate or Origin.  For\r\nmore detail, see SubmittingPatches.rst.\r\n\r\nThe component is the short name of a major daemon or subsystem,\r\nsomething like \"mon\", \"osd\", \"mds\", \"rbd, \"rgw\", etc. For ceph-mgr modules,\r\ngive the component as \"mgr/<module name>\" rather than a path into pybind.\r\n\r\nFor more examples, simply use \"git log\" and look at some historical commits.\r\n\r\nThis was just a quick overview.  More information for contributors is available here:\r\nhttps://raw.githubusercontent.com/ceph/ceph/master/SubmittingPatches.rst\r\n\r\n-->\r\n\r\n- [x] References tracker ticket\r\n- [ ] Updates documentation if necessary\r\n- [ ] Includes tests for new functionality or reproducer for bug\r\n\r\n","created_at":"2018-11-07T10:33:26Z","updated_at":"2018-11-20T16:15:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41dde5e897ccb45cde7afed85f98e00435984390","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":647438941,"node_id":"MDU6TGFiZWw2NDc0Mzg5NDE=","url":"https://api.github.com/repos/ceph/ceph/labels/DNM","name":"DNM","color":"ff0000","default":false},{"id":850326757,"node_id":"MDU6TGFiZWw4NTAzMjY3NTc=","url":"https://api.github.com/repos/ceph/ceph/labels/dashboard","name":"dashboard","color":"68a2c1","default":false},{"id":134774006,"node_id":"MDU6TGFiZWwxMzQ3NzQwMDY=","url":"https://api.github.com/repos/ceph/ceph/labels/feature","name":"feature","color":"00ff24","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ceph/ceph/pulls/24968/commits","review_comments_url":"https://api.github.com/repos/ceph/ceph/pulls/24968/comments","review_comment_url":"https://api.github.com/repos/ceph/ceph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ceph/ceph/issues/24968/comments","statuses_url":"https://api.github.com/repos/ceph/ceph/statuses/a4be451b64c9bfbb0b4b0fd9b48aa44727f7ddc9","head":{"label":"s0nea:wip-dashboard-osd-recv-speed-profiles","ref":"wip-dashboard-osd-recv-speed-profiles","sha":"a4be451b64c9bfbb0b4b0fd9b48aa44727f7ddc9","user":{"login":"s0nea","id":8761082,"node_id":"MDQ6VXNlcjg3NjEwODI=","avatar_url":"https://avatars2.githubusercontent.com/u/8761082?v=4","gravatar_id":"","url":"https://api.github.com/users/s0nea","html_url":"https://github.com/s0nea","followers_url":"https://api.github.com/users/s0nea/followers","following_url":"https://api.github.com/users/s0nea/following{/other_user}","gists_url":"https://api.github.com/users/s0nea/gists{/gist_id}","starred_url":"https://api.github.com/users/s0nea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s0nea/subscriptions","organizations_url":"https://api.github.com/users/s0nea/orgs","repos_url":"https://api.github.com/users/s0nea/repos","events_url":"https://api.github.com/users/s0nea/events{/privacy}","received_events_url":"https://api.github.com/users/s0nea/received_events","type":"User","site_admin":false},"repo":{"id":119037592,"node_id":"MDEwOlJlcG9zaXRvcnkxMTkwMzc1OTI=","name":"ceph","full_name":"s0nea/ceph","private":false,"owner":{"login":"s0nea","id":8761082,"node_id":"MDQ6VXNlcjg3NjEwODI=","avatar_url":"https://avatars2.githubusercontent.com/u/8761082?v=4","gravatar_id":"","url":"https://api.github.com/users/s0nea","html_url":"https://github.com/s0nea","followers_url":"https://api.github.com/users/s0nea/followers","following_url":"https://api.github.com/users/s0nea/following{/other_user}","gists_url":"https://api.github.com/users/s0nea/gists{/gist_id}","starred_url":"https://api.github.com/users/s0nea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s0nea/subscriptions","organizations_url":"https://api.github.com/users/s0nea/orgs","repos_url":"https://api.github.com/users/s0nea/repos","events_url":"https://api.github.com/users/s0nea/events{/privacy}","received_events_url":"https://api.github.com/users/s0nea/received_events","type":"User","site_admin":false},"html_url":"https://github.com/s0nea/ceph","description":"Ceph is a distributed object, block, and file storage platform ","fork":true,"url":"https://api.github.com/repos/s0nea/ceph","forks_url":"https://api.github.com/repos/s0nea/ceph/forks","keys_url":"https://api.github.com/repos/s0nea/ceph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/s0nea/ceph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/s0nea/ceph/teams","hooks_url":"https://api.github.com/repos/s0nea/ceph/hooks","issue_events_url":"https://api.github.com/repos/s0nea/ceph/issues/events{/number}","events_url":"https://api.github.com/repos/s0nea/ceph/events","assignees_url":"https://api.github.com/repos/s0nea/ceph/assignees{/user}","branches_url":"https://api.github.com/repos/s0nea/ceph/branches{/branch}","tags_url":"https://api.github.com/repos/s0nea/ceph/tags","blobs_url":"https://api.github.com/repos/s0nea/ceph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/s0nea/ceph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/s0nea/ceph/git/refs{/sha}","trees_url":"https://api.github.com/repos/s0nea/ceph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/s0nea/ceph/statuses/{sha}","languages_url":"https://api.github.com/repos/s0nea/ceph/languages","stargazers_url":"https://api.github.com/repos/s0nea/ceph/stargazers","contributors_url":"https://api.github.com/repos/s0nea/ceph/contributors","subscribers_url":"https://api.github.com/repos/s0nea/ceph/subscribers","subscription_url":"https://api.github.com/repos/s0nea/ceph/subscription","commits_url":"https://api.github.com/repos/s0nea/ceph/commits{/sha}","git_commits_url":"https://api.github.com/repos/s0nea/ceph/git/commits{/sha}","comments_url":"https://api.github.com/repos/s0nea/ceph/comments{/number}","issue_comment_url":"https://api.github.com/repos/s0nea/ceph/issues/comments{/number}","contents_url":"https://api.github.com/repos/s0nea/ceph/contents/{+path}","compare_url":"https://api.github.com/repos/s0nea/ceph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/s0nea/ceph/merges","archive_url":"https://api.github.com/repos/s0nea/ceph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/s0nea/ceph/downloads","issues_url":"https://api.github.com/repos/s0nea/ceph/issues{/number}","pulls_url":"https://api.github.com/repos/s0nea/ceph/pulls{/number}","milestones_url":"https://api.github.com/repos/s0nea/ceph/milestones{/number}","notifications_url":"https://api.github.com/repos/s0nea/ceph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/s0nea/ceph/labels{/name}","releases_url":"https://api.github.com/repos/s0nea/ceph/releases{/id}","deployments_url":"https://api.github.com/repos/s0nea/ceph/deployments","created_at":"2018-01-26T10:16:04Z","updated_at":"2018-01-26T10:16:25Z","pushed_at":"2018-11-20T15:46:42Z","git_url":"git://github.com/s0nea/ceph.git","ssh_url":"git@github.com:s0nea/ceph.git","clone_url":"https://github.com/s0nea/ceph.git","svn_url":"https://github.com/s0nea/ceph","homepage":"http://ceph.com","size":319462,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"wip-mgr-dashboard_v2"}},"base":{"label":"ceph:master","ref":"master","sha":"1334e194f990610e91b23426d72c63b8f77c69a1","user":{"login":"ceph","id":1015767,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMTU3Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/1015767?v=4","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"repo":{"id":2310495,"node_id":"MDEwOlJlcG9zaXRvcnkyMzEwNDk1","name":"ceph","full_name":"ceph/ceph","private":false,"owner":{"login":"ceph","id":1015767,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMTU3Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/1015767?v=4","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ceph/ceph","description":"Ceph is a distributed object, block, and file storage platform ","fork":false,"url":"https://api.github.com/repos/ceph/ceph","forks_url":"https://api.github.com/repos/ceph/ceph/forks","keys_url":"https://api.github.com/repos/ceph/ceph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ceph/ceph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ceph/ceph/teams","hooks_url":"https://api.github.com/repos/ceph/ceph/hooks","issue_events_url":"https://api.github.com/repos/ceph/ceph/issues/events{/number}","events_url":"https://api.github.com/repos/ceph/ceph/events","assignees_url":"https://api.github.com/repos/ceph/ceph/assignees{/user}","branches_url":"https://api.github.com/repos/ceph/ceph/branches{/branch}","tags_url":"https://api.github.com/repos/ceph/ceph/tags","blobs_url":"https://api.github.com/repos/ceph/ceph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ceph/ceph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ceph/ceph/git/refs{/sha}","trees_url":"https://api.github.com/repos/ceph/ceph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ceph/ceph/statuses/{sha}","languages_url":"https://api.github.com/repos/ceph/ceph/languages","stargazers_url":"https://api.github.com/repos/ceph/ceph/stargazers","contributors_url":"https://api.github.com/repos/ceph/ceph/contributors","subscribers_url":"https://api.github.com/repos/ceph/ceph/subscribers","subscription_url":"https://api.github.com/repos/ceph/ceph/subscription","commits_url":"https://api.github.com/repos/ceph/ceph/commits{/sha}","git_commits_url":"https://api.github.com/repos/ceph/ceph/git/commits{/sha}","comments_url":"https://api.github.com/repos/ceph/ceph/comments{/number}","issue_comment_url":"https://api.github.com/repos/ceph/ceph/issues/comments{/number}","contents_url":"https://api.github.com/repos/ceph/ceph/contents/{+path}","compare_url":"https://api.github.com/repos/ceph/ceph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ceph/ceph/merges","archive_url":"https://api.github.com/repos/ceph/ceph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ceph/ceph/downloads","issues_url":"https://api.github.com/repos/ceph/ceph/issues{/number}","pulls_url":"https://api.github.com/repos/ceph/ceph/pulls{/number}","milestones_url":"https://api.github.com/repos/ceph/ceph/milestones{/number}","notifications_url":"https://api.github.com/repos/ceph/ceph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ceph/ceph/labels{/name}","releases_url":"https://api.github.com/repos/ceph/ceph/releases{/id}","deployments_url":"https://api.github.com/repos/ceph/ceph/deployments","created_at":"2011-09-01T21:41:26Z","updated_at":"2018-11-20T15:52:06Z","pushed_at":"2018-11-20T15:50:12Z","git_url":"git://github.com/ceph/ceph.git","ssh_url":"git@github.com:ceph/ceph.git","clone_url":"https://github.com/ceph/ceph.git","svn_url":"https://github.com/ceph/ceph","homepage":"http://ceph.com","size":333695,"stargazers_count":5290,"watchers_count":5290,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2791,"mirror_url":null,"archived":false,"open_issues_count":632,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2791,"open_issues":632,"watchers":5290,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph/pulls/24968"},"html":{"href":"https://github.com/ceph/ceph/pull/24968"},"issue":{"href":"https://api.github.com/repos/ceph/ceph/issues/24968"},"comments":{"href":"https://api.github.com/repos/ceph/ceph/issues/24968/comments"},"review_comments":{"href":"https://api.github.com/repos/ceph/ceph/pulls/24968/comments"},"review_comment":{"href":"https://api.github.com/repos/ceph/ceph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ceph/ceph/pulls/24968/commits"},"statuses":{"href":"https://api.github.com/repos/ceph/ceph/statuses/a4be451b64c9bfbb0b4b0fd9b48aa44727f7ddc9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"s0nea"}}