[PATCH] Bugfix: Template disk allocation changed back to default(10G)

Keep the changed value until save option has been chosen. Signed-off-by: Wen Wang <wenwang@linux.vnet.ibm.com> --- ui/js/src/kimchi.template_edit_main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/js/src/kimchi.template_edit_main.js b/ui/js/src/kimchi.template_edit_main.js index 1149541..f809223 100644 --- a/ui/js/src/kimchi.template_edit_main.js +++ b/ui/js/src/kimchi.template_edit_main.js @@ -102,7 +102,7 @@ kimchi.template_edit_main = function() { if (tempType === 'iscsi' || tempType === 'scsi') { $('.template-storage-disk', selectedItem).attr('readonly', true).val(scsiCap); } else { - $('.template-storage-disk', selectedItem).attr('readonly', false).val('10'); + $('.template-storage-disk', selectedItem).attr('readonly', false); } $('.template-storage-name').val(tempStorageNameFull); }); -- 2.1.0

Reviewed-By: Christy Perez <christy@linux.vnet.ibm.com> Thanks Wen! Just to provide a little background, I spoke with someone who was trying kimchi and didn't understand why the disk size wasn't what he thought he had set it to. It turned out that he changed it, then changed the storage pool, and didn't realize that changing the storage pool reset the disk size back to 10G. It makes sense to keep what the user had just put in the previous field, so I asked Wen if he could change the behavior. On 01/25/2015 11:28 PM, Wen Wang wrote:
Keep the changed value until save option has been chosen.
Signed-off-by: Wen Wang <wenwang@linux.vnet.ibm.com> --- ui/js/src/kimchi.template_edit_main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/js/src/kimchi.template_edit_main.js b/ui/js/src/kimchi.template_edit_main.js index 1149541..f809223 100644 --- a/ui/js/src/kimchi.template_edit_main.js +++ b/ui/js/src/kimchi.template_edit_main.js @@ -102,7 +102,7 @@ kimchi.template_edit_main = function() { if (tempType === 'iscsi' || tempType === 'scsi') { $('.template-storage-disk', selectedItem).attr('readonly', true).val(scsiCap); } else { - $('.template-storage-disk', selectedItem).attr('readonly', false).val('10'); + $('.template-storage-disk', selectedItem).attr('readonly', false); } $('.template-storage-name').val(tempStorageNameFull); });
participants (3)
-
Aline Manera
-
Christy Perez
-
Wen Wang