Make event-list sort_keys all workable
Currently when listing events, user can sort events by keys like 'user' and 'obj_name', but these columns are not in the list which makes the sorting meanless. Because 'user' is almost always keeping the same, so don't use it as a sort key, adding 'level' as a sort key. Change-Id: I3b298f660faf81e69431320248bc6b342faff3b2 Closes-bug: #1528103
This commit is contained in:
parent
601166471d
commit
ce8345259d
@ -1215,9 +1215,9 @@ def do_event_list(sc, args):
|
||||
def _short_obj_id(obj):
|
||||
return obj.obj_id[:8] if obj.obj_id else ''
|
||||
|
||||
fields = ['id', 'timestamp', 'obj_type', 'obj_id', 'action', 'status',
|
||||
'status_reason']
|
||||
sort_keys = ['timestamp', 'obj_type', 'obj_name', 'user', 'action']
|
||||
fields = ['id', 'timestamp', 'obj_type', 'obj_id', 'obj_name', 'action',
|
||||
'status', 'status_reason', 'level']
|
||||
sort_keys = ['timestamp', 'obj_type', 'obj_name', 'level', 'action']
|
||||
|
||||
queries = {
|
||||
'sort_keys': args.sort_keys,
|
||||
|
Loading…
x
Reference in New Issue
Block a user