additional datatables_options can be passed to hazelnut from the view for any fine...
[myslice.git] / trash / sliceview.py
index 022eb57..2811bb6 100644 (file)
@@ -31,7 +31,6 @@ def slice_view (request, slicename=tmp_default_slice):
                                 timestamp='latest',
                                 fields=['network','type','hrn','hostname'],
                                 filters= [ [ 'slice_hrn', '=', slicename, ] ],
-#                                sort='slice_hrn',
                                 )
     page.enqueue_query (main_query)
 
@@ -51,7 +50,7 @@ def slice_view (request, slicename=tmp_default_slice):
                         page=page,
                         title='a sample and simple hazelnut',
                         domid='simple',
-#                        togglable=False,
+                        togglable=False,
                         # this is the query at the core of the slice list
                         query=main_query,
                         ),
@@ -59,10 +58,13 @@ def slice_view (request, slicename=tmp_default_slice):
                         page=page,
                         title='with checkboxes',
                         domid='checkboxes',
-#                        togglable=False,
+                        togglable=False,
                         checkboxes=True,
                         # this is the query at the core of the slice list
                         query=main_query,
+                        # this of course should be automatic in hazelnut
+                        # for now we turn off sorting on the checkboxes columns this way
+                        datatables_options = { 'aoColumns' : [ None, None, None, None, {'bSortable': False} ] },
                         ),
                     ]),
               Hazelnut ( 
@@ -72,6 +74,7 @@ def slice_view (request, slicename=tmp_default_slice):
 #                toggled=False,
                 # this is the query at the core of the slice list
                 query=main_query,
+                columns=['hrn','hostname'],
                 ),
               QueryCode (
                 page=page,
@@ -79,6 +82,11 @@ def slice_view (request, slicename=tmp_default_slice):
                 query=main_query,
 #                toggled=False,
                 ),
+              QuickFilter (
+                page=page,
+                title="QuickFilter is currently the only one that requires metadata",
+                criterias=quickfilter_criterias
+                ),
               ])
 
     # variables that will get passed to the view-unfold1.html template
@@ -106,5 +114,4 @@ def slice_view (request, slicename=tmp_default_slice):
     template_env.update(prelude_env)
     result=render_to_response ('view-unfold1.html',template_env,
                                context_instance=RequestContext(request))
-    print 'result=',result
     return result