-
-
Affiliation to an Institution
-
-
-
-
-
-
Membership: Governor
-
-
-
-
-
authority: onelab.upmc
-
-
Université Pierre et Marie Curie
-
-
Address: 4 Place Jussieu, 75005 Paris
-
-
Country: France
-
-
-
Contacts
-
Legal: Président Jean Chambaz
-
-
Scientific: Dr Timur Friedman
+
+
+
+
+
+
+
+
-
-
Managers: onelab.upmc
-
-
- email |
- user_hrn |
- number of slices |
- status |
-
-
- loic.baron@lip6.fr |
- onelab.upmc.loic_baron |
- 3 |
- enabled |
-
-
- loic.baron@lip6.fr |
- onelab.upmc.loic_baron |
- 3 |
- enabled |
-
-
-
-
Users: onelab.upmc
-
-
- email |
- user_hrn |
- number of slices |
- status |
-
-
- loic.baron@lip6.fr |
- onelab.upmc.loic_baron |
- 3 |
- enabled |
-
-
-
- loic.baron@lip6.fr |
- onelab.upmc.loic_baron |
- 3 |
- enabled |
-
-
-
+
+
Users: {{user_details.parent_authority}}
+
+
+
+
+ +/- |
+ Email |
+ user_hrn |
+ First name |
+ Last name |
+ Enabled |
+
+
+
+
+
+
-
Slices: onelab.upmc
-
-
-
-
+
Slices: {{user_details.parent_authority}}
+
+
+
+
+ +/- |
+ slice_hrn |
+ users |
+ url |
+ nodes |
+ expiration |
+
+
+
+
+
+
+
@@ -119,6 +71,18 @@
$('div.home-panel').hide();
$('div#'+$(this).data('panel')).show();
});
+ var url = window.location;
+ if(url.hash) {
+ // Fragment exists
+ tab = url.href.split("#")[1];
+ tab_exists = $('div#'+tab).length;
+ if (tab_exists) {
+ $('ul.nav-tabs li').removeClass('active');
+ $('li#'+tab+'-tab').addClass('active');
+ $('div.home-panel').hide();
+ $('div#'+tab).show();
+ }
+ }
$('button#createslice').click(function() {
window.location="/portal/slice_request/";
})
@@ -127,6 +91,130 @@
window.location="/portal/slice_request/";
*/
});
+ {% if person %}
+ {% if user_details.parent_authority %}
+ $.post("/rest/authority/",{'filters':{'authority_hrn':'{{user_details.parent_authority}}'}}, function( data ) {
+ var authority_data = [];
+ var onelab_data = [];
+ /* 'city','enabled','legal','longitude','onelab_membership','address','parent_authority','slice','user','country',
+ 'tech','abbreviated_name','url','postcode','description','scientific','authority_hrn','latitude','name' */
+ $.each( data, function( key, val ) {
+ authority_row = "
";
+ authority_row += "
";
+ authority_row += "
authority: "+val.authority_hrn+"
";
+ authority_row += "
";
+ authority_row += "
"+val.name+"";
+ authority_row += "
";
+ authority_row += "
Address: "+val.address+"
";
+ authority_row += "
City: "+val.postcode+" "+val.city+"
";
+ authority_row += "
";
+ authority_row += "
Country: "+val.country+"
";
+ authority_row += "
";
+ authority_row += "
";
+ authority_row += "
Contacts
";
+ authority_row += "
Legal: ";
+ /*
+
+ TODO: find a way to express JSON correctly given the constrains: CSV / JSON
+
+ legal = jQuery.parseJSON(val.legal);
+ if($.isArray(legal)){
+ $.each(legal, function(k,v){
+ authority_row += k+" "+v+"
";
+ });
+ }else{
+ */
+ authority_row += val.legal+"
";
+ //}
+ authority_row += "
";
+ authority_row += "
Scientific: ";
+ /*
+ scientific = jQuery.parseJSON(val.scientific);
+ if($.isArray(scientific)){
+ $.each(scientific, function(v){
+ authority_row += v+", ";
+ });
+ }else{
+ */
+ authority_row += val.scientific+"
";
+ //}
+ onelab_membership = "
Membership: "+val.onelab_membership;
+ onelab_data.push(onelab_membership);
+ authority_data.push(authority_row);
+ });
+ $("div#authority-data").html(authority_data.join( "" ));
+ $("div#onelab-data").html(onelab_data.join( "" ));
+ $("div#authority-tab-loaded").css("display","block");
+ $("div#authority-tab-loading").css("display","none");
+ });
+
+ $.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" */
+ $.each( data, function( key, val ) {
+ list_slices.push( "
" + val.slice_hrn + "" );
+ if(val.nodes=="undefined" || val.nodes==null){
+ nodes_length=0;
+ }else{
+ nodes_length=val.nodes.length;
+ }
+
+ if(val.user=="undefined" || val.user==null){
+ user_length=0;
+ }else{
+ user_length=val.user.length;
+ }
+
+ if(val.slice_url=="undefined" || val.slice_url==null){
+ slice_url="";
+ }else{
+ slice_url="
"+val.slice_url+"";
+ }
+
+ slice_row = "
";
+ slice_row += " | ";
+ slice_row += "" + val.slice_hrn + " | ";
+ slice_row += ""+user_length+" | ";
+ slice_row += ""+slice_url+" | ";
+ slice_row += ""+nodes_length+" | ";
+ slice_row += ""+val.slice_expires+" | ";
+ slice_row += "
";
+ table_slices.push(slice_row);
+
+ });
+
+ /* $("div#slice-list").html($( "
", { html: list_slices.join( "" ) })); */
+ $("table#slice-tab tr:last").after(table_slices.join( "" ));
+ $("div#slice-tab-loaded").css("display","block");
+ $("div#slice-tab-loading").css("display","none");
+ });
+
+ $.post("/rest/user/",{'filters':{'parent_authority':'{{user_details.parent_authority}}'}}, function( data ) {
+ var list_users = [];
+ var table_users = [];
+ /*
+ "enabled", "keys", "parent_authority", "user_first_name", "user_last_name", "user_phone", "user_hrn", "slice", "user_email"
+ */
+ $.each( data, function( key, val ) {
+ list_users.push( "
" + val.user_email + "" );
+ user_row = "
";
+ user_row += " | ";
+ user_row += ""+val.user_email+" | ";
+ user_row += ""+val.user_hrn+" | ";
+ user_row += ""+val.user_first_name+" | ";
+ user_row += ""+val.user_last_name+" | ";
+ user_row += ""+val.enabled+" | ";
+ user_row += "
";
+ table_users.push(user_row);
+
+ });
+ $("table#user-tab tr:last").after(table_users.join( "" ));
+ $("div#user-tab-loaded").css("display","block");
+ $("div#user-tab-loading").css("display","none");
+ });
+ {% endif %}
+ {% endif %}
});
-{% endblock unfold_main %}
+{% endblock %}