Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboards per site #18467

Draft
wants to merge 7 commits into
base: 4.x-dev
Choose a base branch
from
Draft

Conversation

tomper00
Copy link

@tomper00 tomper00 commented Dec 8, 2021

Description:

This branch adds the feature to make Dashboards connected to specific idSites.
This is important especially if we work with plugins like Custom reports where reports are bound to specific idSites so if we add a custom report to a Dashboard it will generate errors to the users on all other sites.

I added support for All sites (0) in the db and logic but there is not yes a GUI for users to manage this (we will always set. the siteId of the site you are currently viewing when you create a new dashboard.

Note: This still needs more testing I have created the DB updates but these are not tested yet for instance.

I would really need some help testing this.

Copy link
Member

@sgiehl sgiehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tomper00. Thanks for creating the PR. I had a very rough look through the code and left some comments. Might have some more time tomorrow to look into that in order to test that a bit maybe.

plugins/Dashboard/Model.php Outdated Show resolved Hide resolved
plugins/Dashboard/API.php Outdated Show resolved Hide resolved
plugins/Dashboard/API.php Outdated Show resolved Hide resolved
/**
* Update for version 1.0.8-beta.
*/
class Updates_4_7_0 extends PiwikUpdates
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have the name of the next possible beta release. Currently that would be 4.7.0-b2 and in order to have the script applied when someone fetches your changes you might also need to change the version in core\Version.php

@tsteur
Copy link
Member

tsteur commented Dec 9, 2021

@tomper00 great. That will be very useful indeed. From a product perspective, when creating or copying a dashboard, it would be great to be able to select whether a dashboard should be available for all sites, or only the given site (later we could maybe allow to select it to share it with multiple sites). From what I see this PR would otherwise change all the dashboards to be per site? There is for some dashboards/use cases also value in having dashboards across sites.

Change functions to use parameters instead of request vars
@tomper00
Copy link
Author

tomper00 commented Dec 10, 2021

Ok I started to change the code according to you suggestions @sgiehl, still some testing to be done locally though - Thanks for this, very appreciated!

@tsteur Yes there is a bit of thinking needed to be done around the full functionality for sure so perhaps this should be part of a bigger feature update rather than just a small improvement.

Here are some examples of things we discussed recently that would make dashboards more powerful:

  • Make it possible to add custom content to a dashboard (Texts and perhaps images to better describe what you see).
  • Add an admin view for all Dashboards (so that its easier to help users and see all their dashboards)
  • Make it possible to have Shared dashboards with users instead of a lot of copies to make sure changes are replicated properly

@sgiehl
Copy link
Member

sgiehl commented Dec 14, 2021

@tomper00 Thanks for the additional suggestions:

Make it possible to add custom content to a dashboard (Texts and perhaps images to better describe what you see).

This should actually be something that could easily be implemented in a third party plugin. I don't think that is something we plan to integrate into core currently.

Add an admin view for all Dashboards (so that its easier to help users and see all their dashboards)

This could also be done in an custom plugin, but might be something that could be interesting for core as well.

Make it possible to have Shared dashboards with users instead of a lot of copies to make sure changes are replicated properly

Nice idea. Guess this won't be easily implemented in a custom plugin, unless we extend the Dashboard API a lot.
Btw. how shall shared dashboards behave?

  • Can it only be edited by an owner or can everyone it was shared with edit the dashboard (or should that be configurable)
  • Can someone remove a share of a dashboard again (either the owner or the user it was shared with)
  • I guess it would somehow need to be visible, that a dashboard is currently shared, and maybe also whom it was shared with.

@github-actions
Copy link
Contributor

If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'.

@github-actions github-actions bot added the Stale The label used by the Close Stale Issues action label Dec 29, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2022

This PR was last updated more than one month ago, maybe it's time to close it. Please check if there is anything we still can do or close this PR. ping @matomo-org/core-reviewers

@github-actions github-actions bot added the Stale for long The label used by the Close Stale Issues action label Feb 9, 2022
@michalkleiner michalkleiner marked this pull request as draft April 9, 2024 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale for long The label used by the Close Stale Issues action Stale The label used by the Close Stale Issues action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants