[Kimchi-devel] [PATCH v5 05/10] Debug Report: Sort Reports by Generated Time Descendingly
Hongliang Wang
hlwang at linux.vnet.ibm.com
Fri Jul 11 09:17:48 UTC 2014
Sorted reports by generated time descendingly.
Signed-off-by: Hongliang Wang <hlwang at linux.vnet.ibm.com>
---
src/kimchi/control/debugreports.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/kimchi/control/debugreports.py b/src/kimchi/control/debugreports.py
index 65b53a3..444cb07 100644
--- a/src/kimchi/control/debugreports.py
+++ b/src/kimchi/control/debugreports.py
@@ -28,6 +28,10 @@ class DebugReports(AsyncCollection):
super(DebugReports, self).__init__(model)
self.resource = DebugReport
+ def _get_resources(self, filter_params):
+ res_list = super(DebugReports, self)._get_resources(filter_params)
+ return sorted(res_list, key=lambda x:x.data['time'], reverse=True)
+
class DebugReport(Resource):
def __init__(self, model, ident):
--
1.8.1.4
More information about the Kimchi-devel
mailing list