1 <div id="developerview"></div>
6 function updateUserSliceTable(){
7 log.debug("Should grab user slice info");
11 url: '/hpcdashuserslices',
12 success: function(data){
13 log.info("Got Data back for User SliceTable");
15 //createUserSliceTable(data);
16 setTimeout(function () { updateUserSliceTable() }, 5000);
18 error: function(data){
19 log.debug("COULDNT GET DATA BACK");
20 setTimeout(function () { updateUserSliceTable() }, 5000);
25 function createUserSliceTable(data) {
26 log.debug("Creating User Slice Table");
28 //Add check for #dynamicusersliceinfo_filter label-> input having focus here
30 $('#developerview').html( '<table cellpadding="0" cellspacing="0" border="0" class="display" id="dynamicusersliceinfo"></table>' );
31 var actualEntries = [];
32 log.debug(data['userSliceInfo']['rows'][0]['slicename']);
34 var rows = data['userSliceInfo']['rows'];
37 slicename = rows[row]['slicename'];
38 sliceid = rows[row]['sliceid'];
39 role = rows[row]['role'];
40 slivercount = rows[row]['slivercount'];
41 sitecount = rows[row]['sitecount'];
42 actualEntries.push(['<a href="http://{{request.get_host}}/admin/core/slice/' + sliceid + '">' + slicename + '</a>',
43 role, slivercount, sitecount]);
45 oTable = $('#dynamicusersliceinfo').dataTable( {
47 "aaData": actualEntries ,
50 { "sTitle": "Slice" },
51 { "sTitle": "Privilege" , sClass: "alignCenter"},
52 { "sTitle": "Number of Slivers" , sClass: "alignCenter"},
53 { "sTitle": "Number of Sites" , sClass: "alignCenter"},
57 // If the filter had focus, reapply here
59 setTimeout(function() {
61 url: '/hpcdashuserslices',
63 success: function(data){ createUserSliceTable(data); },
64 complete: function(){ },
70 log.debug("Initializing Table")
72 url: '/hpcdashuserslices',
74 success: function(data){ createUserSliceTable(data); },
78 updateUserSliceTable();