1 {% extends "layout-unfold1.html" %}
2 {% block unfold_main %}
7 {% for message in messages %}
8 <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
13 <div class="wrapper" id="institution">
14 <ul class="nav nav-tabs">
15 <li class="active"><a class="home-tab" data-panel="user_profile" href="#">User Profile</a></li>
16 <li><a class="home-tab" data-panel="principal_acc" href="#">User Account</a></li>
17 <li><a class="home-tab" data-panel="ref_acc" href="#">Testbed Access</a></li>
19 <div class="home-panel" id="user_profile">
21 <form id="editForm" method="POST" action="{{user_email}}/user_process" enctype="multipart/form-data">
22 <div id="middle" align="center">
25 <table class="profile">
28 <div id="info">Platform: Myslice</div>
32 <td class="key">Email</td>
33 <td class="value"> <span id="emailval" class="value" >{{ user_email }}</span> </td>
36 <td class="key">Full Name</td>
38 <span id="nameval" class="value" >{{ fullname }} </span>
39 <span class="hide_this" id="span_name">
40 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_name_change"> Cancel </button>
41 <div style='display:none;'><input type='hidden' name='nameform' /></div>
42 <input id="fname" type="text" name="fname" class="required" maxlength="200" value="{{firstname}}" />
43 <input id="lname" type="text" name="lname" class="required" maxlength="200" value="{{lastname}}" />
44 <input type="submit" class="btn btn-default btn-xs" name="submit_name" value="Save"/>
46 <button class="btn btn-default btn-xs" type="button"title="Full Name" id="edit_name">
47 <span class="glyphicon glyphicon-edit"></span> Edit
52 <td class="key">Authority</td>
54 <span id="authval" class="value" >{{ authority }} </span>
55 <span class="hide_this" id="span_auth">
56 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_auth_change"> Cancel </button>
57 <div style='display:none;'><input type='hidden' name='authform' /></div>
58 <input id="authority" type="text" name="authority" class="required" maxlength="200" value="{{authority}}" />
59 <input type="submit" class="btn btn-default btn-xs" name="submit_auth" value="Save"/>
61 <button class="btn btn-default btn-xs" type="button"title="auth" id="edit_auth">
62 <span class="glyphicon glyphicon-edit"></span> Edit
67 <td class="key">Generate Keys</td>
69 <input type="submit" name="generate" class="btn btn-danger btn-xs" value="Generate a new Key Pair" id="generate_keypair"
70 onclick="return confirm('Are you sure? If you do so, your current credentials will be overwritten.');"
71 title="It will generate a new key Pair and your current credentials will be overwritten."/>
75 <td class="key">Public Key</td>
77 <span id="keyval" class="value">******** </span>
78 <span class="hide_this" id="span_upload">
79 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_upload"> Cancel </button>
80 <div style='display:none;'>
81 <input type='hidden' name='upload' /></div>
82 <input type="file" name="pubkey" class="required" id="pubkey"/>
83 <input class="btn btn-default btn-xs" name="upload_key" id="upload_key" type="submit" title="Upload your public key" value="Upload"
84 onclick="return confirm('Are you sure? It will overwrite your current credentials and you have delegate it manually.');"/>
86 <div style='display:none;'> <input type='hidden' name='dload' /> </div>
87 <button type="submit" name="dl_pubkey" class="btn btn-default btn-xs" title="Download your public key" id="dl_file">
88 <span class="glyphicon glyphicon-download"></span> Download
90 <button class="btn btn-default btn-xs" id="upload_file" type="button" title="Upload a public key">
91 <span class="glyphicon glyphicon-upload"></span> Upload
101 <div class="home-panel" id="principal_acc" style="display:none;">
103 <h3>Principal Account <small>Account used for delegating credentials</small></h3>
104 <div id="middle" align="center">
106 <table class="table table-bordered table-hover mytable">
109 <th>Account Type</th>
110 <th>Account Delegation</th>
113 <!--<th>Pub Key</th> -->
115 {% for row in principal_acc %}
116 <tr class="border_bottom">
117 <td class="odd"> {{ row.platform_name }} </td>
118 <td class="odd"> {{ row.account_type }} </td>
119 <td class="odd"> {{ row.delegation_type }} </td>
120 <td class="odd"> {{ row.usr_hrn }} </td>
121 <td class="odd"> {{ row.user_status }} </td>
122 <!-- <td class="even"> {{ row.usr_pubkey }} </td> -->
131 {%if 'Enabled' in user_status %}
132 <h3>Credentials <small>Delegated to Principal Account</small></h3>
133 <div id="middle" align="center">
135 <table class="mytable table table-bordered table-hover">
136 <caption><b>Delegated User Credential</b></caption>
138 <th>Expiration Date</th>
141 {% for row in my_users %}
142 <tr class="border_bottom">
143 <td class="odd"> {{ row.cred_exp }} </td>
145 <button class="btn btn-default btn-xs" name= "dl_user_cred" type="submit" title="Download User Credential">
146 <span class="glyphicon glyphicon-download"></span> Download
153 <table class="mytable table table-bordered table-hover">
154 <caption><b>Delegated Slice Credentials</b></caption>
157 <th>Expiration Date</th>
160 {% for row in my_slices %}
161 <tr class="border_bottom">
162 <td class="odd"> {{ row.slice_name }} </td>
163 <td class="odd"> {{ row.cred_exp }} </td>
165 <button class="btn btn-default btn-xs" name= "dl_{{row.slice_name}}" type="submit" title="Download Slice Credentials">
166 <span class="glyphicon glyphicon-download"></span> Download
173 <table class="mytable table table-bordered table-hover">
174 <caption><b>Delegated Authority Credentials</b></caption>
176 <th>Authority Name</th>
177 <th>Expiration Date</th>
180 {% for row in my_auths %}
181 <tr class="border_bottom">
182 <td class="odd"> {{ row.auth_name }} </td>
183 <td class="odd"> {{ row.cred_exp }} </td>
185 <button class="btn btn-default btn-xs" name= "dl_{{row.auth_name}}" type="submit" title="Download Authority Credentials">
186 <span class="glyphicon glyphicon-download"></span> Download
193 {%if '' not in my_users%}
194 <p><button class="btn btn-danger btn-lg btn-block" name= "clear_cred" type="submit" title="Clear All Credentials">Clear Credentials</button></p>
196 <p><button class="btn btn-danger btn-lg btn-block disabled" name= "clear_cred" type="submit" title="Clear All Credentials">Clear Credentials</button></p>
203 <div class="home-panel" id="ref_acc" style="display:none;">
204 <h3>Testbed Access <small>Reference Accounts in the following testbeds</small></h3>
205 <div id="middle" align="center">
207 <table class="mytable table table-bordered table-hover">
210 <th>Account Type</th>
211 <th>Reference to</th>
212 <th>Remove Account</th>
214 {% for row in ref_acc %}
215 <tr class="border_bottom">
216 <td class="odd"> {{ row.platform_name }} </td>
217 <td class="odd"> {{ row.account_type }} </td>
218 <td class="odd"> {{ row.account_reference }} </td>
220 <button class="btn btn-danger btn-xs" name="delete_{{row.platform_name}}" type="submit" title="Delete account from this platform">
221 <span class="glyphicon glyphicon-minus"></span>
231 <h3>Add reference account to the following testbeds</h3>
232 <div id="middle" align="center">
234 <table class="mytable table table-bordered table-hover">
239 {% for platform in platform_list %}
240 <tr class="border_bottom">
241 <td class="odd"> {{ platform.platform_no_access }} </td>
243 <button class="btn btn-success btn-sm" name= "add_{{platform.platform_no_access}}" type="submit" title="Add account to this platform">
244 <span class="glyphicon glyphicon-plus"></span>
259 $(document).ready(function() {
260 $('a.home-tab').click(function() {
261 $('ul.nav-tabs li').removeClass('active');
262 $(this).parent().addClass('active');
263 $('div.home-panel').hide();
264 $('div#'+$(this).data('panel')).show();
266 $('button#createslice').click(function() {
267 window.location="/portal/slice_request/";
269 ;$('button#slicerequestbtn').click(function() {
271 window.location="/portal/slice_request/";