{% extends "layout-unfold1.html" %}
{% block head %}
-<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/account_view_html.css" />
-<script type="text/javascript" src="{{STATIC_URL}}/jquery.validate.js"></script>
-<script type="text/javascript" src="{{STATIC_URL}}/my_account.edit_profile.js"></script>
-<script type="text/javascript" src="{{STATIC_URL}}/my_account.register.js"></script>
+<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/onelab.css"/>
+<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/account_view.css" />
+<script type="text/javascript" src="{{STATIC_URL}}/js/jquery.validate.js"></script>
+<script type="text/javascript" src="{{STATIC_URL}}/js/my_account.edit_profile.js"></script>
+<script type="text/javascript" src="{{STATIC_URL}}/js/my_account.register.js"></script>
{% endblock %}
-{% block unfold1_main %}
+{% block unfold_main %}
+<h2>User Details</h2>
-<h2>Platform Access</h2>
-<div id="middle" align="center">
- <div class="well">
- <table class="mytable">
- <tr class="odd">
- <th>Platform</th>
- <th>Account Type</th>
- <th>user_hrn</th>
- <th>Pub Key</th>
- </tr>
- {% for row in data %}
- <tr class="even">
- <td class="odd"> {{ row.platform_name }} </td>
- <td class="even"> {{ row.account_type }} </td>
- <td class="odd"> {{ row.usr_hrn }} </td>
- <td class="even"> {{ row.usr_pubkey }} </td>
- </tr>
- {%endfor%}
- </table>
- </div>
-</div>
+{% if messages %}
+<ul class="messages">
+ {% for message in messages %}
+ <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
+ {% endfor %}
+</ul>
+{% endif %}
-<h2>MySlice Account</h2>
+<form id="editForm" method="POST" action="account_process" enctype="multipart/form-data">
<div id="middle" align="center">
<div class="well">
- <form id="editForm" method="POST" action="account_process" enctype="multipart/form-data">
{% csrf_token %}
<table class="profile">
<tr class="odd">
<td colspan="2">
- <div id="info">Personal Details</div>
+ <div id="info">Platform: Myslice</div>
</td>
</tr>
<tr class="even">
<td class="key">Email</td>
<td class="value">
<span id="emailval" class="value" >{{ person.email }}</span>
- <img class="logo" src="{{STATIC_URL}}/img/ques_icon.png" onclick="emailAlert()" title="To change your email please contact the administrator" style="height: 20px; width: 20px; position: absolute; left: 625px; left: 900px; margin-top: -9px;">
+ <img class="logo" src="{{STATIC_URL}}/img/ques_icon.png" onclick="emailAlert()" title="To change your email please contact the administrator"
+ style="height: 20px; width: 20px; position: absolute; left: 625px; left: 900px; margin-top: -9px;">
</td>
</tr>
<tr class="odd">
<td class="value">
<span id="affval" class="value">{{ authority }}</span>
<img class="logo" src="{{STATIC_URL}}/img/ques_icon.png" onclick="affAlert()" title="To change your affiliation please contact the administrator"
- style="height: 20px; width: 20px; position: absolute; left: 625px; left: 900px; ">
+ style="height: 20px; width: 20px; position: absolute; left: 625px; left: 900px; ">
</td>
</tr>
<tr class="even">
<td class="key">Generate Keys</td>
<td>
- <button id="generate_keypair" name="generate" type="submit" onclick="myFunction()" 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 </button>
+ <button id="generate_keypair" name="generate" type="submit" onclick="myFunction()"
+ 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
+ </button>
</td>
</tr>
<tr class="odd">
<button id="upload_file" type="button" title="Upload a public key"> Upload </button>
</td>
</tr>
- <tr class="even" id="pkey_row" display="none">
- <td class="key">Private Key </td>
+ <tr class="even" id="pkey_row">
+ {%if 'N/A' not in user_private_key%}
+ <td class="key">Private Key </td> <!-- Hide if priv_key doesn't exist in myslice platform -->
<td class="value">********<a href="#">
<button type="submit" name="dl_pkey" class="download" title="Download your privaye key" id="dl_pkey"> Download </button>
<button id="delete" name="delete" type="submit" title="Delete your private key">Delete </button>
</td>
+ {%endif%}
</tr>
<tr class="odd">
<td colspan="2">
- <p class="warning" id="pkey_del_msg"> For better security we recommend that you download and delete your private key from the server.
- Always store your private key in a secure location.
+ <p class="message" id="pkey_del_msg"><b> Tradeoff:</b> Ease-of-use vs Security.<br>
+ <b>Ease-of-use:</b> Automatic account delegation. Don't delete private key.<br>
+ <b>Security:</b> Manual account delegation. Download & Delete private key.
</p>
</td>
</tr>
</table>
- </form>
</div>
</div>
+<h2>Account Information</h2>
+<h3>Principal Account</h3>
+<div id="middle" align="center">
+ <div class="well">
+ <table class="mytable">
+ <tr class="odd">
+ <th>Platform</th>
+ <th>Account Type</th>
+ <th>Account_delegation</th>
+ <th>user_hrn</th>
+ <!--<th>Pub Key</th> -->
+ </tr>
+ {% for row in data %}
+ <tr class="border_bottom">
+ <td class="odd"> {{ row.platform_name }} </td>
+ <td class="even"> {{ row.account_type }} </td>
+ <td class="odd"> {{ row.delegation_type }} </td>
+ <td class="odd"> {{ row.usr_hrn }} </td>
+ <!-- <td class="even"> {{ row.usr_pubkey }} </td> -->
+ </tr>
+ {%endfor%}
+ </table>
+ </div>
+</div>
+
+
+<h3>Credentials</h3>
+<div id="middle" align="center">
+ <div class="well">
+ <table class="mytable">
+ <caption><b>Delegated User Credential</b></caption>
+ <tr class="odd">
+ <th>Expiration Date</th>
+ </tr>
+ {% for row in data %}
+ <tr class="border_bottom">
+ <td class="even"> {{ row.credential_expiration }} </td>
+ </tr>
+ {%endfor%}
+ </table>
+ <p><button id="dl_user_cred" name= "dl_user_cred" type="submit" title="Download User Credential">Download</button></p>
+ <table class="mytable">
+ <caption><b>Delegated Slice Credentials</b></caption>
+ <tr class="odd">
+ <th>Slice Name</th>
+ <th>Expiration Date</th>
+ </tr>
+ {% for row in my_slices %}
+ <tr class="border_bottom">
+ <td class="even"> {{ row.slice_name }} </td>
+ <td class="odd"> {{ row.cred_exp }} </td>
+ </tr>
+ {%endfor%}
+ </table>
+ <p><button id="dl_slice_cred" name= "dl_slice_cred" type="submit" title="Download Slice Credentials">Download</button></p>
+ <table class="mytable">
+ <caption><b>Delegated Authority Credentials</b></caption>
+ <tr class="odd">
+ <th>Authority Name</th>
+ <th>Expiration Date</th>
+ </tr>
+ {% for row in my_auths %}
+ <tr class="border_bottom">
+ <td class="even"> {{ row.auth_name }} </td>
+ <td class="odd"> {{ row.cred_exp }} </td>
+ </tr>
+ {%endfor%}
+ </table>
+ <p><button id="dl_auth_cred" name= "dl_auth_cred" type="submit" title="Download Authority Credentials">Download</button></p>
+ <p></p>
+ <p><button id="clear_cred" name= "clear_cred" type="submit" title="Clear All Credentials">Clear Credentials</button></p>
+ </div>
+</div>
+
+
+
+
+<h3>Testbed Accounts</h3>
+<div id="middle" align="center">
+ <div class="well">
+ <table class="mytable">
+ <tr class="odd">
+ <th>Platform</th>
+ <th>Account Type</th>
+ <th>Reference to</th>
+ </tr>
+ {% for row in ref_acc %}
+ <tr class="border_bottom">
+ <td class="odd"> {{ row.platform_name }} </td>
+ <td class="even"> {{ row.account_type }} </td>
+ <td class="odd"> {{ row.account_reference }} </td>
+ </tr>
+ {%endfor%}
+ </table>
+ </div>
+</div>
+
+<h3>Add Accounts</h3>
+<div id="middle" align="center">
+ <div class="well">
+ <table class="mytable">
+ <tr class="odd">
+ <th>Platforms</th>
+ <th>Request Access</th>
+ </tr>
+ {% for platform in platform_list %}
+ <tr class="border_bottom">
+ <td class="odd"> {{ platform.platform_no_access }} </td>
+ <td class="even">
+ <button id="request_access" name= {{platform.platform_no_access}} type="submit" title="Add account to this platform">Add {{platform.platform_no_access}}</button>
+ </td>
+ </tr>
+ {%endfor%}
+ </table>
+ </div>
+</div>
+
+</form>
+
{% endblock %}