Skip to content

Commit

Permalink
Rename simple ui package com -> org (#1541)
Browse files Browse the repository at this point in the history
Signed-off-by: Marinov Avgustin <[email protected]>
  • Loading branch information
avgustinmm authored Jan 11, 2024
1 parent ff015fd commit d1bdca0
Show file tree
Hide file tree
Showing 18 changed files with 116 additions and 118 deletions.
4 changes: 2 additions & 2 deletions hawkbit-runtime/hawkbit-simple-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<relativePath/>
</parent>

<groupId>com.eclipse.hawkbit</groupId>
<groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-simple-ui</artifactId>
<version>${revision}</version>
<packaging>jar</packaging>
Expand Down Expand Up @@ -272,7 +272,7 @@
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<stagingProfileId>1d2b23f380235e</stagingProfileId>
<!-- <stagingProfileId>1d2b23f380235e</stagingProfileId>-->
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package com.eclipse.hawkbit.ui;
package org.eclipse.hawkbit.ui;

import com.eclipse.hawkbit.ui.view.util.Utils;
import com.vaadin.flow.component.UI;
import org.eclipse.hawkbit.ui.view.util.Utils;
import feign.Client;
import feign.Contract;
import feign.Feign;
import feign.FeignException;
import feign.RequestInterceptor;
import feign.Response;
import feign.codec.Decoder;
import feign.codec.Encoder;
import feign.codec.ErrorDecoder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package com.eclipse.hawkbit.ui;

import com.eclipse.hawkbit.ui.view.RolloutView;
import com.eclipse.hawkbit.ui.view.TargetView;
import com.eclipse.hawkbit.ui.security.AuthenticatedUser;
import com.eclipse.hawkbit.ui.view.AboutView;
import com.eclipse.hawkbit.ui.view.DistributionSetView;
import com.eclipse.hawkbit.ui.view.SoftwareModuleView;
package org.eclipse.hawkbit.ui;

import org.eclipse.hawkbit.ui.view.RolloutView;
import org.eclipse.hawkbit.ui.view.TargetView;
import org.eclipse.hawkbit.ui.security.AuthenticatedUser;
import org.eclipse.hawkbit.ui.view.AboutView;
import org.eclipse.hawkbit.ui.view.DistributionSetView;
import org.eclipse.hawkbit.ui.view.SoftwareModuleView;
import com.vaadin.flow.component.Unit;
import com.vaadin.flow.component.applayout.AppLayout;
import com.vaadin.flow.component.applayout.DrawerToggle;
Expand All @@ -38,6 +38,7 @@
import com.vaadin.flow.router.PageTitle;
import com.vaadin.flow.server.auth.AccessAnnotationChecker;
import com.vaadin.flow.theme.lumo.LumoUtility;

import java.util.Optional;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package com.eclipse.hawkbit.ui;
package org.eclipse.hawkbit.ui;

import com.vaadin.flow.component.page.AppShellConfigurator;
import com.vaadin.flow.server.PWA;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package com.eclipse.hawkbit.ui.security;
package org.eclipse.hawkbit.ui.security;

import com.vaadin.flow.spring.security.AuthenticationContext;
import org.springframework.stereotype.Component;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package com.eclipse.hawkbit.ui.security;
package org.eclipse.hawkbit.ui.security;

import com.eclipse.hawkbit.ui.view.LoginView;
import org.eclipse.hawkbit.ui.view.LoginView;
import com.vaadin.flow.spring.security.VaadinWebSecurity;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package com.eclipse.hawkbit.ui.view;
package org.eclipse.hawkbit.ui.view;

import com.eclipse.hawkbit.ui.MainLayout;
import org.eclipse.hawkbit.ui.MainLayout;
import com.vaadin.flow.component.html.H2;
import com.vaadin.flow.component.html.Image;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package com.eclipse.hawkbit.ui.view;
package org.eclipse.hawkbit.ui.view;

public interface Constants {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package com.eclipse.hawkbit.ui.view;

import com.eclipse.hawkbit.ui.HawkbitClient;
import com.eclipse.hawkbit.ui.view.util.Filter;
import com.eclipse.hawkbit.ui.MainLayout;
import com.eclipse.hawkbit.ui.view.util.SelectionGrid;
import com.eclipse.hawkbit.ui.view.util.TableView;
import com.eclipse.hawkbit.ui.view.util.Utils;
package org.eclipse.hawkbit.ui.view;

import org.eclipse.hawkbit.ui.HawkbitClient;
import org.eclipse.hawkbit.ui.view.util.Filter;
import org.eclipse.hawkbit.ui.MainLayout;
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 com.vaadin.flow.component.Component;
import com.vaadin.flow.component.Key;
import com.vaadin.flow.component.button.Button;
Expand Down Expand Up @@ -65,18 +65,18 @@ public DistributionSetView(final HawkbitClient hawkbitClient) {

@Override
protected void addColumns(Grid<MgmtDistributionSet> grid) {
grid.addColumn(MgmtDistributionSet::getDsId).setHeader(ID).setAutoWidth(true);
grid.addColumn(MgmtDistributionSet::getName).setHeader(NAME).setAutoWidth(true);
grid.addColumn(MgmtDistributionSet::getVersion).setHeader(VERSION).setAutoWidth(true);
grid.addColumn(MgmtDistributionSet::getTypeName).setHeader(TYPE).setAutoWidth(true);
grid.addColumn(MgmtDistributionSet::getDsId).setHeader(Constants.ID).setAutoWidth(true);
grid.addColumn(MgmtDistributionSet::getName).setHeader(Constants.NAME).setAutoWidth(true);
grid.addColumn(MgmtDistributionSet::getVersion).setHeader(Constants.VERSION).setAutoWidth(true);
grid.addColumn(MgmtDistributionSet::getTypeName).setHeader(Constants.TYPE).setAutoWidth(true);

grid.setItemDetailsRenderer(new ComponentRenderer<>(
() -> details, DistributionSetDetails::setItem));
}
},
(query, rsqlFilter) -> hawkbitClient.getDistributionSetRestApi()
.getDistributionSets(
query.getOffset(), query.getPageSize(), NAME_ASC, rsqlFilter)
query.getOffset(), query.getPageSize(), Constants.NAME_ASC, rsqlFilter)
.getBody()
.getContent()
.stream(),
Expand All @@ -95,11 +95,11 @@ private static SelectionGrid<MgmtSoftwareModule, Long> selectSoftwareModuleGrid(
MgmtSoftwareModule.class, MgmtSoftwareModule::getModuleId) {
@Override
protected void addColumns(Grid<MgmtSoftwareModule> grid) {
grid.addColumn(MgmtSoftwareModule::getModuleId).setHeader(ID).setAutoWidth(true);
grid.addColumn(MgmtSoftwareModule::getName).setHeader(NAME).setAutoWidth(true);
grid.addColumn(MgmtSoftwareModule::getVersion).setHeader(VERSION).setAutoWidth(true);
grid.addColumn(MgmtSoftwareModule::getTypeName).setHeader(TYPE).setAutoWidth(true);
grid.addColumn(MgmtSoftwareModule::getVendor).setHeader(VENDOR).setAutoWidth(true);
grid.addColumn(MgmtSoftwareModule::getModuleId).setHeader(Constants.ID).setAutoWidth(true);
grid.addColumn(MgmtSoftwareModule::getName).setHeader(Constants.NAME).setAutoWidth(true);
grid.addColumn(MgmtSoftwareModule::getVersion).setHeader(Constants.VERSION).setAutoWidth(true);
grid.addColumn(MgmtSoftwareModule::getTypeName).setHeader(Constants.TYPE).setAutoWidth(true);
grid.addColumn(MgmtSoftwareModule::getVendor).setHeader(Constants.VENDOR).setAutoWidth(true);
}
});
}
Expand All @@ -115,13 +115,13 @@ private DistributionSetFilter(final HawkbitClient hawkbitClient) {
type.setItemLabelGenerator(MgmtDistributionSetType::getName);
type.setItems(
hawkbitClient.getDistributionSetTypeRestApi()
.getDistributionSetTypes(0, 20, NAME_ASC, null)
.getDistributionSetTypes(0, 20, Constants.NAME_ASC, null)
.getBody()
.getContent());
tag.setItemLabelGenerator(MgmtTag::getName);
tag.setItems(
hawkbitClient.getDistributionSetTagRestApi()
.getDistributionSetTags(0, 20, NAME_ASC, null)
.getDistributionSetTags(0, 20, Constants.NAME_ASC, null)
.getBody()
.getContent());
}
Expand Down Expand Up @@ -183,7 +183,7 @@ private void setItem(final MgmtDistributionSet distributionSet) {
hawkbitClient.getDistributionSetRestApi()
.getAssignedSoftwareModules(
distributionSet.getDsId(),
query.getOffset(), query.getLimit(), NAME_ASC)
query.getOffset(), query.getLimit(), Constants.NAME_ASC)
.getBody()
.getContent()
.stream());
Expand All @@ -210,18 +210,18 @@ private CreateDialog(final HawkbitClient hawkbitClient) {
"Type",
this::readyToCreate,
hawkbitClient.getDistributionSetTypeRestApi()
.getDistributionSetTypes(0, 30, NAME_ASC, null)
.getDistributionSetTypes(0, 30, Constants.NAME_ASC, null)
.getBody()
.getContent()
.toArray(new MgmtDistributionSetType[0]));
type.focus();
type.setWidthFull();
type.setRequiredIndicatorVisible(true);
type.setItemLabelGenerator(MgmtDistributionSetType::getName);
name = Utils.textField(NAME, this::readyToCreate);
version = Utils.textField(VERSION, this::readyToCreate);
final TextField vendor = Utils.textField(VENDOR);
description = new TextArea(DESCRIPTION);
name = Utils.textField(Constants.NAME, this::readyToCreate);
version = Utils.textField(Constants.VERSION, this::readyToCreate);
final TextField vendor = Utils.textField(Constants.VENDOR);
description = new TextArea(Constants.DESCRIPTION);
description.setWidthFull();
description.setMinLength(2);
requiredMigrationStep = new Checkbox("Required Migration Step");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package com.eclipse.hawkbit.ui.view;
package org.eclipse.hawkbit.ui.view;

import com.eclipse.hawkbit.ui.security.AuthenticatedUser;
import org.eclipse.hawkbit.ui.security.AuthenticatedUser;
import com.vaadin.flow.component.login.LoginI18n;
import com.vaadin.flow.component.login.LoginOverlay;
import com.vaadin.flow.router.BeforeEnterEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package com.eclipse.hawkbit.ui.view;

import com.eclipse.hawkbit.ui.HawkbitClient;
import com.eclipse.hawkbit.ui.view.util.Filter;
import com.eclipse.hawkbit.ui.MainLayout;
import com.eclipse.hawkbit.ui.view.util.SelectionGrid;
import com.eclipse.hawkbit.ui.view.util.TableView;
import com.eclipse.hawkbit.ui.view.util.Utils;
package org.eclipse.hawkbit.ui.view;

import org.eclipse.hawkbit.ui.HawkbitClient;
import org.eclipse.hawkbit.ui.view.util.Filter;
import org.eclipse.hawkbit.ui.MainLayout;
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 com.vaadin.flow.component.Component;
import com.vaadin.flow.component.Key;
import com.vaadin.flow.component.Text;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package com.eclipse.hawkbit.ui.view;

import com.eclipse.hawkbit.ui.HawkbitClient;
import com.eclipse.hawkbit.ui.view.util.Filter;
import com.eclipse.hawkbit.ui.view.util.SelectionGrid;
import com.eclipse.hawkbit.ui.MainLayout;
import com.eclipse.hawkbit.ui.view.util.TableView;
import com.eclipse.hawkbit.ui.view.util.Utils;
package org.eclipse.hawkbit.ui.view;

import org.eclipse.hawkbit.ui.HawkbitClient;
import org.eclipse.hawkbit.ui.view.util.Filter;
import org.eclipse.hawkbit.ui.view.util.SelectionGrid;
import org.eclipse.hawkbit.ui.MainLayout;
import org.eclipse.hawkbit.ui.view.util.TableView;
import org.eclipse.hawkbit.ui.view.util.Utils;
import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.Key;
import com.vaadin.flow.component.button.Button;
Expand Down Expand Up @@ -60,7 +60,7 @@
@Route(value = "software_modules", layout = MainLayout.class)
@RolesAllowed({"SOFTWARE_MODULE_READ"})
@Uses(Icon.class)
public class SoftwareModuleView extends TableView<MgmtSoftwareModule, Long>{
public class SoftwareModuleView extends TableView<MgmtSoftwareModule, Long> {

@Autowired
public SoftwareModuleView(final HawkbitClient hawkbitClient) {
Expand All @@ -75,11 +75,11 @@ public SoftwareModuleView(final boolean isParent, final HawkbitClient hawkbitCli
private final SoftwareModuleDetails details = new SoftwareModuleDetails(hawkbitClient);
@Override
protected void addColumns(final Grid<MgmtSoftwareModule> grid) {
grid.addColumn(MgmtSoftwareModule::getModuleId).setHeader(ID).setAutoWidth(true);
grid.addColumn(MgmtSoftwareModule::getName).setHeader(NAME).setAutoWidth(true);
grid.addColumn(MgmtSoftwareModule::getVersion).setHeader(VERSION).setAutoWidth(true);
grid.addColumn(MgmtSoftwareModule::getTypeName).setHeader(TYPE).setAutoWidth(true);
grid.addColumn(MgmtSoftwareModule::getVendor).setHeader(VENDOR).setAutoWidth(true);
grid.addColumn(MgmtSoftwareModule::getModuleId).setHeader(Constants.ID).setAutoWidth(true);
grid.addColumn(MgmtSoftwareModule::getName).setHeader(Constants.NAME).setAutoWidth(true);
grid.addColumn(MgmtSoftwareModule::getVersion).setHeader(Constants.VERSION).setAutoWidth(true);
grid.addColumn(MgmtSoftwareModule::getTypeName).setHeader(Constants.TYPE).setAutoWidth(true);
grid.addColumn(MgmtSoftwareModule::getVendor).setHeader(Constants.VENDOR).setAutoWidth(true);

grid.setItemDetailsRenderer(new ComponentRenderer<>(
() -> details, SoftwareModuleDetails::setItem));
Expand All @@ -88,7 +88,7 @@ protected void addColumns(final Grid<MgmtSoftwareModule> grid) {
},
(query, rsqlFilter) -> hawkbitClient.getSoftwareModuleRestApi()
.getSoftwareModules(
query.getOffset(), query.getPageSize(), NAME_ASC, rsqlFilter)
query.getOffset(), query.getPageSize(), Constants.NAME_ASC, rsqlFilter)
.getBody()
.getContent()
.stream(),
Expand All @@ -110,24 +110,24 @@ private static SelectionGrid<MgmtArtifact, Long> createArtifactGrid() {
new SelectionGrid.EntityRepresentation<>(MgmtArtifact.class, MgmtArtifact::getArtifactId) {
@Override
protected void addColumns(final Grid<MgmtArtifact> grid) {
grid.addColumn(MgmtArtifact::getArtifactId).setHeader(ID).setAutoWidth(true);
grid.addColumn(MgmtArtifact::getProvidedFilename).setHeader(NAME).setAutoWidth(true);
grid.addColumn(MgmtArtifact::getArtifactId).setHeader(Constants.ID).setAutoWidth(true);
grid.addColumn(MgmtArtifact::getProvidedFilename).setHeader(Constants.NAME).setAutoWidth(true);
grid.addColumn(MgmtArtifact::getSize).setHeader("Size").setAutoWidth(true);
}
});
}

private static class SoftwareModuleFilter implements Filter.Rsql {

private final TextField name = Utils.textField(NAME);
private final CheckboxGroup<MgmtSoftwareModuleType> type = new CheckboxGroup<>(TYPE);
private final TextField name = Utils.textField(Constants.NAME);
private final CheckboxGroup<MgmtSoftwareModuleType> type = new CheckboxGroup<>(Constants.TYPE);

private SoftwareModuleFilter(final HawkbitClient hawkbitClient) {
name.setPlaceholder("<name filter>");
type.setItemLabelGenerator(MgmtSoftwareModuleType::getName);
type.setItems(
hawkbitClient.getSoftwareModuleTypeRestApi()
.getTypes(0, 20, NAME_ASC, null)
.getTypes(0, 20, Constants.NAME_ASC, null)
.getBody()
.getContent());
}
Expand All @@ -152,11 +152,11 @@ private static class SoftwareModuleDetails extends FormLayout {

private final transient HawkbitClient hawkbitClient;

private final TextArea description = new TextArea(DESCRIPTION);
private final TextField createdBy = Utils.textField(CREATED_BY);
private final TextField createdAt = Utils.textField(CREATED_AT);
private final TextField lastModifiedBy = Utils.textField(LAST_MODIFIED_BY);
private final TextField lastModifiedAt = Utils.textField(LAST_MODIFIED_AT);
private final TextArea description = new TextArea(Constants.DESCRIPTION);
private final TextField createdBy = Utils.textField(Constants.CREATED_BY);
private final TextField createdAt = Utils.textField(Constants.CREATED_AT);
private final TextField lastModifiedBy = Utils.textField(Constants.LAST_MODIFIED_BY);
private final TextField lastModifiedAt = Utils.textField(Constants.LAST_MODIFIED_AT);
private final SelectionGrid<MgmtArtifact, Long> artifactGrid;

private SoftwareModuleDetails(final HawkbitClient hawkbitClient) {
Expand Down Expand Up @@ -211,21 +211,21 @@ private CreateDialog(final HawkbitClient hawkbitClient) {
super("Create Software Module");

type = new Select<>(
TYPE,
Constants.TYPE,
this::readyToCreate,
hawkbitClient.getSoftwareModuleTypeRestApi()
.getTypes(0, 30, NAME_ASC, null)
.getTypes(0, 30, Constants.NAME_ASC, null)
.getBody()
.getContent()
.toArray(new MgmtSoftwareModuleType[0]));
type.setWidthFull();
type.setRequiredIndicatorVisible(true);
type.setItemLabelGenerator(MgmtSoftwareModuleType::getName);
type.focus();
name = Utils.textField(NAME, this::readyToCreate);
version = Utils.textField(VERSION, this::readyToCreate);
vendor = Utils.textField(VENDOR);
description = new TextArea(DESCRIPTION);
name = Utils.textField(Constants.NAME, this::readyToCreate);
version = Utils.textField(Constants.VERSION, this::readyToCreate);
vendor = Utils.textField(Constants.VENDOR);
description = new TextArea(Constants.DESCRIPTION);
description.setWidthFull();
description.setMinLength(2);
enableArtifactEncryption = new Checkbox("Enable artifact encryption");
Expand Down
Loading

0 comments on commit d1bdca0

Please sign in to comment.