Merge pull request #1050 from sinthuja/origin-master

Resolving conflicts of https://github.com/wso2/product-iots/pull/1049.
application-manager-new
sinthuja 8 years ago committed by GitHub
commit 38781c2c91

@ -1,3 +1,21 @@
{{!
Copyright (c) 2017, 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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
}}
{{#zone "topCss"}} {{#zone "topCss"}}
<style> <style>
.thumbnail.icon:before { .thumbnail.icon:before {
@ -40,7 +58,7 @@
<h4>Device Operations</h4> <h4>Device Operations</h4>
</div> </div>
<div class="buttons"> <div class="buttons">
<a class="btn-operations" target="_blank" <a class="btn-operations" target="_blank"
href="{{../device.ip}}/connected-cup-agent/index.jsp?deviceOwner={{@user.username}}&tenantDomain={{@user.domain}}&deviceId={{../device.deviceIdentifier}}&token={{../device.accessToken}}" > href="{{../device.ip}}/connected-cup-agent/index.jsp?deviceOwner={{@user.username}}&tenantDomain={{@user.domain}}&deviceId={{../device.deviceIdentifier}}&token={{../device.accessToken}}" >
Go To Device Go To Device
</a> </a>

@ -36,7 +36,7 @@ function onRequest(context) {
token = tokenPair.accessToken; token = tokenPair.accessToken;
} }
websocketEndpoint = websocketEndpoint + "/secured-websocket/org.wso2.iot.devices.temperature/1.0.0?" websocketEndpoint = websocketEndpoint + "/secured-websocket/org.wso2.iot.devices.temperature/1.0.0?"
+ "deviceId=" + device.deviceIdentifier + "&deviceType=" + device.type; + "deviceId=" + device.deviceIdentifier + "&deviceType=" + device.type+ "&websocketToken=" + token;
var websocketToken= {'name':'websocket-token','value': token, 'path':'/', "maxAge":18000}; var websocketToken= {'name':'websocket-token','value': token, 'path':'/', "maxAge":18000};
response.addCookie(websocketToken); response.addCookie(websocketToken);
} }

@ -138,7 +138,7 @@ function doAction(data) {
window.location = '/devicemgt/login'; window.location = '/devicemgt/login';
}); });
showPopup(); showPopup();
} else if (data == 403) { } else if (data.status == 403) {
$(modalPopupContent).html($('#device-403-content').html()); $(modalPopupContent).html($('#device-403-content').html());
$('#device-403-link').click(function () { $('#device-403-link').click(function () {
window.location = '/devicemgt/login'; window.location = '/devicemgt/login';

Loading…
Cancel
Save