Demo OpenLab Debug off in manifold/static/js/manifold.js myslice-0.2-5
authorLoic Baron <loic.baron@lip6.fr>
Sat, 19 Oct 2013 11:49:44 +0000 (13:49 +0200)
committerLoic Baron <loic.baron@lip6.fr>
Sat, 19 Oct 2013 11:49:44 +0000 (13:49 +0200)
manifold/static/js/manifold.js
myslice/config.py
myslice/myslice.ini
plugins/messages/__init__.py
portal/platformsview.py
portal/registrationview.py
portal/slicerequestview.py
portal/sliceview.py

index 7da4700..c4d0ef7 100644 (file)
@@ -730,6 +730,7 @@ var manifold = {
             if (publish_uuid)
                 $.publish("/results/" + publish_uuid + "/failed", [data.code, data.description] );
 
+/* DEMO - Debug Messages desactivated
             $("#notifications").notify("create", "sticky", {
               title: 'Warning',
               text: data.description
@@ -737,7 +738,7 @@ var manifold = {
               expires: false,
               speed: 1000
             });
-            
+*/            
         }
        if (manifold.asynchroneous_debug) 
            messages.debug ("========== asynchroneous_success " + query.object + " -- before process_query_records");
index 51bf4b7..31dc7e3 100644 (file)
@@ -2,10 +2,13 @@ import os.path
 from ConfigParser import RawConfigParser
 from myslice.settings import ROOT
 
+# myslice/myslice.ini
 # as this code suggests, you have the option to write myslice/myslice.ini
 # that looks like this
 #[manifold]
 #url = http://manifold.pl.sophia.inria.fr:7080/
+#admin_user = admin
+#admin_password = admin
 
 class Config:
 
index c22836e..325191d 100644 (file)
@@ -1,4 +1,4 @@
 [manifold]
 url = http://localhost:7080
 admin_user = admin
-admin_password = admin
+admin_password = demo
index 65baea1..7ee0c3c 100644 (file)
@@ -2,6 +2,7 @@ from unfold.plugin import Plugin
 
 # lists levels and sets them to enabled or not at startup
 default_levels = {'fatal': True, 'error': True, 'warning' : True, 'info' : True, 'debug' : False}
+#default_levels = {'fatal': False, 'error': False, 'warning' : False, 'info' : False, 'debug' : False}
 
 # there are two implementations available here
 # one shows up in the main page like a regular part of the page,
index ddc9689..d3c3ca0 100644 (file)
@@ -14,8 +14,8 @@ class PlatformsView(TemplateView):
     def get_context_data(self, **kwargs):
         page = Page(self.request)
 
-        #platform_query  = Query().get('local:platform').filter_by('disabled', '==', '0').select('platform','platform_longname','gateway_type')
-        platform_query  = Query().get('local:platform').select('platform','platform_longname','gateway_type')
+        platform_query  = Query().get('local:platform').filter_by('disabled', '==', '0').select('platform','platform_longname','gateway_type')
+        #platform_query  = Query().get('local:platform').select('platform','platform_longname','gateway_type')
         page.enqueue_query(platform_query)
 
         page.expose_js_metadata()
index 4c7c8f2..ba73700 100644 (file)
@@ -1,4 +1,5 @@
 import os.path, re
+import json
 
 from django.core.mail           import send_mail
 
@@ -33,10 +34,11 @@ class RegistrationView (View):
             select('name', 'authority_hrn')
         
         onelab_enabled_query = Query.get('local:platform').filter_by('platform', '==', 'ple-onelab').filter_by('disabled', '==', 'False')
-        onelab_enabled = not not execute_admin_query(request, onelab_enabled_query)
+        #onelab_enabled = not not execute_admin_query(request, onelab_enabled_query)
+        onelab_enabled = True
         if onelab_enabled:
             print "ONELAB ENABLED"
-            authorities_query = authorities_query.filter_by('authority_hrn', 'included', ['ple.inria', 'ple.upmc'])
+            authorities_query = authorities_query.filter_by('authority_hrn', 'included', ['ple.inria', 'ple.upmc', 'ple.ibbtple'])
         else:
             print "FIREXP ENABLED"
 
index d3c73d3..e8c80d8 100644 (file)
@@ -18,9 +18,10 @@ class SliceRequestView (LoginRequiredAutoLogoutView):
             select('name', 'authority_hrn')
         
         onelab_enabled_query = Query.get('local:platform').filter_by('platform', '==', 'ple-onelab').filter_by('disabled', '==', 'False')
-        onelab_enabled = not not execute_admin_query(request, onelab_enabled_query)
+        #onelab_enabled = not not execute_admin_query(request, onelab_enabled_query)
+        onelab_enabled = True
         if onelab_enabled:
-            authorities_query = authorities_query.filter_by('authority_hrn', 'included', ['ple.inria', 'ple.upmc'])
+            authorities_query = authorities_query.filter_by('authority_hrn', 'included', ['ple.inria', 'ple.upmc', 'ple.ibbtple'])
 
         authorities = execute_admin_query(request, authorities_query)
         #authorities = sorted(authorities)
index 2f22789..9d335f4 100644 (file)
@@ -216,52 +216,52 @@ class SliceView (LoginRequiredAutoLogoutView):
                     'bAutoWidth'     : True,
                 },
             ))
-    
+# DEMO    
         # --------------------------------------------------------------------------
         # MEASUREMENTS
-        tab_measurements = Tabs (
-            page                = page,
-            active_domid        = 'measurements-list',
-            outline_complete    = True,
-            togglable           = True,
-            title               = 'Measurements',
-            domid               = 'measurements',
-        )
-        main_stack.insert(tab_measurements)
-    
-        tab_measurements.insert(Hazelnut( 
-            page        = page,
-            title       = 'Measurements',
-            domid       = 'measurements-list',
-            # tab's sons preferably turn this off
-            togglable   = False,
-            # this is the query at the core of the slice list
-            query       = sq_measurement,
-            # do NOT set checkboxes to False
-            # this table being otherwise empty, it just does not fly with dataTables
-            checkboxes  = True,
-            datatables_options = { 
-                'iDisplayLength' : 25,
-                'bLengthChange'  : True,
-                'bAutoWidth'     : True,
-            },
-        ))
-    
-        # --------------------------------------------------------------------------
-        # MESSAGES (we use transient=False for now)
-        main_stack.insert(Messages(
-            page   = page,
-            title  = "Runtime messages for slice %s"%slicename,
-            domid  = "msgs-pre",
-            levels = "ALL",
-            # plain messages are probably less nice for production but more reliable for development for now
-            transient = False,
-            # these make sense only in non-transient mode..
-            togglable = True,
-            toggled = 'persistent',
-            outline_complete = True,
-        ))
-    
+#        tab_measurements = Tabs (
+#            page                = page,
+#            active_domid        = 'measurements-list',
+#            outline_complete    = True,
+#            togglable           = True,
+#            title               = 'Measurements',
+#            domid               = 'measurements',
+#        )
+#        main_stack.insert(tab_measurements)
+#    
+#        tab_measurements.insert(Hazelnut( 
+#            page        = page,
+#            title       = 'Measurements',
+#            domid       = 'measurements-list',
+#            # tab's sons preferably turn this off
+#            togglable   = False,
+#            # this is the query at the core of the slice list
+#            query       = sq_measurement,
+#            # do NOT set checkboxes to False
+#            # this table being otherwise empty, it just does not fly with dataTables
+#            checkboxes  = True,
+#            datatables_options = { 
+#                'iDisplayLength' : 25,
+#                'bLengthChange'  : True,
+#                'bAutoWidth'     : True,
+#            },
+#        ))
+#    
+#        # --------------------------------------------------------------------------
+#        # MESSAGES (we use transient=False for now)
+#        main_stack.insert(Messages(
+#            page   = page,
+#            title  = "Runtime messages for slice %s"%slicename,
+#            domid  = "msgs-pre",
+#            levels = "ALL",
+#            # plain messages are probably less nice for production but more reliable for development for now
+#            transient = False,
+#            # these make sense only in non-transient mode..
+#            togglable = True,
+#            toggled = 'persistent',
+#            outline_complete = True,
+#        ))
+#    
     
         # variables that will get passed to the view-unfold1.html template
         template_env = {}