Live Data/Bandwidth column in datatable ?
Live Data/Bandwidth column in datatable ?
Hi all,
I have given a task to show live data of our network devices, i'm using php as backend with mysql as database.
The thing i want is i have to load few columns (device_name, ip, device_type) which i get through database which is easy task but i have to keep two columns empty then after full table load i have to show live stats download/upload of that particular network device through api.
I have worked with api and i cant get data from network device, but the challenge is how do i show data in blank row/column and auto update only those two colukmns/rows
This question has an accepted answers - jump to answer
Answers
Here are a couple of approaches you can look at.
ajax.reload()
to refresh the table from the DB.row().data()
orcell().data()
to update the table. You can use something likerows().every()
to loop through all the rows.Kevin
1) I can not save stats in db every second then reload table every second, there are thousands of network devices.
2) I read documentation about this, but cant find a database related demo to clear my doubts
There is a similar table what i want, the table not refreshes fully instead only two columns are updating. what i want but it is closed source and also dont made with datatable.
Here is an example of the second option:
http://live.datatables.net/majicice/1/edit
It fetches data via a simulated API every 5 seconds and updates the table. In addition to the above links you will want to read up on
columns.defaultContent
.Hope this helps you get started. Your specific requirements may require a different solution than provided.
Kevin
Hope this works for me, thank you for your time.