Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Commander
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
INS Courses
AutPy
Commander
Commits
22f634cc
Commit
22f634cc
authored
3 years ago
by
Florian Bruhin
Browse files
Options
Downloads
Patches
Plain Diff
Fix test selector crash
Fixes
#12
parent
833de6c7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
commander/gui/overview.py
+7
-5
7 additions, 5 deletions
commander/gui/overview.py
with
7 additions
and
5 deletions
commander/gui/overview.py
+
7
−
5
View file @
22f634cc
...
...
@@ -15,9 +15,11 @@ from traitlets.config.application import TRAITLETS_APPLICATION_RAISE_CONFIG_FILE
from
commander.gui
import
utils
NodeIdRole
=
Qt
.
ItemDataRole
.
UserRole
class
OverviewModel
(
QAbstractTableModel
):
NodeIdRole
=
Qt
.
ItemDataRole
.
UserRole
COLUMNS
=
[
"
nodeid
"
,
"
tag
"
,
"
when
"
,
"
outcome
"
,
"
message
"
]
node_ids_loaded
=
pyqtSignal
(
list
)
tag_mapping_loaded
=
pyqtSignal
(
dict
)
...
...
@@ -76,7 +78,7 @@ class OverviewModel(QAbstractTableModel):
if
key
==
'
nodeid
'
and
role
==
Qt
.
ItemDataRole
.
DisplayRole
:
return
self
.
_data_nodeid
(
report
,
short
=
True
)
elif
key
==
'
nodeid
'
and
role
==
self
.
NodeIdRole
:
elif
key
==
'
nodeid
'
and
role
==
NodeIdRole
:
return
self
.
_data_nodeid
(
report
,
short
=
False
)
elif
key
==
'
tag
'
and
role
==
Qt
.
ItemDataRole
.
DisplayRole
:
return
self
.
_data_tag
(
report
)
...
...
@@ -211,7 +213,7 @@ class OverviewView(QTableView):
index
.
parent
(),
)
nodeid
=
self
.
_filter_model
.
data
(
nodeid_index
,
self
.
overview_model
.
NodeIdRole
)
nodeid
=
self
.
_filter_model
.
data
(
nodeid_index
,
NodeIdRole
)
assert
nodeid
self
.
test_activated
.
emit
(
nodeid
)
...
...
@@ -231,8 +233,8 @@ class OverviewView(QTableView):
def
on_test_changed
(
self
,
name
:
str
)
->
None
:
idx
=
self
.
overview_model
.
find_by_short_nodeid
(
name
)
self
.
selectRow
(
idx
.
row
())
node_id
=
self
.
_filter
_model
.
data
(
idx
,
self
.
_filter_model
.
NodeIdRole
)
assert
no
t
e_id
node_id
=
self
.
overview
_model
.
data
(
idx
,
NodeIdRole
)
assert
no
d
e_id
self
.
test_activated
.
emit
(
node_id
)
self
.
setFocus
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment