96
features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/alldevices/public/js/alldevices_util.js → features/device-mgt-iot/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/alldevices/public/js/alldevices_util.js
@ -1,49 +1,49 @@
|
||||
function getAllDevices() {
|
||||
var getDevicesRequest = $.ajax({
|
||||
url: "api/devices/all/",
|
||||
method: "GET",
|
||||
contentType: "application/json"
|
||||
});
|
||||
|
||||
getDevicesRequest.done(function (data) {
|
||||
updateDevicesTable(JSON.parse(data));
|
||||
});
|
||||
|
||||
getDevicesRequest.fail(function (jqXHR, textStatus) {
|
||||
var err = jqXHR;
|
||||
alert("Request failed: " + textStatus);
|
||||
});
|
||||
}
|
||||
|
||||
function updateDevicesTable(data) {
|
||||
devices = data.data.device;
|
||||
if (devices.length > 0) {
|
||||
clearTable('devicesTable');
|
||||
for (var i = 0; i < devices.length; i++) {
|
||||
var deviceIdentifier = devices[i].deviceIdentifier;
|
||||
var deviceName = devices[i].name;
|
||||
var deviceType = devices[i].type;
|
||||
$('#devicesTable tbody').append(
|
||||
"<tr class='border-top'><th scope='row'>" + deviceIdentifier + "</th>" +
|
||||
"<td>" + deviceName + "</td>" +
|
||||
"<td>" + deviceType + "</td>" +
|
||||
"<td class='float-right border-top '>" +
|
||||
"<input type='hidden' name='deviceType' value='" + deviceType + "' >" +
|
||||
"<button class='btn-black-action' name='deviceId' value='" + deviceIdentifier + "'>" +
|
||||
"<i class='fw fw-view padding-right'></i>View</button>" +
|
||||
"<button class='btn-black-action' name='deviceId' value='" + deviceIdentifier + "'>" +
|
||||
"<i class='fw fw-edit padding-right'></i>Edit</button>" +
|
||||
"<button class='btn-black-action' name='deviceId' value='" + deviceIdentifier + "'>" +
|
||||
"<i class='fw fw-delete padding-right'></i>Remove</button>" +
|
||||
"</td></tr>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function clearTable(tableId) {
|
||||
$('#' + tableId + ' tbody > tr').remove();
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
getAllDevices();
|
||||
function getAllDevices() {
|
||||
var getDevicesRequest = $.ajax({
|
||||
url: "api/devices/all/",
|
||||
method: "GET",
|
||||
contentType: "application/json"
|
||||
});
|
||||
|
||||
getDevicesRequest.done(function (data) {
|
||||
updateDevicesTable(JSON.parse(data));
|
||||
});
|
||||
|
||||
getDevicesRequest.fail(function (jqXHR, textStatus) {
|
||||
var err = jqXHR;
|
||||
alert("Request failed: " + textStatus);
|
||||
});
|
||||
}
|
||||
|
||||
function updateDevicesTable(data) {
|
||||
devices = data.data.device;
|
||||
if (devices.length > 0) {
|
||||
clearTable('devicesTable');
|
||||
for (var i = 0; i < devices.length; i++) {
|
||||
var deviceIdentifier = devices[i].deviceIdentifier;
|
||||
var deviceName = devices[i].name;
|
||||
var deviceType = devices[i].type;
|
||||
$('#devicesTable tbody').append(
|
||||
"<tr class='border-top'><th scope='row'>" + deviceIdentifier + "</th>" +
|
||||
"<td>" + deviceName + "</td>" +
|
||||
"<td>" + deviceType + "</td>" +
|
||||
"<td class='float-right border-top '>" +
|
||||
"<input type='hidden' name='deviceType' value='" + deviceType + "' >" +
|
||||
"<button class='btn-black-action' name='deviceId' value='" + deviceIdentifier + "'>" +
|
||||
"<i class='fw fw-view padding-right'></i>View</button>" +
|
||||
"<button class='btn-black-action' name='deviceId' value='" + deviceIdentifier + "'>" +
|
||||
"<i class='fw fw-edit padding-right'></i>Edit</button>" +
|
||||
"<button class='btn-black-action' name='deviceId' value='" + deviceIdentifier + "'>" +
|
||||
"<i class='fw fw-delete padding-right'></i>Remove</button>" +
|
||||
"</td></tr>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function clearTable(tableId) {
|
||||
$('#' + tableId + ' tbody > tr').remove();
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
getAllDevices();
|
||||
});
|
0
features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/analytics/public/images/bulb-off.png → features/device-mgt-iot/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/analytics/public/images/bulb-off.png
Before Width: | Height: | Size: 516 B After Width: | Height: | Size: 516 B |
0
features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/analytics/public/images/bulb-on.png → features/device-mgt-iot/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/analytics/public/images/bulb-on.png
Before Width: | Height: | Size: 451 B After Width: | Height: | Size: 451 B |
Before Width: | Height: | Size: 650 B After Width: | Height: | Size: 650 B |
Before Width: | Height: | Size: 373 B After Width: | Height: | Size: 373 B |
0
features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/analytics/public/js/d3.min.js → features/device-mgt-iot/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/analytics/public/js/d3.min.js
vendored
0
features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/analytics/public/js/jquery-ui-timepicker-addon.js → features/device-mgt-iot/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/analytics/public/js/jquery-ui-timepicker-addon.js
vendored
0
features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/analytics/public/js/jquery.daterangepicker.js → features/device-mgt-iot/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/analytics/public/js/jquery.daterangepicker.js
0
features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/analytics/public/js/moment.min.js → features/device-mgt-iot/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/analytics/public/js/moment.min.js
vendored
0
features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/analytics/public/js/rickshaw.min.js → features/device-mgt-iot/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/analytics/public/js/rickshaw.min.js
vendored
@ -1,56 +1,56 @@
|
||||
{{#zone "main"}}
|
||||
|
||||
<!-- new markup -->
|
||||
<!-- secondary header - app bar -->
|
||||
<div id="nav" class="row wr-app-bar">
|
||||
<div class="wr-action-container">
|
||||
<div class="wr-action-btn-bar">
|
||||
<a href="javascript:openCollapsedNav()" class="cu-btn wr-hidden-nav-toggle-btn">
|
||||
<i class="fw fw-tiles fw-2x"></i>
|
||||
</a><a class="cu-btn page-title" href='javascript:location.reload();'>
|
||||
<span class="fw-stack"></span>
|
||||
{{title}}
|
||||
</a>{{#each currentActions}}<a href="{{url}}" class="cu-btn {{class}}">
|
||||
<span class="fw-stack">
|
||||
<i class="fw fw-ring fw-stack-2x"></i>
|
||||
<i class="fw {{icon}} fw-stack-1x"></i>
|
||||
</span>
|
||||
{{title}}
|
||||
</a>
|
||||
{{/each}}{{#if enableBack}}<a href="javascript:history.go(-1)" class="cu-btn">
|
||||
<span class="fw-stack">
|
||||
<i class="fw fw-ring fw-stack-2x"></i>
|
||||
<i class="fw fw-left-arrow fw-stack-1x"></i>
|
||||
</span>
|
||||
Go Back
|
||||
</a>
|
||||
{{/if}}
|
||||
<a href="javascript:toggleNotificationbar()" class="cu-btn wr-notification-toggle-btn">
|
||||
<span class="fw-stack-md">
|
||||
<i class="fw fw-bell fw-stack-1-5x"></i>
|
||||
</span>
|
||||
<span class="wr-notification-bubble">0</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- secondary header - app bar -->
|
||||
|
||||
<!-- common navigation -->
|
||||
<div id="hiddenNav" class="wr-hidden-nav">
|
||||
<ul>
|
||||
<li><a href="/iotserver/dashboard"><i class="fw fw-dashboard"></i>Dashboard</a></li>
|
||||
<li><a href="/iotserver/devices"><i class="fw fw-devices"></i>My Devices</a></li>
|
||||
<li><a href="/iotserver/groups"><i class="fw fw-grouping"></i>My Groups</a></li>
|
||||
{{#if permissions.ADD_USER}}
|
||||
<li><a href="/iotserver/users"><i class="fw fw-user"></i>User Management</a></li>
|
||||
{{/if}}
|
||||
<li><a href="/iotserver/policies"><i class="fw fw-policy"></i>Policy Management</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- /common navigation -->
|
||||
|
||||
|
||||
|
||||
|
||||
{{#zone "main"}}
|
||||
|
||||
<!-- new markup -->
|
||||
<!-- secondary header - app bar -->
|
||||
<div id="nav" class="row wr-app-bar">
|
||||
<div class="wr-action-container">
|
||||
<div class="wr-action-btn-bar">
|
||||
<a href="javascript:openCollapsedNav()" class="cu-btn wr-hidden-nav-toggle-btn">
|
||||
<i class="fw fw-tiles fw-2x"></i>
|
||||
</a><a class="cu-btn page-title" href='javascript:location.reload();'>
|
||||
<span class="fw-stack"></span>
|
||||
{{title}}
|
||||
</a>{{#each currentActions}}<a href="{{url}}" class="cu-btn {{class}}">
|
||||
<span class="fw-stack">
|
||||
<i class="fw fw-ring fw-stack-2x"></i>
|
||||
<i class="fw {{icon}} fw-stack-1x"></i>
|
||||
</span>
|
||||
{{title}}
|
||||
</a>
|
||||
{{/each}}{{#if enableBack}}<a href="javascript:history.go(-1)" class="cu-btn">
|
||||
<span class="fw-stack">
|
||||
<i class="fw fw-ring fw-stack-2x"></i>
|
||||
<i class="fw fw-left-arrow fw-stack-1x"></i>
|
||||
</span>
|
||||
Go Back
|
||||
</a>
|
||||
{{/if}}
|
||||
<a href="javascript:toggleNotificationbar()" class="cu-btn wr-notification-toggle-btn">
|
||||
<span class="fw-stack-md">
|
||||
<i class="fw fw-bell fw-stack-1-5x"></i>
|
||||
</span>
|
||||
<span class="wr-notification-bubble">0</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- secondary header - app bar -->
|
||||
|
||||
<!-- common navigation -->
|
||||
<div id="hiddenNav" class="wr-hidden-nav">
|
||||
<ul>
|
||||
<li><a href="/iotserver/dashboard"><i class="fw fw-dashboard"></i>Dashboard</a></li>
|
||||
<li><a href="/iotserver/devices"><i class="fw fw-devices"></i>My Devices</a></li>
|
||||
<li><a href="/iotserver/groups"><i class="fw fw-grouping"></i>My Groups</a></li>
|
||||
{{#if permissions.ADD_USER}}
|
||||
<li><a href="/iotserver/users"><i class="fw fw-user"></i>User Management</a></li>
|
||||
{{/if}}
|
||||
<li><a href="/iotserver/policies"><i class="fw fw-policy"></i>Policy Management</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- /common navigation -->
|
||||
|
||||
|
||||
|
||||
|
||||
{{/zone}}
|
0
features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/device-detail/public/img/device_icons/android.png → features/device-mgt-iot/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/device-detail/public/img/device_icons/android.png
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
0
features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/device-detail/public/img/device_icons/arduino.png → features/device-mgt-iot/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/device-detail/public/img/device_icons/arduino.png
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
0
features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/device-detail/public/img/device_icons/digital_display.png → features/device-mgt-iot/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/device-detail/public/img/device_icons/digital_display.png
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
0
features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/device-detail/public/img/device_icons/firealarm.png → features/device-mgt-iot/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/device-detail/public/img/device_icons/firealarm.png
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
0
features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/device-detail/public/img/device_icons/ios.png → features/device-mgt-iot/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/device-detail/public/img/device_icons/ios.png
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
0
features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/device-detail/public/img/device_icons/raspberrypi.png → features/device-mgt-iot/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/device-detail/public/img/device_icons/raspberrypi.png
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
0
features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/device-detail/public/img/device_icons/sensebot.png → features/device-mgt-iot/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/device-detail/public/img/device_icons/sensebot.png
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
0
features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/device-detail/public/img/graph.png → features/device-mgt-iot/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/device-detail/public/img/graph.png
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
0
features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/device-detail/public/js/device-detail.js → features/device-mgt-iot/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/device-detail/public/js/device-detail.js
0
features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/events/public/templates/event-stream.hbs → features/device-mgt-iot/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/events/public/templates/event-stream.hbs
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
0
features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/group-detail/public/img/group-icon.png → features/device-mgt-iot/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/iotserver/units/group-detail/public/img/group-icon.png
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |