1 {% extends "layout-unfold1.html" %}
4 <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/onelab.css"/>
5 <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/account_view.css" />
6 <script type="text/javascript" src="{{STATIC_URL}}/js/jquery.validate.js"></script>
7 <script type="text/javascript" src="{{STATIC_URL}}/js/my_account.edit_profile.js"></script>
8 <script type="text/javascript" src="{{STATIC_URL}}/js/my_account.register.js"></script>
11 {% block unfold_main %}
13 <h2>User Profile <small>User info. in Myslice platform</small></h2>
17 {% for message in messages %}
18 <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
24 <form id="editForm" method="POST" action="account_process" enctype="multipart/form-data">
25 <div id="middle" align="center">
28 <table class="profile">
31 <div id="info">Platform: Myslice</div>
35 <td class="key">Email</td>
37 <span id="emailval" class="value" >{{ person.email }}</span>
38 <img class="img-thumbnail" src="{{STATIC_URL}}/img/ques_icon.png" onclick="emailAlert()" title="To change your email please contact the administrator"
39 style="height: 24px; position: absolute; left: 625px; left: 900px; margin-top: -3px;">
43 <td class="key">Password</td>
45 <button class="btn btn-default btn-xs" type="button" title="Password" name="edit_pass" id="edit_pass">Edit</button>
46 <span id="passval"class="value">******** </span>
47 <span class="hide_this" id="span_pass">
48 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_pass_change"> Cancel </button>
49 <div style='display:none;' id="pass_form">
50 <input type='hidden' value='' /></div>
51 <table id="edit_password">
53 <td>Enter password: </td>
54 <td class="field"> <input type="password" name="password" id="password" /> </td>
57 <td>Confirm password: </td>
59 <input type="password" name="confirmpassword" id="confirmpassword" />
60 <input type="submit" class="btn btn-default btn-xs" name="submit_pass" value="Save"/>
68 <td class="key">Full Name</td>
70 <span id="nameval" class="value" >{{ fullname }} </span>
71 <span class="hide_this" id="span_name">
72 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_name_change"> Cancel </button>
73 <div style='display:none;'><input type='hidden' name='nameform' /></div>
74 <input id="fname" type="text" name="fname" class="required" maxlength="200" value="{{firstname}}" />
75 <input id="lname" type="text" name="lname" class="required" maxlength="200" value="{{lastname}}" />
76 <input type="submit" class="btn btn-default btn-xs" name="submit_name" value="Save"/>
78 <button class="btn btn-default btn-xs" type="button"title="Full Name" id="edit_name">Edit</button>
82 <td class="key">Authority</td>
84 <span id="affval" class="value">{{ authority }}</span>
85 <img class="img-thumbnail" src="{{STATIC_URL}}/img/ques_icon.png" onclick="affAlert()" title="To change your affiliation please contact the administrator"
86 style="height: 24px; position: absolute; left: 625px; left: 900px; margin-top:-3px; ">
90 <td class="key">Generate Keys</td>
92 <button id="generate_keypair" class="btn btn-danger btn-xs" name="generate" type="submit" onclick="myFunction()"
93 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
98 <td class="key">Public Key</td>
100 <span id="keyval" class="value">******** </span>
101 <span class="hide_this" id="span_upload">
102 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_upload"> Cancel </button>
103 <div style='display:none;'>
104 <input type='hidden' name='upload' /></div>
105 <input type="file" name="pubkey" class="required" id="pubkey"/>
106 <button class="btn btn-default btn-xs" name="upload_key" id="upload_key" type="submit" title="Delete your private key">Upload </button>
108 <div style='display:none;'> <input type='hidden' name='dload' /> </div>
109 <button type="submit" name="dl_pubkey" class="btn btn-default btn-xs" title="Download your public key" id="dl_file"> Download </button>
110 <button class="btn btn-default btn-xs" id="upload_file" type="button" title="Upload a public key"> Upload </button>
113 <tr class="even" id="pkey_row">
114 {%if 'N/A' not in user_private_key%}
115 <td class="key">Private Key </td> <!-- Hide if priv_key doesn't exist in myslice platform -->
116 <td class="value">********<a href="#">
117 <button type="submit" name="dl_pkey" class="btn btn-default btn-xs" title="Download your privaye key" id="dl_pkey"> Download </button>
118 <button class="btn btn-danger btn-xs" id="delete" name="delete" type="submit" title="Delete your private key">Delete </button>
124 <p class="message" id="pkey_del_msg"><b> Tradeoff:</b> Ease-of-use vs Security.<br>
125 <b>Ease-of-use:</b> Automatic account delegation. Don't delete private key.<br>
126 <b>Security:</b> Manual account delegation. Download & Delete private key.
134 <h2>Account Information</h2>
135 <h3>Principal Account <small>Account used for delegating credentials</small></h3>
136 <div id="middle" align="center">
138 <table class="table table-bordered table-hover mytable">
141 <th>Account Type</th>
142 <th>Account_delegation</th>
144 <!--<th>Pub Key</th> -->
146 {% for row in data %}
147 <tr class="border_bottom">
148 <td class="odd"> {{ row.platform_name }} </td>
149 <td class="odd"> {{ row.account_type }} </td>
150 <td class="odd"> {{ row.delegation_type }} </td>
151 <td class="odd"> {{ row.usr_hrn }} </td>
152 <!-- <td class="even"> {{ row.usr_pubkey }} </td> -->
161 <div id="middle" align="center">
163 <table class="mytable table table-bordered table-hover">
164 <caption><b>Delegated User Credential</b></caption>
166 <th>Expiration Date</th>
169 {% for row in my_users %}
170 <tr class="border_bottom">
171 <td class="odd"> {{ row.cred_exp }} </td>
172 <td class="odd"><button class="btn btn-default btn-xs" name= "dl_user_cred" type="submit" title="Download User Credential">Download</button></td>
177 <table class="mytable table table-bordered table-hover">
178 <caption><b>Delegated Slice Credentials</b></caption>
181 <th>Expiration Date</th>
184 {% for row in my_slices %}
185 <tr class="border_bottom">
186 <td class="odd"> {{ row.slice_name }} </td>
187 <td class="odd"> {{ row.cred_exp }} </td>
188 <td class="odd"> <button class="btn btn-default btn-xs" name= "dl_slice_cred" type="submit" title="Download Slice Credentials">Download</button> </td>
193 <table class="mytable table table-bordered table-hover">
194 <caption><b>Delegated Authority Credentials</b></caption>
196 <th>Authority Name</th>
197 <th>Expiration Date</th>
200 {% for row in my_auths %}
201 <tr class="border_bottom">
202 <td class="odd"> {{ row.auth_name }} </td>
203 <td class="odd"> {{ row.cred_exp }} </td>
204 <td class="odd"><button class="btn btn-default btn-xs" name= "dl_auth_cred" type="submit" title="Download Authority Credentials">Download</button></td>
209 <p><button class="btn btn-danger btn-lg btn-block" name= "clear_cred" type="submit" title="Clear All Credentials">Clear Credentials</button></p>
216 <h3>Testbed Accounts <small>User accounts in other testbeds</small></h3>
217 <div id="middle" align="center">
219 <table class="mytable table table-bordered table-hover">
222 <th>Account Type</th>
223 <th>Reference to</th>
224 <th>Remove Account</th>
226 {% for row in ref_acc %}
227 <tr class="border_bottom">
228 <td class="odd"> {{ row.platform_name }} </td>
229 <td class="odd"> {{ row.account_type }} </td>
230 <td class="odd"> {{ row.account_reference }} </td>
232 <button class="btn btn-danger btn-xs" name="delete_{{row.platform_name}}" type="submit" title="Delete account from this platform">Delete {{row.platform_name}}</button>
240 <h3>Add Accounts</h3>
241 <div id="middle" align="center">
243 <table class="mytable table table-bordered table-hover">
246 <th>Request Access</th>
248 {% for platform in platform_list %}
249 <tr class="border_bottom">
250 <td class="odd"> {{ platform.platform_no_access }} </td>
252 <button class="btn btn-default btn-xs" name= "add_{{platform.platform_no_access}}" type="submit" title="Add account to this platform">Add {{platform.platform_no_access}}</button>