Adding temporary development code bits of dashboard analytics feature

revert-70aa11f8
dilanua 9 years ago
parent a192bfa85c
commit ce8d4b53a2

@ -28,7 +28,6 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt</artifactId>
<packaging>pom</packaging>
<name>WSO2 Carbon - Device Management Component</name>
@ -39,6 +38,7 @@
<module>org.wso2.carbon.device.mgt.common</module>
<module>org.wso2.carbon.device.mgt.extensions</module>
<module>org.wso2.carbon.device.mgt.ui</module>
<module>org.wso2.carbon.device.mgt.analytics.dashboard</module>
<module>org.wso2.carbon.device.mgt.analytics.data.publisher</module>
<module>org.wso2.carbon.device.mgt.etc</module>
</modules>

@ -22,29 +22,34 @@ public final class PolicyManagementConstants {
public static final String DEVICE_CONFIG_XML_NAME = "cdm-config.xml";
public static final String ANY = "ANY";
public static final String POLICY_BUNDLE = "POLICY_BUNDLE";
// public static final String POLICY_BUNDLE = "POLICY_BUNDLE";
public static final String TENANT_ID = "TENANT_ID";
public static final String MONITOR = "MONITOR";
// public static final String MONITOR = "MONITOR";
public static final String ENFORCE = "ENFORCE";
public static final String WARN = "WARN";
public static final String BLOCK = "BLOCK";
public static final String MONITORING_TASK_TYPE = "MONITORING_TASK";
public static final String MONITORING_TASK_NAME = "MONITORING";
public static final String MONITORING_TASK_CLAZZ = "org.wso2.carbon.policy.mgt.core.task.MonitoringTask";
public static final String DM_CACHE_MANAGER = "DM_CACHE_MANAGER";
public static final String DM_CACHE = "DM_CACHE";
// public static final String DM_CACHE = "DM_CACHE";
public static final String DM_CACHE_LIST = "DM_CACHE_LIST";
public static final String DELEGATION_TASK_TYPE = "DELEGATION__TASK";
public static final String DELEGATION_TASK_NAME = "DELEGATION";
public static final String DELEGATION_TASK_CLAZZ = "org.wso2.carbon.policy.mgt.core.enforcement.DelegationTask";
/**
Caller would reference the constants using PolicyManagementConstants.DEVICE_CONFIG_XML_NAME,
and so on. Any caller should be prevented from constructing objects of
this class, thus declaring this private constructor.
*/
private PolicyManagementConstants() {
throw new AssertionError();
}
}

@ -28,7 +28,6 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
@ -43,7 +42,6 @@
<module>org.wso2.carbon.complex.policy.decision.point</module>
</modules>
<build>
<pluginManagement>
<plugins>

@ -484,3 +484,31 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_DETAIL (
ON DELETE NO ACTION
ON UPDATE NO ACTION
);
CREATE VIEW DEVICES_VIEW AS
SELECT
DEVICE_INFO.DEVICE_ID,
DEVICE_INFO.PLATFORM,
DEVICE_INFO.OWNERSHIP,
DEVICE_INFO.CONNECTIVITY_STATUS,
IFNULL(DEVICE_WITH_POLICY_INFO.POLICY_ID, -1) AS POLICY_ID,
IFNULL(DEVICE_WITH_POLICY_INFO.IS_COMPLIANT, -1) AS IS_COMPLIANT,
DEVICE_INFO.TENANT_ID
FROM
(SELECT
DM_DEVICE.ID AS DEVICE_ID,
DM_DEVICE_TYPE.NAME AS PLATFORM,
DM_ENROLMENT.OWNERSHIP AS OWNERSHIP,
DM_ENROLMENT.STATUS AS CONNECTIVITY_STATUS,
DM_DEVICE.TENANT_ID AS TENANT_ID
FROM DM_DEVICE, DM_DEVICE_TYPE, DM_ENROLMENT
WHERE DM_DEVICE.DEVICE_TYPE_ID = DM_DEVICE_TYPE.ID AND DM_DEVICE.ID = DM_ENROLMENT.DEVICE_ID) DEVICE_INFO
LEFT JOIN
(SELECT
DEVICE_ID,
POLICY_ID,
STATUS AS IS_COMPLIANT
FROM
DM_POLICY_COMPLIANCE_STATUS) DEVICE_WITH_POLICY_INFO
ON DEVICE_INFO.DEVICE_ID = DEVICE_WITH_POLICY_INFO.DEVICE_ID
ORDER BY DEVICE_INFO.DEVICE_ID;

@ -27,7 +27,6 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-feature</artifactId>
<packaging>pom</packaging>
<name>WSO2 Carbon - Device Management Feature</name>
@ -39,6 +38,7 @@
<module>org.wso2.carbon.device.mgt.feature</module>
<module>org.wso2.carbon.device.mgt.extensions.feature</module>
<module>org.wso2.carbon.device.mgt.analytics.data.publisher.feature</module>
<module>org.wso2.carbon.device.mgt.analytics.dashboard.feature</module>
</modules>
</project>

@ -269,6 +269,11 @@
<artifactId>org.wso2.carbon.device.mgt.analytics.data.publisher</artifactId>
<version>${carbon.device.mgt.version}</version>
</dependency>
<dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.mgt.analytics.dashboard</artifactId>
<version>${carbon.device.mgt.version}</version>
</dependency>
<dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.mgt.server.feature</artifactId>

Loading…
Cancel
Save