Drag and drop handles wrong item
Signed-off-by: venu1278 <venugopal.boodidadinne@in.bosch.com>
This commit is contained in:
@@ -79,7 +79,6 @@ public class SoftwareModuleTable extends AbstractTable {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private UploadViewAcceptCriteria uploadViewAcceptCriteria;
|
private UploadViewAcceptCriteria uploadViewAcceptCriteria;
|
||||||
|
|
||||||
private Boolean isFilterApplied = false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the filter layout.
|
* Initialize the filter layout.
|
||||||
@@ -107,18 +106,7 @@ public class SoftwareModuleTable extends AbstractTable {
|
|||||||
if (filterEvent == SMFilterEvent.FILTER_BY_TYPE || filterEvent == SMFilterEvent.FILTER_BY_TEXT
|
if (filterEvent == SMFilterEvent.FILTER_BY_TYPE || filterEvent == SMFilterEvent.FILTER_BY_TEXT
|
||||||
|| filterEvent == SMFilterEvent.REMOVER_FILTER_BY_TYPE
|
|| filterEvent == SMFilterEvent.REMOVER_FILTER_BY_TYPE
|
||||||
|| filterEvent == SMFilterEvent.REMOVER_FILTER_BY_TEXT) {
|
|| filterEvent == SMFilterEvent.REMOVER_FILTER_BY_TEXT) {
|
||||||
final Map<String, Object> queryConfig = prepareQueryConfigFilters();
|
refreshFilter();
|
||||||
if(queryConfig.size()<1 && isFilterApplied==false){
|
|
||||||
UI.getCurrent().access(() -> ((LazyQueryContainer) getContainerDataSource()).refresh());
|
|
||||||
|
|
||||||
}else {
|
|
||||||
refreshFilter();
|
|
||||||
if(queryConfig.size()<1){
|
|
||||||
isFilterApplied = false;
|
|
||||||
}else{
|
|
||||||
isFilterApplied = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -219,8 +219,10 @@ public class SoftwareModuleTableHeader extends AbstractTableHeader {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void resetSearchText() {
|
protected void resetSearchText() {
|
||||||
artifactUploadState.getSoftwareModuleFilters().setSearchText(null);
|
if(artifactUploadState.getSoftwareModuleFilters().getSearchText().isPresent()){
|
||||||
eventbus.publish(this, SMFilterEvent.REMOVER_FILTER_BY_TEXT);
|
artifactUploadState.getSoftwareModuleFilters().setSearchText(null);
|
||||||
|
eventbus.publish(this, SMFilterEvent.REMOVER_FILTER_BY_TEXT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -115,8 +115,6 @@ public class DistributionSetTable extends AbstractTable {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private transient TargetManagement targetManagement;
|
private transient TargetManagement targetManagement;
|
||||||
|
|
||||||
private Boolean isFilterApplied = false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the component.
|
* Initialize the component.
|
||||||
*/
|
*/
|
||||||
@@ -616,18 +614,7 @@ public class DistributionSetTable extends AbstractTable {
|
|||||||
if (event == DistributionTableFilterEvent.FILTER_BY_TEXT
|
if (event == DistributionTableFilterEvent.FILTER_BY_TEXT
|
||||||
|| event == DistributionTableFilterEvent.REMOVE_FILTER_BY_TEXT
|
|| event == DistributionTableFilterEvent.REMOVE_FILTER_BY_TEXT
|
||||||
|| event == DistributionTableFilterEvent.FILTER_BY_TAG) {
|
|| event == DistributionTableFilterEvent.FILTER_BY_TAG) {
|
||||||
final Map<String, Object> queryConfig = prepareQueryConfigFilters();
|
UI.getCurrent().access(() -> refreshFilter());
|
||||||
if(queryConfig.size()<1 && isFilterApplied==false){
|
|
||||||
UI.getCurrent().access(() -> ((LazyQueryContainer) getContainerDataSource()).refresh());
|
|
||||||
|
|
||||||
}else {
|
|
||||||
UI.getCurrent().access(() -> refreshFilter());
|
|
||||||
if(queryConfig.size()<1){
|
|
||||||
isFilterApplied = false;
|
|
||||||
}else{
|
|
||||||
isFilterApplied = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -170,9 +170,10 @@ public class DistributionSetTableHeader extends AbstractTableHeader {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void resetSearchText() {
|
protected void resetSearchText() {
|
||||||
manageDistUIstate.getManageDistFilters().setSearchText(null);
|
if(manageDistUIstate.getManageDistFilters().getSearchText().isPresent()){
|
||||||
eventbus.publish(this, DistributionTableFilterEvent.REMOVE_FILTER_BY_TEXT);
|
manageDistUIstate.getManageDistFilters().setSearchText(null);
|
||||||
|
eventbus.publish(this, DistributionTableFilterEvent.REMOVE_FILTER_BY_TEXT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -95,9 +95,7 @@ public class SwModuleTable extends AbstractTable {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ArtifactDetailsLayout artifactDetailsLayout;
|
private ArtifactDetailsLayout artifactDetailsLayout;
|
||||||
|
|
||||||
private Boolean isFilterApplied = false;
|
/**
|
||||||
|
|
||||||
/**
|
|
||||||
* Initialize the filter layout.
|
* Initialize the filter layout.
|
||||||
*/
|
*/
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
@@ -126,21 +124,9 @@ public class SwModuleTable extends AbstractTable {
|
|||||||
if (filterEvent == SMFilterEvent.FILTER_BY_TYPE || filterEvent == SMFilterEvent.FILTER_BY_TEXT
|
if (filterEvent == SMFilterEvent.FILTER_BY_TYPE || filterEvent == SMFilterEvent.FILTER_BY_TEXT
|
||||||
|| filterEvent == SMFilterEvent.REMOVER_FILTER_BY_TYPE
|
|| filterEvent == SMFilterEvent.REMOVER_FILTER_BY_TYPE
|
||||||
|| filterEvent == SMFilterEvent.REMOVER_FILTER_BY_TEXT) {
|
|| filterEvent == SMFilterEvent.REMOVER_FILTER_BY_TEXT) {
|
||||||
final Map<String, Object> queryConfig = prepareQueryConfigFilters();
|
refreshFilter();
|
||||||
if(queryConfig.size()<2 && isFilterApplied==false){
|
styleTableOnDistSelection();
|
||||||
UI.getCurrent().access(() -> ((LazyQueryContainer) getContainerDataSource()).refresh());
|
}
|
||||||
|
|
||||||
}else {
|
|
||||||
UI.getCurrent().access(() ->{ refreshFilter();
|
|
||||||
styleTableOnDistSelection();
|
|
||||||
});
|
|
||||||
if(queryConfig.size()<2){
|
|
||||||
isFilterApplied = false;
|
|
||||||
}else{
|
|
||||||
isFilterApplied = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -203,8 +203,10 @@ public class SwModuleTableHeader extends AbstractTableHeader {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void resetSearchText() {
|
protected void resetSearchText() {
|
||||||
manageDistUIState.getSoftwareModuleFilters().setSearchText(null);
|
if(manageDistUIState.getSoftwareModuleFilters().getSearchText().isPresent()){
|
||||||
eventbus.publish(this, SMFilterEvent.REMOVER_FILTER_BY_TEXT);
|
manageDistUIState.getSoftwareModuleFilters().setSearchText(null);
|
||||||
|
eventbus.publish(this, SMFilterEvent.REMOVER_FILTER_BY_TEXT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -113,7 +113,6 @@ public class DistributionTable extends AbstractTable {
|
|||||||
|
|
||||||
private Button distributinPinnedBtn;
|
private Button distributinPinnedBtn;
|
||||||
|
|
||||||
private Boolean isFilterApplied = false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the distribution table.
|
* Initialize the distribution table.
|
||||||
@@ -142,24 +141,8 @@ public class DistributionTable extends AbstractTable {
|
|||||||
if (event == DistributionTableFilterEvent.FILTER_BY_TEXT
|
if (event == DistributionTableFilterEvent.FILTER_BY_TEXT
|
||||||
|| event == DistributionTableFilterEvent.REMOVE_FILTER_BY_TEXT
|
|| event == DistributionTableFilterEvent.REMOVE_FILTER_BY_TEXT
|
||||||
|| event == DistributionTableFilterEvent.FILTER_BY_TAG) {
|
|| event == DistributionTableFilterEvent.FILTER_BY_TAG) {
|
||||||
final Map<String, Object> queryConfig = prepareQueryConfigFilters();
|
UI.getCurrent().access(() -> refreshFilter());
|
||||||
if(((boolean)queryConfig.get(SPUIDefinitions.FILTER_BY_NO_TAG)==false)
|
}
|
||||||
&& ((List)queryConfig.get(SPUIDefinitions.FILTER_BY_TAG)).isEmpty()
|
|
||||||
&& queryConfig.size()<3
|
|
||||||
&& isFilterApplied==false){
|
|
||||||
UI.getCurrent().access(() -> ((LazyQueryContainer) getContainerDataSource()).refresh());
|
|
||||||
|
|
||||||
}else {
|
|
||||||
UI.getCurrent().access(() -> refreshFilter());
|
|
||||||
if(((boolean)queryConfig.get(SPUIDefinitions.FILTER_BY_NO_TAG)==false)
|
|
||||||
&& ((List)queryConfig.get(SPUIDefinitions.FILTER_BY_TAG)).isEmpty()
|
|
||||||
&& queryConfig.size()<3){
|
|
||||||
isFilterApplied = false;
|
|
||||||
}else{
|
|
||||||
isFilterApplied = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||||
|
|||||||
@@ -210,8 +210,10 @@ public class DistributionTableHeader extends AbstractTableHeader {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void resetSearchText() {
|
protected void resetSearchText() {
|
||||||
managementUIState.getDistributionTableFilters().setSearchText(null);
|
if( managementUIState.getDistributionTableFilters().getSearchText().isPresent()){
|
||||||
eventbus.publish(this, DistributionTableFilterEvent.REMOVE_FILTER_BY_TEXT);
|
managementUIState.getDistributionTableFilters().setSearchText(null);
|
||||||
|
eventbus.publish(this, DistributionTableFilterEvent.REMOVE_FILTER_BY_TEXT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -140,7 +140,6 @@ public class TargetTable extends AbstractTable implements Handler {
|
|||||||
private ShortcutAction actionSelectAll;
|
private ShortcutAction actionSelectAll;
|
||||||
private ShortcutAction actionUnSelectAll;
|
private ShortcutAction actionUnSelectAll;
|
||||||
|
|
||||||
private Boolean isFilterApplied = Boolean.FALSE;;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -211,21 +210,7 @@ public class TargetTable extends AbstractTable implements Handler {
|
|||||||
void onEvent(final TargetFilterEvent filterEvent) {
|
void onEvent(final TargetFilterEvent filterEvent) {
|
||||||
UI.getCurrent().access(() -> {
|
UI.getCurrent().access(() -> {
|
||||||
if (checkFilterEvent(filterEvent)) {
|
if (checkFilterEvent(filterEvent)) {
|
||||||
final Map<String, Object> queryConfiguration = prepareQueryConfigFilters();
|
refreshFilter();
|
||||||
if(((boolean)queryConfiguration.get(SPUIDefinitions.FILTER_BY_NO_TAG)==false)
|
|
||||||
&& queryConfiguration.size()<2
|
|
||||||
&& isFilterApplied==Boolean.FALSE){
|
|
||||||
((LazyQueryContainer) getContainerDataSource()).refresh();
|
|
||||||
|
|
||||||
}else {
|
|
||||||
refreshFilter();
|
|
||||||
if(queryConfiguration.size()<2){
|
|
||||||
isFilterApplied = Boolean.FALSE;
|
|
||||||
}else{
|
|
||||||
isFilterApplied = Boolean.TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
eventBus.publish(this, ManagementUIEvent.TARGET_TABLE_FILTER);
|
eventBus.publish(this, ManagementUIEvent.TARGET_TABLE_FILTER);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -258,8 +258,10 @@ public class TargetTableHeader extends AbstractTableHeader {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void resetSearchText() {
|
protected void resetSearchText() {
|
||||||
managementUIState.getTargetTableFilters().setSearchText(null);
|
if(managementUIState.getTargetTableFilters().getSearchText().isPresent()){
|
||||||
eventBus.publish(this, TargetFilterEvent.REMOVE_FILTER_BY_TEXT);
|
managementUIState.getTargetTableFilters().setSearchText(null);
|
||||||
|
eventBus.publish(this, TargetFilterEvent.REMOVE_FILTER_BY_TEXT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getSearchText() {
|
private String getSearchText() {
|
||||||
|
|||||||
Reference in New Issue
Block a user