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() {
|
function getAllDevices() {
|
||||||
var getDevicesRequest = $.ajax({
|
var getDevicesRequest = $.ajax({
|
||||||
url: "api/devices/all/",
|
url: "api/devices/all/",
|
||||||
method: "GET",
|
method: "GET",
|
||||||
contentType: "application/json"
|
contentType: "application/json"
|
||||||
});
|
});
|
||||||
|
|
||||||
getDevicesRequest.done(function (data) {
|
getDevicesRequest.done(function (data) {
|
||||||
updateDevicesTable(JSON.parse(data));
|
updateDevicesTable(JSON.parse(data));
|
||||||
});
|
});
|
||||||
|
|
||||||
getDevicesRequest.fail(function (jqXHR, textStatus) {
|
getDevicesRequest.fail(function (jqXHR, textStatus) {
|
||||||
var err = jqXHR;
|
var err = jqXHR;
|
||||||
alert("Request failed: " + textStatus);
|
alert("Request failed: " + textStatus);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateDevicesTable(data) {
|
function updateDevicesTable(data) {
|
||||||
devices = data.data.device;
|
devices = data.data.device;
|
||||||
if (devices.length > 0) {
|
if (devices.length > 0) {
|
||||||
clearTable('devicesTable');
|
clearTable('devicesTable');
|
||||||
for (var i = 0; i < devices.length; i++) {
|
for (var i = 0; i < devices.length; i++) {
|
||||||
var deviceIdentifier = devices[i].deviceIdentifier;
|
var deviceIdentifier = devices[i].deviceIdentifier;
|
||||||
var deviceName = devices[i].name;
|
var deviceName = devices[i].name;
|
||||||
var deviceType = devices[i].type;
|
var deviceType = devices[i].type;
|
||||||
$('#devicesTable tbody').append(
|
$('#devicesTable tbody').append(
|
||||||
"<tr class='border-top'><th scope='row'>" + deviceIdentifier + "</th>" +
|
"<tr class='border-top'><th scope='row'>" + deviceIdentifier + "</th>" +
|
||||||
"<td>" + deviceName + "</td>" +
|
"<td>" + deviceName + "</td>" +
|
||||||
"<td>" + deviceType + "</td>" +
|
"<td>" + deviceType + "</td>" +
|
||||||
"<td class='float-right border-top '>" +
|
"<td class='float-right border-top '>" +
|
||||||
"<input type='hidden' name='deviceType' value='" + deviceType + "' >" +
|
"<input type='hidden' name='deviceType' value='" + deviceType + "' >" +
|
||||||
"<button class='btn-black-action' name='deviceId' value='" + deviceIdentifier + "'>" +
|
"<button class='btn-black-action' name='deviceId' value='" + deviceIdentifier + "'>" +
|
||||||
"<i class='fw fw-view padding-right'></i>View</button>" +
|
"<i class='fw fw-view padding-right'></i>View</button>" +
|
||||||
"<button class='btn-black-action' name='deviceId' value='" + deviceIdentifier + "'>" +
|
"<button class='btn-black-action' name='deviceId' value='" + deviceIdentifier + "'>" +
|
||||||
"<i class='fw fw-edit padding-right'></i>Edit</button>" +
|
"<i class='fw fw-edit padding-right'></i>Edit</button>" +
|
||||||
"<button class='btn-black-action' name='deviceId' value='" + deviceIdentifier + "'>" +
|
"<button class='btn-black-action' name='deviceId' value='" + deviceIdentifier + "'>" +
|
||||||
"<i class='fw fw-delete padding-right'></i>Remove</button>" +
|
"<i class='fw fw-delete padding-right'></i>Remove</button>" +
|
||||||
"</td></tr>");
|
"</td></tr>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearTable(tableId) {
|
function clearTable(tableId) {
|
||||||
$('#' + tableId + ' tbody > tr').remove();
|
$('#' + tableId + ' tbody > tr').remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
getAllDevices();
|
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"}}
|
{{#zone "main"}}
|
||||||
|
|
||||||
<!-- new markup -->
|
<!-- new markup -->
|
||||||
<!-- secondary header - app bar -->
|
<!-- secondary header - app bar -->
|
||||||
<div id="nav" class="row wr-app-bar">
|
<div id="nav" class="row wr-app-bar">
|
||||||
<div class="wr-action-container">
|
<div class="wr-action-container">
|
||||||
<div class="wr-action-btn-bar">
|
<div class="wr-action-btn-bar">
|
||||||
<a href="javascript:openCollapsedNav()" class="cu-btn wr-hidden-nav-toggle-btn">
|
<a href="javascript:openCollapsedNav()" class="cu-btn wr-hidden-nav-toggle-btn">
|
||||||
<i class="fw fw-tiles fw-2x"></i>
|
<i class="fw fw-tiles fw-2x"></i>
|
||||||
</a><a class="cu-btn page-title" href='javascript:location.reload();'>
|
</a><a class="cu-btn page-title" href='javascript:location.reload();'>
|
||||||
<span class="fw-stack"></span>
|
<span class="fw-stack"></span>
|
||||||
{{title}}
|
{{title}}
|
||||||
</a>{{#each currentActions}}<a href="{{url}}" class="cu-btn {{class}}">
|
</a>{{#each currentActions}}<a href="{{url}}" class="cu-btn {{class}}">
|
||||||
<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 {{icon}} fw-stack-1x"></i>
|
<i class="fw {{icon}} fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
{{title}}
|
{{title}}
|
||||||
</a>
|
</a>
|
||||||
{{/each}}{{#if enableBack}}<a href="javascript:history.go(-1)" class="cu-btn">
|
{{/each}}{{#if enableBack}}<a href="javascript:history.go(-1)" class="cu-btn">
|
||||||
<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-left-arrow fw-stack-1x"></i>
|
<i class="fw fw-left-arrow fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
Go Back
|
Go Back
|
||||||
</a>
|
</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<a href="javascript:toggleNotificationbar()" class="cu-btn wr-notification-toggle-btn">
|
<a href="javascript:toggleNotificationbar()" class="cu-btn wr-notification-toggle-btn">
|
||||||
<span class="fw-stack-md">
|
<span class="fw-stack-md">
|
||||||
<i class="fw fw-bell fw-stack-1-5x"></i>
|
<i class="fw fw-bell fw-stack-1-5x"></i>
|
||||||
</span>
|
</span>
|
||||||
<span class="wr-notification-bubble">0</span>
|
<span class="wr-notification-bubble">0</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- secondary header - app bar -->
|
<!-- secondary header - app bar -->
|
||||||
|
|
||||||
<!-- common navigation -->
|
<!-- common navigation -->
|
||||||
<div id="hiddenNav" class="wr-hidden-nav">
|
<div id="hiddenNav" class="wr-hidden-nav">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/iotserver/dashboard"><i class="fw fw-dashboard"></i>Dashboard</a></li>
|
<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/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>
|
<li><a href="/iotserver/groups"><i class="fw fw-grouping"></i>My Groups</a></li>
|
||||||
{{#if permissions.ADD_USER}}
|
{{#if permissions.ADD_USER}}
|
||||||
<li><a href="/iotserver/users"><i class="fw fw-user"></i>User Management</a></li>
|
<li><a href="/iotserver/users"><i class="fw fw-user"></i>User Management</a></li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<li><a href="/iotserver/policies"><i class="fw fw-policy"></i>Policy Management</a></li>
|
<li><a href="/iotserver/policies"><i class="fw fw-policy"></i>Policy Management</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- /common navigation -->
|
<!-- /common navigation -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{{/zone}}
|
{{/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 |