mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Adding device name url param for device search
This commit is contained in:
parent
c323b5162e
commit
58666bc4b0
@ -96,6 +96,11 @@ public interface DeviceManagementService {
|
||||
permissions = {"/permission/admin/device-mgt/admin/devices/list"}
|
||||
)
|
||||
Response getDevices(
|
||||
@ApiParam(
|
||||
name = "name",
|
||||
value = "The device name, such as shamu, bullhead or angler.",
|
||||
required = false)
|
||||
String name,
|
||||
@ApiParam(
|
||||
name = "type",
|
||||
value = "The device type, such as ios, android or windows.",
|
||||
|
||||
@ -62,6 +62,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
|
||||
@GET
|
||||
@Override
|
||||
public Response getDevices(
|
||||
@QueryParam("name") String name,
|
||||
@QueryParam("type") String type,
|
||||
@QueryParam("user") String user,
|
||||
@QueryParam("roleName") String roleName,
|
||||
@ -79,6 +80,9 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
|
||||
PaginationResult result;
|
||||
DeviceList devices = new DeviceList();
|
||||
|
||||
if(name != null && !name.isEmpty()){
|
||||
request.setDeviceName(name);
|
||||
}
|
||||
if (type != null && !type.isEmpty()) {
|
||||
request.setDeviceType(type);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user