Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Please see Dashboard configuration for basic information about configuration variables.


Administrator needs display all roles with number of members.


As first we need configure object collection for all roles.

Object collection
<objectCollection oid="72b1f98e-f587-4b9f-b92b-72e251dbb255">
    <name>All roles</name>

When we have object collection, then import Dashboard object with widget for our object collection.

<dashboard oid="72b1f98e-f587-4b9f-b92b-72e251da2345">
        <label>Role dashboard</label>
            <label>Number of roles</label>
                <cssClass>fe fe-role_icon</cssClass>
                <collectionRef oid="72b1f98e-f587-4b9f-b92b-72e251dbb255" type="ObjectCollectionType"/>
                                import com.evolveum.midpoint.prism.query.*
                                import com.evolveum.midpoint.xml.ns._public.common.common_3.*
                                query = prismContext.queryFor(UserType.class).item(AssignmentHolderType.F_ROLE_MEMBERSHIP_REF).ref(object.getOid()).build();
                                objects = midpoint.searchObjects(UserType.class, query)
                                return objects.size();

After successful import of dashboard object and reload of page you can see dashboard in menu DashboardsRole dashboard.

We want report with table of roles, so we import dashboard report. 

    <name>Roles dashboard report</name>
        <dashboardRef oid="72b1f98e-f587-4b9f-b92b-72e251da2345" type="DashboardType"/>

Now we can run report in report menu, show task, and download report. Every report from dashboard is in HTML format. 


  • No labels