diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/PolicyManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/PolicyManagementService.java index 1ede29f3e87..da0931e10fe 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/PolicyManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/PolicyManagementService.java @@ -374,7 +374,7 @@ public interface PolicyManagementService { required = true) List policyIds); - @PUT + @POST @Path("/deactivate-policy") @ApiOperation( consumes = 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/impl/PolicyManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/PolicyManagementServiceImpl.java index 109bb189d42..bb8759e685e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/PolicyManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/PolicyManagementServiceImpl.java @@ -254,7 +254,7 @@ public class PolicyManagementServiceImpl implements PolicyManagementService { } } - @PUT + @POST @Path("/activate-policy") @Override public Response activatePolicies(List policyIds) { @@ -286,7 +286,7 @@ public class PolicyManagementServiceImpl implements PolicyManagementService { } } - @PUT + @POST @Path("/deactivate-policy") @Override public Response deactivatePolicies(List policyIds) { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java index 1ecdb88459b..44062cffc7e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java @@ -763,10 +763,9 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO { ResultSet rs = null; try { conn = this.getConnection(); - String sql = "SELECT ID AS ENROLMENT_ID FROM DM_ENROLMENT WHERE DEVICE_ID = (SELECT DISTINCT d.ID " + - "FROM DM_DEVICE d, DM_DEVICE_TYPE t WHERE d.DEVICE_TYPE_ID = t.ID " + - "AND d.DEVICE_IDENTIFICATION = ? AND t.NAME = ? AND d.TENANT_ID = ?) " + - "AND STATUS = ? AND TENANT_ID = ?"; + String sql = "SELECT e.ID AS ENROLMENT_ID FROM DM_ENROLMENT e, (SELECT d.ID FROM DM_DEVICE d, DM_DEVICE_TYPE t " + + "WHERE d.DEVICE_TYPE_ID = t.ID AND d.DEVICE_IDENTIFICATION = ? AND t.NAME = ? AND d.TENANT_ID = ?) dtm " + + "WHERE e.DEVICE_ID = dtm.ID AND e.STATUS = ? AND e.TENANT_ID = ?;"; stmt = conn.prepareStatement(sql); stmt.setString(1, deviceId.getId()); stmt.setString(2, deviceId.getType()); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.theme/public/css/theme-wso2.css b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.theme/public/css/theme-wso2.css index 5fe5c2e37d3..7d570d33e02 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.theme/public/css/theme-wso2.css +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.theme/public/css/theme-wso2.css @@ -5398,6 +5398,9 @@ button.close { -moz-border-radius: 0; border-radius: 0; } +.panel-body .message { + margin:0px; +} .message h4 { margin-top: 0; margin-bottom: 5px; @@ -7438,17 +7441,13 @@ ul.sidebar-messages > li { * ======================================================================== */ .body-wrapper { padding: 40px; + margin-bottom:40px; } .body-wrapper a.btn:hover,.body-wrapper a:hover { text-decoration: none; } -@media (max-width: 767px) { - .body-wrapper { - padding: 40px 0px; - } -} .page-header { margin: 0 0 20px; } @@ -7791,9 +7790,16 @@ ul.sidebar-messages > li { background: transparent; font-size: 24px; font-weight: 300; - border-bottom: 1px solid #e4e4e4; - padding-bottom: 10px; - margin-bottom: 20px; +} + +.panel-default > .panel-heading a[data-toggle="collapse"]{ + display:block; + padding:10px; +} +.media.tab-responsive .panel-group .panel-heading + .panel-collapse > .panel-body, +.media.tab-responsive .panel-group .panel-heading + .panel-collapse > .list-group{ + border:none; + border-top:1px solid #ddd; } /* ======================================================================== @@ -8321,7 +8327,6 @@ a.list-group-item:hover { border-style: solid; border-color: #ddd; padding: 20px; - min-height: 300px; }