projects
/
osm
/
vim-emu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update dashboard, to display placement, colored by node type
[osm/vim-emu.git]
/
src
/
emuvim
/
dashboard
/
js
/
main.js
diff --git
a/src/emuvim/dashboard/js/main.js
b/src/emuvim/dashboard/js/main.js
index
71741f2
..
39e0a00
100755
(executable)
--- a/
src/emuvim/dashboard/js/main.js
+++ b/
src/emuvim/dashboard/js/main.js
@@
-40,7
+40,7
@@
function update_table_datacenter(data)
// clear table
$("#table_datacenter").empty();
// header
// clear table
$("#table_datacenter").empty();
// header
- $("#table_datacenter").append('<tr class="tbl-head"><td>Label</td><td>Int. Name</td><td>Switch</td><td>Num. Containers</td><td>
Metadata Item
s</td></tr>');
+ $("#table_datacenter").append('<tr class="tbl-head"><td>Label</td><td>Int. Name</td><td>Switch</td><td>Num. Containers</td><td>
VNF
s</td></tr>');
// fill table
$.each(data, function(i, item) {
var row_str = "";
// fill table
$.each(data, function(i, item) {
var row_str = "";
@@
-49,7
+49,8
@@
function update_table_datacenter(data)
row_str += '<td>' + item.internalname + '</td>';
row_str += '<td>' + item.switch + '</td>';
row_str += '<td><span class="badge">' + item.n_running_containers + '</span></td>';
row_str += '<td>' + item.internalname + '</td>';
row_str += '<td>' + item.switch + '</td>';
row_str += '<td><span class="badge">' + item.n_running_containers + '</span></td>';
- row_str += '<td><span class="badge">' + Object.keys(item.metadata).length + '</span></td>';
+ //row_str += '<td><span class="badge">' + Object.keys(item.metadata).length + '</span></td>';
+ row_str += '<td>' + item.vnf_list + '</span></td>';
row_str += '<tr>';
$("#table_datacenter").append(row_str);
});
row_str += '<tr>';
$("#table_datacenter").append(row_str);
});
@@
-105,6
+106,14
@@
function fetch_container()
}
}
+function fetch_d3graph()
+{
+ // do HTTP request and trigger gui update on success
+ var request_url = API_HOST + "/restapi/network/d3jsgraph";
+ console.debug("fetching from: " + request_url);
+ //$.getJSON(request_url, update_graph);
+}
+
function fetch_loop()
{
// only fetch if we are connected
function fetch_loop()
{
// only fetch if we are connected
@@
-153,6
+162,7
@@
function disconnect()
$(document).ready(function(){
console.info("document ready");
// setup global connection error handling
$(document).ready(function(){
console.info("document ready");
// setup global connection error handling
+ /*
$.ajaxSetup({
"error": errorAjaxConnection
});
$.ajaxSetup({
"error": errorAjaxConnection
});
@@
-160,6
+170,10
@@
$(document).ready(function(){
// add listeners
$("#btn_connect").click(connect);
$("#btn_disconnect").click(disconnect);
// add listeners
$("#btn_connect").click(connect);
$("#btn_disconnect").click(disconnect);
+ */
+ setTimeout(fetch_datacenter, 2000);//fetch_datacenter();
+ setTimeout(fetch_container, 4000);//fetch_container();
+
// additional refresh on window focus
$(window).focus(function () {
// additional refresh on window focus
$(window).focus(function () {