From 38216c4b9dd7a1411132ff92d358dd314741aa1b Mon Sep 17 00:00:00 2001 From: Hasunie Date: Tue, 17 Jan 2017 16:04:48 +0530 Subject: [PATCH 1/2] fixing win10,8.1 conflicting issues --- .../discovery/impl/DiscoveryServiceImpl.java | 8 +- .../enrollment/beans/ContextItem.java | 14 +-- .../public/templates/windows-policy-view.hbs | 109 ------------------ .../windows-web-agent/app/conf/app-conf.json | 6 +- .../windows-web-agent/app/conf/config.json | 4 +- 5 files changed, 14 insertions(+), 127 deletions(-) diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/discovery/impl/DiscoveryServiceImpl.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/discovery/impl/DiscoveryServiceImpl.java index 2ba4c9abc..93337f0a2 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/discovery/impl/DiscoveryServiceImpl.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/discovery/impl/DiscoveryServiceImpl.java @@ -68,13 +68,11 @@ public class DiscoveryServiceImpl implements DiscoveryService { String emailId = discoveryRequest.getEmailId(); String[] userDomains = emailId.split(DELIMITER); String domain = userDomains[DOMAIN_SEGMENT]; - String applicationVersion = discoveryRequest.getApplicationVersion(); - String[] osVersions = applicationVersion .split("\\."); - String os = osVersions[0]; DiscoveryResponse discoveryResponse; - if (PluginConstants.WindowsVersionProperties.OS_VERSION.equals(os) && FEDERATED.equals(getAuthPolicy())) { - discoveryResponse = new DiscoveryResponse(); + if (!PluginConstants.WindowsVersionProperties.REQUESTED_WIN81_VERSION.equals(discoveryRequest.getVersion()) + && FEDERATED.equals(getAuthPolicy())) { + discoveryResponse = new DiscoveryResponse(); discoveryResponse.setAuthPolicy(FEDERATED); discoveryResponse.setEnrollmentVersion(PluginConstants.WindowsVersionProperties.REQUESTED_WIN10_VERSION); discoveryResponse.setEnrollmentPolicyServiceUrl(PluginConstants.Discovery.DEVICE_ENROLLMENT_SUBDOMAIN + diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/enrollment/beans/ContextItem.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/enrollment/beans/ContextItem.java index dbc690aa4..68fac756c 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/enrollment/beans/ContextItem.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/enrollment/beans/ContextItem.java @@ -20,18 +20,16 @@ package org.wso2.carbon.device.mgt.mobile.windows.api.services.enrollment.beans; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; -@XmlAccessorType(XmlAccessType.PROPERTY) -@XmlType(name = "ContextItem", namespace = PluginConstants.SOAP_AUTHORIZATION_TARGET_NAMESPACE) +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ContextItem", namespace = PluginConstants.SOAP_AUTHORIZATION_TARGET_NAMESPACE, + propOrder = {"Name", "Value"}) public class ContextItem { - @XmlElement(required = true, namespace = PluginConstants.SOAP_AUTHORIZATION_TARGET_NAMESPACE) + @XmlAttribute(name = "Name", required = true, namespace = PluginConstants.SOAP_AUTHORIZATION_TARGET_NAMESPACE) protected String Name; - @XmlElement(required = true, namespace = PluginConstants.SOAP_AUTHORIZATION_TARGET_NAMESPACE) + @XmlElement(name = "Value", required = true, namespace = PluginConstants.SOAP_AUTHORIZATION_TARGET_NAMESPACE) protected String Value; public String getValue() { diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.policy-view/public/templates/windows-policy-view.hbs b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.policy-view/public/templates/windows-policy-view.hbs index 2d6c205ef..503c31dd5 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.policy-view/public/templates/windows-policy-view.hbs +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.policy-view/public/templates/windows-policy-view.hbs @@ -295,114 +295,5 @@ - - -
-
- -
-
- - - -
-
- -
- - - - - - - - - - - - - - -
No:Application Name/DescriptionPackage Name
- No entries added yet . -
- - - - - - - - - - -
-
-
-
-
- \ No newline at end of file diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/conf/app-conf.json b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/conf/app-conf.json index 5091d70b9..f34d6ccd9 100755 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/conf/app-conf.json +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/conf/app-conf.json @@ -1,5 +1,5 @@ { - "appName": "WSO2 Enterprise Mobility Manager", + "appName": "WSO2 IOTS", "cachingEnabled": true, "debuggingEnabled": false, "permissionRoot": "/", @@ -38,8 +38,8 @@ }, "generalConfig" : { "host" : "https://localhost:9443", - "companyName" : "WSO2 Enterprise Mobility Manager", - "browserTitle" : "WSO2 EMM", + "companyName" : "WSO2 IOTS", + "browserTitle" : "WSO2 IOT", "copyrightPrefix" : "\u00A9 %date-year%, ", "copyrightOwner" : "WSO2 Inc.", "copyrightOwnersSite" : "http://www.wso2.org", diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/conf/config.json b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/conf/config.json index 7e4a733cd..207c08e5e 100755 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/conf/config.json +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/conf/config.json @@ -38,8 +38,8 @@ "windowsConfigRoot" : "%http.ip%/api/device-mgt/windows/v1.0/federated/bst/authentication", "generalConfig" : { "host" : "%http.ip%", - "companyName" : "WSO2 Enterprise Mobility Manager", - "browserTitle" : "WSO2 EMM", + "companyName" : "WSO2 IOT", + "browserTitle" : "WSO2 IOT", "copyrightText" : "\u00A9 %date-year%, WSO2 Inc. (http://www.wso2.org) All Rights Reserved." }, "isOAuthEnabled" : true, From 95a7ff6aafc59baa645e2463aed48c43e2111ac8 Mon Sep 17 00:00:00 2001 From: Hasunie Date: Tue, 17 Jan 2017 16:48:10 +0530 Subject: [PATCH 2/2] fixing windows app-conf issue --- .../jaggeryapps/windows-web-agent/app/conf/app-conf.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/conf/app-conf.json b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/conf/app-conf.json index d8357c866..ea1f69b67 100755 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/conf/app-conf.json +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/conf/app-conf.json @@ -38,13 +38,8 @@ }, "generalConfig" : { "host" : "https://localhost:9443", -<<<<<<< HEAD - "companyName" : "WSO2 IOTS", - "browserTitle" : "WSO2 IOT", -======= "companyName" : "WSO2 IoT Server", "browserTitle" : "WSO2 IoT Server", ->>>>>>> 05e2cb7bb8db033166a81e327d1c82c83a5a8178 "copyrightPrefix" : "\u00A9 %date-year%, ", "copyrightOwner" : "WSO2 Inc.", "copyrightOwnersSite" : "http://www.wso2.org",