Skip to content

Commit

Permalink
Fixed compile error due to rebase
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Block <[email protected]>
  • Loading branch information
blomark committed Oct 1, 2021
1 parent 2e7494e commit 377cd66
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public class ProxyDistributionSet extends ProxyNamedEntity implements VersionAwa

private boolean requiredMigrationStep;

private Boolean isValid;

/**
* Default constructor
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import java.util.concurrent.Executor;

import org.eclipse.hawkbit.repository.DeploymentManagement;
import org.eclipse.hawkbit.repository.DistributionSetInvalidationManagement;
import org.eclipse.hawkbit.repository.DistributionSetManagement;
import org.eclipse.hawkbit.repository.DistributionSetTagManagement;
import org.eclipse.hawkbit.repository.DistributionSetTypeManagement;
Expand Down Expand Up @@ -88,8 +89,9 @@ public class DeploymentView extends AbstractEventListenersAwareView implements B
final UINotification uiNotification, final ManagementUIState managementUIState,
final DeploymentManagement deploymentManagement, final DistributionSetManagement distributionSetManagement,
final SoftwareModuleManagement smManagement,
final DistributionSetTypeManagement distributionSetTypeManagement, final TargetManagement targetManagement,
final EntityFactory entityFactory, final UiProperties uiProperties,
final DistributionSetTypeManagement distributionSetTypeManagement,
final DistributionSetInvalidationManagement dsInvalidationManagement,
final TargetManagement targetManagement, final EntityFactory entityFactory, final UiProperties uiProperties,
final TargetTagManagement targetTagManagement,
final DistributionSetTagManagement distributionSetTagManagement,
final TargetFilterQueryManagement targetFilterQueryManagement, final SystemManagement systemManagement,
Expand Down Expand Up @@ -130,7 +132,7 @@ public class DeploymentView extends AbstractEventListenersAwareView implements B
this.distributionTagLayout = new DistributionTagLayout(uiDependencies, distributionSetTagManagement,
distributionSetManagement, managementUIState.getDistributionTagLayoutUiState());
this.distributionGridLayout = new DistributionGridLayout(uiDependencies, targetManagement,
distributionSetManagement, smManagement, distributionSetTypeManagement,
distributionSetManagement, dsInvalidationManagement, smManagement, distributionSetTypeManagement,
distributionSetTagManagement, systemManagement, deploymentManagement, configManagement,
systemSecurityContext, uiProperties, managementUIState.getDistributionGridLayoutUiState(),
managementUIState.getDistributionTagLayoutUiState(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import java.util.Optional;

import org.eclipse.hawkbit.repository.DeploymentManagement;
import org.eclipse.hawkbit.repository.DistributionSetInvalidationManagement;
import org.eclipse.hawkbit.repository.DistributionSetManagement;
import org.eclipse.hawkbit.repository.TargetManagement;
import org.eclipse.hawkbit.repository.model.DistributionSet;
Expand Down Expand Up @@ -80,6 +81,8 @@ public class DistributionGrid extends AbstractDsGrid<DsManagementFilterParams> {
* TargetManagement
* @param distributionSetManagement
* DistributionSetManagement
* @param dsInvalidationManagement
* {@link DistributionSetInvalidationManagement}
* @param deploymentManagement
* DeploymentManagement
* @param uiProperties
Expand All @@ -92,8 +95,10 @@ public class DistributionGrid extends AbstractDsGrid<DsManagementFilterParams> {
* TagFilterLayoutUiState
*/
public DistributionGrid(final CommonUiDependencies uiDependencies, final TargetManagement targetManagement,
final DistributionSetManagement distributionSetManagement, final DeploymentManagement deploymentManagement,
final UiProperties uiProperties, final DistributionGridLayoutUiState distributionGridLayoutUiState,
final DistributionSetManagement distributionSetManagement,
final DistributionSetInvalidationManagement dsInvalidationManagement,
final DeploymentManagement deploymentManagement, final UiProperties uiProperties,
final DistributionGridLayoutUiState distributionGridLayoutUiState,
final TargetGridLayoutUiState targetGridLayoutUiState,
final TagFilterLayoutUiState distributionTagLayoutUiState) {
super(uiDependencies, distributionSetManagement, distributionGridLayoutUiState, EventView.DEPLOYMENT);
Expand Down Expand Up @@ -134,12 +139,9 @@ public DistributionGrid(final CommonUiDependencies uiDependencies, final TargetM
initFilterMappings();
getFilterSupport().setFilter(new DsManagementFilterParams());
this.invalidateDistributionSetSupport = new InvalidateDistributionSetSupport(this, i18n, notification,
dsManagement);

initStyleGenerator();
dsInvalidationManagement);

initTargetPinningStyleGenerator();
initDistributionSetInvalidStyleGenerator();
initStyleGenerator();
init();
}

Expand Down Expand Up @@ -192,7 +194,6 @@ private void initStyleGenerator() {
setStyleGenerator(this::getRowStyle);
}


private String getRowStyle(final ProxyDistributionSet distributionSet) {
final StringBuilder style = new StringBuilder();

Expand All @@ -201,8 +202,12 @@ private String getRowStyle(final ProxyDistributionSet distributionSet) {
style.append(assignedInstalledStyle);
}

private void initDistributionSetInvalidStyleGenerator() {
setStyleGenerator(ds -> ds.getIsValid() ? null : SPUIDefinitions.INVALID_DISTRIBUTION);
if (!distributionSet.getIsValid()) {
style.append(" ");
style.append(SPUIDefinitions.INVALID_DISTRIBUTION);
}

return style.toString();
}

@Override
Expand All @@ -216,7 +221,7 @@ public void addColumns() {
addVersionColumn();

GridComponentBuilder.joinToActionColumn(i18n, getDefaultHeaderRow(),
Arrays.asList(addPinColumn(), addDeleteColumn()));
Arrays.asList(addPinColumn(), addDeleteColumn(), addInvalidateColumn()));
}

private Column<ProxyDistributionSet, Button> addPinColumn() {
Expand All @@ -231,9 +236,10 @@ private Column<ProxyDistributionSet, Button> addPinColumn() {

private Column<ProxyDistributionSet, Button> addInvalidateColumn() {
final ValueProvider<ProxyDistributionSet, Button> buttonProvider = ds -> GridComponentBuilder.buildActionButton(
i18n, clickEvent -> onClickinvalidateDistributionSet(ds), VaadinIcons.BAN,
UIMessageIdProvider.TOOLTIP_DISTRIBUTION_SET_INVALIDATE, SPUIStyleDefinitions.STATUS_ICON_NEUTRAL,
UIComponentIdProvider.DIST_INVALIDATE_ICON + "." + ds.getId(), ds.getIsValid());
i18n, clickEvent -> invalidateDistributionSetSupport.openConsequencesWindowOnInvalidateAction(ds),
VaadinIcons.BAN, UIMessageIdProvider.TOOLTIP_INVALIDATE_DISTRIBUTIONSET,
SPUIStyleDefinitions.STATUS_ICON_NEUTRAL, UIComponentIdProvider.DIST_INVALIDATE_ICON + "." + ds.getId(),
ds.getIsValid());
return GridComponentBuilder.addIconColumn(this, buttonProvider, DS_INVALIDATE_BUTTON_ID, null);
}

Expand All @@ -255,10 +261,6 @@ public void restoreState() {
super.restoreState();
}

private void onClickinvalidateDistributionSet(final ProxyDistributionSet distributionSet) {
dsManagement.invalidate(distributionSet.getId());
}

/**
* @return Pin support
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.util.List;

import org.eclipse.hawkbit.repository.DeploymentManagement;
import org.eclipse.hawkbit.repository.DistributionSetInvalidationManagement;
import org.eclipse.hawkbit.repository.DistributionSetManagement;
import org.eclipse.hawkbit.repository.DistributionSetTagManagement;
import org.eclipse.hawkbit.repository.DistributionSetTypeManagement;
Expand Down Expand Up @@ -66,6 +67,8 @@ public class DistributionGridLayout extends AbstractDistributionSetGridLayout {
* TargetManagement
* @param distributionSetManagement
* DistributionSetManagement
* @param dsInvalidationManagement
* {@link DistributionSetInvalidationManagement}
* @param smManagement
* SoftwareModuleManagement
* @param distributionSetTypeManagement
Expand All @@ -90,12 +93,15 @@ public class DistributionGridLayout extends AbstractDistributionSetGridLayout {
* TargetGridLayoutUiState
*/
public DistributionGridLayout(final CommonUiDependencies uiDependencies, final TargetManagement targetManagement,
final DistributionSetManagement distributionSetManagement, final SoftwareModuleManagement smManagement,
final DistributionSetManagement distributionSetManagement,
final DistributionSetInvalidationManagement dsInvalidationManagement,
final SoftwareModuleManagement smManagement,
final DistributionSetTypeManagement distributionSetTypeManagement,
final DistributionSetTagManagement distributionSetTagManagement, final SystemManagement systemManagement,
final DeploymentManagement deploymentManagement, final TenantConfigurationManagement configManagement,
final SystemSecurityContext systemSecurityContext, final UiProperties uiProperties,
final DistributionGridLayoutUiState distributionGridLayoutUiState,
final DistributionSetTagManagement distributionSetTagManagement,

final SystemManagement systemManagement, final DeploymentManagement deploymentManagement,
final TenantConfigurationManagement configManagement, final SystemSecurityContext systemSecurityContext,
final UiProperties uiProperties, final DistributionGridLayoutUiState distributionGridLayoutUiState,
final TagFilterLayoutUiState distributionTagLayoutUiState,
final TargetGridLayoutUiState targetGridLayoutUiState) {
super(uiDependencies, systemManagement, systemSecurityContext, configManagement, distributionSetManagement,
Expand All @@ -106,8 +112,8 @@ public DistributionGridLayout(final CommonUiDependencies uiDependencies, final T
this.distributionGridHeader.buildHeader();

this.distributionGrid = new DistributionGrid(uiDependencies, targetManagement, distributionSetManagement,
deploymentManagement, uiProperties, distributionGridLayoutUiState, targetGridLayoutUiState,
distributionTagLayoutUiState);
dsInvalidationManagement, deploymentManagement, uiProperties, distributionGridLayoutUiState,
targetGridLayoutUiState, distributionTagLayoutUiState);

this.distributionSetDetailsHeader = new DistributionSetDetailsHeader(uiDependencies, getDsWindowBuilder(),
getDsMetaDataWindowBuilder());
Expand Down
Loading

0 comments on commit 377cd66

Please sign in to comment.