1 {% extends "layout_wide.html" %}
7 {% for message in messages %}
8 <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
12 <div class="container">
14 <div class="col-md-12">
15 <ul class="nav nav-tabs nav-section">
16 <li class="active"><a href="#profile"><img src="{{ STATIC_URL }}icons/user-xs.png" alt="User Account" /> User Profile</a></li>
17 <li><a href="#account">Account</a></li>
18 <li><a href="#access">Testbed Access</a></li>
23 <div class="container tab-content">
24 <div class="tab-pane active row" id="profile">
26 <div class="col-md-12">
28 <form id="editForm" method="post" action="account_process" enctype="multipart/form-data">
30 <table class="profile">
33 <div>Platforms: Myslice</div>
37 <td class="key">Email</td>
39 <span id="emailval" class="value" >{{ person.email }}</span>
40 <button class="btn btn-default btn-xs" type="button" id="edit_email" onclick="editAlert();" title="To change your affiliation please contact the administrator">
41 <span class="glyphicon glyphicon-question-sign"></span> Edit
46 <td class="key">Password</td>
48 <button class="btn btn-default btn-xs" type="button" title="Password" name="edit_pass" id="edit_pass">
49 <span class="glyphicon glyphicon-edit"></span> Edit
51 <span id="passval"class="value">******** </span>
52 <span class="hide_this" id="span_pass">
53 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_pass_change"> Cancel </button>
54 <div style='display:none;' id="pass_form">
55 <input type='hidden' value='' /></div>
56 <table id="edit_password">
58 <td>Enter password: </td>
59 <td class="field"> <input type="password" name="password" id="password" /> </td>
62 <td>Confirm password: </td>
64 <input type="password" name="confirmpassword" id="confirmpassword" />
65 <input type="submit" class="btn btn-default btn-xs" name="submit_pass" value="Save"/>
73 <td class="key">Full Name</td>
75 <span id="nameval" class="value" >{{ fullname }} </span>
76 <span class="hide_this" id="span_name">
77 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_name_change"> Cancel </button>
78 <div style='display:none;'><input type='hidden' name='nameform' /></div>
79 <input id="fname" type="text" name="fname" class="required" maxlength="200" value="{{firstname}}" />
80 <input id="lname" type="text" name="lname" class="required" maxlength="200" value="{{lastname}}" />
81 <input type="submit" class="btn btn-default btn-xs" name="submit_name" value="Save"/>
83 <button class="btn btn-default btn-xs" type="button"title="Full Name" id="edit_name">
84 <span class="glyphicon glyphicon-edit"></span> Edit
89 <td class="key">Authority</td>
91 <span id="affval" class="value">{{ authority }}</span>
92 <button class="btn btn-default btn-xs" type="button" id="edit_auth" onclick="editAlert()" title="To change your authority please contact the administrator">
93 <span class="glyphicon glyphicon-question-sign"></span> Edit
97 {%if 'Enabled' in user_status %}
99 <td class="key">Generate Keys</td>
101 <input type="submit" name="generate" class="btn btn-danger btn-xs" value="Generate a new Key Pair" id="generate_keypair"
102 onclick="return confirm('Are you sure? If you do so, your current credentials will be overwritten.');"
103 title="It will generate a new key Pair and your current credentials will be overwritten."/>
107 <td class="key">Public Key</td>
109 <span id="keyval" class="value">******** </span>
110 <span class="hide_this" id="span_upload">
111 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_upload"> Cancel </button>
112 <div style='display:none;'>
113 <input type='hidden' name='upload' /></div>
114 <input type="file" name="pubkey" class="required" id="pubkey"/>
115 <input class="btn btn-default btn-xs" name="upload_key" id="upload_key" type="submit" title="Upload your public key" value="Upload"
116 onclick="return confirm('Are you sure? It will overwrite your current credentials and you have delegate it manually.');"/>
118 <div style='display:none;'> <input type='hidden' name='dload' /> </div>
119 <button type="submit" name="dl_pubkey" class="btn btn-default btn-xs" title="Download your public key" id="dl_file">
120 <span class="glyphicon glyphicon-download"></span> Download
122 <button class="btn btn-default btn-xs" id="upload_file" type="button" title="Upload a public key">
123 <span class="glyphicon glyphicon-upload"></span> Upload
127 <tr class="even" id="pkey_row">
128 {%if 'N/A' not in user_private_key%}
129 <td class="key">Private Key </td> <!-- Hide if priv_key doesn't exist in myslice platform -->
130 <td class="value">********<a href="#"></a>
131 <button type="submit" name="dl_pkey" class="btn btn-default btn-xs" title="Download your privaye key" id="dl_pkey">
132 <span class="glyphicon glyphicon-download"></span> Download
134 <input class="btn btn-danger btn-xs" id="delete" name="delete" type="submit" value="Delete" title="Delete your private key"
135 onclick="return confirm('Are you sure? If you do so, you have to delegate your credentials manually.');"/>
138 <td class="key">Private Key </td> <!-- Hide if priv_key doesn't exist in myslice platform -->
139 <td class="value">********<a href="#"></a>
140 <button type="submit" name="dl_pkey" class="btn btn-default btn-xs disabled" title="Download your privaye key" id="dl_pkey">
141 <span class="glyphicon glyphicon-download"></span> Download
143 <input class="btn btn-danger btn-xs disabled" id="delete" name="delete" type="submit" title="Delete your private key" value="Delete" />
148 {%if 'N/A' not in user_private_key%}
149 <td class="key">Identity</td>
151 <button type="submit" name="dl_identity" class="btn btn-default btn-xs" title="You will require it to use jfed" id="dl_pkey">
152 <span class="glyphicon glyphicon-download"></span> Download
156 <td class="key">Identity</td>
158 <button type="submit" name="dl_identity" class="btn btn-default btn-xs disabled" title="You will require it to use jfed" id="dl_pkey">
159 <span class="glyphicon glyphicon-download"></span> Download
166 <p class="message" id="pkey_del_msg"><b> Tradeoff:</b> Ease-of-use vs Security.<br>
167 <b>Ease-of-use:</b> Automatic account delegation. Don't delete private key.<br>
168 <b>Security:</b> Manual account delegation. Download & Delete private key.
178 <div class="tab-pane row" id="account">
179 <div class="col-md-12">
181 <h3>Principal Account <small>Account used for delegating credentials</small></h3>
182 <table class="table">
185 <th>Account Type</th>
186 <th>Account Delegation</th>
189 <!--<th>Pub Key</th> -->
191 {% for row in principal_acc %}
192 <tr class="border_bottom">
193 <td class="odd"> {{ row.platform_name }} </td>
194 <td class="odd"> {{ row.account_type }} </td>
195 <td class="odd"> {{ row.delegation_type }} </td>
196 <td class="odd"> {{ row.usr_hrn }} </td>
197 <td class="odd"> {{ row.user_status }} </td>
198 <!-- <td class="even"> {{ row.usr_pubkey }} </td> -->
206 {%if 'Enabled' in user_status %}
207 <div class="col-md-12">
208 <h3>Credentials <small>Delegated to Principal Account</small></h3>
209 <table class="table">
210 <caption><b>Delegated User Credential</b></caption>
212 <th>Expiration Date</th>
215 {% for row in my_users %}
216 <tr class="border_bottom">
217 <td class="odd"> {{ row.cred_exp }} </td>
219 <button class="btn btn-default btn-xs" name= "dl_user_cred" type="submit" title="Download User Credential">
220 <span class="glyphicon glyphicon-download"></span> Download
227 <table class="mytable table table-bordered table-hover">
228 <caption><b>Delegated Slice Credentials</b></caption>
231 <th>Expiration Date</th>
234 {% for row in my_slices %}
235 <tr class="border_bottom">
236 <td class="odd"> {{ row.slice_name }} </td>
237 <td class="odd"> {{ row.cred_exp }} </td>
239 <button class="btn btn-default btn-xs" name= "dl_{{row.slice_name}}" type="submit" title="Download Slice Credentials">
240 <span class="glyphicon glyphicon-download"></span> Download
247 <table class="mytable table table-bordered table-hover">
248 <caption><b>Delegated Authority Credentials</b></caption>
250 <th>Authority Name</th>
251 <th>Expiration Date</th>
254 {% for row in my_auths %}
255 <tr class="border_bottom">
256 <td class="odd"> {{ row.auth_name }} </td>
257 <td class="odd"> {{ row.cred_exp }} </td>
259 <button class="btn btn-default btn-xs" name= "dl_{{row.auth_name}}" type="submit" title="Download Authority Credentials">
260 <span class="glyphicon glyphicon-download"></span> Download
267 {%if '' not in my_users%}
268 <p><button class="btn btn-danger btn-lg btn-block" name= "clear_cred" type="submit" title="Clear All Credentials">Clear Credentials</button></p>
270 <p><button class="btn btn-danger btn-lg btn-block disabled" name= "clear_cred" type="submit" title="Clear All Credentials">Clear Credentials</button></p>
275 <div class="tab-pane row" id="access">
276 <div class="col-md-12">
278 <h3>Testbed Access <small>Reference Accounts in the following testbeds</small></h3>
279 <table class="mytable table table-bordered table-hover">
282 <th>Account Type</th>
283 <th>Reference to</th>
284 <th>Remove Account</th>
286 {% for row in ref_acc %}
287 <tr class="border_bottom">
288 <td class="odd"> {{ row.platform_name }} </td>
289 <td class="odd"> {{ row.account_type }} </td>
290 <td class="odd"> {{ row.account_reference }} </td>
292 <button class="btn btn-danger btn-xs" name="delete_{{row.platform_name}}" type="submit" title="Delete account from this platform">
293 <span class="glyphicon glyphicon-minus"></span>
301 <h3>Add reference account to the following testbeds</h3>
302 <table class="mytable table table-bordered table-hover">
307 {% for platform in platform_list %}
308 <tr class="border_bottom">
309 <td class="odd"> {{ platform.platform_no_access }} </td>
311 <button class="btn btn-success btn-sm" name= "add_{{platform.platform_no_access}}" type="submit" title="Add account to this platform">
312 <span class="glyphicon glyphicon-plus"></span>
325 $(document).ready(function() {
326 $('.nav-tabs a').click(function (e) {
329 id = $(this).attr('href').substr(1);
333 $('button#createslice').click(function() {
334 window.location="/portal/slice_request/";