| ===================================Angularjs Controller================================ | |
| app.controller('AdminLiveDataController', AdminLiveDataController); | |
| function AdminLiveDataController($scope,LiveDataService){ | |
| LiveDataService.getUserLiveData().then(function(response){ | |
| $scope.adatas = response.data.aaData; | |
| }); | |
| } | |
| =====================================View============================================== | |
| <div class="bg-light lter b-b wrapper-md"> | |
| <h1 class="m-n font-thin h3">Footable</h1> | |
| </div> | |
| <div class="wrapper-md"> | |
| <div class="panel panel-default"> | |
| <div class="panel-heading"> | |
| Live Data | |
| </div> | |
| <div class="table-responsive"> | |
| <table ui-jq="dataTable" ui-options="{ | |
| sAjaxSource : '{{adatas}}', | |
| aoColumns : [ | |
| { mData : object_name }, | |
| { mData : uuid }, | |
| { mData : object_type }, | |
| { mData : receiver_location }, | |
| { mData : location_alias }, | |
| { mData : receiver_floor }, | |
| { mData : created_at } | |
| ] | |
| }" class="table table-striped b-t b-b"> | |
| <thead> | |
| <tr> | |
| <th>Object Name</th> | |
| <th>Object UUID</th> | |
| <th>Object Type</th> | |
| <th>Object Location</th> | |
| <th>Location Alias</th> | |
| <th>Object Floor</th> | |
| <th>Timestamp</th> | |
| </tr> | |
| </thead> | |
| <tbody></tbody> | |
| </table> | |
| </div> | |
| </div> | |
| </div> | |
| ===========================================View code When code runs=============================================== | |
| <table ui-jq="dataTable" ui-options="{ | |
| sAjaxSource : '[{"name":"Prabhat Gautam","majorno":45,"minorno":44,"rssi":-69,"temperature":34,"created_at":"2016-05-24 00:00:16","light":45666,"batterystatus":30,"object_name":"Admin_Object_1","object_type":"Mobile","uuid":"hgf663r565dtedg6","object_description":"Admin_Object_1","receiver_name":"Admin_Receiver_2","receiver_mac":"hfuj4245535656g","receiver_location":"Agora Mall","location_alias":"2","receiver_floor":"2","receiver_description":"Admin_Receiver_2"},{"name":"Prabhat Gautam","majorno":45,"minorno":44,"rssi":-69,"temperature":34,"created_at":"2016-05-24 04:23:21","light":45666,"batterystatus":30,"object_name":"Admin_Object_1","object_type":"Mobile","uuid":"hgf663r565dtedg6","object_description":"Admin_Object_1","receiver_name":"Admin_Receiver_2","receiver_mac":"hfuj4245535656g","receiver_location":"Agora Mall","location_alias":"2","receiver_floor":"2","receiver_description":"Admin_Receiver_2"},{"name":"Prabhat Gautam","majorno":45,"minorno":44,"rssi":-69,"temperature":34,"created_at":"2016-05-24 08:24:11","light":45666,"batterystatus":30,"object_name":"Admin_Object_1","object_type":"Mobile","uuid":"hgf663r565dtedg6","object_description":"Admin_Object_1","receiver_name":"Admin_Receiver_1","receiver_mac":"jhdhf6672773878","receiver_location":"Sukan Mall","location_alias":"1","receiver_floor":"1","receiver_description":"Admin_Receiver_1"},{"name":"Prabhat Gautam","majorno":45,"minorno":44,"rssi":-69,"temperature":34,"created_at":"2016-05-24 12:25:16","light":45666,"batterystatus":30,"object_name":"Admin_Object_1","object_type":"Mobile","uuid":"hgf663r565dtedg6","object_description":"Admin_Object_1","receiver_name":"Admin_Receiver_1","receiver_mac":"jhdhf6672773878","receiver_location":"Sukan Mall","location_alias":"1","receiver_floor":"1","receiver_description":"Admin_Receiver_1"},{"name":"Prabhat Gautam","majorno":45,"minorno":44,"rssi":-69,"temperature":34,"created_at":"2016-05-24 16:00:09","light":45666,"batterystatus":30,"object_name":"Admin_Object_1","object_type":"Mobile","uuid":"hgf663r565dtedg6","object_description":"Admin_Object_1","receiver_name":"Admin_Receiver_1","receiver_mac":"jhdhf6672773878","receiver_location":"Sukan Mall","location_alias":"1","receiver_floor":"1","receiver_description":"Admin_Receiver_1"},{"name":"Prabhat Gautam","majorno":45,"minorno":44,"rssi":-69,"temperature":34,"created_at":"2016-05-24 20:00:10","light":45666,"batterystatus":30,"object_name":"Admin_Object_1","object_type":"Mobile","uuid":"hgf663r565dtedg6","object_description":"Admin_Object_1","receiver_name":"Admin_Receiver_1","receiver_mac":"jhdhf6672773878","receiver_location":"Sukan Mall","location_alias":"1","receiver_floor":"1","receiver_description":"Admin_Receiver_1"},{"name":"Prabhat Gautam","majorno":45,"minorno":44,"rssi":-69,"temperature":34,"created_at":"2016-05-25 03:59:59","light":45666,"batterystatus":30,"object_name":"Admin_Object_1","object_type":"Mobile","uuid":"hgf663r565dtedg6","object_description":"Admin_Object_1","receiver_name":"Admin_Receiver_1","receiver_mac":"jhdhf6672773878","receiver_location":"Sukan Mall","location_alias":"1","receiver_floor":"1","receiver_description":"Admin_Receiver_1"},{"name":"Prabhat Gautam","majorno":45,"minorno":44,"rssi":-69,"temperature":34,"created_at":"2016-05-25 06:26:04","light":45666,"batterystatus":30,"object_name":"Admin_Object_1","object_type":"Mobile","uuid":"hgf663r565dtedg6","object_description":"Admin_Object_1","receiver_name":"Admin_Receiver_1","receiver_mac":"jhdhf6672773878","receiver_location":"Sukan Mall","location_alias":"1","receiver_floor":"1","receiver_description":"Admin_Receiver_1"},{"name":"Prabhat Gautam","majorno":45,"minorno":44,"rssi":-69,"temperature":34,"created_at":"2016-05-25 10:58:07","light":45666,"batterystatus":30,"object_name":"Admin_Object_1","object_type":"Mobile","uuid":"hgf663r565dtedg6","object_description":"Admin_Object_1","receiver_name":"Admin_Receiver_2","receiver_mac":"hfuj4245535656g","receiver_location":"Agora Mall","location_alias":"2","receiver_floor":"2","receiver_description":"Admin_Receiver_2"},{"name":"Prabhat Gautam","majorno":45,"minorno":56,"rssi":-67,"temperature":45,"created_at":"2016-05-26 14:31:58","light":45666,"batterystatus":67,"object_name":"Admin_Object_1","object_type":"Mobile","uuid":"hgf663r565dtedg6","object_description":"Admin_Object_1","receiver_name":"Admin_Receiver_2","receiver_mac":"hfuj4245535656g","receiver_location":"Agora Mall","location_alias":"2","receiver_floor":"2","receiver_description":"Admin_Receiver_2"},{"name":"Prabhat Gautam","majorno":45,"minorno":56,"rssi":-67,"temperature":45,"created_at":"2016-05-26 15:09:46","light":45666,"batterystatus":67,"object_name":"Admin_Object_1","object_type":"Mobile","uuid":"hgf663r565dtedg6","object_description":"Admin_Object_1","receiver_name":"Admin_Receiver_2","receiver_mac":"hfuj4245535656g","receiver_location":"Agora Mall","location_alias":"2","receiver_floor":"2","receiver_description":"Admin_Receiver_2"},{"name":"Prabhat Gautam","majorno":45,"minorno":56,"rssi":-67,"temperature":45,"created_at":"2016-05-26 15:09:51","light":45666,"batterystatus":67,"object_name":"Admin_Object_1","object_type":"Mobile","uuid":"hgf663r565dtedg6","object_description":"Admin_Object_1","receiver_name":"Admin_Receiver_2","receiver_mac":"hfuj4245535656g","receiver_location":"Agora Mall","location_alias":"2","receiver_floor":"2","receiver_description":"Admin_Receiver_2"},{"name":"Prabhat Gautam","majorno":45,"minorno":56,"rssi":-67,"temperature":45,"created_at":"2016-05-26 15:10:10","light":45666,"batterystatus":67,"object_name":"Admin_Object_1","object_type":"Mobile","uuid":"hgf663r565dtedg6","object_description":"Admin_Object_1","receiver_name":"Admin_Receiver_2","receiver_mac":"hfuj4245535656g","receiver_location":"Agora Mall","location_alias":"2","receiver_floor":"2","receiver_description":"Admin_Receiver_2"},{"name":"Prabhat Gautam","majorno":45,"minorno":56,"rssi":-67,"temperature":45,"created_at":"2016-05-27 10:03:07","light":45666,"batterystatus":67,"object_name":"Admin_Object_1","object_type":"Mobile","uuid":"hgf663r565dtedg6","object_description":"Admin_Object_1","receiver_name":"Admin_Receiver_2","receiver_mac":"hfuj4245535656g","receiver_location":"Agora Mall","location_alias":"2","receiver_floor":"2","receiver_description":"Admin_Receiver_2"}]', | |
| aoColumns : [ | |
| { mData : object_name }, | |
| { mData : uuid }, | |
| { mData : object_type }, | |
| { mData : receiver_location }, | |
| { mData : location_alias }, | |
| { mData : receiver_floor }, | |
| { mData : created_at } | |
| ] | |
| }" class="table table-striped b-t b-b dataTable no-footer" id="DataTables_Table_0" role="grid" aria-describedby="DataTables_Table_0_info"> | |
| <thead> | |
| <tr role="row"><th class="sorting_asc" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Object Name: activate to sort column descending" style="width: 144px;">Object Name</th><th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="Object UUID: activate to sort column ascending" style="width: 137px;">Object UUID</th><th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="Object Type: activate to sort column ascending" style="width: 135px;">Object Type</th><th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="Object Location: activate to sort column ascending" style="width: 172px;">Object Location</th><th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="Location Alias: activate to sort column ascending" style="width: 155px;">Location Alias</th><th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="Object Floor: activate to sort column ascending" style="width: 139px;">Object Floor</th><th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="Timestamp: activate to sort column ascending" style="width: 130px;">Timestamp</th></tr> | |
| </thead> | |
| <tbody><tr class="odd"><td valign="top" colspan="7" class="dataTables_empty">No data available in table</td></tr></tbody> | |
| </table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment