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
3e6088bb
Commit
3e6088bb
authored
3 years ago
by
Florian Bruhin
Browse files
Options
Downloads
Patches
Plain Diff
Fix getting multiple celltags
parent
33616699
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
+10
-4
10 additions, 4 deletions
commander/gui/overview.py
with
10 additions
and
4 deletions
commander/gui/overview.py
+
10
−
4
View file @
3e6088bb
...
...
@@ -100,9 +100,12 @@ class OverviewModel(QAbstractTableModel):
if
'
celltag
'
not
in
props
:
return
None
celltag
=
props
[
'
celltag
'
]
if
isinstance
(
celltag
,
list
):
# running multiple tags
return
celltag
[
0
]
return
celltag
return
self
.
_flatten_celltags
(
celltag
)
def
_flatten_celltags
(
self
,
tags
:
str
|
list
[
str
])
->
str
:
if
isinstance
(
tags
,
list
):
return
tags
[
0
]
return
tags
def
_load_tag_mapping
(
self
,
reports
:
list
[
dict
[
str
,
Any
]])
->
None
:
self
.
_nodeid_to_tag
=
{
...
...
@@ -112,7 +115,10 @@ class OverviewModel(QAbstractTableModel):
with
utils
.
TAG_MAPPING_FILE
.
open
(
'
r
'
)
as
f
:
from_json
=
json
.
load
(
f
)
self
.
_nodeid_to_tag
.
update
(
from_json
)
self
.
_nodeid_to_tag
.
update
({
k
:
self
.
_flatten_celltags
(
v
)
for
k
,
v
in
from_json
.
items
()
})
self
.
tag_mapping_loaded
.
emit
(
self
.
_nodeid_to_tag
)
...
...
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