]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix OSD critical confirmation modal errors 35242/head
authorKiefer Chang <kiefer.chang@suse.com>
Mon, 8 Jun 2020 07:42:01 +0000 (15:42 +0800)
committerKiefer Chang <kiefer.chang@suse.com>
Mon, 8 Jun 2020 07:46:30 +0000 (15:46 +0800)
- Fix OSD IDs are not displayed after submitting actions.
- Fix `OSD is` and `OSDs are` strings are missing in the unsafe
  operation warning panel.

Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.ts

index 761a46e80e7a0c760de64464a5f6c39f5b95310b..aee75c724f28497edcc441f817d408428bd07afb 100644 (file)
 <ng-template #criticalConfirmationTpl
              let-safeToPerform="safeToPerform"
              let-message="message"
-             let-actionDescription="actionDescription">
+             let-actionDescription="actionDescription"
+             let-osdIds="osdIds">
   <div *ngIf="!safeToPerform"
        class="danger">
     <cd-alert-panel type="warning"
-                    i18n>The {selection.hasSingleSelection, select, 1 {OSD is} 0 {OSDs are}} not safe to be
+                    i18n>The {selection.hasSingleSelection, select, true {OSD is} false {OSDs are}} not safe to be
       {{ actionDescription }}! {{ message }}</cd-alert-panel>
   </div>
-  <ng-container i18n><strong>OSD {{ getSelectedOsdIds() | join }}</strong> will be
+  <ng-container i18n><strong>OSD {{ osdIds | join }}</strong> will be
   <strong>{{ actionDescription }}</strong> if you proceed.</ng-container>
 </ng-template>
 
index 43fef70189a2c2277f9302fd569008faf8856fcd..d960da620f37d917ca72d838ee435c35b890ac56 100644 (file)
@@ -518,7 +518,8 @@ export class OsdListComponent extends ListWithDetails implements OnInit {
           bodyContext: {
             safeToPerform: result[checkKey],
             message: result.message,
-            actionDescription: templateItemDescription
+            actionDescription: templateItemDescription,
+            osdIds: this.getSelectedOsdIds()
           },
           childFormGroup: childFormGroup,
           childFormGroupTemplate: childFormGroupTemplate,