[Kimchi-devel] [PATCH 1/2] Allow listStorageVolumes ajax call be synchronized
Aline Manera
alinefm at linux.vnet.ibm.com
Fri Nov 13 16:32:08 UTC 2015
On 10/11/2015 12:02, Rodrigo Trujillo wrote:
> This patch set needs to wait a little bit.
> Samuel is going to send new UI patches today, so this patchset will
> need rebase and some css adjustments
>
> I am going to send a V2 as soon as I get new UI patches.
OK, Rodrigo! So I will not consider this patch.
> Thanks
>
> Rodrigo
>
>
> On 11/09/2015 08:13 PM, Rodrigo Trujillo wrote:
>> This patch changes kimchi.listStorageVolumes function to receive
>> a new parameter 'sync' in order to set it as synchronous call.
>>
>> Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
>> ---
>> src/wok/plugins/kimchi/ui/js/src/kimchi.api.js | 7 ++++---
>> src/wok/plugins/kimchi/ui/js/src/kimchi.guest_storage_add.main.js | 2 +-
>> src/wok/plugins/kimchi/ui/js/src/kimchi.storage_main.js | 2 +-
>> 3 files changed, 6 insertions(+), 5 deletions(-)
>>
>> diff --git a/src/wok/plugins/kimchi/ui/js/src/kimchi.api.js
>> b/src/wok/plugins/kimchi/ui/js/src/kimchi.api.js
>> index b1acdb9..d5e9ddd 100644
>> --- a/src/wok/plugins/kimchi/ui/js/src/kimchi.api.js
>> +++ b/src/wok/plugins/kimchi/ui/js/src/kimchi.api.js
>> @@ -393,12 +393,13 @@ var kimchi = {
>> });
>> },
>>
>> - listStorageVolumes : function(poolName, suc, err) {
>> + listStorageVolumes : function(poolName, suc, err, sync) {
>> $.ajax({
>> url : 'plugins/kimchi/storagepools/' +
>> encodeURIComponent(poolName) + '/storagevolumes',
>> type : 'GET',
>> contentType : 'application/json',
>> dataType : 'json',
>> + async : !sync,
>> success : suc,
>> error : err
>> });
>> @@ -452,7 +453,7 @@ var kimchi = {
>> return;
>> }
>> suc(isos, true);
>> - }, err);
>> + }, err, false);
>> } else if (status === "running") {
>> if (deepScanHandler.stop) {
>> return;
>> @@ -463,7 +464,7 @@ var kimchi = {
>> }
>> suc(isos, false);
>> setTimeout(monitorTask, 2000);
>> - }, err);
>> + }, err, false);
>> } else if (status === "failed") {
>> if (deepScanHandler.stop) {
>> return;
>> diff --git
>> a/src/wok/plugins/kimchi/ui/js/src/kimchi.guest_storage_add.main.js
>> b/src/wok/plugins/kimchi/ui/js/src/kimchi.guest_storage_add.main.js
>> index ec07cf0..d6606ee 100644
>> --- a/src/wok/plugins/kimchi/ui/js/src/kimchi.guest_storage_add.main.js
>> +++ b/src/wok/plugins/kimchi/ui/js/src/kimchi.guest_storage_add.main.js
>> @@ -94,7 +94,7 @@ kimchi.guest_storage_add_main = function() {
>> }
>> }
>> $('#guest-disk').selectMenu("setData", options);
>> - });
>> + }, null, false);
>> });
>>
>>
>> diff --git a/src/wok/plugins/kimchi/ui/js/src/kimchi.storage_main.js
>> b/src/wok/plugins/kimchi/ui/js/src/kimchi.storage_main.js
>> index 40a43f6..cba8fb4 100644
>> --- a/src/wok/plugins/kimchi/ui/js/src/kimchi.storage_main.js
>> +++ b/src/wok/plugins/kimchi/ui/js/src/kimchi.storage_main.js
>> @@ -282,7 +282,7 @@ kimchi.doListVolumes = function(poolObj) {
>> slide.slideDown('slow');
>> }, function(err) {
>> wok.message.error(err.responseJSON.reason);
>> - });
>> + }, false);
>> }
>>
>> kimchi.initLogicalPoolExtend = function() {
>
> _______________________________________________
> Kimchi-devel mailing list
> Kimchi-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
>
More information about the Kimchi-devel
mailing list