Skip to content

Add csrf token to forms on main page#3387

Merged
johannaengland merged 1 commit intoUninett:masterfrom
johannaengland:refactor/csrf-navlets
Jul 29, 2025
Merged

Add csrf token to forms on main page#3387
johannaengland merged 1 commit intoUninett:masterfrom
johannaengland:refactor/csrf-navlets

Conversation

@johannaengland
Copy link
Copy Markdown
Contributor

@johannaengland johannaengland commented Jun 13, 2025

Contributes to https://github.com/Uninett/campus-tasks/issues/45.

Where to find the forms (ordered by commit):

Add widget form: Main page, click on "+" in sidebar and see form around every "Add" button

Import dashboard form: Main page, click on "+" in dashboard list and see form around "Import dashboard" link

Rename dashboard form: Main page, click on cog icon in sidebar and see form around input field and "Rename dashboard" button

Set default dashboard form: Main page, add/select a dashboard that is not default, click on cog icon in sidebar and see form around "Set as default dashboard" button

Delete dashboard form: Main page, add/select a dashboard that is not default, click on cog icon in sidebar and see form around "Delete dashboard" button

Add dashboard form: Main page, click on "+" in dashboard list and see form around input field and "Add dashboard" button

Widget report edit form: Main page, click on "+" in sidebar, add "Report" widget, go to edit

Feed reader edit form: Main page, click on "+" in sidebar, add "FeedReader" widget, go to edit

Machine tracker form: Main page, click on "+" in sidebar, add "Machine Tracker" widget

Vlan graph form: Main page, click on "+" in sidebar, add "Vlan Graph" widget

Sensor edit form: http://localhost/ipdevinfo/sensor/2360, click on "Add to dashboard", go to main page, go to edit (not working currently, bugfix: #3394)

Environment rack edit form: Main page, click on "+" in sidebar, add "Environment rack" widget, go to edit

PDU edit form: Main page, click on "+" in sidebar, add "PDU load" widget, go to edit

Room/location status edit form: Main page, click on "+" in sidebar, add "Rooms with active alerts"/"Locations with active alerts" widget, go to edit

UPS edit form: Main page, click on "+" in sidebar, add "UPS status" widget, go to edit

Status edit form: Main page, click on "+" in sidebar, add "Status" widget, go to edit

I feel like the last 6 commits or so could be replaced by using flat_form, but I didn't get the reverse url with navlet_id to work...

@johannaengland johannaengland requested a review from a team June 13, 2025 08:41
@johannaengland johannaengland self-assigned this Jun 13, 2025
@johannaengland johannaengland added refactor nonews No news fragment is necessary for this PR (e.g. refactoring, cleanups, workflow/development changes) labels Jun 13, 2025
@johannaengland johannaengland force-pushed the refactor/csrf-navlets branch 3 times, most recently from ad5e5c9 to ddc529f Compare June 18, 2025 08:55
@sonarqubecloud
Copy link
Copy Markdown

@johannaengland johannaengland force-pushed the refactor/csrf-navlets branch from ddc529f to e457f3c Compare July 29, 2025 13:16
@sonarqubecloud
Copy link
Copy Markdown

@johannaengland johannaengland merged commit 03da229 into Uninett:master Jul 29, 2025
13 checks passed
@johannaengland johannaengland deleted the refactor/csrf-navlets branch July 29, 2025 13:24
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (027432d) to head (e457f3c).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@      Coverage Diff       @@
##   master   #3387   +/-   ##
==============================
==============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nonews No news fragment is necessary for this PR (e.g. refactoring, cleanups, workflow/development changes) refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants