Merge remote-tracking branch 'origin/pr/192'
* origin/pr/192: Added virt mode column to Qube Manager
This commit is contained in:
commit
6107a1fcbf
@ -71,7 +71,7 @@ class SearchBox(QtWidgets.QLineEdit):
|
||||
|
||||
|
||||
class VmRowInTable:
|
||||
# pylint: disable=too-few-public-methods
|
||||
# pylint: disable=too-few-public-methods,too-many-instance-attributes
|
||||
def __init__(self, vm, row_no, table):
|
||||
self.vm = vm
|
||||
|
||||
@ -143,6 +143,10 @@ class VmRowInTable:
|
||||
row_no, VmManagerWindow.columns_indices['Is DVM Template'],
|
||||
self.is_dispvm_template_widget)
|
||||
|
||||
self.virt_mode_widget = table_widgets.VMPropertyItem(vm, 'virt_mode')
|
||||
table.setItem(row_no, VmManagerWindow.columns_indices[
|
||||
'Virtualization Mode'], self.virt_mode_widget)
|
||||
|
||||
self.table = table
|
||||
|
||||
def update(self, update_size_on_disk=False, event=None):
|
||||
@ -174,6 +178,8 @@ class VmRowInTable:
|
||||
self.dvm_template_widget.update()
|
||||
if not event or event.endswith(':template_for_dispvms'):
|
||||
self.is_dispvm_template_widget.update()
|
||||
if not event or event.endswith(':virt_mode'):
|
||||
self.virt_mode_widget.update()
|
||||
if update_size_on_disk:
|
||||
self.size_widget.update()
|
||||
except exc.QubesPropertyAccessError:
|
||||
@ -346,7 +352,9 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtWidgets.QMainWindow):
|
||||
"Include in backups": 9,
|
||||
"Last backup": 10,
|
||||
"Default DispVM": 11,
|
||||
"Is DVM Template": 12}
|
||||
"Is DVM Template": 12,
|
||||
"Virtualization Mode": 13
|
||||
}
|
||||
|
||||
def __init__(self, qt_app, qubes_app, dispatcher, parent=None):
|
||||
# pylint: disable=unused-argument
|
||||
@ -389,7 +397,9 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtWidgets.QMainWindow):
|
||||
self.columns_indices["Include in backups"]: self.action_backups,
|
||||
self.columns_indices["Last backup"]: self.action_last_backup,
|
||||
self.columns_indices["Default DispVM"]: self.action_dispvm_template,
|
||||
self.columns_indices["Is DVM Template"]: self.action_is_dvm_template
|
||||
self.columns_indices["Is DVM Template"]:
|
||||
self.action_is_dvm_template,
|
||||
self.columns_indices["Virtualization Mode"]: self.action_virt_mode
|
||||
}
|
||||
|
||||
self.visible_columns_count = len(self.columns_indices)
|
||||
@ -1212,6 +1222,10 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtWidgets.QMainWindow):
|
||||
def on_action_size_on_disk_toggled(self, checked):
|
||||
self.showhide_column(self.columns_indices['Size'], checked)
|
||||
|
||||
def on_action_virt_mode_toggled(self, checked):
|
||||
self.showhide_column(self.columns_indices['Virtualization Mode'],
|
||||
checked)
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
def on_action_dispvm_template_toggled(self, checked):
|
||||
self.showhide_column(self.columns_indices['Default DispVM'], checked)
|
||||
|
@ -136,7 +136,7 @@
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>13</number>
|
||||
<number>14</number>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderCascadingSectionResizes">
|
||||
<bool>false</bool>
|
||||
@ -248,6 +248,11 @@ Template</string>
|
||||
Template</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Virtualization Mode</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -291,6 +296,7 @@ Template</string>
|
||||
<addaction name="action_last_backup"/>
|
||||
<addaction name="action_dispvm_template"/>
|
||||
<addaction name="action_is_dvm_template"/>
|
||||
<addaction name="action_virt_mode"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="action_toolbar"/>
|
||||
<addaction name="action_menubar"/>
|
||||
@ -873,6 +879,17 @@ Template</string>
|
||||
<string><html><head/><body><p>DisposableVM Template</p><p><br/></p><p>Allows using this qube as a template for DisposableVMs. The DisposableVMs will inherit the VM's state (configuration, installed programs etc.), but their state will not persist between restarts. </p></body></html></string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_virt_mode">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Virtualization Mode</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../resources.qrc"/>
|
||||
|
Loading…
Reference in New Issue
Block a user