diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json index 83e03ee7100..4c385b0123d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json @@ -2,24 +2,24 @@ "appContext": "/devicemgt/", "isCloud": false, "cloudConfig": { - "upgradeNowURL": "", - "monetizationURL": "", - "requestExtensionURL": "", + "upgradeNowURL": "https://cloudmgt.clouddev.wso2.com/cloudmgt/site/pages/payment-plans.jag?cloud-type=device_cloud", + "monetizationURL": "https://cloudmgt.clouddev.wso2.com/cloudmgt/site/pages/monetization-dashboard.jag", + "requestExtensionURL": "https://cloudmgt.clouddev.wso2.com/cloudmgt/site/pages/contact-us.jag?cloud-type=device_cloud&request-extension=true", "publisherURL": "", "storeURL": "", - "contactUsURL": "", + "contactUsURL": "https://cloudmgt.clouddev.wso2.com/cloudmgt/site/pages/contact-us.jag", "apiCloudDocURL": "https://docs.wso2.com/display/APICloud/WSO2+API+Cloud+Documentation", "appCloudDocURL": "https://docs.wso2.com/display/AppCloud/WSO2+App+Cloud+Documentation", "deviceCloudDocURL": "https://docs.wso2.com/display/DeviceCloud/WSO2+Device+Cloud+Documentation", "apiCloudWalkthroughURL": "https://api.clouddev.wso2.com/publisher?interactiveTutorial=true", "profileURL": "https://cloudmgt.clouddev.wso2.com/cloudmgt/site/pages/user-profile.jag", "changePasswordURL": "https://cloudmgt.clouddev.wso2.com/cloudmgt/site/pages/change-password.jag", - "logoutURL": "https://api.clouddev.wso2.com/publisher/site/pages/logout.jag", + "logoutURL": "https://devicemgt.cloud.wso2.com/devicemgt/logout", "apiCloudURL": "", "appCloudURL": "", "deviceCloudURL": "", - "oraganizationURL": "", - "membersURL": "" + "oraganizationURL": "https://cloudmgt.cloud.wso2.com/cloudmgt/site/pages/organization.jag", + "membersURL": "https://cloudmgt.cloud.wso2.com/cloudmgt/site/pages/user.jag" }, "httpsURL": "https://%iot.gateway.host%:%iot.gateway.https.port%", "httpURL": "http://%iot.gateway.host%:%iot.gateway.http.port", 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 1ed9f22d3e4..90ec4bf89cd 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 @@ -35,18 +35,18 @@
{{deviceCount}} - + - {{#if deviceCount}} - + {{#if deviceCount}} + View - {{/if}} - + {{/if}} + @@ -66,7 +66,7 @@
@@ -97,7 +99,7 @@
{{userCount}} - + {{#if userCount}} @@ -108,14 +110,16 @@ View {{/if}} - - + + {{#unless isCloud}} + Add + {{/unless}}
@@ -128,7 +132,7 @@
{{policyCount}} - + {{#if policyCount}} @@ -139,14 +143,16 @@ View {{/if}} - - + + {{#unless isCloud}} + Add + {{/unless}}
@@ -171,13 +177,15 @@ {{/if}} - + {{#unless isCloud}} + Add + {{/unless}} 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 35a4eb0c054..f52ce80319f 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 @@ -40,6 +40,7 @@ function onRequest() { viewModel.userCount = userModule.getUsersCount(); viewModel.policyCount = policyModule.getPoliciesCount(); viewModel.roleCount = userModule.getRolesCount(); + viewModel.isCloud = devicemgtProps.isCloud; return viewModel; } \ 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.roles/public/js/role-listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/js/role-listing.js index d673e729291..d2b7521ff72 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/js/role-listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/js/role-listing.js @@ -142,8 +142,14 @@ function loadRoles() { class: "text-right content-fill text-left-on-grid-view no-wrap", data: null, render: function (data, type, row, meta) { - return '' + - ' 0){ + isCloud = true; + } + + var innerhtml = ''; + + var editLink = '' + @@ -156,8 +162,9 @@ function loadRoles() { '' + '' + '' + - '' + - ''; + + var editPermissionLink = '' + @@ -170,8 +177,9 @@ function loadRoles() { '' + '' + '' + - '' + - ''; + + car removeLink = '' + '' + @@ -180,6 +188,11 @@ function loadRoles() { '' + '' + ''; + + if (!isCloud){ + innerhtml = editLink + editPermissionLink + removeLink; + } + return innerhtml; } } ]; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/roles.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/roles.hbs index e92009887d3..962a7f3cea8 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/roles.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/roles.hbs @@ -35,6 +35,7 @@ {{/zone}} {{#zone "navbarActions"}} + {{#unless isCloud}}
  • @@ -45,16 +46,22 @@ Add Role
  • + {{/unless}} {{/zone}} {{#zone "content"}}
    + {{#unless isCloud}} {{#if removePermitted}} {{/if}} {{#if editPermitted}} {{/if}} + {{/unless}} + {{#if isCloud}} + + {{/if}} Loading roles . . .
    diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/roles.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/roles.js index 957d29a5f87..10121aa72d6 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/roles.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/roles.js @@ -32,6 +32,7 @@ function onRequest(context) { } context["adminRole"] = deviceMgtProps["adminRole"]; + context["isCloud"] = deviceMgtProps["isCloud"]; return context; } \ 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.user.view/view.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.view/view.hbs index 01acd48ffaf..6230be73b7f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.view/view.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.view/view.hbs @@ -37,94 +37,99 @@ {{#zone "content"}} {{#if canView}} - {{#zone "contentTitle"}} -
    -
    - + {{#zone "contentTitle"}} +
    +
    + +
    -
    - {{/zone}} + {{/zone}} -
    -
    -
    -
    +
    +
    +
    +
    +
    +
    + + {{#unless isCloud}} + {{#if editPermitted}} + + {{/if}} + {{/unless}} +
    -
    - {{#if editPermitted}} - - {{/if}} +
    +
    Profile Overview +
    + {{#defineZone "user-detail-properties"}} + + + + + + + + + + + + + + + + + + + + + + + +
    Username{{user.username}}
    First Name{{user.firstname}}
    Last Name{{user.lastname}}
    Email{{user.emailAddress}}
    Roles + {{#each userRoles}} + + {{/each}} +
    + {{/defineZone}}
    -
    -
    Profile Overview
    - {{#defineZone "user-detail-properties"}} - - - - - - - - - - - - - - - - - - - - - - - -
    Username{{user.username}}
    First Name{{user.firstname}}
    Last Name{{user.lastname}}
    Email{{user.emailAddress}}
    Roles - {{#each userRoles}} - - {{/each}} -
    - {{/defineZone}} -
    -
    -
    -
    - -
    - {{#defineZone "user-enrolled-devices"}} -
    -
    -
    -
    Enrolled Devices by - {{#if user.firstname}} - {{user.firstname}} {{user.lastname}} - {{else}} - {{user.username}} - {{/if}} -
    -
    -
    -
    - {{#each devices}} -
    +
    +
    + +
    + {{#defineZone "user-enrolled-devices"}} +
    +
    +
    +
    Enrolled Devices by + {{#if user.firstname}} + {{user.firstname}} {{user.lastname}} + {{else}} + {{user.username}} + {{/if}} +
    +
    +
    +
    + {{#each devices}} +
    @@ -155,19 +160,19 @@
    -
    - {{/each}} +
    + {{/each}} +
    +
    -
    -
    - {{/defineZone}} + {{/defineZone}} +
    -
    - {{else}} + {{else}}

    Permission Denied

    diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.view/view.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.view/view.js index 3ad68879416..2d544949b05 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.view/view.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.view/view.js @@ -20,6 +20,7 @@ function onRequest(context) { var userModule = require("/app/modules/business-controllers/user.js")["userModule"]; var username = request.getParameter("username"); var user = userModule.getUser(username)["content"]; + var deviceMgtProps = require("/app/modules/conf-reader/main.js")["conf"]; var userName = request.getParameter("username"); @@ -45,5 +46,8 @@ function onRequest(context) { if (userModule.isAuthorized("/permission/admin/device-mgt/users/view")) { canView = true; } - return {"user": user, "userRoles": userRoles, "devices": devices, "canView": canView}; + + var isCloud = deviceMgtProps.isCloud; + + return {"user": user, "userRoles": userRoles, "devices": devices, "canView": canView, "isCloud" : isCloud}; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.hbs index fad118d1a43..85f2241db3a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.hbs @@ -35,6 +35,7 @@ {{/zone}} {{#zone "navbarActions"}} + {{#unless isCloud}}
  • @@ -45,18 +46,21 @@ Add User
  • + {{/unless}} {{/zone}} {{#zone "content"}}
    - {{#if canManage}} - - - - - {{/if}} + {{#unless isCloud}} + {{#if canManage}} + + + + + {{/if}} + {{/unless}} {{#if canView}} {{/if}} @@ -108,14 +112,16 @@ Enter new password

    -

    Retype new password

    -

    diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.js index e777b314ac4..4b7f9c01bc6 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.js @@ -33,6 +33,7 @@ function onRequest(context) { page["currentUser"] = userModule.getCarbonUser().username; page["adminUser"] = deviceMgtProps["adminUser"].split("@")[0]; + page["isCloud"] = deviceMgtProps["isCloud"]; if (userModule.isAuthorized("/permission/admin/device-mgt/users/manage")) { page.canManage = true; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.cloud.user-menu/user-menu.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.cloud.user-menu/user-menu.hbs index b28e0ae5dfd..2ed8c3af497 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.cloud.user-menu/user-menu.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.cloud.user-menu/user-menu.hbs @@ -22,87 +22,87 @@ -