diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml index 57ebebd95e..082a4817ff 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml @@ -103,6 +103,10 @@ org.wso2.carbon.governance org.wso2.carbon.governance.lcm + + javax.ws.rs + javax.ws.rs-api + @@ -150,6 +154,7 @@ org.wso2.carbon.registry.core.* + javax.ws.rs-api, scribe;scope=compile|runtime;inline=false; * diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/GadgetDataService.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/GadgetDataService.java index 3e15a424e3..c2b1b55a75 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/GadgetDataService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/GadgetDataService.java @@ -99,8 +99,8 @@ public interface GadgetDataService { * @param startIndex Starting index of the data set to be retrieved. * @param resultCount Total count of the result set retrieved. * @return An object of type PaginationResult. - * @throws InvalidStartIndexValueException This can occur if startIndex value is lesser than its minimum. - * @throws InvalidResultCountValueException This can occur if resultCount value is lesser than its minimum. + * @throws InvalidStartIndexValueException This can occur if startIndex value is lesser than its minimum (0). + * @throws InvalidResultCountValueException This can occur if resultCount value is lesser than its minimum (5). * @throws DataAccessLayerException This can occur due to errors connecting to database, * executing SQL query and retrieving data. */ @@ -146,8 +146,8 @@ public interface GadgetDataService { * This method is used to get device counts classified by ownership types. * @param extendedFilterSet An abstract representation of possible filtering options. * if this value is simply "null" or no values are set for the defined filtering - * options, this method would return total device counts per each ownership type in - * the system, wrapped by the defined return format. + * options, this method would return total device counts per each ownership + * type in the system, wrapped by the defined return format. * @return A list of objects of type DeviceCountByGroup. * @throws InvalidPotentialVulnerabilityValueException This can occur if potentialVulnerability * value of extendedFilterSet is set with some @@ -160,7 +160,8 @@ public interface GadgetDataService { throws InvalidPotentialVulnerabilityValueException, DataAccessLayerException; /** - * This method is used to get device counts non-compliant upon a particular feature classified by ownership types. + * This method is used to get device counts non-compliant upon a particular feature + * classified by ownership types. * @param featureCode Code name of the non-compliant feature. * @param basicFilterSet An abstract representation of possible filtering options. * if this value is simply "null" or no values are set for the defined filtering @@ -191,8 +192,8 @@ public interface GadgetDataService { * value other than "NON_COMPLIANT" or "UNMONITORED". * @throws DataAccessLayerException This can occur due to errors connecting to database, * executing SQL query and retrieving data. - * @throws InvalidStartIndexValueException This can occur if startIndex value is lesser than its minimum. - * @throws InvalidResultCountValueException This can occur if resultCount value is lesser than its minimum. + * @throws InvalidStartIndexValueException This can occur if startIndex value is lesser than its minimum (0). + * @throws InvalidResultCountValueException This can occur if resultCount value is lesser than its minimum (5). */ @SuppressWarnings("unused") PaginationResult getDevicesWithDetails(ExtendedFilterSet extendedFilterSet, int startIndex, int resultCount) @@ -200,7 +201,8 @@ public interface GadgetDataService { InvalidStartIndexValueException, InvalidResultCountValueException; /** - * This method is used to get a paginated list of non-compliant devices with details, upon a particular feature. + * This method is used to get a paginated list of non-compliant devices with details, + * upon a particular feature. * @param featureCode Code name of the non-compliant feature. * @param basicFilterSet An abstract representation of possible filtering options. * if this value is simply "null" or no values are set for the defined filtering @@ -213,8 +215,8 @@ public interface GadgetDataService { * @throws InvalidFeatureCodeValueException This can occur if featureCode is set to null or empty. * @throws DataAccessLayerException This can occur due to errors connecting to database, * executing SQL query and retrieving data. - * @throws InvalidStartIndexValueException This can occur if startIndex value is lesser than its minimum. - * @throws InvalidResultCountValueException This can occur if resultCount value is lesser than its minimum. + * @throws InvalidStartIndexValueException This can occur if startIndex value is lesser than its minimum (0). + * @throws InvalidResultCountValueException This can occur if resultCount value is lesser than its minimum (5). */ @SuppressWarnings("unused") PaginationResult getFeatureNonCompliantDevicesWithDetails(String featureCode, BasicFilterSet basicFilterSet, diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml index bf01da5c68..b058109588 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml @@ -238,6 +238,11 @@ org.wso2.carbon.devicemgt org.wso2.carbon.apimgt.annotations + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.analytics.dashboard + provided + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/DashboardGadgetDataWrapper.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/DashboardGadgetDataWrapper.java new file mode 100644 index 0000000000..7e4436e597 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/DashboardGadgetDataWrapper.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * 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. + */ + +package org.wso2.carbon.device.mgt.jaxrs.beans; + +import java.util.List; + +public class DashboardGadgetDataWrapper { + + private String context; + private String groupingAttribute; + private List data; + + @SuppressWarnings("unused") + public String getContext() { + return context; + } + + public void setContext(String context) { + this.context = context; + } + + @SuppressWarnings("unused") + public String getGroupingAttribute() { + return groupingAttribute; + } + + public void setGroupingAttribute(String groupingAttribute) { + this.groupingAttribute = groupingAttribute; + } + + @SuppressWarnings("unused") + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/DashboardPaginationGadgetDataWrapper.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/DashboardPaginationGadgetDataWrapper.java new file mode 100644 index 0000000000..c78f63f5c0 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/DashboardPaginationGadgetDataWrapper.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * 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. + */ + +package org.wso2.carbon.device.mgt.jaxrs.beans; + +public class DashboardPaginationGadgetDataWrapper extends DashboardGadgetDataWrapper { + + private int totalRecordCount; + + @SuppressWarnings("unused") + public int getTotalRecordCount() { + return totalRecordCount; + } + + public void setTotalRecordCount(int totalRecordCount) { + this.totalRecordCount = totalRecordCount; + } + +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/Dashboard.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/Dashboard.java new file mode 100644 index 0000000000..8dbf6bf3c5 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/Dashboard.java @@ -0,0 +1,81 @@ +package org.wso2.carbon.device.mgt.jaxrs.service.api; + +import io.swagger.annotations.Api; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.Response; + +@Path("/dashboard") +@Api(value = "Dashboard", description = "Dashboard related operations are described here.") +@SuppressWarnings("NonJaxWsWebServices") +public interface Dashboard { + + String CONNECTIVITY_STATUS = "connectivity-status"; + String POTENTIAL_VULNERABILITY = "potential-vulnerability"; + String NON_COMPLIANT_FEATURE_CODE = "non-compliant-feature-code"; + String PLATFORM = "platform"; + String OWNERSHIP = "ownership"; + // Constants related to pagination + String PAGINATION_ENABLED = "pagination-enabled"; + String START_INDEX = "start"; + String RESULT_COUNT = "length"; + + @GET + @Path("device-count-overview") + Response getOverviewDeviceCounts(); + + @GET + @Path("device-counts-by-potential-vulnerabilities") + Response getDeviceCountsByPotentialVulnerabilities(); + + @GET + @Path("non-compliant-device-counts-by-features") + Response getNonCompliantDeviceCountsByFeatures(@QueryParam(START_INDEX) int startIndex, + @QueryParam(RESULT_COUNT) int resultCount); + + @GET + @Path("device-counts-by-groups") + Response getDeviceCountsByGroups(@QueryParam(CONNECTIVITY_STATUS) String connectivityStatus, + @QueryParam(POTENTIAL_VULNERABILITY) String potentialVulnerability, + @QueryParam(PLATFORM) String platform, + @QueryParam(OWNERSHIP) String ownership); + + @GET + @Path("feature-non-compliant-device-counts-by-groups") + Response getFeatureNonCompliantDeviceCountsByGroups(@QueryParam(NON_COMPLIANT_FEATURE_CODE) String nonCompliantFeatureCode, + @QueryParam(PLATFORM) String platform, + @QueryParam(OWNERSHIP) String ownership); + @GET + @Path("filtered-device-count-over-total") + Response getFilteredDeviceCountOverTotal(@QueryParam(CONNECTIVITY_STATUS) String connectivityStatus, + @QueryParam(POTENTIAL_VULNERABILITY) String potentialVulnerability, + @QueryParam(PLATFORM) String platform, + @QueryParam(OWNERSHIP) String ownership); + + @GET + @Path("feature-non-compliant-device-count-over-total") + Response getFeatureNonCompliantDeviceCountOverTotal(@QueryParam(NON_COMPLIANT_FEATURE_CODE) String nonCompliantFeatureCode, + @QueryParam(PLATFORM) String platform, + @QueryParam(OWNERSHIP) String ownership); + + @GET + @Path("devices-with-details") + Response getDevicesWithDetails(@QueryParam(CONNECTIVITY_STATUS) String connectivityStatus, + @QueryParam(POTENTIAL_VULNERABILITY) String potentialVulnerability, + @QueryParam(PLATFORM) String platform, + @QueryParam(OWNERSHIP) String ownership, + @QueryParam(PAGINATION_ENABLED) String paginationEnabled, + @QueryParam(START_INDEX) int startIndex, + @QueryParam(RESULT_COUNT) int resultCount); + + @GET + @Path("feature-non-compliant-devices-with-details") + Response getFeatureNonCompliantDevicesWithDetails(@QueryParam(NON_COMPLIANT_FEATURE_CODE) String nonCompliantFeatureCode, + @QueryParam(PLATFORM) String platform, + @QueryParam(OWNERSHIP) String ownership, + @QueryParam(PAGINATION_ENABLED) String paginationEnabled, + @QueryParam(START_INDEX) int startIndex, + @QueryParam(RESULT_COUNT) int resultCount); +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java index 52ebdb168c..8633279e65 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java @@ -29,12 +29,12 @@ import org.wso2.carbon.device.mgt.common.app.mgt.Application; import org.wso2.carbon.device.mgt.common.device.details.DeviceInfo; import org.wso2.carbon.device.mgt.common.device.details.DeviceLocation; import org.wso2.carbon.device.mgt.common.device.details.DeviceWrapper; -import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.search.SearchContext; import javax.ws.rs.*; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; +import java.util.Date; import java.util.List; /** @@ -67,6 +67,9 @@ public interface DeviceManagementService { "index.", required = true) @QueryParam("limit") int limit); + Response getDevices(@HeaderParam("If-Modified-Since") Date timestamp, @QueryParam("offset") int offset, + @QueryParam("limit") int limit); + @GET @ApiOperation( produces = MediaType.APPLICATION_JSON, diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java index 4e74dda82d..f6cc90d559 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java @@ -97,4 +97,7 @@ public interface GroupManagementService { Response removeDeviceFromGroup(@PathParam("groupName") String groupName, @QueryParam("type") String type, @QueryParam("id") String id); + @GET + Response getGroupsByUser(@QueryParam("user") String user); + } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DashboardImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DashboardImpl.java new file mode 100644 index 0000000000..78f131bdce --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DashboardImpl.java @@ -0,0 +1,688 @@ +/* + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * 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. + */ + +package org.wso2.carbon.device.mgt.jaxrs.service.impl; + +import org.apache.commons.httpclient.HttpStatus; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.device.mgt.analytics.dashboard.GadgetDataService; +import org.wso2.carbon.device.mgt.analytics.dashboard.bean.BasicFilterSet; +import org.wso2.carbon.device.mgt.analytics.dashboard.bean.DeviceCountByGroup; +import org.wso2.carbon.device.mgt.analytics.dashboard.bean.DeviceWithDetails; +import org.wso2.carbon.device.mgt.analytics.dashboard.bean.ExtendedFilterSet; +import org.wso2.carbon.device.mgt.analytics.dashboard.exception.*; +import org.wso2.carbon.device.mgt.common.PaginationResult; +import org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils; +import org.wso2.carbon.device.mgt.jaxrs.beans.DashboardGadgetDataWrapper; +import org.wso2.carbon.device.mgt.jaxrs.beans.DashboardPaginationGadgetDataWrapper; +import org.wso2.carbon.device.mgt.jaxrs.service.api.Dashboard; + +import javax.ws.rs.*; +import javax.ws.rs.core.Response; +import java.util.ArrayList; +import java.util.List; + +/** + * This class consists of dashboard related REST APIs + * to be consumed by individual client gadgets such as + * [1] Overview of Devices, + * [2] Potential Vulnerabilities, + * [3] Non-compliant Devices by Features, + * [4] Device Groupings and etc. + */ + +@Consumes({"application/json"}) +@Produces({"application/json"}) + +@SuppressWarnings("NonJaxWsWebServices") +public class DashboardImpl implements Dashboard { + + private static Log log = LogFactory.getLog(DashboardImpl.class); + + private static final String FLAG_TRUE = "true"; + private static final String FLAG_FALSE = "false"; + // Constants related to common error-response messages + private static final String INVALID_QUERY_PARAM_VALUE_POTENTIAL_VULNERABILITY = "Received an invalid value for " + + "query parameter : " + POTENTIAL_VULNERABILITY + ", Should be either NON_COMPLIANT or UNMONITORED."; + private static final String INVALID_QUERY_PARAM_VALUE_START_INDEX = "Received an invalid value for " + + "query parameter : " + START_INDEX + ", Should not be lesser than 0."; + private static final String INVALID_QUERY_PARAM_VALUE_RESULT_COUNT = "Received an invalid value for " + + "query parameter : " + RESULT_COUNT + ", Should not be lesser than 5."; + private static final String INVALID_QUERY_PARAM_VALUE_PAGINATION_ENABLED = "Received an invalid value for " + + "query parameter : " + PAGINATION_ENABLED + ", Should be either true or false."; + private static final String REQUIRED_QUERY_PARAM_VALUE_NON_COMPLIANT_FEATURE_CODE = "Missing required query " + + "parameter : " + NON_COMPLIANT_FEATURE_CODE; + private static final String REQUIRED_QUERY_PARAM_VALUE_PAGINATION_ENABLED = "Missing required query " + + "parameter : " + PAGINATION_ENABLED; + private static final String ERROR_IN_RETRIEVING_REQUESTED_DATA = "Error in retrieving requested data."; + + @GET + @Path("device-count-overview") + public Response getOverviewDeviceCounts() { + GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); + + DashboardGadgetDataWrapper dashboardGadgetDataWrapper1 = new DashboardGadgetDataWrapper(); + + // getting total device count + DeviceCountByGroup totalDeviceCount; + try { + totalDeviceCount = gadgetDataService.getTotalDeviceCount(); + } catch (DataAccessLayerException e) { + log.error("An internal error occurred while trying to execute relevant data service function " + + "@ Dashboard API layer to retrieve total device count.", e); + return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). + entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); + } + + List totalDeviceCountInListEntry = new ArrayList<>(); + totalDeviceCountInListEntry.add(totalDeviceCount); + + dashboardGadgetDataWrapper1.setContext("Total-device-count"); + dashboardGadgetDataWrapper1.setGroupingAttribute(null); + dashboardGadgetDataWrapper1.setData(totalDeviceCountInListEntry); + + // getting device counts by connectivity statuses + List deviceCountsByConnectivityStatuses; + try { + deviceCountsByConnectivityStatuses = gadgetDataService.getDeviceCountsByConnectivityStatuses(); + } catch (DataAccessLayerException e) { + log.error("An internal error occurred while trying to execute relevant data service function " + + "@ Dashboard API layer to retrieve device counts by connectivity statuses.", e); + return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). + entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); + } + + DashboardGadgetDataWrapper dashboardGadgetDataWrapper2 = new DashboardGadgetDataWrapper(); + + dashboardGadgetDataWrapper2.setContext("Device-counts-by-connectivity-statuses"); + dashboardGadgetDataWrapper2.setGroupingAttribute(CONNECTIVITY_STATUS); + dashboardGadgetDataWrapper2.setData(deviceCountsByConnectivityStatuses); + + List responsePayload = new ArrayList<>(); + responsePayload.add(dashboardGadgetDataWrapper1); + responsePayload.add(dashboardGadgetDataWrapper2); + + return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); + } + + @GET + @Path("device-counts-by-potential-vulnerabilities") + public Response getDeviceCountsByPotentialVulnerabilities() { + GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); + + List deviceCountsByPotentialVulnerabilities; + try { + deviceCountsByPotentialVulnerabilities = gadgetDataService.getDeviceCountsByPotentialVulnerabilities(); + } catch (DataAccessLayerException e) { + log.error("An internal error occurred while trying to execute relevant data service function " + + "@ Dashboard API layer to retrieve device counts by potential vulnerabilities.", e); + return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). + entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); + } + + DashboardGadgetDataWrapper dashboardGadgetDataWrapper = new DashboardGadgetDataWrapper(); + dashboardGadgetDataWrapper.setContext("Device-counts-by-potential-vulnerabilities"); + dashboardGadgetDataWrapper.setGroupingAttribute(POTENTIAL_VULNERABILITY); + dashboardGadgetDataWrapper.setData(deviceCountsByPotentialVulnerabilities); + + List responsePayload = new ArrayList<>(); + responsePayload.add(dashboardGadgetDataWrapper); + + return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); + } + + @GET + @Path("non-compliant-device-counts-by-features") + public Response getNonCompliantDeviceCountsByFeatures(@QueryParam(START_INDEX) int startIndex, + @QueryParam(RESULT_COUNT) int resultCount) { + + GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); + DashboardPaginationGadgetDataWrapper + dashboardPaginationGadgetDataWrapper = new DashboardPaginationGadgetDataWrapper(); + + PaginationResult paginationResult; + try { + paginationResult = gadgetDataService. + getNonCompliantDeviceCountsByFeatures(startIndex, resultCount); + } catch (InvalidStartIndexValueException e) { + log.error("Bad request and error occurred @ Gadget Data Service layer due to " + + "invalid (query) parameter value. This was while trying to execute relevant data service " + + "function @ Dashboard API layer to retrieve a non-compliant set " + + "of device counts by features.", e); + return Response.status(HttpStatus.SC_BAD_REQUEST).entity(INVALID_QUERY_PARAM_VALUE_START_INDEX).build(); + } catch (InvalidResultCountValueException e) { + log.error("Bad request and error occurred @ Gadget Data Service layer due to " + + "invalid (query) parameter value. This was while trying to execute relevant data service " + + "function @ Dashboard API layer to retrieve a non-compliant set " + + "of device counts by features.", e); + return Response.status(HttpStatus.SC_BAD_REQUEST).entity(INVALID_QUERY_PARAM_VALUE_RESULT_COUNT).build(); + } catch (DataAccessLayerException e) { + log.error("An internal error occurred while trying to execute relevant data service function " + + "@ Dashboard API layer to retrieve a non-compliant set of device counts by features.", e); + return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). + entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); + } + + dashboardPaginationGadgetDataWrapper.setContext("Non-compliant-device-counts-by-features"); + dashboardPaginationGadgetDataWrapper.setGroupingAttribute(NON_COMPLIANT_FEATURE_CODE); + dashboardPaginationGadgetDataWrapper.setData(paginationResult.getData()); + dashboardPaginationGadgetDataWrapper.setTotalRecordCount(paginationResult.getRecordsTotal()); + + List responsePayload = new ArrayList<>(); + responsePayload.add(dashboardPaginationGadgetDataWrapper); + + return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); + } + + @GET + @Path("device-counts-by-groups") + public Response getDeviceCountsByGroups(@QueryParam(CONNECTIVITY_STATUS) String connectivityStatus, + @QueryParam(POTENTIAL_VULNERABILITY) String potentialVulnerability, + @QueryParam(PLATFORM) String platform, + @QueryParam(OWNERSHIP) String ownership) { + + // getting gadget data service + GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); + + // constructing filter set + ExtendedFilterSet filterSet = new ExtendedFilterSet(); + filterSet.setConnectivityStatus(connectivityStatus); + filterSet.setPotentialVulnerability(potentialVulnerability); + filterSet.setPlatform(platform); + filterSet.setOwnership(ownership); + + // creating device-Counts-by-platforms Data Wrapper + List deviceCountsByPlatforms; + try { + deviceCountsByPlatforms = gadgetDataService.getDeviceCountsByPlatforms(filterSet); + } catch (InvalidPotentialVulnerabilityValueException e) { + log.error("Bad request and error occurred @ Gadget Data Service layer due to " + + "invalid (query) parameter value. This was while trying to execute relevant data service " + + "function @ Dashboard API layer to retrieve a filtered set of device counts by platforms.", e); + return Response.status(HttpStatus.SC_BAD_REQUEST). + entity(INVALID_QUERY_PARAM_VALUE_POTENTIAL_VULNERABILITY).build(); + } catch (DataAccessLayerException e) { + log.error("An internal error occurred while trying to execute relevant data service function " + + "@ Dashboard API layer to retrieve a filtered set of device counts by platforms.", e); + return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). + entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); + } + + DashboardGadgetDataWrapper dashboardGadgetDataWrapper1 = new DashboardGadgetDataWrapper(); + dashboardGadgetDataWrapper1.setContext("Device-counts-by-platforms"); + dashboardGadgetDataWrapper1.setGroupingAttribute(PLATFORM); + dashboardGadgetDataWrapper1.setData(deviceCountsByPlatforms); + + // creating device-Counts-by-ownership-types Data Wrapper + List deviceCountsByOwnerships; + try { + deviceCountsByOwnerships = gadgetDataService.getDeviceCountsByOwnershipTypes(filterSet); + } catch (InvalidPotentialVulnerabilityValueException e) { + log.error("Bad request and error occurred @ Gadget Data Service layer due to " + + "invalid (query) parameter value. This was while trying to execute relevant data service " + + "function @ Dashboard API layer to retrieve a filtered set of device counts by ownerships.", e); + return Response.status(HttpStatus.SC_BAD_REQUEST). + entity(INVALID_QUERY_PARAM_VALUE_POTENTIAL_VULNERABILITY).build(); + } catch (DataAccessLayerException e) { + log.error("An internal error occurred while trying to execute relevant data service function " + + "@ Dashboard API layer to retrieve a filtered set of device counts by ownerships.", e); + return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). + entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); + } + + DashboardGadgetDataWrapper dashboardGadgetDataWrapper2 = new DashboardGadgetDataWrapper(); + dashboardGadgetDataWrapper2.setContext("Device-counts-by-ownerships"); + dashboardGadgetDataWrapper2.setGroupingAttribute(OWNERSHIP); + dashboardGadgetDataWrapper2.setData(deviceCountsByOwnerships); + + List responsePayload = new ArrayList<>(); + responsePayload.add(dashboardGadgetDataWrapper1); + responsePayload.add(dashboardGadgetDataWrapper2); + + return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); + } + + @GET + @Path("feature-non-compliant-device-counts-by-groups") + public Response getFeatureNonCompliantDeviceCountsByGroups(@QueryParam(NON_COMPLIANT_FEATURE_CODE) String nonCompliantFeatureCode, + @QueryParam(PLATFORM) String platform, + @QueryParam(OWNERSHIP) String ownership) { + // getting gadget data service + GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); + + // constructing filter set + BasicFilterSet filterSet = new BasicFilterSet(); + filterSet.setPlatform(platform); + filterSet.setOwnership(ownership); + + // creating feature-non-compliant-device-Counts-by-platforms Data Wrapper + List featureNonCompliantDeviceCountsByPlatforms; + try { + featureNonCompliantDeviceCountsByPlatforms = gadgetDataService. + getFeatureNonCompliantDeviceCountsByPlatforms(nonCompliantFeatureCode, filterSet); + } catch (InvalidFeatureCodeValueException e) { + log.error("Bad request and error occurred @ Gadget Data Service layer due to " + + "invalid (query) parameter value. This was while trying to execute relevant data service " + + "function @ Dashboard API layer to retrieve a filtered set of feature " + + "non-compliant device counts by platforms.", e); + return Response.status(HttpStatus.SC_BAD_REQUEST). + entity(REQUIRED_QUERY_PARAM_VALUE_NON_COMPLIANT_FEATURE_CODE).build(); + } catch (DataAccessLayerException e) { + log.error("An internal error occurred while trying to execute relevant data service function " + + "@ Dashboard API layer to retrieve a filtered set of feature non-compliant " + + "device counts by platforms.", e); + return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). + entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); + } + + DashboardGadgetDataWrapper dashboardGadgetDataWrapper1 = new DashboardGadgetDataWrapper(); + dashboardGadgetDataWrapper1.setContext("Feature-non-compliant-device-counts-by-platforms"); + dashboardGadgetDataWrapper1.setGroupingAttribute(PLATFORM); + dashboardGadgetDataWrapper1.setData(featureNonCompliantDeviceCountsByPlatforms); + + // creating feature-non-compliant-device-Counts-by-ownership-types Data Wrapper + List featureNonCompliantDeviceCountsByOwnerships; + try { + featureNonCompliantDeviceCountsByOwnerships = gadgetDataService. + getFeatureNonCompliantDeviceCountsByOwnershipTypes(nonCompliantFeatureCode, filterSet); + } catch (InvalidFeatureCodeValueException e) { + log.error("Bad request and error occurred @ Gadget Data Service layer due to " + + "invalid (query) parameter value. This was while trying to execute relevant data service function " + + "@ Dashboard API layer to retrieve a filtered set of feature " + + "non-compliant device counts by ownerships.", e); + return Response.status(HttpStatus.SC_BAD_REQUEST). + entity(REQUIRED_QUERY_PARAM_VALUE_NON_COMPLIANT_FEATURE_CODE).build(); + } catch (DataAccessLayerException e) { + log.error("An internal error occurred while trying to execute relevant data service function " + + "@ Dashboard API layer to retrieve a filtered set of feature non-compliant " + + "device counts by ownerships.", e); + return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). + entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); + } + + DashboardGadgetDataWrapper dashboardGadgetDataWrapper2 = new DashboardGadgetDataWrapper(); + dashboardGadgetDataWrapper2.setContext("Feature-non-compliant-device-counts-by-ownerships"); + dashboardGadgetDataWrapper2.setGroupingAttribute(OWNERSHIP); + dashboardGadgetDataWrapper2.setData(featureNonCompliantDeviceCountsByOwnerships); + + List responsePayload = new ArrayList<>(); + responsePayload.add(dashboardGadgetDataWrapper1); + responsePayload.add(dashboardGadgetDataWrapper2); + + return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); + } + + @GET + @Path("filtered-device-count-over-total") + public Response getFilteredDeviceCountOverTotal(@QueryParam(CONNECTIVITY_STATUS) String connectivityStatus, + @QueryParam(POTENTIAL_VULNERABILITY) String potentialVulnerability, + @QueryParam(PLATFORM) String platform, + @QueryParam(OWNERSHIP) String ownership) { + + // getting gadget data service + GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); + + // constructing filter set + ExtendedFilterSet filterSet = new ExtendedFilterSet(); + filterSet.setConnectivityStatus(connectivityStatus); + filterSet.setPotentialVulnerability(potentialVulnerability); + filterSet.setPlatform(platform); + filterSet.setOwnership(ownership); + + // creating filteredDeviceCount Data Wrapper + DeviceCountByGroup filteredDeviceCount; + try { + filteredDeviceCount = gadgetDataService.getDeviceCount(filterSet); + } catch (InvalidPotentialVulnerabilityValueException e) { + log.error("Bad request and error occurred @ Gadget Data Service layer due to " + + "invalid (query) parameter value. This was while trying to execute relevant data service " + + "function @ Dashboard API layer to retrieve a filtered device count over the total.", e); + return Response.status(HttpStatus.SC_BAD_REQUEST). + entity(INVALID_QUERY_PARAM_VALUE_POTENTIAL_VULNERABILITY).build(); + } catch (DataAccessLayerException e) { + log.error("An internal error occurred while trying to execute relevant data service function " + + "@ Dashboard API layer to retrieve a filtered device count over the total.", e); + return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). + entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); + } + + // creating TotalDeviceCount Data Wrapper + DeviceCountByGroup totalDeviceCount; + try { + totalDeviceCount = gadgetDataService.getTotalDeviceCount(); + } catch (DataAccessLayerException e) { + log.error("An internal error occurred while trying to execute relevant data service function " + + "@ Dashboard API layer to retrieve the total device count over filtered.", e); + return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). + entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); + } + + List filteredDeviceCountOverTotalDataWrapper = new ArrayList<>(); + filteredDeviceCountOverTotalDataWrapper.add(filteredDeviceCount); + filteredDeviceCountOverTotalDataWrapper.add(totalDeviceCount); + + DashboardGadgetDataWrapper dashboardGadgetDataWrapper = new DashboardGadgetDataWrapper(); + dashboardGadgetDataWrapper.setContext("Filtered-device-count-over-total"); + dashboardGadgetDataWrapper.setGroupingAttribute(null); + dashboardGadgetDataWrapper.setData(filteredDeviceCountOverTotalDataWrapper); + + List responsePayload = new ArrayList<>(); + responsePayload.add(dashboardGadgetDataWrapper); + + return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); + } + + @GET + @Path("feature-non-compliant-device-count-over-total") + public Response getFeatureNonCompliantDeviceCountOverTotal(@QueryParam(NON_COMPLIANT_FEATURE_CODE) String nonCompliantFeatureCode, + @QueryParam(PLATFORM) String platform, + @QueryParam(OWNERSHIP) String ownership) { + + // getting gadget data service + GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); + + // constructing filter set + BasicFilterSet filterSet = new BasicFilterSet(); + filterSet.setPlatform(platform); + filterSet.setOwnership(ownership); + + // creating featureNonCompliantDeviceCount Data Wrapper + DeviceCountByGroup featureNonCompliantDeviceCount; + try { + featureNonCompliantDeviceCount = gadgetDataService. + getFeatureNonCompliantDeviceCount(nonCompliantFeatureCode, filterSet); + } catch (InvalidFeatureCodeValueException e) { + log.error("Bad request and error occurred @ Gadget Data Service layer due to " + + "invalid (query) parameter value. This was while trying to execute relevant data service function " + + "@ Dashboard API layer to retrieve a feature non-compliant device count over the total.", e); + return Response.status(HttpStatus.SC_BAD_REQUEST). + entity(REQUIRED_QUERY_PARAM_VALUE_NON_COMPLIANT_FEATURE_CODE).build(); + } catch (DataAccessLayerException e) { + log.error("An internal error occurred while trying to execute relevant data service function " + + "@ Dashboard API layer to retrieve a feature non-compliant device count over the total.", e); + return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). + entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); + } + + // creating TotalDeviceCount Data Wrapper + DeviceCountByGroup totalDeviceCount; + try { + totalDeviceCount = gadgetDataService.getTotalDeviceCount(); + } catch (DataAccessLayerException e) { + log.error("An internal error occurred while trying to execute relevant data service function " + + "@ Dashboard API layer to retrieve the total device count over filtered feature non-compliant.", e); + return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). + entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); + } + + List featureNonCompliantDeviceCountOverTotalDataWrapper = new ArrayList<>(); + featureNonCompliantDeviceCountOverTotalDataWrapper.add(featureNonCompliantDeviceCount); + featureNonCompliantDeviceCountOverTotalDataWrapper.add(totalDeviceCount); + + DashboardGadgetDataWrapper dashboardGadgetDataWrapper = new DashboardGadgetDataWrapper(); + dashboardGadgetDataWrapper.setContext("Feature-non-compliant-device-count-over-total"); + dashboardGadgetDataWrapper.setGroupingAttribute(null); + dashboardGadgetDataWrapper.setData(featureNonCompliantDeviceCountOverTotalDataWrapper); + + List responsePayload = new ArrayList<>(); + responsePayload.add(dashboardGadgetDataWrapper); + + return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); + } + + @GET + @Path("devices-with-details") + public Response getDevicesWithDetails(@QueryParam(CONNECTIVITY_STATUS) String connectivityStatus, + @QueryParam(POTENTIAL_VULNERABILITY) String potentialVulnerability, + @QueryParam(PLATFORM) String platform, + @QueryParam(OWNERSHIP) String ownership, + @QueryParam(PAGINATION_ENABLED) String paginationEnabled, + @QueryParam(START_INDEX) int startIndex, + @QueryParam(RESULT_COUNT) int resultCount) { + + if (paginationEnabled == null) { + + log.error("Bad request on retrieving a filtered set of devices with details @ " + + "Dashboard API layer. " + REQUIRED_QUERY_PARAM_VALUE_PAGINATION_ENABLED); + return Response.status(HttpStatus.SC_BAD_REQUEST). + entity(REQUIRED_QUERY_PARAM_VALUE_PAGINATION_ENABLED).build(); + + } else if (FLAG_TRUE.equals(paginationEnabled)) { + + // getting gadget data service + GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); + + // constructing filter set + ExtendedFilterSet filterSet = new ExtendedFilterSet(); + filterSet.setConnectivityStatus(connectivityStatus); + filterSet.setPotentialVulnerability(potentialVulnerability); + filterSet.setPlatform(platform); + filterSet.setOwnership(ownership); + + PaginationResult paginationResult; + try { + paginationResult = gadgetDataService. + getDevicesWithDetails(filterSet, startIndex, resultCount); + } catch (InvalidPotentialVulnerabilityValueException e) { + log.error("Bad request and error occurred @ Gadget Data Service layer due to " + + "invalid (query) parameter value. This was while trying to execute relevant data service " + + "function @ Dashboard API layer to retrieve a filtered set of devices with details.", e); + return Response.status(HttpStatus.SC_BAD_REQUEST). + entity(INVALID_QUERY_PARAM_VALUE_POTENTIAL_VULNERABILITY).build(); + } catch (InvalidStartIndexValueException e) { + log.error("Bad request and error occurred @ Gadget Data Service layer due to " + + "invalid (query) parameter value. This was while trying to execute relevant data service " + + "function @ Dashboard API layer to retrieve a filtered set of devices with details.", e); + return Response.status(HttpStatus.SC_BAD_REQUEST). + entity(INVALID_QUERY_PARAM_VALUE_START_INDEX).build(); + } catch (InvalidResultCountValueException e) { + log.error("Bad request and error occurred @ Gadget Data Service layer due to " + + "invalid (query) parameter value. This was while trying to execute relevant data service " + + "function @ Dashboard API layer to retrieve a filtered set of devices with details.", e); + return Response.status(HttpStatus.SC_BAD_REQUEST). + entity(INVALID_QUERY_PARAM_VALUE_RESULT_COUNT).build(); + } catch (DataAccessLayerException e) { + log.error("An internal error occurred while trying to execute relevant data service function " + + "@ Dashboard API layer to retrieve a filtered set of devices with details.", e); + return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). + entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); + } + + DashboardPaginationGadgetDataWrapper + dashboardPaginationGadgetDataWrapper = new DashboardPaginationGadgetDataWrapper(); + dashboardPaginationGadgetDataWrapper.setContext("Filtered-and-paginated-devices-with-details"); + dashboardPaginationGadgetDataWrapper.setGroupingAttribute(null); + dashboardPaginationGadgetDataWrapper.setData(paginationResult.getData()); + dashboardPaginationGadgetDataWrapper.setTotalRecordCount(paginationResult.getRecordsTotal()); + + List responsePayload = new ArrayList<>(); + responsePayload.add(dashboardPaginationGadgetDataWrapper); + + return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); + + } else if (FLAG_FALSE.equals(paginationEnabled)) { + + // getting gadget data service + GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); + + // constructing filter set + ExtendedFilterSet filterSet = new ExtendedFilterSet(); + filterSet.setConnectivityStatus(connectivityStatus); + filterSet.setPotentialVulnerability(potentialVulnerability); + filterSet.setPlatform(platform); + filterSet.setOwnership(ownership); + + List devicesWithDetails; + try { + devicesWithDetails = gadgetDataService.getDevicesWithDetails(filterSet); + } catch (InvalidPotentialVulnerabilityValueException e) { + log.error("Bad request and error occurred @ Gadget Data Service layer due to " + + "invalid (query) parameter value. This was while trying to execute relevant data service " + + "function @ Dashboard API layer to retrieve a filtered set of devices with details.", e); + return Response.status(HttpStatus.SC_BAD_REQUEST). + entity(INVALID_QUERY_PARAM_VALUE_POTENTIAL_VULNERABILITY).build(); + } catch (DataAccessLayerException e) { + log.error("An internal error occurred while trying to execute relevant data service function " + + "@ Dashboard API layer to retrieve a filtered set of devices with details.", e); + return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). + entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); + } + + DashboardGadgetDataWrapper dashboardGadgetDataWrapper = new DashboardGadgetDataWrapper(); + dashboardGadgetDataWrapper.setContext("Filtered-devices-with-details"); + dashboardGadgetDataWrapper.setGroupingAttribute(null); + dashboardGadgetDataWrapper.setData(devicesWithDetails); + + List responsePayload = new ArrayList<>(); + responsePayload.add(dashboardGadgetDataWrapper); + + return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); + + } else { + + log.error("Bad request on retrieving a filtered set of devices with details @ " + + "Dashboard API layer. " + INVALID_QUERY_PARAM_VALUE_PAGINATION_ENABLED); + return Response.status(HttpStatus.SC_BAD_REQUEST). + entity(INVALID_QUERY_PARAM_VALUE_PAGINATION_ENABLED).build(); + + } + } + + @GET + @Path("feature-non-compliant-devices-with-details") + public Response getFeatureNonCompliantDevicesWithDetails(@QueryParam(NON_COMPLIANT_FEATURE_CODE) String nonCompliantFeatureCode, + @QueryParam(PLATFORM) String platform, + @QueryParam(OWNERSHIP) String ownership, + @QueryParam(PAGINATION_ENABLED) String paginationEnabled, + @QueryParam(START_INDEX) int startIndex, + @QueryParam(RESULT_COUNT) int resultCount) { + if (paginationEnabled == null) { + + log.error("Bad request on retrieving a filtered set of feature non-compliant devices with " + + "details @ Dashboard API layer. " + REQUIRED_QUERY_PARAM_VALUE_PAGINATION_ENABLED); + return Response.status(HttpStatus.SC_BAD_REQUEST). + entity(REQUIRED_QUERY_PARAM_VALUE_PAGINATION_ENABLED).build(); + + } else if (FLAG_TRUE.equals(paginationEnabled)) { + + // getting gadget data service + GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); + + // constructing filter set + BasicFilterSet filterSet = new BasicFilterSet(); + filterSet.setPlatform(platform); + filterSet.setOwnership(ownership); + + PaginationResult paginationResult; + try { + paginationResult = gadgetDataService. + getFeatureNonCompliantDevicesWithDetails(nonCompliantFeatureCode, + filterSet, startIndex, resultCount); + } catch (InvalidFeatureCodeValueException e) { + log.error("Bad request and error occurred @ Gadget Data Service layer due to " + + "invalid (query) parameter value. This was while trying to execute relevant data service " + + "function @ Dashboard API layer to retrieve a filtered set of " + + "feature non-compliant devices with details.", e); + return Response.status(HttpStatus.SC_BAD_REQUEST). + entity(REQUIRED_QUERY_PARAM_VALUE_NON_COMPLIANT_FEATURE_CODE).build(); + } catch (InvalidStartIndexValueException e) { + log.error("Bad request and error occurred @ Gadget Data Service layer due to " + + "invalid (query) parameter value. This was while trying to execute relevant data service " + + "function @ Dashboard API layer to retrieve a filtered set of " + + "feature non-compliant devices with details.", e); + return Response.status(HttpStatus.SC_BAD_REQUEST). + entity(INVALID_QUERY_PARAM_VALUE_START_INDEX).build(); + } catch (InvalidResultCountValueException e) { + log.error("Bad request and error occurred @ Gadget Data Service layer due to " + + "invalid (query) parameter value. This was while trying to execute relevant data service " + + "function @ Dashboard API layer to retrieve a filtered set of " + + "feature non-compliant devices with details.", e); + return Response.status(HttpStatus.SC_BAD_REQUEST). + entity(INVALID_QUERY_PARAM_VALUE_RESULT_COUNT).build(); + } catch (DataAccessLayerException e) { + log.error("An internal error occurred while trying to execute relevant data service function " + + "@ Dashboard API layer to retrieve a filtered set of feature " + + "non-compliant devices with details.", e); + return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). + entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); + } + + DashboardPaginationGadgetDataWrapper + dashboardPaginationGadgetDataWrapper = new DashboardPaginationGadgetDataWrapper(); + dashboardPaginationGadgetDataWrapper. + setContext("Filtered-and-paginated-feature-non-compliant-devices-with-details"); + dashboardPaginationGadgetDataWrapper.setGroupingAttribute(null); + dashboardPaginationGadgetDataWrapper.setData(paginationResult.getData()); + dashboardPaginationGadgetDataWrapper.setTotalRecordCount(paginationResult.getRecordsTotal()); + + List responsePayload = new ArrayList<>(); + responsePayload.add(dashboardPaginationGadgetDataWrapper); + + return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); + + } else if (FLAG_FALSE.equals(paginationEnabled)) { + + // getting gadget data service + GadgetDataService gadgetDataService = DeviceMgtAPIUtils.getGadgetDataService(); + + // constructing filter set + BasicFilterSet filterSet = new BasicFilterSet(); + filterSet.setPlatform(platform); + filterSet.setOwnership(ownership); + + List featureNonCompliantDevicesWithDetails; + try { + featureNonCompliantDevicesWithDetails = gadgetDataService. + getFeatureNonCompliantDevicesWithDetails(nonCompliantFeatureCode, filterSet); + } catch (InvalidFeatureCodeValueException e) { + log.error("Bad request and error occurred @ Gadget Data Service layer due to " + + "invalid (query) parameter value. This was while trying to execute relevant data service " + + "function @ Dashboard API layer to retrieve a filtered set of " + + "feature non-compliant devices with details.", e); + return Response.status(HttpStatus.SC_BAD_REQUEST). + entity(REQUIRED_QUERY_PARAM_VALUE_NON_COMPLIANT_FEATURE_CODE).build(); + } catch (DataAccessLayerException e) { + log.error("An internal error occurred while trying to execute relevant data service function " + + "@ Dashboard API layer to retrieve a filtered set of feature " + + "non-compliant devices with details.", e); + return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR). + entity(ERROR_IN_RETRIEVING_REQUESTED_DATA).build(); + } + + DashboardGadgetDataWrapper dashboardGadgetDataWrapper = new DashboardGadgetDataWrapper(); + dashboardGadgetDataWrapper.setContext("Filtered-feature-non-compliant-devices-with-details"); + dashboardGadgetDataWrapper.setGroupingAttribute(null); + dashboardGadgetDataWrapper.setData(featureNonCompliantDevicesWithDetails); + + List responsePayload = new ArrayList<>(); + responsePayload.add(dashboardGadgetDataWrapper); + + return Response.status(HttpStatus.SC_OK).entity(responsePayload).build(); + + } else { + + log.error("Bad request on retrieving a filtered set of feature non-compliant devices with " + + "details @ Dashboard API layer. " + INVALID_QUERY_PARAM_VALUE_PAGINATION_ENABLED); + return Response.status(HttpStatus.SC_BAD_REQUEST). + entity(INVALID_QUERY_PARAM_VALUE_PAGINATION_ENABLED).build(); + + } + } + +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java index 14a40fffef..485c2e5cec 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java @@ -40,6 +40,7 @@ import org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils; import javax.ws.rs.*; import javax.ws.rs.core.Response; +import java.util.Date; import java.util.List; @Path("/devices") @@ -67,6 +68,23 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { } } + @Override + public Response getDevices(@HeaderParam("If-Modified-Since") Date timestamp, + @QueryParam("offset") int offset, @QueryParam("limit") int limit) { + SearchManagerService searchManagerService; + List devices; + try { + searchManagerService = DeviceMgtAPIUtils.getSearchManagerService(); + devices = searchManagerService.getUpdated(timestamp.getTime()); + + } catch (SearchMgtException e) { + String msg = "Error occurred while retrieving the updated device information after the given time."; + log.error(msg, e); + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); + } + return Response.status(Response.Status.OK).entity(devices).build(); + } + @GET @Override public Response getDevices(@QueryParam("type") String type, @QueryParam("offset") int offset, diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GroupManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GroupManagementServiceImpl.java index 5c8387698e..8ac90acd47 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GroupManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GroupManagementServiceImpl.java @@ -21,13 +21,28 @@ package org.wso2.carbon.device.mgt.jaxrs.service.impl; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroup; import org.wso2.carbon.device.mgt.jaxrs.service.api.GroupManagementService; +import org.apache.commons.httpclient.HttpStatus; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.device.mgt.common.DeviceIdentifier; +import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroup; +import org.wso2.carbon.device.mgt.common.group.mgt.GroupManagementException; +import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderService; +import org.wso2.carbon.device.mgt.jaxrs.service.api.GroupManagementService; +import org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils; +import org.wso2.carbon.policy.mgt.common.DeviceGroupWrapper; import javax.ws.rs.PathParam; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Response; +import java.util.ArrayList; +import java.util.List; public class GroupManagementServiceImpl implements GroupManagementService { + private static final Log log = LogFactory.getLog(GroupManagementServiceImpl.class); + @Override public Response getGroups(@QueryParam("offset") int offset, @QueryParam("limit") int limit) { return null; @@ -97,4 +112,27 @@ public class GroupManagementServiceImpl implements GroupManagementService { return null; } + @Override + public Response getGroupsByUser(@QueryParam("user") String user) { + try { + List groupWrappers = new ArrayList<>(); + GroupManagementProviderService service = DeviceMgtAPIUtils.getGroupManagementProviderService(); + List deviceGroups = service.getGroups(user); + int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); + for (DeviceGroup dg : deviceGroups) { + DeviceGroupWrapper gw = new DeviceGroupWrapper(); + gw.setId(dg.getId()); + gw.setOwner(dg.getOwner()); + gw.setName(dg.getName()); + gw.setTenantId(tenantId); + groupWrappers.add(gw); + } + return Response.status(Response.Status.OK).entity(groupWrappers).build(); + } catch (GroupManagementException e) { + String error = "Error occurred while getting the groups related to users for policy."; + log.error(error, e); + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(error).build(); + } + } + } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/DeviceMgtAPIUtils.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/DeviceMgtAPIUtils.java index 0a19f25333..bec643fa5d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/DeviceMgtAPIUtils.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/DeviceMgtAPIUtils.java @@ -22,6 +22,8 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.certificate.mgt.core.service.CertificateManagementService; import org.wso2.carbon.context.CarbonContext; +import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.device.mgt.analytics.dashboard.GadgetDataService; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; @@ -243,5 +245,14 @@ public class DeviceMgtAPIUtils { } return searchManagerService; } - + + public static GadgetDataService getGadgetDataService() { + PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + GadgetDataService gadgetDataService = (GadgetDataService) ctx.getOSGiService(GadgetDataService.class, null); + if (gadgetDataService == null) { + throw new IllegalStateException("Gadget Data Service has not been initialized."); + } + return gadgetDataService; + } + } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/META-INF/permissions.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/META-INF/permissions.xml index b06dc5fb4f..8146d01640 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/META-INF/permissions.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/META-INF/permissions.xml @@ -886,10 +886,16 @@ Device Search /device-mgt/admin/search - /information/* - GET + /search + POST + + Device Updated + /device-mgt/admin/search/after + /search/after/* + GET + @@ -937,19 +943,25 @@ Save certificate in the database - /device-mgt/android/certificate/save - /certificates/saveCertificate + /device-mgt/admin/certificate/save + /certificates POST get certificate in the database - /device-mgt/android/certificate/view + /device-mgt/admin/certificate/Get /certificates/* GET - Remove certificate in the database - /device-mgt/android/certificate/remove + get certificate in the database + /device-mgt/admin/certificate/GetAll + /certificates + GET + + + get certificate in the database + /device-mgt/admin/certificate/Get /certificates/* DELETE @@ -1152,5 +1164,61 @@ DELETE + + + get device count overview + /device-mgt/admin/dashboard/device-count-overview + /dashboard/device-count-overview + GET + + + get device counts by potential vulnerabilities + /device-mgt/admin/dashboard/device-counts-by-potential-vulnerabilities + /dashboard/device-counts-by-potential-vulnerabilities + GET + + + get non-compliant device counts by features + /device-mgt/admin/dashboard/non-compliant-device-counts-by-features + /dashboard/non-compliant-device-counts-by-features + GET + + + get device counts by groups + /device-mgt/admin/dashboard/device-counts-by-groups + /dashboard/device-counts-by-groups + GET + + + get feature-non-compliant device counts by groups + /device-mgt/admin/dashboard/feature-non-compliant-device-counts-by-groups + /dashboard/feature-non-compliant-device-counts-by-groups + GET + + + get filtered device count over total + /device-mgt/admin/dashboard/filtered-device-count-over-total + /dashboard/filtered-device-count-over-total + GET + + + get feature-non-compliant device count over total + /device-mgt/admin/dashboard/feature-non-compliant-device-count-over-total + /dashboard/feature-non-compliant-device-count-over-total + GET + + + get devices with details + /device-mgt/admin/dashboard/devices-with-details + /dashboard/devices-with-details + GET + + + get feature-non-compliant devices with details + /device-mgt/admin/dashboard/feature-non-compliant-devices-with-details + /dashboard/feature-non-compliant-devices-with-details + GET + + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml index 7e0f3c4190..1cabcadff0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml @@ -38,6 +38,7 @@ + @@ -74,6 +75,7 @@ + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/ApplicationManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/ApplicationManager.java index bf660566f8..e9da177cdd 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/ApplicationManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/ApplicationManager.java @@ -20,6 +20,7 @@ package org.wso2.carbon.device.mgt.common.app.mgt; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; +import org.wso2.carbon.device.mgt.common.operation.mgt.Activity; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import java.util.List; @@ -66,12 +67,12 @@ public interface ApplicationManager { throws ApplicationManagementException; - void installApplicationForDevices(Operation operation, List deviceIdentifiers) + Activity installApplicationForDevices(Operation operation, List deviceIdentifiers) throws ApplicationManagementException; - void installApplicationForUsers(Operation operation, List userNameList) + Activity installApplicationForUsers(Operation operation, List userNameList) throws ApplicationManagementException; - void installApplicationForUserRoles(Operation operation, List userRoleList) + Activity installApplicationForUserRoles(Operation operation, List userRoleList) throws ApplicationManagementException; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/Activity.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/Activity.java new file mode 100644 index 0000000000..2669876af2 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/Activity.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * 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. + */ + + +package org.wso2.carbon.device.mgt.common.operation.mgt; + +public class Activity { + + public enum Type { + CONFIG, MESSAGE, INFO, COMMAND, PROFILE, POLICY + } + + private String activityId; + private String code; + private Type type; + private String createdTimeStamp; + + public String getActivityId() { + return activityId; + } + + public void setActivityId(String activityId) { + this.activityId = activityId; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public Type getType() { + return type; + } + + public void setType(Type type) { + this.type = type; + } + + public String getCreatedTimeStamp() { + return createdTimeStamp; + } + + public void setCreatedTimeStamp(String createdTimeStamp) { + this.createdTimeStamp = createdTimeStamp; + } +} + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/ActivityStatus.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/ActivityStatus.java new file mode 100644 index 0000000000..b053710725 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/ActivityStatus.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * 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. + */ + + +package org.wso2.carbon.device.mgt.common.operation.mgt; + +import org.wso2.carbon.device.mgt.common.DeviceIdentifier; + +import java.util.List; + +public class ActivityStatus { + + public enum Status { + IN_PROGRESS, PENDING, COMPLETED, ERROR, REPEATED + } + private DeviceIdentifier deviceIdentifier; + private Status status; + private List responses; + private String updatedTimestamp; + + public DeviceIdentifier getDeviceIdentifier() { + return deviceIdentifier; + } + + public void setDeviceIdentifier(DeviceIdentifier deviceIdentifier) { + this.deviceIdentifier = deviceIdentifier; + } + + public Status getStatus() { + return status; + } + + public void setStatus(Status status) { + this.status = status; + } + + public List getResponses() { + return responses; + } + + public void setResponses(List responses) { + this.responses = responses; + } + + public String getUpdatedTimestamp() { + return updatedTimestamp; + } + + public void setUpdatedTimestamp(String updatedTimestamp) { + this.updatedTimestamp = updatedTimestamp; + } +} + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java index 26ed93bddb..9e3689f402 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java @@ -38,7 +38,7 @@ public interface OperationManager { * @throws OperationManagementException If some unusual behaviour is observed while adding the * operation */ - int addOperation(Operation operation, List devices) throws OperationManagementException; + Activity addOperation(Operation operation, List devices) throws OperationManagementException; /** * Method to retrieve the list of all operations to a device. diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/ApplicationManagerProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/ApplicationManagerProviderServiceImpl.java index 2df1177d20..78782e55d9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/ApplicationManagerProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/ApplicationManagerProviderServiceImpl.java @@ -30,6 +30,7 @@ import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.TransactionManagementException; import org.wso2.carbon.device.mgt.common.app.mgt.Application; import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException; +import org.wso2.carbon.device.mgt.common.operation.mgt.Activity; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; import org.wso2.carbon.device.mgt.core.DeviceManagementConstants; @@ -91,7 +92,7 @@ public class ApplicationManagerProviderServiceImpl implements ApplicationManagem } @Override - public void installApplicationForDevices(Operation operation, List deviceIds) + public Activity installApplicationForDevices(Operation operation, List deviceIds) throws ApplicationManagementException { try { //TODO: Fix this properly later adding device type to be passed in when the task manage executes "addOperations()" @@ -99,10 +100,11 @@ public class ApplicationManagerProviderServiceImpl implements ApplicationManagem if (deviceIds.size() > 0) { type = deviceIds.get(0).getType(); } - DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().addOperation(type, operation, - deviceIds); + Activity activity = DeviceManagementDataHolder.getInstance().getDeviceManagementProvider(). + addOperation(type, operation, deviceIds); DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().notifyOperationToDevices (operation, deviceIds); + return activity; } catch (OperationManagementException e) { throw new ApplicationManagementException("Error in add operation at app installation", e); } catch (DeviceManagementException e) { @@ -111,7 +113,7 @@ public class ApplicationManagerProviderServiceImpl implements ApplicationManagem } @Override - public void installApplicationForUsers(Operation operation, List userNameList) + public Activity installApplicationForUsers(Operation operation, List userNameList) throws ApplicationManagementException { String userName = null; @@ -138,9 +140,10 @@ public class ApplicationManagerProviderServiceImpl implements ApplicationManagem if (deviceIdentifierList.size() > 0) { type = deviceIdentifierList.get(0).getType(); } - DeviceManagementDataHolder.getInstance().getDeviceManagementProvider() + Activity activity = DeviceManagementDataHolder.getInstance().getDeviceManagementProvider() .addOperation(type, operation, deviceIdentifierList); + return activity; } catch (DeviceManagementException e) { throw new ApplicationManagementException("Error in get devices for user: " + userName + " in app installation", e); @@ -152,7 +155,7 @@ public class ApplicationManagerProviderServiceImpl implements ApplicationManagem } @Override - public void installApplicationForUserRoles(Operation operation, List userRoleList) + public Activity installApplicationForUserRoles(Operation operation, List userRoleList) throws ApplicationManagementException { String userRole = null; @@ -178,9 +181,9 @@ public class ApplicationManagerProviderServiceImpl implements ApplicationManagem if (deviceIdentifierList.size() > 0) { type = deviceIdentifierList.get(0).getType(); } - DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().addOperation(type, operation, + Activity activity = DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().addOperation(type, operation, deviceIdentifierList); - + return activity; } catch (DeviceManagementException e) { throw new ApplicationManagementException("Error in get devices for user role " + userRole + " in app installation", e); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java index f0dfbe95dc..c883e98b26 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java @@ -24,6 +24,7 @@ import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.device.mgt.common.*; import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationException; import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroupConstants; +import org.wso2.carbon.device.mgt.common.operation.mgt.Activity; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManager; @@ -47,6 +48,7 @@ import org.wso2.carbon.device.mgt.core.task.impl.DeviceTaskManagerImpl; import java.sql.SQLException; import java.util.ArrayList; import java.util.Collections; +import java.util.Date; import java.util.List; /** @@ -83,8 +85,8 @@ public class OperationManagerImpl implements OperationManager { } @Override - public int addOperation(Operation operation, - List deviceIds) throws OperationManagementException { + public Activity addOperation(Operation operation, + List deviceIds) throws OperationManagementException { if (log.isDebugEnabled()) { log.debug("operation:[" + operation.toString() + "]"); for (DeviceIdentifier deviceIdentifier : deviceIds) { @@ -96,7 +98,7 @@ public class OperationManagerImpl implements OperationManager { List authorizedDeviceList = this.getAuthorizedDevices(operation, deviceIds); if (authorizedDeviceList.size() <= 0) { log.info("User : " + getUser() + " is not authorized to perform operations on given device-list."); - return -1; + return null; } List enrolments = this.getEnrollmentsByStatus(deviceIds); @@ -128,7 +130,12 @@ public class OperationManagerImpl implements OperationManager { } } OperationManagementDAOFactory.commitTransaction(); - return operationId; + Activity activity = new Activity(); + activity.setActivityId(DeviceManagementConstants.OperationAttributes.ACTIVITY + operationId); + activity.setCode(operationDto.getCode()); + activity.setCreatedTimeStamp(new Date().toString()); + activity.setType(Activity.Type.valueOf(operationDto.getType().toString())); + return activity; } catch (OperationManagementDAOException e) { OperationManagementDAOFactory.rollbackTransaction(); throw new OperationManagementException("Error occurred while adding operation", e); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/push/notification/mgt/PushNotificationBasedOperationManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/push/notification/mgt/PushNotificationBasedOperationManager.java index 94486be464..c8644f39e3 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/push/notification/mgt/PushNotificationBasedOperationManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/push/notification/mgt/PushNotificationBasedOperationManager.java @@ -22,6 +22,7 @@ import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.PaginationRequest; import org.wso2.carbon.device.mgt.common.PaginationResult; +import org.wso2.carbon.device.mgt.common.operation.mgt.Activity; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManager; @@ -43,9 +44,9 @@ public class PushNotificationBasedOperationManager implements OperationManager { } @Override - public int addOperation(Operation operation, - List devices) throws OperationManagementException { - int operationId = this.operationManager.addOperation(operation, devices); + public Activity addOperation(Operation operation, + List devices) throws OperationManagementException { + Activity activity = this.operationManager.addOperation(operation, devices); for (DeviceIdentifier deviceId : devices) { try { this.notificationProvider.execute(new NotificationContext(deviceId)); @@ -53,7 +54,7 @@ public class PushNotificationBasedOperationManager implements OperationManager { throw new OperationManagementException("Error occurred while sending push notification to device", e); } } - return operationId; + return activity; } @Override diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java index aec73ab0ee..ca50836132 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java @@ -26,6 +26,7 @@ import org.wso2.carbon.device.mgt.common.PaginationRequest; import org.wso2.carbon.device.mgt.common.PaginationResult; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.common.license.mgt.License; +import org.wso2.carbon.device.mgt.common.operation.mgt.Activity; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; import org.wso2.carbon.device.mgt.core.dto.DeviceType; @@ -215,8 +216,8 @@ public interface DeviceManagementProviderService { void notifyOperationToDevices(Operation operation, List deviceIds) throws DeviceManagementException; - int addOperation(String type, Operation operation, - List devices) throws OperationManagementException; + Activity addOperation(String type, Operation operation, + List devices) throws OperationManagementException; List getOperations(DeviceIdentifier deviceId) throws OperationManagementException; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java index a03a5c952e..a8bb25fe3b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java @@ -33,6 +33,7 @@ import org.wso2.carbon.device.mgt.common.TransactionManagementException; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.common.license.mgt.License; import org.wso2.carbon.device.mgt.common.license.mgt.LicenseManagementException; +import org.wso2.carbon.device.mgt.common.operation.mgt.Activity; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; import org.wso2.carbon.device.mgt.common.push.notification.NotificationStrategy; @@ -816,8 +817,8 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv } @Override - public int addOperation(String type, Operation operation, - List devices) throws OperationManagementException { + public Activity addOperation(String type, Operation operation, + List devices) throws OperationManagementException { return DeviceManagementDataHolder.getInstance().getOperationManager().addOperation(operation, devices); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json index 7a3920667c..bef0d5884f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json @@ -4,6 +4,8 @@ "apiContext" : "api", "httpsURL" : "%https.ip%", "httpURL" : "%http.ip%", + "wssURL" : "%https.ip%", + "wsURL" : "%http.ip%", "enrollmentDir": "/emm-web-agent/enrollment", "iOSConfigRoot" : "%https.ip%/ios-enrollment/", "iOSAPIRoot" : "%https.ip%/ios/", diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.hbs index ae1bc62aea..012b6df8c0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="Dashboard"}} {{unit "cdmf.unit.ui.content.title" pageHeader="Dashboard"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.analytics/analytics.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.analytics/analytics.hbs index 7f27c97e94..f2120857e0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.analytics/analytics.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.analytics/analytics.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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 "topCss"}} {{css "css/analytics.css"}} {{/zone}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.enroll/enroll.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.enroll/enroll.hbs index baa13b7835..71d4a93523 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.enroll/enroll.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.enroll/enroll.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="Device Types"}} {{unit "cdmf.unit.ui.content.title" pageHeader="Device List"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.type.view/view.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.type.view/view.hbs index 17f8a78958..70c449653c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.type.view/view.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.type.view/view.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="Device"}} {{! unit "cdmf.unit.ui.content.title" pageHeader="Device Download"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.view/view.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.view/view.hbs index cf7daba5a8..2b6be8fd6d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.view/view.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.view/view.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="Device Details"}} {{unit "cdmf.unit.lib.service-invoker-utility"}} {{unit "cdmf.unit.lib.handlebars"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs index b800c8777e..421ab3b779 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="Device Management"}} {{unit "cdmf.unit.data-tables-extended"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.error-404/error-404.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.error-404/error-404.hbs index 596a59a008..a4a31d008c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.error-404/error-404.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.error-404/error-404.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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 "title"}}Error | {{@app.conf.appName}}{{/zone}} {{#zone "breadcrumbs"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.analytics/analytics.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.analytics/analytics.hbs index b8fdc158ab..24d69f8ce4 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.analytics/analytics.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.analytics/analytics.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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 "topCss"}} {{css "css/analytics.css"}} {{/zone}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/create.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/create.hbs index 71e6eded33..cc7aeaeb40 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/create.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/create.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="Group Management"}} {{#zone "breadcrumbs"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.hbs index 71c940b6a2..cb93094c76 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="Group Management"}} {{unit "cdmf.unit.ui.content.title" pageHeader="Groups"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.notification.listing/listing.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.notification.listing/listing.hbs index ebce424856..b2b78e87c8 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.notification.listing/listing.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.notification.listing/listing.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="Notification Listing"}} {{#zone "content"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.platform.configuration/configuration.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.platform.configuration/configuration.hbs index c9d379042f..b4c5c8af10 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.platform.configuration/configuration.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.platform.configuration/configuration.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="Platform Configuration"}} {{#zone "breadcrumbs"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policies/policies.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policies/policies.hbs index 6a12ef4f90..2dcfb0122e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policies/policies.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policies/policies.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="Policy Management"}} {{unit "cdmf.unit.data-tables-extended"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.create.wizard/wizard.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.create.wizard/wizard.hbs index 3af40ddf86..f78cb71f65 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.create.wizard/wizard.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.create.wizard/wizard.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="Policy Management"}} {{#zone "breadcrumbs"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.create/create.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.create/create.hbs index 321812ab6f..360523ebb1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.create/create.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.create/create.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="Policy Management"}} {{#zone "breadcrumbs"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.edit/edit.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.edit/edit.hbs index 0161b1284f..c6519777db 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.edit/edit.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.edit/edit.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="Policy Management"}} {{#zone "breadcrumbs"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.priority/priority.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.priority/priority.hbs index 74fe4e04be..6295e4b87d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.priority/priority.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.priority/priority.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="Policy Management"}} {{#zone "breadcrumbs"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.view/view.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.view/view.hbs index 3e2040d7db..f3113d2069 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.view/view.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.view/view.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="Policy Management"}} {{#zone "breadcrumbs"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.role.create/create.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.role.create/create.hbs index be58f41e1c..4271391f97 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.role.create/create.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.role.create/create.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="Role Management"}} {{#zone "breadcrumbs"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.role.edit.permission/permission.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.role.edit.permission/permission.hbs index 11dc482dd6..a05a504ca0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.role.edit.permission/permission.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.role.edit.permission/permission.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="Role Management"}} {{unit "cdmf.unit.lib.service-invoker-utility"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.role.edit/edit.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.role.edit/edit.hbs index 292f01f472..cdf32d9884 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.role.edit/edit.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.role.edit/edit.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="Role Management"}} {{unit "cdmf.unit.lib.select2"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/roles.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/roles.hbs index 7648793b54..07f4c0a143 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/roles.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/roles.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="Role Management"}} {{unit "cdmf.unit.data-tables-extended"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.sign-in/sign-in.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.sign-in/sign-in.hbs index 56b6bbd947..1b839d3cdb 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.sign-in/sign-in.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.sign-in/sign-in.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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 "title"}}{{! to override parent page title }}{{/zone}} {{unit "cdmf.unit.ui.title" pageTitle="Login"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.hbs index 26ba4b6482..e8902e77d2 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="User Management"}} {{#zone "breadcrumbs"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.edit/edit.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.edit/edit.hbs index 1c7c7840b5..4597dae477 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.edit/edit.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.edit/edit.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="User Management"}} {{#zone "breadcrumbs"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.view/view.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.view/view.hbs index da8d44ac3a..eddefb24aa 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.view/view.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.view/view.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="User Management"}} {{#zone "breadcrumbs"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.hbs index ebbf6596f9..493f395a70 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{unit "cdmf.unit.ui.title" pageTitle="User Management"}} {{unit "cdmf.unit.data-tables-extended"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.analytics.date-range-picker/date-range-picker.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.analytics.date-range-picker/date-range-picker.hbs index 20a035a8bd..6a7f2bb962 100755 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.analytics.date-range-picker/date-range-picker.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.analytics.date-range-picker/date-range-picker.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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 "topCss"}} {{css "css/daterangepicker.css"}} {{/zone}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.data-tables-extended/data-tables-extended.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.data-tables-extended/data-tables-extended.hbs index 0214e1cc62..ebe533ca13 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.data-tables-extended/data-tables-extended.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.data-tables-extended/data-tables-extended.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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 "topCss"}} {{~css "css/dataTables.bootstrap.css"}} {{~css "css/dataTables.responsive.css"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.details/details.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.details/details.hbs index 62dcb6988a..5d64021462 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.details/details.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.details/details.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}}
Device Details

diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.operation-bar/operation-bar.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.operation-bar/operation-bar.hbs index 603db84125..f88206c03e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.operation-bar/operation-bar.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.operation-bar/operation-bar.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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 "bottomJs"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.operation-mod/operation-mod.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.operation-mod/operation-mod.hbs index d193515b46..8d7e6bc16f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.operation-mod/operation-mod.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.operation-mod/operation-mod.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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 "bottomJs"}} {{js "js/operation-mod.js"}} {{/zone}} \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.overview-section/overview-section.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.overview-section/overview-section.hbs index 19a69bdcf8..34d64824e9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.overview-section/overview-section.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.overview-section/overview-section.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{#if device.viewModel.vendor}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.view/view.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.view/view.hbs index 96be819bd9..e3e4eeec86 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.view/view.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.view/view.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}} {{#defineZone "contentTitle"}}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/listing.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/listing.hbs index af1ffee163..46fa4bffa4 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/listing.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/listing.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.footer/footer.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.footer/footer.hbs index a23f01f2aa..00000cf41f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.footer/footer.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.footer/footer.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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 "footer"}}

WSO2 Carbon Device Management Framework v.1.0.0 | © 2015, Inc. (http://www.wso2.org) All Rights Reserved. diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.lib.handlebars/handlebars.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.lib.handlebars/handlebars.hbs index bd8b68d909..b36fed6882 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.lib.handlebars/handlebars.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.lib.handlebars/handlebars.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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 "bottomJs"}} {{js "js/handlebars-v2.0.0.js"}} {{js "js/utils.js"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.lib.qrcode/qrcode.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.lib.qrcode/qrcode.hbs index 2c2f1c46bb..4a5b9a3cb9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.lib.qrcode/qrcode.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.lib.qrcode/qrcode.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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 "bottomJs"}} {{js "js/jquery.qrcode.min.js"}} + {{js "js/notification-listing.js"}} {{/zone}} \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/configuration.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/configuration.hbs index 5960212352..f8ee771e5b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/configuration.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/configuration.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}}

diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs index ecf3aedacf..5ea81961f6 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.priority/priority.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.priority/priority.hbs index 62b17eb644..5a7fea7f8a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.priority/priority.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.priority/priority.hbs @@ -1,3 +1,20 @@ +{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + + 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. +}}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.create/create.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.create/create.hbs index 830b0fb2e5..b74abb7dc4 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.create/create.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.create/create.hbs @@ -1,94 +1,114 @@ - -
-
+{{! + Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - -
-
-

Add Role

-
-
-
-
-
-
-
1
- -
-
-
-
-
-
2
- -
-
+ 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. +}} + +
+
+ + +
+
+

Add Role

+
+
+
+
+
+
+
1
+
+
-


- +

+
+ + -
- -
- -
- +
+ +
+ +
+ -
- - - -
- +
+ + + +
+ -
- -
+
+
-
-
+
+
- +
- +
+ {{#zone "bottomJs"}} {{js "js/bottomJs.js"}} {{/zone}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/permission.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/permission.hbs index 8072c314d9..ad3b495e28 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/permission.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/permission.hbs @@ -1,73 +1,92 @@ - -
-
- -
-
-

Change Role permissions

-

Please note that * sign represents required fields of data.

-
- - - - - - - - - - - - - - - -
- -
By Role Name
- - - - -
-
-
-