fixing errors

application-manager-new
Rasika 10 years ago
parent d04f8a22b7
commit f435d6d1b4

@ -177,7 +177,7 @@ deviceModule = function () {
var data = {}; var data = {};
//XMLHTTPRequest's POST //XMLHTTPRequest's POST
return post(updateDeviceEndpoint+ "?name="+device.name, data, "json"); return post(updateDeviceEndpoint+ "?name="+device.name, data, "text");
}; };
/* /*

@ -11,7 +11,7 @@
<div class="tile-stats"> <div class="tile-stats">
<span id="device-count">Loading...</span> <span id="device-count">Loading...</span>
<span class="tile-stats-free"> <span class="tile-stats-free">
<a href="home.html"> <a href="devices/">
<span class="fw-stack"> <span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i> <i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-view fw-stack-1x"></i> <i class="fw fw-view fw-stack-1x"></i>
@ -23,6 +23,7 @@
</div> </div>
</div> </div>
</div> </div>
{{#if permissions.ADD_USER}}
<div class="col-md-4"> <div class="col-md-4">
<div class="wr-stats-board-tile"> <div class="wr-stats-board-tile">
<div class="tile-name">Users</div> <div class="tile-name">Users</div>
@ -50,6 +51,7 @@
</div> </div>
</div> </div>
</div> </div>
{{/if}}
<div class="col-md-4"> <div class="col-md-4">
<div class="wr-stats-board-tile"> <div class="wr-stats-board-tile">
<div class="tile-name">Policies</div> <div class="tile-name">Policies</div>

@ -1,3 +1,6 @@
function onRequest(context){ function onRequest(context){
var userModule = require("/modules/user.js").userModule;
var permissions = userModule.getUIPermissions();
context.permissions = permissions;
return context; return context;
} }

@ -301,8 +301,7 @@ function attachEvents() {
showPopup(); showPopup();
$("a#edit-device-yes-link").click(function () { $("a#edit-device-yes-link").click(function () {
device={}; var device={"device":{"name" : $('#edit-device-name').val()}};
device.name = $('#edit-device-name').val();
invokerUtil.post( invokerUtil.post(
editDeviceAPI, editDeviceAPI,
device, device,

@ -20,21 +20,21 @@
<span class="ast-published">{{status}}</span> <span class="ast-published">{{status}}</span>
<div class="ast-btn-group"> <div class="ast-btn-group">
<a href="/iotserver/device/{{type}}/{{id}}"> <a href="/iotserver/device/{{type}}/{{deviceIdentifier}}">
<span class="fw-stack"> <span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i> <i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-view fw-stack-1x"></i> <i class="fw fw-view fw-stack-1x"></i>
</span> </span>
<span class="lbl-action">View</span> <span class="lbl-action">View</span>
</a> </a>
<a href="#" class="edit-device-link" data-deviceid="{{id}}" data-devicetype="{{type}}" data-devicename="{{name}}"> <a href="#" class="edit-device-link" data-deviceid="{{deviceIdentifier}}" data-devicetype="{{type}}" data-devicename="{{name}}">
<span class="fw-stack"> <span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i> <i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-edit fw-stack-1x"></i> <i class="fw fw-edit fw-stack-1x"></i>
</span> </span>
<span class="lbl-action">Edit</span> <span class="lbl-action">Edit</span>
</a> </a>
<a href="#" class="remove-device-link" data-deviceid="{{id}}" data-devicetype="{{type}}"> <a href="#" class="remove-device-link" data-deviceid="{{deviceIdentifier}}" data-devicetype="{{type}}">
<span class="fw-stack"> <span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i> <i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-delete fw-stack-1x"></i> <i class="fw fw-delete fw-stack-1x"></i>

Loading…
Cancel
Save