Skip to content

Commit

Permalink
Include current_step in API, add changelog entry #300
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Druez <tdruez@nexb.com>
  • Loading branch information
tdruez committed Nov 7, 2022
1 parent e50ca4a commit 0f3d0c5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ v31.1.0 (unreleased)
- Generate CycloneDX SBOM (Software Bill of Materials) as a new downloadable output.
https://github.com/nexB/scancode.io/issues/389

- Display the current active step of a running pipeline in the "Pipeline" section of
the project details view, inside the run status tag.
https://github.com/nexB/scancode.io/issues/300

- Refine the fields ordering in API Serializers based on the toolkit order.
https://github.com/nexB/scancode.io/issues/546

Expand Down
1 change: 1 addition & 0 deletions scanpipe/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class Meta:
"url",
"pipeline_name",
"status",
"current_step",
"description",
"project",
"uuid",
Expand Down
2 changes: 2 additions & 0 deletions scanpipe/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ def test_scanpipe_views_run_status_view(self):
self.assertContains(response, expected)
self.assertContains(response, f'hx-get="{url}?current_status={run.status}"')

run.current_step = "1/2 Step A"
run.set_task_started(run.pk)
run.refresh_from_db()
response = self.client.get(url)
Expand All @@ -404,6 +405,7 @@ def test_scanpipe_views_run_status_view(self):
f'hx-get="{url}?current_status={run.status}&display_current_step=True"'
)
self.assertContains(response, expected)
self.assertContains(response, '1/2 Step A')

run.set_task_ended(exitcode=1)
response = self.client.get(url)
Expand Down

0 comments on commit 0f3d0c5

Please # to comment.