[Kimchi-devel] [PATCH] [Kimchi] Disable vm statistics/screenshots in edit guest
Jose Ricardo Ziviani
joserz at linux.vnet.ibm.com
Thu Jul 28 00:49:45 UTC 2016
- When Edit Guest modal window is opened, Kimchi continues to make
requests to get all VM' statistics and screenshots, that affects
necessary and heavy requests like PCI queries. This commit
disable those poolings when the modal window is opened and
re-enable when the modal is closed.
Signed-off-by: Jose Ricardo Ziviani <joserz at linux.vnet.ibm.com>
---
ui/js/src/kimchi.guest_edit_main.js | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
index 9099f39..507ae75 100644
--- a/ui/js/src/kimchi.guest_edit_main.js
+++ b/ui/js/src/kimchi.guest_edit_main.js
@@ -20,6 +20,11 @@ kimchi.guest_edit_main = function() {
var formTargetId;
var guestEditForm = $('#form-guest-edit-general');
var saveButton = $('#guest-edit-button-save');
+ clearTimeout(kimchi.vmTimeout);
+
+ $('#modalWindow').on('hidden.bs.modal', function() {
+ kimchi.vmTimeout = window.setTimeout("kimchi.listVmsAuto();", 5000);
+ });
$('#guest-edit-window a[data-toggle="tab"]').on('show.bs.tab', function(tab) {
tab.target; // newly activated tab
--
2.7.4
More information about the Kimchi-devel
mailing list