from plugins.queryupdater import QueryUpdater
from plugins.googlemap import GoogleMap
from plugins.senslabmap import SensLabMap
+from plugins.scheduler import Scheduler
from plugins.querycode import QueryCode
from plugins.query_editor import QueryEditor
from plugins.active_filters import ActiveFilters
'slice_hrn',
'resource.hrn', 'resource.hostname', 'resource.type',
'resource.network_hrn',
- #'lease.urn',
+ 'lease.urn',
'user.user_hrn',
#'application.measurement_point.counter'
)
+ # for internal use in the querytable plugin;
+ # needs to be a unique column present for each returned record
+ main_query_key = 'hrn'
query_resource_all = Query.get('resource').select(resource_fields)
if do_query_users:
togglable = False,
query = sq_resource,
query_all = query_resource_all,
+ googlemap_api_key = Config().googlemap_api_key(),
checkboxes = True,
# center on Paris
latitude = 49.,
# this is the query at the core of the slice list
query = sq_resource,
query_all = query_resource_all,
+ # safer to use 'hrn' as the internal unique key for this plugin
+ id_key = main_query_key,
checkboxes = True,
datatables_options = {
'iDisplayLength': 25,
},
)
+ resources_as_scheduler = Scheduler(
+ page = page,
+ title = 'Scheduler',
+ domid = 'scheduler',
+ query = sq_resource,
+ query_all_resources = query_resource_all,
+ query_lease = sq_lease,
+ )
+
# with the new 'Filter' stuff on top, no need for anything but the querytable
resources_as_list_area = resources_as_list
togglable=True,
title="Resources",
outline_complete=True,
- sons=[ resources_as_gmap,
+ sons=[
+ resources_as_gmap,
resources_as_3dmap,
+ resources_as_scheduler,
resources_as_list_area, ],
active_domid = 'resources-map',
+ persistent_active=True,
)
main_stack.insert (resources_area)