Unify search behaviour in Mgmt UI (#1319)
Signed-off-by: Stanislav Trailov <stanislav.trailov@bosch.io>
This commit is contained in:
committed by
GitHub
parent
64bc0417b1
commit
06dca2d5d2
@@ -14,6 +14,7 @@ import java.util.Objects;
|
||||
import org.eclipse.hawkbit.ui.common.data.providers.DistributionSetManagementStateDataProvider;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Filter params for {@link DistributionSetManagementStateDataProvider}.
|
||||
@@ -37,7 +38,7 @@ public class DsFilterParams implements Serializable {
|
||||
* String as search text
|
||||
*/
|
||||
public DsFilterParams(final String searchText) {
|
||||
this.searchText = searchText;
|
||||
this.searchText = !StringUtils.isEmpty(searchText) ? String.format("%%%s%%", searchText) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,7 +65,7 @@ public class DsFilterParams implements Serializable {
|
||||
* String
|
||||
*/
|
||||
public void setSearchText(final String searchText) {
|
||||
this.searchText = searchText;
|
||||
this.searchText = !StringUtils.isEmpty(searchText) ? String.format("%%%s%%", searchText) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.Objects;
|
||||
import org.eclipse.hawkbit.ui.common.data.providers.SoftwareModuleDataProvider;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Filter params for {@link SoftwareModuleDataProvider}.
|
||||
@@ -44,7 +45,7 @@ public class SwFilterParams implements Serializable {
|
||||
*/
|
||||
public SwFilterParams(final String searchText, final Long softwareModuleTypeId,
|
||||
final Long lastSelectedDistributionId) {
|
||||
this.searchText = searchText;
|
||||
this.searchText = !StringUtils.isEmpty(searchText) ? String.format("%%%s%%", searchText) : null;
|
||||
this.softwareModuleTypeId = softwareModuleTypeId;
|
||||
this.lastSelectedDistributionId = lastSelectedDistributionId;
|
||||
}
|
||||
@@ -77,7 +78,7 @@ public class SwFilterParams implements Serializable {
|
||||
* String
|
||||
*/
|
||||
public void setSearchText(final String searchText) {
|
||||
this.searchText = searchText;
|
||||
this.searchText = !StringUtils.isEmpty(searchText) ? String.format("%%%s%%", searchText) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user