Merge pull request #140 from bsinno/Bug/Upload_Artifact
Bug/upload artifact
This commit is contained in:
@@ -157,16 +157,9 @@ public class SoftwareModuleTable extends AbstractNamedVersionTable<SoftwareModul
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected Item addEntity(final SoftwareModule baseEntity) {
|
||||
final Item item = super.addEntity(baseEntity);
|
||||
|
||||
final String swNameVersion = HawkbitCommonUtil.concatStrings(":", baseEntity.getName(),
|
||||
baseEntity.getVersion());
|
||||
item.getItemProperty(SPUILabelDefinitions.NAME_VERSION).setValue(swNameVersion);
|
||||
|
||||
item.getItemProperty(SPUILabelDefinitions.VAR_VENDOR).setValue(baseEntity.getVendor());
|
||||
if (!artifactUploadState.getSelectedSoftwareModules().isEmpty()) {
|
||||
artifactUploadState.getSelectedSoftwareModules().stream().forEach(this::unselect);
|
||||
}
|
||||
@@ -175,6 +168,17 @@ public class SoftwareModuleTable extends AbstractNamedVersionTable<SoftwareModul
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected void updateEntity(final SoftwareModule baseEntity, final Item item) {
|
||||
final String swNameVersion = HawkbitCommonUtil.concatStrings(":", baseEntity.getName(),
|
||||
baseEntity.getVersion());
|
||||
item.getItemProperty(SPUILabelDefinitions.NAME_VERSION).setValue(swNameVersion);
|
||||
item.getItemProperty("swId").setValue(baseEntity.getId());
|
||||
item.getItemProperty(SPUILabelDefinitions.VAR_VENDOR).setValue(baseEntity.getVendor());
|
||||
super.updateEntity(baseEntity, item);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<TableColumn> getTableVisibleColumns() {
|
||||
final List<TableColumn> columnList = super.getTableVisibleColumns();
|
||||
|
||||
@@ -40,8 +40,8 @@ public abstract class AbstractNamedVersionTable<E extends NamedVersionedEntity,
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected void updateEntity(final E baseEntity, final Item item) {
|
||||
super.updateEntity(baseEntity, item);
|
||||
item.getItemProperty(SPUILabelDefinitions.VAR_VERSION).setValue(baseEntity.getVersion());
|
||||
super.updateEntity(baseEntity, item);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -459,12 +459,8 @@ public class DistributionSetTable extends AbstractNamedVersionTable<Distribution
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
protected Item addEntity(final DistributionSet baseEntity) {
|
||||
final Item item = super.addEntity(baseEntity);
|
||||
item.getItemProperty(SPUILabelDefinitions.DIST_ID).setValue(baseEntity.getId());
|
||||
item.getItemProperty(SPUILabelDefinitions.VAR_IS_DISTRIBUTION_COMPLETE).setValue(baseEntity.isComplete());
|
||||
|
||||
if (manageDistUIState.getSelectedDistributions().isPresent()) {
|
||||
manageDistUIState.getSelectedDistributions().get().stream().forEach(this::unselect);
|
||||
}
|
||||
@@ -472,6 +468,14 @@ public class DistributionSetTable extends AbstractNamedVersionTable<Distribution
|
||||
return item;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void updateEntity(final DistributionSet baseEntity, final Item item) {
|
||||
item.getItemProperty(SPUILabelDefinitions.DIST_ID).setValue(baseEntity.getId());
|
||||
item.getItemProperty(SPUILabelDefinitions.VAR_IS_DISTRIBUTION_COMPLETE).setValue(baseEntity.isComplete());
|
||||
super.updateEntity(baseEntity, item);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setDataAvailable(final boolean available) {
|
||||
manageDistUIState.setNoDataAvailableDist(!available);
|
||||
|
||||
@@ -324,17 +324,9 @@ public class SwModuleTable extends AbstractNamedVersionTable<SoftwareModule, Lon
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
protected Item addEntity(final SoftwareModule baseEntity) {
|
||||
final Item item = super.addEntity(baseEntity);
|
||||
|
||||
final String swNameVersion = HawkbitCommonUtil.concatStrings(":", baseEntity.getName(),
|
||||
baseEntity.getVersion());
|
||||
item.getItemProperty(SPUILabelDefinitions.NAME_VERSION).setValue(swNameVersion);
|
||||
item.getItemProperty("swId").setValue(baseEntity.getId());
|
||||
item.getItemProperty(SPUILabelDefinitions.VAR_VENDOR).setValue(baseEntity.getVendor());
|
||||
item.getItemProperty(SPUILabelDefinitions.VAR_COLOR).setValue(baseEntity.getType().getColour());
|
||||
|
||||
if (!manageDistUIState.getSelectedSoftwareModules().isEmpty()) {
|
||||
manageDistUIState.getSelectedSoftwareModules().stream().forEach(this::unselect);
|
||||
}
|
||||
@@ -342,6 +334,18 @@ public class SwModuleTable extends AbstractNamedVersionTable<SoftwareModule, Lon
|
||||
return item;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void updateEntity(final SoftwareModule baseEntity, final Item item) {
|
||||
final String swNameVersion = HawkbitCommonUtil.concatStrings(":", baseEntity.getName(),
|
||||
baseEntity.getVersion());
|
||||
item.getItemProperty(SPUILabelDefinitions.NAME_VERSION).setValue(swNameVersion);
|
||||
item.getItemProperty("swId").setValue(baseEntity.getId());
|
||||
item.getItemProperty(SPUILabelDefinitions.VAR_VENDOR).setValue(baseEntity.getVendor());
|
||||
item.getItemProperty(SPUILabelDefinitions.VAR_COLOR).setValue(baseEntity.getType().getColour());
|
||||
super.updateEntity(baseEntity, item);
|
||||
}
|
||||
|
||||
private void showArtifactDetailsWindow(final Long itemId, final String nameVersionStr) {
|
||||
final Window atrifactDtlsWindow = new Window();
|
||||
atrifactDtlsWindow.setCaption(HawkbitCommonUtil.getArtifactoryDetailsLabelId(nameVersionStr));
|
||||
|
||||
Reference in New Issue
Block a user