[Kimchi-devel] [PATCH] [Kimchi 2/6] Add Storage Pools listeners to update page according to user interations

Aline Manera aline.manera at gmail.com
Tue Jul 25 20:10:00 UTC 2017


It makes use of the async websockets notification mechanism provided by
Wok to update the Storage tab content when a pool is added, removed
or updated without the need to polling requests to server.

Signed-off-by: Aline Manera <aline.manera at gmail.com>
---
 ui/js/src/kimchi.storage_main.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ui/js/src/kimchi.storage_main.js b/ui/js/src/kimchi.storage_main.js
index 0429456..f58f070 100644
--- a/ui/js/src/kimchi.storage_main.js
+++ b/ui/js/src/kimchi.storage_main.js
@@ -753,6 +753,7 @@ kimchi.storage_main = function() {
     }
     kimchi.doListStoragePools();
     kimchi.initLogicalPoolExtend();
+    wok.addNotificationListener('METHOD:/kimchi/storages', kimchi.doListStoragePools);
 
     wok.topic('kimchi/storageVolumeAdded').subscribe(function() {
         pool = kimchi.selectedSP;
-- 
2.9.4



More information about the Kimchi-devel mailing list