diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.hbs
index 02be4f0a7e..199e362a46 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.hbs
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.hbs
@@ -26,25 +26,26 @@
{{/zone}}
{{#zone "content"}}
-
+
{{#if permissions.VIEW_DASHBOARD}}
-
-
-
-
Devices
-
-
-
-
-
-
-
Groups
-
-
-
-
-
-
-
Users
-
-
-
-
-
-
-
Policies
-
-
-
-
-
-
-
Roles
-
-
-
{{else}}
- Permission denied
+
+ Permitted None
+
{{/if}}
-
-
-
-
-
- Scan QR code to start enrollment
-
-
- Please scan the QR code using your mobile device to retrieve enrollment URL.
-
-
-
-
-
-
{{/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.dashboard/dashboard.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.js
index c5682c0c5b..c848b86f6e 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.js
@@ -32,16 +32,16 @@ function onRequest() {
return;
}
- var page = {};
- page.permissions = permissions;
- page.enrollmentURL = devicemgtProps.enrollmentURL;
- page.device_count = deviceModule.getDevicesCount();
+ var viewModel = {};
+ viewModel.permissions = permissions;
+ viewModel.enrollmentURL = devicemgtProps.enrollmentURL;
+ viewModel.deviceCount = deviceModule.getDevicesCount();
//TODO: Enable Group Management Service API on CDMF
//page.group_count = groupModule.getGroupCount();
- page.group_count = -1;
- page.user_count = userModule.getUsersCount();
- page.policy_count = policyModule.getPoliciesCount();
- page.role_count = userModule.getRolesCount();
+ viewModel.groupCount = -1;
+ viewModel.userCount = userModule.getUsersCount();
+ viewModel.policyCount = policyModule.getPoliciesCount();
+ viewModel.roleCount = userModule.getRolesCount();
- return page;
+ return viewModel;
}
\ No newline at end of file