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
-
-
-
- {{device_count}} +
+
+
Devices
+
+
+
+ {{deviceCount}} - - - - - - View - + {{#if deviceCount}} + + + + + + View + + {{/if}} @@ -54,20 +55,19 @@ Add -
-
-
-
-
Groups
-
-
-
- {{group_count}} +
+
+
Groups
+
+
+
+ {{groupCount}} + {{#if groupCount}} @@ -76,6 +76,7 @@ View + {{/if}} @@ -85,20 +86,19 @@ Add -
-
-
-
-
Users
-
-
-
- {{user_count}} +
+
+
Users
+
+
+
+ {{userCount}} + {{#if userCount}} @@ -107,6 +107,7 @@ View + {{/if}} @@ -116,20 +117,19 @@ Add -
-
-
-
-
Policies
-
-
-
- {{policy_count}} +
+
+
Policies
+
+
+
+ {{policyCount}} + {{#if policyCount}} @@ -138,6 +138,7 @@ View + {{/if}} @@ -147,20 +148,19 @@ Add -
-
-
-
-
Roles
-
-
-
- {{role_count}} +
+
+
Roles
+
+
+
+ {{roleCount}} + {{#if roleCount}} @@ -169,6 +169,7 @@ View + {{/if}} @@ -178,32 +179,14 @@ Add -
{{else}} - Permission denied +

+ Permitted None +

{{/if}}
- {{/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