+ stack_resources.insert(resource_active_filters)
+
+ # --------------------------------------------------------------------------
+ # Different displays = DataTables + GoogleMaps
+ #
+ tab_resource_plugins = Tabs(
+ page = page,
+ sons = []
+ )
+
+ tab_resource_plugins.insert(Hazelnut(
+ page = page,
+ title = 'List',
+ domid = 'checkboxes',
+ # this is the query at the core of the slice list
+ query = sq_resource,
+ query_all = query_resource_all,
+ checkboxes = True,
+ datatables_options = {
+ # for now we turn off sorting on the checkboxes columns this way
+ # this of course should be automatic in hazelnut
+ 'aoColumns' : [None, None, None, None, {'bSortable': False}],
+ 'iDisplayLength' : 25,
+ 'bLengthChange' : True,
+ },
+ ))
+
+ tab_resource_plugins.insert(GoogleMaps(
+ page = page,
+ title = 'Geographic view',
+ domid = 'gmap',
+ # tab's sons preferably turn this off
+ togglable = False,
+ query = sq_resource,
+ query_all = query_resource_all,
+ checkboxes = True,
+ # center on Paris
+ latitude = 49.,
+ longitude = 2.2,
+ zoom = 3,
+ ))
+
+ stack_resources.insert(tab_resource_plugins)
+
+ # --------------------------------------------------------------------------
+ # ResourcesSelected
+ #
+ stack_resources.insert(ResourcesSelected(
+ page = page,
+ title = 'Pending operations',
+ resource_query_uuid = sq_resource,
+ lease_query_uuid = sq_lease,
+ togglable = True,
+ ))
+
+ sq_plugin.insert(stack_resources)
+
+ ############################################################################
+ # USERS
+ #
+
+ tab_users = Tabs(
+ page = page,
+ title = 'Users',
+ domid = 'thetabs2',
+ # activeid = 'checkboxes',
+ active_domid = 'checkboxes2',
+ )
+ sq_plugin.insert(tab_users)
+
+ tab_users.insert(Hazelnut(
+ page = page,
+ title = 'List',
+ domid = 'checkboxes2',
+ # tab's sons preferably turn this off
+ togglable = False,
+ # this is the query at the core of the slice list
+ query = sq_user,
+ checkboxes = True,
+ datatables_options = {
+ # for now we turn off sorting on the checkboxes columns this way
+ # this of course should be automatic in hazelnut
+ 'aoColumns' : [None, None, None, None, {'bSortable': False}],
+ 'iDisplayLength' : 25,
+ 'bLengthChange' : True,
+ },
+ ))
+
+ tab_measurements = Tabs (
+ page = page,
+ title = 'Measurements',
+ domid = 'thetabs3',
+ # activeid = 'checkboxes',
+ active_domid = 'checkboxes3',
+ )
+ sq_plugin.insert(tab_measurements)
+
+ tab_measurements.insert(Hazelnut(
+ page = page,
+ title = 'List',
+ domid = 'checkboxes3',
+ # tab's sons preferably turn this off
+ togglable = False,
+ # this is the query at the core of the slice list
+ query = sq_measurement,
+ checkboxes = True,
+ datatables_options = {
+ # for now we turn off sorting on the checkboxes columns this way
+ # this of course should be automatic in hazelnut
+ 'aoColumns' : [None, None, None, None, {'bSortable': False}],
+ 'iDisplayLength' : 25,
+ 'bLengthChange' : True,
+ },
+ ))
+
+ main_plugin.insert(sq_plugin)
+
+ main_plugin.insert(Messages(
+ page = page,
+ title = "Runtime messages for slice %s"%slicename,
+ domid = "msgs-pre",
+ levels = "ALL",
+ ))
+ main_plugin.insert(Updater(
+ page = page,
+ title = "wont show up as non togglable by default",
+ query = main_query,
+ label = "Update slice",
+ ))
+