Merge branch 'master' of ssh://git.onelab.eu/git/myslice
authorLoic Baron <loic.baron@lip6.fr>
Thu, 24 Oct 2013 23:58:01 +0000 (01:58 +0200)
committerLoic Baron <loic.baron@lip6.fr>
Thu, 24 Oct 2013 23:58:01 +0000 (01:58 +0200)
1  2 
portal/sliceview.py
unfold/page.py

diff --combined portal/sliceview.py
@@@ -26,8 -26,7 +26,8 @@@ from myslice.config                  im
  tmp_default_slice='ple.upmc.myslicedemo'
  
  # temporary : turn off the users part to speed things up
 -do_query_users=True
 +#do_query_users=True
 +do_query_users=False
  
  class SliceView (LoginRequiredAutoLogoutView):
  
@@@ -38,7 -37,8 +38,8 @@@
          page.add_js_files  ( [ "js/common.functions.js" ] )
          page.add_js_chunks ('$(function() { messages.debug("sliceview: jQuery version " + $.fn.jquery); });')
          page.add_js_chunks ('$(function() { messages.debug("sliceview: users turned %s"); });'%("on" if do_query_users else "off"))
-         page.add_js_chunks ('$(function() { messages.debug("manifold URL %s"); });'%(Config.manifold_url()))
+         config=Config()
+         page.add_js_chunks ('$(function() { messages.debug("manifold URL %s"); });'%(config.manifold_url()))
          page.expose_js_metadata()
      
          metadata = page.get_metadata()
          # --------------------------------------------------------------------------
          # USERS
      
 -        if do_query_users:
 -            tab_users = Tabs(
 -                page                = page,
 -                domid               = 'users',
 -                outline_complete    = True,
 -                togglable           = True,
 -                title               = 'Users',
 -                active_domid        = 'users-list',
 -                )
 -            main_stack.insert(tab_users)
 -    
 -            tab_users.insert(Hazelnut( 
 -                page        = page,
 -                title       = 'Users List',
 -                domid       = 'users-list',
 -                # tab's sons preferably turn this off
 -                togglable   = False,
 -                # this is the query at the core of the slice list
 -                query       = sq_user,
 -                query_all  = query_user_all,
 -                checkboxes  = True,
 -                datatables_options = { 
 -                    'iDisplayLength' : 25,
 -                    'bLengthChange'  : True,
 -                    'bAutoWidth'     : True,
 -                },
 -            ))
 +#        if do_query_users:
 +#            tab_users = Tabs(
 +#                page                = page,
 +#                domid               = 'users',
 +#                outline_complete    = True,
 +#                togglable           = True,
 +#                title               = 'Users',
 +#                active_domid        = 'users-list',
 +#                )
 +#            main_stack.insert(tab_users)
 +#    
 +#            tab_users.insert(Hazelnut( 
 +#                page        = page,
 +#                title       = 'Users List',
 +#                domid       = 'users-list',
 +#                # tab's sons preferably turn this off
 +#                togglable   = False,
 +#                # this is the query at the core of the slice list
 +#                query       = sq_user,
 +#                query_all  = query_user_all,
 +#                checkboxes  = True,
 +#                datatables_options = { 
 +#                    'iDisplayLength' : 25,
 +#                    'bLengthChange'  : True,
 +#                    'bAutoWidth'     : True,
 +#                },
 +#            ))
  # DEMO    
          # --------------------------------------------------------------------------
          # MEASUREMENTS
diff --combined unfold/page.py
@@@ -34,7 -34,6 +34,7 @@@ class Page
          self._queue=[]
          # global prelude object
          self.prelude=Prelude(css_files='css/plugin.css')
 +        self.prelude=Prelude(css_files='css/onelab_marko.css')
  
      # record known plugins hashed on their domid
      def record_plugin (self, plugin):
          self.add_js_chunks("var MANIFOLD_METADATA =" + self.get_metadata().to_json() + ";")
  
      def expose_js_manifold_config (self):
-         self.add_js_chunks(Config.manifold_js_export())
+         config=Config()
+         self.add_js_chunks(config.manifold_js_export())
  
      #################### requirements/prelude management
      # just forward to self.prelude - see decorator above