Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab
authorLoic Baron <loic.baron@lip6.fr>
Wed, 3 Dec 2014 18:05:51 +0000 (19:05 +0100)
committerLoic Baron <loic.baron@lip6.fr>
Wed, 3 Dec 2014 18:05:51 +0000 (19:05 +0100)
22 files changed:
portal/templates/fed4fire/fed4fire_about.html
portal/templates/fed4fire/fed4fire_account-view.html
portal/templates/fed4fire/fed4fire_contact_support_email_subject.txt
portal/templates/fed4fire/fed4fire_email_activation.html [new file with mode: 0644]
portal/templates/fed4fire/fed4fire_email_default_recipients.txt [new file with mode: 0644]
portal/templates/fed4fire/fed4fire_email_default_sender.txt
portal/templates/fed4fire/fed4fire_footer.html
portal/templates/fed4fire/fed4fire_home-view.html
portal/templates/fed4fire/fed4fire_slice_request_denied.html [new file with mode: 0644]
portal/templates/fed4fire/fed4fire_slice_request_denied.txt [new file with mode: 0644]
portal/templates/fed4fire/fed4fire_slice_request_email.html
portal/templates/fed4fire/fed4fire_slice_request_email.txt [new file with mode: 0644]
portal/templates/fed4fire/fed4fire_slice_request_validated.html [new file with mode: 0644]
portal/templates/fed4fire/fed4fire_slice_request_validated.txt [new file with mode: 0644]
portal/templates/fed4fire/fed4fire_supportview.html
portal/templates/fed4fire/fed4fire_user_request_denied.html [new file with mode: 0644]
portal/templates/fed4fire/fed4fire_user_request_denied.txt [new file with mode: 0644]
portal/templates/fed4fire/fed4fire_user_request_email.html
portal/templates/fed4fire/fed4fire_user_request_email.txt [new file with mode: 0644]
portal/templates/fed4fire/fed4fire_user_request_validated.html [new file with mode: 0644]
portal/templates/fed4fire/fed4fire_user_request_validated.txt [new file with mode: 0644]
portal/usersview.py

index 91998cb..b0c3b6d 100644 (file)
     <div class="tab-pane active row" id="about">
                <div class="col-md-12">
                        <p>
-                               Fed4Fire Portal is a central place to get acess to all Fed4fire testbeds.In order to get access to the portal,
+                               Fed4FIRE Portal is a central place to get acess to all Fed4FIRE testbeds.In order to get access to the portal,
                                an experimenter needs to  <a href="/portal/register">register</a> to the portal. The portal administrative body
                                is responsible to accept or reject newly registered users.   
                        </p>
                        <p>
-                               To learn more about Fed4fire visit:  <a href="http://www.fed4fire.eu/" target="_blank">http://www.fed4fire.eu/</a>                      
+                               To learn more about Fed4FIRE visit:  <a href="http://www.fed4fire.eu/" target="_blank">http://www.fed4fire.eu/</a>                      
                        </p>
                        <p>
                                If you have any questions regarding using the portal visit our <a href="/portal/support/">FAQ</a>
                        </p>
                        <p>
-                               Fed4fire portal is a community effot. To get more information about Fed4fire portal team visit: 
+                               Fed4FIRE portal is a community effot. To get more information about Fed4FIRE portal team visit: 
                                <a href="http://myslice.info/community" target="_blank">http://myslice.info/community</a>
                        </p>
                </div>
@@ -80,8 +80,8 @@
                                        <p> Documentation: <a href="http://trac.myslice.info/" target="_blank">http://trac.myslice.info/</a></p>
                                        <p> Code: <a href="https://git.top-hat.info/?p=tophat.git;a=shortlog;h=refs/heads/devel" target="_blank">Git Repository</a> (read only)</p>     
 
-                               <h5>Fed4fire Registry</h5>
-                                       <p><a href="https://sfa-fed4fire.pl.sophia.inria.fr" target="_blank">Fed4fire registry</a> is a SFA registry. SFA Registry is a specific installation mode of the SFAWrapper.</p>
+                               <h5>Fed4FIRE Registry</h5>
+                                       <p><a href="https://sfa-fed4fire.pl.sophia.inria.fr" target="_blank">Fed4FIRE registry</a> is a SFA registry. SFA Registry is a specific installation mode of the SFAWrapper.</p>
                                        <p> More Info: <a href="http://svn.planet-lab.org/wiki/SfaDeveloperRegistryTutorial#RunninginRegistry-Onlymode" target="_blank">SFA Registry</a></p>
        </div>
    </div>
index 13da125..6163459 100644 (file)
                                        <tr class="even" id="sfi_config_row">
                                                <td class="key">sfi_config </td>
                                                <td class="value">use sfi_config file with sfi.py package (pip install sfa)<a href="#"></a>
-                                                       <button type="submit" name="dl_sfi_config" class="btn btn-default btn-xs" title="Download your privaye key" id="dl_sfi_config">
+                                                       <button type="submit" name="dl_sfi_config" class="btn btn-default btn-xs" title="Download your sfi_config" id="dl_sfi_config">
                                                                        <span class="glyphicon glyphicon-download"></span> Download
                                                                </button>
                                                </td>
                         </tr>
+                                               <tr class="odd">
+                                                       {%if 'N/A' not in user_private_key%}
+                                                       <td class="key">Identity</td> 
+                                               <td>
+                                                               <button type="submit" name="dl_identity" class="btn btn-default btn-xs" title="You will require it to use jfed" id="dl_identity">
+                                                               <span class="glyphicon glyphicon-download"></span> Download 
+                                                               </button>
+                                                       </td>
+                                                       {%else%}
+                                                       <td class="key">Identity</td> 
+                                                       <td>
+                                                       <button type="submit" name="dl_identity" class="btn btn-default btn-xs disabled" title="You will require it to use jfed" id="dl_identity">
+                                                               <span class="glyphicon glyphicon-download"></span> Download 
+                                                       </button>
+                                                       </td>
+                                                       {%endif%} 
+                                               </tr>
 
                                                <tr class="even">
                                                <td colspan="2">
                                                        </li>
                                                        <li>
                                                                This option does not provide as high of a level of security; however, your private key will still only be used in the portal and 
-                                                               will be available to you and the OneLab admins only.
+                                                               will be available to you and the Fed4FIRE admins only.
                                                        </li>
                                                </ul>
                                        <h3>Manual delegation of credentials</h3>
diff --git a/portal/templates/fed4fire/fed4fire_email_activation.html b/portal/templates/fed4fire/fed4fire_email_activation.html
new file mode 100644 (file)
index 0000000..ae7627a
--- /dev/null
@@ -0,0 +1,21 @@
+{% extends "layout.html" %}
+
+{% block content %}
+
+<div class="row">
+       <h1><img src="{{ STATIC_URL }}img/icon_user_small.png" alt="User Registration" />User sign-up</h1>
+</div>
+<div class="row">
+       {% if activation_status == 'success' %}
+               <h3>Signup request confirmed.</h3>
+               <p>You are currently able to log in to the portal using your email address and the password that you have provided; however, your access is still limited.</p> 
+               <p>You will have full access as soon as your account is validated by a manager at your organization. We have sent an email to your organisation's managers with a validation request.</p>
+       {%else%}
+               <h3>Signup confirmation failed.</h3>
+               <p>You have probably arrived at this page by clicking a confirmation link in an email that we have sent to you. 
+               We have been unable to match the link that you have clicked to a signup request in our database.</p>
+               <p>Please <a href="/portal/contact/">contact support</a> so that we may help you complete the signup process.</p>
+       {%endif%}
+ </div>
+
+{% endblock %}
diff --git a/portal/templates/fed4fire/fed4fire_email_default_recipients.txt b/portal/templates/fed4fire/fed4fire_email_default_recipients.txt
new file mode 100644 (file)
index 0000000..b2de7ee
--- /dev/null
@@ -0,0 +1 @@
+Fed4FIRE Support <contact@fed4fire.eu>
index 4cca20b..98a7982 100644 (file)
@@ -70,8 +70,8 @@
                                <p><strong>Your slices </strong>
                                        <span title="A slice is a set of testbed resources on which you can conduct an experiment. 
                                        Either ask your colleagues to give you access to an existing slice or request a new slice by clicking 'Request Slice'. 
-                                       However, on the OneLab portal, you will only see slices that you have created through OneLab. If you have created slices elsewhere, 
-                                       such as on the PlanetLab Europe portal, those slices will not appear here."
+                                       However, on the Fed4FIRE portal, you will only see slices that you have created through Fed4FIRE. If you have created slices elsewhere, 
+                                       those slices will not appear here."
                                        class="glyphicon glyphicon-info-sign">
                                </span>
 
                                <p><strong>Your slices </strong>
                                <span title="A slice is a set of testbed resources on which you can conduct an experiment. 
                                        Either ask your colleagues to give you access to an existing slice or request a new slice by clicking 'Request Slice'. 
-                                       However, on the OneLab portal, you will only see slices that you have created through OneLab. If you have created slices elsewhere, 
-                                       such as on the PlanetLab Europe portal, those slices will not appear here."
+                                       However, on the Fed4FIRE portal, you will only see slices that you have created through Fed4FIRE. If you have created slices elsewhere, 
+                                       those slices will not appear here."
                                        class="glyphicon glyphicon-info-sign">
                                </span>
                                </p>
diff --git a/portal/templates/fed4fire/fed4fire_slice_request_denied.html b/portal/templates/fed4fire/fed4fire_slice_request_denied.html
new file mode 100644 (file)
index 0000000..ca2b910
--- /dev/null
@@ -0,0 +1,17 @@
+<img src="http://www.fed4fire.eu/uploads/media/fed4fire-logo.jpg">
+<br>
+<p>Dear Fed4FIRE user,</p>
+<p></p>
+<p>You have recently requested the following slice on the Fed4FIRE portal({{portal_url}}):</p> 
+<br>
+<b>Slice name   :</b> {{slice_name}}<br>
+<b>URL          :</b> {{url}}<br>
+<b>Purpose      :</b> {{purpose}}<br>
+<br>c
+<p>We regret to inform you that, a manager of your institution has not confirmed your request. Please contact the manager of your institution for further information. 
+For any other queries, please contact us by replying to this email.</p>
+<br>
+<p>We wish you a fruitful user experience on Fed4FIRE.</p>
+<br>
+<p>Yours sincerely,</p>
+<p>The Fed4FIRE team</p>
diff --git a/portal/templates/fed4fire/fed4fire_slice_request_denied.txt b/portal/templates/fed4fire/fed4fire_slice_request_denied.txt
new file mode 100644 (file)
index 0000000..21897b4
--- /dev/null
@@ -0,0 +1,15 @@
+Dear Fed4FIRE user,
+
+You have recently requested the following slice on the Fed4FIRE portal({{portal_url}}):
+
+Slice name   : {{slice_name}}
+URL          : {{url}}
+Purpose      : {{purpose}}
+We regret to inform you that, a manager of your institution has not confirmed your request. Please contact the manager of your institution for further information. For any other queries, please contact us by replying to this email.
+
+We wish you a fruitful user experience on Fed4FIRE.
+
+Yours sincerely,
+The Fed4FIRE team
+
index 888e032..1a49a14 100644 (file)
@@ -2,10 +2,21 @@
 <br>
 <h1>NEW SLICE REQUEST</h1>
 <br>
-<b>slice name      :</b> {{slice_name}}</br>
-<b>number of nodes :</b> {{number_of_nodes}}</br>
-<b>type of nodes   :</b> {{type_of_nodes}}</br>
-<b>purpose         :</b> {{purpose}}</br>
-<b>email           :</b> {{email}}</br>
+<p>You are receiving this request because we have you listed as a manager at an organization that uses Fed4FIRE.</p>
+<p>A user from your organization has requested the creation of a new slice, which will allow him or her to reserve testbed resources to conduct an experiment.</p>
+<br>
+<b>Slice name      :</b> {{slice_name}}</br>
+<b>URL                            :</b> {{url}}</br>
+<b>Purpose         :</b> {{purpose}}</br>
+<b>Organization           :</b> {{organization}}</br>
+<b>Email           :</b> {{email}}</br>
 <b>Portal url     :</b> {{current_site}}</br> 
+<p></p>
+<p>You can see new slice request <a href="http://{{current_site}}/portal/validate">in the portal.</a><p>
+<p>Please be sure that you know the user who is requesting this slice, as you are responsible for his or her actions.</p>
+<p>And kindly ensure that the stated experiment purpose is clear, and, if there is a website that explains the website, that a URL is provided.</p>
+<p>Fed4FIRE and its affiliated testbeds exist purely to support useful and interesting work. To ensure the future of these environments, we need to know what work is actually being done.</p>
+<p></p>
+<p>If you believe that you have received this message in error, or if you have any questions, kindly contact contact@fed4fire.eu</p>
+
 
diff --git a/portal/templates/fed4fire/fed4fire_slice_request_email.txt b/portal/templates/fed4fire/fed4fire_slice_request_email.txt
new file mode 100644 (file)
index 0000000..5b7ccb0
--- /dev/null
@@ -0,0 +1,20 @@
+NEW SLICE REQUEST
+
+You are receiving this request because we have you listed as a manager at an organization that uses Fed4FIRE.
+A user from your organization has requested the creation of a new slice, which will allow him or her to reserve testbed resources to conduct an experiment.
+
+Slice name      : {{slice_name}}
+URL                    : {{url}}
+Purpose         : {{purpose}}
+Email           : {{email}}
+Organization   : {{organization}}
+Portal url             : {{current_site}}
+
+You can see new slice request in: http://{{current_site}}/portal/validate
+Please be sure that you know the user who is requesting this slice, as you are responsible for his or her actions.
+And kindly ensure that the stated experiment purpose is clear, and, if there is a website that explains the website, that a URL is provided. 
+Fed4FIRE and its affiliated testbeds exist purely to support useful and interesting work. To ensure the future of these environments, we need to know what work is actually being done. 
+
+If you believe that you have received this message in error, or if you have any questions, kindly contact contact@fed4fire.eu
+
diff --git a/portal/templates/fed4fire/fed4fire_slice_request_validated.html b/portal/templates/fed4fire/fed4fire_slice_request_validated.html
new file mode 100644 (file)
index 0000000..fbcbea8
--- /dev/null
@@ -0,0 +1,21 @@
+<img src="http://www.fed4fire.eu/uploads/media/fed4fire-logo.jpg">
+<br>
+<p>Dear Fed4FIRE user,</p>
+<p></p>
+<p>You have recently requested a slice in the Fed4FIRE portal.</p>
+<br>
+<b>Slice name   :</b> {{slice_name}}<br>
+<b>URL          :</b> {{url}}<br>
+<b>Purpose      :</b> {{purpose}}<br>
+<p></p>
+<p>
+       We are pleased to inform you that a manager from your institution has validated your slice request on the Fed4FIRE portal. 
+       You can now add resources to you slice and start experimenting.
+</p>
+<p></p>
+<p>We wish you a fruitful user experience with the Fed4FIRE portal.</p>
+<p></p>
+<p>Yours sincerely,</p>
+<p>The Fed4FIRE team</p>
+
+
diff --git a/portal/templates/fed4fire/fed4fire_slice_request_validated.txt b/portal/templates/fed4fire/fed4fire_slice_request_validated.txt
new file mode 100644 (file)
index 0000000..a89be97
--- /dev/null
@@ -0,0 +1,15 @@
+Dear Fed4FIRE user,
+
+You have recently requested a slice in the Fed4FIRE portal.
+
+Slice name      : {{slice_name}}
+URL             : {{url}}
+Purpose         : {{purpose}}
+
+
+We are pleased to inform you that a manager from your institution has validated your slice request on the Fed4FIRE portal. You can now add resources to you slice and start experimenting.
+
+We wish you a fruitful user experience with the Fed4FIRE portal.
+
+Yours sincerely,
+The Fed4FIRE team
index dffad05..9f50d2c 100644 (file)
@@ -11,7 +11,7 @@
                        <h3>Users</h3>
                        <ul>
                        <li><h4>Who is a user?</h4></li>
-                       <p>A user is an experimenter who registers to the OneLab portal and able to use all the facilites that the portal has to offer. However, a user does not
+                       <p>A user is an experimenter who registers to the Fed4FIRE portal and able to use all the facilites that the portal has to offer. However, a user does not
                        have the right to do any admin operation such as managing slices, users and resources.</p>
                        
                        
@@ -36,7 +36,7 @@
                        <p>Once you register, you can login to your account with limited access. It means that you can view your account details, modify your name and password. You can also view other pages. However, you will not be able to see any slices as well as resources before your account validation. But you can <a href="/portal/slice_request/">Request Slice</a> before being validated. Therefore, the PI will validate your account as well as your requested slice. Once validated, you will be able to see your slice and if you click on your slice, you will be able to see resources in that slice and you can reserve nodes and start your experiment.</p>
                        
                        <li><h4>How can I get access to a slice?</h4></li>
-                       <p>If you are a completely new user, you have to <a href="/portal/slice_request/">Request Slice</a>. It is upto the PI of your authority to accept/reject your slice request. </br>On the other hand, if you are a new user to the portal but you already have an account in OneLab SFA registry and you have access to slices, you will be able to see all your slices once your account is validated by the PI.</p> 
+                       <p>If you are a completely new user, you have to <a href="/portal/slice_request/">Request Slice</a>. It is upto the PI of your authority to accept/reject your slice request. </br>On the other hand, if you are a new user to the portal but you already have an account in Fed4FIRE SFA registry and you have access to slices, you will be able to see all your slices once your account is validated by the PI.</p> 
                        
                        <li><h4>I forgot my password, how to recover it?</h4></li>
                        <p>If you have an account in the portal but you forgot the password, you can always <a href="/portal/pass_reset/">Reset your password</a>.</p></ul>
diff --git a/portal/templates/fed4fire/fed4fire_user_request_denied.html b/portal/templates/fed4fire/fed4fire_user_request_denied.html
new file mode 100644 (file)
index 0000000..56f7f4f
--- /dev/null
@@ -0,0 +1,11 @@
+<img src="http://www.fed4fire.eu/uploads/media/fed4fire-logo.jpg">
+<br>
+<p>Dear {{first_name}} {{last_name}},</p>
+<p></p>
+<p>You have recently registered as a user to Fed4FIRE portal. We are sorry to inform you that, a manager of your institution has rejected your request. Please contact the manager of your institution for further information. For any other queries, contact us by replying to this email.</p>
+<p></p>
+<p>We  wish you all the best.</p>
+<p></p>
+<p>Yours sincerely,</p>
+<p>The Fed4FIRE team</p>
+
diff --git a/portal/templates/fed4fire/fed4fire_user_request_denied.txt b/portal/templates/fed4fire/fed4fire_user_request_denied.txt
new file mode 100644 (file)
index 0000000..b3afba5
--- /dev/null
@@ -0,0 +1,8 @@
+Dear {{first_name}} {{last_name}},
+
+You have recently registered as a user to Fed4FIRE portal. We are sorry to inform you that, a manager of your institution has rejected your request. Please contact the manager of your institution for further information. For any other queries, contact us by replying to this email.
+
+We wish you all the best.
+
+Yours sincerely,
+The Fed4FIRE team
index 5c6801f..60abd27 100644 (file)
@@ -4,8 +4,13 @@
 <br>
 <b>First name   :</b> {{first_name}}<br>
 <b>Last name    :</b> {{last_name}}<br>
+<b>Organization :</b> {{organization}}<br>
 <b>Authority hrn:</b> {{authority_hrn}}<br>
 <b>Public key   :</b> {{public_key}}<br>
 <b>Email        :</b> {{email}}<br>
 <b>User hrn     :</b> {{user_hrn}}<br>
 <b>Portal url  :</b> {{ current_site }}<br>
+<p></p>
+<p>You can validate the user <a href="http://{{current_site}}/portal/validate">here</a>.<p>
+<br>
+<p>Please note that the validation request will only become visible once the user has confirmed his/her email address.</p>
diff --git a/portal/templates/fed4fire/fed4fire_user_request_email.txt b/portal/templates/fed4fire/fed4fire_user_request_email.txt
new file mode 100644 (file)
index 0000000..17ce184
--- /dev/null
@@ -0,0 +1,14 @@
+NEW USER REQUEST
+
+First name   : {{first_name}}
+Last name    : {{last_name}} 
+Organization :{{organization}}
+Authority hrn: {{authority_hrn}}
+Public key   : {{public_key}}
+Email        : {{email}}
+User hrn     : {{user_hrn}}
+Portal url   : {{ current_site }}
+
+Please note that the validation request will only become visible once the user has confirmed his/her email address.
+
+
diff --git a/portal/templates/fed4fire/fed4fire_user_request_validated.html b/portal/templates/fed4fire/fed4fire_user_request_validated.html
new file mode 100644 (file)
index 0000000..9048a6c
--- /dev/null
@@ -0,0 +1,14 @@
+<img src="http://www.fed4fire.eu/uploads/media/fed4fire-logo.jpg">
+<br>
+<p>Dear {{first_name}} {{last_name}},</p>
+<p></p>
+<p>It is my pleasure to welcome you as a fully signed-up user of the Fed4FIRE portal. Fed4FIRE provides you with access to world class computer networking testbeds. Our aim at Fed4FIRE is to promote the use of these testbeds for research and development by industry, for scientific research, and for university level laboratory exercises.</p>
+<p></p>
+</p>
+Your entry point for access to the testbeds is the Fed4FIRE portal, which provides a web-based interface for browsing and reserving resources on the various testbeds. To run an experiment using those resources, you may log in to the testbed and/or individual nodes on the testbed with your Fed4FIRE public/private key pair, or you may use an experiment control tool such as as NEPI or OMF. The Fed4FIRE  operations team is standing by at contact@fed4fire.eu to provide you with help regarding the portal and to refer your testbed- and tool-specific queries to those best able to answer them.
+</p>
+<p></p>
+</p>We  wish you a fruitful user experience with the Fed4FIRE portal.</p>
+<p></p>
+<p>Yours sincerely,</p>
+<p>THE Fed4FIRE team</p>
diff --git a/portal/templates/fed4fire/fed4fire_user_request_validated.txt b/portal/templates/fed4fire/fed4fire_user_request_validated.txt
new file mode 100644 (file)
index 0000000..40a1b03
--- /dev/null
@@ -0,0 +1,10 @@
+Dear {{first_name}} {{last_name}},
+
+It is my pleasure to welcome you as a fully signed-up user of the Fed4FIRE portal. Fed4FIRE provides you with access to world class computer networking testbeds. Our aim at Fed4FIRE is to promote the use of these testbeds for research and development by industry, for scientific research, and for university level laboratory exercises.
+
+Your entry point for access to the testbeds is the Fed4FIRE portal, which provides a web-based interface for browsing and reserving resources on the various testbeds. To run an experiment using those resources, you may log in to the testbed and/or to individual nodes on the testbed with your Fed4FIRE public/private key pair, or you may use an experiment control tool such as as NEPI or OMF. TheFed4FIRE operations team is standing by at contact@fed4fire.eu to provide you with help regarding the portal and to refer your testbed- and tool-specific queries to those best able to answer them.
+
+We wish you a fruitful user experience with the Fed4FIRE portal.
+
+Yours sincerely,
+The Fed4FIRE team
index 5b4e2ee..1314175 100644 (file)
@@ -54,10 +54,10 @@ class UsersView (LoginRequiredAutoLogoutView, ThemeView):
 
             status_list.append(user_status)
             #get authority
-            #if user['config']:
-            user_config = json.loads(user['config'])
-            user_authority = user_config.get('authority','N/A')
-            authority_list.append(user_authority)
+            if user['config'] is not None:
+                user_config = json.loads(user['config'])
+                user_authority = user_config.get('authority','N/A')
+                authority_list.append(user_authority)
     
         user_list = [{'email': t[0], 'status': t[1], 'authority':t[2]}
             for t in zip(email_list, status_list, authority_list)]