On 11/18/2014 01:19 AM, Wen Wang wrote:
From: Wen Wang <wenwang(a)linux.vnet.ibm.com>
After testing, upload funcion works and this patch did the ui change
that enable upload a volume in storage
Signed-off-by: Wen Wang <wenwang(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.storagepool_add_volume_main.js | 2 +-
ui/pages/storagepool-add-volume.html.tmpl | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/js/src/kimchi.storagepool_add_volume_main.js
b/ui/js/src/kimchi.storagepool_add_volume_main.js
index 590ccde..05c7bb1 100644
--- a/ui/js/src/kimchi.storagepool_add_volume_main.js
+++ b/ui/js/src/kimchi.storagepool_add_volume_main.js
@@ -88,12 +88,12 @@ kimchi.sp_add_volume_main = function() {
sp: kimchi.selectedSP,
formData: fd
}, function(result) {
- kimchi.window.close();
kimchi.topic('kimchi/storageVolumeAdded').publish();
}, onError);
};
$(addButton).on('click', function(event) {
+ kimchi.window.close();
Although this change, the dialog taks ~2 minutes to get closed.
I'd say to keep upload function disabled for 1.4 and then change the
backend to allow receive the file part by part.
$(this).prop('disabled', true);
$(typeRadios).prop('disabled', true);
if(type === 'download') {
diff --git a/ui/pages/storagepool-add-volume.html.tmpl
b/ui/pages/storagepool-add-volume.html.tmpl
index 573a764..298a565 100644
--- a/ui/pages/storagepool-add-volume.html.tmpl
+++ b/ui/pages/storagepool-add-volume.html.tmpl
@@ -47,7 +47,7 @@
</div>
<div class="form-section">
<h2>
- <input type="radio"
id="volume-type-upload" class="volume-type"
name="volumeType" value="upload" disabled/>
+ <input type="radio"
id="volume-type-upload" class="volume-type"
name="volumeType" value="upload"/>
<label for="volume-type-upload">
$_("Upload an file")
</label>