1 {% extends "layout.html" %}
5 <div class="col-md-12">
6 <div class="breadcrumbs">
7 Account > <a href="/account">{{ person.email }}</a>
13 {% for message in messages %}
14 <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
19 <div class="col-md-12">
20 <ul class="nav nav-tabs nav-section">
21 <li class="active"><a href="#profile">User Profile</a></li>
22 <li><a href="#account">Account</a></li>
23 <li><a href="#access">Testbed Access</a></li>
27 <div class="tab-content">
28 <div class="tab-pane active row" id="profile">
30 <div class="col-md-12">
32 <form id="editForm" method="post" action="account_process" enctype="multipart/form-data">
34 <table class="profile">
37 <div><h3>Platform: Myslice</h3></div>
41 <td class="key">Email</td>
43 <span id="emailval" class="value" >{{ person.email }}</span>
44 <button class="btn btn-default" type="button" id="edit_email" onclick="editAlert();" title="To change your affiliation please contact the administrator">
45 <span class="glyphicon glyphicon-question-sign"></span> Edit
50 <td class="key">Password</td>
52 <button class="btn btn-default btn-xs" type="button" title="Password" name="edit_pass" id="edit_pass">
53 <span class="glyphicon glyphicon-edit"></span> Edit
55 <span id="passval"class="value">******** </span>
56 <span class="hide_this" id="span_pass">
57 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_pass_change"> Cancel </button>
58 <div style='display:none;' id="pass_form">
59 <input type='hidden' value='' /></div>
60 <table id="edit_password">
62 <td>Enter password: </td>
63 <td class="field"> <input type="password" name="password" id="password" /> </td>
66 <td>Confirm password: </td>
68 <input type="password" name="confirmpassword" id="confirmpassword" />
69 <input type="submit" class="btn btn-default btn-xs" name="submit_pass" value="Save"/>
77 <td class="key">Full Name</td>
79 <span id="nameval" class="value" >{{ fullname }} </span>
80 <span class="hide_this" id="span_name">
81 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_name_change"> Cancel </button>
82 <div style='display:none;'><input type='hidden' name='nameform' /></div>
83 <input id="fname" type="text" name="fname" class="required" maxlength="200" value="{{firstname}}" />
84 <input id="lname" type="text" name="lname" class="required" maxlength="200" value="{{lastname}}" />
85 <input type="submit" class="btn btn-default btn-xs" name="submit_name" value="Save"/>
87 <button class="btn btn-default btn-xs" type="button"title="Full Name" id="edit_name">
88 <span class="glyphicon glyphicon-edit"></span> Edit
93 <td class="key">Authority</td>
95 <span id="affval" class="value">{{ authority }}</span>
96 <button class="btn btn-default btn-xs" type="button" id="edit_auth" onclick="editAlert()" title="To change your authority please contact the administrator">
97 <span class="glyphicon glyphicon-question-sign"></span> Edit
101 {%if 'Enabled' in user_status %}
103 <td class="key">Generate Keys</td>
105 <input type="submit" name="generate" class="btn btn-primary" value="Generate a new Key Pair" id="generate_keypair"
106 onclick="return confirm('Are you sure? If you do so, your current credentials will be overwritten.');"
107 title="It will generate a new key Pair and your current credentials will be overwritten."/>
111 <td class="key">Public Key</td>
113 <span id="keyval" class="value">******** </span>
114 <span class="hide_this" id="span_upload">
115 <button type="button" class="btn btn-default" title="Cancel" id="cancel_upload"> Cancel </button>
116 <div style='display:none;'>
117 <input type='hidden' name='upload' /></div>
118 <input type="file" name="pubkey" class="required" id="pubkey"/>
119 <input class="btn btn-default btn-xs" name="upload_key" id="upload_key" type="submit" title="Upload your public key" value="Upload"
120 onclick="return confirm('Are you sure? It will overwrite your current credentials and you have delegate it manually.');"/>
122 <div style='display:none;'> <input type='hidden' name='dload' /> </div>
123 <button type="submit" name="dl_pubkey" class="btn btn-default btn-xs" title="Download your public key" id="dl_file">
124 <span class="glyphicon glyphicon-download"></span> Download
126 <button class="btn btn-default btn-xs" id="upload_file" type="button" title="Upload a public key">
127 <span class="glyphicon glyphicon-upload"></span> Upload
131 <tr class="even" id="pkey_row">
132 {%if 'N/A' not in user_private_key%}
133 <td class="key">Private Key </td> <!-- Hide if priv_key doesn't exist in myslice platform -->
134 <td class="value">********<a href="#"></a>
135 <button type="submit" name="dl_pkey" class="btn btn-default" title="Download your privaye key" id="dl_pkey">
136 <span class="glyphicon glyphicon-download"></span> Download
138 <input class="btn btn-danger btn-xs" id="delete" name="delete" type="submit" value="Delete" title="Delete your private key"
139 onclick="return confirm('Are you sure? If you do so, you have to delegate your credentials manually.');"/>
142 <td class="key">Private Key </td> <!-- Hide if priv_key doesn't exist in myslice platform -->
143 <td class="value">********<a href="#"></a>
144 <button type="submit" name="dl_pkey" class="btn btn-default disabled" title="Download your privaye key" id="dl_pkey">
145 <span class="glyphicon glyphicon-download"></span> Download
147 <input class="btn btn-danger btn-xs disabled" id="delete" name="delete" type="submit" title="Delete your private key" value="Delete" />
153 <p class="message" id="pkey_del_msg"><b> Tradeoff:</b> Ease-of-use vs Security.<br>
154 <b>Ease-of-use:</b> Automatic account delegation. Don't delete private key.<br>
155 <b>Security:</b> Manual account delegation. Download & Delete private key.
165 <div class="tab-pane row" id="account">
166 <div class="col-md-12">
168 <h3>Principal Account <small>Account used for delegating credentials</small></h3>
169 <table class="table">
172 <th>Account Type</th>
173 <th>Account Delegation</th>
176 <!--<th>Pub Key</th> -->
178 {% for row in principal_acc %}
179 <tr class="border_bottom">
180 <td class="odd"> {{ row.platform_name }} </td>
181 <td class="odd"> {{ row.account_type }} </td>
182 <td class="odd"> {{ row.delegation_type }} </td>
183 <td class="odd"> {{ row.usr_hrn }} </td>
184 <td class="odd"> {{ row.user_status }} </td>
185 <!-- <td class="even"> {{ row.usr_pubkey }} </td> -->
193 {%if 'Enabled' in user_status %}
194 <div class="col-md-12">
195 <h3>Credentials <small>Delegated to Principal Account</small></h3>
196 <table class="table">
197 <caption><b>Delegated User Credential</b></caption>
199 <th>Expiration Date</th>
202 {% for row in my_users %}
203 <tr class="border_bottom">
204 <td class="odd"> {{ row.cred_exp }} </td>
206 <button class="btn btn-default btn-xs" name= "dl_user_cred" type="submit" title="Download User Credential">
207 <span class="glyphicon glyphicon-download"></span> Credential
209 <button class="btn btn-default btn-xs" name= "dl_user_cert" type="submit" title="Download User Certificate">
210 <span class="glyphicon glyphicon-download"></span> Certificate
212 <button class="btn btn-default btn-xs" name= "dl_user_p12" type="submit" title="Download User PKCS12">
213 <span class="glyphicon glyphicon-download"></span> PKCS p12
220 <table class="mytable table table-bordered table-hover">
221 <caption><b>Delegated Slice Credentials</b></caption>
224 <th>Expiration Date</th>
227 {% for row in my_slices %}
228 <tr class="border_bottom">
229 <td class="odd"> {{ row.slice_name }} </td>
230 <td class="odd"> {{ row.cred_exp }} </td>
232 <button class="btn btn-default btn-xs" name= "dl_{{row.slice_name}}" type="submit" title="Download Slice Credentials">
233 <span class="glyphicon glyphicon-download"></span> Download
240 <table class="mytable table table-bordered table-hover">
241 <caption><b>Delegated Authority Credentials</b></caption>
243 <th>Authority Name</th>
244 <th>Expiration Date</th>
247 {% for row in my_auths %}
248 <tr class="border_bottom">
249 <td class="odd"> {{ row.auth_name }} </td>
250 <td class="odd"> {{ row.cred_exp }} </td>
252 <button class="btn btn-default btn-xs" name= "dl_{{row.auth_name}}" type="submit" title="Download Authority Credentials">
253 <span class="glyphicon glyphicon-download"></span> Download
260 {%if '' not in my_users%}
261 <p><button class="btn btn-danger btn-lg btn-block" name= "clear_cred" type="submit" title="Clear All Credentials">Clear Credentials</button></p>
263 <p><button class="btn btn-danger btn-lg btn-block disabled" name= "clear_cred" type="submit" title="Clear All Credentials">Clear Credentials</button></p>
268 <div class="tab-pane row" id="access">
269 <div class="col-md-12">
271 <h3>Testbed Access <small>Reference Accounts in the following testbeds</small></h3>
272 <table class="mytable table table-bordered table-hover">
275 <th>Account Type</th>
276 <th>Reference to</th>
277 <th>Remove Account</th>
279 {% for row in ref_acc %}
280 <tr class="border_bottom">
281 <td class="odd"> {{ row.platform_name }} </td>
282 <td class="odd"> {{ row.account_type }} </td>
283 <td class="odd"> {{ row.account_reference }} </td>
285 <button class="btn btn-danger" name="delete_{{row.platform_name}}" type="submit" title="Delete account from this platform">
286 <span class="glyphicon glyphicon-minus"></span>
294 <h3>Add reference account to the following testbeds</h3>
295 <table class="mytable table table-bordered table-hover">
300 {% for platform in platform_list %}
301 <tr class="border_bottom">
302 <td class="odd"> {{ platform.platform_no_access }} </td>
304 <button class="btn btn-success btn-sm" name= "add_{{platform.platform_no_access}}" type="submit" title="Add account to this platform">
305 <span class="glyphicon glyphicon-plus"></span>
318 $(document).ready(function() {
319 $('.nav-tabs a').click(function (e) {
322 id = $(this).attr('href').substr(1);
326 $('button#createslice').click(function() {
327 window.location="/portal/slice_request/";