Enable dbus service to display either performance or config tabs in domain details page
This commit is contained in:
parent
47a25d2ee9
commit
b28f7c65e1
|
@ -740,7 +740,7 @@ Inactive virtual machines</property>
|
|||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkNotebook" id="notebook2">
|
||||
<widget class="GtkNotebook" id="details-pages">
|
||||
<property name="border_width">3</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
|
|
|
@ -126,6 +126,12 @@ class vmmDetails(gobject.GObject):
|
|||
dialog.show_all()
|
||||
dialog.present()
|
||||
|
||||
def activate_performance_page(self):
|
||||
self.window.get_widget("details-pages").set_current_page(0)
|
||||
|
||||
def activate_config_page(self):
|
||||
self.window.get_widget("details-pages").set_current_page(1)
|
||||
|
||||
def close(self,ignore1=None,ignore2=None):
|
||||
self.window.get_widget("vmm-details").hide()
|
||||
return 1
|
||||
|
|
|
@ -149,6 +149,14 @@ class vmmEngine:
|
|||
self.connections[uri]["windowConsole"][uuid] = console
|
||||
self.connections[uri]["windowConsole"][uuid].show()
|
||||
|
||||
def show_details_performance(self, uri, uuid):
|
||||
win = self.show_details(uri, uuid)
|
||||
win.activate_performance_page()
|
||||
|
||||
def show_details_config(self, uri, uuid):
|
||||
win = self.show_details(uri, uuid)
|
||||
win.activate_config_page()
|
||||
|
||||
def show_details(self, uri, uuid):
|
||||
con = self.get_connection(uri)
|
||||
|
||||
|
@ -158,6 +166,7 @@ class vmmEngine:
|
|||
details.connect("action-show-console", self._do_show_console)
|
||||
self.connections[uri]["windowDetails"][uuid] = details
|
||||
self.connections[uri]["windowDetails"][uuid].show()
|
||||
return self.connections[uri]["windowDetails"][uuid]
|
||||
|
||||
def show_manager(self, uri):
|
||||
con = self.get_connection(uri)
|
||||
|
|
|
@ -32,11 +32,11 @@ class vmmRemote(dbus.service.Object):
|
|||
|
||||
@dbus.service.method("com.redhat.virt.manager", in_signature="ss")
|
||||
def show_domain_editor(self, uri, uuid):
|
||||
self.engine.show_details(uri, uuid)
|
||||
self.engine.show_details_config(uri, uuid)
|
||||
|
||||
@dbus.service.method("com.redhat.virt.manager", in_signature="ss")
|
||||
def show_domain_performance(self, uri, uuid):
|
||||
self.engine.show_details(uri, uuid)
|
||||
self.engine.show_details_performance(uri, uuid)
|
||||
|
||||
@dbus.service.method("com.redhat.virt.manager", in_signature="ss")
|
||||
def show_domain_console(self, uri, uuid):
|
||||
|
|
Loading…
Reference in New Issue