mgr/dashboard: Edit a service feature #43903
Conversation
Fixes: https://tracker.ceph.com/issues/53077 Signed-off-by: Nizamudeen A <nia@redhat.com>
|
jenkins test dashboard |
|
jenkins test dashboard |
|
jenkins test dashboard cephadm |
1 similar comment
|
jenkins test dashboard cephadm |
|
jenkins test dashboard |
pereman2
left a comment
There was a problem hiding this comment.
Working fine locally.
There is one nit that I don't like. When you select a service you cant edit that service, but if you want to create another service after selecting a service, you have to create it from the dropdown or refresh the window.
Usually when you click outside the table in other apps, the selection gets unselected.
Can't edit?
Yup, i got that. Its happening in most of the table. @pereman2 would you create a tracker describing this issue. Might be a small issue that can be dealt with |
There was a problem hiding this comment.
Tested locally, editing works fine
Screencast.from.11-12-2021.06.15.40.PM.mp4
Btw, for ingress service I think some logic for editing count should be implemented bcz it creates 2 daemons for each rgw daemon (ha-proxy & keep-alived) so maybe we first of all shouldn't allow to decrease the count and for increment it should always be an even number. What you think @sebastian-philipp ?
Logic: count >= 2 * rgw_daemons_running && count%2===0
Brain fart, can
Sure. |
| this.action = this.actionLabels.CREATE; | ||
| if (this.router.url.includes('services/(modal:create')) { | ||
| this.pageURL = 'services'; | ||
| } else if (this.router.url.includes('services/(modal:edit')) { | ||
| this.editing = true; | ||
| this.pageURL = 'services'; | ||
| this.route.params.subscribe((params: { type: string; name: string }) => { | ||
| this.serviceName = params.name; | ||
| this.serviceType = params.type; | ||
| }); |
There was a problem hiding this comment.
I was recently thinking if there would be a way to pass router params as component @Inputs... And found this library and a blog post explaining how it works.
| if (this.editing) { | ||
| this.action = this.actionLabels.EDIT; | ||
| this.disableForEditing(this.serviceType); | ||
| this.cephServiceService.list(this.serviceName).subscribe((response: CephServiceSpec[]) => { | ||
| const formKeys = ['service_type', 'service_id', 'unmanaged']; | ||
| formKeys.forEach((keys) => { |
There was a problem hiding this comment.
Sorry for my ignorance with this part of the code, but I'm a bit astonished about how complicate is to populate the form... We have lots of back-end data harcoded here (service_type, service_id, etc). Couldn't we get this info from the back-end? Can't we use a UI API endpoint to provide all this information already processed from the back-end, so that the front-end only has to "render" it?
There was a problem hiding this comment.
Fixes: https://tracker.ceph.com/issues/53077
Signed-off-by: Nizamudeen A nia@redhat.com
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox