Creating a Dashboard Widget Using App Platform

Hey Pete! Unfortunately the platform still doesn’t exactly support that (without some hacks*)

What we’re working on now though is making a more flexible plugin system using the App Platform, and then loading those plugins in dashboard items via iframes – the existing Data Visualizer, Maps, and Line Listing items on the dashboard are already using that system. When it comes to using custom plugins in the dashboard though, we’re not quite there yet, but here’s an issue to track the progress: [DHIS2-17283] - Jira

We already have some tools in the Platform to make and consume plugins, but they’re pretty new, so the documentation is limited, and the API isn’t yet guaranteed to be stable. BUT, if you’re curious about them, you can check out this page about a component that can be used in an app hosting a plugin. The examples at the bottom of the page may be especially illustrative – notice the entrypoints.plugin property in d2.config.js, and how that gets built with a plugin.html file in the app build


*Those hacks would be 1) removing the header bar, and 2) adding appType: "DASHBOARD_WIDGET" to the manifest.webapp file that’s generated for apps; but I think we’re moving away from supporting this

5 Likes