dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23045
Fwd: Creation of dashboards based on OU groups and/or user groups
Hi all,
While awaiting the new dashboard functionality in 2.13 (see below), I have
an immediate need for ensuring that new users are not met with blank
dashboards, but rather see something designed for (one of their) user
role(s).
Therefore, I'm experimenting with creating dashboards for dummy "ROLEMODEL"
users and queries like the one below:
INSERT INTO usersetting
SELECT ui.userinfoid, 'dashboardConfig', us.value
FROM userrole ur INNER JOIN userrolemembers urm ON
ur.userroleid=urm.userroleid
INNER JOIN userinfo ui ON urm.userid=ui.userinfoid
INNER JOIN userinfo ui2 ON ur.name=ui2.firstname INNER JOIN usersetting us
ON ui2.userinfoid=us.userinfoid
WHERE ui2.surname='ROLEMODEL'
AND (urm.userid, urm.userroleid) IN
(SELECT DISTINCT ON (userroleid)
userid, userroleid
FROM userrolemembers
WHERE userid IN
(SELECT u.userid
FROM users u LEFT JOIN usersetting us ON u.userid = us.userinfoid
WHERE us.userinfoid IS NULL)
GROUP BY userroleid,userid)
The question would then be how to best have this executed - it could of
course be run manually by the DB admin when necessary, or I could create a
trigger like this:
http://jacobmsaylor.com/?p=837
Any thoughts or suggestions for better ways to do this?
Knut
---------- Forwarded message ----------
From: Knut Staring <knutst@xxxxxxxxx>
Date: Sun, Jun 2, 2013 at 11:33 AM
Subject: Creation of dashboards based on OU groups and/or user groups
To: "dhis2-users@xxxxxxxxxxxxxxxxxxx" <dhis2-users@xxxxxxxxxxxxxxxxxxx>
Since 2.12 is now available in all its glory, one can look towards new
functionality.
There are several blueprints regarding the Dashboard:
https://blueprints.launchpad.net/dhis2?searchtext=dashboard
One issue is automatic filling of dashboards. This could include default
fillings:
https://blueprints.launchpad.net/dhis2/+spec/system-dashboard-elements
Or semi-automatic filling of dashboards upon the creation of a new user
based on some parameters, for example:
1) User Role or User Group
2) User Orgunit (sub-hierarchy)
3) User Orgunit Type or User Orgunit Group
It would also be nice to have multiple, alternative dashboards:
https://blueprints.launchpad.net/dhis2/+spec/named-dashboard
The challenge here is to avoid enormous complexity while offering
administrators a way to make the application seem more welcoming to new
users out of the box.
https://blueprints.launchpad.net/dhis2/+spec/centralized-dashboard-content-control
https://blueprints.launchpad.net/dhis2/+spec/dhis2-dashboard-not-meeting-our-needs
Additionally, we should also be able to add server-side maps to the
dashboard (this includes improving the server-generated map solution)
https://blueprints.launchpad.net/dhis2/+spec/gis-system-mapviews-on-dashboard
https://blueprints.launchpad.net/dhis2/+spec/maps-in-dashboard
--
Knut Staring
Dept. of Informatics, University of Oslo
+4791880522
http://dhis2.org
--
Knut Staring
Dept. of Informatics, University of Oslo
+4791880522
http://dhis2.org