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 223e6a5c46..2399c64a73 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 @@ -1,3 +1,10 @@ +{{#zone "topCss"}} + +{{/zone}} {{#zone "device-thumbnail"}} {{/zone}} 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 7a92326c7e..ea91e3177a 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 @@ -1,126 +1,73 @@ -{{unit "cdmf.unit.lib.service-invoker-utility"}} -{{unit "cdmf.unit.lib.handlebars"}} -{{#defineZone "device-detail-top"}} -
-
- -
+{{#zone "topCss"}} + +{{/zone}} + +{{#zone "device-thumbnail"}} + +{{/zone}} + +{{#zone "device-opetations"}} +
+ Operations +
+
+ {{unit "iot.unit.device.operation" device=device}}
-{{/defineZone}} +{{/zone}} - -
- -
-
-
-
-
-
- -
+{{#zone "device-detail-properties"}} +
+
+ +
+
Device Details
+ {{unit "iot.unit.device.stats" device=device}} +
+ +
+
Policy Compliance
+
+ -
-
Device Overview - Arduino
- {{#defineZone "device-detail-properties"}} - - - - - - {{#if device.viewModel.udid}} - - {{/if}} - - - - - -
Device{{device.viewModel.vendor}} {{device.properties.model}}
Model{{device.viewModel.model}}
IMEI{{device.viewModel.imei}}
UDID{{device.viewModel.udid}}
Status - {{#equal device.status "ACTIVE"}} Active{{/equal}} - {{#equal device.status "INACTIVE"}} Inactive{{/equal}} -
- {{/defineZone}} -
Operations
-
- {{unit "iot.unit.device.operation" device=device}} +
+
+ Not available yet
+
- -
- - {{#defineZone "device-detail-properties"}} -
-
- -
-
Device Details
- {{unit "iot.unit.device.stats" device=device}} -
- -
-
Policy Compliance
-
- -
-
- Not available yet -
-
-
-
-
-
-
Operations Log
-
- -
-
- Not available yet -
-
-
-
-
+
+
Operations Log
+
+ +
+
+ Not available yet
+
- {{/defineZone}} +
- -
- -{{#zone "bottomJs"}} - - - {{/zone}} \ No newline at end of file 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/public/js/device-detail.js 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/public/js/device-detail.js deleted file mode 100644 index 730a132be5..0000000000 --- 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/public/js/device-detail.js +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright (c) 2015, 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. - */ - -(function () { - var deviceId = $(".device-id"); - var deviceIdentifier = deviceId.data("deviceid"); - var deviceType = deviceId.data("type"); - var payload = [deviceIdentifier]; - var operationTable; - if (deviceType == "ios") { - var serviceUrl = "/ios/operation/deviceinfo"; - } else if (deviceType == "android") { - var serviceUrl = "/mdm-android-agent/operation/device-info"; - } - if(serviceUrl){ - invokerUtil.post(serviceUrl, payload, - function(message){ - console.log(message); - }, function (message) { - console.log(message); - }); - } - $(document).ready(function(){ - $(".panel-body").removeClass("hidden"); - $("#loading-content").remove(); - loadOperationBar(deviceType); - loadOperationsLog(); - loadApplicationsList(); - loadPolicyCompliance(); - - $("#refresh-policy").click(function () { - $('#policy-spinner').removeClass('hidden'); - loadPolicyCompliance(); - }); - - $("#refresh-apps").click(function () { - $('#apps-spinner').removeClass('hidden'); - loadApplicationsList(); - }); - - $("#refresh-operations").click(function () { - $('#operations-spinner').removeClass('hidden'); - loadOperationsLog(true); - }); - - }); - - function loadOperationsLog(update) { - var operationsLog = $("#operations-log"); - var deviceListingSrc = operationsLog.attr("src"); - var deviceId = operationsLog.data("device-id"); - var deviceType = operationsLog.data("device-type"); - - $.template("operations-log", deviceListingSrc, function (template) { - var serviceURL = "/devicemgt_admin/operations/"+deviceType+"/"+deviceId; - - var successCallback = function (data) { - data = JSON.parse(data); - $('#operations-spinner').addClass('hidden'); - var viewModel = {}; - viewModel.operations = data; - if(data.length > 0){ - var content = template(viewModel); - if(!update) { - $("#operations-log-container").html(content); - operationTable = $('#operations-log-table').datatables_extended(); - }else{ - $('#operations-log-table').dataTable().fnClearTable(); - for(var i=0; i < data.length; i++) { - var status; - if(data[i].status == "COMPLETED") { - status = " Completed"; - } else if(data[i].status == "PENDING") { - status = " Pending"; - } else if(data[i].status == "ERROR") { - status = " Error"; - } else if(data[i].status == "IN_PROGRESS") { - status = " In Progress"; - } - - $('#operations-log-table').dataTable().fnAddData([ - data[i].code, - status, - data[i].createdTimeStamp - ]); - } - } - } - - }; - invokerUtil.get(serviceURL, - successCallback, function(message){ - console.log(message); - }); - }); - - } - - function loadApplicationsList() { - var applicationsList = $("#applications-list"); - var deviceListingSrc = applicationsList.attr("src"); - var deviceId = applicationsList.data("device-id"); - var deviceType = applicationsList.data("device-type"); - - $.template("application-list", deviceListingSrc, function (template) { - var serviceURL = "/devicemgt_admin/operations/"+deviceType+"/"+deviceId+"/apps"; - - var successCallback = function (data) { - data = JSON.parse(data); - $('#apps-spinner').addClass('hidden'); - var viewModel = {}; - if(data != null && data.length > 0) { - for (var i = 0; i < data.length; i++) { - data[i].name = data[i].name.replace(/[^\w\s]/gi, ' '); - data[i].name = data[i].name.replace(/[0-9]/g, ' '); - } - } - viewModel.applications = data; - viewModel.deviceType = deviceType; - if(data.length > 0){ - var content = template(viewModel); - $("#applications-list-container").html(content); - } - - }; - invokerUtil.get(serviceURL, - successCallback, function(message){ - console.log(message); - }); - }); - } - - function loadPolicyCompliance() { - var policyCompliance = $("#policy-view"); - var policySrc = policyCompliance.attr("src"); - var deviceId = policyCompliance.data("device-id"); - var deviceType = policyCompliance.data("device-type"); - var activePolicy = null; - - $.template("policy-view", policySrc, function (template) { - var serviceURLPolicy ="/devicemgt_admin/policies/"+deviceType+"/"+deviceId+"/active-policy" - var serviceURLCompliance = "/devicemgt_admin/policies/"+deviceType+"/"+deviceId; - - var successCallbackCompliance = function (data) { - var viewModel = {}; - viewModel.policy = activePolicy; - viewModel.deviceType = deviceType; - if(data != null && data.complianceFeatures!= null && data.complianceFeatures != undefined && data.complianceFeatures.length > 0) { - viewModel.compliance = "NON-COMPLIANT"; - viewModel.complianceFeatures = data.complianceFeatures; - var content = template(viewModel); - $("#policy-list-container").html(content); - } else { - viewModel.compliance = "COMPLIANT"; - var content = template(viewModel); - $("#policy-list-container").html(content); - $("#policy-compliance-table").addClass("hidden"); - } - - }; - - var successCallbackPolicy = function (data) { - data = JSON.parse(data); - $('#policy-spinner').addClass('hidden'); - if(data != null && data.active == true){ - activePolicy = data; - invokerUtil.get(serviceURLCompliance, - successCallbackCompliance, function(message){ - console.log(message); - }); - } - }; - - invokerUtil.get(serviceURLPolicy, - successCallbackPolicy, function(message){ - console.log(message); - }); - }); - - } - -}()); 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/public/js/load-map.js 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/public/js/load-map.js deleted file mode 100644 index 92ae2d2d8d..0000000000 --- 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/public/js/load-map.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2015, 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. - */ - -$(document).ready(function(){ - if (document.getElementById('device-location')){ - loadMap(); - } -}); - -function loadMap() { - var map; - function initialize() { - var mapOptions = { - zoom: 18 - }; - var lat = $("#device-location").data("lat"); - var long = $("#device-location").data("long"); - - if(lat != null && lat != undefined && lat != "" && long != null && long != undefined && long != "") { - $("#map-error").hide(); - $("#device-location").show(); - map = new google.maps.Map(document.getElementById('device-location'), - mapOptions); - - var pos = new google.maps.LatLng(lat, - long); - var marker = new google.maps.Marker({ - position: pos, - map: map - }); - - map.setCenter(pos); - }else{ - $("#device-location").hide(); - $("#map-error").show(); - } - - } - google.maps.event.addDomListener(window, 'load', initialize); -} \ No newline at end of file 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/public/templates/applications-list.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/public/templates/applications-list.hbs deleted file mode 100644 index 8fba28621b..0000000000 --- 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/public/templates/applications-list.hbs +++ /dev/null @@ -1,12 +0,0 @@ - \ No newline at end of file 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/public/templates/operations-log.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/public/templates/operations-log.hbs deleted file mode 100644 index cc5db5117a..0000000000 --- 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/public/templates/operations-log.hbs +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - {{#each operations}} - - - - - - {{/each}} -
- -
Operation CodeStatusRequest created at
{{code}} - {{#equal status "COMPLETED"}} Completed{{/equal}} - {{#equal status "PENDING"}} Pending{{/equal}} - {{#equal status "ERROR"}} Error{{/equal}} - {{#equal status "IN_PROGRESS"}} In Progress{{/equal}} - {{createdTimeStamp}}
\ No newline at end of file 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/public/templates/policy-compliance.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/public/templates/policy-compliance.hbs deleted file mode 100644 index 6dabda7870..0000000000 --- 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/public/templates/policy-compliance.hbs +++ /dev/null @@ -1,79 +0,0 @@ -
- -
-
- - {{#equal deviceType "android"}} - - {{/equal}} - {{#equal deviceType "ios"}} - - {{/equal}} - {{#equal deviceType "windows"}} - - {{/equal}} - - -

{{policy.policyName}}

- {{deviceType}} -
-
-
-
-
-
- Ownership Type : {{policy.ownershipType}} -
-
-
-
- Compliance Type : {{policy.compliance}} -
-
-
-
- Compliance : - {{#equal compliance "COMPLIANT"}} - Compliant - {{/equal}} - {{#equal compliance "NON-COMPLIANT"}} - Not Compliant - {{/equal}} -
-
-
-
- -
-
-
- - - - - - - - - {{#each complianceFeatures}} - - - - - {{/each}} -
- -
FeatureCompliance
{{featureCode}} - {{#equal compliance true}} Compliant{{/equal}} - {{#equal compliance false}} Not Compliant{{/equal}} -
\ No newline at end of file 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 0c3a0c125d..86d043bfad 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 @@ -1,6 +1,15 @@ +{{#zone "topCss"}} + +{{/zone}} + {{#zone "device-thumbnail"}} {{/zone}} + {{#zone "device-opetations"}}
Operations @@ -9,6 +18,7 @@ {{unit "iot.unit.device.operation" device=device}}
{{/zone}} + {{#zone "device-detail-properties"}}
diff --git a/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/device-view.hbs b/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/device-view.hbs index 307db53e2d..9bb42928b5 100644 --- a/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/device-view.hbs +++ b/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/device-view.hbs @@ -1,170 +1,73 @@ -{{unit "cdmf.unit.lib.service-invoker-utility"}} -{{unit "cdmf.unit.lib.handlebars"}} -{{#defineZone "device-detail-top"}} -
-
- -
+{{#zone "topCss"}} + +{{/zone}} + +{{#zone "device-thumbnail"}} + +{{/zone}} + +{{#zone "device-opetations"}} +
+ Operations +
+
+ {{unit "iot.unit.device.operation" device=device}}
-{{/defineZone}} +{{/zone}} - -
- -
-
-
-
-
-
- -
+{{#zone "device-detail-properties"}} +
+
+ +
+
Device Details
+ {{unit "iot.unit.device.stats" device=device}} +
+ +
+
Policy Compliance
+
+ -
-
Device Overview - Virtual Firealarm
- {{#defineZone "device-detail-properties"}} - - - - - - {{#if device.viewModel.udid}} - - {{/if}} - {{#if device.viewModel.phoneNumber}} - - {{/if}} - - - - - -
Device{{device.viewModel.vendor}} {{device.properties.model}}
Model{{device.viewModel.model}}
IMEI{{device.viewModel.imei}}
UDID{{device.viewModel.udid}}
Phone Number{{device.viewModel.phoneNumber}}
Status - {{#equal device.status "ACTIVE"}} Active{{/equal}} - {{#equal device.status "INACTIVE"}} Inactive{{/equal}} - {{#equal device.status "BLOCKED"}} Blocked{{/equal}} - {{#equal device.status "REMOVED"}} Removed{{/equal}} -
- {{/defineZone}} -
Operations
-
- {{unit "iot.unit.device.operation" device=device}} +
+
+ Not available yet
+
- -
- - {{#defineZone "device-detail-properties"}} -
-
- -
-
Device Details
- {{unit "iot.unit.device.stats" device=device}} -
- -
-
Policy Compliance
-
- -
-
- Not available yet -
-
-
-
-
-
-
Device Location
-
-
- -
-
- Not available yet -
-
-
-
-
-
Installed Applications
-
- -
-
- Not available yet -
-
-
-
-
-
-
Operations Log
-
- -
-
- Not available yet -
-
-
-
-
+
+
Operations Log
+
+ +
+
+ Not available yet
+
- {{/defineZone}} +
- -
- -{{#zone "bottomJs"}} - - - - {{js "js/device-detail.js"}} - - {{js "js/load-map.js"}} {{/zone}} \ No newline at end of file diff --git a/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 b/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 deleted file mode 100644 index 730a132be5..0000000000 --- a/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 +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright (c) 2015, 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. - */ - -(function () { - var deviceId = $(".device-id"); - var deviceIdentifier = deviceId.data("deviceid"); - var deviceType = deviceId.data("type"); - var payload = [deviceIdentifier]; - var operationTable; - if (deviceType == "ios") { - var serviceUrl = "/ios/operation/deviceinfo"; - } else if (deviceType == "android") { - var serviceUrl = "/mdm-android-agent/operation/device-info"; - } - if(serviceUrl){ - invokerUtil.post(serviceUrl, payload, - function(message){ - console.log(message); - }, function (message) { - console.log(message); - }); - } - $(document).ready(function(){ - $(".panel-body").removeClass("hidden"); - $("#loading-content").remove(); - loadOperationBar(deviceType); - loadOperationsLog(); - loadApplicationsList(); - loadPolicyCompliance(); - - $("#refresh-policy").click(function () { - $('#policy-spinner').removeClass('hidden'); - loadPolicyCompliance(); - }); - - $("#refresh-apps").click(function () { - $('#apps-spinner').removeClass('hidden'); - loadApplicationsList(); - }); - - $("#refresh-operations").click(function () { - $('#operations-spinner').removeClass('hidden'); - loadOperationsLog(true); - }); - - }); - - function loadOperationsLog(update) { - var operationsLog = $("#operations-log"); - var deviceListingSrc = operationsLog.attr("src"); - var deviceId = operationsLog.data("device-id"); - var deviceType = operationsLog.data("device-type"); - - $.template("operations-log", deviceListingSrc, function (template) { - var serviceURL = "/devicemgt_admin/operations/"+deviceType+"/"+deviceId; - - var successCallback = function (data) { - data = JSON.parse(data); - $('#operations-spinner').addClass('hidden'); - var viewModel = {}; - viewModel.operations = data; - if(data.length > 0){ - var content = template(viewModel); - if(!update) { - $("#operations-log-container").html(content); - operationTable = $('#operations-log-table').datatables_extended(); - }else{ - $('#operations-log-table').dataTable().fnClearTable(); - for(var i=0; i < data.length; i++) { - var status; - if(data[i].status == "COMPLETED") { - status = " Completed"; - } else if(data[i].status == "PENDING") { - status = " Pending"; - } else if(data[i].status == "ERROR") { - status = " Error"; - } else if(data[i].status == "IN_PROGRESS") { - status = " In Progress"; - } - - $('#operations-log-table').dataTable().fnAddData([ - data[i].code, - status, - data[i].createdTimeStamp - ]); - } - } - } - - }; - invokerUtil.get(serviceURL, - successCallback, function(message){ - console.log(message); - }); - }); - - } - - function loadApplicationsList() { - var applicationsList = $("#applications-list"); - var deviceListingSrc = applicationsList.attr("src"); - var deviceId = applicationsList.data("device-id"); - var deviceType = applicationsList.data("device-type"); - - $.template("application-list", deviceListingSrc, function (template) { - var serviceURL = "/devicemgt_admin/operations/"+deviceType+"/"+deviceId+"/apps"; - - var successCallback = function (data) { - data = JSON.parse(data); - $('#apps-spinner').addClass('hidden'); - var viewModel = {}; - if(data != null && data.length > 0) { - for (var i = 0; i < data.length; i++) { - data[i].name = data[i].name.replace(/[^\w\s]/gi, ' '); - data[i].name = data[i].name.replace(/[0-9]/g, ' '); - } - } - viewModel.applications = data; - viewModel.deviceType = deviceType; - if(data.length > 0){ - var content = template(viewModel); - $("#applications-list-container").html(content); - } - - }; - invokerUtil.get(serviceURL, - successCallback, function(message){ - console.log(message); - }); - }); - } - - function loadPolicyCompliance() { - var policyCompliance = $("#policy-view"); - var policySrc = policyCompliance.attr("src"); - var deviceId = policyCompliance.data("device-id"); - var deviceType = policyCompliance.data("device-type"); - var activePolicy = null; - - $.template("policy-view", policySrc, function (template) { - var serviceURLPolicy ="/devicemgt_admin/policies/"+deviceType+"/"+deviceId+"/active-policy" - var serviceURLCompliance = "/devicemgt_admin/policies/"+deviceType+"/"+deviceId; - - var successCallbackCompliance = function (data) { - var viewModel = {}; - viewModel.policy = activePolicy; - viewModel.deviceType = deviceType; - if(data != null && data.complianceFeatures!= null && data.complianceFeatures != undefined && data.complianceFeatures.length > 0) { - viewModel.compliance = "NON-COMPLIANT"; - viewModel.complianceFeatures = data.complianceFeatures; - var content = template(viewModel); - $("#policy-list-container").html(content); - } else { - viewModel.compliance = "COMPLIANT"; - var content = template(viewModel); - $("#policy-list-container").html(content); - $("#policy-compliance-table").addClass("hidden"); - } - - }; - - var successCallbackPolicy = function (data) { - data = JSON.parse(data); - $('#policy-spinner').addClass('hidden'); - if(data != null && data.active == true){ - activePolicy = data; - invokerUtil.get(serviceURLCompliance, - successCallbackCompliance, function(message){ - console.log(message); - }); - } - }; - - invokerUtil.get(serviceURLPolicy, - successCallbackPolicy, function(message){ - console.log(message); - }); - }); - - } - -}()); diff --git a/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 b/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 deleted file mode 100644 index 92ae2d2d8d..0000000000 --- a/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 +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2015, 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. - */ - -$(document).ready(function(){ - if (document.getElementById('device-location')){ - loadMap(); - } -}); - -function loadMap() { - var map; - function initialize() { - var mapOptions = { - zoom: 18 - }; - var lat = $("#device-location").data("lat"); - var long = $("#device-location").data("long"); - - if(lat != null && lat != undefined && lat != "" && long != null && long != undefined && long != "") { - $("#map-error").hide(); - $("#device-location").show(); - map = new google.maps.Map(document.getElementById('device-location'), - mapOptions); - - var pos = new google.maps.LatLng(lat, - long); - var marker = new google.maps.Marker({ - position: pos, - map: map - }); - - map.setCenter(pos); - }else{ - $("#device-location").hide(); - $("#map-error").show(); - } - - } - google.maps.event.addDomListener(window, 'load', initialize); -} \ No newline at end of file diff --git a/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 b/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 deleted file mode 100644 index 8fba28621b..0000000000 --- a/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 +++ /dev/null @@ -1,12 +0,0 @@ - \ No newline at end of file diff --git a/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 b/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 deleted file mode 100644 index cc5db5117a..0000000000 --- a/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 +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - {{#each operations}} - - - - - - {{/each}} -
- -
Operation CodeStatusRequest created at
{{code}} - {{#equal status "COMPLETED"}} Completed{{/equal}} - {{#equal status "PENDING"}} Pending{{/equal}} - {{#equal status "ERROR"}} Error{{/equal}} - {{#equal status "IN_PROGRESS"}} In Progress{{/equal}} - {{createdTimeStamp}}
\ No newline at end of file diff --git a/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 b/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 deleted file mode 100644 index 6dabda7870..0000000000 --- a/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 +++ /dev/null @@ -1,79 +0,0 @@ -
- -
-
- - {{#equal deviceType "android"}} - - {{/equal}} - {{#equal deviceType "ios"}} - - {{/equal}} - {{#equal deviceType "windows"}} - - {{/equal}} - - -

{{policy.policyName}}

- {{deviceType}} -
-
-
-
-
-
- Ownership Type : {{policy.ownershipType}} -
-
-
-
- Compliance Type : {{policy.compliance}} -
-
-
-
- Compliance : - {{#equal compliance "COMPLIANT"}} - Compliant - {{/equal}} - {{#equal compliance "NON-COMPLIANT"}} - Not Compliant - {{/equal}} -
-
-
-
- -
-
-
- - - - - - - - - {{#each complianceFeatures}} - - - - - {{/each}} -
- -
FeatureCompliance
{{featureCode}} - {{#equal compliance true}} Compliant{{/equal}} - {{#equal compliance false}} Not Compliant{{/equal}} -
\ No newline at end of file diff --git a/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.stats/public/js/device-stats.js b/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.stats/public/js/device-stats.js index ed740483bd..bd48b9f8e1 100644 --- a/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.stats/public/js/device-stats.js +++ b/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.stats/public/js/device-stats.js @@ -24,16 +24,19 @@ var deviceId = $(".device-id").data("deviceid"); var monitor_operations = $("#details").data("monitor"); var appContext = $("#details").data("appcontext"); -var marker_1 = appContext +'/public/iot.unit.device.stats/images/map-marker-1.png'; +var marker_1 = appContext + '/public/iot.unit.device.stats/images/map-marker-1.png'; var marker_2 = appContext + '/public/iot.unit.device.stats/images/map-marker-2.png'; var map; var mapPoints = [], mapPaths = [], mapMarkers = []; + function initMap() { - map = new google.maps.Map(document.getElementById('map'), { - center: {lat: 6.9344, lng: 79.8428}, - zoom: 12 - }); + if ($('#map').length) { + map = new google.maps.Map(document.getElementById('map'), { + center: {lat: 6.9344, lng: 79.8428}, + zoom: 12 + }); + } } function formatDates() { @@ -122,7 +125,7 @@ function updateGraphs() { var graphVals = {}; for (var s in stats) { var val = stats[s]; - if (!val){ + if (!val) { continue; } if (val.time > lastUpdate) { @@ -141,7 +144,7 @@ function updateGraphs() { map.panTo(val.map); mapMarkers.push(marker); - if (mapPoints.length > 1 ){ + if (mapPoints.length > 1) { var l = mapPoints.length; var path = new google.maps.Polyline({ path: [mapPoints[l - 1], mapPoints[l - 2]], @@ -157,7 +160,7 @@ function updateGraphs() { mapMarkers[l - 2].setIcon(marker_2); } - if (mapPoints.length >= 10){ + if (mapPoints.length >= 10) { mapMarkers[0].setMap(null); mapMarkers.splice(0, 1); @@ -174,7 +177,7 @@ function updateGraphs() { } graph.series.addData(graphVals); - if (lastUpdate == -1){ + if (lastUpdate == -1) { $('#last_seen').text("Not seen recently"); } diff --git a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/device-view.hbs b/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/device-view.hbs index 5ada9d825d..78920e71bc 100644 --- a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/device-view.hbs +++ b/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/device-view.hbs @@ -1,126 +1,73 @@ -{{unit "cdmf.unit.lib.service-invoker-utility"}} -{{unit "cdmf.unit.lib.handlebars"}} -{{#defineZone "device-detail-top"}} -
-
- -
+{{#zone "topCss"}} + +{{/zone}} + +{{#zone "device-thumbnail"}} + +{{/zone}} + +{{#zone "device-opetations"}} +
+ Operations +
+
+ {{unit "iot.unit.device.operation" device=device}}
-{{/defineZone}} +{{/zone}} - -
- -
-
-
-
-
-
- -
+{{#zone "device-detail-properties"}} +
+
+ +
+
Device Details
+ {{unit "iot.unit.device.stats" device=device}} +
+ +
+
Policy Compliance
+
+ -
-
Device Overview - RaspberryPi
- {{#defineZone "device-detail-properties"}} - - - - - - {{#if device.viewModel.udid}} - - {{/if}} - - - - - -
Device{{device.viewModel.vendor}} {{device.properties.model}}
Model{{device.viewModel.model}}
IMEI{{device.viewModel.imei}}
UDID{{device.viewModel.udid}}
Status - {{#equal device.status "ACTIVE"}} Active{{/equal}} - {{#equal device.status "INACTIVE"}} Inactive{{/equal}} -
- {{/defineZone}} -
Operations
-
- {{unit "iot.unit.device.operation" device=device}} +
+
+ Not available yet
+
- -
- - {{#defineZone "device-detail-properties"}} -
-
- -
-
Device Details
- {{unit "iot.unit.device.stats" device=device}} -
- -
-
Policy Compliance
-
- -
-
- Not available yet -
-
-
-
-
-
-
Operations Log
-
- -
-
- Not available yet -
-
-
-
-
+
+
Operations Log
+
+ +
+
+ Not available yet
+
- {{/defineZone}} +
- -
- -{{#zone "bottomJs"}} - - - {{/zone}} \ No newline at end of file diff --git a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/public/js/device-detail.js b/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/public/js/device-detail.js deleted file mode 100644 index 730a132be5..0000000000 --- a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/public/js/device-detail.js +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright (c) 2015, 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. - */ - -(function () { - var deviceId = $(".device-id"); - var deviceIdentifier = deviceId.data("deviceid"); - var deviceType = deviceId.data("type"); - var payload = [deviceIdentifier]; - var operationTable; - if (deviceType == "ios") { - var serviceUrl = "/ios/operation/deviceinfo"; - } else if (deviceType == "android") { - var serviceUrl = "/mdm-android-agent/operation/device-info"; - } - if(serviceUrl){ - invokerUtil.post(serviceUrl, payload, - function(message){ - console.log(message); - }, function (message) { - console.log(message); - }); - } - $(document).ready(function(){ - $(".panel-body").removeClass("hidden"); - $("#loading-content").remove(); - loadOperationBar(deviceType); - loadOperationsLog(); - loadApplicationsList(); - loadPolicyCompliance(); - - $("#refresh-policy").click(function () { - $('#policy-spinner').removeClass('hidden'); - loadPolicyCompliance(); - }); - - $("#refresh-apps").click(function () { - $('#apps-spinner').removeClass('hidden'); - loadApplicationsList(); - }); - - $("#refresh-operations").click(function () { - $('#operations-spinner').removeClass('hidden'); - loadOperationsLog(true); - }); - - }); - - function loadOperationsLog(update) { - var operationsLog = $("#operations-log"); - var deviceListingSrc = operationsLog.attr("src"); - var deviceId = operationsLog.data("device-id"); - var deviceType = operationsLog.data("device-type"); - - $.template("operations-log", deviceListingSrc, function (template) { - var serviceURL = "/devicemgt_admin/operations/"+deviceType+"/"+deviceId; - - var successCallback = function (data) { - data = JSON.parse(data); - $('#operations-spinner').addClass('hidden'); - var viewModel = {}; - viewModel.operations = data; - if(data.length > 0){ - var content = template(viewModel); - if(!update) { - $("#operations-log-container").html(content); - operationTable = $('#operations-log-table').datatables_extended(); - }else{ - $('#operations-log-table').dataTable().fnClearTable(); - for(var i=0; i < data.length; i++) { - var status; - if(data[i].status == "COMPLETED") { - status = " Completed"; - } else if(data[i].status == "PENDING") { - status = " Pending"; - } else if(data[i].status == "ERROR") { - status = " Error"; - } else if(data[i].status == "IN_PROGRESS") { - status = " In Progress"; - } - - $('#operations-log-table').dataTable().fnAddData([ - data[i].code, - status, - data[i].createdTimeStamp - ]); - } - } - } - - }; - invokerUtil.get(serviceURL, - successCallback, function(message){ - console.log(message); - }); - }); - - } - - function loadApplicationsList() { - var applicationsList = $("#applications-list"); - var deviceListingSrc = applicationsList.attr("src"); - var deviceId = applicationsList.data("device-id"); - var deviceType = applicationsList.data("device-type"); - - $.template("application-list", deviceListingSrc, function (template) { - var serviceURL = "/devicemgt_admin/operations/"+deviceType+"/"+deviceId+"/apps"; - - var successCallback = function (data) { - data = JSON.parse(data); - $('#apps-spinner').addClass('hidden'); - var viewModel = {}; - if(data != null && data.length > 0) { - for (var i = 0; i < data.length; i++) { - data[i].name = data[i].name.replace(/[^\w\s]/gi, ' '); - data[i].name = data[i].name.replace(/[0-9]/g, ' '); - } - } - viewModel.applications = data; - viewModel.deviceType = deviceType; - if(data.length > 0){ - var content = template(viewModel); - $("#applications-list-container").html(content); - } - - }; - invokerUtil.get(serviceURL, - successCallback, function(message){ - console.log(message); - }); - }); - } - - function loadPolicyCompliance() { - var policyCompliance = $("#policy-view"); - var policySrc = policyCompliance.attr("src"); - var deviceId = policyCompliance.data("device-id"); - var deviceType = policyCompliance.data("device-type"); - var activePolicy = null; - - $.template("policy-view", policySrc, function (template) { - var serviceURLPolicy ="/devicemgt_admin/policies/"+deviceType+"/"+deviceId+"/active-policy" - var serviceURLCompliance = "/devicemgt_admin/policies/"+deviceType+"/"+deviceId; - - var successCallbackCompliance = function (data) { - var viewModel = {}; - viewModel.policy = activePolicy; - viewModel.deviceType = deviceType; - if(data != null && data.complianceFeatures!= null && data.complianceFeatures != undefined && data.complianceFeatures.length > 0) { - viewModel.compliance = "NON-COMPLIANT"; - viewModel.complianceFeatures = data.complianceFeatures; - var content = template(viewModel); - $("#policy-list-container").html(content); - } else { - viewModel.compliance = "COMPLIANT"; - var content = template(viewModel); - $("#policy-list-container").html(content); - $("#policy-compliance-table").addClass("hidden"); - } - - }; - - var successCallbackPolicy = function (data) { - data = JSON.parse(data); - $('#policy-spinner').addClass('hidden'); - if(data != null && data.active == true){ - activePolicy = data; - invokerUtil.get(serviceURLCompliance, - successCallbackCompliance, function(message){ - console.log(message); - }); - } - }; - - invokerUtil.get(serviceURLPolicy, - successCallbackPolicy, function(message){ - console.log(message); - }); - }); - - } - -}()); diff --git a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/public/js/load-map.js b/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/public/js/load-map.js deleted file mode 100644 index 92ae2d2d8d..0000000000 --- a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/public/js/load-map.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2015, 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. - */ - -$(document).ready(function(){ - if (document.getElementById('device-location')){ - loadMap(); - } -}); - -function loadMap() { - var map; - function initialize() { - var mapOptions = { - zoom: 18 - }; - var lat = $("#device-location").data("lat"); - var long = $("#device-location").data("long"); - - if(lat != null && lat != undefined && lat != "" && long != null && long != undefined && long != "") { - $("#map-error").hide(); - $("#device-location").show(); - map = new google.maps.Map(document.getElementById('device-location'), - mapOptions); - - var pos = new google.maps.LatLng(lat, - long); - var marker = new google.maps.Marker({ - position: pos, - map: map - }); - - map.setCenter(pos); - }else{ - $("#device-location").hide(); - $("#map-error").show(); - } - - } - google.maps.event.addDomListener(window, 'load', initialize); -} \ No newline at end of file diff --git a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/public/templates/applications-list.hbs b/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/public/templates/applications-list.hbs deleted file mode 100644 index 8fba28621b..0000000000 --- a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/public/templates/applications-list.hbs +++ /dev/null @@ -1,12 +0,0 @@ - \ No newline at end of file diff --git a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/public/templates/operations-log.hbs b/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/public/templates/operations-log.hbs deleted file mode 100644 index cc5db5117a..0000000000 --- a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/public/templates/operations-log.hbs +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - {{#each operations}} - - - - - - {{/each}} -
- -
Operation CodeStatusRequest created at
{{code}} - {{#equal status "COMPLETED"}} Completed{{/equal}} - {{#equal status "PENDING"}} Pending{{/equal}} - {{#equal status "ERROR"}} Error{{/equal}} - {{#equal status "IN_PROGRESS"}} In Progress{{/equal}} - {{createdTimeStamp}}
\ No newline at end of file diff --git a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/public/templates/policy-compliance.hbs b/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/public/templates/policy-compliance.hbs deleted file mode 100644 index 6dabda7870..0000000000 --- a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/public/templates/policy-compliance.hbs +++ /dev/null @@ -1,79 +0,0 @@ -
- -
-
- - {{#equal deviceType "android"}} - - {{/equal}} - {{#equal deviceType "ios"}} - - {{/equal}} - {{#equal deviceType "windows"}} - - {{/equal}} - - -

{{policy.policyName}}

- {{deviceType}} -
-
-
-
-
-
- Ownership Type : {{policy.ownershipType}} -
-
-
-
- Compliance Type : {{policy.compliance}} -
-
-
-
- Compliance : - {{#equal compliance "COMPLIANT"}} - Compliant - {{/equal}} - {{#equal compliance "NON-COMPLIANT"}} - Not Compliant - {{/equal}} -
-
-
-
- -
-
-
- - - - - - - - - {{#each complianceFeatures}} - - - - - {{/each}} -
- -
FeatureCompliance
{{featureCode}} - {{#equal compliance true}} Compliant{{/equal}} - {{#equal compliance false}} Not Compliant{{/equal}} -
\ No newline at end of file diff --git a/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.device-view/device-view.hbs b/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.device-view/device-view.hbs index 001e444156..fb86bb29e8 100644 --- a/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.device-view/device-view.hbs +++ b/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.device-view/device-view.hbs @@ -1,6 +1,15 @@ +{{#zone "topCss"}} + +{{/zone}} + {{#zone "device-thumbnail"}} {{/zone}} + {{#zone "device-opetations"}}
Operations @@ -9,6 +18,7 @@ {{unit "iot.unit.device.operation" device=device}}
{{/zone}} + {{#zone "device-detail-properties"}}