From: Kiefer Chang Date: Mon, 8 Jun 2020 07:42:01 +0000 (+0800) Subject: mgr/dashboard: fix OSD critical confirmation modal errors X-Git-Tag: v15.2.5~163^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=45fc63e6bb747bfb25ed6622563638671a9734c4;p=ceph.git mgr/dashboard: fix OSD critical confirmation modal errors - 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 (cherry picked from commit 53401d7a54623e26cfcd538213fd0a7312bf3106) Conflicts: src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html - Changes in the i18n section line 71 - 73 - Removed new lines of "ng template osdUsageTpl" which came with the cherry-pick since the template is already in a tab and thus would be duplicated src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.ts - Match angular 8 line 59 ("ViewChild") --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html index ebb18a9e2de..48a051fa9b4 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html @@ -60,14 +60,16 @@ + let-actionDescription="actionDescription" + let-osdIds="osdIds">
The {selection.hasSingleSelection, select, 1 {OSD is} 0 {OSDs are}} not safe to be {{ actionDescription }}! {{ message }} + i18n>The {selection.hasSingleSelection, select, true {OSD is} false {OSDs are}} not safe to be + {{ actionDescription }}! {{ message }}
- OSD {{ getSelectedOsdIds() | join }} will be -{{ actionDescription }} if you proceed. + OSD {{ osdIds | join }} will be + {{ actionDescription }} if you proceed.
; @ViewChild('safeToDestroyBodyTpl', { static: false }) safeToDestroyBodyTpl: TemplateRef; - @ViewChild('deleteOsdExtraTpl') + @ViewChild('deleteOsdExtraTpl', { static: false }) deleteOsdExtraTpl: TemplateRef; permissions: Permissions; @@ -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,