From e46fdc0f951a324bbaa497f6e861ea90645dd628 Mon Sep 17 00:00:00 2001 From: charithag Date: Fri, 22 Jan 2016 18:57:55 +0530 Subject: [PATCH] Add policy specific functionality --- .../iot/service/ConfigurationServiceImpl.java | 7 +- .../device-view.hbs | 22 +- .../device-view.hbs | 22 +- .../device-view.hbs | 22 +- .../device-view.hbs | 22 +- .../public/js/device-detail.js | 197 ------------------ .../public/js/load-map.js | 55 ----- .../public/templates/applications-list.hbs | 12 -- .../public/templates/operations-log.hbs | 24 --- .../public/templates/policy-compliance.hbs | 79 ------- .../app/units/iot.unit.policy.edit/edit.hbs | 2 +- .../public/js/policy-create.js | 10 +- .../units/iot.unit.policy.wizard/wizard.hbs | 4 +- .../device-view.hbs | 22 +- .../device-view.hbs | 22 +- .../device-view.hbs | 32 ++- .../public/js/device-detail.js | 149 ++----------- .../app/units/mdm.unit.policy.edit/edit.hbs | 2 +- .../units/mdm.unit.policy.wizard/wizard.hbs | 4 +- 19 files changed, 143 insertions(+), 566 deletions(-) delete mode 100644 features/device-mgt-iot-droneanalyzer-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.drone_analyzer.device-view/public/js/device-detail.js delete mode 100644 features/device-mgt-iot-droneanalyzer-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.drone_analyzer.device-view/public/js/load-map.js delete mode 100644 features/device-mgt-iot-droneanalyzer-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.drone_analyzer.device-view/public/templates/applications-list.hbs delete mode 100644 features/device-mgt-iot-droneanalyzer-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.drone_analyzer.device-view/public/templates/operations-log.hbs delete mode 100644 features/device-mgt-iot-droneanalyzer-feature/org.wso2.carbon.device.mgt.iot.droneanalyzer.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.drone_analyzer.device-view/public/templates/policy-compliance.hbs diff --git a/components/device-mgt-iot/org.wso2.carbon.device.mgt.iot/src/main/java/org/wso2/carbon/device/mgt/iot/service/ConfigurationServiceImpl.java b/components/device-mgt-iot/org.wso2.carbon.device.mgt.iot/src/main/java/org/wso2/carbon/device/mgt/iot/service/ConfigurationServiceImpl.java index 3b3322f30d..8925117a98 100644 --- a/components/device-mgt-iot/org.wso2.carbon.device.mgt.iot/src/main/java/org/wso2/carbon/device/mgt/iot/service/ConfigurationServiceImpl.java +++ b/components/device-mgt-iot/org.wso2.carbon.device.mgt.iot/src/main/java/org/wso2/carbon/device/mgt/iot/service/ConfigurationServiceImpl.java @@ -18,6 +18,7 @@ package org.wso2.carbon.device.mgt.iot.service; +import org.wso2.carbon.device.mgt.iot.config.server.DeviceManagementConfigurationManager; import org.wso2.carbon.device.mgt.iot.config.server.datasource.ControlQueue; import org.wso2.carbon.device.mgt.iot.config.server.datasource.DeviceManagementConfiguration; import org.wso2.carbon.device.mgt.iot.config.server.datasource.DeviceMgtServerInfo; @@ -26,16 +27,16 @@ public class ConfigurationServiceImpl implements ConfigurationService { @Override public DeviceManagementConfiguration getDeviceCloudMgtConfig() { - return null; + return DeviceManagementConfigurationManager.getInstance().getDeviceCloudMgtConfig(); } @Override public ControlQueue getControlQueue(String name) { - return null; + return DeviceManagementConfigurationManager.getInstance().getControlQueue(name); } @Override public DeviceMgtServerInfo getDeviceManagementServerInfo() { - return null; + return DeviceManagementConfigurationManager.getInstance().getDeviceManagementServerInfo(); } } diff --git a/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.hbs b/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.hbs index cbea9cfbe6..6220c96528 100644 --- a/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.hbs +++ b/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.hbs @@ -20,8 +20,8 @@ data-toggle="tab" aria-controls="device_statistics">Device Statistics -
  • Policy Compliance +
  • Policies
  • Device Location
  • @@ -38,28 +38,32 @@ {{unit "iot.unit.device.stats" device=device}} -
    -
    Policy Compliance
    +
    +
    Policies
    - Not available yet + No policies found

    + + + + + Add device specific policy
    diff --git a/features/device-mgt-iot-arduino-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.device-view/device-view.hbs b/features/device-mgt-iot-arduino-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.device-view/device-view.hbs index 48f2bc2d9b..5d30451bfa 100644 --- a/features/device-mgt-iot-arduino-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.device-view/device-view.hbs +++ b/features/device-mgt-iot-arduino-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.device-view/device-view.hbs @@ -27,8 +27,8 @@ data-toggle="tab" aria-controls="device_statistics">Device Statistics -
  • Policy Compliance +
  • Policies
  • Operations Log
  • @@ -43,28 +43,32 @@ {{unit "iot.unit.device.stats" device=device}}
    -
    -
    Policy Compliance
    +
    +
    Policies
    - Not available yet + No policies found

    + + + + + Add device specific policy
    diff --git a/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.digital_display.device-view/device-view.hbs b/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.digital_display.device-view/device-view.hbs index c31f884e4b..5f582f5dae 100644 --- a/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.digital_display.device-view/device-view.hbs +++ b/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.digital_display.device-view/device-view.hbs @@ -23,8 +23,8 @@