diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/group.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/group.js index a7727ccea5..82ecb1ae3d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/group.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/group.js @@ -48,7 +48,7 @@ var groupModule = {}; } return serviceInvokers.XMLHttp.get( endPoint, function (responsePayload) { - return responsePayload["responseText"]; + return parse(responsePayload["responseText"]); }, function (responsePayload) { log.error(responsePayload["responseText"]); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js index c6ed7da1bd..8de168ccea 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js @@ -463,7 +463,13 @@ var userModule = function () { publicMethods.isAuthorized = function (permission) { var carbon = require("carbon"); var carbonServer = application.get("carbonServer"); - var carbonUser = session.get(constants.USER_SESSION_KEY); + var carbonUser; + try { + carbonUser = session.get(constants.USER_SESSION_KEY); + } catch (e) { + log.error("User object was not found in the session"); + carbonUser = null; + } var utility = require('/app/modules/utility.js').utility; if (!carbonUser) { log.error("User object was not found in the session"); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-handlers.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-handlers.js index 771db411f2..22da928495 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-handlers.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-handlers.js @@ -40,7 +40,7 @@ var handlers = function () { "as input - setupTokenPairByPasswordGrantType(x, y)"); } else { privateMethods.setUpEncodedTenantBasedClientAppCredentials(username); - privateMethods.setUpEncodedTenantBasedWebSocketClientAppCredentials(username); + //privateMethods.setUpEncodedTenantBasedWebSocketClientAppCredentials(username); var encodedClientAppCredentials = session.get(constants["ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS"]); if (!encodedClientAppCredentials) { throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up access token pair by " + @@ -84,7 +84,7 @@ var handlers = function () { "as input - setupTokenPairBySamlGrantType(x, y)"); } else { privateMethods.setUpEncodedTenantBasedClientAppCredentials(username); - privateMethods.setUpEncodedTenantBasedWebSocketClientAppCredentials(username); + //privateMethods.setUpEncodedTenantBasedWebSocketClientAppCredentials(username); var encodedClientAppCredentials = session.get(constants["ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS"]); if (!encodedClientAppCredentials) { throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up access token pair " + @@ -129,7 +129,7 @@ var handlers = function () { "as input - setupTokenPairBySamlGrantType(x, y)"); } else { privateMethods.setUpEncodedTenantBasedClientAppCredentials(username); - privateMethods.setUpEncodedTenantBasedWebSocketClientAppCredentials(username); + //privateMethods.setUpEncodedTenantBasedWebSocketClientAppCredentials(username); var encodedClientAppCredentials = session.get(constants["ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS"]); if (!encodedClientAppCredentials) { throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up access token pair " + @@ -224,44 +224,44 @@ var handlers = function () { } }; - privateMethods["setUpEncodedTenantBasedWebSocketClientAppCredentials"] = function (username) { - if (!username) { - throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant based " + - "client credentials to session context. No username of logged in user is found as " + - "input - setUpEncodedTenantBasedWebSocketClientAppCredentials(x)"); - } else { - if (devicemgtProps["gatewayEnabled"]) { - var tenantBasedWebSocketClientAppCredentials - = tokenUtil.getTenantBasedWebSocketClientAppCredentials(username); - if (!tenantBasedWebSocketClientAppCredentials) { - throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant " + - "based client credentials to session context as the server is unable " + - "to obtain such credentials - setUpEncodedTenantBasedWebSocketClientAppCredentials(x)"); - } else { - var encodedTenantBasedWebSocketClientAppCredentials = - tokenUtil.encode(tenantBasedWebSocketClientAppCredentials["clientId"] + ":" + - tenantBasedWebSocketClientAppCredentials["clientSecret"]); - // setting up encoded tenant based client credentials to session context. - session.put(constants["ENCODED_TENANT_BASED_WEB_SOCKET_CLIENT_CREDENTIALS"], - encodedTenantBasedWebSocketClientAppCredentials); - } - } else { - var dynamicClientAppCredentials = tokenUtil.getDynamicClientAppCredentials(); - if (!dynamicClientAppCredentials) { - throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant based " + - "client credentials to session context as the server is unable to obtain " + - "dynamic client credentials - setUpEncodedTenantBasedWebSocketClientAppCredentials(x)"); - } - var encodedTenantBasedWebSocketClientAppCredentials = - tokenUtil.encode(dynamicClientAppCredentials["clientId"] + ":" + - dynamicClientAppCredentials["clientSecret"]); - // setting up encoded tenant based client credentials to session context. - session.put(constants["ENCODED_TENANT_BASED_WEB_SOCKET_CLIENT_CREDENTIALS"], - encodedTenantBasedWebSocketClientAppCredentials); - } +// privateMethods["setUpEncodedTenantBasedWebSocketClientAppCredentials"] = function (username) { +// if (!username) { +// throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant based " + +// "client credentials to session context. No username of logged in user is found as " + +// "input - setUpEncodedTenantBasedWebSocketClientAppCredentials(x)"); +// } else { +// if (devicemgtProps["gatewayEnabled"]) { +// var tenantBasedWebSocketClientAppCredentials +// = tokenUtil.getTenantBasedWebSocketClientAppCredentials(username); +// if (!tenantBasedWebSocketClientAppCredentials) { +// throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant " + +// "based client credentials to session context as the server is unable " + +// "to obtain such credentials - setUpEncodedTenantBasedWebSocketClientAppCredentials(x)"); +// } else { +// var encodedTenantBasedWebSocketClientAppCredentials = +// tokenUtil.encode(tenantBasedWebSocketClientAppCredentials["clientId"] + ":" + +// tenantBasedWebSocketClientAppCredentials["clientSecret"]); +// // setting up encoded tenant based client credentials to session context. +// session.put(constants["ENCODED_TENANT_BASED_WEB_SOCKET_CLIENT_CREDENTIALS"], +// encodedTenantBasedWebSocketClientAppCredentials); +// } +// } else { +// var dynamicClientAppCredentials = tokenUtil.getDynamicClientAppCredentials(); +// if (!dynamicClientAppCredentials) { +// throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant based " + +// "client credentials to session context as the server is unable to obtain " + +// "dynamic client credentials - setUpEncodedTenantBasedWebSocketClientAppCredentials(x)"); +// } +// var encodedTenantBasedWebSocketClientAppCredentials = +// tokenUtil.encode(dynamicClientAppCredentials["clientId"] + ":" + +// dynamicClientAppCredentials["clientSecret"]); +// // setting up encoded tenant based client credentials to session context. +// session.put(constants["ENCODED_TENANT_BASED_WEB_SOCKET_CLIENT_CREDENTIALS"], +// encodedTenantBasedWebSocketClientAppCredentials); +// } - } - }; +// } +// }; return publicMethods; -}(); \ 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.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.hbs index 90ec4bf89c..f526cc03a3 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 @@ -78,7 +78,7 @@ {{/if}} - {{#unless isCloud}} + @@ -86,7 +86,7 @@ Add - {{/unless}} + @@ -144,7 +144,7 @@ {{/if}} - {{#unless isCloud}} + @@ -152,7 +152,7 @@ Add - {{/unless}} + @@ -197,4 +197,4 @@ {{/if}} -{{/zone}} \ No newline at end of file +{{/zone}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs index 354c6f2bb7..bdd2e9d39b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs @@ -57,7 +57,7 @@ Assign from My Devices -
  • + {{else}} {{#if permissions.enroll}}
  • diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/public/js/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/public/js/listing.js index e7120f888e..36515c2c82 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/public/js/listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/public/js/listing.js @@ -342,13 +342,13 @@ function loadDevices(searchType, searchParam) { ''; } - html += - '' - + '' - + '' - + ''; +// html += +// '' +// + '' +// + '' +// + ''; var groupOwner = $('#group_owner').text(); if (groupId && groupOwner != "wso2.system.user") { html += @@ -460,11 +460,12 @@ function loadDevices(searchType, searchParam) { $("#loading-content").remove(); attachDeviceEvents(); - if($('.advance-search').length < 1){ + // Temporary disable + /*if($('.advance-search').length < 1){ $(this).closest('.dataTables_wrapper').find('div[id$=_filter] input') .after('Advance Search'); - } + }*/ }, { "placeholder": "Search By Device Name", diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js index 9d1426e215..5d7640d17b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js @@ -184,12 +184,11 @@ function loadGroups() { render: function (id, type, row, meta) { var html = ''; if ($.hasPermission("VIEW_GROUP_DEVICES")) { - html += '' + + /*html += '' + '' + - ''; + '';*/ } if (row.owner != "wso2.system.user") { // if ($.hasPermission("SHARE_GROUP")) { 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 d2b7521ff7..98749decd7 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 @@ -179,7 +179,7 @@ function loadRoles() { '' + ''; - car removeLink = '' + '' + @@ -189,7 +189,7 @@ function loadRoles() { '' + ''; - if (!isCloud){ + 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/units/cdmf.unit.ui.theme/public/css/custom-desktop.css b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.theme/public/css/custom-desktop.css index 17485f5864..fbdb93719c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.theme/public/css/custom-desktop.css +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.theme/public/css/custom-desktop.css @@ -6606,3 +6606,7 @@ header.header-default { } /** End **/ + +.tooltip-overflow-fix{ + overflow: visible !important; +}