[PATCH virt-manager] details: fix --show-domain-performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



the introspection page could be missing, in this case the tabs values
are shifted by one.  The new code looks for the correct row number
before selecting it.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1167600

Signed-off-by: Giuseppe Scrivano <gscrivan@xxxxxxxxxx>
---
 virtManager/details.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/virtManager/details.py b/virtManager/details.py
index 69e42d9..08026fa 100644
--- a/virtManager/details.py
+++ b/virtManager/details.py
@@ -1361,7 +1361,13 @@ class vmmDetails(vmmGObjectUI):
 
     def activate_performance_page(self):
         self.widget("details-pages").set_current_page(DETAILS_PAGE_DETAILS)
-        self.set_hw_selection(HW_LIST_TYPE_STATS)
+        index = 0
+        model = self.widget("hw-list").get_model()
+        for i in range(len(model)):
+            if model[i][HW_LIST_COL_TYPE] == HW_LIST_TYPE_STATS:
+                index = i
+                break
+        self.set_hw_selection(index)
 
     def activate_config_page(self):
         self.widget("details-pages").set_current_page(DETAILS_PAGE_DETAILS)
-- 
1.9.3

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux