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 2d3127332c..53b2c22474 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,118 +1,101 @@ -{{unit "cdmf.unit.lib.service-invoker-utility"}} -{{unit "cdmf.unit.lib.handlebars"}} -{{#defineZone "device-detail-top"}} -
-
- +{{#zone "device-thumbnail"}} + +{{/zone}} + +{{#zone "device-opetations"}} +{{/zone}} + +{{#zone "device-detail-properties"}} + -{{/defineZone}} +
+
+ +
+
Device Statistics
+ {{unit "iot.unit.device.stats" device=device}} +
- -
- -
-
-
-
-
-
- +
+
Policy Compliance
+
+ -
-
-
Device Overview - Android Sense
-
Operations
-
- {{unit "iot.unit.device.operation" device=device}} +
+
+ Not available yet +
+
-
- -
-
- +
+
Device Location
+
+
+
+
+ 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 -
-
-
-
-
-
Operations Log
-
- -
-
- Not available yet -
-
-
-
+
+
Operations Log
+
+ +
+
+ Not available yet
+
- {{/defineZone}} +
- -
+{{/zone}} {{#zone "bottomJs"}} - - - + {{/zone}} \ No newline at end of file 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/public/js/device-detail.js 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/public/js/device-detail.js deleted file mode 100644 index 21f05a9026..0000000000 --- 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/public/js/device-detail.js +++ /dev/null @@ -1,185 +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; - - $(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-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/public/js/load-map.js 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/public/js/load-map.js deleted file mode 100644 index 92ae2d2d8d..0000000000 --- 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/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-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/public/templates/applications-list.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/public/templates/applications-list.hbs deleted file mode 100644 index 8fba28621b..0000000000 --- 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/public/templates/applications-list.hbs +++ /dev/null @@ -1,12 +0,0 @@ - \ No newline at end of file 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/public/templates/operations-log.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/public/templates/operations-log.hbs deleted file mode 100644 index cc5db5117a..0000000000 --- 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/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-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/public/templates/policy-compliance.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/public/templates/policy-compliance.hbs deleted file mode 100644 index 6dabda7870..0000000000 --- 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/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 6dbc983b7d..0576f600ed 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,129 +1,75 @@ -{{unit "cdmf.unit.lib.service-invoker-utility"}} -{{unit "cdmf.unit.lib.handlebars"}} -{{#defineZone "device-detail-top"}} -
-
- -
+{{#zone "device-thumbnail"}} + +{{/zone}} +{{#zone "device-opetations"}} +
+ Operations +
+
+ {{unit "iot.unit.device.operation" device=device}}
-{{/defineZone}} +{{/zone}} +{{#zone "device-detail-properties"}} +
+ +
+
- -
- -
-
-
-
-
-
- +
+
Policy Compliance
+
+ -
-
-
Device Overview - Digital Display
- {{#defineZone "device-detail-properties"}} - - - - - - - -
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
+
+
Operations Log
+
+ - -
-
Policy Compliance
+
- -
-
- Not available yet -
-
-
-
-
-
-
Device Location
-
-
-
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-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/public/js/device-detail.js 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/public/js/device-detail.js deleted file mode 100644 index 730a132be5..0000000000 --- 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/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-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/public/js/load-map.js 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/public/js/load-map.js deleted file mode 100644 index 92ae2d2d8d..0000000000 --- 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/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-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/public/templates/applications-list.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/public/templates/applications-list.hbs deleted file mode 100644 index 8fba28621b..0000000000 --- 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/public/templates/applications-list.hbs +++ /dev/null @@ -1,12 +0,0 @@ - \ 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/public/templates/operations-log.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/public/templates/operations-log.hbs deleted file mode 100644 index cc5db5117a..0000000000 --- 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/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-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/public/templates/policy-compliance.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/public/templates/policy-compliance.hbs deleted file mode 100644 index 6dabda7870..0000000000 --- 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/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.operation/operation.hbs b/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.operation/operation.hbs index 03359b2afa..dbc53dea0a 100644 --- a/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.operation/operation.hbs +++ b/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.operation/operation.hbs @@ -1,38 +1,18 @@ -
- -
-
- {{#if control_operations}} - {{#each control_operations}} -
-
-
- - - - - - -
-
-
- {{/each}} - {{/if}} -
-
-
\ No newline at end of file +{{#if control_operations}} + {{#each control_operations}} +
+ + + + + + +
+ {{/each}} +{{/if}} 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.operation/operation.js b/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.operation/operation.js index 47e5aff43d..2345998dac 100644 --- a/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.operation/operation.js +++ b/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.operation/operation.js @@ -1,6 +1,8 @@ function onRequest(context) { + var log = new Log("operation.js"); var operationModule = require("/app/modules/operation.js").operationModule; var device = context.unit.params.device; + log.info(device); var control_operations = operationModule.getControlOperations(device.type); return {"control_operations": control_operations, "device": device}; } \ 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/stats.hbs b/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.stats/stats.hbs index 1e307afadf..c72fe51767 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/stats.hbs +++ b/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.stats/stats.hbs @@ -1,51 +1,25 @@ {{#zone "topCss"}} {{css "css/graph.css"}} {{/zone}} - - -
- {{#zone "bottomJs"}} - {{js "js/d3.min.js"}} {{js "js/rickshaw.min.js"}} {{js "js/device-stats.js"}} 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/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/stats.js index 95db4155c0..253ce0b052 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/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/stats.js @@ -2,7 +2,6 @@ function onRequest(context) { var log = new Log("stats.js"); var operationModule = require("/app/modules/operation.js").operationModule; var device = context.unit.params.device; - log.info(device); var monitor_operations = JSON.stringify(operationModule.getMonitorOperations(device.type)); return {"monitor_operations": monitor_operations, "device": device}; } \ 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 243423e58c..3ee0e624e6 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,170 +1,91 @@ -{{unit "cdmf.unit.lib.service-invoker-utility"}} -{{unit "cdmf.unit.lib.handlebars"}} -{{#defineZone "device-detail-top"}} -
-
- -
+{{#zone "device-thumbnail"}} + +{{/zone}} +{{#zone "device-opetations"}} +
+ Operations +
+
+ {{unit "iot.unit.device.operation" device=device}}
-{{/defineZone}} +{{/zone}} +{{#zone "device-detail-properties"}} +
+ +
+
+ +
+
Device Statistics
+ {{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}} {{#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-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.js 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.js index fc980ac4f9..1671477e70 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.js +++ 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.js @@ -6,7 +6,7 @@ function onRequest(context) { if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) { var deviceModule = require("/app/modules/device.js").deviceModule; var device = deviceModule.viewDevice(deviceType, deviceId); - + log.info(device); if (device && device.status != "error") { return {"device": device}; } 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/public/images/thumb.png 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/public/images/thumb.png index 6bbaf4b508..889fd182ee 100644 Binary files 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/public/images/thumb.png and 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/public/images/thumb.png differ 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/public/images/virtual_firealarm.png 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/public/images/virtual_firealarm.png new file mode 100644 index 0000000000..889fd182ee Binary files /dev/null and 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/public/images/virtual_firealarm.png differ 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/public/js/device-detail.js 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/public/js/device-detail.js deleted file mode 100644 index 730a132be5..0000000000 --- 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/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-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/public/js/load-map.js 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/public/js/load-map.js deleted file mode 100644 index 92ae2d2d8d..0000000000 --- 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/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-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/public/templates/applications-list.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/public/templates/applications-list.hbs deleted file mode 100644 index 8fba28621b..0000000000 --- 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/public/templates/applications-list.hbs +++ /dev/null @@ -1,12 +0,0 @@ - \ 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/public/templates/operations-log.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/public/templates/operations-log.hbs deleted file mode 100644 index cc5db5117a..0000000000 --- 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/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-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/public/templates/policy-compliance.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/public/templates/policy-compliance.hbs deleted file mode 100644 index 6dabda7870..0000000000 --- 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/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.type-view/public/images/thumb.png 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.type-view/public/images/thumb.png index 6bbaf4b508..889fd182ee 100644 Binary files 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.type-view/public/images/thumb.png and 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.type-view/public/images/thumb.png differ 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.type-view/type-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.type-view/type-view.hbs index a61f5bbc8c..65c6abd291 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.type-view/type-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.type-view/type-view.hbs @@ -248,18 +248,4 @@ {{#zone "bottomJs"}} {{js "/js/download.js"}} {{js "/js/jquery.validate.js"}} - {{/zone}} \ 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/iot.unit.device.firealarm-overview/firealarm-overview.hbs b/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.firealarm-overview/firealarm-overview.hbs deleted file mode 100644 index f59c2f6ca2..0000000000 --- a/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.firealarm-overview/firealarm-overview.hbs +++ /dev/null @@ -1,36 +0,0 @@ -
-
- {{unit "cdmf.unit.device.overview.firealarm-display-image"}} -
-
-
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}} -
-
-
\ 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/iot.unit.device.firealarm-overview/firealarm-overview.js b/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.firealarm-overview/firealarm-overview.js deleted file mode 100644 index 4db0045b5e..0000000000 --- a/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.firealarm-overview/firealarm-overview.js +++ /dev/null @@ -1,25 +0,0 @@ -function onRequest (context) { - var log = new Log("detail.js"); - var deviceType = request.getParameter("type"); - var deviceId = request.getParameter("id"); - - if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) { - var deviceModule = require("/modules/device.js").deviceModule; - var device = deviceModule.viewDevice(deviceType, deviceId); - - if (device) { - var viewModel = {}; - var deviceInfo = device.properties.DEVICE_INFO; - if (deviceInfo != undefined && String(deviceInfo.toString()).length > 0) { - deviceInfo = parse(stringify(deviceInfo)); - viewModel.system = device.properties.IMEI; - viewModel.machine = "Virtual Firealarm"; - viewModel.vendor = device.properties.VENDOR; - } - device.viewModel = viewModel; - } - context.device = device; - - return context; - } -} \ 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/iot.unit.device.firealarm-overview/firealarm-overview.json b/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.firealarm-overview/firealarm-overview.json deleted file mode 100644 index 688e939808..0000000000 --- a/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.device.firealarm-overview/firealarm-overview.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "version": "1.0.0" -} \ No newline at end of file diff --git a/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs b/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs index 9cd053540b..14e45fc830 100644 --- a/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs +++ b/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs @@ -1,223 +1,4 @@ -{{unit "cdmf.unit.lib.service-invoker-utility"}} -{{unit "cdmf.unit.lib.handlebars"}} -{{#defineZone "device-detail-top"}} -
-
- -
-
-{{/defineZone}} - - -
- -
-
-
-
-
-
-
-
-
Device Overview
- {{#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 "cdmf.unit.device.operation-bar" deviceType=device.type}} -
-
-
-
- -
- - {{#defineZone "device-detail-properties"}} -
-
- -
-
Device Details
-
-
-
- -     - Loading Device Details . . . -
-
- -
- -
-
Policy Compliance
-
- -
-
- Not available yet -
-
-
-
-
-
-
Device Location
-
-
- -
-
- Not available yet -
-
-
-
-
-
Installed Applications
-
- -
-
- Not available yet -
-
-
-
-
-
-
Operations Log
-
- -
-
- Not available yet -
-
-
-
-
-
-
- {{/defineZone}} -
-
-
- -
- {{#zone "bottomJs"}} - - - {{js "js/device-detail.js"}} {{js "js/load-map.js"}} diff --git a/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.js b/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.js deleted file mode 100644 index cf66cd5bee..0000000000 --- a/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.js +++ /dev/null @@ -1,47 +0,0 @@ -function onRequest(context) { - var log = new Log("detail.js"); - var deviceType = context.uriParams.deviceType; - var deviceId = request.getParameter("id"); - - if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) { - var deviceModule = require("/app/modules/device.js").deviceModule; - var device = deviceModule.viewDevice(deviceType, deviceId); - - if (device) { - var viewModel = {}; - var deviceInfo = device.properties.DEVICE_INFO; - if (deviceInfo != undefined && String(deviceInfo.toString()).length > 0) { - deviceInfo = parse(stringify(deviceInfo)); - viewModel.internal_memory = {}; - viewModel.external_memory = {}; - viewModel.location = { - latitude: device.properties.LATITUDE, - longitude: device.properties.LONGITUDE - }; - var info = {}; - var infoList = parse(deviceInfo); - if (infoList != null && infoList != undefined) { - for (var j = 0; j < infoList.length; j++) { - info[infoList[j].name] = infoList[j].value; - } - } - deviceInfo = info; - viewModel.BatteryLevel = deviceInfo.BATTERY_LEVEL; - viewModel.internal_memory.FreeCapacity = Math.round((deviceInfo.INTERNAL_TOTAL_MEMORY - - deviceInfo.INTERNAL_AVAILABLE_MEMORY) * 100) / 100; - viewModel.internal_memory.DeviceCapacityPercentage = Math.round(deviceInfo.INTERNAL_AVAILABLE_MEMORY - / deviceInfo.INTERNAL_TOTAL_MEMORY * 10000) / 100; - viewModel.external_memory.FreeCapacity = Math.round((deviceInfo.EXTERNAL_TOTAL_MEMORY - - deviceInfo.EXTERNAL_AVAILABLE_MEMORY) * 100) / 100; - viewModel.external_memory.DeviceCapacityPercentage = Math.round(deviceInfo.EXTERNAL_AVAILABLE_MEMORY - / deviceInfo.EXTERNAL_TOTAL_MEMORY * 10000) / 100; - viewModel.imei = device.properties.IMEI; - viewModel.model = device.properties.DEVICE_MODEL; - viewModel.vendor = device.properties.VENDOR; - device.viewModel = viewModel; - } - } - context.device = device; - return context; - } -} \ No newline at end of file diff --git a/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/images/thumb.png b/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/images/thumb.png deleted file mode 100644 index 7fee78a646..0000000000 Binary files a/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/images/thumb.png and /dev/null differ diff --git a/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/applications-list.hbs b/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/applications-list.hbs deleted file mode 100644 index 8fba28621b..0000000000 --- a/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.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-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/operations-log.hbs b/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/operations-log.hbs deleted file mode 100644 index cc5db5117a..0000000000 --- a/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.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-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/policy-compliance.hbs b/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/policy-compliance.hbs deleted file mode 100644 index 6dabda7870..0000000000 --- a/features/device-mgt-mdm-android-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.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-mdm-windows-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.hbs b/features/device-mgt-mdm-windows-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.hbs index e95d0331f3..14e45fc830 100644 --- a/features/device-mgt-mdm-windows-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.hbs +++ b/features/device-mgt-mdm-windows-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.hbs @@ -1,188 +1,4 @@ -{{unit "cdmf.unit.lib.service-invoker-utility"}} -{{unit "cdmf.unit.lib.handlebars"}} -{{#defineZone "device-detail-top"}} -
-
- -
-
-{{/defineZone}} - - -
- -
-
-
-
-
- -
- - {{#defineZone "device-detail-properties"}} -
-
- -
-
Device Details
-
-
-
- -     - Loading Device Details . . . -
-
- -
- -
-
Policy Compliance
-
- -
-
- Not available yet -
-
-
-
-
-
-
Device Location
-
-
- -
-
- Not available yet -
-
-
-
-
-
Installed Applications
-
- -
-
- Not available yet -
-
-
-
-
-
-
Operations Log
-
- -
-
- Not available yet -
-
-
-
-
-
-
- {{/defineZone}} -
-
-
- -
- {{#zone "bottomJs"}} - - - {{js "js/device-detail.js"}} {{js "js/load-map.js"}} diff --git a/features/device-mgt-mdm-windows-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.js b/features/device-mgt-mdm-windows-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.js deleted file mode 100644 index d8e8c14570..0000000000 --- a/features/device-mgt-mdm-windows-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.js +++ /dev/null @@ -1,30 +0,0 @@ -function onRequest(context) { - var log = new Log("detail.js"); - var deviceType = context.uriParams.deviceType; - var deviceId = request.getParameter("id"); - - if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) { - var deviceModule = require("/app/modules/device.js").deviceModule; - var device = deviceModule.viewDevice(deviceType, deviceId); - - if (device) { - var viewModel = {}; - var deviceInfo = device.properties.DEVICE_INFO; - if (deviceInfo != undefined && String(deviceInfo.toString()).length > 0) { - deviceInfo = parse(stringify(deviceInfo)); - viewModel.internal_memory = {}; - viewModel.external_memory = {}; - viewModel.location = { - latitude: device.properties.LATITUDE, - longitude: device.properties.LONGITUDE - }; - viewModel.imei = device.properties.IMEI; - viewModel.model = device.properties.DEVICE_MODEL; - viewModel.vendor = device.properties.VENDOR; - device.viewModel = viewModel; - } - } - context.device = device; - return context; - } -} \ No newline at end of file diff --git a/features/device-mgt-mdm-windows-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/images/thumb.png b/features/device-mgt-mdm-windows-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/images/thumb.png deleted file mode 100644 index 7fee78a646..0000000000 Binary files a/features/device-mgt-mdm-windows-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/images/thumb.png and /dev/null differ diff --git a/features/device-mgt-mdm-windows-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/templates/applications-list.hbs b/features/device-mgt-mdm-windows-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/templates/applications-list.hbs deleted file mode 100644 index 8fba28621b..0000000000 --- a/features/device-mgt-mdm-windows-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.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-mdm-windows-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/templates/operations-log.hbs b/features/device-mgt-mdm-windows-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/templates/operations-log.hbs deleted file mode 100644 index cc5db5117a..0000000000 --- a/features/device-mgt-mdm-windows-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.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-mdm-windows-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/templates/policy-compliance.hbs b/features/device-mgt-mdm-windows-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/templates/policy-compliance.hbs deleted file mode 100644 index 6dabda7870..0000000000 --- a/features/device-mgt-mdm-windows-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.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