Reviewed-by: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
On 05/22/2014 03:55 PM, 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):
--
Thanks and best regards!
Sheldon Feng(冯少合)<shaohef(a)linux.vnet.ibm.com>
IBM Linux Technology Center