fixing errors

merge-requests/1/head
Rasika 10 years ago
parent d04f8a22b7
commit f435d6d1b4

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

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

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

@ -20,21 +20,21 @@
<span class="ast-published">{{status}}</span>
<div class="ast-btn-group">
<a href="/iotserver/device/{{type}}/{{id}}">
<a href="/iotserver/device/{{type}}/{{deviceIdentifier}}">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-view fw-stack-1x"></i>
</span>
<span class="lbl-action">View</span>
</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">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-edit fw-stack-1x"></i>
</span>
<span class="lbl-action">Edit</span>
</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">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-delete fw-stack-1x"></i>

Loading…
Cancel
Save