Add shareable dashboard functionality#3551
Conversation
1c1060e to
438483a
Compare
Test results 27 files 27 suites 45m 1s ⏱️ Results for commit d43d895. ♻️ This comment has been updated with latest results. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3551 +/- ##
==========================================
+ Coverage 62.11% 62.21% +0.10%
==========================================
Files 611 611
Lines 44880 44939 +59
Branches 43 43
==========================================
+ Hits 27876 27960 +84
+ Misses 16994 16969 -25
Partials 10 10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
868fce8 to
21864ab
Compare
21864ab to
0c69b79
Compare
0c69b79 to
6549854
Compare
1821850 to
cde7e99
Compare
There was a problem hiding this comment.
Mostly LGTM
Edit: Though, while reviewing dependent PRs, I noticed there is no user feedback when the "Save sharing settings" button is clicked. How do I know the save was successful? If I turn off the web server, there is still no feedback that the request failed.
959b877 to
82fc7f9
Compare
|
@lunkwill42 Added a few fixups with changes:
All PRs have been rebased to match these changes. See #3553 to re-test dashboard access when anonymous. |
lunkwill42
left a comment
There was a problem hiding this comment.
Much nicer now :)
Only a single nitpick so far: Much better feedback about changes taking place when I click the share-button now. But the new "share badge" should also appear when I do this. Now it appears only if I switch to a different dashboard and back again, which is a bit confusing.
4fff2e7 to
d43d895
Compare
|



Scope and purpose
This PR will resolve #2344 when all dependent PRs are merged.
This PR resolves #3554 in itself.
Dependent PRs: #3553, #3557 (see dependency graph)
graph LR; A(#3551: Base PR) B(#3553: Loading and subscription - merged) C(#3557: Dashboard search - merged) D(#3559: Export and import - merged) A-->B; B-->C; B-->D;This PR adds support for sharing dashboards in NAV by modifying the
account_dashboardtable and adds a newaccount_dashboard_subscriptiontable to hold account-dashboard joins.. A dashboard owner can set the dashboard as shared, which in turn will make it visible to other accounts in the follow-up PR.This pull request
is_sharedproperty to the AccountDashboard modelcan_edit(self, account): Used in views to determine if the request account has edit rights.is_subscribed(self, account): Used in views to determine if the request account is subscribed to the dashboard.Screenshots
A new Sharing form has been added to dashboard settings
This form shows a currently unshared dashboard.
Unsharing a dashboard
Contributor Checklist
Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to NAV can be found in the
Hacker's guide to NAV.
<major>.<minor>.x). For a new feature or other additions, it should be based onmaster.