Institution list of slices: fixed number of users per slice
authorLoic Baron <loic.baron@lip6.fr>
Fri, 18 Apr 2014 15:24:26 +0000 (17:24 +0200)
committerLoic Baron <loic.baron@lip6.fr>
Fri, 18 Apr 2014 15:24:26 +0000 (17:24 +0200)
portal/templates/institution.html
portal/templates/onelab/onelab_institution.html

index ea404fc..8ec395b 100644 (file)
@@ -89,7 +89,7 @@
         $.post("/rest/slice/",{'filters':{'parent_authority':'{{user_details.parent_authority}}'}}, function( data ) {
             var list_slices = [];
             var table_slices = [];
-            /* "slice_hrn", "slice_description", "slice_type", "parent_authority", "created", "nodes", "slice_url", "slice_last_updated", "user", "slice_urn", "slice_expires" */
+            /* "slice_hrn", "slice_description", "slice_type", "parent_authority", "created", "nodes", "slice_url", "slice_last_updated", "users", "slice_urn", "slice_expires" */
             $.each( data, function( key, val ) {
                 list_slices.push( "<li><a href=\"portal/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
                 if(val.nodes=="undefined" || val.nodes==null){
                 }else{
                     nodes_length=val.nodes.length;
                 }
-
-                if(val.user=="undefined" || val.user==null){
-                    user_length=0;
+                if(val.users=="undefined" || val.users==null){
+                    users_length=0;
                 }else{
-                    user_length=val.user.length;
+                    users_length=val.users.length;
                 }
 
                 if(val.slice_url=="undefined" || val.slice_url==null){
                 slice_row = "<tr id='"+val.slice_hrn+"'>";
                 slice_row += "<td><input type='checkbox' class='slice' id='"+val.slice_hrn+"'></td>";
                 slice_row += "<td><a href=\"/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></td>";
-                slice_row += "<td>"+user_length+"</td>";
+                slice_row += "<td>"+users_length+"</td>";
                 slice_row += "<td>"+slice_url+"</td>";
                 slice_row += "<td>"+nodes_length+"</td>";
                 slice_row += "<td>"+val.slice_expires+"</td>";
index 1b6a122..0a424fa 100644 (file)
         $.post("/rest/slice/",{'filters':{'parent_authority':'{{user_details.parent_authority}}'}}, function( data ) {
             var list_slices = [];
             var table_slices = [];
-            /* "slice_hrn", "slice_description", "slice_type", "parent_authority", "created", "nodes", "slice_url", "slice_last_updated", "user", "slice_urn", "slice_expires" */
+            /* "slice_hrn", "slice_description", "slice_type", "parent_authority", "created", "nodes", "slice_url", "slice_last_updated", "users", "slice_urn", "slice_expires" */
             $.each( data, function( key, val ) {
                 list_slices.push( "<li><a href=\"portal/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
                 if(val.nodes=="undefined" || val.nodes==null){
                 }else{
                     nodes_length=val.nodes.length;
                 }
-
-                if(val.user=="undefined" || val.user==null){
-                    user_length=0;
+                console.log(val);
+                if(val.users=="undefined" || val.users==null){
+                    users_length=0;
                 }else{
-                    user_length=val.user.length;
+                    users_length=val.users.length;
                 }
 
                 if(val.slice_url=="undefined" || val.slice_url==null){
                 slice_row = "<tr id='"+val.slice_hrn+"'>";
                 slice_row += "<td><input type='checkbox' class='slice' id='"+val.slice_hrn+"'></td>";
                 slice_row += "<td><a href=\"/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></td>";
-                slice_row += "<td>"+user_length+"</td>";
+                slice_row += "<td>"+users_length+"</td>";
                 slice_row += "<td>"+slice_url+"</td>";
                 slice_row += "<td>"+nodes_length+"</td>";
                 slice_row += "<td>"+val.slice_expires+"</td>";