Cleanup/fix jackson 2 -> 3 migration (#3024)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -109,7 +109,7 @@ public class MainLayout extends AppLayout {
|
||||
final HorizontalLayout layout = new HorizontalLayout();
|
||||
layout.setPadding(true);
|
||||
layout.setJustifyContentMode(FlexComponent.JustifyContentMode.CENTER);
|
||||
final Image icon = new Image("images/header_icon.png", "hawkBit icon");
|
||||
final Image icon = new Image("images/hawkbit.png", "hawkBit icon");
|
||||
icon.setMaxHeight(24, Unit.PIXELS);
|
||||
icon.setMaxWidth(24, Unit.PIXELS);
|
||||
appName.addClassNames(LumoUtility.AlignItems.BASELINE, LumoUtility.FontSize.LARGE, LumoUtility.Margin.NONE);
|
||||
@@ -141,9 +141,9 @@ public class MainLayout extends AppLayout {
|
||||
if (accessChecker.hasAccess(ConfigView.class)) {
|
||||
nav.addItem(new SideNavItem("Config", ConfigView.class, VaadinIcon.COG.create()));
|
||||
}
|
||||
// if (accessChecker.hasAccess(AboutView.class)) {
|
||||
// nav.addItem(new SideNavItem("About", AboutView.class, VaadinIcon.INFO_CIRCLE.create()));
|
||||
// }
|
||||
if (accessChecker.hasAccess(AboutView.class)) {
|
||||
nav.addItem(new SideNavItem("About", AboutView.class, VaadinIcon.INFO_CIRCLE.create()));
|
||||
}
|
||||
defaultView = DEFAULT_VIEW_PRIORITY.stream().filter(accessChecker::hasAccess).findFirst().orElse(null);
|
||||
return nav;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public final class AboutView extends VerticalLayout {
|
||||
public AboutView() {
|
||||
setSpacing(false);
|
||||
|
||||
final Image img = new Image("images/about_image.png", "hawkBit");
|
||||
final Image img = new Image("images/hawkbit_logo.png", "hawkBit");
|
||||
img.setWidth("200px");
|
||||
add(img);
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.view;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.vaadin.flow.component.Component;
|
||||
import com.vaadin.flow.component.Key;
|
||||
import com.vaadin.flow.component.Unit;
|
||||
@@ -49,6 +48,7 @@ import org.eclipse.hawkbit.ui.view.util.Filter;
|
||||
import org.eclipse.hawkbit.ui.view.util.SelectionGrid;
|
||||
import org.eclipse.hawkbit.ui.view.util.TableView;
|
||||
import org.eclipse.hawkbit.ui.view.util.Utils;
|
||||
import tools.jackson.databind.ObjectMapper;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.List;
|
||||
@@ -374,7 +374,7 @@ public class TargetFilterQueryView extends TableView<TargetFilterQueryView.Targe
|
||||
}
|
||||
}
|
||||
|
||||
// todo change /targetfilters api to reduce api calls ?
|
||||
// TODO - change /targetfilters api to reduce api calls ?
|
||||
@Getter
|
||||
public static class TargetFilterQueryGridItem extends MgmtTargetFilterQuery {
|
||||
|
||||
@@ -383,10 +383,10 @@ public class TargetFilterQueryView extends TableView<TargetFilterQueryView.Targe
|
||||
}
|
||||
|
||||
private Optional<MgmtDistributionSet> ds;
|
||||
static ObjectMapper objectMapper = new ObjectMapper();
|
||||
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
|
||||
|
||||
public static TargetFilterQueryGridItem from(final HawkbitMgmtClient hawkbitClient, MgmtTargetFilterQuery filter) {
|
||||
TargetFilterQueryGridItem filterGridItem = objectMapper.convertValue(filter, TargetFilterQueryGridItem.class);
|
||||
TargetFilterQueryGridItem filterGridItem = OBJECT_MAPPER.convertValue(filter, TargetFilterQueryGridItem.class);
|
||||
|
||||
if (filterGridItem.getAutoAssignDistributionSet() != null) {
|
||||
filterGridItem.ds = Optional.ofNullable(
|
||||
|
||||
@@ -28,7 +28,6 @@ import java.util.stream.Stream;
|
||||
|
||||
import jakarta.annotation.security.RolesAllowed;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.vaadin.flow.component.AttachEvent;
|
||||
import com.vaadin.flow.component.ClickEvent;
|
||||
import com.vaadin.flow.component.Component;
|
||||
@@ -86,6 +85,7 @@ import org.eclipse.hawkbit.ui.view.util.TableView;
|
||||
import org.eclipse.hawkbit.ui.view.util.Utils;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import tools.jackson.databind.ObjectMapper;
|
||||
|
||||
@PageTitle("Targets")
|
||||
@Route(value = "targets", layout = MainLayout.class)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 KiB |
Reference in New Issue
Block a user