git://git.onelab.eu
/
myslice.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed bug if a platform is disabled but the user still has accounts on this platform
[myslice.git]
/
trash
/
simpletableview.py
diff --git
a/trash/simpletableview.py
b/trash/simpletableview.py
index
6764321
..
e0fd770
100644
(file)
--- a/
trash/simpletableview.py
+++ b/
trash/simpletableview.py
@@
-24,7
+24,7
@@
class SimpleTableView (TemplateView):
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.h
rn', 'resource.h
ostname', 'resource.type',
+ 'resource.hostname', 'resource.type',
'resource.network_hrn',
'lease.urn',
'user.user_hrn',
'resource.network_hrn',
'lease.urn',
'user.user_hrn',
@@
-32,7
+32,7
@@
class SimpleTableView (TemplateView):
)
# 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)
query_resource_all = Query.get('resource').select(resource_fields)
@@
-50,7
+50,7
@@
class SimpleTableView (TemplateView):
query = sq_resource,
query_all = query_resource_all,
# safer to use 'hrn' as the internal unique key for this plugin
query = sq_resource,
query_all = query_resource_all,
# safer to use 'hrn' as the internal unique key for this plugin
-
common_key = main_query
_key,
+
init_key = main_query_init
_key,
checkboxes = True,
datatables_options = {
'iDisplayLength': 25,
checkboxes = True,
datatables_options = {
'iDisplayLength': 25,
@@
-59,8
+59,6
@@
class SimpleTableView (TemplateView):
},
)
},
)
- print 40*'++-','JUST created, common_key=',resources_as_list.common_key
-
# variables that will get passed to the view-unfold1.html template
template_env = {}
# variables that will get passed to the view-unfold1.html template
template_env = {}