host: Use libvirtobject.run_status

Fixes uitest coverage when the host doesn't have any inactive
non-domain objects

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2021-05-22 16:17:02 -04:00
parent bed31a6a27
commit fe7f4db6e7
2 changed files with 2 additions and 4 deletions

View File

@ -246,9 +246,8 @@ class vmmHostNets(vmmGObjectUI):
uiutil.set_grid_row_visible(self.widget("net-name-domain"),
bool(net.get_name_domain()))
state = active and _("Active") or _("Inactive")
icon = (active and ICON_RUNNING or ICON_SHUTOFF)
self.widget("net-state").set_text(state)
self.widget("net-state").set_text(net.run_status())
self.widget("net-state-icon").set_from_icon_name(icon,
Gtk.IconSize.BUTTON)

View File

@ -320,8 +320,7 @@ class vmmHostStorage(vmmGObjectUI):
self.widget("pool-state-icon").set_from_icon_name(
((active and ICON_RUNNING) or ICON_SHUTOFF),
Gtk.IconSize.BUTTON)
self.widget("pool-state").set_text(
(active and _("Active")) or _("Inactive"))
self.widget("pool-state").set_text(pool.run_status())
self.widget("pool-autostart").set_label(_("On Boot"))
self.widget("pool-autostart").set_active(auto)