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
de6a45a0
Commit
de6a45a0
authored
4 years ago
by
Nico Vermaas
Browse files
Options
Downloads
Patches
Plain Diff
bonus link in dashboard
parent
51593f98
No related branches found
No related tags found
3 merge requests
!74
Acceptance
,
!73
Master
,
!61
bonus link in dashboard
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
atdb/taskdatabase/services/algorithms.py
+15
-4
15 additions, 4 deletions
atdb/taskdatabase/services/algorithms.py
atdb/taskdatabase/templates/taskdatabase/index.html
+1
-1
1 addition, 1 deletion
atdb/taskdatabase/templates/taskdatabase/index.html
with
16 additions
and
5 deletions
atdb/taskdatabase/services/algorithms.py
+
15
−
4
View file @
de6a45a0
...
...
@@ -126,7 +126,7 @@ def aggregate_resources_logs():
# aggregate logentries per step for all active statusses
for
status
in
settings
.
ACTIVE_STATUSSES
:
record
=
{}
record
[
'
name
'
]
=
workflow
.
workflow_uri
record
[
'
name
'
]
=
str
(
workflow
.
id
)
+
'
-
'
+
workflow
.
workflow_uri
record
[
'
status
'
]
=
status
# aggregate logentries per step for all active statusses (expensive)
...
...
@@ -198,6 +198,18 @@ def aggregate_resources_tasks():
return
workflow_results
def
construct_link
(
request
,
status
,
workflow_id
,
count
):
link
=
str
(
count
)
try
:
query
=
"
?status=
"
+
status
+
"
&workflow=
"
+
str
(
workflow_id
)
url
=
request
.
build_absolute_uri
(
'
/atdb/tasks
'
)
+
query
if
not
"
http
"
in
url
:
url
=
"
https://
"
+
url
link
=
'
<a href=
"'
+
url
+
'"
target=
"
_blank
"
>
'
+
str
(
count
)
+
"
</a>
"
except
:
pass
return
link
def
convert_aggregation_to_html
(
request
):
# --- Progress of tasks per active workflow ---
...
...
@@ -221,9 +233,8 @@ def convert_aggregation_to_html(request):
style
=
"
active
"
# bonus: add a query link
query
=
"
?status=
"
+
key
+
"
&workflow=
"
+
str
(
workflow_result
[
'
id
'
])
url
=
request
.
build_absolute_uri
(
'
/atdb/tasks
'
)
+
query
link
=
'
<a href=
"'
+
url
+
'"
target=
"
_blank
"
>
'
+
str
(
d
[
key
])
+
"
</a>
"
link
=
construct_link
(
request
,
key
,
workflow_result
[
'
id
'
],
d
[
key
])
values
+=
"
<td class=
"
+
style
+
"
>
"
+
str
(
percentage
)
+
"
% (
"
+
link
+
"
)</td>
"
#values += "<td class="+style+">" + str(percentage) + "% ("+str(d[key])+")</td>"
#values += "<td>" + str(d[key]) + "</td>"
...
...
This diff is collapsed.
Click to expand it.
atdb/taskdatabase/templates/taskdatabase/index.html
+
1
−
1
View file @
de6a45a0
...
...
@@ -80,7 +80,7 @@
{% include 'taskdatabase/pagination.html' %}
</div>
</div>
<p
class=
"footer"
>
Version 1.0.0 (12 mar 2021 - 1
5
:00)
<p
class=
"footer"
>
Version 1.0.0 (12 mar 2021 - 1
7
:00)
</div>
...
...
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