Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Add Core filter to Log tab #37

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion fah/ClientConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def update_queue_ui(self, app):
for values in sorted(self.queue, lambda x, y: cmp(x['id'], y['id'])):
unit_id = values['unit']
queue_id = values['id']
core = values['core'][2:]
status = values['state'].title()
color = status_to_color(status)
status = get_span_markup(status, color)
Expand All @@ -174,7 +175,7 @@ def update_queue_ui(self, app):

prcg = self.get_prcg(values)
iter = app.queue_list.append([unit_id, queue_id, status, color,
progress, percent, eta, credit, prcg])
progress, percent, eta, credit, prcg, core])

if queue_id == selected: selected_row = iter
if queue_id == log_filter_selected: log_filter_row = iter
Expand All @@ -187,6 +188,7 @@ def update_queue_ui(self, app):
# Restore selections
app.queue_tree.get_selection().select_iter(selected_row)
app.log_unit.set_active_iter(log_filter_row)
app.log_core.set_active_iter(log_filter_row)


def update_work_unit_info(self, app):
Expand Down Expand Up @@ -484,6 +486,11 @@ def log_filter_str(self, app):
id = get_active_combo_column(app.log_slot, 0)
f.append(r'FS%s' % id)

# Core
if app.log_core_enable.get_active():
id = get_active_combo_column(app.log_core, 9)
f.append(r'0x%s' % id)

if len(f):
f = map(lambda x: '.*(^|:)%s' % x, f)
return '(^\*)|(%s):' % ''.join(f)
Expand Down
53 changes: 52 additions & 1 deletion fah/FAHControl.glade
Original file line number Diff line number Diff line change
Expand Up @@ -4776,6 +4776,8 @@ Some of these options may require manually restarting the client to take effect.
<column type="gchararray"/>
<!-- column-name PRCG -->
<column type="gchararray"/>
<!-- column-name core -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkDialog" id="slot_dialog">
Expand Down Expand Up @@ -7629,6 +7631,55 @@ Folding slots can be one of three types, Uniprocessor, SMP or GPU. Representing
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox18">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkCheckButton" id="log_core_enable">
<property name="label" translatable="yes">Core:</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_update_log" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="log_core">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="model">queue_list</property>
<property name="column_span_column">0</property>
<property name="button_sensitivity">on</property>
<signal name="changed" handler="on_update_log" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="cellrenderertext14"/>
<attributes>
<attribute name="text">9</attribute>
</attributes>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="log_severity">
<property name="label" translatable="yes">Warnings &amp; Errors</property>
Expand All @@ -7642,7 +7693,7 @@ Folding slots can be one of three types, Uniprocessor, SMP or GPU. Representing
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
<property name="position">3</property>
</packing>
</child>
</object>
Expand Down
2 changes: 2 additions & 0 deletions fah/FAHControl.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,8 @@ def __init__(self, glade = 'FAHControl.glade'):
self.log_slot = builder.get_object('log_slot')
self.log_unit_enable = builder.get_object('log_unit_enable')
self.log_unit = builder.get_object('log_unit')
self.log_core_enable = builder.get_object('log_core_enable')
self.log_core = builder.get_object('log_core')
self.log_follow = builder.get_object('log_follow')

# Widget maps
Expand Down