mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
inspection: show OS type in Inspection page
Show also a pretty label for the OS of the guest, in addition to hostname and product name.
This commit is contained in:
parent
f7a726dc70
commit
ebf4ade208
@ -1468,22 +1468,10 @@ if you know what you are doing.</small></property>
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="border_width">3</property>
|
<property name="border_width">3</property>
|
||||||
<property name="n_rows">2</property>
|
<property name="n_rows">3</property>
|
||||||
<property name="n_columns">2</property>
|
<property name="n_columns">2</property>
|
||||||
<property name="column_spacing">6</property>
|
<property name="column_spacing">6</property>
|
||||||
<property name="row_spacing">6</property>
|
<property name="row_spacing">6</property>
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="label71">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">Hostname:</property>
|
|
||||||
<property name="xalign">1</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="x_options">GTK_FILL</property>
|
|
||||||
<property name="y_options">GTK_FILL</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="label72">
|
<object class="GtkLabel" id="label72">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@ -1492,8 +1480,8 @@ if you know what you are doing.</small></property>
|
|||||||
<property name="xalign">1</property>
|
<property name="xalign">1</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="top_attach">1</property>
|
<property name="top_attach">2</property>
|
||||||
<property name="bottom_attach">2</property>
|
<property name="bottom_attach">3</property>
|
||||||
<property name="x_options">GTK_FILL</property>
|
<property name="x_options">GTK_FILL</property>
|
||||||
<property name="y_options">GTK_FILL</property>
|
<property name="y_options">GTK_FILL</property>
|
||||||
</packing>
|
</packing>
|
||||||
@ -1513,6 +1501,30 @@ if you know what you are doing.</small></property>
|
|||||||
<property name="y_options">GTK_FILL</property>
|
<property name="y_options">GTK_FILL</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="label71">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Hostname:</property>
|
||||||
|
<property name="xalign">1</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="x_options">GTK_FILL</property>
|
||||||
|
<property name="y_options">GTK_FILL</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Operating system:</property>
|
||||||
|
<property name="xalign">1</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="bottom_attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="inspection-product-name">
|
<object class="GtkLabel" id="inspection-product-name">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@ -1524,12 +1536,26 @@ if you know what you are doing.</small></property>
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="right_attach">2</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="top_attach">1</property>
|
<property name="top_attach">2</property>
|
||||||
<property name="bottom_attach">2</property>
|
<property name="bottom_attach">3</property>
|
||||||
<property name="x_options">GTK_FILL</property>
|
<property name="x_options">GTK_FILL</property>
|
||||||
<property name="y_options">GTK_FILL</property>
|
<property name="y_options">GTK_FILL</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="inspection-type">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">foo</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="bottom_attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
@ -5906,8 +5932,8 @@ if you know what you are doing.</small></property>
|
|||||||
<property name="label" translatable="yes">_Save this password in your keyring</property>
|
<property name="label" translatable="yes">_Save this password in your keyring</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="tooltip_text" translatable="yes">Check to save password, uncheck to forget password.</property>
|
|
||||||
<property name="receives_default">False</property>
|
<property name="receives_default">False</property>
|
||||||
|
<property name="tooltip_text" translatable="yes">Check to save password, uncheck to forget password.</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<property name="draw_indicator">True</property>
|
<property name="draw_indicator">True</property>
|
||||||
|
@ -310,6 +310,23 @@ def _warn_cpu_thread_topo(threads, cpu_model):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def _label_for_os_type(os_type):
|
||||||
|
typemap = {
|
||||||
|
"dos": _("MS-DOS/FreeDOS"),
|
||||||
|
"freebsd": _("FreeBSD"),
|
||||||
|
"hurd": _("GNU/Hurd"),
|
||||||
|
"linux": _("Linux"),
|
||||||
|
"minix": _("MINIX"),
|
||||||
|
"netbsd": _("NetBSD"),
|
||||||
|
"openbsd": _("OpenBSD"),
|
||||||
|
"windows": _("Microsoft Windows"),
|
||||||
|
}
|
||||||
|
try:
|
||||||
|
return typemap[os_type]
|
||||||
|
except KeyError:
|
||||||
|
return _("unknown")
|
||||||
|
|
||||||
|
|
||||||
class vmmDetails(vmmGObjectUI):
|
class vmmDetails(vmmGObjectUI):
|
||||||
__gsignals__ = {
|
__gsignals__ = {
|
||||||
"action-save-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
|
"action-save-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]),
|
||||||
@ -2379,6 +2396,10 @@ class vmmDetails(vmmGObjectUI):
|
|||||||
if not hostname:
|
if not hostname:
|
||||||
hostname = _("unknown")
|
hostname = _("unknown")
|
||||||
self.widget("inspection-hostname").set_text(hostname)
|
self.widget("inspection-hostname").set_text(hostname)
|
||||||
|
os_type = self.vm.inspection.os_type
|
||||||
|
if not os_type:
|
||||||
|
os_type = "unknown"
|
||||||
|
self.widget("inspection-type").set_text(_label_for_os_type(os_type))
|
||||||
product_name = self.vm.inspection.product_name
|
product_name = self.vm.inspection.product_name
|
||||||
if not product_name:
|
if not product_name:
|
||||||
product_name = _("unknown")
|
product_name = _("unknown")
|
||||||
|
Loading…
Reference in New Issue
Block a user