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</h1>
44 <th>number of slices</th>
49 <td><input type="checkbox"></td>
50 <td><a href="/portal/user/loic.baron@lip6.fr">loic.baron@lip6.fr</a></td>
51 <td>onelab.upmc.loic_baron</td>
57 <td><input type="checkbox"></td>
58 <td><a href="/portal/user/loic.baron@lip6.fr">loic.baron@lip6.fr</a></td>
59 <td>onelab.upmc.loic_baron</td>
66 <button id="deleteusers" type="button" class="btn btn-default"><span class="glyphicon glyphicon-remove"></span> Delete Users</button>
69 <div class="home-panel" id="slices" style="display:none;">
71 <h1>Slices: onelab.upmc <button id="createslice" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create a Slice</button></h1>
72 <div id="slice-tab-loading"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
73 <div id="slice-tab-loaded" style="display:none;">
74 <table id="slice-tab">
85 <button id="renewslices" type="button" class="btn btn-default"><span class="glyphicon glyphicon-refresh"></span> Renew Slices</button>
86 <button id="deleteslices" type="button" class="btn btn-default"><span class="glyphicon glyphicon-remove"></span> Delete Slices</button>
92 $(document).ready(function() {
93 $('a.home-tab').click(function() {
94 $('ul.nav-tabs li').removeClass('active');
95 $(this).parent().addClass('active');
96 $('div.home-panel').hide();
97 $('div#'+$(this).data('panel')).show();
99 $('button#createslice').click(function() {
100 window.location="/portal/slice_request/";
102 ;$('button#slicerequestbtn').click(function() {
104 window.location="/portal/slice_request/";
108 $.post("/rest/slice/",{'filters':{'parent_authority':'ple.upmc'}}, function( data ) {
109 var list_slices = [];
110 var table_slices = [];
111 /* "slice_hrn", "slice_description", "slice_type", "parent_authority", "created", "nodes", "slice_url", "slice_last_updated", "user", "slice_urn", "slice_expires" */
112 $.each( data, function( key, val ) {
113 list_slices.push( "<li><a href=\"portal/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
114 if(val.nodes=="undefined" || val.nodes==null){
117 nodes_length=val.nodes.length;
120 if(val.user=="undefined" || val.user==null){
123 user_length=val.user.length;
126 if(val.slice_url=="undefined" || val.slice_url==null){
129 slice_url="<a href='"+val.slice_url+"' target='_blank'>"+val.slice_url+"</a>";
133 slice_row += "<td><input type='checkbox'></td>";
134 slice_row += "<td><a href=\"/portal/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></td>";
135 slice_row += "<td>"+user_length+"</td>";
136 slice_row += "<td>"+slice_url+"</td>";
137 slice_row += "<td>"+nodes_length+"</td>";
138 slice_row += "<td>"+val.slice_expires+"</td>";
139 table_slices.push(slice_row);
143 /* $("div#slice-list").html($( "<ul/>", { html: list_slices.join( "" ) })); */
144 $("table#slice-tab tr:last").after(table_slices.join( "" ));
145 $("div#slice-tab-loaded").css("display","block");
146 $("div#slice-tab-loading").css("display","none");
151 {% endblock unfold_main %}