git://git.onelab.eu
/
unfold.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ssh://git.onelab.eu/git/myslice
[unfold.git]
/
portal
/
sliceview.py
diff --git
a/portal/sliceview.py
b/portal/sliceview.py
index
09e4433
..
2d77bdf
100644
(file)
--- a/
portal/sliceview.py
+++ b/
portal/sliceview.py
@@
-69,7
+69,8
@@
class SliceView (LoginRequiredAutoLogoutView):
main_query = Query.get('slice').filter_by('slice_hrn', '=', slicename)
main_query.select(
'slice_hrn',
main_query = Query.get('slice').filter_by('slice_hrn', '=', slicename)
main_query.select(
'slice_hrn',
- 'resource.hrn', 'resource.urn', 'resource.hostname', 'resource.type',
+ #'resource.hrn', 'resource.urn',
+ 'resource.hostname', 'resource.type',
'resource.network_hrn',
'lease.urn',
'user.user_hrn',
'resource.network_hrn',
'lease.urn',
'user.user_hrn',
@@
-77,7
+78,7
@@
class SliceView (LoginRequiredAutoLogoutView):
)
# for internal use in the querytable plugin;
# needs to be a unique column present for each returned record
)
# for internal use in the querytable plugin;
# needs to be a unique column present for each returned record
-
#main_query_key = 'hrn
'
+
main_query_init_key = 'hostname
'
query_resource_all = Query.get('resource').select(resource_fields)
if do_query_users:
query_resource_all = Query.get('resource').select(resource_fields)
if do_query_users:
@@
-173,7
+174,10
@@
class SliceView (LoginRequiredAutoLogoutView):
togglable = False,
query = sq_resource,
query_all = query_resource_all,
togglable = False,
query = sq_resource,
query_all = query_resource_all,
+ # this key is the one issued by google
googlemap_api_key = Config().googlemap_api_key(),
googlemap_api_key = Config().googlemap_api_key(),
+ # the key to use at init-time
+ init_key = main_query_init_key,
checkboxes = True,
# center on Paris
latitude = 49.,
checkboxes = True,
# center on Paris
latitude = 49.,
@@
-196,8
+200,8
@@
class SliceView (LoginRequiredAutoLogoutView):
# this is the query at the core of the slice list
query = sq_resource,
query_all = query_resource_all,
# 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,
+ # use 'hrn' as the internal unique key for this plugin
+
init_key = main_query_init
_key,
checkboxes = True,
datatables_options = {
'iDisplayLength': 25,
checkboxes = True,
datatables_options = {
'iDisplayLength': 25,
@@
-214,8
+218,9
@@
class SliceView (LoginRequiredAutoLogoutView):
# this is the query at the core of the slice list
query = sq_resource,
query_all = query_resource_all,
# 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,
+ # use 'hrn' as the internal unique key for this plugin
+ # xxx todo on querygrid as well
+ # init_key = main_query_init_key,
checkboxes = True,
)
checkboxes = True,
)
@@
-245,8
+250,6
@@
class SliceView (LoginRequiredAutoLogoutView):
if insert_grid:
resources_sons.append(resources_as_grid)
if insert_grid:
resources_sons.append(resources_as_grid)
- print 40*'+-',"resources_sons has",len(resources_sons),"son"
-
resources_area = Tabs ( page=page,
domid="resources",
togglable=True,
resources_area = Tabs ( page=page,
domid="resources",
togglable=True,