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);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build();
} catch (OperationManagementException e) {
String msg = "Error occurred while executing command operation to send keywords";
log.error(msg, e);
log.error("Error occurred while executing command operation to send keywords", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
}
}
@ -125,8 +124,7 @@ public class AndroidSenseServiceImpl implements AndroidSenseService {
} catch (DeviceAccessAuthorizationException e) {
return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build();
} catch (OperationManagementException e) {
String msg = "Error occurred while executing command operation to set threashold";
log.error(msg, e);
log.error("Error occurred while executing command operation to set threashold", e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
}
}
@ -165,8 +163,7 @@ public class AndroidSenseServiceImpl implements AndroidSenseService {
log.error(e.getErrorMessage(), e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build();
} catch (OperationManagementException e) {
String msg = "Error occurred while executing command operation to remove words";
log.error(msg, e);
log.error("Error occurred while executing command operation to remove words", e);
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.
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.
Object[] eventMetaData = event.getMetaData();
Object[] eventCorrelationData = event.getCorrelationData();

@ -114,11 +114,9 @@ public class OAuthTokenValidaterStubFactory extends BasePoolableObjectFactory {
client.setOptions(options);
if (hostURL.getProtocol().equals("https")) {
// set up ssl factory since axis2 https transport is used.
EasySSLProtocolSocketFactory sslProtocolSocketFactory =
createProtocolSocketFactory();
Protocol authhttps = new Protocol(hostURL.getProtocol(),
(ProtocolSocketFactory) sslProtocolSocketFactory,
hostURL.getPort());
EasySSLProtocolSocketFactory sslProtocolSocketFactory = createProtocolSocketFactory();
Protocol authhttps = new Protocol(hostURL.getProtocol()
, (ProtocolSocketFactory) sslProtocolSocketFactory, hostURL.getPort());
Protocol.registerProtocol(hostURL.getProtocol(), 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,
* Version 2.0 (the "License"); you may not use this file except
* 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
*
@ -35,7 +35,7 @@ public class WebSocketSessionRequest {
private static final String QUERY_STRING_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;
public WebSocketSessionRequest(Session session) {
@ -65,9 +65,6 @@ public class WebSocketSessionRequest {
log.warn("Invalid query string [" + queryString + "] passed in.");
break;
}
if (queryParamValuePairs == null) {
queryParamValuePairs = new HashMap<>();
}
queryParamValuePairs.put(thisQueryParamPair[0], thisQueryParamPair[1]);
}
}

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

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

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

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

@ -1314,9 +1314,7 @@
</div>
</div>
</div>
<!-- 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"
data-operation-code="SYSTEM_UPDATE_POLICY">
@ -1332,8 +1330,7 @@
<hr>
<div class="panel-title-description">
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
able
Once this configuration profile is installed on a device, corresponding users will not be able
to modify these settings on their devices.
</div>
</h2>
@ -1464,9 +1461,7 @@
</div>
</div>
</div>
-->
<!-- cosu-whitelist-applications -->
<!--
<div class="wr-hidden-operation" data-operation="cosu-whitelisted-applications">
<div class="panel panel-default operation-data" data-operation="cosu-whitelisted-applications"
data-operation-code="KIOSK_APPS">
@ -1482,8 +1477,7 @@
<hr>
<div class="panel-title-description">
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
able
Once this configuration profile is installed on a device, corresponding users will not be able
to modify these settings on their devices.
</div>
</h2>
@ -1563,6 +1557,5 @@
</div>
</div>
</div>
-->
</div>
</div>

@ -3840,7 +3840,7 @@
</label>
</div>
</li>
<li>
<li style="visibility:hidden; position:absolute">
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<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>
</a>
</div>
<div class="wr-hidden-operations-content col-lg-8">
<!-- passcode-policy -->
<div class="wr-hidden-operation" data-operation="passcode-policy" style="display: block">
@ -1238,7 +1237,6 @@
</div>
</div>
</div>
<!-- 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"
@ -1385,7 +1383,6 @@
</div>
</div>
</div>
<!-- cosu-whitelist-applications -->
<div class="wr-hidden-operation hide" data-operation="cosu-whitelisted-applications">
<div class="panel panel-default operation-data" data-operation="cosu-whitelisted-applications"

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

Loading…
Cancel
Save