Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
atdb-ldv
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ASTRON SDC
atdb-ldv
Commits
b942d3da
Commit
b942d3da
authored
2 years ago
by
Nico Vermaas
Browse files
Options
Downloads
Patches
Plain Diff
also add plot images to quality page
parent
2d1d0b28
No related branches found
No related tags found
1 merge request
!291
Sdc 935 better plots
Pipeline
#47745
failed
2 years ago
Stage: build
Stage: deploy_to_test
Stage: deploy_to_production
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
atdb/taskdatabase/services/algorithms.py
+8
-4
8 additions, 4 deletions
atdb/taskdatabase/services/algorithms.py
with
9 additions
and
4 deletions
.gitignore
+
1
−
0
View file @
b942d3da
/atdb/logs/
/atdb/logs/
R:\source\django\atdb-ldv\atdb\logs\atdb.log
\ No newline at end of file
This diff is collapsed.
Click to expand it.
atdb/taskdatabase/services/algorithms.py
+
8
−
4
View file @
b942d3da
...
@@ -711,7 +711,12 @@ def construct_inspectionplots(task,source='task_id'):
...
@@ -711,7 +711,12 @@ def construct_inspectionplots(task,source='task_id'):
results
+=
'
<tr><td><a href=
"'
+
url
+
'"
target=
"
_blank
"
>
'
+
basename
+
'
</a></td></tr>
'
results
+=
'
<tr><td><a href=
"'
+
url
+
'"
target=
"
_blank
"
>
'
+
basename
+
'
</a></td></tr>
'
if
basename
.
endswith
(
'
png
'
):
if
basename
.
endswith
(
'
png
'
):
results
+=
'
<tr><td><a href=
"'
+
url
+
'"
target=
"
_blank
"
><img width=
"
800
"
src=
"'
+
url
+
'"
alt=
"'
+
basename
+
'"
/></a></td></tr>
'
# retrieve the url and add the binary data to the html
response
=
requests
.
get
(
url
)
content_as_string
=
base64
.
b64encode
(
response
.
content
).
decode
(
"
utf-8
"
)
img_html
=
'
<img width=
"
800
"
src =
"
data:image/png;base64,
'
+
content_as_string
+
'"
>
'
results
+=
'
<tr><td><a href=
"'
+
url
+
'"
alt=
"'
+
basename
+
'"
target=
"
_blank
"
>
'
+
img_html
+
'
</a></td></tr>
'
#results += '<tr><td><a href="' + url + '" target="_blank"><img width="800" src="' + url + '" alt="' + basename + '"/></a></td></tr>'
plot_files
.
append
(
basename
)
plot_files
.
append
(
basename
)
...
@@ -749,14 +754,13 @@ def construct_inspectionplots(task,source='task_id'):
...
@@ -749,14 +754,13 @@ def construct_inspectionplots(task,source='task_id'):
results
+=
'
<tr><td><a href=
"'
+
url
+
'"
target=
"
_blank
"
>
'
+
basename
+
'
</a></td></tr>
'
results
+=
'
<tr><td><a href=
"'
+
url
+
'"
target=
"
_blank
"
>
'
+
basename
+
'
</a></td></tr>
'
if
basename
.
endswith
(
'
png
'
):
if
basename
.
endswith
(
'
png
'
):
# retrieve and evaluate the url first
# retrieve the url and add the binary data to the html
#logger.info('retrieve '+url)
response
=
requests
.
get
(
url
)
response
=
requests
.
get
(
url
)
content_as_string
=
base64
.
b64encode
(
response
.
content
).
decode
(
"
utf-8
"
)
content_as_string
=
base64
.
b64encode
(
response
.
content
).
decode
(
"
utf-8
"
)
img_html
=
'
<img width=
"
800
"
src =
"
data:image/png;base64,
'
+
content_as_string
+
'"
>
'
img_html
=
'
<img width=
"
800
"
src =
"
data:image/png;base64,
'
+
content_as_string
+
'"
>
'
# results += '<tr><td><a href="' + url + '" target="_blank"><img width="800" src="' + url + '" alt="'+basename+'"/></a></td></tr>'
# results += '<tr><td><a href="' + url + '" target="_blank"><img width="800" src="' + url + '" alt="'+basename+'"/></a></td></tr>'
results
+=
'
<tr><td><a href=
"'
+
url
+
'"
target=
"
_blank
"
>
'
+
img_html
+
'
</a></td></tr>
'
results
+=
'
<tr><td><a href=
"'
+
url
+
'"
alt=
"'
+
basename
+
'"
target=
"
_blank
"
>
'
+
img_html
+
'
</a></td></tr>
'
plot_files
.
append
(
plot_file
)
plot_files
.
append
(
plot_file
)
...
...
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