1 {% extends "layout-unfold1.html" %}
3 {% block unfold_main %}
4 <div class="wrapper" id="institution">
5 <ul class="nav nav-tabs">
6 <li class="active"><a class="home-tab" data-panel="institution" href="#">INSTITUTION</a></li>
7 <li><a class="home-tab" data-panel="users" href="#">USERS</a></li>
8 <li><a class="home-tab" data-panel="slices" href="#">SLICES</a></li>
10 <div class="home-panel" id="institution">
11 <h1><img src="{{ STATIC_URL }}img/icon_authority_color_small.png" alt="" /> Affiliation to an Institution</h1>
13 <div style="float:left; width:30%;">
15 <img src="{{ STATIC_URL }}img/onelab-logo.png" alt="" /><br>
16 <b>Membership:</b> Governor
18 <div style="float:right; width:70%;">
19 <img src="http://www.upmc.fr/skins/UPMC/templates/index/resources/img/upmc-logotype.gif" alt="" /><br>
21 <b>authority:</b> onelab.upmc<br>
23 <b>Université Pierre et Marie Curie</b><br>
25 <b>Address:</b> 4 Place Jussieu, 75005 Paris<br>
27 <b>Country:</b> France<br>
31 <b>Legal:</b> Président Jean Chambaz<br>
33 <b>Scientific:</b> Dr Timur Friedman, Prof Serge Fdida
36 <div class="home-panel" id="users" style="display:none;">
38 <h1>Users: onelab.upmc</button></h1>
39 <div id="user-tab-loading"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
40 <div id="user-tab-loaded" style="display:none;">
53 <button id="deleteusers" type="button" class="btn btn-default"><span class="glyphicon glyphicon-remove"></span> Delete Users</button>
56 <div class="home-panel" id="slices" style="display:none;">
58 <h1>Slices: onelab.upmc <button id="createslice" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create a Slice</button></h1>
59 <div id="slice-tab-loading"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
60 <div id="slice-tab-loaded" style="display:none;">
61 <table id="slice-tab">
72 <button id="renewslices" type="button" class="btn btn-default"><span class="glyphicon glyphicon-refresh"></span> Renew Slices</button>
73 <button id="deleteslices" type="button" class="btn btn-default"><span class="glyphicon glyphicon-remove"></span> Delete Slices</button>
79 $(document).ready(function() {
80 $('a.home-tab').click(function() {
81 $('ul.nav-tabs li').removeClass('active');
82 $(this).parent().addClass('active');
83 $('div.home-panel').hide();
84 $('div#'+$(this).data('panel')).show();
86 $('button#createslice').click(function() {
87 window.location="/portal/slice_request/";
89 ;$('button#slicerequestbtn').click(function() {
91 window.location="/portal/slice_request/";
95 $.post("/rest/slice/",{'filters':{'parent_authority':'ple.upmc'}}, function( data ) {
97 var table_slices = [];
98 /* "slice_hrn", "slice_description", "slice_type", "parent_authority", "created", "nodes", "slice_url", "slice_last_updated", "user", "slice_urn", "slice_expires" */
99 $.each( data, function( key, val ) {
100 list_slices.push( "<li><a href=\"portal/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
101 if(val.nodes=="undefined" || val.nodes==null){
104 nodes_length=val.nodes.length;
107 if(val.user=="undefined" || val.user==null){
110 user_length=val.user.length;
113 if(val.slice_url=="undefined" || val.slice_url==null){
116 slice_url="<a href='"+val.slice_url+"' target='_blank'>"+val.slice_url+"</a>";
120 slice_row += "<td><input type='checkbox'></td>";
121 slice_row += "<td><a href=\"/portal/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></td>";
122 slice_row += "<td>"+user_length+"</td>";
123 slice_row += "<td>"+slice_url+"</td>";
124 slice_row += "<td>"+nodes_length+"</td>";
125 slice_row += "<td>"+val.slice_expires+"</td>";
126 table_slices.push(slice_row);
130 /* $("div#slice-list").html($( "<ul/>", { html: list_slices.join( "" ) })); */
131 $("table#slice-tab tr:last").after(table_slices.join( "" ));
132 $("div#slice-tab-loaded").css("display","block");
133 $("div#slice-tab-loading").css("display","none");
137 $.getJSON("/rest/user/", function( data ) {
139 var table_users = [];
141 "enabled", "keys", "parent_authority", "user_first_name", "user_last_name", "user_phone", "user_hrn", "slice", "user_email"
143 $.each( data, function( key, val ) {
144 list_users.push( "<li><a href=\"portal/user/"+val.user_email+"\">" + val.user_email + "</a></li>" );
145 /*if(val.nodes=="undefined" || val.nodes==null){
148 nodes_length=val.nodes.length;
151 if(val.user=="undefined" || val.user==null){
154 user_length=val.user.length;
157 if(val.slice_url=="undefined" || val.slice_url==null){
160 slice_url="<a href='"+val.slice_url+"' target='_blank'>"+val.slice_url+"</a>";
164 user_row += "<td><input type='checkbox'></td>";
165 user_row += "<td>"+val.user_email+"</td>";
166 user_row += "<td>"+val.user_hrn+"</td>";
167 user_row += "<td>"+val.user_first_name+"</td>";
168 user_row += "<td>"+val.user_last_name+"</td>";
169 user_row += "<td>"+val.enabled+"</td>";
170 table_users.push(user_row);
174 /* $("div#slice-list").html($( "<ul/>", { html: list_slices.join( "" ) })); */
175 $("table#user-tab tr:last").after(table_users.join( "" ));
176 $("div#user-tab-loaded").css("display","block");
177 $("div#user-tab-loading").css("display","none");
182 {% endblock unfold_main %}