Skip to content

Commit

Permalink
MID-6557 dashboard label fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Kateryna Honchar committed May 19, 2022
1 parent dd17c3a commit 5942ef4
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2068,8 +2068,10 @@ private MainMenuItem createHomeItems() {
DashboardType dashboard = prismObject.getRealValue();
Validate.notNull(dashboard, "Dashboard object is null");

StringResourceModel label = createStringResourceDefault(WebComponentUtil.getTranslatedPolyString(dashboard.getName()),
WebComponentUtil.getCollectionLabel(dashboard.getDisplay(), null, dashboard));
String dashboardNameKey = WebComponentUtil.getTranslatedPolyString(dashboard.getName());
PolyStringType dashboardDisplayKey = WebComponentUtil.getCollectionLabel(dashboard.getDisplay(), null, dashboard);
StringResourceModel label = StringUtils.isNotEmpty(dashboardNameKey) && dashboardDisplayKey != null ?
createStringResourceDefault(dashboardNameKey, dashboardDisplayKey) : createStringResource("PageAdmin.menu.dashboard");
PageParameters pageParameters = new PageParameters();
pageParameters.add(OnePageParameterEncoder.PARAMETER, dashboard.getOid());
MenuItem menu = new MenuItem(label, "", PageDashboardConfigurable.class, pageParameters, null, null);
Expand Down

0 comments on commit 5942ef4

Please sign in to comment.