Remove navigator from login UI. Add tenant and user param. (#592)
* Remove navigator from login UI. Add tenant and user param. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Params as map. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Cleanup scss. Hide tenant field if provided as GET. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * make fields accessible. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Fix sonar issues. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * i18n available Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
@@ -8,33 +8,36 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.app;
|
||||
|
||||
import org.eclipse.hawkbit.ui.login.HawkbitLoginUI;
|
||||
import org.eclipse.hawkbit.im.authentication.MultitenancyIndicator;
|
||||
import org.eclipse.hawkbit.ui.UiProperties;
|
||||
import org.eclipse.hawkbit.ui.login.AbstractHawkbitLoginUI;
|
||||
import org.eclipse.hawkbit.ui.themes.HawkbitTheme;
|
||||
import org.eclipse.hawkbit.ui.utils.VaadinMessageSource;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.vaadin.spring.security.VaadinSecurity;
|
||||
|
||||
import com.vaadin.spring.annotation.SpringUI;
|
||||
import com.vaadin.spring.navigator.SpringViewProvider;
|
||||
|
||||
/**
|
||||
* Example hawkBit login UI implementation.
|
||||
*
|
||||
* A {@link SpringUI} annotated class must be present in the classpath for the
|
||||
* login path. The easiest way to get an hawkBit login UI running is to extend
|
||||
* the {@link HawkbitLoginUI} and to annotated it with {@link SpringUI} as in
|
||||
* this example to the defined {@link HawkbitTheme#LOGIN_UI_PATH}.
|
||||
* the {@link AbstractHawkbitLoginUI} and to annotated it with {@link SpringUI}
|
||||
* as in this example to the defined {@link HawkbitTheme#LOGIN_UI_PATH}.
|
||||
*/
|
||||
@SpringUI(path = HawkbitTheme.LOGIN_UI_PATH)
|
||||
// Exception squid:MaximumInheritanceDepth - Most of the inheritance comes from
|
||||
// Vaadin.
|
||||
@SuppressWarnings({ "squid:MaximumInheritanceDepth" })
|
||||
public class MyLoginUI extends HawkbitLoginUI {
|
||||
|
||||
@Autowired
|
||||
protected MyLoginUI(final SpringViewProvider viewProvider, final ApplicationContext context) {
|
||||
super(viewProvider, context);
|
||||
}
|
||||
|
||||
public class MyLoginUI extends AbstractHawkbitLoginUI {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Autowired
|
||||
MyLoginUI(final ApplicationContext context, final VaadinSecurity vaadinSecurity, final VaadinMessageSource i18n,
|
||||
final UiProperties uiProperties, final MultitenancyIndicator multiTenancyIndicator) {
|
||||
super(context, vaadinSecurity, i18n, uiProperties, multiTenancyIndicator);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,20 +8,28 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.app;
|
||||
|
||||
import org.eclipse.hawkbit.ui.HawkbitUI;
|
||||
import org.eclipse.hawkbit.ui.AbstractHawkbitUI;
|
||||
import org.eclipse.hawkbit.ui.ErrorView;
|
||||
import org.eclipse.hawkbit.ui.components.NotificationUnreadButton;
|
||||
import org.eclipse.hawkbit.ui.menu.DashboardMenu;
|
||||
import org.eclipse.hawkbit.ui.push.EventPushStrategy;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.vaadin.spring.events.EventBus.UIEventBus;
|
||||
|
||||
import com.vaadin.annotations.Push;
|
||||
import com.vaadin.shared.communication.PushMode;
|
||||
import com.vaadin.shared.ui.ui.Transport;
|
||||
import com.vaadin.spring.annotation.SpringUI;
|
||||
import com.vaadin.spring.navigator.SpringViewProvider;
|
||||
|
||||
/**
|
||||
* Example hawkBit UI implementation.
|
||||
*
|
||||
* A {@link SpringUI} annotated class must be present in the classpath. The
|
||||
* easiest way to get an hawkBit UI running is to extend the {@link HawkbitUI}
|
||||
* and to annotated it with {@link SpringUI} as in this example.
|
||||
* easiest way to get an hawkBit UI running is to extend the
|
||||
* {@link AbstractHawkbitUI} and to annotated it with {@link SpringUI} as in
|
||||
* this example.
|
||||
*
|
||||
*/
|
||||
@SpringUI
|
||||
@@ -29,19 +37,14 @@ import com.vaadin.spring.annotation.SpringUI;
|
||||
// Exception squid:MaximumInheritanceDepth - Most of the inheritance comes from
|
||||
// Vaadin.
|
||||
@SuppressWarnings({ "squid:MaximumInheritanceDepth" })
|
||||
public class MyUI extends HawkbitUI {
|
||||
public class MyUI extends AbstractHawkbitUI {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param pushStrategy
|
||||
* the push strategy
|
||||
* @param eventBus
|
||||
* the event bus
|
||||
*/
|
||||
public MyUI(final EventPushStrategy pushStrategy) {
|
||||
super(pushStrategy);
|
||||
@Autowired
|
||||
MyUI(final EventPushStrategy pushStrategy, final UIEventBus eventBus, final SpringViewProvider viewProvider,
|
||||
final ApplicationContext context, final DashboardMenu dashboardMenu, final ErrorView errorview,
|
||||
final NotificationUnreadButton notificationUnreadButton) {
|
||||
super(pushStrategy, eventBus, viewProvider, context, dashboardMenu, errorview, notificationUnreadButton);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user