From 2847ff2095962ddacbaa700e78f0d64859756b4b Mon Sep 17 00:00:00 2001 From: Supun94 Date: Tue, 8 Nov 2016 09:26:15 +0530 Subject: [PATCH] Adding cdmf effective policy page --- .../cdmf.page.effective-policy.view/view.hbs | 43 +++++++++++++++++++ .../cdmf.page.effective-policy.view/view.js | 26 +++++++++++ .../cdmf.page.effective-policy.view/view.json | 5 +++ 3 files changed, 74 insertions(+) create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.effective-policy.view/view.hbs create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.effective-policy.view/view.js create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.effective-policy.view/view.json diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.effective-policy.view/view.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.effective-policy.view/view.hbs new file mode 100644 index 0000000000..4fbf555f53 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.effective-policy.view/view.hbs @@ -0,0 +1,43 @@ +{{! + Copyright (c) 2016, 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. +}} + +{{unit "cdmf.unit.ui.title" pageTitle="Policy Management | View Policy"}} + +{{#zone "breadcrumbs"}} +
  • + + + +
  • +
  • + + + Policies + +
  • +
  • + + View + +
  • +{{/zone}} + +{{#zone "content"}} + {{unit "cdmf.unit.device.operation-mod"}} + {{unit "cdmf.unit.effective-policy.view"}} +{{/zone}} \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.effective-policy.view/view.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.effective-policy.view/view.js new file mode 100644 index 0000000000..b7056d8c03 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.effective-policy.view/view.js @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2016, 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 onRequest(context) { + var utility = require("/app/modules/utility.js")["utility"]; + var deviceType = context.uriParams.deviceType; + var deviceId = context.uriParams.deviceId; + new Log().info("Device Type : "+deviceType); + new Log().info("Device ID : "+deviceId); + return {"deviceTypePolicyView": utility.getTenantedDeviceUnitName(deviceType, deviceId,"policy-view")}; +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.effective-policy.view/view.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.effective-policy.view/view.json new file mode 100644 index 0000000000..ec79d2b203 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.effective-policy.view/view.json @@ -0,0 +1,5 @@ +{ + "version": "1.0.0", + "uri": "/policy/effective-policy/", + "layout": "cdmf.layout.default" +} \ No newline at end of file