]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix service form count bugs 57864/head
authorAfreen Misbah <afreen23.git@gmail.com>
Sat, 22 Jun 2024 02:18:33 +0000 (07:48 +0530)
committerAfreen Misbah <afreen23.git@gmail.com>
Fri, 5 Jul 2024 08:22:48 +0000 (13:52 +0530)
Fixes https://tracker.ceph.com/issues/66608

- for services which do not have a count set default count to be null, otherwise the previous selected service's count is used which is wrong
- make count null when label is selected for placement

Signed-off-by: Afreen Misbah <afreen23.git@gmail.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html

index 7a439e23dfe70ab4c1547b1a0c532f1245a1a885..c659d76b97e1219eb4641a88c3c3957747fb00f5 100644 (file)
             <select id="placement"
                     class="form-select"
                     formControlName="placement"
-                    (change)="onServiceTypeChange($event.target.value)">
+                    (change)="onPlacementChange($event.target.value)">
               <option i18n
                       value="hosts">Hosts</option>
               <option i18n
index 85a8d4df8e4457f46a6f2b8292b458b32d95457a..da7fca61bc24bcb29a85b24af52a3a4eb336d22f 100644 (file)
@@ -811,6 +811,12 @@ export class ServiceFormComponent extends CdForm implements OnInit {
     }
   }
 
+  onPlacementChange(selected: string) {
+    if (selected === 'label') {
+      this.serviceForm.get('count').setValue(null);
+    }
+  }
+
   onBlockPoolChange() {
     const selectedBlockPool = this.serviceForm.get('pool').value;
     if (selectedBlockPool) {
index 7a05299e1828af42020651b1cf5d3c43855d49b8..0d1a6fc728752dea5b06e002cf8cdce398aa4b82 100644 (file)
     </div>
     </ng-container>
   </ng-template>
-<<<<<<< HEAD
   </div>
-=======
-  </div>
->>>>>>> 851da7eae8e (mgr/dashboard: Introduce NVMe/TCP navigation)