[Kimchi-devel] [PATCH] Sort device paths shown when creating a logical storage pool

Paulo Ricardo Paz Vital pvital at linux.vnet.ibm.com
Wed Mar 26 14:05:02 UTC 2014


I guess the commit message has a typo. 
Shouldn't be "This patch sorts..."? 
But the code is OK! 
-- 
Reviewed-by: Paulo Vital <pvital at linux.vnet.ibm.com>


On Tue, 2014-03-25 at 21:16 -0300, Rodrigo Trujillo wrote:
> This path sorts the output list of devices by their paths, improving the
> user experience.
> 
> Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
> ---
>  ui/js/src/kimchi.storagepool_add_main.js | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/ui/js/src/kimchi.storagepool_add_main.js b/ui/js/src/kimchi.storagepool_add_main.js
> index 10833be..97a30d1 100644
> --- a/ui/js/src/kimchi.storagepool_add_main.js
> +++ b/ui/js/src/kimchi.storagepool_add_main.js
> @@ -26,6 +26,7 @@ kimchi.initStorageAddPage = function() {
>      kimchi.listHostPartitions(function(data) {
>          if (data.length > 0) {
>              var deviceHtml = $('#partitionTmpl').html();
> +            data.sort(function (a, b){return a.path.localeCompare(b.path)});
>              var listHtml = '';
>              $.each(data, function(index, value) {
>                  if (value.type === 'part' || value.type === 'disk') {




More information about the Kimchi-devel mailing list