mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Merge branch 'master' of https://github.com/wso2/carbon-device-mgt
This commit is contained in:
commit
bce1d9e060
@ -26,13 +26,14 @@ import org.wso2.carbon.device.mgt.common.operation.mgt.Activity;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ApiModel(value = "List of activities", description = "This contains a set of activities that matches a given " +
|
@ApiModel(value = "List of activities", description = "This contains a set of activities that matches a given"
|
||||||
"criteria as a collection")
|
+ " criteria as a collection")
|
||||||
public class ActivityList extends BasePaginatedResult {
|
public class ActivityList extends BasePaginatedResult {
|
||||||
|
|
||||||
private List<Activity> activities;
|
private List<Activity> activities;
|
||||||
|
|
||||||
@ApiModelProperty(value = "List of devices returned")
|
@ApiModelProperty(value = "Returns the list of activities that match the offset and limit parameter values"
|
||||||
|
+ " that were specified.")
|
||||||
@JsonProperty("activities")
|
@JsonProperty("activities")
|
||||||
public List<Activity> getList() {
|
public List<Activity> getList() {
|
||||||
return activities;
|
return activities;
|
||||||
@ -46,7 +47,6 @@ public class ActivityList extends BasePaginatedResult {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("{\n");
|
sb.append("{\n");
|
||||||
|
|
||||||
sb.append(" count: ").append(getCount()).append(",\n");
|
sb.append(" count: ").append(getCount()).append(",\n");
|
||||||
sb.append(" devices: [").append(activities).append("\n");
|
sb.append(" devices: [").append(activities).append("\n");
|
||||||
sb.append("]}\n");
|
sb.append("]}\n");
|
||||||
|
|||||||
@ -23,15 +23,13 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
|
|
||||||
public class BasePaginatedResult {
|
public class BasePaginatedResult {
|
||||||
|
|
||||||
private int count;
|
|
||||||
private String next;
|
|
||||||
private String previous;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Number of Resources returned.
|
* Number of Resources returned.
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "Number of resources returned.")
|
@ApiModelProperty(value = "Number of total resources.", example = "2")
|
||||||
@JsonProperty("count")
|
@JsonProperty("count")
|
||||||
|
private int count;
|
||||||
|
|
||||||
public int getCount() {
|
public int getCount() {
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,7 +29,8 @@ public class RoleList extends BasePaginatedResult {
|
|||||||
|
|
||||||
private List<String> roles;
|
private List<String> roles;
|
||||||
|
|
||||||
@ApiModelProperty(value = "List of roles returned")
|
@ApiModelProperty(value = "Returns the list of roles that match the offset and limit parameter values "
|
||||||
|
+ "that were specified.")
|
||||||
@JsonProperty("roles")
|
@JsonProperty("roles")
|
||||||
public List<String> getList() {
|
public List<String> getList() {
|
||||||
return roles;
|
return roles;
|
||||||
|
|||||||
@ -34,8 +34,8 @@ import javax.ws.rs.core.Response;
|
|||||||
@API(name = "Configuration Management", version = "1.0.0", context = "/api/device-mgt/v1.0/configuration", tags = {"devicemgt_admin"})
|
@API(name = "Configuration Management", version = "1.0.0", context = "/api/device-mgt/v1.0/configuration", tags = {"devicemgt_admin"})
|
||||||
|
|
||||||
@Path("/configuration")
|
@Path("/configuration")
|
||||||
@Api(value = "Configuration Management", description = "General Tenant Configuration management capabilities are exposed " +
|
@Api(value = "Configuration Management", description = "The general platform configuration management capabilities are exposed " +
|
||||||
"through this API")
|
"through this API.")
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
public interface ConfigurationManagementService {
|
public interface ConfigurationManagementService {
|
||||||
@ -44,14 +44,16 @@ public interface ConfigurationManagementService {
|
|||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
produces = MediaType.APPLICATION_JSON,
|
produces = MediaType.APPLICATION_JSON,
|
||||||
httpMethod = "GET",
|
httpMethod = "GET",
|
||||||
value = "Get the general platform configurations.",
|
value = "Getting General Platform Configurations",
|
||||||
notes = "Get the general platform level configuration details.",
|
notes = "WSO2 EMM monitors policies to verify that the devices comply with the policies enforced on them. " +
|
||||||
|
"General platform configurations include the settings on how often the the device need to be monitored. " +
|
||||||
|
"Using this REST API you can get the general platform level configurations.",
|
||||||
tags = "Configuration Management")
|
tags = "Configuration Management")
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 200,
|
code = 200,
|
||||||
message = "OK. \n Successfully fetched general platform configuration.",
|
message = "OK. \n Successfully fetched the general platform configurations.",
|
||||||
response = PlatformConfiguration.class,
|
response = PlatformConfiguration.class,
|
||||||
responseContainer = "List",
|
responseContainer = "List",
|
||||||
responseHeaders = {
|
responseHeaders = {
|
||||||
@ -70,22 +72,23 @@ public interface ConfigurationManagementService {
|
|||||||
),
|
),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 304,
|
code = 304,
|
||||||
message = "Not Modified. \n Empty body because the client has already the latest version of " +
|
message = "Not Modified. \n Empty body because the client already has the latest version of the requested resource."),
|
||||||
"the requested resource."),
|
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 406,
|
code = 406,
|
||||||
message = "Not Acceptable.\n The requested media type is not supported"),
|
message = "Not Acceptable.\n The requested media type is not supported."),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 500,
|
code = 500,
|
||||||
message = "Internal Server Error. \n Server error occurred while fetching the general " +
|
message = "Internal Server Error. \n Server error occurred while fetching the general " +
|
||||||
"platform configuration.",
|
"platform configurations.",
|
||||||
response = ErrorResponse.class)
|
response = ErrorResponse.class)
|
||||||
})
|
})
|
||||||
@Permission(name = "View Configurations", permission = "/device-mgt/platform-configurations/view")
|
@Permission(name = "View Configurations", permission = "/device-mgt/platform-configurations/view")
|
||||||
Response getConfiguration(
|
Response getConfiguration(
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "If-Modified-Since",
|
name = "If-Modified-Since",
|
||||||
value = "Validates if the requested variant has not been modified since the time specified",
|
value = "Checks if the requested variant was modified, since the specified date-time.\n" +
|
||||||
|
"Provide the value in the following format: EEE, d MMM yyyy HH:mm:ss Z." +
|
||||||
|
"Example: Mon, 05 Jan 2014 15:10:00 +0200",
|
||||||
required = false)
|
required = false)
|
||||||
@HeaderParam("If-Modified-Since")
|
@HeaderParam("If-Modified-Since")
|
||||||
String ifModifiedSince);
|
String ifModifiedSince);
|
||||||
@ -95,14 +98,16 @@ public interface ConfigurationManagementService {
|
|||||||
consumes = MediaType.APPLICATION_JSON,
|
consumes = MediaType.APPLICATION_JSON,
|
||||||
produces = MediaType.APPLICATION_JSON,
|
produces = MediaType.APPLICATION_JSON,
|
||||||
httpMethod = "PUT",
|
httpMethod = "PUT",
|
||||||
value = "Update General Platform Configurations.",
|
value = "Updating General Platform Configurations",
|
||||||
notes = "This resource is used to update the general platform configuration.",
|
notes = "WSO2 EMM monitors policies to verify that the devices comply with the policies enforced on them." +
|
||||||
|
"General platform configurations include the settings on how often the the device need to be monitored." +
|
||||||
|
"Using this REST API you can update the general platform level configurations.",
|
||||||
tags = "Configuration Management")
|
tags = "Configuration Management")
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 200,
|
code = 200,
|
||||||
message = "OK. \n General platform configuration has been updated successfully",
|
message = "OK. \n Successfully updated the general platform configurations.",
|
||||||
responseHeaders = {
|
responseHeaders = {
|
||||||
@ResponseHeader(
|
@ResponseHeader(
|
||||||
name = "Content-Type",
|
name = "Content-Type",
|
||||||
@ -120,18 +125,18 @@ public interface ConfigurationManagementService {
|
|||||||
message = "Bad Request. \n Invalid request or validation error."),
|
message = "Bad Request. \n Invalid request or validation error."),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 415,
|
code = 415,
|
||||||
message = "Unsupported media type. \n The entity of the request was in a not supported format."),
|
message = "Unsupported media type. \n The format of the requested entity was not supported."),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 500,
|
code = 500,
|
||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while modifying general platform configuration.",
|
"Server error occurred while modifying the general platform configurations.",
|
||||||
response = ErrorResponse.class)
|
response = ErrorResponse.class)
|
||||||
})
|
})
|
||||||
@Permission(name = "Manage configurations", permission = "/device-mgt/platform-configurations/manage")
|
@Permission(name = "Manage configurations", permission = "/device-mgt/platform-configurations/manage")
|
||||||
Response updateConfiguration(
|
Response updateConfiguration(
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "configuration",
|
name = "configuration",
|
||||||
value = "The required properties to be updated in the platform configuration.",
|
value = "The properties required to update the platform configurations.",
|
||||||
required = true)
|
required = true)
|
||||||
PlatformConfiguration configuration);
|
PlatformConfiguration configuration);
|
||||||
|
|
||||||
|
|||||||
@ -44,15 +44,15 @@ public interface RoleManagementService {
|
|||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
produces = MediaType.APPLICATION_JSON,
|
produces = MediaType.APPLICATION_JSON,
|
||||||
httpMethod = "GET",
|
httpMethod = "GET",
|
||||||
value = "Get the list of roles.",
|
value = "Getting the List of Roles",
|
||||||
notes = "If you wish to get the details of all the roles in EMM, you can do so using this REST API. All " +
|
notes = "WSO2 EMM supports role-based access control (RBAC) and role management. Using this API you can the list of roles that are in WSO2 EMM.\n" +
|
||||||
"internal roles, roles created for Service-providers and application related roles are omitted.",
|
"Note: Internal roles, roles created for service-providers, and application related roles will not be given in the output.",
|
||||||
tags = "Role Management")
|
tags = "Role Management")
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 200,
|
code = 200,
|
||||||
message = "OK. \n Successfully fetched the requested list of roles.",
|
message = "OK. \n Successfully fetched the list of roles in WSO2 EMM.",
|
||||||
response = RoleList.class,
|
response = RoleList.class,
|
||||||
responseHeaders = {
|
responseHeaders = {
|
||||||
@ResponseHeader(
|
@ResponseHeader(
|
||||||
@ -69,41 +69,45 @@ public interface RoleManagementService {
|
|||||||
}),
|
}),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 304,
|
code = 304,
|
||||||
message = "Not Modified. \n Empty body because the client has already the latest version of the requested resource."),
|
message = "Not Modified. \n Empty body because the client already has the latest version of the requested resource."),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 406,
|
code = 406,
|
||||||
message = "Not Acceptable.\n The requested media type is not supported"),
|
message = "Not Acceptable.\n The requested media type is not supported"),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 500,
|
code = 500,
|
||||||
message = "Internal Server Error. \n Server error occurred while fetching requested list of roles.",
|
message = "Internal Server Error. \n Server error occurred while fetching list of roles.",
|
||||||
response = ErrorResponse.class)
|
response = ErrorResponse.class)
|
||||||
})
|
})
|
||||||
@Permission(name = "View Roles", permission = "/device-mgt/roles/view")
|
@Permission(name = "View Roles", permission = "/device-mgt/roles/view")
|
||||||
Response getRoles(
|
Response getRoles(
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "filter",
|
name = "filter",
|
||||||
value = "Role name or a part of it to search.",
|
value = "Provide a character or a few characters in the role name.",
|
||||||
required = false)
|
required = false)
|
||||||
@QueryParam("filter") String filter,
|
@QueryParam("filter") String filter,
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "user-store",
|
name = "user-store",
|
||||||
value = "From which user store the roles must be fetched.",
|
value = "The name of the UserStore you wish to get the list of roles.",
|
||||||
required = false)
|
required = false)
|
||||||
@QueryParam("user-store") String userStoreName,
|
@QueryParam("user-store") String userStoreName,
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "If-Modified-Since",
|
name = "If-Modified-Since",
|
||||||
value = "Validates if the requested variant has not been modified since the time specified",
|
value = "Checks if the requested variant was modified, since the specified date-time." +
|
||||||
|
"Provide the value in the following format: EEE, d MMM yyyy HH:mm:ss Z.\n" +
|
||||||
|
"Example: Mon, 05 Jan 2014 15:10:00 +0200",
|
||||||
required = false)
|
required = false)
|
||||||
@HeaderParam("If-Modified-Since") String ifModifiedSince,
|
@HeaderParam("If-Modified-Since") String ifModifiedSince,
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "offset",
|
name = "offset",
|
||||||
value = "Starting point within the complete list of items qualified.",
|
value = "The starting pagination index for the complete list qualified items.",
|
||||||
required = false)
|
required = false,
|
||||||
|
defaultValue = "0")
|
||||||
@QueryParam("offset") int offset,
|
@QueryParam("offset") int offset,
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "limit",
|
name = "limit",
|
||||||
value = "Maximum size of resource array to return.",
|
value = "Provide how many roles details you require from the starting pagination index/offset.",
|
||||||
required = false)
|
required = false,
|
||||||
|
defaultValue = "5")
|
||||||
@QueryParam("limit") int limit);
|
@QueryParam("limit") int limit);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@ -111,10 +115,10 @@ public interface RoleManagementService {
|
|||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
produces = MediaType.APPLICATION_JSON,
|
produces = MediaType.APPLICATION_JSON,
|
||||||
httpMethod = "GET",
|
httpMethod = "GET",
|
||||||
value = "Getting permission details of a role.",
|
value = "Getting Permission Details of a Role",
|
||||||
notes = "In an organization an individual is associated a with set of responsibilities based on their " +
|
notes = "An individual is associated a with set of responsibilities based on their " +
|
||||||
"role. In EMM you are able to configure permissions based on the responsibilities carried " +
|
"role. In WSO2 EMM you are able to configure permissions based on the responsibilities carried " +
|
||||||
"out by a role. Therefore if you wish to retrieve the permission details of a role, you can do " +
|
"out by various roles. Therefore, if you wish to retrieve the permission details of a role, you can do " +
|
||||||
"so using this REST API.",
|
"so using this REST API.",
|
||||||
response = UIPermissionNode.class,
|
response = UIPermissionNode.class,
|
||||||
responseContainer = "List",
|
responseContainer = "List",
|
||||||
@ -124,7 +128,7 @@ public interface RoleManagementService {
|
|||||||
value = {
|
value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 200,
|
code = 200,
|
||||||
message = "OK. \n Successfully fetched the permission list of the given role.",
|
message = "OK. \n Successfully fetched the permissions details for the specified role.",
|
||||||
response = UIPermissionNode.class,
|
response = UIPermissionNode.class,
|
||||||
responseContainer = "List",
|
responseContainer = "List",
|
||||||
responseHeaders = {
|
responseHeaders = {
|
||||||
@ -142,14 +146,14 @@ public interface RoleManagementService {
|
|||||||
}),
|
}),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 304,
|
code = 304,
|
||||||
message = "Not Modified. \n Empty body because the client has already the latest version of the requested resource."),
|
message = "Not Modified. \n Empty body because the client already has the latest version of the requested resource.\n"),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 400,
|
code = 400,
|
||||||
message = "Bad Request. \n Invalid request or validation error.",
|
message = "Bad Request. \n Invalid request or validation error.",
|
||||||
response = ErrorResponse.class),
|
response = ErrorResponse.class),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 404,
|
code = 404,
|
||||||
message = "Not Found. \n Role does not exist.",
|
message = "Not Found. \n The specified role does not exist.",
|
||||||
response = ErrorResponse.class),
|
response = ErrorResponse.class),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 406,
|
code = 406,
|
||||||
@ -157,19 +161,22 @@ public interface RoleManagementService {
|
|||||||
response = ErrorResponse.class),
|
response = ErrorResponse.class),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 500,
|
code = 500,
|
||||||
message = "Internal Server ErrorResponse. \n Server error occurred while fetching the permission list of the requested role.",
|
message = "Internal Server ErrorResponse. \n Server error occurred while fetching the permission list for the requested role.",
|
||||||
response = ErrorResponse.class)
|
response = ErrorResponse.class)
|
||||||
})
|
})
|
||||||
@Permission(name = "View Roles", permission = "/device-mgt/roles/view")
|
@Permission(name = "View Roles", permission = "/device-mgt/roles/view")
|
||||||
Response getPermissionsOfRole(
|
Response getPermissionsOfRole(
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "roleName",
|
name = "roleName",
|
||||||
value = "Name of the role.",
|
value = "The name of the role.",
|
||||||
required = true)
|
required = true,
|
||||||
|
defaultValue = "Engineer")
|
||||||
@PathParam("roleName") String roleName,
|
@PathParam("roleName") String roleName,
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "If-Modified-Since",
|
name = "If-Modified-Since",
|
||||||
value = "Validates if the requested variant has not been modified since the time specified",
|
value = "Checks if the requested variant was modified, since the specified date-time." +
|
||||||
|
"Provide the value in the following format: EEE, d MMM yyyy HH:mm:ss Z.\n" +
|
||||||
|
"Example: Mon, 05 Jan 2014 15:10:00 +0200",
|
||||||
required = false)
|
required = false)
|
||||||
@HeaderParam("If-Modified-Since") String ifModifiedSince);
|
@HeaderParam("If-Modified-Since") String ifModifiedSince);
|
||||||
|
|
||||||
@ -178,15 +185,15 @@ public interface RoleManagementService {
|
|||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
produces = MediaType.APPLICATION_JSON,
|
produces = MediaType.APPLICATION_JSON,
|
||||||
httpMethod = "GET",
|
httpMethod = "GET",
|
||||||
value = "Get details of a role.",
|
value = "Getting Details of a Role",
|
||||||
notes = "If you wish to get the details of a role in EMM, you can do so using this REST API.",
|
notes = "Get the permissions associated with a role and role specific details using this REST API.",
|
||||||
response = RoleInfo.class,
|
response = RoleInfo.class,
|
||||||
tags = "Role Management")
|
tags = "Role Management")
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 200,
|
code = 200,
|
||||||
message = "OK. \n Successfully fetched the requested role.",
|
message = "OK. \n Successfully fetched the details of the role.",
|
||||||
response = RoleInfo.class,
|
response = RoleInfo.class,
|
||||||
responseHeaders = {
|
responseHeaders = {
|
||||||
@ResponseHeader(
|
@ResponseHeader(
|
||||||
@ -203,15 +210,14 @@ public interface RoleManagementService {
|
|||||||
}),
|
}),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 304,
|
code = 304,
|
||||||
message = "Not Modified. \n Empty body because the client has already the latest version of" +
|
message = "Not Modified. \n Empty body because the client already has the latest version of the requested resource."),
|
||||||
" the requested resource."),
|
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 400,
|
code = 400,
|
||||||
message = "Bad Request. \n Invalid request or validation error.",
|
message = "Bad Request. \n Invalid request or validation error.",
|
||||||
response = ErrorResponse.class),
|
response = ErrorResponse.class),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 404,
|
code = 404,
|
||||||
message = "Not Found. \n Role does not exist.",
|
message = "Not Found. \n The specified role does not exist.",
|
||||||
response = ErrorResponse.class),
|
response = ErrorResponse.class),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 406,
|
code = 406,
|
||||||
@ -219,7 +225,7 @@ public interface RoleManagementService {
|
|||||||
response = ErrorResponse.class),
|
response = ErrorResponse.class),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 500,
|
code = 500,
|
||||||
message = "Internal Server Error. \n Server error occurred while fetching the " +
|
message = "Internal Server Error. \n Server error occurred while fetching the details of" +
|
||||||
"requested role.",
|
"requested role.",
|
||||||
response = ErrorResponse.class)
|
response = ErrorResponse.class)
|
||||||
})
|
})
|
||||||
@ -227,12 +233,15 @@ public interface RoleManagementService {
|
|||||||
Response getRole(
|
Response getRole(
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "roleName",
|
name = "roleName",
|
||||||
value = "Name of the role.",
|
value = "The name of the role.",
|
||||||
required = true)
|
required = true,
|
||||||
|
defaultValue = "admin")
|
||||||
@PathParam("roleName") String roleName,
|
@PathParam("roleName") String roleName,
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "If-Modified-Since",
|
name = "If-Modified-Since",
|
||||||
value = "Validates if the requested variant has not been modified since the time specified",
|
value = "Checks if the requested variant was modified, since the specified date-time." +
|
||||||
|
"Provide the value in the following format: EEE, d MMM yyyy HH:mm:ss Z.\n" +
|
||||||
|
"Example: Mon, 05 Jan 2014 15:10:00 +0200",
|
||||||
required = false)
|
required = false)
|
||||||
@HeaderParam("If-Modified-Since") String ifModifiedSince);
|
@HeaderParam("If-Modified-Since") String ifModifiedSince);
|
||||||
|
|
||||||
@ -241,17 +250,17 @@ public interface RoleManagementService {
|
|||||||
consumes = MediaType.APPLICATION_JSON,
|
consumes = MediaType.APPLICATION_JSON,
|
||||||
produces = MediaType.APPLICATION_JSON,
|
produces = MediaType.APPLICATION_JSON,
|
||||||
httpMethod = "POST",
|
httpMethod = "POST",
|
||||||
value = "Add a role.",
|
value = "Adding a Role",
|
||||||
notes = "You are able to add a new role to EMM using the REST API.",
|
notes = "WSO2 EMM supports role-based access control (RBAC) and role management. Add a new role to WSO2 EMM using this REST API.",
|
||||||
tags = "Role Management")
|
tags = "Role Management")
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 201,
|
code = 201,
|
||||||
message = "Created. \n Role has successfully been created",
|
message = "Created. \n Successfully created the role.",
|
||||||
responseHeaders = {
|
responseHeaders = {
|
||||||
@ResponseHeader(
|
@ResponseHeader(
|
||||||
name = "Content-Location",
|
name = "Content-Location",
|
||||||
description = "The URL of the role added."),
|
description = "The URL to the newly added role."),
|
||||||
@ResponseHeader(
|
@ResponseHeader(
|
||||||
name = "Content-Type",
|
name = "Content-Type",
|
||||||
description = "The content type of the body"),
|
description = "The content type of the body"),
|
||||||
@ -265,7 +274,7 @@ public interface RoleManagementService {
|
|||||||
"Used by caches, or in conditional requests.")}),
|
"Used by caches, or in conditional requests.")}),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 303,
|
code = 303,
|
||||||
message = "See Other. \n Source can be retrieved from the URL specified at the Location header.",
|
message = "See Other. \n The source can be retrieved from the URL specified in the location header.",
|
||||||
responseHeaders = {
|
responseHeaders = {
|
||||||
@ResponseHeader(
|
@ResponseHeader(
|
||||||
name = "Content-Location",
|
name = "Content-Location",
|
||||||
@ -276,7 +285,7 @@ public interface RoleManagementService {
|
|||||||
response = ErrorResponse.class),
|
response = ErrorResponse.class),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 415,
|
code = 415,
|
||||||
message = "Unsupported media type. \n The entity of the request was in a not supported format.",
|
message = "Unsupported media type. \n The format of the requested entity was not supported.",
|
||||||
response = ErrorResponse.class),
|
response = ErrorResponse.class),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 500,
|
code = 500,
|
||||||
@ -287,7 +296,7 @@ public interface RoleManagementService {
|
|||||||
Response addRole(
|
Response addRole(
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "role",
|
name = "role",
|
||||||
value = "Details about the role to be added.",
|
value = "The properties required to add a new role.",
|
||||||
required = true) RoleInfo role);
|
required = true) RoleInfo role);
|
||||||
|
|
||||||
@PUT
|
@PUT
|
||||||
@ -296,14 +305,14 @@ public interface RoleManagementService {
|
|||||||
consumes = MediaType.APPLICATION_JSON,
|
consumes = MediaType.APPLICATION_JSON,
|
||||||
produces = MediaType.APPLICATION_JSON,
|
produces = MediaType.APPLICATION_JSON,
|
||||||
httpMethod = "PUT",
|
httpMethod = "PUT",
|
||||||
value = "Update a role.",
|
value = "Updating Role Details",
|
||||||
notes = "There will be situations where you will need to update the role details, such as the permissions" +
|
notes = "There will be situations where you need to update the role details, such as the permissions" +
|
||||||
" or the role name. In such situation you can update the role details.",
|
" or the role name. Update the role details using this REST API.",
|
||||||
tags = "Role Management")
|
tags = "Role Management")
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 200,
|
code = 200,
|
||||||
message = "OK. \n Role has been updated successfully",
|
message = "OK. \n Successfully updated the specified role.",
|
||||||
responseHeaders = {
|
responseHeaders = {
|
||||||
@ResponseHeader(
|
@ResponseHeader(
|
||||||
name = "Content-Type",
|
name = "Content-Type",
|
||||||
@ -314,7 +323,7 @@ public interface RoleManagementService {
|
|||||||
"Used by caches, or in conditional requests."),
|
"Used by caches, or in conditional requests."),
|
||||||
@ResponseHeader(
|
@ResponseHeader(
|
||||||
name = "Last-Modified",
|
name = "Last-Modified",
|
||||||
description = "Date and time the resource has been modified the last time.\n" +
|
description = "Date and time the resource was last modified.\n" +
|
||||||
"Used by caches, or in conditional requests.")}),
|
"Used by caches, or in conditional requests.")}),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 400,
|
code = 400,
|
||||||
@ -322,11 +331,11 @@ public interface RoleManagementService {
|
|||||||
response = ErrorResponse.class),
|
response = ErrorResponse.class),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 404,
|
code = 404,
|
||||||
message = "Not Found. \n Role to be deleted does not exist.",
|
message = "Not Found. \n The specified role does not exist.",
|
||||||
response = ErrorResponse.class),
|
response = ErrorResponse.class),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 415,
|
code = 415,
|
||||||
message = "Unsupported media type. \n The entity of the request was in a not supported format.",
|
message = "Unsupported media type. \n The format of the requested entity was not supported.\n",
|
||||||
response = ErrorResponse.class),
|
response = ErrorResponse.class),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 500,
|
code = 500,
|
||||||
@ -337,33 +346,34 @@ public interface RoleManagementService {
|
|||||||
Response updateRole(
|
Response updateRole(
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "roleName",
|
name = "roleName",
|
||||||
value = "Name of the role.",
|
value = "The name of the role.",
|
||||||
required = true)
|
required = true,
|
||||||
|
defaultValue = "engineer")
|
||||||
@PathParam("roleName") String roleName,
|
@PathParam("roleName") String roleName,
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "role",
|
name = "role",
|
||||||
value = "Details about the role to be added.",
|
value = "The properties required to update a role.",
|
||||||
required = true) RoleInfo role);
|
required = true) RoleInfo role);
|
||||||
|
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path("/{roleName}")
|
@Path("/{roleName}")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
httpMethod = "DELETE",
|
httpMethod = "DELETE",
|
||||||
value = "Delete a role.",
|
value = "Deleting a Role",
|
||||||
notes = "In a situation when your Organization identifies that a specific role is no longer required you " +
|
notes = "Roles become obsolete over time due to various reasons. In a situation where your Organization identifies that a specific role is no longer required, you " +
|
||||||
"will need to remove the role details from EMM.",
|
"can delete a role using this REST API.",
|
||||||
tags = "Role Management")
|
tags = "Role Management")
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 200,
|
code = 200,
|
||||||
message = "OK. \n Role has successfully been removed"),
|
message = "OK. \n Successfully removed the specified role."),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 400,
|
code = 400,
|
||||||
message = "Bad Request. \n Invalid request or validation error.",
|
message = "Bad Request. \n Invalid request or validation error.",
|
||||||
response = ErrorResponse.class),
|
response = ErrorResponse.class),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 404,
|
code = 404,
|
||||||
message = "Not Found. \n Role to be deleted does not exist.",
|
message = "Not Found. \n The specified role does not exist.",
|
||||||
response = ErrorResponse.class),
|
response = ErrorResponse.class),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 500,
|
code = 500,
|
||||||
@ -374,8 +384,9 @@ public interface RoleManagementService {
|
|||||||
Response deleteRole(
|
Response deleteRole(
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "roleName",
|
name = "roleName",
|
||||||
value = "Name of the role to de deleted.",
|
value = "The name of the role that needs to de deleted.",
|
||||||
required = true)
|
required = true,
|
||||||
|
defaultValue = "engineer")
|
||||||
@PathParam("roleName") String roleName);
|
@PathParam("roleName") String roleName);
|
||||||
|
|
||||||
@PUT
|
@PUT
|
||||||
@ -384,19 +395,19 @@ public interface RoleManagementService {
|
|||||||
consumes = MediaType.APPLICATION_JSON,
|
consumes = MediaType.APPLICATION_JSON,
|
||||||
produces = MediaType.APPLICATION_JSON,
|
produces = MediaType.APPLICATION_JSON,
|
||||||
httpMethod = "PUT",
|
httpMethod = "PUT",
|
||||||
value = "Add users to a role.",
|
value = "Adding Users to a Role",
|
||||||
notes = "Defining the users to a role at the point of creating a new role is optional, " +
|
notes = "Defining users to a role at the point of creating a new role is optional. " +
|
||||||
"therefore you are able to update the users that belong to a given role after you have created " +
|
"You can update the users that belong to a given role after you have created " +
|
||||||
"a role using this REST API." +
|
"a role using this REST API.\n" +
|
||||||
"Example: Your Organization hires 30 new engineers. Updating the role details for each user can " +
|
"Example: Your Organization hires 30 new engineers. Updating the role details for each user can " +
|
||||||
"be cumbersome, therefore you can define all the new employees that belong to the engineering " +
|
"be cumbersome. Therefore, you can define all the new employees that belong to the engineering " +
|
||||||
"role using this API.",
|
"role using this API.",
|
||||||
tags = "Role Management")
|
tags = "Role Management")
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 200,
|
code = 200,
|
||||||
message = "OK. \n User list of the role has been updated successfully",
|
message = "OK. \n Successfully added the users to the specified role.",
|
||||||
responseHeaders = {
|
responseHeaders = {
|
||||||
@ResponseHeader(
|
@ResponseHeader(
|
||||||
name = "Content-Type",
|
name = "Content-Type",
|
||||||
@ -415,17 +426,17 @@ public interface RoleManagementService {
|
|||||||
response = ErrorResponse.class),
|
response = ErrorResponse.class),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 404,
|
code = 404,
|
||||||
message = "Not Found. \n Resource to be deleted does not exist.",
|
message = "Not Found. \n The specified role does not exist.",
|
||||||
response = ErrorResponse.class),
|
response = ErrorResponse.class),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 415,
|
code = 415,
|
||||||
message = "Unsupported media type. \n The entity of the request was in a not " +
|
message = "Unsupported media type. \n The format of the requested entity was not supported.\n" +
|
||||||
"supported format.",
|
"supported format.",
|
||||||
response = ErrorResponse.class),
|
response = ErrorResponse.class),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 500,
|
code = 500,
|
||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while updating the user list of the role.",
|
"Server error occurred while adding the user to the specified role.",
|
||||||
response = ErrorResponse.class)
|
response = ErrorResponse.class)
|
||||||
})
|
})
|
||||||
@Permission(name = "Manage Roles", permission = "/device-mgt/roles/manage")
|
@Permission(name = "Manage Roles", permission = "/device-mgt/roles/manage")
|
||||||
@ -437,7 +448,10 @@ public interface RoleManagementService {
|
|||||||
@PathParam("roleName") String roleName,
|
@PathParam("roleName") String roleName,
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "users",
|
name = "users",
|
||||||
value = "List of usernames to be added.",
|
value = "Define the users that belong to the role.\n" +
|
||||||
required = true) List<String> users);
|
"Multiple users can be added to a role by using comma separated values. ",
|
||||||
|
required = true,
|
||||||
|
defaultValue = "[jim]"
|
||||||
|
) List<String> users);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,14 +49,14 @@ public interface ApplicationManagementAdminService {
|
|||||||
consumes = MediaType.APPLICATION_JSON,
|
consumes = MediaType.APPLICATION_JSON,
|
||||||
produces = MediaType.APPLICATION_JSON,
|
produces = MediaType.APPLICATION_JSON,
|
||||||
httpMethod = "POST",
|
httpMethod = "POST",
|
||||||
value = "Application installation API.(Internal API)",
|
value = "Installing an Application (Internal API)",
|
||||||
notes = "This is an internal API used for application installation on a device.",
|
notes = "This is an internal API that can be used to install an application on a device.",
|
||||||
response = Activity.class,
|
response = Activity.class,
|
||||||
tags = "Application Management Administrative Service")
|
tags = "Application Management Administrative Service")
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 202,
|
code = 202,
|
||||||
message = "OK. \n Install application operation will be delivered to the given devices",
|
message = "Accepted. \n The install application operation will be delivered to the specified devices",
|
||||||
response = Activity.class),
|
response = Activity.class),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 400,
|
code = 400,
|
||||||
@ -64,15 +64,15 @@ public interface ApplicationManagementAdminService {
|
|||||||
response = ErrorResponse.class),
|
response = ErrorResponse.class),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 404,
|
code = 404,
|
||||||
message = "Not Found. \n Resource to be processed does not exist."),
|
message = "Not Found. \n The specified resource does not exist."),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 415,
|
code = 415,
|
||||||
message = "Unsupported media type. \n The entity of the request was in a not supported format."),
|
message = "Unsupported media type. \n The format of the requested entity was not supported."),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 500,
|
code = 500,
|
||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while bulk issuing application installation operations upon " +
|
"Server error occurred while executing the application install operation in bulk" +
|
||||||
"a given set of devices.",
|
" for a specified set of devices.",
|
||||||
response = ErrorResponse.class)
|
response = ErrorResponse.class)
|
||||||
})
|
})
|
||||||
@Permission(name = "Install/Uninstall applications", permission = "/device-mgt/applications/manage")
|
@Permission(name = "Install/Uninstall applications", permission = "/device-mgt/applications/manage")
|
||||||
@ -88,14 +88,14 @@ public interface ApplicationManagementAdminService {
|
|||||||
consumes = MediaType.APPLICATION_JSON,
|
consumes = MediaType.APPLICATION_JSON,
|
||||||
produces = MediaType.APPLICATION_JSON,
|
produces = MediaType.APPLICATION_JSON,
|
||||||
httpMethod = "POST",
|
httpMethod = "POST",
|
||||||
value = "Application un-installation API.(Internal API)",
|
value = "Uninstalling an Application (Internal API)\n",
|
||||||
notes = "This is an internal API used for application un-installation on a device.",
|
notes = "This is an internal API that can be used to uninstall an application.",
|
||||||
response = Activity.class,
|
response = Activity.class,
|
||||||
tags = "Application Management Administrative Service")
|
tags = "Application Management Administrative Service")
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 202,
|
code = 202,
|
||||||
message = "OK. \n Uninstall application operation will be delivered to the provided devices",
|
message = "Accepted. \n The uninstall application operation will be delivered to the provided devices",
|
||||||
response = Activity.class),
|
response = Activity.class),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 400,
|
code = 400,
|
||||||
@ -103,15 +103,14 @@ public interface ApplicationManagementAdminService {
|
|||||||
response = ErrorResponse.class),
|
response = ErrorResponse.class),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 404,
|
code = 404,
|
||||||
message = "Not Found. \n Resource to be processed does not exist."),
|
message = "Not Found. \n The specified resource does not exist."),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 415,
|
code = 415,
|
||||||
message = "Unsupported media type. \n The entity of the request was in a not supported format."),
|
message = "Unsupported media type. \n The entity of the request was in a not supported format."),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 500,
|
code = 500,
|
||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n Server error occurred while executing the application install operation in bulk" +
|
||||||
"Server error occurred while bulk issuing application un-installation operations upon " +
|
" for a specified set of devices.",
|
||||||
"a given set of devices.",
|
|
||||||
response = ErrorResponse.class)
|
response = ErrorResponse.class)
|
||||||
})
|
})
|
||||||
@Permission(name = "Install/Uninstall applications", permission = "/device-mgt/applications/manage")
|
@Permission(name = "Install/Uninstall applications", permission = "/device-mgt/applications/manage")
|
||||||
|
|||||||
@ -29,12 +29,12 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@SwaggerDefinition(
|
@SwaggerDefinition(
|
||||||
basePath = "/api-device-mgt-v1.0",
|
basePath = "/api/device-mgt/v1.0",
|
||||||
host = "localhost:9443"
|
host = "localhost:9443"
|
||||||
)
|
)
|
||||||
public class SecurityDefinitionConfigurator implements ReaderListener {
|
public class SecurityDefinitionConfigurator implements ReaderListener {
|
||||||
|
|
||||||
public static final String TOKEN_AUTH_SCHEME = "tokenAuthScheme";
|
public static final String TOKEN_AUTH_SCHEME = "swagger_auth";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void beforeScan(Reader reader, Swagger swagger) {
|
public void beforeScan(Reader reader, Swagger swagger) {
|
||||||
@ -45,9 +45,10 @@ public class SecurityDefinitionConfigurator implements ReaderListener {
|
|||||||
public void afterScan(Reader reader, Swagger swagger) {
|
public void afterScan(Reader reader, Swagger swagger) {
|
||||||
OAuth2Definition tokenScheme = new OAuth2Definition();
|
OAuth2Definition tokenScheme = new OAuth2Definition();
|
||||||
tokenScheme.setType("oauth2");
|
tokenScheme.setType("oauth2");
|
||||||
tokenScheme.setFlow("password");
|
tokenScheme.setFlow("application");
|
||||||
tokenScheme.setTokenUrl("https://" + swagger.getHost() + "/oauth/token");
|
tokenScheme.setTokenUrl("https://" + swagger.getHost() + "/oauth2/token");
|
||||||
tokenScheme.setAuthorizationUrl("https://" + swagger.getHost() + "/oauth/authorize");
|
tokenScheme.setAuthorizationUrl("https://" + swagger.getHost() + "/oauth2/authorize");
|
||||||
|
tokenScheme.addScope("write:everything", "Full access");
|
||||||
|
|
||||||
Map<String, SecuritySchemeDefinition> schemes = new HashMap<>();
|
Map<String, SecuritySchemeDefinition> schemes = new HashMap<>();
|
||||||
schemes.put(TOKEN_AUTH_SCHEME, tokenScheme);
|
schemes.put(TOKEN_AUTH_SCHEME, tokenScheme);
|
||||||
|
|||||||
@ -28,12 +28,20 @@ import java.io.Serializable;
|
|||||||
"uniquely.")
|
"uniquely.")
|
||||||
public class DeviceIdentifier implements Serializable{
|
public class DeviceIdentifier implements Serializable{
|
||||||
|
|
||||||
|
@ApiModelProperty(
|
||||||
|
name = "id",
|
||||||
|
value = "Identity of the device.",
|
||||||
|
required = true,
|
||||||
|
example = "123456")
|
||||||
@JsonProperty(value = "id", required = true)
|
@JsonProperty(value = "id", required = true)
|
||||||
@ApiModelProperty(name = "id", value = "Identity of the device.", required = true)
|
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty(
|
||||||
|
name = "type",
|
||||||
|
value = "Type of the device.",
|
||||||
|
required = true,
|
||||||
|
example = "android")
|
||||||
@JsonProperty(value = "type", required = true)
|
@JsonProperty(value = "type", required = true)
|
||||||
@ApiModelProperty(name = "type", value = "Type of the device.", required = true)
|
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
public DeviceIdentifier() {}
|
public DeviceIdentifier() {}
|
||||||
|
|||||||
@ -36,14 +36,16 @@ public class Activity {
|
|||||||
@ApiModelProperty(
|
@ApiModelProperty(
|
||||||
name = "activityId",
|
name = "activityId",
|
||||||
value = "Activity identifier",
|
value = "Activity identifier",
|
||||||
required = true)
|
required = true,
|
||||||
|
example = "ACTIVITY_1")
|
||||||
@JsonProperty("activityId")
|
@JsonProperty("activityId")
|
||||||
private String activityId;
|
private String activityId;
|
||||||
|
|
||||||
@ApiModelProperty(
|
@ApiModelProperty(
|
||||||
name = "code",
|
name = "code",
|
||||||
value = "Activity code",
|
value = "Activity code",
|
||||||
required = true)
|
required = true,
|
||||||
|
example = "DEVICE_RING")
|
||||||
@JsonProperty("code")
|
@JsonProperty("code")
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
@ -51,14 +53,16 @@ public class Activity {
|
|||||||
name = "type",
|
name = "type",
|
||||||
value = "Activity type",
|
value = "Activity type",
|
||||||
required = true,
|
required = true,
|
||||||
allowableValues = "CONFIG, MESSAGE, INFO, COMMAND, PROFILE, POLICY")
|
allowableValues = "CONFIG, MESSAGE, INFO, COMMAND, PROFILE, POLICY",
|
||||||
|
example = "COMMAND")
|
||||||
@JsonProperty("type")
|
@JsonProperty("type")
|
||||||
private Type type;
|
private Type type;
|
||||||
|
|
||||||
@ApiModelProperty(
|
@ApiModelProperty(
|
||||||
name = "createdTimeStamp",
|
name = "createdTimeStamp",
|
||||||
value = "Timestamp recorded when the activity took place",
|
value = "Timestamp recorded when the activity took place",
|
||||||
required = true)
|
required = true,
|
||||||
|
example = "Thu Oct 06 11:18:47 IST 2016")
|
||||||
@JsonProperty("createdTimestamp")
|
@JsonProperty("createdTimestamp")
|
||||||
private String createdTimeStamp;
|
private String createdTimeStamp;
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,8 @@ public class ActivityStatus {
|
|||||||
@ApiModelProperty(
|
@ApiModelProperty(
|
||||||
name = "status",
|
name = "status",
|
||||||
value = "Status of the activity performed.",
|
value = "Status of the activity performed.",
|
||||||
required = true)
|
required = true,
|
||||||
|
example = "PENDING")
|
||||||
@JsonProperty("status")
|
@JsonProperty("status")
|
||||||
private Status status;
|
private Status status;
|
||||||
|
|
||||||
@ -57,7 +58,8 @@ public class ActivityStatus {
|
|||||||
@ApiModelProperty(
|
@ApiModelProperty(
|
||||||
name = "updatedTimestamp ",
|
name = "updatedTimestamp ",
|
||||||
value = "Last updated time of the activity.",
|
value = "Last updated time of the activity.",
|
||||||
required = true)
|
required = true,
|
||||||
|
example = "Thu Oct 06 11:18:47 IST 2016")
|
||||||
@JsonProperty("updatedTimestamp")
|
@JsonProperty("updatedTimestamp")
|
||||||
private String updatedTimestamp;
|
private String updatedTimestamp;
|
||||||
|
|
||||||
|
|||||||
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
package org.wso2.carbon.device.mgt.common.operation.mgt;
|
package org.wso2.carbon.device.mgt.common.operation.mgt;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
@ -26,10 +27,20 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
+ " responses")
|
+ " responses")
|
||||||
public class OperationResponse {
|
public class OperationResponse {
|
||||||
|
|
||||||
@ApiModelProperty(name = "response", value = "Operation response returned from the device", required = true)
|
@ApiModelProperty(
|
||||||
|
name = "response",
|
||||||
|
value = "Operation response returned from the device",
|
||||||
|
required = true,
|
||||||
|
example = "SUCCESSFUL")
|
||||||
|
@JsonProperty("response")
|
||||||
private String response;
|
private String response;
|
||||||
@ApiModelProperty(name = "receivedTimeStamp", value = "Time that the operation response received",
|
|
||||||
required = true)
|
@ApiModelProperty(
|
||||||
|
name = "receivedTimeStamp",
|
||||||
|
value = "Time that the operation response received",
|
||||||
|
required = true,
|
||||||
|
example = "Thu Oct 06 11:18:47 IST 2016")
|
||||||
|
@JsonProperty("receivedTimeStamp")
|
||||||
private String receivedTimeStamp;
|
private String receivedTimeStamp;
|
||||||
|
|
||||||
public String getResponse() {
|
public String getResponse() {
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
"owner": "admin@carbon.super",
|
"owner": "admin@carbon.super",
|
||||||
"dynamicClientAppRegistrationServiceURL": "%https.ip%/dynamic-client-web/register",
|
"dynamicClientAppRegistrationServiceURL": "%https.ip%/dynamic-client-web/register",
|
||||||
"apiManagerClientAppRegistrationServiceURL": "%https.ip%/api-application-registration/register/tenants",
|
"apiManagerClientAppRegistrationServiceURL": "%https.ip%/api-application-registration/register/tenants",
|
||||||
"grantType": "password refresh_token urn:ietf:params:oauth:grant-type:saml2-bearer",
|
"grantType": "password refresh_token urn:ietf:params:oauth:grant-type:saml2-bearer urn:ietf:params:oauth:grant-type:jwt-bearer",
|
||||||
"tokenScope": "admin",
|
"tokenScope": "admin",
|
||||||
"callbackUrl": "%https.ip%/api/device-mgt/v1.0"
|
"callbackUrl": "%https.ip%/api/device-mgt/v1.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -15,8 +15,20 @@
|
|||||||
specific language governing permissions and limitations
|
specific language governing permissions and limitations
|
||||||
under the License.
|
under the License.
|
||||||
}}
|
}}
|
||||||
|
{{unit "cdmf.unit.data-tables-extended"}}
|
||||||
{{unit "cdmf.unit.ui.title" pageTitle="Notification Listing"}}
|
{{unit "cdmf.unit.ui.title" pageTitle="Notification Listing"}}
|
||||||
|
{{#zone "breadcrumbs"}}
|
||||||
|
<li>
|
||||||
|
<a href="{{@app.context}}/">
|
||||||
|
<i class="icon fw fw-home"></i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{{@app.context}}/notification-listing">
|
||||||
|
Notifications
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{/zone}}
|
||||||
{{#zone "content"}}
|
{{#zone "content"}}
|
||||||
{{unit "cdmf.unit.notification.listing"}}
|
{{unit "cdmf.unit.notification.listing"}}
|
||||||
{{/zone}}
|
{{/zone}}
|
||||||
@ -411,7 +411,5 @@ $(document).ready(function () {
|
|||||||
if (!$("#can-invite").val()) {
|
if (!$("#can-invite").val()) {
|
||||||
$("#invite-user-button").remove();
|
$("#invite-user-button").remove();
|
||||||
}
|
}
|
||||||
$(".viewEnabledIcon").click(function () {
|
|
||||||
InitiateViewOption();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|||||||
@ -25,8 +25,7 @@ $.fn.datatables_extended = function(settings){
|
|||||||
|
|
||||||
// EMM related function
|
// EMM related function
|
||||||
if (InitiateViewOption) {
|
if (InitiateViewOption) {
|
||||||
$(".viewEnabledIcon").unbind("click");
|
$(document).on('click','.viewEnabledIcon',InitiateViewOption);
|
||||||
$(".viewEnabledIcon").bind("click", InitiateViewOption);
|
|
||||||
}
|
}
|
||||||
//--- End of EMM related codes
|
//--- End of EMM related codes
|
||||||
|
|
||||||
@ -213,14 +212,14 @@ $.fn.datatables_extended = function(settings){
|
|||||||
$(button).addClass("active").html('Cancel');
|
$(button).addClass("active").html('Cancel');
|
||||||
$(button).parent().next().children("button").removeClass("disabled");
|
$(button).parent().next().children("button").removeClass("disabled");
|
||||||
// EMM related code
|
// EMM related code
|
||||||
$(".viewEnabledIcon").unbind("click");
|
$(document).off('click','.viewEnabledIcon');
|
||||||
//--- End of EMM related codes
|
//--- End of EMM related codes
|
||||||
} else if ($(button).html() == 'Cancel'){
|
} else if ($(button).html() == 'Cancel'){
|
||||||
thisTable.removeClass("table-selectable");
|
thisTable.removeClass("table-selectable");
|
||||||
$(button).addClass("active").html('Select');
|
$(button).addClass("active").html('Select');
|
||||||
$(button).parent().next().children().addClass("disabled");
|
$(button).parent().next().children().addClass("disabled");
|
||||||
// EMM related function
|
// EMM related function
|
||||||
$(".viewEnabledIcon").bind("click", InitiateViewOption);
|
$(document).on('click','.viewEnabledIcon',InitiateViewOption);
|
||||||
//--- End of EMM related codes
|
//--- End of EMM related codes
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,203 +1,515 @@
|
|||||||
{{!
|
{{unit "mdm.unit.lib.leaflet"}}
|
||||||
Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
{{unit "cdmf.unit.lib.qrcode"}}
|
||||||
|
{{unit "mdm.unit.device.qr-modal"}}
|
||||||
WSO2 Inc. licenses this file to you under the Apache License,
|
|
||||||
Version 2.0 (the "License"); you may not use this file except
|
|
||||||
in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing,
|
|
||||||
software distributed under the License is distributed on an
|
|
||||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
KIND, either express or implied. See the License for the
|
|
||||||
specific language governing permissions and limitations
|
|
||||||
under the License.
|
|
||||||
}}
|
|
||||||
|
|
||||||
{{#zone "content"}}
|
{{#zone "content"}}
|
||||||
<h1 class="page-sub-title device-id device-select" data-deviceid="{{device.deviceIdentifier}}" data-type="{{device.type}}">
|
{{#if deviceFound}}
|
||||||
Device {{device.name}}
|
{{#if isAuthorized}}
|
||||||
{{#if device.viewModel.model}}
|
<h1 class="page-sub-title device-id device-select"
|
||||||
<span class="lbl-device">
|
data-deviceid="{{deviceView.deviceIdentifier}}" data-type="{{deviceView.deviceType}}"
|
||||||
( {{device.viewModel.vendor}} {{device.viewModel.model}} )
|
data-ownership="{{deviceView.ownership}}">
|
||||||
</span>
|
Device {{deviceView.name}}
|
||||||
{{/if}}
|
{{#if deviceView.model}}
|
||||||
</h1>
|
<span class="lbl-device">
|
||||||
<div class="row no-gutter add-padding-5x add-margin-top-5x" style="border: 1px solid #e4e4e4;">
|
( {{deviceView.vendor}} {{deviceView.model}} )
|
||||||
<div class="media">
|
</span>
|
||||||
<div id="device_overview">
|
{{/if}}
|
||||||
<div class="media-left media-middle asset-image col-xs-2 col-sm-2 col-md-2 col-lg-2">
|
</h1>
|
||||||
<div class="thumbnail icon">
|
<div class="row no-gutter add-padding-5x add-margin-top-5x" style="border: 1px solid #e4e4e4;">
|
||||||
{{#defineZone "device-thumbnail"}}
|
<div class="media">
|
||||||
<i class="square-element text fw fw-mobile"></i>
|
<div class="media-left media-middle asset-image col-xs-2 col-sm-2 col-md-2 col-lg-2">
|
||||||
{{/defineZone}}
|
<div class="thumbnail icon"><i class="square-element text fw fw-mobile"></i></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="media-body asset-desc add-padding-left-5x">
|
||||||
<div class="media-body asset-desc add-padding-left-5x">
|
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">Device
|
||||||
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
|
Overview
|
||||||
Device Overview - {{label}}</div>
|
</div>
|
||||||
{{unit "cdmf.unit.device.overview-section" device=device}}
|
{{#defineZone "device-detail-properties"}}
|
||||||
{{#defineZone "operation-status"}}{{/defineZone}}
|
<table class="table table-responsive table-striped" id="members">
|
||||||
{{#defineZone "device-opetations"}}
|
<tbody>
|
||||||
|
{{#if deviceView.deviceIdentifier}}
|
||||||
|
<tr role="row" class="odd">
|
||||||
|
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Device ID</td>
|
||||||
|
<td style="padding:10px 15px;">{{deviceView.deviceIdentifier}}</td>
|
||||||
|
</tr>
|
||||||
|
{{/if}}
|
||||||
|
{{#if deviceView.name}}
|
||||||
|
<tr role="row" class="even">
|
||||||
|
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Name</td>
|
||||||
|
<td style="padding:10px 15px;">{{deviceView.name}}</td>
|
||||||
|
</tr>
|
||||||
|
{{/if}}
|
||||||
|
{{#if deviceView.vendor}}
|
||||||
|
{{#if deviceView.model}}
|
||||||
|
<tr role="row" class="odd">
|
||||||
|
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Model</td>
|
||||||
|
<td style="padding:10px 15px;">{{deviceView.vendor}} {{deviceView.model}}</td>
|
||||||
|
</tr>
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
{{#if deviceView.status}}
|
||||||
|
<tr role="row" class="even">
|
||||||
|
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Status</td>
|
||||||
|
<td style="padding:10px 15px;">
|
||||||
|
{{#equal deviceView.status "ACTIVE"}}<span><i
|
||||||
|
class="fw fw-ok icon-success"></i>Active</span>{{/equal}}
|
||||||
|
{{#equal deviceView.status "INACTIVE"}}<span><i
|
||||||
|
class="fw fw-warning icon-warning"></i>Inactive</span>{{/equal}}
|
||||||
|
{{#equal deviceView.status "BLOCKED"}}<span><i
|
||||||
|
class="fw fw-remove icon-danger"></i>Blocked</span>{{/equal}}
|
||||||
|
{{#equal deviceView.status "REMOVED"}}<span><i
|
||||||
|
class="fw fw-delete icon-danger"></i>Removed</span>{{/equal}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{/if}}
|
||||||
|
{{#if deviceView.owner}}
|
||||||
|
<tr role="row" class="odd">
|
||||||
|
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Owner</td>
|
||||||
|
<td style="padding:10px 15px;">{{deviceView.owner}}</td>
|
||||||
|
</tr>
|
||||||
|
{{/if}}
|
||||||
|
{{#if deviceView.ownership}}
|
||||||
|
<tr role="row" class="even">
|
||||||
|
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Ownership</td>
|
||||||
|
<td style="padding:10px 15px;">{{deviceView.ownership}}</td>
|
||||||
|
</tr>
|
||||||
|
{{/if}}
|
||||||
|
{{#if deviceView.imei}}
|
||||||
|
<tr role="row" class="even">
|
||||||
|
<td class="sorting_1" style="padding:10px 15px; width: 15%;">IMEI</td>
|
||||||
|
<td style="padding:10px 15px;">{{deviceView.imei}}</td>
|
||||||
|
</tr>
|
||||||
|
{{/if}}
|
||||||
|
{{#if deviceView.udid}}
|
||||||
|
<tr role="row" class="odd">
|
||||||
|
<td class="sorting_1" style="padding:10px 15px; width: 15%;">UDID</td>
|
||||||
|
<td style="padding:10px 15px;">{{deviceView.udid}}</td>
|
||||||
|
</tr>
|
||||||
|
{{/if}}
|
||||||
|
{{#if deviceView.osBuildDate}}
|
||||||
|
<tr role="row" class="even">
|
||||||
|
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Firmware Build
|
||||||
|
Date
|
||||||
|
</td>
|
||||||
|
<td style="padding:10px 15px;">{{deviceView.osBuildDate}}</td>
|
||||||
|
</tr>
|
||||||
|
{{/if}}
|
||||||
|
{{#if deviceView.phoneNumber}}
|
||||||
|
<tr role="row" class="odd">
|
||||||
|
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Phone Number</td>
|
||||||
|
<td style="padding:10px 15px;">{{deviceView.phoneNumber}}</td>
|
||||||
|
</tr>
|
||||||
|
{{/if}}
|
||||||
|
{{#if deviceView.lastUpdatedTime}}
|
||||||
|
<tr role="row" class="even">
|
||||||
|
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Last Update</td>
|
||||||
|
<td style="padding:10px 15px;">{{deviceView.lastUpdatedTime}}</td>
|
||||||
|
</tr>
|
||||||
|
{{/if}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{{/defineZone}}
|
||||||
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
|
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
|
||||||
Operations
|
Operations
|
||||||
</div>
|
</div>
|
||||||
<div class="add-margin-top-4x" style="height: 90px;">
|
<div class="add-margin-top-4x">
|
||||||
{{unit "cdmf.unit.device.operation-bar" device=device}}
|
{{unit "mdm.unit.device.operation-bar" deviceType=deviceView.deviceType ownership=deviceView.ownership}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="media tab-responsive">
|
||||||
|
<div class="media-left col-xs-1 col-sm-1 col-md-2 col-lg-2 hidden-xs">
|
||||||
|
<ul class="list-group nav nav-pills nav-stacked" role="tablist">
|
||||||
|
{{#if deviceView.isNotWindows}}
|
||||||
|
<li role="presentation" class="list-group-item active">
|
||||||
|
<a href="#device_details_tab" role="tab" data-toggle="tab"
|
||||||
|
aria-controls="device_details_tab">
|
||||||
|
<i class="icon fw fw-mobile"></i><span class="hidden-sm">Device Details</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
||||||
|
{{#if deviceView.isNotWindows}}
|
||||||
|
<li role="presentation" class="list-group-item">
|
||||||
|
{{else}}
|
||||||
|
<li role="presentation" class="list-group-item active">
|
||||||
|
{{/if}}
|
||||||
|
<li role="presentation" class="list-group-item">
|
||||||
|
<a href="#policy_compliance_tab" role="tab" data-toggle="tab"
|
||||||
|
aria-controls="policy_compliance_tab">
|
||||||
|
<i class="icon fw fw-policy"></i><span class="hidden-sm">Policy Compliance</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{#if deviceView.isNotWindows}}
|
||||||
|
<li role="presentation" class="list-group-item">
|
||||||
|
<a href="#device_location_tab" role="tab" data-toggle="tab"
|
||||||
|
data-lat="{{deviceView.location.latitude}}"
|
||||||
|
data-long="{{deviceView.location.longitude}}"
|
||||||
|
aria-controls="device_location_tab">
|
||||||
|
<i class="icon fw fw-map-location"></i><span
|
||||||
|
class="hidden-sm">Device Location</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li role="presentation" class="list-group-item">
|
||||||
|
<a href="#installed_applications_tab" role="tab" data-toggle="tab"
|
||||||
|
aria-controls="installed_applications_tab">
|
||||||
|
<i class="icon fw fw-application"></i><span class="hidden-sm">Installed Applications</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
||||||
|
{{#if deviceView.isNotRemoved}}
|
||||||
|
|
||||||
|
<li role="presentation" class="list-group-item">
|
||||||
|
<a href="#event_log_tab" role="tab" data-toggle="tab"
|
||||||
|
aria-controls="event_log_tab">
|
||||||
|
<i class="icon fw fw-text"></i><span class="hidden-sm">Operations Log</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{{/if}}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{#defineZone "device-detail-properties"}}
|
||||||
|
<div class="media-body add-padding-left-5x remove-padding-xs">
|
||||||
|
<div class="panel-group tab-content remove-padding" id="tabs" data-status="{{deviceView.isNotRemoved}}"role="tablist"
|
||||||
|
aria-multiselectable="true">
|
||||||
|
<div class="arrow-left hidden-xs"></div>
|
||||||
|
|
||||||
|
{{#if deviceView.isNotWindows}}
|
||||||
|
<div class="panel panel-default" role="tabpanel" id="device_details_tab">
|
||||||
|
<div class="panel-heading visible-xs collapsed" id="device_details">
|
||||||
|
<h4 class="panel-title">
|
||||||
|
<a role="button" data-toggle="collapse" data-parent="#tabs"
|
||||||
|
href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
|
||||||
|
<i class="fw fw-mobile fw-2x"></i>
|
||||||
|
Device Details
|
||||||
|
<i class="caret-updown fw fw-down"></i>
|
||||||
|
</a>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="panel-heading display-none-xs">Device Details</div>
|
||||||
|
<div id="collapseOne" class="panel-collapse collapse in" role="tabpanel"
|
||||||
|
aria-labelledby="device_details">
|
||||||
|
<div class="panel-body ">
|
||||||
|
<div class="device-detail-body">
|
||||||
|
<!-- device summary -->
|
||||||
|
{{#equal deviceView.deviceType "windows"}}
|
||||||
|
<div class="message message-info">
|
||||||
|
<h4 class="remove-margin"><i class="icon fw fw-info"></i>Not
|
||||||
|
available yet</h4>
|
||||||
|
</div>
|
||||||
|
{{/equal}}
|
||||||
|
{{#if deviceView.deviceInfoAvailable}}
|
||||||
|
{{#if deviceView.BatteryLevel}}
|
||||||
|
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="wr-stats-board-tile">
|
||||||
|
<div class="tile-name">BATTERY</div>
|
||||||
|
<div>
|
||||||
|
<div class="tile-icon"><i
|
||||||
|
class="fw fw-battery"></i></div>
|
||||||
|
<div class="tile-stats">
|
||||||
|
{{deviceView.BatteryLevel.value}} %
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
<!--{{#if deviceView.cpuUsage}}-->
|
||||||
|
<!--<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">-->
|
||||||
|
<!--<div class="col-md-12">-->
|
||||||
|
<!--<div class="wr-stats-board-tile">-->
|
||||||
|
<!--<div class="tile-name">CPU Usage</div>-->
|
||||||
|
<!--<div>-->
|
||||||
|
<!--<div class="tile-icon"><i class="fw fw-dashboard"></i></div>-->
|
||||||
|
<!--<div class="tile-stats">-->
|
||||||
|
<!--{{deviceView.cpuUsage.value}} %-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--{{/if}}-->
|
||||||
|
{{#if deviceView.ramUsage}}
|
||||||
|
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="wr-stats-board-tile">
|
||||||
|
<div class="tile-name">RAM Usage</div>
|
||||||
|
<div>
|
||||||
|
<div class="tile-icon"><i
|
||||||
|
class="fw fw-hardware"></i></div>
|
||||||
|
<div class="tile-stats">
|
||||||
|
{{deviceView.ramUsage.value}} %
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{#if deviceView.internalMemory}}
|
||||||
|
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="wr-stats-board-tile">
|
||||||
|
<div class="tile-name">Local Storage</div>
|
||||||
|
<div>
|
||||||
|
<div class="tile-icon"><i
|
||||||
|
class="fw fw-hdd"></i>
|
||||||
|
</div>
|
||||||
|
<div class="tile-stats">
|
||||||
|
{{deviceView.internalMemory.usage}} %
|
||||||
|
<span class="tile-stats-free">
|
||||||
|
TOTAL OF {{deviceView.internalMemory.total}} GB
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{#if deviceView.externalMemory}}
|
||||||
|
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="wr-stats-board-tile">
|
||||||
|
<div class="tile-name">External Storage</div>
|
||||||
|
<div>
|
||||||
|
<div class="tile-icon"><i
|
||||||
|
class="fw fw-usb-drive"></i></div>
|
||||||
|
<div class="tile-stats">
|
||||||
|
{{deviceView.externalMemory.usage}} %
|
||||||
|
<span class="tile-stats-free">
|
||||||
|
TOTAL OF {{deviceView.externalMemory.total}} GB
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{else}}
|
||||||
|
<div class="message message-info">
|
||||||
|
<h4 class="remove-margin">
|
||||||
|
<i class="icon fw fw-info"></i>
|
||||||
|
Battery, RAM and Storage related information are not
|
||||||
|
available yet.
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<div class="panel panel-default visible-xs-block" role="tabpanel"
|
||||||
|
id="policy_compliance_tab">
|
||||||
|
<div class="panel-heading visible-xs collapsed" id="policy_compliance">
|
||||||
|
<h4 class="panel-title">
|
||||||
|
<a role="button"
|
||||||
|
data-toggle="collapse" data-parent="#tabs" href="#collapseTwo"
|
||||||
|
aria-expanded="true" aria-controls="collapseTwo">
|
||||||
|
<i class="fw fw-policy fw-2x"></i>
|
||||||
|
Policy Compliance
|
||||||
|
<i class="caret-updown fw fw-down"></i>
|
||||||
|
</a>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="panel-heading display-none-xs">
|
||||||
|
Policy Compliance
|
||||||
|
|
||||||
|
<span>
|
||||||
|
<a href="javascript:void(0);" id="refresh-policy">
|
||||||
|
<i class="fw fw-refresh"></i>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div id="collapseTwo" class="panel-collapse collapse in" role="tabpanel"
|
||||||
|
aria-labelledby="policy_compliance">
|
||||||
|
<div class="panel-body ">
|
||||||
|
<span class="visible-xs add-padding-2x text-right">
|
||||||
|
<a href="javascript:void(0);" id="refresh-policy">
|
||||||
|
<i class="fw fw-refresh"></i>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
<div id="policy-spinner"
|
||||||
|
class="wr-advance-operations-init add-padding-bottom-2x add-padding-bottom-4x hidden">
|
||||||
|
<i class="fw fw-settings fw-spin fw-2x"></i>Loading Policy
|
||||||
|
Compliance...
|
||||||
|
</div>
|
||||||
|
<div id="policy-list-container">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="panel panel-default visible-xs-block" role="tabpanel"
|
||||||
|
id="device_location_tab">
|
||||||
|
<div class="panel-heading visible-xs collapsed" id="device_location">
|
||||||
|
<h4 class="panel-title">
|
||||||
|
<a role="button" data-toggle="collapse" data-parent="#tabs"
|
||||||
|
href="#collapseThree" aria-expanded="true" aria-controls="collapseThree">
|
||||||
|
<i class="fw fw-map-location fw-2x"></i>
|
||||||
|
Device Location
|
||||||
|
<i class="caret-updown fw fw-down"></i>
|
||||||
|
</a>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="panel-heading display-none-xs">Device Location</div>
|
||||||
|
<div id="collapseThree" class="panel-collapse collapse in" role="tabpanel"
|
||||||
|
aria-labelledby="device_location">
|
||||||
|
<div class="panel-body">
|
||||||
|
{{#if deviceView.location}}
|
||||||
|
<div id="device-location"
|
||||||
|
data-lat="{{deviceView.location.latitude}}"
|
||||||
|
data-long="{{deviceView.location.longitude}}">
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<div id="map-error" class="message message-warning">
|
||||||
|
<h4 class="remove-margin">
|
||||||
|
<i class="icon fw fw-warning"></i>
|
||||||
|
Device location information is not available.
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<p class="add-padding-5x"></p>
|
||||||
|
<p class="add-padding-5x"></p>
|
||||||
|
<p class="add-padding-5x"></p>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="panel panel-default visible-xs-block" role="tabpanel"
|
||||||
|
id="installed_applications_tab">
|
||||||
|
<div class="panel-heading visible-xs collapsed" id="installed_applications">
|
||||||
|
<h4 class="panel-title">
|
||||||
|
<a role="button" data-toggle="collapse" data-parent="#tabs"
|
||||||
|
href="#collapseFour" aria-expanded="true" aria-controls="collapseFour">
|
||||||
|
<i class="fw fw-application fw-2x"></i>
|
||||||
|
Installed Applications
|
||||||
|
<i class="caret-updown fw fw-down"></i>
|
||||||
|
</a>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="panel-heading display-none-xs">
|
||||||
|
Installed Applications
|
||||||
|
|
||||||
|
<span>
|
||||||
|
<a href="javascript:void(0);" id="refresh-apps">
|
||||||
|
<i class="fw fw-refresh"></i>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div id="collapseFour" class="panel-collapse collapse in" role="tabpanel"
|
||||||
|
aria-labelledby="installed_applications">
|
||||||
|
<div class="panel-body">
|
||||||
|
<span class="visible-xs add-padding-2x text-right">
|
||||||
|
<a href="javascript:void(0);" id="refresh-apps">
|
||||||
|
<i class="fw fw-refresh"></i>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
<div id="apps-spinner" class="wr-advance-operations-init hidden">
|
||||||
|
<i class="fw fw-settings fw-spin fw-2x"></i> Loading Applications
|
||||||
|
List...
|
||||||
|
</div>
|
||||||
|
<div id="applications-list-container">
|
||||||
|
<div class="message message-info">
|
||||||
|
<h4>
|
||||||
|
<i class="icon fw fw-info"></i>
|
||||||
|
No applications found.
|
||||||
|
</h4>
|
||||||
|
<p>Please try refreshing in a while.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="panel panel-default visible-xs-block" role="tabpanel" id="event_log_tab">
|
||||||
|
<div class="panel-heading visible-xs collapsed" id="event_log">
|
||||||
|
<h4 class="panel-title">
|
||||||
|
<a role="button" data-toggle="collapse" data-parent="#tabs"
|
||||||
|
href="#collapseFive" aria-expanded="true" aria-controls="collapseFive">
|
||||||
|
<i class="fw fw-text fw-2x"></i>
|
||||||
|
Operations Log
|
||||||
|
<i class="caret-updown fw fw-down"></i>
|
||||||
|
</a>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="panel-heading display-none-xs">
|
||||||
|
Operations Log
|
||||||
|
|
||||||
|
<span>
|
||||||
|
<a href="javascript:void(0);" id="refresh-operations">
|
||||||
|
<i class="fw fw-refresh"></i>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div id="collapseFive" class="panel-collapse collapse in" role="tabpanel"
|
||||||
|
aria-labelledby="event_log">
|
||||||
|
<div class="panel-body">
|
||||||
|
<span class="visible-xs add-padding-2x text-right">
|
||||||
|
<a href="javascript:void(0);" id="refresh-operations">
|
||||||
|
<i class="fw fw-refresh"></i>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
<div id="operations-spinner" class="wr-advance-operations-init hidden">
|
||||||
|
<i class="fw fw-settings fw-spin fw-2x"></i> Loading Operations Log...
|
||||||
|
</div>
|
||||||
|
<div id="operations-log-container">
|
||||||
|
<div class="message message-info">
|
||||||
|
<h4 class="remove-margin">
|
||||||
|
<i class="icon fw fw-info"></i>
|
||||||
|
There are no operations, performed yet on this device.
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<table class="table table-striped table-hover table-bordered display data-table"
|
||||||
|
id="operations-log-table">
|
||||||
|
<thead>
|
||||||
|
<tr class="sort-row">
|
||||||
|
<th>Operation Code</th>
|
||||||
|
<th>Status</th>
|
||||||
|
<th>Request created at</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/defineZone}}
|
{{/defineZone}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{else}}
|
||||||
|
<h1 class="page-sub-title">
|
||||||
{{#defineZone "device-detail-properties"}}
|
Permission Denied
|
||||||
<div class="media">
|
</h1>
|
||||||
<div class="media-left col-xs-12 col-sm-2 col-md-2 col-lg-2">
|
<br>
|
||||||
<ul class="list-group" role="tablist">
|
You are not authorized to view specified device in the system.
|
||||||
<li class="active"><a class="list-group-item"
|
{{/if}}
|
||||||
href="#device_details"
|
{{else}}
|
||||||
role="tab" data-toggle="tab"
|
<h1 class="page-sub-title">
|
||||||
aria-controls="device_details">Device
|
Device not found
|
||||||
Details</a>
|
</h1>
|
||||||
</li>
|
<br>
|
||||||
<li><a class="list-group-item" href="#policies"
|
You have tried to access either a removed or non-existing device.
|
||||||
role="tab"
|
{{/if}}
|
||||||
data-toggle="tab" aria-controls="policies">Policies</a>
|
|
||||||
</li>
|
|
||||||
<li><a class="list-group-item" href="#policy_compliance"
|
|
||||||
role="tab"
|
|
||||||
data-toggle="tab" aria-controls="policy_compliance">Policy
|
|
||||||
Compliance</a>
|
|
||||||
</li>
|
|
||||||
<li><a class="list-group-item" href="#device_location"
|
|
||||||
role="tab"
|
|
||||||
data-toggle="tab" aria-controls="device_location">Device
|
|
||||||
Location</a>
|
|
||||||
</li>
|
|
||||||
<li><a class="list-group-item" href="#event_log" role="tab"
|
|
||||||
data-toggle="tab" aria-controls="event_log">Operations
|
|
||||||
Log</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="media-body add-padding-left-5x remove-padding-xs tab-content">
|
|
||||||
<div class="panel-group tab-content">
|
|
||||||
|
|
||||||
<div class="panel panel-default tab-pane active"
|
|
||||||
id="device_details" role="tabpanel"
|
|
||||||
aria-labelledby="device_details">
|
|
||||||
{{unit "cdmf.unit.device.details" device=device}}
|
|
||||||
</div>
|
|
||||||
<div class="panel panel-default tab-pane" id="policies" role="tabpanel"
|
|
||||||
aria-labelledby="policies">
|
|
||||||
<div class="panel-heading">Policies</div>
|
|
||||||
<div class="panel-body">
|
|
||||||
<div id="policy-spinner" class="wr-advance-operations-init hidden">
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<i class="fw fw-settings fw-spin fw-2x"></i>
|
|
||||||
|
|
||||||
Loading Policies . . .
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
</div>
|
|
||||||
<div id="policy-list-container">
|
|
||||||
<div class="panel-body">
|
|
||||||
No policies found
|
|
||||||
</div>
|
|
||||||
<br class="c-both"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="padding-left"
|
|
||||||
href="{{@app.context}}/policy/add/{{device.type}}?deviceId={{device.deviceIdentifier}}">
|
|
||||||
<span class="fw-stack">
|
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
|
||||||
<i class="fw fw-policy fw-stack-1x"></i>
|
|
||||||
</span> Add device specific policy</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="panel panel-default tab-pane" id="policy_compliance"
|
|
||||||
role="tabpanel" aria-labelledby="policy_compliance">
|
|
||||||
<div class="panel-heading">Policy Compliance <span><a
|
|
||||||
href="#" id="refresh-policy"><i
|
|
||||||
class="fw fw-refresh"></i></a></span></div>
|
|
||||||
<div class="panel-body">
|
|
||||||
<div id="policy-spinner"
|
|
||||||
class="wr-advance-operations-init hidden">
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<i class="fw fw-settings fw-spin fw-2x"></i>
|
|
||||||
|
|
||||||
Loading Policy Compliance . . .
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
</div>
|
|
||||||
<div id="policy-list-container">
|
|
||||||
<div class="panel-body">
|
|
||||||
Not available yet
|
|
||||||
</div>
|
|
||||||
<br class="c-both"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="panel panel-default tab-pane" id="device_location"
|
|
||||||
role="tabpanel" aria-labelledby="device_location">
|
|
||||||
<div class="panel-heading">Device Location</div>
|
|
||||||
<div class="panel-body">
|
|
||||||
<div id="device-location"
|
|
||||||
data-lat="{{device.viewModel.location.latitude}}"
|
|
||||||
data-long="{{device.viewModel.location.longitude}}"
|
|
||||||
style="height:450px" class="panel-body">
|
|
||||||
</div>
|
|
||||||
<div id="map-error" class="panel-body">
|
|
||||||
Not available yet
|
|
||||||
</div>
|
|
||||||
<br class="c-both"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="panel panel-default tab-pane" id="event_log"
|
|
||||||
role="tabpanel" aria-labelledby="event_log">
|
|
||||||
<div class="panel-heading">Operations Log <span><a href="#"
|
|
||||||
id="refresh-operations"><i
|
|
||||||
class="fw fw-refresh"></i></a></span></div>
|
|
||||||
<div class="panel-body">
|
|
||||||
<div id="operations-spinner"
|
|
||||||
class="wr-advance-operations-init hidden">
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<i class="fw fw-settings fw-spin fw-2x"></i>
|
|
||||||
|
|
||||||
Loading Operations Log . . .
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
</div>
|
|
||||||
<div id="operations-log-container">
|
|
||||||
<div class="panel-body">
|
|
||||||
Not available yet
|
|
||||||
</div>
|
|
||||||
<br class="c-both"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{/defineZone}}
|
|
||||||
</div>
|
|
||||||
{{/zone}}
|
{{/zone}}
|
||||||
{{#zone "bottomJs"}}
|
{{#zone "bottomJs"}}
|
||||||
{{js "js/device-view.js"}}
|
{{#if isAuthorized}}
|
||||||
<script id="policy-view" src="{{@unit.publicUri}}/templates/policy-compliance.hbs"
|
<!--suppress HtmlUnknownTarget -->
|
||||||
data-device-id="{{device.deviceIdentifier}}" data-device-type="{{device.type}}"
|
<script id="policy-view" src="{{@unit.publicUri}}/templates/policy-compliance.hbs"
|
||||||
type="text/x-handlebars-template"></script>
|
data-device-id="{{deviceView.deviceIdentifier}}" data-device-type="{{deviceView.deviceType}}"
|
||||||
<script id="policy-list" src="{{@unit.publicUri}}/templates/policy-list.hbs"
|
type="text/x-handlebars-template"></script>
|
||||||
data-device-id="{{device.deviceIdentifier}}" data-device-type="{{device.type}}"
|
<!--suppress HtmlUnknownTarget -->
|
||||||
type="text/x-handlebars-template"></script>
|
<script id="applications-list" src="{{@unit.publicUri}}/templates/applications-list.hbs"
|
||||||
<script id="applications-list" src="{{@unit.publicUri}}/templates/applications-list.hbs"
|
data-device-id="{{deviceView.deviceIdentifier}}" data-device-type="{{deviceView.deviceType}}"
|
||||||
data-device-id="{{device.deviceIdentifier}}" data-device-type="{{device.type}}"
|
type="text/x-handlebars-template"></script>
|
||||||
type="text/x-handlebars-template"></script>
|
<!--suppress HtmlUnknownTarget -->
|
||||||
<script id="operations-log" src="{{@unit.publicUri}}/templates/operations-log.hbs"
|
<script id="operations-log" src="{{@unit.publicUri}}/templates/operations-log.hbs"
|
||||||
data-device-id="{{device.deviceIdentifier}}" data-device-type="{{device.type}}"
|
data-device-id="{{deviceView.deviceIdentifier}}" data-device-type="{{deviceView.deviceType}}"
|
||||||
type="text/x-handlebars-template"></script>
|
type="text/x-handlebars-template"></script>
|
||||||
|
{{js "js/device-detail.js"}}
|
||||||
|
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true"></script>
|
||||||
|
{{js "js/load-map.js"}}
|
||||||
|
{{/if}}
|
||||||
{{/zone}}
|
{{/zone}}
|
||||||
@ -21,10 +21,10 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<!-- content -->
|
<!-- content -->
|
||||||
<div id="config-save-form" class="container col-centered wr-content">
|
<div id="config-save-form" class="container col-centered wr-content">
|
||||||
<br>
|
<h1 class="page-sub-title">
|
||||||
Device Notifications
|
Device Notifications
|
||||||
<br>
|
</h1>
|
||||||
<br>
|
</br>
|
||||||
<div class="wr-advance-operations">
|
<div class="wr-advance-operations">
|
||||||
<div class="row no-gutter">
|
<div class="row no-gutter">
|
||||||
<div class="wr-hidden-operations-nav col-lg-4">
|
<div class="wr-hidden-operations-nav col-lg-4">
|
||||||
@ -43,7 +43,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wr-hidden-operations-content col-lg-8" id="ast-container">
|
<div class="wr-hidden-operations-content col-lg-8" id="ast-container">
|
||||||
<div class="panel-body">
|
<div id="noNotificationtxt" class="panel-body">
|
||||||
No unread messages
|
No unread messages
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -65,6 +65,13 @@ function loadNotifications() {
|
|||||||
function showAdvanceOperation(operation, button) {
|
function showAdvanceOperation(operation, button) {
|
||||||
$(button).addClass('selected');
|
$(button).addClass('selected');
|
||||||
$(button).siblings().removeClass('selected');
|
$(button).siblings().removeClass('selected');
|
||||||
|
if ($(button).attr("id") == 'allNotifications') {
|
||||||
|
$("#noNotificationtxt").html('You do not have any unread notifications ');
|
||||||
|
} else if ($(button).attr("id") == 'unReadNotifications') {
|
||||||
|
$("#noNotificationtxt").html('You do not have any notifications ');
|
||||||
|
} else {
|
||||||
|
$("#noNotificationtxt").html('You do not have any notifications ');
|
||||||
|
}
|
||||||
var hiddenOperation = ".wr-hidden-operations-content > div";
|
var hiddenOperation = ".wr-hidden-operations-content > div";
|
||||||
$(hiddenOperation + '[data-operation="' + operation + '"]').show();
|
$(hiddenOperation + '[data-operation="' + operation + '"]').show();
|
||||||
$(hiddenOperation + '[data-operation="' + operation + '"]').siblings().hide();
|
$(hiddenOperation + '[data-operation="' + operation + '"]').siblings().hide();
|
||||||
|
|||||||
@ -31,12 +31,8 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu dropdown-menu-right float-remove-xs position-static-xs text-center-xs remove-margin-xs slideInDown"
|
<ul class="dropdown-menu dropdown-menu-right slideInDown"
|
||||||
role="menu">
|
role="menu">
|
||||||
<li class="dropdown-header visible-xs">
|
|
||||||
{{@user.username}}<span class="caret"></span>
|
|
||||||
</li>
|
|
||||||
<li class="divider visible-xs"></li>
|
|
||||||
<li>
|
<li>
|
||||||
<a href="javascript:void(0)" id="change-password">Change password</a>
|
<a href="javascript:void(0)" id="change-password">Change password</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@ -19,6 +19,9 @@
|
|||||||
<a href="{{#defineZone "productUri"}}{{@app.context}}/{{/defineZone}}">
|
<a href="{{#defineZone "productUri"}}{{@app.context}}/{{/defineZone}}">
|
||||||
<img src="{{@unit.publicUri}}/img/logo.png" alt="{{defineZone "productName"}}"
|
<img src="{{@unit.publicUri}}/img/logo.png" alt="{{defineZone "productName"}}"
|
||||||
title="{{defineZone "productName"}}" class="logo" />
|
title="{{defineZone "productName"}}" class="logo" />
|
||||||
<h1>{{#defineZone "productName"}}Unified UI Template App{{/defineZone}}</h1>
|
<h1>
|
||||||
|
<span class="hidden-xs">{{#defineZone "productName"}}Unified UI Template App{{/defineZone}}</span>
|
||||||
|
<span class="visible-xs-inline">{{#defineZone "productNameResponsive"}}UUI Tmpl. App{{/defineZone}}</span>
|
||||||
|
</h1>
|
||||||
</a>
|
</a>
|
||||||
{{/zone}}
|
{{/zone}}
|
||||||
@ -27,12 +27,7 @@
|
|||||||
{{@user.username}}<span class="caret"></span>
|
{{@user.username}}<span class="caret"></span>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu dropdown-menu-right float-remove-xs position-static-xs text-center-xs remove-margin-xs slideInDown"
|
<ul class="dropdown-menu dropdown-menu-right slideInDown" role="menu">
|
||||||
role="menu">
|
|
||||||
<li class="dropdown-header visible-xs">
|
|
||||||
{{@user.username}}<span class="caret"></span>
|
|
||||||
</li>
|
|
||||||
<li class="divider visible-xs"></li>
|
|
||||||
{{#defineZone "userMenu-items"}}
|
{{#defineZone "userMenu-items"}}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{@app.context}}/signout">Sign Out</a>
|
<a href="{{@app.context}}/signout">Sign Out</a>
|
||||||
|
|||||||
@ -18,10 +18,10 @@
|
|||||||
{{#zone "header"}}
|
{{#zone "header"}}
|
||||||
<header class="header header-default">
|
<header class="header header-default">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="pull-left brand float-remove-xs text-center-xs">
|
<div class="pull-left brand">
|
||||||
{{defineZone "brand"}}
|
{{defineZone "brand"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-right auth float-remove-xs text-center-xs">
|
<div class="pull-right auth">
|
||||||
{{defineZone "userMenu"}}
|
{{defineZone "userMenu"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -30,13 +30,11 @@
|
|||||||
</button>
|
</button>
|
||||||
{{defineZone "navbarHeader"}}
|
{{defineZone "navbarHeader"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-collapse collapse" aria-expanded="false">
|
<div id="navbar" class="navbar-collapse collapse" aria-expanded="false">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
{{defineZone "navbarCollapsableLeftItems"}}
|
{{defineZone "navbarCollapsableLeftItems"}}
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
{{defineZone "navbarCollapsableRightItems"}}
|
||||||
{{defineZone "navbarCollapsableRightItems"}}
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{defineZone "navbarBelow"}}
|
{{defineZone "navbarBelow"}}
|
||||||
|
|||||||
@ -2791,6 +2791,7 @@ header .brand {
|
|||||||
}
|
}
|
||||||
header .brand img.logo {
|
header .brand img.logo {
|
||||||
height: 24px;
|
height: 24px;
|
||||||
|
margin-top:0px;
|
||||||
}
|
}
|
||||||
header .brand a {
|
header .brand a {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -2822,6 +2823,9 @@ header .nav .open > a:focus {
|
|||||||
}
|
}
|
||||||
header .nav .dropdown-menu {
|
header .nav .dropdown-menu {
|
||||||
background: black;
|
background: black;
|
||||||
|
padding:0px;
|
||||||
|
margin:0px;
|
||||||
|
top:50px;
|
||||||
}
|
}
|
||||||
header .nav .dropdown-menu a {
|
header .nav .dropdown-menu a {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@ -2954,7 +2958,7 @@ tbody.collapse.in {
|
|||||||
}
|
}
|
||||||
.dropdown-menu > li > a {
|
.dropdown-menu > li > a {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 3px 20px;
|
padding: 8px 20px;
|
||||||
clear: both;
|
clear: both;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
line-height: 1.42857;
|
line-height: 1.42857;
|
||||||
@ -3050,6 +3054,12 @@ tbody.collapse.in {
|
|||||||
right: auto;
|
right: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@media (max-width : 768px) {
|
||||||
|
.navbar-right .dropdown-menu-right {
|
||||||
|
left: auto;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
.btn-group,
|
.btn-group,
|
||||||
.btn-group-vertical {
|
.btn-group-vertical {
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -3891,6 +3901,33 @@ tbody.collapse.in {
|
|||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.navbar-right {
|
||||||
|
margin-right: -15px;
|
||||||
|
}
|
||||||
|
.navbar-default .navbar-toggle{
|
||||||
|
|
||||||
|
}
|
||||||
|
.navbar-default .navbar-toggle .icon-bar{
|
||||||
|
background-color:#fff!important;
|
||||||
|
}
|
||||||
|
.navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus{
|
||||||
|
background-color:#526a84!important;
|
||||||
|
}
|
||||||
|
.navbar-default .navbar-toggle:hover .icon-bar, .navbar-default .navbar-toggle:focus .icon-bar{
|
||||||
|
background-color:#798EA5!important;
|
||||||
|
}
|
||||||
|
.navbar-toggle {
|
||||||
|
margin-right: 10px;
|
||||||
|
padding: 13px;
|
||||||
|
margin-top: 0px;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
#navbar .navbar-nav{
|
||||||
|
margin:0px;
|
||||||
|
border-bottom:1px solid #798EA5;
|
||||||
|
}
|
||||||
|
}
|
||||||
.navbar-default {
|
.navbar-default {
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
border-color: #e7e7e7;
|
border-color: #e7e7e7;
|
||||||
|
|||||||
@ -109,7 +109,7 @@ public class EmailSenderServiceImpl implements EmailSenderService {
|
|||||||
Options options = new Options();
|
Options options = new Options();
|
||||||
options.setProperty(MessageContext.TRANSPORT_HEADERS, headerMap);
|
options.setProperty(MessageContext.TRANSPORT_HEADERS, headerMap);
|
||||||
options.setProperty("FORCE_CONTENT_TYPE_BASED_FORMATTER", "true");
|
options.setProperty("FORCE_CONTENT_TYPE_BASED_FORMATTER", "true");
|
||||||
options.setProperty(Constants.Configuration.MESSAGE_TYPE, "text/html");
|
options.setProperty(Constants.Configuration.MESSAGE_TYPE, "application/xml");
|
||||||
options.setProperty(Constants.Configuration.CONTENT_TYPE, "text/html");
|
options.setProperty(Constants.Configuration.CONTENT_TYPE, "text/html");
|
||||||
options.setTo(new EndpointReference(EMAIL_URI_SCHEME + to));
|
options.setTo(new EndpointReference(EMAIL_URI_SCHEME + to));
|
||||||
|
|
||||||
|
|||||||
@ -129,10 +129,13 @@ public class JWTClient {
|
|||||||
JSONParser jsonParser = new JSONParser();
|
JSONParser jsonParser = new JSONParser();
|
||||||
JSONObject jsonObject = (JSONObject) jsonParser.parse(response);
|
JSONObject jsonObject = (JSONObject) jsonParser.parse(response);
|
||||||
AccessTokenInfo accessTokenInfo = new AccessTokenInfo();
|
AccessTokenInfo accessTokenInfo = new AccessTokenInfo();
|
||||||
accessTokenInfo.setAccessToken((String) jsonObject.get(JWTConstants.ACCESS_TOKEN_GRANT_TYPE_PARAM_NAME));
|
String accessToken = (String) jsonObject.get(JWTConstants.ACCESS_TOKEN_GRANT_TYPE_PARAM_NAME);
|
||||||
accessTokenInfo.setRefreshToken((String) jsonObject.get(JWTConstants.REFRESH_TOKEN_GRANT_TYPE_PARAM_NAME));
|
if (accessToken != null && !accessToken.isEmpty()) {
|
||||||
accessTokenInfo.setExpiresIn((Long) jsonObject.get(JWTConstants.OAUTH_EXPIRES_IN));
|
accessTokenInfo.setAccessToken(accessToken);
|
||||||
accessTokenInfo.setTokenType((String) jsonObject.get(JWTConstants.OAUTH_TOKEN_TYPE));
|
accessTokenInfo.setRefreshToken((String) jsonObject.get(JWTConstants.REFRESH_TOKEN_GRANT_TYPE_PARAM_NAME));
|
||||||
|
accessTokenInfo.setExpiresIn((Long) jsonObject.get(JWTConstants.OAUTH_EXPIRES_IN));
|
||||||
|
accessTokenInfo.setTokenType((String) jsonObject.get(JWTConstants.OAUTH_TOKEN_TYPE));
|
||||||
|
}
|
||||||
return accessTokenInfo;
|
return accessTokenInfo;
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
throw new JWTClientException("Invalid URL for token endpoint " + jwtConfig.getTokenEndpoint(), e);
|
throw new JWTClientException("Invalid URL for token endpoint " + jwtConfig.getTokenEndpoint(), e);
|
||||||
|
|||||||
@ -147,7 +147,7 @@ public class PolicyManagerImpl implements PolicyManager {
|
|||||||
|
|
||||||
List<ProfileFeature> existingFeaturesList = new ArrayList<>();
|
List<ProfileFeature> existingFeaturesList = new ArrayList<>();
|
||||||
List<ProfileFeature> newFeaturesList = new ArrayList<>();
|
List<ProfileFeature> newFeaturesList = new ArrayList<>();
|
||||||
List<ProfileFeature> feturesToDelete = new ArrayList<>();
|
List<ProfileFeature> featuresToDelete = new ArrayList<>();
|
||||||
List<String> temp = new ArrayList<>();
|
List<String> temp = new ArrayList<>();
|
||||||
List<String> updateDFes = new ArrayList<>();
|
List<String> updateDFes = new ArrayList<>();
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ public class PolicyManagerImpl implements PolicyManager {
|
|||||||
// Check for the features to delete
|
// Check for the features to delete
|
||||||
for (ProfileFeature feature : existingProfileFeaturesList) {
|
for (ProfileFeature feature : existingProfileFeaturesList) {
|
||||||
if (!updateDFes.contains(feature.getFeatureCode())) {
|
if (!updateDFes.contains(feature.getFeatureCode())) {
|
||||||
feturesToDelete.add(feature);
|
featuresToDelete.add(feature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,8 +194,8 @@ public class PolicyManagerImpl implements PolicyManager {
|
|||||||
featureDAO.addProfileFeatures(newFeaturesList, profileId);
|
featureDAO.addProfileFeatures(newFeaturesList, profileId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!feturesToDelete.isEmpty()) {
|
if (!featuresToDelete.isEmpty()) {
|
||||||
for (ProfileFeature pf : feturesToDelete)
|
for (ProfileFeature pf : featuresToDelete)
|
||||||
featureDAO.deleteProfileFeatures(pf.getId());
|
featureDAO.deleteProfileFeatures(pf.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
4
pom.xml
4
pom.xml
@ -1791,8 +1791,8 @@
|
|||||||
<carbon.deployment.version>4.7.0</carbon.deployment.version>
|
<carbon.deployment.version>4.7.0</carbon.deployment.version>
|
||||||
|
|
||||||
<!-- Carbon Identity -->
|
<!-- Carbon Identity -->
|
||||||
<carbon.identity.framework.version>5.2.0</carbon.identity.framework.version>
|
<carbon.identity.framework.version>5.2.1</carbon.identity.framework.version>
|
||||||
<identity.inbound.auth.oauth.version>5.1.2</identity.inbound.auth.oauth.version>
|
<identity.inbound.auth.oauth.version>5.1.3</identity.inbound.auth.oauth.version>
|
||||||
<identity.inbound.auth.saml.version>5.1.1</identity.inbound.auth.saml.version>
|
<identity.inbound.auth.saml.version>5.1.1</identity.inbound.auth.saml.version>
|
||||||
|
|
||||||
<!-- Carbon Multi-tenancy -->
|
<!-- Carbon Multi-tenancy -->
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user