[Kimchi-devel] [PATCH v2 5/8] Debug Report: Sort Reports by Generated Time Descendingly
Sheldon
shaohef at linux.vnet.ibm.com
Thu May 22 13:52:12 UTC 2014
Reviewed-by: ShaoHe Feng <shaohef at 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 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):
--
Thanks and best regards!
Sheldon Feng(冯少合)<shaohef at linux.vnet.ibm.com>
IBM Linux Technology Center
More information about the Kimchi-devel
mailing list