1 {% extends "layout-unfold1.html" %}
2 {% block unfold_main %}
4 <h2>User Profile <small>User info. in Myslice platform</small></h2>
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 <img class="img-thumbnail" src="{{STATIC_URL}}/img/ques_icon.png" onclick="emailAlert()" title="To change your email please contact the administrator"
30 style="height: 24px; position: absolute; left: 625px; left: 900px; margin-top: -3px;">
34 <td class="key">Password</td>
36 <button class="btn btn-default btn-xs" type="button" title="Password" name="edit_pass" id="edit_pass">Edit</button>
37 <span id="passval"class="value">******** </span>
38 <span class="hide_this" id="span_pass">
39 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_pass_change"> Cancel </button>
40 <div style='display:none;' id="pass_form">
41 <input type='hidden' value='' /></div>
42 <table id="edit_password">
44 <td>Enter password: </td>
45 <td class="field"> <input type="password" name="password" id="password" /> </td>
48 <td>Confirm password: </td>
50 <input type="password" name="confirmpassword" id="confirmpassword" />
51 <input type="submit" class="btn btn-default btn-xs" name="submit_pass" value="Save"/>
59 <td class="key">Full Name</td>
61 <span id="nameval" class="value" >{{ fullname }} </span>
62 <span class="hide_this" id="span_name">
63 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_name_change"> Cancel </button>
64 <div style='display:none;'><input type='hidden' name='nameform' /></div>
65 <input id="fname" type="text" name="fname" class="required" maxlength="200" value="{{firstname}}" />
66 <input id="lname" type="text" name="lname" class="required" maxlength="200" value="{{lastname}}" />
67 <input type="submit" class="btn btn-default btn-xs" name="submit_name" value="Save"/>
69 <button class="btn btn-default btn-xs" type="button"title="Full Name" id="edit_name">Edit</button>
73 <td class="key">Authority</td>
75 <span id="affval" class="value">{{ authority }}</span>
76 <img class="img-thumbnail" src="{{STATIC_URL}}/img/ques_icon.png" onclick="affAlert()" title="To change your affiliation please contact the administrator"
77 style="height: 24px; position: absolute; left: 625px; left: 900px; margin-top:-3px; ">
81 <td class="key">Generate Keys</td>
83 <button id="generate_keypair" class="btn btn-danger btn-xs" name="generate" type="submit" onclick="myFunction()"
84 title="Generate a new key pair. After it is generated, you will need to download your public and private keys again.">Generate a new Key Pair
89 <td class="key">Public Key</td>
91 <span id="keyval" class="value">******** </span>
92 <span class="hide_this" id="span_upload">
93 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_upload"> Cancel </button>
94 <div style='display:none;'>
95 <input type='hidden' name='upload' /></div>
96 <input type="file" name="pubkey" class="required" id="pubkey"/>
97 <button class="btn btn-default btn-xs" name="upload_key" id="upload_key" type="submit" title="Delete your private key">Upload </button>
99 <div style='display:none;'> <input type='hidden' name='dload' /> </div>
100 <button type="submit" name="dl_pubkey" class="btn btn-default btn-xs" title="Download your public key" id="dl_file"> Download </button>
101 <button class="btn btn-default btn-xs" id="upload_file" type="button" title="Upload a public key"> Upload </button>
104 <tr class="even" id="pkey_row">
105 {%if 'N/A' not in user_private_key%}
106 <td class="key">Private Key </td> <!-- Hide if priv_key doesn't exist in myslice platform -->
107 <td class="value">********<a href="#">
108 <button type="submit" name="dl_pkey" class="btn btn-default btn-xs" title="Download your privaye key" id="dl_pkey"> Download </button>
109 <button class="btn btn-danger btn-xs" id="delete" name="delete" type="submit" title="Delete your private key">Delete </button>
115 <p class="message" id="pkey_del_msg"><b> Tradeoff:</b> Ease-of-use vs Security.<br>
116 <b>Ease-of-use:</b> Automatic account delegation. Don't delete private key.<br>
117 <b>Security:</b> Manual account delegation. Download & Delete private key.
126 <h2>Account Information</h2>
127 <h3>Principal Account <small>Account used for delegating credentials</small></h3>
128 <div id="middle" align="center">
130 <table class="table table-bordered table-hover mytable">
133 <th>Account Type</th>
134 <th>Account Delegation</th>
136 <!--<th>Pub Key</th> -->
138 {% for row in principal_acc %}
139 <tr class="border_bottom">
140 <td class="odd"> {{ row.platform_name }} </td>
141 <td class="odd"> {{ row.account_type }} </td>
142 <td class="odd"> {{ row.delegation_type }} </td>
143 <td class="odd"> {{ row.usr_hrn }} </td>
144 <!-- <td class="even"> {{ row.usr_pubkey }} </td> -->
154 <h3 id="show-pending" class="plugin-show" style="display: block;">
155 <span class="glyphicon glyphicon-chevron-right"></span>
156 <a href="#" class="plugin-tooltip" data-toggle="tooltip" data-original-title="Show plugin "Pending operations" (QueryUpdater)"></a>Credentials</h3>
158 <div id="hide-pending" class="plugin-hide" style="display: none;">
159 <span class="glyphicon glyphicon-chevron-down"></span>
160 <a href="#" class="plugin-tooltip" data-toggle="tooltip" data-original-title="Hide plugin "Pending operations" (QueryUpdater)">Credentials</a>
162 <h5>Delegated Credentials to Principal Account</h5>
163 <div id="middle" align="center">
165 <table class="mytable table table-bordered table-hover">
166 <caption><b>Delegated User Credential</b></caption>
168 <th>Expiration Date</th>
171 {% for row in my_users %}
172 <tr class="border_bottom">
173 <td class="odd"> {{ row.cred_exp }} </td>
174 <td class="odd"><button class="btn btn-default btn-xs" name= "dl_user_cred" type="submit" title="Download User Credential">Download</button></td>
179 <table class="mytable table table-bordered table-hover">
180 <caption><b>Delegated Slice Credentials</b></caption>
183 <th>Expiration Date</th>
186 {% for row in my_slices %}
187 <tr class="border_bottom">
188 <td class="odd"> {{ row.slice_name }} </td>
189 <td class="odd"> {{ row.cred_exp }} </td>
190 <td class="odd"> <button class="btn btn-default btn-xs" name= "dl_{{row.slice_name}}" type="submit" title="Download Slice Credentials">Download</button> </td>
195 <table class="mytable table table-bordered table-hover">
196 <caption><b>Delegated Authority Credentials</b></caption>
198 <th>Authority Name</th>
199 <th>Expiration Date</th>
202 {% for row in my_auths %}
203 <tr class="border_bottom">
204 <td class="odd"> {{ row.auth_name }} </td>
205 <td class="odd"> {{ row.cred_exp }} </td>
206 <td class="odd"><button class="btn btn-default btn-xs" name= "dl_{{row.auth_name}}" type="submit" title="Download Authority Credentials">Download</button></td>
211 <p><button class="btn btn-danger btn-lg btn-block" name= "clear_cred" type="submit" title="Clear All Credentials">Clear Credentials</button></p>
217 <h3 id="show-filters" class="plugin-show" style="display: block;">
218 <span class="glyphicon glyphicon-chevron-right"></span>
219 <a href="#" class="plugin-tooltip" data-toggle="tooltip" data-original-title="Show plugin "Pending operations" (QueryUpdater)"></a>TestBed Accounts</h3>
221 <div id="hide-filters" class="plugin-hide" style="display: none;">
222 <span class="glyphicon glyphicon-chevron-down"></span>
223 <a href="#" class="plugin-tooltip" data-toggle="tooltip" data-original-title="Hide plugin "Pending operations" (QueryUpdater)">TestBed Accounts</a>
225 <h5>Reference Accounts in the following testbeds</h5>
226 <div id="middle" align="center">
228 <table class="mytable table table-bordered table-hover">
231 <th>Account Type</th>
232 <th>Reference to</th>
233 <th>Remove Account</th>
235 {% for row in ref_acc %}
236 <tr class="border_bottom">
237 <td class="odd"> {{ row.platform_name }} </td>
238 <td class="odd"> {{ row.account_type }} </td>
239 <td class="odd"> {{ row.account_reference }} </td>
241 <button class="btn btn-danger btn-xs" name="delete_{{row.platform_name}}" type="submit" title="Delete account from this platform">Delete</button>
251 <h3 id="show-resources" class="plugin-show" style="display: block;">
252 <span class="glyphicon glyphicon-chevron-right"></span>
253 <a href="#" class="plugin-tooltip" data-toggle="tooltip" data-original-title="Show plugin "Pending operations" (QueryUpdater)"></a>Add Accounts</h3>
255 <div id="hide-resources" class="plugin-hide" style="display: none;">
256 <span class="glyphicon glyphicon-chevron-down"></span>
257 <a href="#" class="plugin-tooltip" data-toggle="tooltip" data-original-title="Hide plugin "Pending operations" (QueryUpdater)">Add Accounts</a>
260 <h5>Add reference account to the following testbeds</h5>
261 <div id="middle" align="center">
263 <table class="mytable table table-bordered table-hover">
268 {% for platform in platform_list %}
269 <tr class="border_bottom">
270 <td class="odd"> {{ platform.platform_no_access }} </td>
272 <button class="btn btn-success btn-xs" name= "add_{{platform.platform_no_access}}" type="submit" title="Add account to this platform">Add</button>