From: Thierry Parmentelat Date: Sat, 28 Feb 2015 11:41:17 +0000 (+0100) Subject: Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab X-Git-Tag: myslice-1.3~74 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=9c374e6720cfd174ed38d25541bb66006f3e2ad2;hp=a5956fb695c33f48b64a41e2bc3227a8308d6d53;p=myslice.git Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab --- diff --git a/portal/joinview.py b/portal/joinview.py index 0282e962..2add3a4f 100644 --- a/portal/joinview.py +++ b/portal/joinview.py @@ -173,7 +173,7 @@ class JoinView (FreeAccessView, ThemeView): 'user_hrn' : user_hrn, 'pi' : [reg_auth], 'auth_type' : 'managed', - 'validation_link': 'http://' + current_site + '/portal/email_activation/'+ email_hash + 'validation_link': current_site + '/portal/email_activation/'+ email_hash } diff --git a/portal/projectrequestview.py b/portal/projectrequestview.py index aaa79b2f..8a484282 100644 --- a/portal/projectrequestview.py +++ b/portal/projectrequestview.py @@ -109,7 +109,7 @@ class ProjectRequestView(LoginRequiredAutoLogoutView, ThemeView): errors.append('Organization is mandatory') if (post['purpose'] is None or post['purpose'] == ''): - errors.append('Experiment purpose is mandatory') + errors.append('Project purpose is mandatory') if (re.search(r'^[A-Za-z0-9_]*$', post['project_name']) == None): errors.append('Project name may contain only letters, numbers, and underscore.') @@ -128,14 +128,14 @@ class ProjectRequestView(LoginRequiredAutoLogoutView, ThemeView): hrn = post['authority_hrn'] + '.' + post['project_name'] sfa_add_authority(wsgi_request, {'authority_hrn':hrn}) authority_add_pis(wsgi_request, hrn, user_hrn) - self.template_name = 'slice-request-done-view.html' + self.template_name = 'project-request-done-view.html' else: # Otherwise a wsgi_request is sent to the PI if 'join' in wsgi_request.POST: create_pending_join(wsgi_request, post) else: create_pending_project(wsgi_request, post) - self.template_name = 'slice-request-ack-view.html' + self.template_name = 'project-request-ack-view.html' # retrieves the pending projects creation list pending_projects = PendingProject.objects.all().filter(user_hrn=user_hrn) diff --git a/portal/registrationview.py b/portal/registrationview.py index 47ae6c9b..d1c12ca5 100644 --- a/portal/registrationview.py +++ b/portal/registrationview.py @@ -81,7 +81,7 @@ class RegistrationView (FreeAccessView, ThemeView): 'current_site' : current_site, 'email_hash' : email_hash, 'pi' : '', - 'validation_link': 'http://' + current_site + '/portal/email_activation/'+ email_hash + 'validation_link': current_site + '/portal/email_activation/'+ email_hash } print "############ BREAKPOINT 4 #################" diff --git a/portal/slicetabexperiment.py b/portal/slicetabexperiment.py index f198e158..9260f27a 100644 --- a/portal/slicetabexperiment.py +++ b/portal/slicetabexperiment.py @@ -17,6 +17,8 @@ from myslice.configengine import ConfigEngine from myslice.theme import ThemeView from myslice.configengine import ConfigEngine +from sfa.planetlab.plxrn import hash_loginbase + import urllib2,json class ExperimentView (FreeAccessView, ThemeView): @@ -26,12 +28,14 @@ class ExperimentView (FreeAccessView, ThemeView): username = self.request.user - split_slicename = slicename.split('.') - ple_slicename = split_slicename[0] + '8' + split_slicename[1] + '_' + split_slicename[2] - - query_current_resources = Query.get('slice').select('resource').filter_by('slice_hrn','==',slicename) + query_current_resources = Query.get('slice').select('resource','parent_authority').filter_by('slice_hrn','==',slicename) current_resources = execute_query(request, query_current_resources) + parent_authority = current_resources[0]['parent_authority'] + + split_slicename = slicename.split('.') + ple_slicename = hash_loginbase(parent_authority) + '_' + split_slicename[-1] + ple_resource_list=[] nitos_resource_list=[] nitos_paris_resource_list=[] diff --git a/portal/templates/onelab/onelab_account-view.html b/portal/templates/onelab/onelab_account-view.html index 86071f1a..985974fb 100644 --- a/portal/templates/onelab/onelab_account-view.html +++ b/portal/templates/onelab/onelab_account-view.html @@ -9,10 +9,10 @@ Account  >  {{ person.email }} - {%if 'no_creds' in user_cred %} + {%if 'no_creds' in user_cred %}

NO CREDENTIALS are delegated to the portal!

{%endif%} - {%if 'creds_expired' in user_cred %} + {%if 'creds_expired' in user_cred %}

EXPIRED CREDENTIALS Please delegate again your credentials to the portal!

{%endif%} @@ -24,6 +24,10 @@ {% endfor %} {% endif %} + +
+ +
+
@@ -300,7 +320,7 @@ {{ row.account_type }} {{ row.account_reference }} - @@ -319,7 +339,7 @@ {{ platform.platform_no_access }} - @@ -329,16 +349,20 @@
{%endif%}
-
+ +{% endblock %} +