From 3f763e7db4d15f8d5677971f0df046e2f1a26c16 Mon Sep 17 00:00:00 2001 From: Kai Zimmermann Date: Sat, 12 Mar 2016 19:08:12 +0100 Subject: [PATCH] Migrated hardcoded doc links to configurable setup. --- .../src/main/resources/application.properties | 15 +++ .../main/resources/hawkbitdefaults.properties | 4 +- .../org/eclipse/hawkbit/ui/UiProperties.java | 126 +++++++++++++++++- .../ui/components/SPUIComponentProvider.java | 22 ++- .../documentation/DocumentationPageLink.java | 79 ----------- .../ui/documentation/DocumentationUtil.java | 47 ------- .../CreateOrUpdateFilterHeader.java | 7 +- .../eclipse/hawkbit/ui/login/LoginView.java | 13 +- .../TargetBulkUpdateWindowLayout.java | 8 +- .../hawkbit/ui/menu/DashboardMenu.java | 17 +-- .../rollout/AddUpdateRolloutWindowLayout.java | 7 +- .../TenantConfigurationDashboardView.java | 9 +- 12 files changed, 196 insertions(+), 158 deletions(-) delete mode 100644 hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/documentation/DocumentationPageLink.java delete mode 100644 hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/documentation/DocumentationUtil.java diff --git a/examples/hawkbit-example-app/src/main/resources/application.properties b/examples/hawkbit-example-app/src/main/resources/application.properties index d3eddeff1..7864087c8 100644 --- a/examples/hawkbit-example-app/src/main/resources/application.properties +++ b/examples/hawkbit-example-app/src/main/resources/application.properties @@ -24,3 +24,18 @@ spring.rabbitmq.port=5672 hawkbit.dmf.rabbitmq.deadLetterQueue=dmf_connector_deadletter hawkbit.dmf.rabbitmq.deadLetterExchange=dmf.connector.deadletter hawkbit.dmf.rabbitmq.receiverQueue=dmf_receiver + +# UI demo account +hawkbit.server.ui.demo.password=admin +hawkbit.server.ui.demo.user=admin +hawkbit.server.ui.demo.tenant=DEFAULT + +# UI help links +hawkbit.server.ui.links.documentation.root=https://github.com/eclipse/hawkbit +hawkbit.server.ui.links.documentation.deployment-view=https://github.com/eclipse/hawkbit +hawkbit.server.ui.links.documentation.distribution-view=https://github.com/eclipse/hawkbit +hawkbit.server.ui.links.documentation.rollout-view=https://github.com/eclipse/hawkbit +hawkbit.server.ui.links.documentation.security=https://github.com/eclipse/hawkbit +hawkbit.server.ui.links.documentation.system-configuration-view=https://github.com/eclipse/hawkbit +hawkbit.server.ui.links.documentation.targetfilter-view=https://github.com/eclipse/hawkbit +hawkbit.server.ui.links.documentation.upload-view=https://github.com/eclipse/hawkbit diff --git a/hawkbit-autoconfigure/src/main/resources/hawkbitdefaults.properties b/hawkbit-autoconfigure/src/main/resources/hawkbitdefaults.properties index 5e767726a..dcb3e8fb4 100644 --- a/hawkbit-autoconfigure/src/main/resources/hawkbitdefaults.properties +++ b/hawkbit-autoconfigure/src/main/resources/hawkbitdefaults.properties @@ -37,7 +37,7 @@ hawkbit.threadpool.queuesize=20000 hawkbit.controller.pollingTime=00:05:00 hawkbit.controller.pollingOverdueTime=00:05:00 -## Configuration for RabbitMQ integration +# Configuration for RabbitMQ integration hawkbit.dmf.rabbitmq.deadLetterQueue=dmf_connector_deadletter hawkbit.dmf.rabbitmq.deadLetterExchange=dmf.connector.deadletter -hawkbit.dmf.rabbitmq.receiverQueue=dmf_receiver +hawkbit.dmf.rabbitmq.receiverQueue=dmf_receiver \ No newline at end of file diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/UiProperties.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/UiProperties.java index b23935826..99ceb9aaf 100644 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/UiProperties.java +++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/UiProperties.java @@ -44,16 +44,16 @@ public class UiProperties { /** * Demo tenant. */ - private String tenant = "DEFAULT"; + private String tenant = ""; /** * Demo user name. */ - private String user = "admin"; + private String user = ""; /** * Demo user password. */ - private String password = "admin"; + private String password = ""; public String getTenant() { return tenant; @@ -82,10 +82,13 @@ public class UiProperties { } /** - * Links to potentially other systems (e.g. support, user management etc.). + * Links to potentially other systems (e.g. support, user management, + * documentation etc.). * */ public static class Links { + private final Documentation documentation = new Documentation(); + /** * Link to product support. */ @@ -96,6 +99,121 @@ public class UiProperties { */ private String requestAccount = ""; + public Documentation getDocumentation() { + return documentation; + } + + /** + * Configuration of UI documentation links. + * + */ + public static class Documentation { + /** + * Link to root of documentation and user guides. + */ + private String root = ""; + + /** + * Link to documentation of deployment view. + */ + private String deploymentView = ""; + + /** + * Link to documentation of distribution view. + */ + private String distributionView = ""; + + /** + * Link to documentation of upload view. + */ + private String uploadView = ""; + + /** + * Link to documentation of system configuration view. + */ + private String systemConfigurationView = ""; + + /** + * Link to security related documentation. + */ + private String security = ""; + + /** + * Link to target filter view. + */ + private String targetfilterView = ""; + + /** + * Link to documentation of rollout view. + */ + private String rolloutView = ""; + + public String getDeploymentView() { + return deploymentView; + } + + public void setDeploymentView(final String deploymentView) { + this.deploymentView = deploymentView; + } + + public String getDistributionView() { + return distributionView; + } + + public void setDistributionView(final String distributionView) { + this.distributionView = distributionView; + } + + public String getUploadView() { + return uploadView; + } + + public void setUploadView(final String uploadView) { + this.uploadView = uploadView; + } + + public String getSystemConfigurationView() { + return systemConfigurationView; + } + + public void setSystemConfigurationView(final String systemConfigurationView) { + this.systemConfigurationView = systemConfigurationView; + } + + public String getSecurity() { + return security; + } + + public void setSecurity(final String security) { + this.security = security; + } + + public String getTargetfilterView() { + return targetfilterView; + } + + public void setTargetfilterView(final String targetfilterView) { + this.targetfilterView = targetfilterView; + } + + public String getRolloutView() { + return rolloutView; + } + + public void setRolloutView(final String rolloutView) { + this.rolloutView = rolloutView; + } + + public String getRoot() { + return root; + } + + public void setRoot(final String root) { + this.root = root; + } + + } + /** * Link to user management. */ diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java index 5b2e4ed9a..f5008eb31 100644 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java +++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java @@ -47,10 +47,6 @@ import com.vaadin.ui.themes.ValoTheme; * Approach to create necessary UI component which are decorated Aspect of fine * tuning the component or extending the component is separated. * - * - * - * - * */ public final class SPUIComponentProvider { private static final Logger LOG = LoggerFactory.getLogger(SPUIComponentProvider.class); @@ -411,4 +407,22 @@ public final class SPUIComponentProvider { return link; } + + /** + * Generates help/documentation links from within management UI. + * + * @param uri + * to documentation site + * + * @return generated link + */ + public static Link getHelpLink(final String uri) { + + final Link link = new Link("", new ExternalResource(uri)); + link.setTargetName("_blank"); + link.setIcon(FontAwesome.QUESTION_CIRCLE); + link.setDescription("Documentation"); + return link; + + } } diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/documentation/DocumentationPageLink.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/documentation/DocumentationPageLink.java deleted file mode 100644 index b4064ef68..000000000 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/documentation/DocumentationPageLink.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Copyright (c) 2015 Bosch Software Innovations GmbH and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package org.eclipse.hawkbit.ui.documentation; - -import com.vaadin.server.ExternalResource; -import com.vaadin.server.FontAwesome; -import com.vaadin.ui.Link; - -/** - * enum declaration which contains all documentation links to the documenation - * which can be used to create the links to a specific documentation from a UI - * view. - * - * - * - * - */ -public enum DocumentationPageLink { - - // Root URL to index.html - ROOT_VIEW(""), - - // userguide/deployment - DEPLOYMENT_VIEW("deployment.html", DocumentationUtil.USERGUIDE), - - // userguide/distribution - DISTRIBUTION_VIEW("distribution.html", DocumentationUtil.USERGUIDE), - - // userguide/upload - UPLOAD_VIEW("upload.html", DocumentationUtil.USERGUIDE), - - // userguide/statistics - STATISTICS_VIEW("statistics.html", DocumentationUtil.USERGUIDE), - - // userguide - SYSTEM_CONFIGURATION_VIEW("systemconfiguration.html", DocumentationUtil.USERGUIDE), - - // authentication/security - TARGET_SECURITY_TOKEN("security.html", DocumentationUtil.DEVELOPERGUIDE, "concepts"), - - // userguide/targetfilter - TARGET_FILTER_VIEW("targetfilter.html", DocumentationUtil.USERGUIDE), - - // userguide/ROLLOUT - ROLLOUT_VIEW("rollout.html", DocumentationUtil.USERGUIDE); - - private static final String ROOT_PATH = "../documentation"; - - private final String[] path; - private final String page; - - private DocumentationPageLink(final String page, final String... path) { - this.path = path; - this.page = page; - } - - public String getPath() { - final StringBuilder builder = new StringBuilder(ROOT_PATH); - for (final String string : path) { - builder.append('/').append(string); - } - return builder.append('/').append(page).toString(); - } - - public Link getLink() { - final Link link = new Link("", new ExternalResource(getPath())); - link.setTargetName("_blank"); - link.setIcon(FontAwesome.QUESTION_CIRCLE); - link.setDescription("Documentation"); - return link; - } - -} diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/documentation/DocumentationUtil.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/documentation/DocumentationUtil.java deleted file mode 100644 index 2454f1903..000000000 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/documentation/DocumentationUtil.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) 2015 Bosch Software Innovations GmbH and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - */ -package org.eclipse.hawkbit.ui.documentation; - -/** - * Constants for documentation navigation. - * - * - * - */ -public final class DocumentationUtil { - - /** - * Navigation string to introduction folder. - */ - public static final String INTRODUCTION = "introduction"; - - /** - * Navigation string to userguide folder. - */ - public static final String USERGUIDE = "userguide"; - - /** - * Navigation string to developerguide folder. - */ - public static final String DEVELOPERGUIDE = "developerguide"; - - /** - * Navigation string to releasenotes folder. - */ - public static final String RELEASENOTES = "releasenotes"; - - /** - * Navigation string to glossary folder. - */ - public static final String GLOSSARY = "glossary"; - - private DocumentationUtil() { - } - -} diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/CreateOrUpdateFilterHeader.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/CreateOrUpdateFilterHeader.java index 43f5919ef..6c0324a6a 100644 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/CreateOrUpdateFilterHeader.java +++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/filtermanagement/CreateOrUpdateFilterHeader.java @@ -16,10 +16,10 @@ import javax.annotation.PreDestroy; import org.eclipse.hawkbit.repository.SpPermissionChecker; import org.eclipse.hawkbit.repository.TargetFilterQueryManagement; import org.eclipse.hawkbit.repository.model.TargetFilterQuery; +import org.eclipse.hawkbit.ui.UiProperties; import org.eclipse.hawkbit.ui.components.SPUIButton; import org.eclipse.hawkbit.ui.components.SPUIComponentProvider; import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder; -import org.eclipse.hawkbit.ui.documentation.DocumentationPageLink; import org.eclipse.hawkbit.ui.filtermanagement.event.CustomFilterUIEvent; import org.eclipse.hawkbit.ui.filtermanagement.state.FilterManagementUIState; import org.eclipse.hawkbit.ui.utils.I18N; @@ -86,6 +86,9 @@ public class CreateOrUpdateFilterHeader extends VerticalLayout implements Button @Autowired private UINotification notification; + @Autowired + private transient UiProperties uiProperties; + @Autowired @Qualifier("uiExecutor") private transient Executor executor; @@ -212,7 +215,7 @@ public class CreateOrUpdateFilterHeader extends VerticalLayout implements Button validationIcon = createStatusIcon(); saveButton = createSaveButton(); - helpLink = DocumentationPageLink.TARGET_FILTER_VIEW.getLink(); + helpLink = SPUIComponentProvider.getHelpLink(uiProperties.getLinks().getDocumentation().getTargetfilterView()); closeIcon = createSearchResetIcon(); } diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/login/LoginView.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/login/LoginView.java index ea3cf44e9..0ddf0fcd3 100644 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/login/LoginView.java +++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/login/LoginView.java @@ -17,7 +17,6 @@ import org.eclipse.hawkbit.im.authentication.MultitenancyIndicator; import org.eclipse.hawkbit.im.authentication.TenantUserPasswordAuthenticationToken; import org.eclipse.hawkbit.ui.UiProperties; import org.eclipse.hawkbit.ui.components.SPUIComponentProvider; -import org.eclipse.hawkbit.ui.documentation.DocumentationPageLink; import org.eclipse.hawkbit.ui.utils.I18N; import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider; import org.slf4j.Logger; @@ -225,11 +224,13 @@ public class LoginView extends VerticalLayout implements View { links.addStyleName("links"); final String linkStyle = "v-link"; - final Link docuLink = SPUIComponentProvider.getLink(SPUIComponetIdProvider.LINK_DOCUMENATION, - i18n.get("link.documentation.name"), "../" + DocumentationPageLink.ROOT_VIEW.getPath(), - FontAwesome.QUESTION_CIRCLE, "_blank", linkStyle, true); - links.addComponent(docuLink); - docuLink.addStyleName(ValoTheme.LINK_SMALL); + if (!uiProperties.getLinks().getDocumentation().getRoot().isEmpty()) { + final Link docuLink = SPUIComponentProvider.getLink(SPUIComponetIdProvider.LINK_DOCUMENATION, + i18n.get("link.documentation.name"), uiProperties.getLinks().getDocumentation().getRoot(), + FontAwesome.QUESTION_CIRCLE, "_blank", linkStyle, true); + links.addComponent(docuLink); + docuLink.addStyleName(ValoTheme.LINK_SMALL); + } if (!uiProperties.getDemo().getUser().isEmpty()) { final Link demoLink = SPUIComponentProvider.getLink(SPUIComponetIdProvider.LINK_DEMO, diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettable/TargetBulkUpdateWindowLayout.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettable/TargetBulkUpdateWindowLayout.java index 72174a0c5..657cd97af 100644 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettable/TargetBulkUpdateWindowLayout.java +++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettable/TargetBulkUpdateWindowLayout.java @@ -18,9 +18,9 @@ import javax.annotation.PreDestroy; import org.eclipse.hawkbit.repository.DeploymentManagement; import org.eclipse.hawkbit.repository.TargetManagement; import org.eclipse.hawkbit.repository.model.DistributionSetIdName; +import org.eclipse.hawkbit.ui.UiProperties; import org.eclipse.hawkbit.ui.components.SPUIComponentProvider; import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder; -import org.eclipse.hawkbit.ui.documentation.DocumentationPageLink; import org.eclipse.hawkbit.ui.management.dstable.DistributionBeanQuery; import org.eclipse.hawkbit.ui.management.event.BulkUploadPopupEvent; import org.eclipse.hawkbit.ui.management.state.ManagementUIState; @@ -88,6 +88,9 @@ public class TargetBulkUpdateWindowLayout extends CustomComponent { @Autowired private transient DeploymentManagement deploymentManagement; + @Autowired + private transient UiProperties uiproperties; + private static final long serialVersionUID = -6659290471705262389L; private VerticalLayout tokenVerticalLayout; private TextArea descTextArea; @@ -141,7 +144,8 @@ public class TargetBulkUpdateWindowLayout extends CustomComponent { progressBar = creatreProgressBar(); targetsCountLabel = getStatusCountLabel(); bulkUploader = getBulkUploadHandler(); - linkToSystemConfigHelp = DocumentationPageLink.DEPLOYMENT_VIEW.getLink(); + linkToSystemConfigHelp = SPUIComponentProvider + .getHelpLink(uiproperties.getLinks().getDocumentation().getDeploymentView()); windowCaption = new Label(i18n.get("caption.bulk.upload.targets")); minimizeButton = getMinimizeButton(); closeButton = getCloseButton(); diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/menu/DashboardMenu.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/menu/DashboardMenu.java index beff0e6b9..bbbba8cec 100644 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/menu/DashboardMenu.java +++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/menu/DashboardMenu.java @@ -23,7 +23,6 @@ import org.eclipse.hawkbit.im.authentication.PermissionService; import org.eclipse.hawkbit.im.authentication.UserPrincipal; import org.eclipse.hawkbit.ui.UiProperties; import org.eclipse.hawkbit.ui.components.SPUIComponentProvider; -import org.eclipse.hawkbit.ui.documentation.DocumentationPageLink; import org.eclipse.hawkbit.ui.menu.DashboardEvent.PostViewChangeEvent; import org.eclipse.hawkbit.ui.utils.I18N; import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider; @@ -151,13 +150,15 @@ public final class DashboardMenu extends CustomComponent { links.addStyleName("links"); final String linkStyle = "v-link"; - final Link docuLink = SPUIComponentProvider.getLink(SPUIComponetIdProvider.LINK_DOCUMENATION, - i18n.get("link.documentation.name"), "../" + DocumentationPageLink.ROOT_VIEW.getPath(), - FontAwesome.QUESTION_CIRCLE, "_blank", linkStyle, true); - docuLink.setDescription(i18n.get("link.documentation.name")); - docuLink.setSizeFull(); - links.addComponent(docuLink); - links.setComponentAlignment(docuLink, Alignment.BOTTOM_CENTER); + if (!uiProperties.getLinks().getDocumentation().getRoot().isEmpty()) { + final Link docuLink = SPUIComponentProvider.getLink(SPUIComponetIdProvider.LINK_DOCUMENATION, + i18n.get("link.documentation.name"), uiProperties.getLinks().getDocumentation().getRoot(), + FontAwesome.QUESTION_CIRCLE, "_blank", linkStyle, true); + docuLink.setDescription(i18n.get("link.documentation.name")); + docuLink.setSizeFull(); + links.addComponent(docuLink); + links.setComponentAlignment(docuLink, Alignment.BOTTOM_CENTER); + } if (!uiProperties.getLinks().getUserManagement().isEmpty()) { final Link userManagementLink = SPUIComponentProvider.getLink(SPUIComponetIdProvider.LINK_USERMANAGEMENT, diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/AddUpdateRolloutWindowLayout.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/AddUpdateRolloutWindowLayout.java index cdcbbcede..f737ad952 100644 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/AddUpdateRolloutWindowLayout.java +++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/AddUpdateRolloutWindowLayout.java @@ -26,9 +26,9 @@ import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupErrorAction import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupErrorCondition; import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupSuccessAction; import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupSuccessCondition; +import org.eclipse.hawkbit.ui.UiProperties; import org.eclipse.hawkbit.ui.components.SPUIComponentProvider; import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder; -import org.eclipse.hawkbit.ui.documentation.DocumentationPageLink; import org.eclipse.hawkbit.ui.filtermanagement.TargetFilterBeanQuery; import org.eclipse.hawkbit.ui.management.footer.ActionTypeOptionGroupLayout; import org.eclipse.hawkbit.ui.management.footer.ActionTypeOptionGroupLayout.ActionTypeOption; @@ -104,6 +104,9 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent { @Autowired private UINotification uiNotification; + @Autowired + private transient UiProperties uiProperties; + @Autowired private I18N i18n; @@ -284,7 +287,7 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent { totalTargetsLabel = createTotalTargetsLabel(); targetFilterQuery = createTargetFilterQuery(); - linkToHelp = DocumentationPageLink.ROLLOUT_VIEW.getLink(); + linkToHelp = SPUIComponentProvider.getHelpLink(uiProperties.getLinks().getDocumentation().getRolloutView()); actionTypeOptionGroupLayout.addStyleName(SPUIStyleDefinitions.ROLLOUT_ACTION_TYPE_LAYOUT); } diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/tenantconfiguration/TenantConfigurationDashboardView.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/tenantconfiguration/TenantConfigurationDashboardView.java index dc44e6de8..7cf69f460 100644 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/tenantconfiguration/TenantConfigurationDashboardView.java +++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/tenantconfiguration/TenantConfigurationDashboardView.java @@ -9,9 +9,9 @@ package org.eclipse.hawkbit.ui.tenantconfiguration; import org.eclipse.hawkbit.ui.HawkbitUI; +import org.eclipse.hawkbit.ui.UiProperties; import org.eclipse.hawkbit.ui.components.SPUIComponentProvider; import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder; -import org.eclipse.hawkbit.ui.documentation.DocumentationPageLink; import org.eclipse.hawkbit.ui.tenantconfiguration.ConfigurationGroup.ConfigurationGroupChangeListener; import org.eclipse.hawkbit.ui.utils.I18N; import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider; @@ -54,6 +54,9 @@ public class TenantConfigurationDashboardView extends CustomComponent @Autowired private I18N i18n; + @Autowired + private transient UiProperties uiProperties; + @Autowired private transient UINotification uINotification; @@ -101,7 +104,9 @@ public class TenantConfigurationDashboardView extends CustomComponent undoConfigurationBtn.addClickListener(event -> undoConfiguration()); hlayout.addComponent(undoConfigurationBtn); - final Link linkToSystemConfigHelp = DocumentationPageLink.SYSTEM_CONFIGURATION_VIEW.getLink(); + final Link linkToSystemConfigHelp = SPUIComponentProvider + .getHelpLink(uiProperties.getLinks().getDocumentation().getSystemConfigurationView()); + ; hlayout.addComponent(linkToSystemConfigHelp); return hlayout;