1 {% extends "layout-unfold1.html" %}
2 {% block unfold_main %}
8 {% for message in messages %}
9 <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
15 <form id="editForm" method="POST" action="account_process" enctype="multipart/form-data">
16 <div id="middle" align="center">
19 <table class="profile">
22 <div id="info">Platform: Myslice</div>
26 <td class="key">Email</td>
28 <span id="emailval" class="value" >{{ person.email }}</span>
29 <button class="btn btn-default btn-xs" type="button" id="edit_email" onclick="editAlert()" title="To change your affiliation please contact the administrator">
30 <span class="glyphicon glyphicon-question-sign"></span> Edit
35 <td class="key">Password</td>
37 <button class="btn btn-default btn-xs" type="button" title="Password" name="edit_pass" id="edit_pass">
38 <span class="glyphicon glyphicon-edit"></span> Edit
40 <span id="passval"class="value">******** </span>
41 <span class="hide_this" id="span_pass">
42 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_pass_change"> Cancel </button>
43 <div style='display:none;' id="pass_form">
44 <input type='hidden' value='' /></div>
45 <table id="edit_password">
47 <td>Enter password: </td>
48 <td class="field"> <input type="password" name="password" id="password" /> </td>
51 <td>Confirm password: </td>
53 <input type="password" name="confirmpassword" id="confirmpassword" />
54 <input type="submit" class="btn btn-default btn-xs" name="submit_pass" value="Save"/>
62 <td class="key">Full Name</td>
64 <span id="nameval" class="value" >{{ fullname }} </span>
65 <span class="hide_this" id="span_name">
66 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_name_change"> Cancel </button>
67 <div style='display:none;'><input type='hidden' name='nameform' /></div>
68 <input id="fname" type="text" name="fname" class="required" maxlength="200" value="{{firstname}}" />
69 <input id="lname" type="text" name="lname" class="required" maxlength="200" value="{{lastname}}" />
70 <input type="submit" class="btn btn-default btn-xs" name="submit_name" value="Save"/>
72 <button class="btn btn-default btn-xs" type="button"title="Full Name" id="edit_name">
73 <span class="glyphicon glyphicon-edit"></span> Edit
78 <td class="key">Authority</td>
80 <span id="affval" class="value">{{ authority }}</span>
81 <button class="btn btn-default btn-xs" type="button" id="edit_auth" onclick="editAlert()" title="To change your authority please contact the administrator">
82 <span class="glyphicon glyphicon-question-sign"></span> Edit
87 <td class="key">Generate Keys</td>
89 <input type="submit" name="generate" class="btn btn-danger btn-xs" value="Generate a new Key Pair" id="generate_keypair"
90 onclick="return confirm('Are you sure? If you do so, your current credentials will be overwritten.');"
91 title="It will generate a new key Pair and your current credentials will be overwritten."/>
95 <td class="key">Public Key</td>
97 <span id="keyval" class="value">******** </span>
98 <span class="hide_this" id="span_upload">
99 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_upload"> Cancel </button>
100 <div style='display:none;'>
101 <input type='hidden' name='upload' /></div>
102 <input type="file" name="pubkey" class="required" id="pubkey"/>
103 <input class="btn btn-default btn-xs" name="upload_key" id="upload_key" type="submit" title="Upload your public key" value="Upload"
104 onclick="return confirm('Are you sure? It will overwrite your current credentials and you have delegate it manually.');"/>
106 <div style='display:none;'> <input type='hidden' name='dload' /> </div>
107 <button type="submit" name="dl_pubkey" class="btn btn-default btn-xs" title="Download your public key" id="dl_file">
108 <span class="glyphicon glyphicon-download"></span> Download
110 <button class="btn btn-default btn-xs" id="upload_file" type="button" title="Upload a public key">
111 <span class="glyphicon glyphicon-upload"></span> Upload
115 <tr class="even" id="pkey_row">
116 {%if 'N/A' not in user_private_key%}
117 <td class="key">Private Key </td> <!-- Hide if priv_key doesn't exist in myslice platform -->
118 <td class="value">********<a href="#">
119 <button type="submit" name="dl_pkey" class="btn btn-default btn-xs" title="Download your privaye key" id="dl_pkey">
120 <span class="glyphicon glyphicon-download"></span> Download
122 <input class="btn btn-danger btn-xs" id="delete" name="delete" type="submit" value="Delete" title="Delete your private key"
123 onclick="return confirm('Are you sure? If you do so, you have to delegate your credentials manually.');"/>
126 <td class="key">Private Key </td> <!-- Hide if priv_key doesn't exist in myslice platform -->
127 <td class="value">********<a href="#">
128 <button type="submit" name="dl_pkey" class="btn btn-default btn-xs disabled" title="Download your privaye key" id="dl_pkey">
129 <span class="glyphicon glyphicon-download"></span> Download
131 <input class="btn btn-danger btn-xs disabled" id="delete" name="delete" type="submit" title="Delete your private key"
138 <p class="message" id="pkey_del_msg"><b> Tradeoff:</b> Ease-of-use vs Security.<br>
139 <b>Ease-of-use:</b> Automatic account delegation. Don't delete private key.<br>
140 <b>Security:</b> Manual account delegation. Download & Delete private key.
149 <h2>Account Information</h2>
150 <h3>Principal Account <small>Account used for delegating credentials</small></h3>
151 <div id="middle" align="center">
153 <table class="table table-bordered table-hover mytable">
156 <th>Account Type</th>
157 <th>Account Delegation</th>
159 <!--<th>Pub Key</th> -->
161 {% for row in principal_acc %}
162 <tr class="border_bottom">
163 <td class="odd"> {{ row.platform_name }} </td>
164 <td class="odd"> {{ row.account_type }} </td>
165 <td class="odd"> {{ row.delegation_type }} </td>
166 <td class="odd"> {{ row.usr_hrn }} </td>
167 <!-- <td class="even"> {{ row.usr_pubkey }} </td> -->
177 <h3 id="show-pending" class="plugin-show" style="display: block;">
178 <span class="glyphicon glyphicon-chevron-right"></span>
179 <a href="#" class="plugin-tooltip" data-toggle="tooltip" data-original-title="Show plugin "Pending operations" (QueryUpdater)"></a>Credentials</h3>
181 <div id="hide-pending" class="plugin-hide" style="display: none;">
182 <span class="glyphicon glyphicon-chevron-down"></span>
183 <a href="#" class="plugin-tooltip" data-toggle="tooltip" data-original-title="Hide plugin "Pending operations" (QueryUpdater)">Credentials</a>
185 <h5>Delegated Credentials to Principal Account</h5>
186 <div id="middle" align="center">
188 <table class="mytable table table-bordered table-hover">
189 <caption><b>Delegated User Credential</b></caption>
191 <th>Expiration Date</th>
194 {% for row in my_users %}
195 <tr class="border_bottom">
196 <td class="odd"> {{ row.cred_exp }} </td>
198 <button class="btn btn-default btn-xs" name= "dl_user_cred" type="submit" title="Download User Credential">
199 <span class="glyphicon glyphicon-download"></span> Download
206 <table class="mytable table table-bordered table-hover">
207 <caption><b>Delegated Slice Credentials</b></caption>
210 <th>Expiration Date</th>
213 {% for row in my_slices %}
214 <tr class="border_bottom">
215 <td class="odd"> {{ row.slice_name }} </td>
216 <td class="odd"> {{ row.cred_exp }} </td>
218 <button class="btn btn-default btn-xs" name= "dl_{{row.slice_name}}" type="submit" title="Download Slice Credentials">
219 <span class="glyphicon glyphicon-download"></span> Download
226 <table class="mytable table table-bordered table-hover">
227 <caption><b>Delegated Authority Credentials</b></caption>
229 <th>Authority Name</th>
230 <th>Expiration Date</th>
233 {% for row in my_auths %}
234 <tr class="border_bottom">
235 <td class="odd"> {{ row.auth_name }} </td>
236 <td class="odd"> {{ row.cred_exp }} </td>
238 <button class="btn btn-default btn-xs" name= "dl_{{row.auth_name}}" type="submit" title="Download Authority Credentials">
239 <span class="glyphicon glyphicon-download"></span> Download
246 {%if '' not in my_users%}
247 <p><button class="btn btn-danger btn-lg btn-block" name= "clear_cred" type="submit" title="Clear All Credentials">Clear Credentials</button></p>
249 <p><button class="btn btn-danger btn-lg btn-block disabled" name= "clear_cred" type="submit" title="Clear All Credentials">Clear Credentials</button></p>
256 <h3 id="show-filters" class="plugin-show" style="display: block;">
257 <span class="glyphicon glyphicon-chevron-right"></span>
258 <a href="#" class="plugin-tooltip" data-toggle="tooltip" data-original-title="Show plugin "Pending operations" (QueryUpdater)"></a>TestBed Accounts</h3>
260 <div id="hide-filters" class="plugin-hide" style="display: none;">
261 <span class="glyphicon glyphicon-chevron-down"></span>
262 <a href="#" class="plugin-tooltip" data-toggle="tooltip" data-original-title="Hide plugin "Pending operations" (QueryUpdater)">TestBed Accounts</a>
264 <h5>Reference Accounts in the following testbeds</h5>
265 <div id="middle" align="center">
267 <table class="mytable table table-bordered table-hover">
270 <th>Account Type</th>
271 <th>Reference to</th>
272 <th>Remove Account</th>
274 {% for row in ref_acc %}
275 <tr class="border_bottom">
276 <td class="odd"> {{ row.platform_name }} </td>
277 <td class="odd"> {{ row.account_type }} </td>
278 <td class="odd"> {{ row.account_reference }} </td>
280 <button class="btn btn-danger btn-xs" name="delete_{{row.platform_name}}" type="submit" title="Delete account from this platform">
281 <span class="glyphicon glyphicon-minus"></span>
292 <h3 id="show-resources" class="plugin-show" style="display: block;">
293 <span class="glyphicon glyphicon-chevron-right"></span>
294 <a href="#" class="plugin-tooltip" data-toggle="tooltip" data-original-title="Show plugin "Pending operations" (QueryUpdater)"></a>Add Accounts</h3>
296 <div id="hide-resources" class="plugin-hide" style="display: none;">
297 <span class="glyphicon glyphicon-chevron-down"></span>
298 <a href="#" class="plugin-tooltip" data-toggle="tooltip" data-original-title="Hide plugin "Pending operations" (QueryUpdater)">Add Accounts</a>
301 <h5>Add reference account to the following testbeds</h5>
302 <div id="middle" align="center">
304 <table class="mytable table table-bordered table-hover">
309 {% for platform in platform_list %}
310 <tr class="border_bottom">
311 <td class="odd"> {{ platform.platform_no_access }} </td>
313 <button class="btn btn-success btn-sm" name= "add_{{platform.platform_no_access}}" type="submit" title="Add account to this platform">
314 <span class="glyphicon glyphicon-plus"></span>