-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
New Dashboard API to return list of all configured dashboard for a given user #3913
Comments
Attachment: |
Attached the code. Kept it simple... Would make sense to extract some things to a Dashboard_Layout class but didn't want to refactor too much. |
Nice improvements! Review:
should be last (because it's possible that the call to removeDisabledPluginFromLayout() will remove all widgets from existing layout, in which case we'd rather display default layout than empty.
Do you want/need to get this in 1.12 or can we wait for 2.0 beta? It looks OK to be included in 1.12 so up to you. |
thx! Will change some things and send pull request. You're right regarding Would be good to have it in 1.12 if possible. If we release an alpha version of Piwik Mobile 2 in a few weeks users can already see the dashboard feature. In the beginning I will only display widgets in Piwik Mobile that are reports/metadata. Later I want to implement similar widgets for mobile app. And even later users should be able to write their own widgets :) Will send a pull request once done. |
@matt I need API method "getDashboards", not "getUserDashboards" :) I want to display the default dashboard in Piwik Mobile if a user hasn't created his own dashboard to be consistent with Piwik. |
Thomas please reopen if anything is left on this for 1.12. Nice work! |
I need an API to get configured dashboards for Piwik Mobile 2.
It's already implemented and will attach a diff soon. I'm not sure if I broke something because there are no tests. I think I've also fixed some issues in
getAllDashboards
. Just do a quick review please and I will send a pull request then. The diff will add three API methodsgetDashboards
,getUserDashboards
andgetDefaultDashboard
.Structure will look like this (one entry per dashboard).
The structure is simple because I don't need more yet but we can still extend it later and add for example things like
"layout": "33-33-33"
The text was updated successfully, but these errors were encountered: