From 8c107f87f935c06715f02fdf6efd6f31e311264e Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sat, 11 Apr 2015 11:29:03 -0400 Subject: [PATCH] host: Remove some redudant conn details And some minor UI spacing fixes --- ui/host.ui | 314 +++++++++++++++----------------------- virtManager/connection.py | 14 -- virtManager/host.py | 6 - 3 files changed, 120 insertions(+), 214 deletions(-) diff --git a/ui/host.ui b/ui/host.ui index dc890e88..8f5c762b 100644 --- a/ui/host.ui +++ b/ui/host.ui @@ -117,7 +117,7 @@ True False 6 - 3 + 18 True @@ -134,7 +134,7 @@ True False 3 - 7 + 4 2 6 3 @@ -166,48 +166,6 @@ - - - True - False - Memory: - 1 - - - 3 - 4 - GTK_FILL - - - - - - True - False - Logical CPUs: - 1 - - - 4 - 5 - GTK_FILL - - - - - - True - False - Architecture: - 1 - - - 5 - 6 - GTK_FILL - - - True @@ -240,56 +198,12 @@ - - - True - False - 2000 MiB - 0 - - - 1 - 2 - 3 - 4 - - - - - - True - False - 4 - 0 - - - 1 - 2 - 4 - 5 - - - - - - True - False - x86_64 - 0 - - - 1 - 2 - 5 - 6 - - - True False - Connection: + Connection URI: + 1 1 @@ -320,11 +234,11 @@ A_utoconnect: True config-autoconnect - 0 + 1 - 6 - 7 + 3 + 4 GTK_FILL @@ -342,8 +256,8 @@ 1 2 - 6 - 7 + 3 + 4 GTK_FILL @@ -368,132 +282,144 @@ - + True False - False - 0 - none + vertical - + True False - 12 + False + 0 + none - + True False - vertical - 3 + 12 - - 75 + True False + vertical + 3 - + + 75 + True + False + + + + + + False + True + 0 + + + + + True + False + 60% + 1 + + + False + True + 1 + - - False - True - 0 - - - - - True - False - 60% - 1 - - - False - True - 1 - + + + True + False + <b>CPU usage</b> + True + + + + True + True + 0 + - - + + True False - <b>CPU usage</b> - True + 0 + none + + + True + False + 12 + + + True + False + vertical + 3 + + + 75 + True + False + + + + + + False + True + 0 + + + + + True + False + 1.59 GiB of 2.2 GiB + 1 + + + False + True + 1 + + + + + + + + + True + False + <b>Memory usage</b> + True + + + + True + True + 1 + True True - 2 - - - - - True - False - 0 - none - - - True - False - 12 - - - True - False - vertical - 3 - - - 75 - True - False - - - - - - False - True - 0 - - - - - True - False - 1.59 GiB of 2.2 GiB - 1 - - - False - True - 1 - - - - - - - - - True - False - <b>Memory usage</b> - True - - - - - True - True - 3 + 1 diff --git a/virtManager/connection.py b/virtManager/connection.py index 7f56e139..dc3b0a7a 100644 --- a/virtManager/connection.py +++ b/virtManager/connection.py @@ -267,9 +267,6 @@ class vmmConnection(vmmGObject): return self._backend.invalidate_caps() caps = property(lambda self: getattr(self, "_backend").caps) - def get_host_info(self): - return self.hostinfo - def pretty_host_memory_size(self): if not self._backend.is_open(): return "" @@ -280,22 +277,11 @@ class vmmConnection(vmmGObject): return 0 return self.hostinfo[1] * 1024 - def host_architecture(self): - if not self._backend.is_open(): - return "" - return self.hostinfo[0] - def host_active_processor_count(self): if not self._backend.is_open(): return 0 return self.hostinfo[2] - def host_maximum_processor_count(self): - if not self._backend.is_open(): - return 0 - return (self.hostinfo[4] * self.hostinfo[5] * - self.hostinfo[6] * self.hostinfo[7]) - def connect(self, name, callback, *args): handle_id = vmmGObject.connect(self, name, callback, *args) diff --git a/virtManager/host.py b/virtManager/host.py index 97763f7a..5d85fee9 100644 --- a/virtManager/host.py +++ b/virtManager/host.py @@ -223,17 +223,11 @@ class vmmHost(vmmGObjectUI): uri = self.conn.get_uri() host = self.conn.get_hostname() drv = self.conn.get_driver() - memory = self.conn.pretty_host_memory_size() - proc = self.conn.host_active_processor_count() - arch = self.conn.host_architecture() auto = self.conn.get_autoconnect() self.widget("overview-uri").set_text(uri) self.widget("overview-hostname").set_text(host) self.widget("overview-hypervisor").set_text(drv) - self.widget("overview-memory").set_text(memory) - self.widget("overview-cpus").set_text(str(proc)) - self.widget("overview-arch").set_text(arch) self.widget("config-autoconnect").set_active(auto) self.cpu_usage_graph = Sparkline()