Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into fibre
authorLoic & Edelberto <loic.baron@lip6.fr>
Wed, 23 Apr 2014 14:03:49 +0000 (11:03 -0300)
committerLoic & Edelberto <loic.baron@lip6.fr>
Wed, 23 Apr 2014 14:03:49 +0000 (11:03 -0300)
Conflicts:
auth/manifoldbackend.py
myslice/settings.py
portal/templates/contact.html
portal/templates/documentationview.html
portal/templates/registration_view.html
setup.py

27 files changed:
auth/manifoldbackend.py
myslice/settings.py [changed mode: 0644->0755]
myslice/urls.py
portal/actions.py
portal/homeview.py
portal/registrationview.py
portal/sliceuserview.py [deleted file]
portal/static/img/testbeds/fuseco.fokus.fraunhofer.de.png [new file with mode: 0644]
portal/static/img/testbeds/iminds-wall2.cm.png [new file with mode: 0644]
portal/static/img/testbeds/netmode.png [new file with mode: 0644]
portal/static/img/testbeds/wilab2.ilabt.iminds.be.png [new file with mode: 0644]
portal/templates/contact.html
portal/templates/documentationview.html
portal/templates/experimentview.html [deleted file]
portal/templates/fed4fire/fed4fire__widget-topmenu.html [deleted file]
portal/templates/fed4fire/fed4fire_home-view.html [deleted file]
portal/templates/fibre/fibre_contact.html [new file with mode: 0644]
portal/templates/fibre/fibre_documentationview.html [new file with mode: 0644]
portal/templates/fibre/fibre_registration_view.html [new file with mode: 0644]
portal/templates/onelab/onelab__widget-topmenu.html [deleted file]
portal/templates/onelab/onelab_home-view.html [deleted file]
portal/templates/onelab/onelab_slice-resource-view.html [deleted file]
portal/templates/registration_view.html
portal/theme.py [deleted file]
setup.py
ui/static/img/favicon.ico [deleted file]
ui/templates/base.html [deleted file]

index 69cbf21..0522653 100644 (file)
@@ -209,10 +209,7 @@ class ManifoldBackend:
             except User.DoesNotExist:
                 # Create a user in Django's local database
                 user = User.objects.create_user(username, usernamep, 'passworddoesntmatter')
-                user.first_name = "DUMMY_FIRST_NAME" #person['first_name']
-                user.last_name = "DUMMY LAST NAME" # person['last_name']
                 user.email = person['email']
-            return user
         else:
             if checkldap:
                 try:
@@ -221,11 +218,14 @@ class ManifoldBackend:
                 except User.DoesNotExist:
                     # Create a user in Django's local database
                     user = User.objects.create_user(username, usernameldap, 'passworddoesntmatter')
-                    user.first_name = "DUMMY_FIRST_NAME" #person['first_name']
-                    user.last_name = "DUMMY LAST NAME" # person['last_name']
                     user.email = person['email']
-                return user
 
+        if 'firstname' in person:
+            user.first_name = person['firstname']
+        if 'lastname' in person:
+            user.last_name = person['lastname']
+
+        return user
     # Required for your backend to work properly - unchanged in most scenarios
     def get_user(self, user_id):
         try:
old mode 100644 (file)
new mode 100755 (executable)
index cf9cbb6..d4240f4
@@ -2,6 +2,13 @@
 
 import os.path
 
+### detect if we're in a build environment
+try:
+    import manifold
+    building=False
+except:
+    building=True
+
 DEBUG = True
 TEMPLATE_DEBUG = DEBUG
 
@@ -19,6 +26,18 @@ except:
     import traceback
     traceback.print_exc()
 
+#### this is where the problem lies I believe
+# first try to run manage.py collectstatic without this
+# themes
+theme=None
+try:
+    from myslice.configengine import ConfigEngine
+    configEngine = ConfigEngine()
+    if configEngine.myslice.theme :
+        theme = configEngine.myslice.theme
+except:
+    pass
+    
 # find out HTTPROOT, which is different from ROOT 
 # when deployed from a package
 # this code is run by collectstatic too, so we cannot
@@ -29,7 +48,6 @@ DATAROOT="/var/www/myslice"
 # if not there, then we assume it's from a devel tree
 if not os.path.isdir (os.path.join(HTTPROOT,"static")):
     HTTPROOT=ROOT
-    DATAROOT=ROOT
 
 if not os.path.isdir(ROOT): raise Exception,"Cannot find ROOT %s for unfold"%ROOT
 if not os.path.isdir(HTTPROOT): raise Exception,"Cannot find HTTPROOT %s for unfold"%HTTPROOT
@@ -183,15 +201,16 @@ ROOT_URLCONF = 'myslice.urls'
 WSGI_APPLICATION = 'unfold.wsgi.application'
 #WSGI_APPLICATION = 'myslice.wsgi.application'
 
-TEMPLATE_DIRS = (
-    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
-    # Always use forward slashes, even on Windows.
-    # Don't forget to use absolute paths, not relative paths.
-    #os.path.join(HTTPROOT,"templates"),
-    os.path.join(HTTPROOT,"templates"),
-)
+TEMPLATE_DIRS = [ ]
+# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
+# Always use forward slashes, even on Windows.
+# Don't forget to use absolute paths, not relative paths.
+if theme is not None:
+    TEMPLATE_DIRS.append ( os.path.join(HTTPROOT,"portal/templates", theme))
+TEMPLATE_DIRS.append     ( os.path.join(HTTPROOT,"portal/templates"))
+TEMPLATE_DIRS.append     (  os.path.join(HTTPROOT,"templates"))
 
-INSTALLED_APPS = [
+INSTALLED_APPS = [ 
     'django.contrib.auth',
     'django.contrib.contenttypes',
     'django.contrib.sessions',
@@ -204,7 +223,9 @@ INSTALLED_APPS = [
     # our django project
     'myslice',
     # the core of the UI
-    'auth', 'manifoldapi', 'unfold',
+    'auth', 
+    'manifoldapi',
+    'unfold',
     # plugins
     'plugins',
     # views - more or less stable 
@@ -216,8 +237,10 @@ INSTALLED_APPS = [
     # Uncomment the next line to enable admin documentation:
     # 'django.contrib.admindocs',
     'portal',
-    'rest',
 ]
+# this app won't load in a build environment
+if not building: INSTALLED_APPS.append ('rest')
+
 for aux in auxiliaries:
     if os.path.isdir(os.path.join(ROOT,aux)): 
         print "Using devel auxiliary",aux
index 570916c..3c72971 100644 (file)
@@ -15,6 +15,7 @@ from settings import auxiliaries, INSTALLED_APPS
 import portal.platformsview
 import portal.dashboardview
 import portal.homeview
+import portal.newsview
 
 import plugins.cafe.edelberto
 
@@ -22,15 +23,14 @@ home_view=portal.homeview.HomeView.as_view()
 dashboard_view=portal.dashboardview.DashboardView.as_view()
 platforms_view=portal.platformsview.PlatformsView.as_view()
 
-import portal.testbedlist
+#import portal.testbedlist
 import portal.sliceview
 import portal.sliceresourceview
 
 import portal.slicetabexperiment
 import portal.slicetabinfo
 import portal.slicetabtestbeds
-
-from portal.sliceuserview import SliceUserView 
+import portal.slicetabusers 
 
 #### high level choices
 # main entry point (set to the / URL)
@@ -82,14 +82,13 @@ urls = [
     #
     #
     # Portal
-    
+    (r'^news/?$', portal.newsview.NewsView.as_view()),
     (r'^resources/(?P<slicename>[^/]+)/?$', portal.sliceresourceview.SliceResourceView.as_view()),
+    (r'^users/(?P<slicename>[^/]+)/?$', portal.slicetabusers.SliceUserView.as_view()),
     
     (r'^slice/(?P<slicename>[^/]+)/?$', portal.sliceview.SliceView.as_view()),
-    
     (r'^info/(?P<slicename>[^/]+)/?$', portal.slicetabinfo.SliceInfoView.as_view()),
     (r'^testbeds/(?P<slicename>[^/]+)/?$', portal.slicetabtestbeds.SliceTabTestbeds.as_view()),
-    (r'^users/(?P<slicename>[^/]+)/?$', SliceUserView.as_view()),
     (r'^experiment/(?P<slicename>[^/]+)/?$', portal.slicetabexperiment.ExperimentView.as_view()),
     url(r'^portal/', include('portal.urls')),
 ]
index d43e965..17265c6 100644 (file)
@@ -8,7 +8,7 @@ from django.contrib.auth.models import User
 from django.template.loader     import render_to_string
 from django.core.mail           import EmailMultiAlternatives
 
-from theme                      import ThemeView
+from myslice.theme                      import ThemeView
 
 theme = ThemeView()
 
@@ -23,6 +23,7 @@ theme = ThemeView()
 def authority_get_pis(request, authority_hrn):
     query = Query.get('authority').filter_by('authority_hrn', '==', authority_hrn).select('pi_users')
     results = execute_admin_query(request, query)
+    print "authority_get_pis = %s" % results
     # NOTE: temporarily commented. Because results is giving empty list. 
     # Needs more debugging
     #if not results:
@@ -33,6 +34,8 @@ def authority_get_pis(request, authority_hrn):
 
 def authority_get_pi_emails(request, authority_hrn):
     pi_users = authority_get_pis(request,authority_hrn)
+    print "pi_users = %s" % pi_users
+
     if any(d['pi_users'] == None for d in pi_users):
         theme.template_name = 'email_default_recipients.txt' 
         default_email = render_to_string(theme.template, request)
@@ -279,7 +282,7 @@ def portal_validate_request(wsgi_request, request_ids):
             try:
                 create_user(wsgi_request, request)
                 request_status['SFA user'] = {'status': True }
-
+                PendingUser.objects.get(id=request['id']).delete()
             except Exception, e:
                  request_status['SFA user'] = {'status': False, 'description': str(e)}
                        
@@ -303,6 +306,7 @@ def portal_validate_request(wsgi_request, request_ids):
             try:
                 create_slice(wsgi_request, request)
                 request_status['SFA slice'] = {'status': True }
+                PendingSlice.objects.get(id=request['id']).delete()
 
             except Exception, e:
                 request_status['SFA slice'] = {'status': False, 'description': str(e)}
@@ -325,6 +329,7 @@ def portal_validate_request(wsgi_request, request_ids):
                 print "ADD Authority"
                 sfa_add_authority(wsgi_request, sfa_authority_params)
                 request_status['SFA authority'] = {'status': True }
+                PendingAuthority.objects.get(id=request['id']).delete()
 
             except Exception, e:
                 request_status['SFA authority'] = {'status': False, 'description': str(e)}
@@ -402,7 +407,7 @@ def create_pending_slice(wsgi_request, request, email):
     try:
         # Send an email: the recipients are the PI of the authority
         recipients = authority_get_pi_emails(wsgi_request, request['authority_hrn'])
-    
+
         theme.template_name = 'slice_request_email.txt' 
         text_content = render_to_string(theme.template, request)
     
@@ -414,8 +419,7 @@ def create_pending_slice(wsgi_request, request, email):
         subject = subject.replace('\n', '')
     
         sender = email
-        msg = EmailMultiAlternatives(subject, text_content, sender, [recipients])
-        print msg
+        msg = EmailMultiAlternatives(subject, text_content, sender, recipients)
         msg.attach_alternative(html_content, "text/html")
         msg.send()
     except Exception, e:
@@ -745,8 +749,10 @@ def create_pending_user(wsgi_request, request, user_detail):
         sender =  render_to_string(theme.template, request)
         sender = sender.replace('\n', '')
     
-        msg = EmailMultiAlternatives(subject, text_content, sender, [recipients])
+        msg = EmailMultiAlternatives(subject, text_content, sender, recipients)
         msg.attach_alternative(html_content, "text/html")
         msg.send()
     except Exception, e:
         print "Failed to send email, please check the mail templates and the SMTP configuration of your server"
+        import traceback
+        traceback.print_exc()
index bdaa6b9..2667b63 100644 (file)
@@ -12,7 +12,7 @@ from manifoldapi.manifoldresult import ManifoldResult
 from ui.topmenu import topmenu_items, the_user
 from myslice.configengine import ConfigEngine
 
-from theme import ThemeView
+from myslice.theme import ThemeView
 
 class HomeView (FreeAccessView, ThemeView):
     template_name = 'home-view.html'
@@ -26,6 +26,8 @@ class HomeView (FreeAccessView, ThemeView):
     def post (self,request):
         env = self.default_env()
         env['theme'] = self.theme
+        env['section'] = "Dashboard"
+        
         username = request.POST.get('username')
         password = request.POST.get('password')
        
@@ -85,7 +87,7 @@ class HomeView (FreeAccessView, ThemeView):
             env['person'] = None
     
         env['theme'] = self.theme
-    
+        env['section'] = "Dashboard"
 
         env['username']=the_user(request)
         env['topmenu_items'] = topmenu_items(None, request)
index d7efa79..4f8ab90 100644 (file)
@@ -6,6 +6,7 @@ from django.views.generic       import View
 from django.template.loader     import render_to_string
 from django.shortcuts           import render
 from django.contrib.auth        import get_user_model
+from django.contrib.sites.models import Site
 
 from unfold.page                import Page
 from unfold.loginrequired       import FreeAccessView
@@ -19,7 +20,7 @@ from portal.models              import PendingUser
 # Edelberto - LDAP
 from portal.actions             import create_pending_user, ldap_create_user
 
-from theme import ThemeView
+from myslice.theme import ThemeView
 
 # since we inherit from FreeAccessView we cannot redefine 'dispatch'
 # so let's override 'get' and 'post' instead
@@ -51,6 +52,10 @@ class RegistrationView (FreeAccessView, ThemeView):
 
         if method == 'POST':
             # The form has been submitted
+            
+            # get the domain url
+            current_site = Site.objects.get_current()
+            current_site = current_site.domain
 
             user_request = {
                 'first_name'    : wsgi_request.POST.get('firstname',     ''),
@@ -58,6 +63,7 @@ class RegistrationView (FreeAccessView, ThemeView):
                 'authority_hrn' : wsgi_request.POST.get('authority_hrn', ''),
                 'email'         : wsgi_request.POST.get('email',         '').lower(),
                 'password'      : wsgi_request.POST.get('password',      ''),
+                'current_site'  : current_site
             }
 
             # Construct user_hrn from email (XXX Should use common code)
@@ -84,8 +90,11 @@ class RegistrationView (FreeAccessView, ThemeView):
                 if user_detail['email'] == user_request['email']:
                     errors.append('Email already registered in Manifold. Please provide a new email address.')
             # Does the user exist in sfa? [query is very slow!!]
-            user_query  = Query().get('user').select('user_hrn','user_email')
+            #user_query  = Query().get('user').select('user_hrn','user_email')
+            # XXX Test based on the user_hrn is quick
+            user_query  = Query().get('user').select('user_hrn','user_email').filter_by('user_hrn','==',user_request['user_hrn'])
             user_details_sfa = execute_admin_query(wsgi_request, user_query)
+
             for user in user_details_sfa:
                 if user['user_email'] == user_request['email']:
                     errors.append('Email already registered in SFA registry. Please use another email.')
diff --git a/portal/sliceuserview.py b/portal/sliceuserview.py
deleted file mode 100644 (file)
index 44c29f0..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-from django.template                 import RequestContext
-from django.shortcuts                import render_to_response
-
-from manifold.core.query             import Query, AnalyzedQuery
-from manifoldapi.manifoldapi         import execute_query
-
-from django.views.generic.base      import TemplateView
-
-from unfold.loginrequired           import LoginRequiredView
-from django.http import HttpResponse
-from django.shortcuts import render
-
-from unfold.page                     import Page
-from manifold.core.query             import Query, AnalyzedQuery
-from manifoldapi.manifoldapi         import execute_query
-
-from theme import ThemeView
-
-class SliceUserView (LoginRequiredView, ThemeView):
-    template_name = "slice-user-view.html"
-    
-    def get(self, request, slicename):
-        if request.user.is_authenticated():
-            user_query  = Query().get('user').select('user_hrn','parent_authority').filter_by('user_hrn','==','$user_hrn')
-            user_details = execute_query(self.request, user_query)
-    
-        return render_to_response(self.template, {"slice": slicename, "user_details":user_details[0], "theme": self.theme, "username": request.user, "section":"users"}, context_instance=RequestContext(request))
diff --git a/portal/static/img/testbeds/fuseco.fokus.fraunhofer.de.png b/portal/static/img/testbeds/fuseco.fokus.fraunhofer.de.png
new file mode 100644 (file)
index 0000000..5ca08e0
Binary files /dev/null and b/portal/static/img/testbeds/fuseco.fokus.fraunhofer.de.png differ
diff --git a/portal/static/img/testbeds/iminds-wall2.cm.png b/portal/static/img/testbeds/iminds-wall2.cm.png
new file mode 100644 (file)
index 0000000..4ce8035
Binary files /dev/null and b/portal/static/img/testbeds/iminds-wall2.cm.png differ
diff --git a/portal/static/img/testbeds/netmode.png b/portal/static/img/testbeds/netmode.png
new file mode 100644 (file)
index 0000000..8918573
Binary files /dev/null and b/portal/static/img/testbeds/netmode.png differ
diff --git a/portal/static/img/testbeds/wilab2.ilabt.iminds.be.png b/portal/static/img/testbeds/wilab2.ilabt.iminds.be.png
new file mode 100644 (file)
index 0000000..4ce8035
Binary files /dev/null and b/portal/static/img/testbeds/wilab2.ilabt.iminds.be.png differ
index c7bcdd8..722c29d 100644 (file)
@@ -6,30 +6,37 @@
 
 {% block content %}
 <div class="row">
-       <h1><img src="{{ STATIC_URL }}img/icon_support_small.png" alt="Open a Ticket" /> FIBRE Support</h1>
+       <div class="col-md-12">
+       <h1><img src="{{ STATIC_URL }}icons/support-xs.png" alt="Open a Ticket" /> Support</h1>
+       </div>
 </div>
 <div class="row">
-       <p>Please check our <a href="/portal/support/documentation">FAQ</a> section. Most of the basic problems are explained there.</p>
+       <div class="col-md-12">&nbsp;</div>
+</div>
+<div class="row">
+       <div class="col-md-12">
+       <p>Please check our <a href="/portal/support/">FAQ</a> section. Most of the basic problems are explained there.</p>
        <p>
        If you haven't find your answes in the FAQ, please contact us by filling the form below.<br />
        You can also <a href="mailto:support@myslice.info">e-mail</a> us directly.
        </p>
+       </div>
 </div>
 
 <div class="row">
-  <form class="cmxform form-horizontal" id="commentForm" action="#" method="post" role="form">{% csrf_token %}
-  <fieldset>
-    {% for field in form %}
-    <div class="form-group">
-      <label for="{{ field.html_name }}" class="col-xs-3 control-label">{{ field.label }}</label>
-      <div class="col-xs-6"> {{ field.errors }} {{ field }} <p class="form-hint">{{ field.help_text }}</p> </div>
-    </div>
-    {% endfor %}
-    <div class="col-xs-5">
-    </div>
-    <button class="submit btn btn-default col-xs-2" type="submit">Create Ticket</button>
-  </fieldset>
-  </form>
+       <div class="col-md-2"></div>
+       <div class="col-md-8">
+               <form role="form" method="post">
+               {% csrf_token %}
+               {% for field in form %}
+           <div class="form-group">
+               <label for="{{ field.html_name }}" class="control-label">{{ field.label }}</label>
+               {{ field.errors }} {{ field }}
+           </div>
+           {% endfor %}
+               <button type="submit" class="btn btn-default">Create Ticket</button>
+               </form>
+       </div>
 </div>
 {% endblock %}
 
index 44a9755..e10770e 100644 (file)
@@ -2,52 +2,14 @@
 
 {% block content %}
 <div class="row">
-       <h1><img src="{{ STATIC_URL }}img/icon_support_small.png" alt="Open a Ticket" /> FIBRE Portal Documentation</h1>
+       <div class="col-md-12">
+       <h1><img src="{{ STATIC_URL }}icons/support-xs.png" alt="OneLab Portal Documentation" /> OneLab Portal Documentation</h1>
+       </div>
 </div>
 <div class="row">
-<h2>Portal Components</h2>
-<h3>Myslice (Web Frontend)</h3>
-<p>
-       MySlice is an ambitious project aiming to support researchers throughout the 
-       lifecycle of experiments that can run on a variety of testbeds spanning different 
-       administrative domains and networking technologies. Its basic principle is to bring 
-       together available <b>resources</b> with <b>useful information</b> (characteristics, performance, network measurements).
-       </p>
+       <div class="col-md-12">
 
-<p> More Info: <a href="http://myslice.info/" target="_blank">http://myslice.info/</a></p>
-<p> Code: <a href="http://git.onelab.eu/?p=myslice.git;a=summary" target="_blank">Git Repository</a> (read only)</p> 
-
-<h3>Manifold (Portal backend)</h3>
-Manifold is the backend that is running behind the portal.
-
-<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>    
-
-<h3>OneLab Registry</h3>
-<p>It's a SFA registry. SFA Registry is a specific installation mode of the SFAWrapper (Registry Only mode).</p>
-<p> More Info: <a href="http://svn.planet-lab.org/wiki/SfaDeveloperRegistryTutorial#RunninginRegistry-Onlymode" target="_blank">SFA Registry</a></p>
-<h2>FAQ<h2>
-<h3>Users</h3>
-<h5>Who is a User?</h5>
-<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
-have the right to do any admin operation such as managing slices, users and resources.</p>
-<h5>How do I register?</h5>
-<h5>Why can't I register with my email?</h5>
-<h5>Who is responsible for validating my account?</h5>
-<h5>How long I have to wait for validation?</h5>
-<h5>I just registered. Why can't I see any slices and resources?</h5>
-<h5>How can I get access to a slice?</h5>
-<h5>I forgot my password, how to recover it?</h5>
-
-<h3>Managers</h3>
-<h5>Who is a Manager?</h5>
-<p>A manager is the Principal Investigator (PI) of the institution. Each PI has authority over his own institution. A PI can add, delete, validate users or 
-slices that belongs to his institution.</p>
-<h5>What is pending users/slices?</h5>
-<h5>How to see the pending users/slices of my instituion?</h5>
-<h5>How to validate/reject pending users/slices?</h5>
-<h5>Can I see the pending users/slices of other institutions?</h5>
-<h5>How can I manage the users that belong to my institution?</h5>
+</div>
 </div>
 {% endblock %}
 
diff --git a/portal/templates/experimentview.html b/portal/templates/experimentview.html
deleted file mode 100644 (file)
index 9056eb4..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<h2>Secure Shell (SSH)</h2>
-<p>
-Secure Shell (SSH) is a cryptographic network protocol for secure data communication, remote command-line login, remote command execution, and other secure network services between two networked computers that connects, via a secure channel over an insecure network, a server and a client (running SSH server and SSH client programs, respectively). The protocol specification distinguishes between two major versions that are referred to as SSH-1 and SSH-2.
-</p>
-<p> More Info: <a href="http://en.wikipedia.org/wiki/Secure_Shell" target="_blank">http://en.wikipedia.org/wiki/Secure_Shell</a></p>
-
-
-<h2>NEPI</h2>
-<p>NEPI, the Network Experimentation Programming Interface, is a life-cycle management tool for network experiments. The idea behind NEPI is to provide a single tool to design, deploy, and control network experiments, and gather the experiment results. Going further, NEPI was specially conceived to function with arbitrary experimentation platforms, so researchers could use a single tool to work with network simulators, emulators, or physical testbeds, or even a mixture of them. To accomplish this, NEPI provides a high-level interface to describe experiments that is independent from any experimentation platform, but is able to capture platform specific configurations. Experiment definitions can be stored in XML format to be later reproduced, and modified according to experimentation needs. Experiment execution is orchestrated by a global experiment controller, that is platform independent, and different platform-dependent testbed controllers, creating a control hierarchy that is able t adapt to platform specific requirements while providing an integrated control scheme.</p>
-<p> More Info: <a href="http://nepi.inria.fr" target="_blank">http://nepi.inria.fr</a></p>
-
-<h2>OMF</h2>
-<p>OMF is a Testbed Control, Measurement and Management Framework.</p>
-<p>
-OMF was originally developed for the ORBIT wireless testbed at Winlab, Rutgers University. Since 2007, OMF has been actively extended to operate on testbeds with many different type of network and resource technologies. It is now deployed and used on different testbeds in Australia, Europe, and in the U.S. OMF is currently being extended further to support exciting new features and technologies. This website is hosting this ongoing activity. OMF development is now conducted essentially within the TEMPO project at NICTA (Australia) in strong collaboration with Winlab (Rutgers University).
-</p>
-
-<p>In addition to the main OMF software, this site also hosts OMF sub-projects addressing various related aspects of a testbed's control, measurement, and management.</p>
-
-
-<p>More Info: <a href="http://mytestbed.net/projects/omf" target="_blank">http://mytestbed.net/projects/omf</a></p>
\ No newline at end of file
diff --git a/portal/templates/fed4fire/fed4fire__widget-topmenu.html b/portal/templates/fed4fire/fed4fire__widget-topmenu.html
deleted file mode 100644 (file)
index 4b2ae0e..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-{% insert_str prelude "js/bootstrap.js" %}
-{% insert_str prelude "css/bootstrap.css" %}
-{% insert_str prelude "css/topmenu.css" %}
-{% insert_str prelude "js/logout.js" %}
-<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
-  <div class="navbar-header">
-    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-myslice-collapse">
-      <span class="sr-only">Toggle navigation</span>
-      <span class="icon-bar"></span>
-      <span class="icon-bar"></span>
-      <span class="icon-bar"></span>
-    </button>
-    <a class="navbar-brand" href="/"><img src="{{ STATIC_URL }}img/f4f-logo.png" height="30" alt="Fed4Fire logo" /></a>
-     <a href="/" alt="Home" class="logoTxt">Fed4Fire Portal</a>
-  </div>
-  <div class="collapse navbar-collapse navbar-myslice-collapse topmenu">
-    <ul class="nav navbar-nav">
-       {% for d in topmenu_items %} 
-       {% if d.dropdown %}
-       {% if d.is_active %} <li class='active'> {% else %} <li class='other'> {% endif %}
-         <a class="dropdown-toggle" data-toggle="dropdown" href="{{ d.href }}">{{ d.label }}<b class="caret"></b></a>
-         <ul class="dropdown-menu">
-           {% for dd in d.contents %}
-           <li class='{% if dd.is_active %}active{% else %}other{% endif %}{% if dd.disabled %} disabled{%endif%}'
-           {% if dd.domid %} id='{{dd.domid}}'{% endif %}>
-           <a href="{{ dd.href }}"> {{ dd.label }} </a> </li>
-           {% endfor %}
-         </ul>
-        </li>
-        {% else %} 
-       <li class='{% if d.is_active %}active{% else %}other{% endif %}{% if d.disabled %} disabled{%endif%}'
-       {% if d.domid %} id='{{d.domid}}'{% endif %}>
-       <a href="{{ d.href }}"> {{ d.label }} </a> </li>
-    {% endif %}
-    {% endfor %}
-</div>
-
-
diff --git a/portal/templates/fed4fire/fed4fire_home-view.html b/portal/templates/fed4fire/fed4fire_home-view.html
deleted file mode 100644 (file)
index bc018a4..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-{# fine for either layout-unfold1.html (logged in) or layout-unfold2.html (needs a login prompt) #}
-{% extends layout_1_or_2 %}
-{% block unfold_margin %}
-{% include 'fed4fire/_widget-login.html' %}
-{% endblock unfold_margin %}
-
-{% block unfold_main %}
-<div class='well-lg f4f-title'>
-  <h2 style="font-weight: bold;">Welcome to Fed4Fire portal !</h2>
-  <h4>New to Fed4fire? Please <a href="/portal/register">register</a> or learn more about <a href="http://fed4fire.eu/" target="_blank">the project</a>.</h3>
-</div>
-<div class='well'>
-<p>
-A federation of experimentation facilities will significantly accelerate Future Internet research. Fed4FIRE will deliver open and easily accessible facilities to the FIRE experimentation communities, which focus on fixed and wireless infrastructures, services and applications, and combinations thereof. 
-</p>
-<p>This UI server is connected to the manifold backend running at <code>{{ MANIFOLD_URL }}</code>.</p>
-</div>
-{% endblock unfold_main %}
diff --git a/portal/templates/fibre/fibre_contact.html b/portal/templates/fibre/fibre_contact.html
new file mode 100644 (file)
index 0000000..a610c87
--- /dev/null
@@ -0,0 +1,42 @@
+{% extends "layout.html" %}
+
+{% block head %}
+{{ wizard.form.media }}
+{% endblock %}
+
+{% block content %}
+<div class="row">
+       <div class="col-md-12">
+       <h1><img src="{{ STATIC_URL }}img/icon_support_small.png" alt="Open a Ticket" /> FIBRE Support</h1>
+       </div>
+</div>
+<div class="row">
+       <div class="col-md-12">&nbsp;</div>
+</div>
+<div class="row">
+       <div class="col-md-12">
+       <p>Please check our <a href="/portal/support/">FAQ</a> section. Most of the basic problems are explained there.</p>
+       <p>
+       If you haven't find your answes in the FAQ, please contact us by filling the form below.<br />
+       You can also <a href="mailto:support@myslice.info">e-mail</a> us directly.
+       </p>
+       </div>
+</div>
+
+<div class="row">
+       <div class="col-md-2"></div>
+       <div class="col-md-8">
+               <form role="form" method="post">
+               {% csrf_token %}
+               {% for field in form %}
+           <div class="form-group">
+               <label for="{{ field.html_name }}" class="control-label">{{ field.label }}</label>
+               {{ field.errors }} {{ field }}
+           </div>
+           {% endfor %}
+               <button type="submit" class="btn btn-default">Create Ticket</button>
+               </form>
+       </div>
+</div>
+{% endblock %}
+
diff --git a/portal/templates/fibre/fibre_documentationview.html b/portal/templates/fibre/fibre_documentationview.html
new file mode 100644 (file)
index 0000000..3a22020
--- /dev/null
@@ -0,0 +1,15 @@
+{% extends "layout.html" %}
+
+{% block content %}
+<div class="row">
+       <div class="col-md-12">
+       <h1><img src="{{ STATIC_URL }}img/icon_support_small.png" alt="Open a Ticket" /> FIBRE Portal Documentation</h1>
+       </div>
+</div>
+<div class="row">
+       <div class="col-md-12">
+
+</div>
+</div>
+{% endblock %}
+
diff --git a/portal/templates/fibre/fibre_registration_view.html b/portal/templates/fibre/fibre_registration_view.html
new file mode 100644 (file)
index 0000000..eb59dfe
--- /dev/null
@@ -0,0 +1,120 @@
+{% extends "layout.html" %}
+
+{% block content %}        
+
+<div class="row">
+       <div class="col-md-12">
+       <h1><img src="{{ STATIC_URL }}img/icon_user_small.png" alt="User Registration" /> FIBRE Experimenter Registration</h1>
+       </div>
+</div>
+<div class="row">
+       <div class="col-md-12">
+               <h3>For First Line Support please <a href="/portal/contact" >Contact Support</a></h3>
+       </div>
+</div>
+{% if errors %}
+<ul>
+  {% for error in errors %}
+  <li>{{ error }}</li>
+  {% endfor %}
+</ul>
+{% endif %}
+   
+<div class="row">
+       <div class="col-md-2"></div>
+       <div class="col-md-8">
+       <form class="cmxform form-horizontal" id="registrationForm" method="post" enctype="multipart/form-data" role="form">
+    {% csrf_token %}
+    <div class="form-group">
+       <label for="firstname" class="control-label">First Name</label>
+               <input type="text" name="firstname" class="form-control" minlength="2" value="{{ firstname }}" placeholder="First Name" required />
+    </div>
+    <div class="form-group">
+       <label for="lastname" class="control-label">Last Name</label>
+               <input type="text" name="lastname" size="25" class="form-control" minlength="2" value="{{ lastname }}" placeholder="Last Name" required />
+    </div>
+    <div class="form-group">
+      <label for="authority_hrn" class="control-label">Authority</label>
+      <input id="authority_hrn" name="authority_hrn" class="form-control" value="{{ authority_hrn }}" required>
+      <p class="help-block">An authority responsible for vetting your account</p>
+    </div>
+
+       <!-- LOGIN
+       TODO: Login should be suggested from user email or first/last name, and
+       checked for existence. In addition, the full HRN should be shown to the
+       user.
+    <div class="form-group">
+      <label for="login" class="col-xs-2 control-label">Login</label>
+      <div class="col-xs-4">
+         <input type="text" name="login" size="25" class="form-control" minlength="2" value="{{ login }}" placeholder="Login" required />
+      </div>
+      <div class="col-xs-6"><p class="form-hint">Enter your login</p></div>
+    </div>
+       -->
+
+    <div class="form-group">
+       <label for="email" class="control-label">Email</label>
+       <input type="email" name="email" size="25"  class="form-control" value="{{ email }}" required/>
+    </div>
+    <div class="form-group">
+      <label for="password" class="control-label">Password</label>
+      <input type="password"  id="password" name="password"   class="form-control" minlength="4" value="{{ password }}" required/>
+    </div>
+    <div class="form-group">
+       <label for="password" class="control-label">Confirm Password</label>
+               <input type="password"  id="confirmpassword" name="confirmpassword"   minlength="4" class="form-control" value="" placeholder="Confirm Password" required/>
+    </div>
+    <div class="form-group">
+       <label for="question" class="control-label">My Keys</label>
+               <select name="question" class="form-control" id="key-policy" required>        
+                       <option value="generate">Generate key pairs for me </option>
+                       <option value="upload">Upload my public key </option>
+               </select>
+       <p class="help-block">Genkey: Account Delegation Automatic (Recommended)</p>
+    </div>
+    <div class="form-group" style="display:none;" id="upload_key">
+       <label for="file" class="control-label">Upload public key</label>
+       <input type="file" name="user_public_key" class="form-control" id="user_public_key" required>
+       <br />
+               <div class="alert alert-danger" id="pkey_del_msg">
+                       Once your account is validated, you will have to delegate your credentials manually using SFA [Advanced users only]
+               </div>
+       <p class="help-block">Account Delegation: Manual (Advanced Users)</p>
+    </div>
+    <div class="form-group" id="register">
+      <button class="submit btn btn-default" type="submit">Register</button>
+    </div>
+  </form>  
+</div>
+<script>
+jQuery(document).ready(function(){
+    var availableTags = [
+    {% if authorities %}
+        {% for authority in authorities %}
+            {% if authority.name %}
+                {value:"{{ authority.authority_hrn }}",label:"{{authority.name}}"},
+            {% else %}
+                {value:"{{ authority.authority_hrn }}",label:"{{authority.authority_hrn}}"},
+            {% endif %}
+        {% endfor %}    
+    {% else %}
+        {value:"",label:"No authority found !!!"}
+    {% endif %}
+    ];
+    jQuery( "#authority_hrn" ).autocomplete({
+      source: availableTags,
+      minLength: 0,
+      change: function (event, ui) {
+          if(!ui.item){
+              //http://api.jqueryui.com/autocomplete/#event-change -
+              // The item selected from the menu, if any. Otherwise the property is null
+              //so clear the item for force selection
+              jQuery("#authority_hrn").val("");
+          }
+      }
+      //select: function( event, ui ) {console.log(jQuery(this))}
+    });
+});
+</script>
+{% endblock %}
+
diff --git a/portal/templates/onelab/onelab__widget-topmenu.html b/portal/templates/onelab/onelab__widget-topmenu.html
deleted file mode 100644 (file)
index da834ac..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-
-<div id="header">
-       <div class="wrapper">
-               <div class="logo">
-                       <a href="/"><img src="{{ STATIC_URL }}img/onelab-portal.png" alt="OneLab - Future Internet Testbeds" /></a>
-               </div>
-               
-               <div id="secondary">
-                       <ul>
-                               <li>News</li>
-                               <li><a href="/portal/about">About</a></li>
-                               <li><a target="_blank" href="http://www.onelab.eu">Public Website</a></li>
-                               <li><a target="_blank" href="http://intranet.onelab.eu">Intranet</a></li>
-                       </ul>
-               </div>
-       </div>
-       
-       {% if username %}
-       <div id="navigation">
-               <div class="wrapper">
-               <ul>
-                       <li id="nav-account"><a href="/portal/account/">{{ username }}</a></li>
-                       <li>|</li>
-                       <li id="nav-institution" class=""><a href="/portal/institution">INSTITUTION</a></li>
-                       <li class="slices">
-                               <a class="dropdown-toggle" data-toggle="dropdown" href="#">
-                                       SLICES <span class="caret"></span>
-                       </a>
-                               
-                               <div class="dropdown-menu">
-                                               <ul>
-                                                       <li><a href="/portal/slice_request/">Request Slice</a></li>
-                                                       <li><a href="/slice/ple.upmc.agent3/">ple.upmc.agent3</a></li>
-                                                   <li><a href="/slice/ple.upmc.agent/">ple.upmc.agent</a></li>
-                                                   <li><a href="/slice/ple.upmc.myslicedemo/">ple.upmc.myslicedemo</a></li>
-                                                   <li><a href="/slice/ple.upmc.slicestat/">ple.upmc.slicestat</a></li>
-                                                   <li><a href="/slice/ple.upmc.agent2/">ple.upmc.agent2</a></li>
-                                               </ul>
-                               </div>
-                               </li>
-                       <li id="nav-request"><a href="/portal/validate">REQUESTS</a></li>
-                       <li id="nav-support"><a href="/portal/support/">SUPPORT</a></li>
-                       <li>|</li>
-                       <li id="nav-logout" style="margin-top: 10px;"><a id="logout" style="cursor:pointer;" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> LOGOUT</a></li>
-               </ul>
-               </div>
-       </div>
-       {% else %}
-       <div id="navigation">
-               <div class="wrapper"></div>
-       </div>
-       {% endif %}
-</div>
-<script>
-       $(document).ready(function() {
-               $('li.slices').mouseenter(function() {
-                       $('div#menu-slice-list').fadeIn(100);
-               });
-               $('div#menu-slice-list').mouseleave(function(e) {
-                       if (!$('li.slices').is(":hover")) {
-                               $(this).fadeOut(100);
-                       }
-               });
-               // var slices = localStorage.getItem('slices');
-               // if (slices.length == 0) {
-                       // $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
-                       // var items = [];
-                               // localStorage.setItem('slices', data[0].slice);
-                       // });
-               // }
-               // $.each(slices, function( key, val ) {
-                       // items.push( "<li><a href=\"/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
-               // });
-               // $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
-       });
-</script>
diff --git a/portal/templates/onelab/onelab_home-view.html b/portal/templates/onelab/onelab_home-view.html
deleted file mode 100644 (file)
index f3090b2..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-{% extends "layout.html" %}
-
-{% block content %}
-<div class="row" id="home-dashboard">
-       <ul class="nav nav-tabs">
-         <li class="active"><a class="home-tab" data-panel="user" href="#">USER</a></li>
-         <li><a class="home-tab" data-panel="manager" href="#">MANAGER</a></li>
-       </ul>
-       <div class="home-panel" id="user">
-               <table>
-                       <tr>
-                               <td>ACCOUNT</td>
-                               <td>SLICES</td>
-                               <td>SUPPORT</td>
-                       </tr>
-                       <tr>
-                               <td><a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a></td>
-                               <td><a href="#"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a></td>
-                               <td><a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a></td>
-                       </tr>
-                       <tr>
-                               {% if person %}
-                               <td class="logged-in">
-                                       <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
-                                       <div>
-                                       {% if person.last_name %}
-                                               {{person.first_name}} {{person.last_name}}<br />
-                                       {% endif %}
-                                       <span class="label">Email:</span> <a href='/portal/account/'>{{person.email}}</a>
-                               </div>
-                               {% else %}
-                               <td>
-                                       {% include 'onelab__widget-login-user.html' %}
-                               {% endif %}
-                               </td>
-                               <td>
-                               {% if person %}
-                                       <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request Slice</button>
-                                       <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
-                               {% else %}
-                               {% endif %}
-                               </td>
-                               <td class="support">
-                                       <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create Ticket</button>
-                                       <div>
-                                               <a href="/portal/contact">Contact</a> <br />
-                                               <a href="/portal/support/documentation">Documentation</a>
-                                       </div>
-                               </td>
-                       </tr>
-               </table>
-       </div>
-       <div class="home-panel" id="manager">
-               <table>
-                       <tr>
-                               <td>INSTITUTION</td>
-                               <td>SLICES</td>
-                               <td>REQUESTS</td>
-                       </tr>
-                       <tr>
-                               <td><a href="/portal/institution"><img src="{{ STATIC_URL }}img/icon_authority_color.png" alt="" /></a></td>
-                               <td><a href="/portal/institution#slices"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a></td>
-                               <td><a href="/portal/validate"><img src="{{ STATIC_URL }}img/icon_testbed_color.png" alt="" /></a></td>
-                       </tr>
-                       <tr>
-                               {% if person %}
-                               <td class="logged-in">
-                                       <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
-                               {% else %}
-                               <td>
-                                       {% include 'onelab__widget-login-manager.html' %}
-                               {% endif %}
-                               </td>
-                               <td>
-                                       {% if person %}
-                                   <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create Slice</button>
-                                       {% endif %}
-                               </td>
-                               <td class="support">
-                                       {% if person %}
-                                   <button id="validaterequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> Validate Requests</button>
-                                       {% endif %}
-                               </td>
-                       </tr>
-               </table>
-       </div>
-</div>
-<script>
-       $(document).ready(function() {
-               $('a.home-tab').click(function() {
-                       $('ul.nav-tabs li').removeClass('active');
-                       $(this).parent().addClass('active');
-                       $('div.home-panel').hide();
-                       $('div#'+$(this).data('panel')).show();
-               });
-               $('button#validaterequestbtn').click(function() {
-                       window.location="/portal/validate/";
-               });
-               $('button#ticketbtn').click(function() {
-                       window.location="/portal/contact/";
-               });
-               $('button#slicerequestbtn').click(function() {
-                       window.location="/portal/slice_request/";
-               });
-               
-               {% if person %}
-        $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
-                 var items = [];
-                 $.each( data[0].slices, function(i, val) {
-                       items.push( "<li><a href=\"/slice/"+val+"\">" + val + "</a></li>" );
-                 });
-                 
-                 $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
-                 
-               });
-               {% endif %}
-       });
-</script>
-{% endblock %}
diff --git a/portal/templates/onelab/onelab_slice-resource-view.html b/portal/templates/onelab/onelab_slice-resource-view.html
deleted file mode 100644 (file)
index 80c3fcc..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-{% extends "layout_wide.html" %}
-
-{% block head %}
-<!-- <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyC1RUj824JAiHRVqgc2CSIg4CpKHhh84Lw&sensor=false"></script> -->
-<script src="{{ STATIC_URL }}js/onelab_slice-resource-view.js"></script>
-<script>
-       //myslice.slice = "{{ slice }}";
-</script>
-{% endblock %}
-
-{% block content %}
-       <div class="col-md-2">
-               <div id="select-platform" class="list-group">
-               </div>
-                       
-               <!-- <ul class="list-group">
-                 <li class="list-group-item">Filter: CPU</li>
-                 <li class="list-group-item">Filter: Interface</li>
-                 <li class="list-group-item">...</li>
-                 <li class="list-group-item">...</li>
-                 <li class="list-group-item">...</li>
-               </ul> -->
-       
-       </div>
-       <div class="col-md-10" style="height:100%;">
-               <div class="row">
-                       {% include theme|add:"_widget-slice-sections.html" %}
-               </div>
-               <!-- <div class="row slice-pending">
-                       <ul class="nav nav-pills">
-                               <li><a href="">Unreserved</a></li>
-                               <li><a href="">Reserved</a></li>
-                               <li><a href="">Pending<span class="badge" id="badge-pending" style="display:none;"></span></a></li>
-                               <li>
-                                       <button type="button" class="btn btn-primary apply" id="ApplyPendind">Apply</button>
-                                       <button type="button" class="btn btn-default clear">Clear</button>
-                               </li>
-                               <li>
-                                       <div id="loading" style="display:none;"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading" /></div>
-                               </li>
-                       </ul>
-               </div> -->
-               <div class="row">
-                       {% if msg %}
-                       <div class="col-md-12"><p class="alert-success">{{ msg }}</p></div>
-                       {% endif %}
-               </div>
-               <div class="row">
-                       <ul class="nav nav-pills nav-resources">
-                         <li class="active"><a data-panel="resources" href="#">Resources</a></li>
-                         <li id="GoogleMap"><a data-panel="map" href="#">Map</a></li>
-                         <li><a data-panel="pending" href="#">Pending</a></li>
-                         <li><a href="#"></a></li>
-                       </ul>
-               </div>
-               <div class="row" style="height:100%;">
-                       <div id="resources" class="panel">
-                {{list_resources}}
-                               <!-- <table cellpadding="0" cellspacing="0" border="0" class="table" id="objectList"></table> -->
-                       </div>
-                       <div id="map" class="panel" style="height:370px;display:none;">
-                {{map_resources}}
-                       </div>
-                       <div id="pending" class="panel" style="height:370px;display:none;">
-                {{pending_resources}}
-                       </div>
-               </div>
-       </div>
-{% endblock %}
index 7b8b2cf..5929f16 100644 (file)
@@ -3,12 +3,15 @@
 {% block content %}        
 
 <div class="row">
-       <h1><img src="{{ STATIC_URL }}img/icon_user_small.png" alt="User Registration" /> FIBRE Experimenter Registration</h1>
+       <div class="col-md-12">
+       <h1><img src="{{ STATIC_URL }}icons/user-xs.png" alt="User Registration" />Experimenter registration</h1>
+       </div>
 </div>
 <div class="row">
-
-  <h4>For First Line Support please <a href="/portal/contact" >Contact Support</a></h3>
-
+       <div class="col-md-12">
+               <h3>For First Line Support please <a href="/portal/contact" >Contact Support</a></h3>
+       </div>
+</div>
 {% if errors %}
 <ul>
   {% for error in errors %}
 </ul>
 {% endif %}
    
- <form class="cmxform form-horizontal" id="registrationForm" method="post" action="" enctype="multipart/form-data" role="form">
-    <fieldset>
+<div class="row">
+       <div class="col-md-2"></div>
+       <div class="col-md-8">
+       <form class="cmxform form-horizontal" id="registrationForm" method="post" enctype="multipart/form-data" role="form">
     {% csrf_token %}
     <div class="form-group">
-      <label for="firstname" class="col-xs-2 control-label">First Name</label>
-      <div class="col-xs-4">
-       <input type="text" name="firstname" class="form-control" minlength="2" value="{{ firstname }}" placeholder="First Name" required />
-      </div>
-      <div class="col-xs-6"> <p class="form-hint">Enter your first name</p> </div>
+       <label for="firstname" class="control-label">First Name</label>
+               <input type="text" name="firstname" class="form-control" minlength="2" value="{{ firstname }}" placeholder="First Name" required />
     </div>
     <div class="form-group">
-      <label for="lastname" class="col-xs-2 control-label">Last Name</label>
-      <div class="col-xs-4">
-       <input type="text" name="lastname" size="25" class="form-control" minlength="2" value="{{ lastname }}" placeholder="Last Name" required />
-      </div>
-      <div class="col-xs-6"><p class="form-hint">Enter your last name</p></div>
+       <label for="lastname" class="control-label">Last Name</label>
+               <input type="text" name="lastname" size="25" class="form-control" minlength="2" value="{{ lastname }}" placeholder="Last Name" required />
     </div>
     <div class="form-group">
-      <label for="authority_hrn" class="col-xs-2 control-label">Authority</label>
-      <div class="col-xs-4">
-        <div class="ui-widget">
-            <input id="authority_hrn" name="authority_hrn" class="form-control" value="{{ authority_hrn }}" required>
-        </div>
-     </div>
-      <div class="col-xs-6"><p class="form-hint">An authority responsible for vetting your account</p></div>
+      <label for="authority_hrn" class="control-label">Authority</label>
+      <input id="authority_hrn" name="authority_hrn" class="form-control" value="{{ authority_hrn }}" required>
+      <p class="help-block">An authority responsible for vetting your account</p>
     </div>
 
        <!-- LOGIN
        -->
 
     <div class="form-group">
-      <label for="email" class="col-xs-2 control-label">Email</label>
-      <div class="col-xs-4">
-       <input type="email" name="email" size="25"  class="form-control" value="{{ email }}" required/> 
-      </div>
-      <div class="col-xs-6"><p class="form-hint">Enter a valid email address</p></div>
+       <label for="email" class="control-label">Email</label>
+       <input type="email" name="email" size="25"  class="form-control" value="{{ email }}" required/>
     </div>
     <div class="form-group">
-      <label for="password" class="col-xs-2 control-label">Password</label>
-      <div class="col-xs-4">
-       <input type="password"  id="password" name="password"   class="form-control" minlength="4" value="{{ password }}" required/> 
-      </div>
-      <div class="col-xs-6"><p class="form-hint">Enter password</p></div>
+      <label for="password" class="control-label">Password</label>
+      <input type="password"  id="password" name="password"   class="form-control" minlength="4" value="{{ password }}" required/>
     </div>
     <div class="form-group">
-      <label for="password" class="col-xs-2 control-label">Confirm Password</label>
-      <div class="col-xs-4">
-       <input type="password"  id="confirmpassword" name="confirmpassword"   minlength="4" class="form-control" 
-              value="" placeholder="Confirm Password" required/>
-      </div>
-      <div class="col-xs-6"><p class="form-hint">Retype the password</p></div>
+       <label for="password" class="control-label">Confirm Password</label>
+               <input type="password"  id="confirmpassword" name="confirmpassword"   minlength="4" class="form-control" value="" placeholder="Confirm Password" required/>
     </div>
     <div class="form-group">
-      <label for="question" class="col-xs-2 control-label">My Keys</label>
-      <div class="col-xs-4">
-       <select name="question" class="form-control" id="key-policy" required>        
-         <option value="generate">Generate key pairs for me </option>
-         <option value="upload">Upload my public key </option>
-       </select>
-      </div>
-      <div class="col-xs-6"><p class="form-hint">Genkey: Account Delegation Automatic (Recommended)</p> </div>
+       <label for="question" class="control-label">My Keys</label>
+               <select name="question" class="form-control" id="key-policy" required>        
+                       <option value="generate">Generate key pairs for me </option>
+                       <option value="upload">Upload my public key </option>
+               </select>
+       <p class="help-block">Genkey: Account Delegation Automatic (Recommended)</p>
     </div>
     <div class="form-group" style="display:none;" id="upload_key">
-      <label for="file" class="col-xs-2 control-label">Upload public key</label>
-      <div class="col-xs-4">
-       <input type="file" name="user_public_key" class="form-control" id="user_public_key" required/>
-       <p class="warning" id="pkey_del_msg">Once your account is validated, you will have to delegate your credentials manually using SFA [Advanced users only]</p>
-      </div>
-      <div class="col-xs-6"><p class="form-hint">Account Delegation: Manual (Advanced Users)</p></div>
+       <label for="file" class="control-label">Upload public key</label>
+       <input type="file" name="user_public_key" class="form-control" id="user_public_key" required>
+       <br />
+               <div class="alert alert-danger" id="pkey_del_msg">
+                       Once your account is validated, you will have to delegate your credentials manually using SFA [Advanced users only]
+               </div>
+       <p class="help-block">Account Delegation: Manual (Advanced Users)</p>
     </div>
     <div class="form-group" id="register">
-      <button class="submit btn btn-default col-xs-12" type="submit">Register</button>
+      <button class="submit btn btn-default" type="submit">Register</button>
     </div>
-  </fieldset>
   </form>  
 </div>
 <script>
diff --git a/portal/theme.py b/portal/theme.py
deleted file mode 100644 (file)
index 0187ac1..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-import os
-from myslice.configengine import ConfigEngine
-from myslice.settings import TEMPLATE_DIRS
-
-class ThemeView (object):
-    
-    @property
-    def theme(self):
-        self.config = ConfigEngine()
-        print self.config
-        if self.config.myslice.theme :
-            return self.config.myslice.theme
-    
-    @property
-    def template(self):
-        # Load a template from the theme directory if it exists
-        # else load it from the common templates dir
-        print "THEME 00 = ",self.theme
-        print "TEMPLATE = ",self.template_name
-        print "TEMPLATE_DIRS = ",TEMPLATE_DIRS
-        filename = self.theme + '_' + self.template_name
-        print any(os.path.exists(os.path.join(d,filename)) for d in TEMPLATE_DIRS)
-        print (os.path.exists(os.path.join(d,filename)) for d in TEMPLATE_DIRS)
-        if any(os.path.exists(os.path.join(d,filename)) for d in TEMPLATE_DIRS):
-            return filename
-        else:
-            return self.template_name
index c5890d5..4f47f7b 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -17,13 +17,23 @@ print packages
 # Avoid troubles : clean /usr/share/unfold/
 #shutil.rmtree('/usr/share/unfold/')
 
+def images (dir):
+    return glob( dir+"/*.png") + glob ( dir+"/*.gif")
+def javascript (dir):
+    return glob( dir+"/*.js")
+def stylesheets (dir):
+    return glob( dir+"/*.css")
+
 setup(packages = packages,
       # xxx somehow this does not seem to show up in debian packaging
       scripts = [ 'apache/unfold-init-ssl.sh' ],
       data_files = [ 
-          ( '/usr/share/unfold/static/js', glob ('static/js/*')),
-          ( '/usr/share/unfold/static/css', glob ('static/css/*')),
-          ( '/usr/share/unfold/static/img', glob ('static/img/*')),
+          ( '/usr/share/unfold/static/js', javascript('static/js')),
+          ( '/usr/share/unfold/static/css', stylesheets ('static/css')),
+          ( '/usr/share/unfold/static/img', images ('static/img')),
+# for portal/          
+          ( '/usr/share/unfold/static/img/institutions', images ('static/img/institutions')),
+          ( '/usr/share/unfold/static/img/testbeds', images ('static/img/testbeds')),
           ( '/usr/share/unfold/static/fonts', glob ('static/fonts/*')),
           ( '/usr/share/unfold/templates', glob ('templates/*')),
           ( 'apache', [ 'apache/unfold.conf', 'apache/unfold-ssl.conf', 'apache/unfold.wsgi' ]),
diff --git a/ui/static/img/favicon.ico b/ui/static/img/favicon.ico
deleted file mode 100644 (file)
index 3925be4..0000000
Binary files a/ui/static/img/favicon.ico and /dev/null differ
diff --git a/ui/templates/base.html b/ui/templates/base.html
deleted file mode 100644 (file)
index 467b816..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-{# This is required by insert_above #}{% insert_handler %}<!DOCTYPE html>
-<html lang="en"><head>
-<title>FIBRE - {{ section }}</title>
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<link rel="shortcut icon" href="/static/img/myslice-icon.png">
-{# This is where insert_str will end up #}{% media_container prelude %}
-{% include 'messages-transient-header.html' %}
-<script type="text/javascript"> {# raw js code - use {% insert prelude_js %} ... {% endinsert %} #} {% container prelude_js %}</script>
-<script src="{{ STATIC_URL }}js/jquery.dataTables.min.js"></script>
-<script src="{{ STATIC_URL }}js/bootstrap.datatables.js"></script>
-<script src="{{ STATIC_URL }}js/myslice.js"></script>
-<script src="{{ STATIC_URL }}js/myslice-ui.js"></script>
-<style type="text/css">{# In case we need to add raw css code #}{% container prelude_css %}</style>
-{{ header_prelude }}
-{% block head %} {% endblock head %}
-{# let's add these ones no matter what #}
-{% insert_str prelude "js/jquery.min.js" %}
-{% insert_str prelude "js/jquery.html5storage.min.js" %}
-{% insert_str prelude "js/messages-runtime.js" %}
-{% insert_str prelude "js/class.js" %}
-{% insert_str prelude "js/plugin-helper.js" %}
-{% insert_str prelude "js/mustache.js" %}
-{% insert_str prelude "js/plugin.js" %}
-{% insert_str prelude "js/manifold.js" %}
-{% insert_str prelude "css/manifold.css" %}
-{% insert_str prelude "css/plugin.css" %}
-{% insert_str prelude "js/bootstrap.js" %}
-{% insert_str prelude "css/bootstrap.css" %}
-{% insert_str prelude "css/topmenu.css" %}
-{% insert_str prelude "js/logout.js" %}
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/{{ theme }}.css">
-</head>
-<body>
-{% block container %}
-       {% block topmenu %}
-       {% include theme|add:"__widget-topmenu.html" %}
-       {% endblock topmenu %}
-       {% include 'messages-transient.html' %}
-       {% block base_content %}
-       {% endblock %}
-{% endblock container %}
-</body>
-</html>