Revert "Add 'Requested MEM' column (aka prefmem) (#788)"
This reverts commit 227597cf93
.
QubesWatch no longer supports xenstore, so there is no simple way to
get this column updated. This is conscious decision in process of making
R3 Xen-independent.
Conflicts:
qubesmanager/main.py
This commit is contained in:
parent
4875016c81
commit
80b3afdab4
@ -117,7 +117,7 @@
|
|||||||
<number>10</number>
|
<number>10</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="columnCount">
|
<property name="columnCount">
|
||||||
<number>17</number>
|
<number>15</number>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="horizontalHeaderCascadingSectionResizes">
|
<attribute name="horizontalHeaderCascadingSectionResizes">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@ -216,16 +216,6 @@
|
|||||||
<string>Memory usage graph</string>
|
<string>Memory usage graph</string>
|
||||||
</property>
|
</property>
|
||||||
</column>
|
</column>
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Req MEM</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Req MEM Graph</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Size</string>
|
<string>Size</string>
|
||||||
@ -289,8 +279,6 @@
|
|||||||
<addaction name="action_cpu_graph"/>
|
<addaction name="action_cpu_graph"/>
|
||||||
<addaction name="action_mem"/>
|
<addaction name="action_mem"/>
|
||||||
<addaction name="action_mem_graph"/>
|
<addaction name="action_mem_graph"/>
|
||||||
<addaction name="action_prefmem"/>
|
|
||||||
<addaction name="action_prefmem_graph"/>
|
|
||||||
<addaction name="action_size_on_disk"/>
|
<addaction name="action_size_on_disk"/>
|
||||||
<addaction name="action_internal"/>
|
<addaction name="action_internal"/>
|
||||||
<addaction name="action_ip"/>
|
<addaction name="action_ip"/>
|
||||||
@ -889,28 +877,6 @@
|
|||||||
<string>Last backup</string>
|
<string>Last backup</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="action_prefmem">
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Requested MEM</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="action_prefmem_graph">
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Requested MEM Graph</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="resources.qrc"/>
|
<include location="resources.qrc"/>
|
||||||
|
@ -125,7 +125,6 @@ class QubesManagerFileWatcher(ProcessEvent):
|
|||||||
class VmRowInTable(object):
|
class VmRowInTable(object):
|
||||||
cpu_graph_hue = 210
|
cpu_graph_hue = 210
|
||||||
mem_graph_hue = 120
|
mem_graph_hue = 120
|
||||||
prefmem_graph_hue = 70
|
|
||||||
|
|
||||||
def __init__(self, vm, row_no, table, block_manager):
|
def __init__(self, vm, row_no, table, block_manager):
|
||||||
self.vm = vm
|
self.vm = vm
|
||||||
@ -173,28 +172,6 @@ class VmRowInTable(object):
|
|||||||
table.setCellWidget(row_no, VmManagerWindow.columns_indices['MEM Graph'], self.mem_widget)
|
table.setCellWidget(row_no, VmManagerWindow.columns_indices['MEM Graph'], self.mem_widget)
|
||||||
table.setItem(row_no, VmManagerWindow.columns_indices['MEM Graph'], self.mem_widget.tableItem)
|
table.setItem(row_no, VmManagerWindow.columns_indices['MEM Graph'], self.mem_widget.tableItem)
|
||||||
|
|
||||||
self.prefmem_usage_widget = VmUsageBarWidget(0, qubes_host.memory_total/1024, "%v MB",
|
|
||||||
lambda vm, val: vm.last_prefmem/1024, vm, 0,
|
|
||||||
self.prefmem_graph_hue)
|
|
||||||
table.setCellWidget(row_no,
|
|
||||||
VmManagerWindow.columns_indices['Req MEM'],
|
|
||||||
self.prefmem_usage_widget)
|
|
||||||
table.setItem(row_no,
|
|
||||||
VmManagerWindow.columns_indices['Req MEM'],
|
|
||||||
self.prefmem_usage_widget.tableItem)
|
|
||||||
|
|
||||||
self.prefmem_widget = \
|
|
||||||
ChartWidget(vm,
|
|
||||||
lambda vm, val: vm .last_prefmem*100/qubes_host\
|
|
||||||
.memory_total, self.prefmem_graph_hue, 0)
|
|
||||||
table.setCellWidget(row_no,
|
|
||||||
VmManagerWindow.columns_indices['Req MEM Graph'],
|
|
||||||
self.prefmem_widget)
|
|
||||||
table.setItem(row_no,
|
|
||||||
VmManagerWindow.columns_indices['Req MEM Graph'],
|
|
||||||
self.prefmem_widget.tableItem)
|
|
||||||
|
|
||||||
|
|
||||||
self.size_widget = VmSizeOnDiskItem(vm)
|
self.size_widget = VmSizeOnDiskItem(vm)
|
||||||
table.setItem(row_no, VmManagerWindow.columns_indices['Size'], self.size_widget)
|
table.setItem(row_no, VmManagerWindow.columns_indices['Size'], self.size_widget)
|
||||||
|
|
||||||
@ -219,8 +196,6 @@ class VmRowInTable(object):
|
|||||||
self.mem_usage_widget.update_load(self.vm, None)
|
self.mem_usage_widget.update_load(self.vm, None)
|
||||||
self.load_widget.update_load(self.vm, cpu_load)
|
self.load_widget.update_load(self.vm, cpu_load)
|
||||||
self.mem_widget.update_load(self.vm, None)
|
self.mem_widget.update_load(self.vm, None)
|
||||||
self.prefmem_widget.update_load(self.vm, None)
|
|
||||||
self.prefmem_usage_widget.update_load(self.vm, None)
|
|
||||||
if update_size_on_disk == True:
|
if update_size_on_disk == True:
|
||||||
self.size_widget.update()
|
self.size_widget.update()
|
||||||
|
|
||||||
@ -268,13 +243,11 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
|||||||
"CPU Graph": 7,
|
"CPU Graph": 7,
|
||||||
"MEM": 8,
|
"MEM": 8,
|
||||||
"MEM Graph": 9,
|
"MEM Graph": 9,
|
||||||
"Req MEM": 10,
|
"Size": 10,
|
||||||
"Req MEM Graph": 11,
|
"Internal": 11,
|
||||||
"Size": 12,
|
"IP": 12,
|
||||||
"Internal": 13,
|
"Backups": 13,
|
||||||
"IP": 14,
|
"Last backup": 14,
|
||||||
"Backups": 15,
|
|
||||||
"Last backup": 16,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, qvm_collection, blk_manager, parent=None):
|
def __init__(self, qvm_collection, blk_manager, parent=None):
|
||||||
@ -286,11 +259,9 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
|||||||
|
|
||||||
self.qubes_watch = qubesutils.QubesWatch()
|
self.qubes_watch = qubesutils.QubesWatch()
|
||||||
self.qvm_collection = qvm_collection
|
self.qvm_collection = qvm_collection
|
||||||
self.meminfo_changed = {}
|
|
||||||
self.blk_manager = blk_manager
|
self.blk_manager = blk_manager
|
||||||
self.blk_manager.tray_message_func = trayIcon.showMessage
|
self.blk_manager.tray_message_func = trayIcon.showMessage
|
||||||
self.qubes_watch.setup_block_watch(self.blk_manager.block_devs_event)
|
self.qubes_watch.setup_block_watch(self.blk_manager.block_devs_event)
|
||||||
#TODO self.qubes_watch.setup_meminfo_watch(self.meminfo_update_event)
|
|
||||||
self.blk_watch_thread = threading.Thread(target=self.qubes_watch.watch_loop)
|
self.blk_watch_thread = threading.Thread(target=self.qubes_watch.watch_loop)
|
||||||
self.blk_watch_thread.daemon = True
|
self.blk_watch_thread.daemon = True
|
||||||
self.blk_watch_thread.start()
|
self.blk_watch_thread.start()
|
||||||
@ -327,10 +298,6 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
|||||||
self.columns_actions[ self.columns_indices["CPU Graph"] ] = self.action_cpu_graph
|
self.columns_actions[ self.columns_indices["CPU Graph"] ] = self.action_cpu_graph
|
||||||
self.columns_actions[ self.columns_indices["MEM"] ] = self.action_mem
|
self.columns_actions[ self.columns_indices["MEM"] ] = self.action_mem
|
||||||
self.columns_actions[ self.columns_indices["MEM Graph"] ] = self.action_mem_graph
|
self.columns_actions[ self.columns_indices["MEM Graph"] ] = self.action_mem_graph
|
||||||
self.columns_actions[ self.columns_indices["Req MEM"] ] = self\
|
|
||||||
.action_prefmem
|
|
||||||
self.columns_actions[ self.columns_indices["Req MEM Graph"] ] = self\
|
|
||||||
.action_prefmem_graph
|
|
||||||
self.columns_actions[ self.columns_indices["Size"] ] = self.action_size_on_disk
|
self.columns_actions[ self.columns_indices["Size"] ] = self.action_size_on_disk
|
||||||
self.columns_actions[ self.columns_indices["Internal"] ] = self.action_internal
|
self.columns_actions[ self.columns_indices["Internal"] ] = self.action_internal
|
||||||
self.columns_actions[ self.columns_indices["IP"] ] = self\
|
self.columns_actions[ self.columns_indices["IP"] ] = self\
|
||||||
@ -347,8 +314,6 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
|||||||
self.action_cpu_graph.setChecked(False)
|
self.action_cpu_graph.setChecked(False)
|
||||||
self.table.setColumnHidden( self.columns_indices["MEM Graph"], True)
|
self.table.setColumnHidden( self.columns_indices["MEM Graph"], True)
|
||||||
self.action_mem_graph.setChecked(False)
|
self.action_mem_graph.setChecked(False)
|
||||||
self.action_prefmem.setChecked(False)
|
|
||||||
self.action_prefmem_graph.setChecked(False)
|
|
||||||
self.table.setColumnHidden( self.columns_indices["Size"], True)
|
self.table.setColumnHidden( self.columns_indices["Size"], True)
|
||||||
self.action_size_on_disk.setChecked(False)
|
self.action_size_on_disk.setChecked(False)
|
||||||
self.table.setColumnHidden( self.columns_indices["Internal"], True)
|
self.table.setColumnHidden( self.columns_indices["Internal"], True)
|
||||||
@ -557,7 +522,6 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
|||||||
for vm in vms_list:
|
for vm in vms_list:
|
||||||
vm.last_power_state = vm.get_power_state()
|
vm.last_power_state = vm.get_power_state()
|
||||||
vm.last_running = vm.last_power_state in ["Running", "Transient"]
|
vm.last_running = vm.last_power_state in ["Running", "Transient"]
|
||||||
vm.last_prefmem = vm.get_prefmem()
|
|
||||||
if vm.last_running:
|
if vm.last_running:
|
||||||
running_count += 1
|
running_count += 1
|
||||||
if vm.internal:
|
if vm.internal:
|
||||||
@ -627,9 +591,6 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
|||||||
self.table.setRowHidden(row_no, False)
|
self.table.setRowHidden(row_no, False)
|
||||||
row_no += 1
|
row_no += 1
|
||||||
|
|
||||||
def meminfo_update_event(self, domain_id):
|
|
||||||
self.meminfo_changed[int(domain_id)] = True
|
|
||||||
|
|
||||||
def mark_table_for_update(self):
|
def mark_table_for_update(self):
|
||||||
self.reload_table = True
|
self.reload_table = True
|
||||||
|
|
||||||
@ -672,9 +633,6 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
|||||||
"Error starting VM: Cannot execute qrexec-daemon!" \
|
"Error starting VM: Cannot execute qrexec-daemon!" \
|
||||||
and vm.is_qrexec_running():
|
and vm.is_qrexec_running():
|
||||||
self.clear_error(vm.qid)
|
self.clear_error(vm.qid)
|
||||||
if self.meminfo_changed.get(vm.xid, True):
|
|
||||||
vm.last_prefmem = vm.get_prefmem()
|
|
||||||
self.meminfo_changed[vm.xid] = False
|
|
||||||
|
|
||||||
if self.screen_changed == True:
|
if self.screen_changed == True:
|
||||||
reload_table = True
|
reload_table = True
|
||||||
@ -1404,12 +1362,6 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
|||||||
def on_action_mem_graph_toggled(self, checked):
|
def on_action_mem_graph_toggled(self, checked):
|
||||||
self.showhide_column( self.columns_indices['MEM Graph'], checked)
|
self.showhide_column( self.columns_indices['MEM Graph'], checked)
|
||||||
|
|
||||||
def on_action_prefmem_toggled(self, checked):
|
|
||||||
self.showhide_column( self.columns_indices['Req MEM'], checked)
|
|
||||||
|
|
||||||
def on_action_prefmem_graph_toggled(self, checked):
|
|
||||||
self.showhide_column( self.columns_indices['Req MEM Graph'], checked)
|
|
||||||
|
|
||||||
def on_action_size_on_disk_toggled(self, checked):
|
def on_action_size_on_disk_toggled(self, checked):
|
||||||
self.showhide_column( self.columns_indices['Size'], checked)
|
self.showhide_column( self.columns_indices['Size'], checked)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user