Skip to content

Conversation

@pheus
Copy link
Contributor

@pheus pheus commented Sep 5, 2025

Fixes: #19547

Summary

Adds a Sync button to the Data Sources list view so a sync can be triggered directly from the table (no need to open the detail page).

Details

  • Introduces a per‑row Sync action in the list view.
  • Visibility/enabled state respects user permissions and current job status.
  • Reuses the existing sync mechanism/queue; no new API surface.

UX

  • Button sits alongside existing row actions.
  • Disabled while a sync is pending or running.

Notes

Open to feedback on approach.

@pheus pheus force-pushed the 19547-add-sync-button-to-data-source-list-view branch from 8d32ec1 to 3b4894c Compare September 5, 2025 13:12
@jeremystretch jeremystretch requested review from a team and jeremystretch and removed request for a team September 5, 2025 13:15
Introduces a sync button in the DataSource table for improved user
interaction. Enables users to trigger sync actions directly from the
table, with context-sensitive availability based on permissions and
record status.

Closes netbox-community#19547
@pheus pheus force-pushed the 19547-add-sync-button-to-data-source-list-view branch from 3b4894c to 29ba9cb Compare September 6, 2025 08:55
_("Queued job #{id} to sync {datasource}").format(id=job.pk, datasource=datasource)
)
return redirect(datasource.get_absolute_url())
return redirect(self.get_return_url(request, datasource))

Check warning

Code scanning / CodeQL

URL redirection from remote source Medium

Untrusted URL redirection depends on a
user-provided value
.
@pheus
Copy link
Contributor Author

pheus commented Sep 6, 2025

Thank you for taking the time to review this PR. I appreciate the thoughtful feedback and attention to detail.

@pheus pheus requested a review from jeremystretch September 6, 2025 09:09
@jeremystretch jeremystretch merged commit 099f3b2 into netbox-community:main Sep 8, 2025
7 checks passed
@pheus pheus deleted the 19547-add-sync-button-to-data-source-list-view branch September 8, 2025 14:10
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add 'Sync' button to DataSource Listview

2 participants