Skip to content
GitLab
Explore
Sign in
Register
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ASTRON SDC
atdb-ldv
Commits
4c2d04c5
Commit
4c2d04c5
authored
Nov 25, 2022
by
Nico Vermaas
Browse files
Options
Downloads
Patches
Plain Diff
validation per sas_id instead of per task
parent
2e37eeb4
Branches
Branches containing commit
No related tags found
1 merge request
!265
SDC 791 validation per SAS_ID
Pipeline
#40143
passed
Nov 25, 2022
Stage: build
Stage: deploy_to_test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
atdb/taskdatabase/urls.py
+0
-1
0 additions, 1 deletion
atdb/taskdatabase/urls.py
atdb/taskdatabase/views.py
+12
-12
12 additions, 12 deletions
atdb/taskdatabase/views.py
with
12 additions
and
13 deletions
atdb/taskdatabase/urls.py
+
0
−
1
View file @
4c2d04c5
...
@@ -95,7 +95,6 @@ urlpatterns = [
...
@@ -95,7 +95,6 @@ urlpatterns = [
path
(
'
tasks/<int:pk>/change_priority/<priority_change>/<page>
'
,
views
.
ChangePriority
,
name
=
'
task-change-priority
'
),
path
(
'
tasks/<int:pk>/change_priority/<priority_change>/<page>
'
,
views
.
ChangePriority
,
name
=
'
task-change-priority
'
),
path
(
'
tasks/<int:pk>/change_priority/<priority_change>
'
,
views
.
ChangePriority
,
name
=
'
task-change-priority
'
),
path
(
'
tasks/<int:pk>/change_priority/<priority_change>
'
,
views
.
ChangePriority
,
name
=
'
task-change-priority
'
),
path
(
'
tasks/sort-tasks/<sort>/<redirect_to_page>
'
,
views
.
SortTasks
,
name
=
'
sort-tasks
'
),
path
(
'
tasks/sort-tasks/<sort>/<redirect_to_page>
'
,
views
.
SortTasks
,
name
=
'
sort-tasks
'
),
path
(
'
tasks/set_filter/<filter>/<redirect_to_page>
'
,
views
.
TaskSetFilter
,
name
=
'
task-set-filter
'
),
path
(
'
tasks/set_filter/<filter>/<redirect_to_page>
'
,
views
.
TaskSetFilter
,
name
=
'
task-set-filter
'
),
path
(
'
tasks/set_active_filter/<redirect_to_page>
'
,
views
.
TaskSetActiveFilter
,
name
=
'
task-set-active-filter
'
),
path
(
'
tasks/set_active_filter/<redirect_to_page>
'
,
views
.
TaskSetActiveFilter
,
name
=
'
task-set-active-filter
'
),
path
(
'
tasks/task-set-onhold-filter/<onhold>/<redirect_to_page>
'
,
views
.
TaskSetOnHoldFilter
,
name
=
'
task-set-onhold-filter
'
),
path
(
'
tasks/task-set-onhold-filter/<onhold>/<redirect_to_page>
'
,
views
.
TaskSetOnHoldFilter
,
name
=
'
task-set-onhold-filter
'
),
...
...
This diff is collapsed.
Click to expand it.
atdb/taskdatabase/views.py
+
12
−
12
View file @
4c2d04c5
...
@@ -337,9 +337,8 @@ class ShowValidationPage(ListView):
...
@@ -337,9 +337,8 @@ class ShowValidationPage(ListView):
def
get_queryset
(
self
):
def
get_queryset
(
self
):
stored_tasks
=
Task
.
objects
.
filter
(
status__icontains
=
'
stored
'
).
order_by
(
"
sas_id
"
)
stored_tasks
=
Task
.
objects
.
filter
(
status__icontains
=
'
stored
'
)
tasks
=
stored_tasks
.
distinct
(
"
sas_id
"
)
tasks
=
get_filtered_tasks
(
self
.
request
,
stored_tasks
,
"
sas_id
"
)
#tasks = get_filtered_tasks(self.request, stored_tasks)
# exclude the failed tasks
# exclude the failed tasks
tasks
=
tasks
.
exclude
(
status__icontains
=
"
failed
"
)
tasks
=
tasks
.
exclude
(
status__icontains
=
"
failed
"
)
...
@@ -407,8 +406,8 @@ class ShowFailuresPage(ListView):
...
@@ -407,8 +406,8 @@ class ShowFailuresPage(ListView):
# this provides a broad range of filters for the search_box in the GUI
# this provides a broad range of filters for the search_box in the GUI
def
get_filtered_tasks
(
request
,
pre_filtered_tasks
=
None
):
def
get_filtered_tasks
(
request
,
pre_filtered_tasks
=
None
,
distinct
=
None
):
filtered_tasks
=
[]
filtered_tasks_as_list
=
None
filtered_tasks_as_list
=
None
try
:
try
:
...
@@ -468,15 +467,15 @@ def get_filtered_tasks(request, pre_filtered_tasks=None):
...
@@ -468,15 +467,15 @@ def get_filtered_tasks(request, pre_filtered_tasks=None):
else
:
else
:
request
.
session
[
'
filtered
'
]
=
True
request
.
session
[
'
filtered
'
]
=
True
if
distinct
:
# this does not seem to work, the distinct tasks are not sorted.
my_sorted_tasks
=
filtered_tasks
.
order_by
(
distinct
,
my_sort
)
my_sorted_tasks
=
my_sorted_tasks
.
distinct
(
distinct
)
return
my_sorted_tasks
else
:
return
filtered_tasks
.
order_by
(
my_sort
)
return
filtered_tasks
.
order_by
(
my_sort
)
# class TaskTables2View(SingleTableView):
# model = Task
# table_class = TaskTable
# template_name = 'taskdatabase/query/query.html'
def
TaskDetails
(
request
,
id
=
0
,
page
=
0
):
def
TaskDetails
(
request
,
id
=
0
,
page
=
0
):
try
:
try
:
task
=
Task
.
objects
.
get
(
id
=
id
)
task
=
Task
.
objects
.
get
(
id
=
id
)
...
@@ -1064,6 +1063,7 @@ def ChangePriority(request, pk, priority_change, page=0):
...
@@ -1064,6 +1063,7 @@ def ChangePriority(request, pk, priority_change, page=0):
def
SortTasks
(
request
,
sort
,
redirect_to_page
):
def
SortTasks
(
request
,
sort
,
redirect_to_page
):
# store the sort field on the session
# store the sort field on the session
request
.
session
[
'
sort
'
]
=
sort
request
.
session
[
'
sort
'
]
=
sort
if
redirect_to_page
==
'
atdb
'
:
if
redirect_to_page
==
'
atdb
'
:
return
redirect
(
'
index
'
)
return
redirect
(
'
index
'
)
...
...
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