[Kimchi-devel] [PATCH][Kimchi] Bug fix #1016: Display current storage volume size on resize dialog

Ramon Medeiros ramonn at linux.vnet.ibm.com
Wed Jan 18 17:22:45 UTC 2017


Query storage volume size and show before resize

Signed-off-by: Ramon Medeiros <ramonn at linux.vnet.ibm.com>
---
 ui/js/src/kimchi.storagepool_resize_volume_main.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ui/js/src/kimchi.storagepool_resize_volume_main.js b/ui/js/src/kimchi.storagepool_resize_volume_main.js
index 1f5b4db..6e4ad73 100644
--- a/ui/js/src/kimchi.storagepool_resize_volume_main.js
+++ b/ui/js/src/kimchi.storagepool_resize_volume_main.js
@@ -1,7 +1,7 @@
 /*
  * Project Kimchi
  *
- * Copyright IBM Corp, 2016
+ * Copyright IBM Corp, 2016-2017
  *
  * Licensed under the Apache License, Version 2.0 (the 'License');
  * you may not use this file except in compliance with the License.
@@ -22,6 +22,11 @@ kimchi.sp_resize_volume_main = function() {
     var size = $('#volume-size');
     var form = $('form#form-sp-resize-volume');
 
+    // set storage volume size
+    kimchi.getStoragePoolVolume(kimchi.selectedSP, kimchi.selectedVolumes[0], function(volume) {
+        size.val(volume["capacity"] / (1024 * 1024));
+    });
+
     $(addButton).prop('disabled',true);
     $(size).on('keyup change', function(){
         if($(this).val() > 0) {
-- 
2.7.4



More information about the Kimchi-devel mailing list