Skip to content

Commit

Permalink
[cuegui] fix job monitor filter behavior (#1139)
Browse files Browse the repository at this point in the history
* cuegui: job monitor fix call to undefined member

Signed-off-by: Oblet Alexis <[email protected]>

* cuegui: job monitor fix datetime python import

Signed-off-by: Oblet Alexis <[email protected]>

* cuegui: monitor job search - allow regex when searching

Signed-off-by: Oblet Alexis <[email protected]>

* cuegui: monitor jobs search - remove items before each search

Signed-off-by: Oblet Alexis <[email protected]>

* cuegui: monitor job - save loadFinished plugin settings

Signed-off-by: Oblet Alexis <[email protected]>

Co-authored-by: Diego Tavares da Silva <[email protected]>
  • Loading branch information
aoblet and DiegoTavares authored Jul 8, 2022
1 parent 132569b commit 3f974d2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion cuegui/cuegui/JobMonitorTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ def addJob(self, job, timestamp=None, loading_from_config=False):
for j in self.__reverseDependents:
if j in self.__load:
del self.__load[j]

finally:
self.ticksLock.unlock()

Expand Down
11 changes: 8 additions & 3 deletions cuegui/cuegui/plugins/MonitorJobsPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

from builtins import str
from builtins import map
from datetime import datetime
import datetime
import re
import weakref

Expand Down Expand Up @@ -89,9 +89,12 @@ def __init__(self, parent):
("columnWidths",
self.jobMonitor.getColumnWidths,
self.jobMonitor.setColumnWidths),
("columnOrder",
("columnOrder",
self.jobMonitor.getColumnOrder,
self.jobMonitor.setColumnOrder),
("loadFinished",
self.__loadFinishedJobsCheckBox.isChecked,
self.__loadFinishedJobsCheckBox.setChecked),
("grpDependentCb",
self.getGrpDependent,
self.setGrpDependent),
Expand Down Expand Up @@ -194,13 +197,15 @@ def _regexLoadJobsHandle(self):
substring = str(self.__regexLoadJobsEditBox.text()).strip()
load_finished_jobs = self.__loadFinishedJobsCheckBox.isChecked()

self.jobMonitor.removeAllItems()

if cuegui.Utils.isStringId(substring):
# If a uuid is provided, load it
self.jobMonitor.addJob(substring)
elif load_finished_jobs or re.search(
r"^([a-z0-9_]+)\-([a-z0-9\.]+)\-", substring, re.IGNORECASE):
# If show and shot is provided, or if "load finished" checkbox is checked, load all jobs
for job in opencue.api.getJobs(substr=[substring], include_finished=True):
for job in opencue.api.getJobs(regex=[substring], include_finished=True):
self.jobMonitor.addJob(job)
else:
# Otherwise, just load current matching jobs (except for the empty string)
Expand Down

0 comments on commit 3f974d2

Please sign in to comment.