Reverting commit on behalf of Venu
Signed-off-by: Asharani <asharani.murugesh@in.bosch.com>
This commit is contained in:
@@ -12,7 +12,6 @@ import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.SoftwareModuleEvent;
|
||||
import org.eclipse.hawkbit.ui.artifacts.state.ArtifactUploadState;
|
||||
import org.eclipse.hawkbit.ui.common.detailslayout.AbstractNamedVersionedEntityTableDetailsLayout;
|
||||
import org.eclipse.hawkbit.ui.common.detailslayout.SoftwareModuleMetadatadetailslayout;
|
||||
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
@@ -45,7 +44,7 @@ public class SoftwareModuleDetails extends AbstractNamedVersionedEntityTableDeta
|
||||
|
||||
@Autowired
|
||||
private ArtifactUploadState artifactUploadState;
|
||||
|
||||
|
||||
@Override
|
||||
protected String getEditButtonId() {
|
||||
return SPUIComponetIdProvider.UPLOAD_SW_MODULE_EDIT_BUTTON;
|
||||
@@ -56,9 +55,8 @@ public class SoftwareModuleDetails extends AbstractNamedVersionedEntityTableDeta
|
||||
detailsTab.addTab(createDetailsLayout(), getI18n().get("caption.tab.details"), null);
|
||||
detailsTab.addTab(createDescriptionLayout(), getI18n().get("caption.tab.description"), null);
|
||||
detailsTab.addTab(createLogLayout(), getI18n().get("caption.logs.tab"), null);
|
||||
detailsTab.addTab(createMetadataLayout(), getI18n().get("caption.metadata.tab"), null);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onEdit(final ClickEvent event) {
|
||||
final Window addSoftwareModule = softwareModuleAddUpdateWindow
|
||||
@@ -83,8 +81,6 @@ public class SoftwareModuleDetails extends AbstractNamedVersionedEntityTableDeta
|
||||
updateSoftwareModuleDetailsLayout(HawkbitCommonUtil.SP_STRING_EMPTY, HawkbitCommonUtil.SP_STRING_EMPTY,
|
||||
maxAssign);
|
||||
}
|
||||
|
||||
populateMetadataDetails();
|
||||
}
|
||||
|
||||
private void updateSoftwareModuleDetailsLayout(final String type, final String vendor, final String maxAssign) {
|
||||
@@ -145,8 +141,4 @@ public class SoftwareModuleDetails extends AbstractNamedVersionedEntityTableDeta
|
||||
protected String getDetailsHeaderCaptionId() {
|
||||
return SPUIComponetIdProvider.TARGET_DETAILS_HEADER_LABEL_ID;
|
||||
}
|
||||
|
||||
private void populateMetadataDetails(){
|
||||
swmMetadataTable.populateSMMetadata(getSelectedBaseEntity());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,12 +72,8 @@ public abstract class AbstractTableDetailsLayout<T extends NamedEntity> extends
|
||||
private VerticalLayout logLayout;
|
||||
|
||||
private VerticalLayout attributesLayout;
|
||||
|
||||
private VerticalLayout metadataLayout;
|
||||
|
||||
protected SoftwareModuleMetadatadetailslayout swmMetadataTable;
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Initialize components.
|
||||
*/
|
||||
@PostConstruct
|
||||
@@ -149,10 +145,8 @@ public abstract class AbstractTableDetailsLayout<T extends NamedEntity> extends
|
||||
detailsTab.setHeight(90, Unit.PERCENTAGE);
|
||||
detailsTab.addStyleName(SPUIStyleDefinitions.DETAILS_LAYOUT_STYLE);
|
||||
detailsTab.setId(getTabSheetId());
|
||||
swmMetadataTable = new SoftwareModuleMetadatadetailslayout();
|
||||
swmMetadataTable.init(getI18n(), getPermissionChecker());
|
||||
addTabs(detailsTab);
|
||||
}
|
||||
}
|
||||
|
||||
private void buildLayout() {
|
||||
final HorizontalLayout nameEditLayout = new HorizontalLayout();
|
||||
@@ -215,9 +209,8 @@ public abstract class AbstractTableDetailsLayout<T extends NamedEntity> extends
|
||||
populateLog();
|
||||
populateDescription();
|
||||
populateDetailsWidget();
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void populateLog() {
|
||||
logLayout.removeAllComponents();
|
||||
|
||||
@@ -288,15 +281,7 @@ public abstract class AbstractTableDetailsLayout<T extends NamedEntity> extends
|
||||
descriptionLayout = getTabLayout();
|
||||
return descriptionLayout;
|
||||
}
|
||||
|
||||
protected VerticalLayout createMetadataLayout() {
|
||||
metadataLayout = getTabLayout();
|
||||
metadataLayout.setSizeFull();
|
||||
metadataLayout.addComponent(swmMetadataTable);
|
||||
return metadataLayout;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Default caption of header to be displayed when no data row selected in
|
||||
* table.
|
||||
@@ -332,7 +317,7 @@ public abstract class AbstractTableDetailsLayout<T extends NamedEntity> extends
|
||||
public VerticalLayout getDetailsLayout() {
|
||||
return detailsLayout;
|
||||
}
|
||||
|
||||
|
||||
private void populateDescription() {
|
||||
if (selectedBaseEntity != null) {
|
||||
updateDescriptionLayout(i18n.get("label.description"), selectedBaseEntity.getDescription());
|
||||
|
||||
@@ -8,10 +8,8 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.distributions.dstable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -19,13 +17,11 @@ import org.eclipse.hawkbit.repository.DistributionSetManagement;
|
||||
import org.eclipse.hawkbit.repository.SoftwareManagement;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSet;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSetIdName;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSetMetadata;
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModuleIdName;
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.SoftwareModuleEvent;
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.SoftwareModuleEvent.SoftwareModuleEventType;
|
||||
import org.eclipse.hawkbit.ui.common.detailslayout.AbstractNamedVersionedEntityTableDetailsLayout;
|
||||
import org.eclipse.hawkbit.ui.common.detailslayout.DistributionSetMetadatadetailslayout;
|
||||
import org.eclipse.hawkbit.ui.common.detailslayout.SoftwareModuleDetailsTable;
|
||||
import org.eclipse.hawkbit.ui.common.tagdetails.DistributionTagToken;
|
||||
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||
@@ -42,18 +38,13 @@ import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
import com.vaadin.data.Item;
|
||||
import com.vaadin.data.util.IndexedContainer;
|
||||
import com.vaadin.server.FontAwesome;
|
||||
import com.vaadin.spring.annotation.SpringComponent;
|
||||
import com.vaadin.spring.annotation.ViewScope;
|
||||
import com.vaadin.ui.Button;
|
||||
import com.vaadin.ui.Button.ClickEvent;
|
||||
import com.vaadin.ui.Table.Align;
|
||||
import com.vaadin.ui.themes.ValoTheme;
|
||||
import com.vaadin.ui.Component;
|
||||
import com.vaadin.ui.Label;
|
||||
import com.vaadin.ui.TabSheet;
|
||||
import com.vaadin.ui.Table;
|
||||
import com.vaadin.ui.UI;
|
||||
import com.vaadin.ui.VerticalLayout;
|
||||
import com.vaadin.ui.Window;
|
||||
@@ -73,10 +64,6 @@ public class DistributionSetDetails extends AbstractNamedVersionedEntityTableDet
|
||||
private static final String SOFT_MODULE = "softwareModule";
|
||||
|
||||
private static final String UNASSIGN_SOFT_MODULE = "unassignSoftModule";
|
||||
|
||||
private static final String DS_METADA_KEY = "Key";
|
||||
|
||||
private static final String VIEW ="view";
|
||||
|
||||
@Autowired
|
||||
private ManageDistUIState manageDistUIState;
|
||||
@@ -94,12 +81,8 @@ public class DistributionSetDetails extends AbstractNamedVersionedEntityTableDet
|
||||
private transient DistributionSetManagement distributionSetManagement;
|
||||
|
||||
private SoftwareModuleDetailsTable softwareModuleTable;
|
||||
|
||||
private DistributionSetMetadatadetailslayout dsMetadataTable;
|
||||
|
||||
private VerticalLayout tagsLayout;
|
||||
|
||||
private VerticalLayout metadataLayout;
|
||||
|
||||
Map<String, StringBuilder> assignedSWModule = new HashMap<>();
|
||||
|
||||
@@ -111,8 +94,6 @@ public class DistributionSetDetails extends AbstractNamedVersionedEntityTableDet
|
||||
softwareModuleTable = new SoftwareModuleDetailsTable();
|
||||
softwareModuleTable.init(getI18n(), true, getPermissionChecker(), distributionSetManagement, getEventBus(),
|
||||
manageDistUIState);
|
||||
dsMetadataTable = new DistributionSetMetadatadetailslayout();
|
||||
dsMetadataTable.init(getI18n(), getPermissionChecker());
|
||||
super.init();
|
||||
}
|
||||
|
||||
@@ -126,14 +107,6 @@ public class DistributionSetDetails extends AbstractNamedVersionedEntityTableDet
|
||||
populateDetails();
|
||||
populateModule();
|
||||
populateTags();
|
||||
populateMetadataDetails();
|
||||
}
|
||||
|
||||
protected VerticalLayout createMetadataLayout() {
|
||||
metadataLayout = getTabLayout();
|
||||
metadataLayout.setSizeFull();
|
||||
metadataLayout.addComponent(dsMetadataTable);
|
||||
return metadataLayout;
|
||||
}
|
||||
|
||||
private void populateModule() {
|
||||
@@ -265,11 +238,7 @@ public class DistributionSetDetails extends AbstractNamedVersionedEntityTableDet
|
||||
updateDistributionSetDetailsLayout(null, null);
|
||||
}
|
||||
}
|
||||
|
||||
private void populateMetadataDetails(){
|
||||
dsMetadataTable.populateDSMetadata(getSelectedBaseEntity());
|
||||
}
|
||||
|
||||
|
||||
private void updateDistributionSetDetailsLayout(final String type, final Boolean isMigrationRequired) {
|
||||
final VerticalLayout detailsTabLayout = getDetailsLayout();
|
||||
detailsTabLayout.removeAllComponents();
|
||||
@@ -325,7 +294,6 @@ public class DistributionSetDetails extends AbstractNamedVersionedEntityTableDet
|
||||
detailsTab.addTab(createSoftwareModuleTab(), getI18n().get("caption.softwares.distdetail.tab"), null);
|
||||
detailsTab.addTab(createTagsLayout(), getI18n().get("caption.tags.tab"), null);
|
||||
detailsTab.addTab(createLogLayout(), getI18n().get("caption.logs.tab"), null);
|
||||
detailsTab.addTab(createMetadataLayout(), getI18n().get("caption.metadata.tab"), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,8 +12,6 @@ import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.SoftwareModuleEvent;
|
||||
import org.eclipse.hawkbit.ui.artifacts.smtable.SoftwareModuleAddUpdateWindow;
|
||||
import org.eclipse.hawkbit.ui.common.detailslayout.AbstractNamedVersionedEntityTableDetailsLayout;
|
||||
import org.eclipse.hawkbit.ui.common.detailslayout.DistributionSetMetadatadetailslayout;
|
||||
import org.eclipse.hawkbit.ui.common.detailslayout.SoftwareModuleMetadatadetailslayout;
|
||||
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||
import org.eclipse.hawkbit.ui.distributions.state.ManageDistUIState;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
@@ -46,7 +44,7 @@ public class SwModuleDetails extends AbstractNamedVersionedEntityTableDetailsLay
|
||||
|
||||
@Autowired
|
||||
private ManageDistUIState manageDistUIState;
|
||||
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
void onEvent(final SoftwareModuleEvent softwareModuleEvent) {
|
||||
onBaseEntityEvent(softwareModuleEvent);
|
||||
@@ -71,11 +69,8 @@ public class SwModuleDetails extends AbstractNamedVersionedEntityTableDetailsLay
|
||||
detailsTab.addTab(createDetailsLayout(), getI18n().get("caption.tab.details"), null);
|
||||
detailsTab.addTab(createDescriptionLayout(), getI18n().get("caption.tab.description"), null);
|
||||
detailsTab.addTab(createLogLayout(), getI18n().get("caption.logs.tab"), null);
|
||||
detailsTab.addTab(createMetadataLayout(), getI18n().get("caption.metadata.tab"), null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected String getDefaultCaption() {
|
||||
return getI18n().get("upload.swModuleTable.header");
|
||||
@@ -144,16 +139,11 @@ public class SwModuleDetails extends AbstractNamedVersionedEntityTableDetailsLay
|
||||
@Override
|
||||
protected void populateDetailsWidget() {
|
||||
populateDetails();
|
||||
populateMetadataDetails();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getDetailsHeaderCaptionId() {
|
||||
return SPUIComponetIdProvider.TARGET_DETAILS_HEADER_LABEL_ID;
|
||||
}
|
||||
|
||||
private void populateMetadataDetails(){
|
||||
swmMetadataTable.populateSMMetadata(getSelectedBaseEntity());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ package org.eclipse.hawkbit.ui.management.dstable;
|
||||
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSet;
|
||||
import org.eclipse.hawkbit.ui.common.detailslayout.AbstractNamedVersionedEntityTableDetailsLayout;
|
||||
import org.eclipse.hawkbit.ui.common.detailslayout.DistributionSetMetadatadetailslayout;
|
||||
import org.eclipse.hawkbit.ui.common.detailslayout.SoftwareModuleDetailsTable;
|
||||
import org.eclipse.hawkbit.ui.common.tagdetails.DistributionTagToken;
|
||||
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||
@@ -49,19 +48,11 @@ public class DistributionDetails extends AbstractNamedVersionedEntityTableDetail
|
||||
private DistributionTagToken distributionTagToken;
|
||||
|
||||
private SoftwareModuleDetailsTable softwareModuleTable;
|
||||
|
||||
private VerticalLayout metadataLayout;
|
||||
|
||||
private DistributionSetMetadatadetailslayout dsMetadataTable;
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
softwareModuleTable = new SoftwareModuleDetailsTable();
|
||||
softwareModuleTable.init(getI18n(), false, getPermissionChecker(), null, null, null);
|
||||
|
||||
dsMetadataTable = new DistributionSetMetadatadetailslayout();
|
||||
dsMetadataTable.init(getI18n(), getPermissionChecker());
|
||||
|
||||
super.init();
|
||||
}
|
||||
|
||||
@@ -82,14 +73,6 @@ public class DistributionDetails extends AbstractNamedVersionedEntityTableDetail
|
||||
detailsTab.addTab(createSoftwareModuleTab(), getI18n().get("caption.softwares.distdetail.tab"), null);
|
||||
detailsTab.addTab(createTagsLayout(), getI18n().get("caption.tags.tab"), null);
|
||||
detailsTab.addTab(createLogLayout(), getI18n().get("caption.logs.tab"), null);
|
||||
detailsTab.addTab(createMetadataLayout(), getI18n().get("caption.metadata.tab"), null);
|
||||
}
|
||||
|
||||
protected VerticalLayout createMetadataLayout() {
|
||||
metadataLayout = getTabLayout();
|
||||
metadataLayout.setSizeFull();
|
||||
metadataLayout.addComponent(dsMetadataTable);
|
||||
return metadataLayout;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -126,16 +109,11 @@ public class DistributionDetails extends AbstractNamedVersionedEntityTableDetail
|
||||
protected String getTabSheetId() {
|
||||
return SPUIComponetIdProvider.DISTRIBUTION_DETAILS_TABSHEET;
|
||||
}
|
||||
|
||||
private void populateMetadataDetails(){
|
||||
dsMetadataTable.populateDSMetadata(getSelectedBaseEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void populateDetailsWidget() {
|
||||
softwareModuleTable.populateModule(getSelectedBaseEntity());
|
||||
populateDetails(getSelectedBaseEntity());
|
||||
populateMetadataDetails();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -681,16 +681,6 @@ public final class SPUIComponetIdProvider {
|
||||
* custom filter - update button id.
|
||||
*/
|
||||
public static final String CUSTOM_FILTER_DETAIL_LINK = "custom.filter.detail.link";
|
||||
|
||||
/**
|
||||
* DistributionSet - Metadata button id.
|
||||
*/
|
||||
public static final String DS_METADATA_DETAIL_LINK = "distributionset.metadata.detail.link";
|
||||
|
||||
/**
|
||||
* Software Module - Metadata button id.
|
||||
*/
|
||||
public static final String SW_METADATA_DETAIL_LINK = "softwaremodule.metadata.detail.link";
|
||||
|
||||
/**
|
||||
* custom filter - save button id.
|
||||
|
||||
@@ -69,7 +69,6 @@ caption.bulk.upload.targets = Bulk Upload
|
||||
caption.softwares.distdetail.tab = Modules
|
||||
caption.tags.tab = Tags
|
||||
caption.logs.tab = Logs
|
||||
caption.metadata.tab = Metadata
|
||||
caption.attributes.tab = Attributes
|
||||
caption.types.tab = Types
|
||||
caption.save.window = Action Details
|
||||
@@ -91,7 +90,6 @@ caption.force.action.confirmbox = Confirm Force Active Action
|
||||
caption.filter.delete.confirmbox = Confirm Filter Delete Action
|
||||
|
||||
# Labels prefix with - label
|
||||
label.dist.details.key = Key
|
||||
label.dist.details.type = Type :
|
||||
label.dist.details.name = Name :
|
||||
label.dist.details.version = Version :
|
||||
|
||||
@@ -67,7 +67,6 @@ caption.bulk.upload.targets = Bulk Upload
|
||||
caption.softwares.distdetail.tab = Modules
|
||||
caption.tags.tab = Tags
|
||||
caption.logs.tab = Logs
|
||||
caption.metadata.tab = Metadata
|
||||
caption.attributes.tab = Attributes
|
||||
caption.types.tab = Types
|
||||
caption.save.window = Action Details
|
||||
@@ -90,7 +89,6 @@ caption.filter.custom = Custom Filter
|
||||
caption.filter.delete.confirmbox = Confirm Filter Delete Action
|
||||
|
||||
# Labels prefix with - label
|
||||
label.dist.details.key = Key
|
||||
label.dist.details.type = Type :
|
||||
label.dist.details.name = Name :
|
||||
label.dist.details.version = Version :
|
||||
|
||||
@@ -69,7 +69,6 @@ caption.bulk.upload.targets = Bulk Upload
|
||||
caption.softwares.distdetail.tab = Modules
|
||||
caption.tags.tab = Tags
|
||||
caption.logs.tab = Logs
|
||||
caption.metadata.tab = Metadata
|
||||
caption.attributes.tab = Attributes
|
||||
caption.types.tab = Types
|
||||
caption.save.window = Action Details
|
||||
@@ -90,7 +89,6 @@ caption.force.action.confirmbox = Confirm Force Active Action
|
||||
caption.filter.delete.confirmbox = Confirm Filter Delete Action
|
||||
|
||||
# Labels prefix with - label
|
||||
label.dist.details.key = Key
|
||||
label.dist.details.type = Type :
|
||||
label.dist.details.name = Name :
|
||||
label.dist.details.version = Version :
|
||||
|
||||
Reference in New Issue
Block a user