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.
125 <h2>Account Information</h2>
126 <h3>Principal Account <small>Account used for delegating credentials</small></h3>
127 <div id="middle" align="center">
129 <table class="table table-bordered table-hover mytable">
132 <th>Account Type</th>
133 <th>Account Delegation</th>
135 <!--<th>Pub Key</th> -->
137 {% for row in principal_acc %}
138 <tr class="border_bottom">
139 <td class="odd"> {{ row.platform_name }} </td>
140 <td class="odd"> {{ row.account_type }} </td>
141 <td class="odd"> {{ row.delegation_type }} </td>
142 <td class="odd"> {{ row.usr_hrn }} </td>
143 <!-- <td class="even"> {{ row.usr_pubkey }} </td> -->
152 <div id="middle" align="center">
154 <table class="mytable table table-bordered table-hover">
155 <caption><b>Delegated User Credential</b></caption>
157 <th>Expiration Date</th>
160 {% for row in my_users %}
161 <tr class="border_bottom">
162 <td class="odd"> {{ row.cred_exp }} </td>
163 <td class="odd"><button class="btn btn-default btn-xs" name= "dl_user_cred" type="submit" title="Download User Credential">Download</button></td>
168 <table class="mytable table table-bordered table-hover">
169 <caption><b>Delegated Slice Credentials</b></caption>
172 <th>Expiration Date</th>
175 {% for row in my_slices %}
176 <tr class="border_bottom">
177 <td class="odd"> {{ row.slice_name }} </td>
178 <td class="odd"> {{ row.cred_exp }} </td>
179 <td class="odd"> <button class="btn btn-default btn-xs" name= "dl_{{row.slice_name}}" type="submit" title="Download Slice Credentials">Download</button> </td>
184 <table class="mytable table table-bordered table-hover">
185 <caption><b>Delegated Authority Credentials</b></caption>
187 <th>Authority Name</th>
188 <th>Expiration Date</th>
191 {% for row in my_auths %}
192 <tr class="border_bottom">
193 <td class="odd"> {{ row.auth_name }} </td>
194 <td class="odd"> {{ row.cred_exp }} </td>
195 <td class="odd"><button class="btn btn-default btn-xs" name= "dl_{{row.auth_name}}" type="submit" title="Download Authority Credentials">Download</button></td>
200 <p><button class="btn btn-danger btn-lg btn-block" name= "clear_cred" type="submit" title="Clear All Credentials">Clear Credentials</button></p>
207 <h3>Testbed Accounts <small>Reference accounts in the following testbeds</small></h3>
208 <div id="middle" align="center">
210 <table class="mytable table table-bordered table-hover">
213 <th>Account Type</th>
214 <th>Reference to</th>
215 <th>Remove Account</th>
217 {% for row in ref_acc %}
218 <tr class="border_bottom">
219 <td class="odd"> {{ row.platform_name }} </td>
220 <td class="odd"> {{ row.account_type }} </td>
221 <td class="odd"> {{ row.account_reference }} </td>
223 <button class="btn btn-danger btn-xs" name="delete_{{row.platform_name}}" type="submit" title="Delete account from this platform">Delete</button>
231 <h3>Add Accounts <small>Add ref. account to the following testbeds</small></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-xs" name= "add_{{platform.platform_no_access}}" type="submit" title="Add account to this platform">Add</button>