From 6c96d228ae381ee71695d57703acc50bec8e2a3d Mon Sep 17 00:00:00 2001 From: ayyoob Date: Thu, 9 Feb 2017 03:02:56 +0530 Subject: [PATCH 01/38] added subscription fix --- .../APIManagementProviderServiceImpl.java | 28 +++++++++++-------- .../store/api/SubscriptionindividualApi.java | 17 +++++++++++ 2 files changed, 33 insertions(+), 12 deletions(-) diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java index af471ebd6ef..50bcc5ad0fe 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java @@ -87,6 +87,10 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe throw new APIManagerException ( "Api application creation failed for " + applicationName + " to the user " + username); } + + SubscriptionList subscriptionList = storeClient.getSubscriptions().subscriptionsGet + (null, application.getApplicationId(), "", 0, 100, CONTENT_TYPE, null); + List needToSubscribe = new ArrayList<>(); // subscribe to apis. if (tags != null && tags.length > 0) { for (String tag: tags) { @@ -100,32 +104,32 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe if (apiList.getList() != null && apiList.getList().size() > 0) { for (APIInfo apiInfo : apiList.getList()) { - Subscription subscription = new Subscription(); - //fix for APIMANAGER-5566 admin-AT-tenant1.com-Tenant1API1-1.0.0 - String id = apiInfo.getProvider().replace("@", "-AT-") - + "-" + apiInfo.getName()+ "-" + apiInfo.getVersion(); - subscription.setApiIdentifier(id); - subscription.setApplicationId(application.getApplicationId()); - subscription.tier(ApiApplicationConstants.DEFAULT_TIER); - SubscriptionList subscriptionList = storeClient.getSubscriptions().subscriptionsGet - (id, application.getApplicationId(), "", 0, 100, CONTENT_TYPE, null); boolean subscriptionExist = false; if (subscriptionList.getList() != null && subscriptionList.getList().size() > 0) { for (Subscription subs : subscriptionList.getList()) { - if (subs.getApiIdentifier().equals(id) && subs.getApplicationId().equals( - application.getApplicationId())) { + if (subs.getApiIdentifier().equals(apiInfo.getId())) { subscriptionExist = true; break; } } } if (!subscriptionExist) { - storeClient.getIndividualSubscription().subscriptionsPost(subscription, CONTENT_TYPE); + Subscription subscription = new Subscription(); + //fix for APIMANAGER-5566 admin-AT-tenant1.com-Tenant1API1-1.0.0 + String id = apiInfo.getProvider().replace("@", "-AT-") + + "-" + apiInfo.getName()+ "-" + apiInfo.getVersion(); + subscription.setApiIdentifier(id); + subscription.setApplicationId(application.getApplicationId()); + subscription.tier(ApiApplicationConstants.DEFAULT_TIER); + needToSubscribe.add(subscription); } } } } } + if (!needToSubscribe.isEmpty()) { + storeClient.getIndividualSubscription().subscriptionsPost(needToSubscribe, CONTENT_TYPE); + } //end of subscription List applicationKeys = application.getKeys(); diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/SubscriptionindividualApi.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/SubscriptionindividualApi.java index adf57708a40..02e24ebe629 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/SubscriptionindividualApi.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/store/api/SubscriptionindividualApi.java @@ -22,6 +22,8 @@ import feign.Param; import feign.RequestLine; import org.wso2.carbon.apimgt.integration.client.store.model.Subscription; +import java.util.List; + @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T00:03:54.991+05:30") public interface SubscriptionindividualApi { @@ -42,6 +44,21 @@ public interface SubscriptionindividualApi { }) Subscription subscriptionsPost(Subscription body, @Param("contentType") String contentType); + /** + * Add new subscriptions + * Add new subscriptions + * @param body Subscription objects that should to be added (required) + * @param contentType Media type of the entity in the body. Default is JSON. (required) + * @return Subscription + */ + @RequestLine("POST /subscriptions/multiple") + @Headers({ + "Content-type: application/json", + "Accept: application/json", + "Content-Type: {contentType}" + }) + List subscriptionsPost(List body, @Param("contentType") String contentType); + /** * Remove subscription * Remove subscription From 67ae4c7c6849a1a00ef719bf807d5e6d05ff8bef Mon Sep 17 00:00:00 2001 From: ayyoob Date: Thu, 9 Feb 2017 09:11:22 +0530 Subject: [PATCH 02/38] fixed api subscription issue --- .../extension/APIManagementProviderServiceImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java index 50bcc5ad0fe..4dd85b2532f 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java @@ -104,10 +104,12 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe if (apiList.getList() != null && apiList.getList().size() > 0) { for (APIInfo apiInfo : apiList.getList()) { + String id = apiInfo.getProvider().replace("@", "-AT-") + + "-" + apiInfo.getName()+ "-" + apiInfo.getVersion(); boolean subscriptionExist = false; if (subscriptionList.getList() != null && subscriptionList.getList().size() > 0) { for (Subscription subs : subscriptionList.getList()) { - if (subs.getApiIdentifier().equals(apiInfo.getId())) { + if (subs.getApiIdentifier().equals(id)) { subscriptionExist = true; break; } @@ -116,8 +118,7 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe if (!subscriptionExist) { Subscription subscription = new Subscription(); //fix for APIMANAGER-5566 admin-AT-tenant1.com-Tenant1API1-1.0.0 - String id = apiInfo.getProvider().replace("@", "-AT-") - + "-" + apiInfo.getName()+ "-" + apiInfo.getVersion(); + subscription.setApiIdentifier(id); subscription.setApplicationId(application.getApplicationId()); subscription.tier(ApiApplicationConstants.DEFAULT_TIER); From dac7d3c1eedfe6e2f13ff1372e4a6620158e85b4 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Thu, 9 Feb 2017 09:59:06 +0530 Subject: [PATCH 03/38] made device management to be default tag --- .../api/ApiApplicationRegistrationServiceImpl.java | 2 +- .../apimgt/application/extension/api/util/APIUtil.java | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/ApiApplicationRegistrationServiceImpl.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/ApiApplicationRegistrationServiceImpl.java index 425c9a11419..b2f46dc09ef 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/ApiApplicationRegistrationServiceImpl.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/ApiApplicationRegistrationServiceImpl.java @@ -63,7 +63,7 @@ public class ApiApplicationRegistrationServiceImpl implements ApiApplicationRegi PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(username); APIManagementProviderService apiManagementProviderService = APIUtil.getAPIManagementProviderService(); ApiApplicationKey apiApplicationKey = apiManagementProviderService.generateAndRetrieveApplicationKeys( - applicationName, APIUtil.getAllowedApisTags().toArray(new String[APIUtil.getAllowedApisTags().size()]), + applicationName, APIUtil.getDefaultTags(), ApiApplicationConstants.DEFAULT_TOKEN_TYPE, username, false, ApiApplicationConstants.DEFAULT_VALIDITY_PERIOD); return Response.status(Response.Status.CREATED).entity(apiApplicationKey.toString()).build(); diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/util/APIUtil.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/util/APIUtil.java index cdce160c54d..8b888a010d0 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/util/APIUtil.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/util/APIUtil.java @@ -31,6 +31,7 @@ import org.wso2.carbon.registry.core.exceptions.RegistryException; import org.wso2.carbon.registry.core.service.RegistryService; import org.wso2.carbon.user.core.service.RealmService; +import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; @@ -95,8 +96,13 @@ public class APIUtil { return deviceManagementProviderService; } + public static String[] getDefaultTags() throws DeviceManagementException { + String[] allowedApisTags = new String[1]; + allowedApisTags[0] = DEFAULT_CDMF_API_TAG; + return allowedApisTags; + } + public static List getAllowedApisTags() throws DeviceManagementException { - //Todo get allowed cdmf service tags from config. List allowedApisTags = getDeviceManagementProviderService().getAvailableDeviceTypes(); allowedApisTags.add(DEFAULT_CDMF_API_TAG); allowedApisTags.add(DEFAULT_CERT_API_TAG); From f772b357698637dc009cb4d20223d5bbb5a94769 Mon Sep 17 00:00:00 2001 From: kamidu Date: Thu, 9 Feb 2017 20:15:49 +0530 Subject: [PATCH 04/38] enable cloud related configurations to the devicemgt application --- .../jaggeryapps/devicemgt/app/conf/config.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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..1a98afd88fb 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,12 +2,12 @@ "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", @@ -18,8 +18,8 @@ "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", From b946eeae74e1f69aea670fabb3fc0510959a424c Mon Sep 17 00:00:00 2001 From: kamidu Date: Thu, 9 Feb 2017 23:24:15 +0530 Subject: [PATCH 05/38] fix url issues in the config.json --- .../jaggeryapps/devicemgt/app/conf/config.json | 2 +- .../cdmf.unit.ui.header.cloud.user-menu/user-menu.hbs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) 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 1a98afd88fb..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 @@ -14,7 +14,7 @@ "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": "", 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..8c7d88c0634 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 @@ -229,17 +229,17 @@
- +
API Cloud
- +
App Cloud
- +
Device Cloud
@@ -249,12 +249,12 @@

Manage your cloud

- +
Organization
- +
Members
From 6e19ec31e368ae3c159a3bdfb917fe8703799558 Mon Sep 17 00:00:00 2001 From: kamidu Date: Fri, 10 Feb 2017 02:47:25 +0530 Subject: [PATCH 06/38] fix url issues in the config.json --- .../units/cdmf.unit.ui.header.cloud.user-menu/user-menu.hbs | 4 ---- 1 file changed, 4 deletions(-) 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 8c7d88c0634..cb8071077fb 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 @@ -176,11 +176,7 @@ - {{else}} - {{@user.username}}@{{@user.domain}} - {{/if}}
-{{/zone}} \ No newline at end of file +{{/zone}} From 318fbf921516c5da42d42d9fd5c95d2a7b3d22b3 Mon Sep 17 00:00:00 2001 From: Kamidu Sachith Punchihewa Date: Sun, 19 Feb 2017 15:54:53 +0530 Subject: [PATCH 29/38] role loading issues --- .../app/pages/cdmf.page.roles/public/js/role-listing.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 d2b7521ff72..98749decd75 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; From 527b844ee3194b6651baa402de886048590b3e4a Mon Sep 17 00:00:00 2001 From: Kamidu Sachith Punchihewa Date: Sun, 19 Feb 2017 16:03:49 +0530 Subject: [PATCH 30/38] Error handled on the user session invalidation --- .../devicemgt/app/modules/business-controllers/user.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 c6ed7da1bdb..8de168cceae 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"); From 367dc1a30bc952657d3cb0c892d071ae2adcb037 Mon Sep 17 00:00:00 2001 From: Kamidu Sachith Punchihewa Date: Sun, 19 Feb 2017 17:48:11 +0530 Subject: [PATCH 31/38] resolving return type issue in group mgt --- .../devicemgt/app/modules/business-controllers/group.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a7727ccea58..82ecb1ae3d5 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"]); From ee209064e3c4d7154fd78cd4b4cc3b4b23ac6f6a Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Sun, 19 Feb 2017 18:24:59 +0530 Subject: [PATCH 32/38] Tooltip css fix --- .../units/cdmf.unit.ui.theme/public/css/custom-desktop.css | 4 ++++ 1 file changed, 4 insertions(+) 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 17485f58641..fbdb93719cf 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; +} From 0da8847787b548f8b0a0f67226c9b313f5ec8389 Mon Sep 17 00:00:00 2001 From: Kamidu Sachith Punchihewa Date: Sun, 19 Feb 2017 18:44:39 +0530 Subject: [PATCH 33/38] removing device edit option --- .../pages/cdmf.page.devices/public/js/listing.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 e7120f888e2..53bb8991846 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 += From 368647f1763a0b980fc4f627cf711275202b2d56 Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Sun, 19 Feb 2017 19:34:28 +0530 Subject: [PATCH 34/38] Temporary advance search removal commit --- .../app/pages/cdmf.page.devices/public/js/listing.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 e7120f888e2..3e02f180f3c 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 @@ -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", From 4a5c99af78589fafec17b0d8c47cd31e80c3ce1f Mon Sep 17 00:00:00 2001 From: Kamidu Sachith Punchihewa Date: Sun, 19 Feb 2017 21:49:19 +0530 Subject: [PATCH 35/38] remove tennent related token handlers --- .../app/modules/oauth/token-handlers.js | 82 +++++++++---------- 1 file changed, 41 insertions(+), 41 deletions(-) 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 771db411f2e..22da9284955 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 +}(); From a938d57a657267e4a3f0b0c3d5fe68537d4f73b1 Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Mon, 20 Feb 2017 15:11:00 +0530 Subject: [PATCH 36/38] Removing analytics link from groups listing --- .../app/pages/cdmf.page.groups/public/js/listing.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 91333c5b5d9..d3987517ddc 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")) { From 3c90f8ad49cc020202b12c0a483a33c7d00701f0 Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Mon, 20 Feb 2017 17:19:20 +0530 Subject: [PATCH 37/38] temporary removal of view analytics --- .../devicemgt/app/pages/cdmf.page.devices/devices.hbs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 354c6f2bb75..bdd2e9d39b3 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}}
  • From 4e16e29b1cbb46954b46cf3e1e64148bae4a728b Mon Sep 17 00:00:00 2001 From: kamidu Date: Mon, 20 Feb 2017 18:20:04 +0530 Subject: [PATCH 38/38] removing group sharing --- .../cdmf.page.groups/public/js/listing.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 91333c5b5d9..9d1426e2154 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 @@ -192,15 +192,15 @@ function loadGroups() { ''; } if (row.owner != "wso2.system.user") { - if ($.hasPermission("SHARE_GROUP")) { - html += - ''; - } + // if ($.hasPermission("SHARE_GROUP")) { + // html += + // ''; + // } if ($.hasPermission("UPDATE_GROUP")) { html += '