Merge pull request #385 from ayyoob/commit-fixes

Commit fixes
revert-dabc3590
Ruwan 8 years ago committed by GitHub
commit f81a980f59

@ -86,8 +86,7 @@ public class AndroidSenseServiceImpl implements AndroidSenseService {
log.error(e.getErrorMessage(), e); log.error(e.getErrorMessage(), e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build(); return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build();
} catch (OperationManagementException e) { } catch (OperationManagementException e) {
String msg = "Error occurred while executing command operation to send keywords"; log.error("Error occurred while executing command operation to send keywords", e);
log.error(msg, e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
} }
} }
@ -125,8 +124,7 @@ public class AndroidSenseServiceImpl implements AndroidSenseService {
} catch (DeviceAccessAuthorizationException e) { } catch (DeviceAccessAuthorizationException e) {
return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build(); return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build();
} catch (OperationManagementException e) { } catch (OperationManagementException e) {
String msg = "Error occurred while executing command operation to set threashold"; log.error("Error occurred while executing command operation to set threashold", e);
log.error(msg, e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
} }
} }
@ -165,8 +163,7 @@ public class AndroidSenseServiceImpl implements AndroidSenseService {
log.error(e.getErrorMessage(), e); log.error(e.getErrorMessage(), e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build(); return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build();
} catch (OperationManagementException e) { } catch (OperationManagementException e) {
String msg = "Error occurred while executing command operation to remove words"; log.error("Error occurred while executing command operation to remove words", e);
log.error(msg, e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
} }
} }

@ -360,7 +360,7 @@ public class UIEventAdapter implements OutputEventAdapter {
// fetch the queryString Key:Value pair map of the given session. // fetch the queryString Key:Value pair map of the given session.
Map<String, String> queryParamValuePairs = webSocketSessionUtil.getQueryParamValuePairs(); Map<String, String> queryParamValuePairs = webSocketSessionUtil.getQueryParamValuePairs();
if (queryParamValuePairs != null) { if (queryParamValuePairs != null && !queryParamValuePairs.isEmpty()) {
// fetch the different attribute values received as part of the current event. // fetch the different attribute values received as part of the current event.
Object[] eventMetaData = event.getMetaData(); Object[] eventMetaData = event.getMetaData();
Object[] eventCorrelationData = event.getCorrelationData(); Object[] eventCorrelationData = event.getCorrelationData();

@ -114,11 +114,9 @@ public class OAuthTokenValidaterStubFactory extends BasePoolableObjectFactory {
client.setOptions(options); client.setOptions(options);
if (hostURL.getProtocol().equals("https")) { if (hostURL.getProtocol().equals("https")) {
// set up ssl factory since axis2 https transport is used. // set up ssl factory since axis2 https transport is used.
EasySSLProtocolSocketFactory sslProtocolSocketFactory = EasySSLProtocolSocketFactory sslProtocolSocketFactory = createProtocolSocketFactory();
createProtocolSocketFactory(); Protocol authhttps = new Protocol(hostURL.getProtocol()
Protocol authhttps = new Protocol(hostURL.getProtocol(), , (ProtocolSocketFactory) sslProtocolSocketFactory, hostURL.getPort());
(ProtocolSocketFactory) sslProtocolSocketFactory,
hostURL.getPort());
Protocol.registerProtocol(hostURL.getProtocol(), authhttps); Protocol.registerProtocol(hostURL.getProtocol(), authhttps);
options.setProperty(HTTPConstants.CUSTOM_PROTOCOL_HANDLER, authhttps); options.setProperty(HTTPConstants.CUSTOM_PROTOCOL_HANDLER, authhttps);
} }

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* you may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -35,7 +35,7 @@ public class WebSocketSessionRequest {
private static final String QUERY_STRING_SEPERATOR = "&"; private static final String QUERY_STRING_SEPERATOR = "&";
private static final String QUERY_KEY_VALUE_SEPERATOR = "="; private static final String QUERY_KEY_VALUE_SEPERATOR = "=";
private Map<String, String> queryParamValuePairs = null; private Map<String, String> queryParamValuePairs = new HashMap<>();
private Session session; private Session session;
public WebSocketSessionRequest(Session session) { public WebSocketSessionRequest(Session session) {
@ -65,9 +65,6 @@ public class WebSocketSessionRequest {
log.warn("Invalid query string [" + queryString + "] passed in."); log.warn("Invalid query string [" + queryString + "] passed in.");
break; break;
} }
if (queryParamValuePairs == null) {
queryParamValuePairs = new HashMap<>();
}
queryParamValuePairs.put(thisQueryParamPair[0], thisQueryParamPair[1]); queryParamValuePairs.put(thisQueryParamPair[0], thisQueryParamPair[1]);
} }
} }

@ -152,11 +152,8 @@ var operationModule = function () {
case iosOperationConstants["DOMAIN_OPERATION_CODE"]: case iosOperationConstants["DOMAIN_OPERATION_CODE"]:
payload = { payload = {
"operation": { "operation": {
"accountDescription": operationData["calendarSubscriptionDescription"], "emailDomains": operationData["emailDomains"],
"hostName": operationData["calendarSubscriptionHostname"], "webDomains": operationData["webDomains"]
"username": operationData["calendarSubscriptionUsername"],
"password": operationData["calendarSubscriptionPassword"],
"useSSL": operationData["calendarSubscriptionUseSSL"]
} }
}; };
break; break;

@ -24,11 +24,9 @@
<i class="fw fw-security fw-stack-2x"></i> <i class="fw fw-security fw-stack-2x"></i>
</span> </span>
Encryption Settings Encryption Settings
<span id="encrypt-storage-configured" class="has-configured status-icon hidden"><i <span id="encrypt-storage-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
class="fw fw-ok"></i></span>
<span id="encrypt-storage-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span> <span id="encrypt-storage-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
<span id="encrypt-storage-error" class="encryption-error status-icon hidden"><i <span id="encrypt-storage-error" class="encryption-error status-icon hidden"><i class="fw fw-error"></i></span>
class="fw fw-error"></i></span>
</a> </a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('wifi', this)"> <a href="javascript:void(0)" onclick="showAdvanceOperation('wifi', this)">
<span class="wr-hidden-operations-icon fw-stack"> <span class="wr-hidden-operations-icon fw-stack">
@ -63,8 +61,7 @@
<i class="fw fw-block fw-stack-2x"></i> <i class="fw fw-block fw-stack-2x"></i>
</span> </span>
Application Restrictions Application Restrictions
<span id="app-restriction-configured" class="has-configured status-icon hidden"><i <span id="app-restriction-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
class="fw fw-ok"></i></span>
<span id="app-restriction-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span> <span id="app-restriction-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
<span id="app-restriction-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span> <span id="app-restriction-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
</a> </a>
@ -105,8 +102,7 @@
</h2> </h2>
<div class="panel-title-description"> <div class="panel-title-description">
This configuration can be used to set a passcode policy to an Android Device. This configuration can be used to set a passcode policy to an Android Device.
Once this configuration profile is installed on a device, corresponding users will not be Once this configuration profile is installed on a device, corresponding users will not be able
able
to modify these settings on their devices. to modify these settings on their devices.
</div> </div>
</div> </div>
@ -259,8 +255,7 @@
</h2> </h2>
<div class="panel-title-description"> <div class="panel-title-description">
This configurations can be used to restrict certain settings on an Android device. This configurations can be used to restrict certain settings on an Android device.
Once this configuration profile is installed on a device, corresponding users will not be Once this configuration profile is installed on a device, corresponding users will not be able
able
to modify these settings on their devices. to modify these settings on their devices.
</div> </div>
</div> </div>
@ -662,8 +657,7 @@
<div> <div>
<ul class="message message-info"> <ul class="message message-info">
<i class="icon fw fw-info"></i> <i class="icon fw fw-info"></i>
<a id="policy-listing-status-msg">Below restrictions will be applied on devices with Android <a id="policy-listing-status-msg">Below restrictions will be applied on devices with Android version 6.0 Marshmallow onwards only.</a>
version 6.0 Marshmallow onwards only.</a>
</ul> </ul>
</div> </div>
<div class="wr-input-control"> <div class="wr-input-control">
@ -697,10 +691,8 @@
</label> </label>
</h2> </h2>
<div class="panel-title-description"> <div class="panel-title-description">
This configuration can be used to encrypt data on an Android device, when the device is This configuration can be used to encrypt data on an Android device, when the device is locked and
locked and make it readable when the passcode is entered. Once this configuration profile is installed on a device,
make it readable when the passcode is entered. Once this configuration profile is installed
on a device,
corresponding users will not be able to modify these settings on their devices. corresponding users will not be able to modify these settings on their devices.
</div> </div>
</div> </div>
@ -744,8 +736,7 @@
</h2> </h2>
<div class="panel-title-description"> <div class="panel-title-description">
This configurations can be used to configure Wi-Fi access on an Android device. This configurations can be used to configure Wi-Fi access on an Android device.
Once this configuration profile is installed on a device, corresponding users will not be Once this configuration profile is installed on a device, corresponding users will not be able
able
to modify these settings on their devices. to modify these settings on their devices.
</div> </div>
</div> </div>
@ -1018,8 +1009,7 @@
</h2> </h2>
<div class="panel-title-description"> <div class="panel-title-description">
This configurations can be used to configure VPN settings on an Android device. This configurations can be used to configure VPN settings on an Android device.
Once this configuration profile is installed on a device, corresponding users will not be Once this configuration profile is installed on a device, corresponding users will not be able
able
to modify these settings on their devices. to modify these settings on their devices.
</div> </div>
</div> </div>
@ -1179,10 +1169,9 @@
</div> </div>
</div> </div>
</div> </div>
<!-- cosu-system-update-policy --> <!-- cosu-system-update-policy -->
<div class="wr-hidden-operation hidden hide" data-operation="cosu-system-update-policy"> <div class="wr-hidden-operation hidden hide" data-operation="cosu-system-update-policy">
<div class="panel panel-default operation-data" data-operation="cosu-system-update-policy" <div class="panel panel-default operation-data" data-operation="cosu-system-update-policy-body"
data-operation-code="SYSTEM_UPDATE_POLICY"> data-operation-code="SYSTEM_UPDATE_POLICY">
<div id="cosu-system-update-policy-heading" class="panel-heading" role="tab"> <div id="cosu-system-update-policy-heading" class="panel-heading" role="tab">
<h2 class="sub-title panel-title"> <h2 class="sub-title panel-title">
@ -1196,8 +1185,7 @@
</h2> </h2>
<div class="panel-title-description"> <div class="panel-title-description">
This configuration can be used to set a passcode policy to an Android Device. This configuration can be used to set a passcode policy to an Android Device.
Once this configuration profile is installed on a device, corresponding users will not be Once this configuration profile is installed on a device, corresponding users will not be able
able
to modify these settings on their devices. to modify these settings on their devices.
</div> </div>
</div> </div>
@ -1326,7 +1314,6 @@
</div> </div>
</div> </div>
</div> </div>
<!-- cosu-whitelist-applications --> <!-- cosu-whitelist-applications -->
<div class="wr-hidden-operation hidden hide" data-operation="cosu-whitelisted-applications"> <div class="wr-hidden-operation hidden hide" data-operation="cosu-whitelisted-applications">
<div class="panel panel-default operation-data" data-operation="cosu-whitelisted-applications" <div class="panel panel-default operation-data" data-operation="cosu-whitelisted-applications"
@ -1343,8 +1330,7 @@
</h2> </h2>
<div class="panel-title-description"> <div class="panel-title-description">
This configuration can be used to set a passcode policy to an Android Device. This configuration can be used to set a passcode policy to an Android Device.
Once this configuration profile is installed on a device, corresponding users will not be Once this configuration profile is installed on a device, corresponding users will not be able
able
to modify these settings on their devices. to modify these settings on their devices.
</div> </div>
</div> </div>
@ -1367,7 +1353,6 @@
<i class="fw fw-add fw-stack-1x"></i> <i class="fw fw-add fw-stack-1x"></i>
<i class="fw fw-ring fw-stack-2x"></i> <i class="fw fw-ring fw-stack-2x"></i>
</span> </span>
Add Application Add Application
</a> </a>
</label> </label>

@ -3736,7 +3736,7 @@
</label> </label>
</div> </div>
</li> </li>
<li> <li style="visibility:hidden; position:absolute">
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="restrictions-allow-Chat" type="checkbox" class="operationDataKeys" <input id="restrictions-allow-Chat" type="checkbox" class="operationDataKeys"

@ -524,8 +524,7 @@ validateStep["policy-profile"] = function () {
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
} } else {
else {
childInputCount = 0; childInputCount = 0;
childInputArray = []; childInputArray = [];
emptyChildInputCount = 0; emptyChildInputCount = 0;
@ -565,8 +564,8 @@ validateStep["policy-profile"] = function () {
// If empty child inputs are present // If empty child inputs are present
validationStatus = { validationStatus = {
"error": true, "error": true,
"subErrorMsg": "One or more package names of " + "subErrorMsg": "One or more package names of applications are" +
"applications are empty.", " empty.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
@ -574,8 +573,7 @@ validateStep["policy-profile"] = function () {
// If duplicate input is present // If duplicate input is present
validationStatus = { validationStatus = {
"error": true, "error": true,
"subErrorMsg": "Duplicate values exist with " + "subErrorMsg": "Duplicate values exist with for package names.",
"for package names.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
@ -2321,14 +2319,12 @@ var slideDownPaneAgainstValueSet = function (selectElement, paneID, valueSet) {
var slideDownPaneAgainstValueSetForRadioButtons = function (selectElement, paneID, valueSet) { var slideDownPaneAgainstValueSetForRadioButtons = function (selectElement, paneID, valueSet) {
var selectedValueOnChange = selectElement.value; var selectedValueOnChange = selectElement.value;
var i, slideDownVotes = 0; var i, slideDownVotes = 0;
for (i = 0; i < valueSet.length; i++) { for (i = 0; i < valueSet.length; i++) {
if (selectedValueOnChange == valueSet[i]) { if (selectedValueOnChange == valueSet[i]) {
slideDownVotes++; slideDownVotes++;
} }
} }
var paneSelector = "#" + paneID; var paneSelector = "#" + paneID;
if (slideDownVotes > 0) { if (slideDownVotes > 0) {
$(paneSelector).removeClass("hidden"); $(paneSelector).removeClass("hidden");

@ -1314,9 +1314,7 @@
</div> </div>
</div> </div>
</div> </div>
<!-- cosu-system-update-policy --> <!-- cosu-system-update-policy -->
<!--
<div class="wr-hidden-operation" data-operation="cosu-system-update-policy"> <div class="wr-hidden-operation" data-operation="cosu-system-update-policy">
<div class="panel panel-default operation-data" data-operation="cosu-system-update-policy" <div class="panel panel-default operation-data" data-operation="cosu-system-update-policy"
data-operation-code="SYSTEM_UPDATE_POLICY"> data-operation-code="SYSTEM_UPDATE_POLICY">
@ -1332,8 +1330,7 @@
<hr> <hr>
<div class="panel-title-description"> <div class="panel-title-description">
This configuration can be used to set system update policy to an Android Device in COSU. This configuration can be used to set system update policy to an Android Device in COSU.
Once this configuration profile is installed on a device, corresponding users will not be Once this configuration profile is installed on a device, corresponding users will not be able
able
to modify these settings on their devices. to modify these settings on their devices.
</div> </div>
</h2> </h2>
@ -1464,9 +1461,7 @@
</div> </div>
</div> </div>
</div> </div>
-->
<!-- cosu-whitelist-applications --> <!-- cosu-whitelist-applications -->
<!--
<div class="wr-hidden-operation" data-operation="cosu-whitelisted-applications"> <div class="wr-hidden-operation" data-operation="cosu-whitelisted-applications">
<div class="panel panel-default operation-data" data-operation="cosu-whitelisted-applications" <div class="panel panel-default operation-data" data-operation="cosu-whitelisted-applications"
data-operation-code="KIOSK_APPS"> data-operation-code="KIOSK_APPS">
@ -1482,8 +1477,7 @@
<hr> <hr>
<div class="panel-title-description"> <div class="panel-title-description">
This configuration can be used to whitelist applications in lock task mode of an Android Device in COSU. This configuration can be used to whitelist applications in lock task mode of an Android Device in COSU.
Once this configuration profile is installed on a device, corresponding users will not be Once this configuration profile is installed on a device, corresponding users will not be able
able
to modify these settings on their devices. to modify these settings on their devices.
</div> </div>
</h2> </h2>
@ -1563,6 +1557,5 @@
</div> </div>
</div> </div>
</div> </div>
-->
</div> </div>
</div> </div>

@ -3840,7 +3840,7 @@
</label> </label>
</div> </div>
</li> </li>
<li> <li style="visibility:hidden; position:absolute">
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="restrictions-allow-Chat" type="checkbox" class="operationDataKeys" <input id="restrictions-allow-Chat" type="checkbox" class="operationDataKeys"

@ -83,7 +83,6 @@
<span id="cosu-whitelisted-applications-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span> <span id="cosu-whitelisted-applications-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
</a> </a>
</div> </div>
<div class="wr-hidden-operations-content col-lg-8"> <div class="wr-hidden-operations-content col-lg-8">
<!-- passcode-policy --> <!-- passcode-policy -->
<div class="wr-hidden-operation" data-operation="passcode-policy" style="display: block"> <div class="wr-hidden-operation" data-operation="passcode-policy" style="display: block">
@ -1238,7 +1237,6 @@
</div> </div>
</div> </div>
</div> </div>
<!-- cosu-system-update-policy --> <!-- cosu-system-update-policy -->
<div class="wr-hidden-operation hide" data-operation="cosu-system-update-policy"> <div class="wr-hidden-operation hide" data-operation="cosu-system-update-policy">
<div class="panel panel-default operation-data" data-operation="cosu-system-update-policy" <div class="panel panel-default operation-data" data-operation="cosu-system-update-policy"
@ -1385,7 +1383,6 @@
</div> </div>
</div> </div>
</div> </div>
<!-- cosu-whitelist-applications --> <!-- cosu-whitelist-applications -->
<div class="wr-hidden-operation hide" data-operation="cosu-whitelisted-applications"> <div class="wr-hidden-operation hide" data-operation="cosu-whitelisted-applications">
<div class="panel panel-default operation-data" data-operation="cosu-whitelisted-applications" <div class="panel panel-default operation-data" data-operation="cosu-whitelisted-applications"

@ -3888,7 +3888,7 @@
</label> </label>
</div> </div>
</li> </li>
<li> <li style="visibility:hidden; position:absolute">
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="restrictions-allow-Chat" type="checkbox" class="operationDataKeys" <input id="restrictions-allow-Chat" type="checkbox" class="operationDataKeys"

Loading…
Cancel
Save