Reviewed-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
On 07/11/2014 06:17 AM, Hongliang Wang wrote:
Sorted reports by generated time descendingly.
Signed-off-by: Hongliang Wang <hlwang(a)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):