Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab
authorLoic Baron <loic.baron@lip6.fr>
Thu, 24 Jul 2014 16:11:24 +0000 (18:11 +0200)
committerLoic Baron <loic.baron@lip6.fr>
Thu, 24 Jul 2014 16:11:24 +0000 (18:11 +0200)
manifoldapi/static/css/manifold.css
manifoldapi/static/js/plugin.js
plugins/testbeds/templates/testbeds.html
portal/actions.py
portal/static/css/onelab.css
portal/templates/base.html

index 42c034d..535950e 100644 (file)
@@ -2,3 +2,18 @@
        visibility: hidden;
        position: absolute;
 }
+
+.loading {
+    background-color:white;
+    color:black;
+    position:fixed;
+    top:160px;
+    left:50%;
+    width:30%;
+    margin: 0 0 0 -15%;
+    padding:25px 50px;
+    box-shadow: 4px 4px 5px #888;
+    border:1pt solid #30196D;
+    display:none;
+    z-index:100;
+}
index 76e1cb5..324c8c4 100644 (file)
@@ -316,15 +316,18 @@ var Plugin = Class.extend({
     // use spin() to get our default spin settings (called presets)
     // use spin(true) to get spin's builtin defaults
     // you can also call spin_presets() yourself and tweak what you need to, like topmenuvalidation does
-    spin: function (presets) {
-       var presets = ( presets === undefined ) ? spin_presets() : presets;
-       try { this.$element.spin(presets); }
-       catch (err) { messages.debug("Cannot turn on spin " + err); }
+    spin: function (message) {
+       if (!message) {
+               message = 'Please be patient, this can take a few seconds.';
+       }
+       $('div.loading').fadeIn('fast');
+       $('div.loading').find('.message').text(message);
+
     },
 
     unspin: function() {
-       try { this.$element.spin(false); }
-       catch (err) { messages.debug("Cannot turn off spin " + err); }
+       $('div.loading').fadeOut('fast');
+
     },
 
     /* TEMPLATE */
index d670c9d..22f7f0a 100644 (file)
        </a>
 </div>
 
+<style>
+a.sl-platform  {
+    text-transform: uppercase;
+}
+
+</style>
+
 </div>
index 3a5fcbc..d62f994 100644 (file)
@@ -377,6 +377,8 @@ def create_slice(wsgi_request, request):
     # Add User to Slice if we have the user_hrn in pendingslice table
     user_hrn = request.get('user_hrn', None)
     user_hrns = list([user_hrn]) if user_hrn else list()
+    
+    user_email = request.get
 
     # XXX We should create a slice with Manifold terminology
     slice_params = {
@@ -392,6 +394,13 @@ def create_slice(wsgi_request, request):
     results = execute_query(wsgi_request, query)
     if not results:
         raise Exception, "Could not create %s. Already exists ?" % slice_params['hrn']
+    ## We do not store the email in pendingslice table. As a result receiver's email is unknown ##
+    ## Need modification in pendingslice table ###
+    #else:
+    #    subject = 'Slice created'
+    #    msg = 'A manager of your institution has validated your slice request. You can now add resources to the slice and start experimenting.'
+    #    send_mail(subject, msg, 'support@onelab.eu',['yasin.upmc@gmail.com'], fail_silently=False)
+       
     return results
 
 def create_pending_slice(wsgi_request, request, email):
@@ -506,6 +515,10 @@ def sfa_create_user(wsgi_request, request):
     results = execute_query(wsgi_request, query)
     if not results:
         raise Exception, "Could not create %s. Already exists ?" % sfa_user_params['user_hrn']
+    else:
+        subject = 'User validated'
+        msg = 'A manager of your institution has validated your account. You have now full user access to the portal.'
+        send_mail(subject, msg, 'support@onelab.eu',[request['email']], fail_silently=False)       
     return results
 
 def create_user(wsgi_request, request):
index 4c53cce..5be1bf3 100644 (file)
@@ -12,6 +12,7 @@ body {
 a, a:active, a:focus {
     outline: 0;
     text-decoration:none;
+    color:#201E62;
 }
 
 h1 {
@@ -26,13 +27,20 @@ h1 img {
     margin-right:10px;
 }
 h2 {
+    margin:0 0 15px 0;
     font-size:14pt;
     color:#333333;
 }
 h3 {
+    margin:0 0 5px 0;
     font-size:13pt;
     color:#201E62;
 }
+h4 {
+    margin:0 0 5px 0;
+    font-size:12pt;
+    color:#333333;
+}
 input[type=text], input[type=password], input[type=email], input[type=tel], input[type=number], select, option {
     min-width:260px;
     padding:6px;
@@ -61,6 +69,9 @@ div.breadcrumbs {
     color:gray;
     font-size:10pt;
 }
+.tab-pane {
+    padding-top:15px;
+}
 /* buttons */
 button.btn, input.btn {
     padding:6px 10px;
index 237cfa6..96aa08e 100644 (file)
@@ -92,5 +92,14 @@ $(document).ready(function() {
        {% block base_content %}
        {% endblock %}
 {% endblock container %}
+<div class="loading">
+       <div class="row">
+               <div class="col-xs-11">Loading...</div>
+               <div class="col-xs-1"><img src="{{ STATIC_URL }}/img/loading.gif" /></div>
+       </div>
+       <div class="row">
+               <div class="col-xs-12 message"></div>
+       </div>
+</div>
 </body>
 </html>