Skip to content

Commit

Permalink
Better column widths
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Delporte committed Apr 15, 2024
1 parent 54ad9f7 commit 6a7d080
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

@PageTitle("System Information")
@Route(value = "system-information", layout = BaseLayout.class)
Expand All @@ -29,12 +28,17 @@ public SystemInfoView(@Autowired SystemInfoService systemInfoService) {
Grid<InfoLine> grid = new Grid<>(InfoLine.class, false);
grid.addColumn(InfoLine::type)
.setHeader("Type")
.setWidth("200px")
.setFlexGrow(0)
.setTextAlign(ColumnTextAlign.START);
grid.addColumn(InfoLine::label)
.setHeader("Label")
.setWidth("200px")
.setFlexGrow(0)
.setTextAlign(ColumnTextAlign.START);
grid.addColumn(InfoLine::info)
.setHeader("Info")
.setFlexGrow(1)
.setTextAlign(ColumnTextAlign.START);
grid.setItems(infoList);
add(grid);
Expand All @@ -54,7 +58,7 @@ public void onAttach(AttachEvent event) {
infoList.add(new InfoLine("Board", "Model", board.getBoardModel().getModel().getLabel()));
infoList.add(new InfoLine("Board", "SOC", board.getBoardModel().getSoc()));
infoList.add(new InfoLine("Board", "CPU", board.getBoardModel().getCpu()));
infoList.add(new InfoLine("Board", "Codes", board.getBoardModel().getBoardCodes().stream().collect(Collectors.joining(", "))));
infoList.add(new InfoLine("Board", "Codes", String.join(", ", board.getBoardModel().getBoardCodes())));
infoList.add(new InfoLine("Operating System", "Name", board.getOperatingSystem().getName()));
infoList.add(new InfoLine("Operating System", "Architecture", board.getOperatingSystem().getArchitecture()));
infoList.add(new InfoLine("Operating System", "Version", board.getOperatingSystem().getVersion()));
Expand Down

0 comments on commit 6a7d080

Please sign in to comment.