Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Apr 19, 2024
2 parents 5fc81a2 + c6b0af9 commit 2f0144c
Show file tree
Hide file tree
Showing 19 changed files with 170 additions and 117 deletions.
69 changes: 53 additions & 16 deletions docs/admin-gui/dashboards/configuration/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
midpoint-feature: dashboard
doc-type: config
---

= Dashboard Configuration
:page-nav-title: Configuration
:page-wiki-name: Dashboard configuration
Expand All @@ -12,6 +13,9 @@ doc-type: config
:page-wiki-metadata-modify-date: 2020-12-10T12:36:51.667+01:00
:page-since: "4.2"
:page-toc: top
:page-keywords: [ 'dashboard', 'dashboards', 'configuration' ]
:search-alias: "advanced report"
:page-upkeep-status: green

Documentation about dashboards can be found at multiple places in docs. To avoid confusion, please see

Expand Down Expand Up @@ -338,13 +342,16 @@ This entry contains stat value, together with domain value.
|===

// TODO no example, add ??
// ===== `view`
//
// Last variable of presentation is `view`, this variable is processed for report, and we will look on it below.
//
===== View

Last variable of the presentation container is `view`, this variable is also processed in case we create reports.
The main reason to configure a view would be the customization of the reported or presented object collection on which we based the dashboard widget.
The widget object collection can be accessed via the IU *"More info"* button.

Example of `presentation`:

.*Example of `presentation`*:
[%collapsible]
====
[source,xml]
----
<widget>
Expand Down Expand Up @@ -379,13 +386,17 @@ Example of `presentation`:
</presentation>
</widget>
----
====

=== Object Collection

You can see basic configuration for objectCollection on xref:/midpoint/reference/admin-gui/collections-views/configuration/#object-collection[Object Collection].
For dashboard, we can use policyRule with policyTreshold to define some policySituation.
Example of object collection for resource, which have status set to "UP":

.*Example Object Collection*
[%collapsible]
====
[source,xml]
----
<objectCollection xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
Expand Down Expand Up @@ -422,6 +433,7 @@ Example of object collection for resource, which have status set to "UP":
</domain>
</objectCollection>
----
====

Variable _domain_ is a set of object that represents "all the objects" used in this collection.
For example collection of "up resources" will have a domain of "all resources".
Expand All @@ -443,7 +455,9 @@ Now we show very simple example for widget of enabled users, that show only numb

As first, we create an object collection with filter for users with value `enabled` in attribute activation/effectiveStatus.

//TODO midPoint query
[%collapsible]
.*Example Object Collection*
====
[source,xml]
----
<objectCollection oid="00000000-0000-0000-0001-000000147896">
Expand All @@ -457,8 +471,13 @@ As first, we create an object collection with filter for users with value `enabl
</filter>
</objectCollection>
----
====

And next we create dashboard with one widget for enabled users.

[%collapsible]
.*Example Dashboard Configuration*
====
[source,xml]
----
<dashboard oid="f89709f9-7313-494f-a600-69ea75d95106">
Expand Down Expand Up @@ -500,6 +519,7 @@ And next we create dashboard with one widget for enabled users.
</widget>
</dashboard>
----
====

Don't forget to add the new dashboard to admin gui in system configuration. After accessing the new dashboard in GUI you can see our new widget.

Expand All @@ -510,11 +530,15 @@ image::enabled-users.png[]
To configure an asynchronous widget we have to use the `displaySourceType` attribute in the widget configuration and set it as `widgetData`.
We set `sourceType` as `objectCollection` because of the redirects to a details page in case of clicking on the widget details.

Also, we need to configure a dashboard report task, which will store data for the widget.
Also, we need to configure a dashboard report task, which will generate and store data into the widget.
For this we use a dashboard report with the element `storeExportedWidgetData`.

For example, we will use the same case as in the previous example for enabled users.
We create same object collection.
We create the same object collection.

[%collapsible]
.*Example Object Collection*
====
[source,xml]
----
<objectCollection oid="00000000-0000-0000-0001-000000147896">
Expand All @@ -528,7 +552,13 @@ We create same object collection.
</filter>
</objectCollection>
----
Next, we have to create a dashboard with. We also need to add the attribute `displaySourceType` with value `widgetData`.
====

Next, we have to create a dashboard. We also need to add the attribute `displaySourceType` with value `widgetData`.

[%collapsible]
.*Example Dashboard Configuration*
====
[source,xml]
----
<dashboard oid="f89709f9-7313-494f-a600-69ea75d95106">
Expand Down Expand Up @@ -571,8 +601,13 @@ Next, we have to create a dashboard with. We also need to add the attribute `dis
</widget>
</dashboard>
----
====

Finally, we create a report for dashboard.

[%collapsible]
.*Example Report Configuration*
====
[source,xml]
----
<report>
Expand All @@ -587,19 +622,21 @@ Finally, we create a report for dashboard.
</dashboard>
</report>
----
====

Now we can run the report and midPoint processes the source data for the dashboard. The resulting data is written to the widget in dashboard.
Next time you open the widget in the GUI midPoint doesn't process the source data, it only shows `savedData` from xml.
Now we can run the report and midPoint processes the source data for the dashboard. The resulting data is written to the widget in the dashboard.
Next time you open the widget in the GUI, midPoint doesn't need to process the source data, it shows the saved data present in the object xml.

image::enabled-users.png[]

== View
== Dashboard views

When we create new dashboard, then we can see it in midpoint gui.
A dashboard can provide additional info when someone clicks on the *"More info"* button, in this case if we use an "objectCollection" as data "sourceType" we will get tale of objects representing the collection.
The table can be configured and customized. This is done via the "view" container.
Next screenshot is from the example dashboard link:https://github.com/Evolveum/midpoint-samples/tree/master/samples/dashboard[dashboard-system-status].

image::dashboard-screenshot.png[]

'''

For whole sample please see link:https://github.com/Evolveum/midpoint-samples/tree/master/samples/dashboard[dashboard-system-status].
* xref:/midpoint/referece/admin-gui/dashboards/index.adoc[Dashboards]
* xref:/midpoint/guides/dashboards-howto/[Dashboards How To]
* xref:/midpoint/reference/misc/reports/configuration/dashboard-report.adoc[Dashboard Report]
2 changes: 2 additions & 0 deletions docs/interfaces/midpoint-client-java/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
:page-wiki-metadata-modify-user: semancik
:page-wiki-metadata-modify-date: 2020-04-20T12:43:12.719+02:00
:page-alias: { "parent" : "/midpoint/devel/" }
:page-keywords: [ 'rest', 'client' ]
:search-alias: "client"
:page-upkeep-status: yellow
:page-toc: top

Expand Down
27 changes: 14 additions & 13 deletions docs/misc/reports/configuration/collection-report.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
:page-keywords: [ 'report', 'collection' ,'collections' ]
:page-upkeep-status: green

== Description

== Collection Report

Collection reports generate reports based on Object collection configuration.
Expand Down Expand Up @@ -51,16 +49,16 @@ Use wisely, performance might suffer.

=== Objects to be Reported

Objects to be reported for object collection based reports are defined using `collection` configuration property.
Objects to be reported for object collection based reports are defined using the `collection` configuration property.
There are three possibilities how the `collection` can be defined:

* using reference to the existing collection,
* writing filter directly in collection attribute without reference to base collection,
* combination of previous two options, and so writing filter directly in collection attribute and using reference to existing collection.
* directly configuring the collection attribute without a reference to a base collection,
* combination of previous two options, and so writing filter directly in ghd collection attribute and using reference to existing collection.

Following are the examples for what the collection definition might look like:
Following are examples for how the collection definition might look like:

**.Object collection ** report with object collection *reference*.
.**Object collection ** report with object collection *reference*.
[source,xml]
----
<report>
Expand Down Expand Up @@ -95,7 +93,7 @@ If a `collection` contains a reference to an existing collection and a custom fi
MidPoint makes the conjunction of the filters.
Let's have an example where the first filter says that we want to see users with membership in Organization Evolveum.
The second filter is for users with a role "End user".
As the result we will see users that have memberships in organization Evolveum and role 'End user' at the same time.
As the result we will see users that have the memberships in organization Evolveum and role 'End user' at the same time.

image::collection-query.png[]

Expand All @@ -117,7 +115,7 @@ Of course when we want to use only view in report it is possible by attribute `u

The configuration of columns can be skipped when the report deals with audit records or any midPoint focal object (such as `UserType`, `RoleType`, `ServiceType`,...).
If no custom columns are defined for the report, midPoint will use a default (system defined) view for specific types of objects.
However, then the report is defined for containers, the columns definition cannot be omitted.
However, when the report is defined for containers, the columns definition cannot be omitted.

The following variables are available in column expressions:

Expand All @@ -135,7 +133,7 @@ If sub-reports are used to multiply rows (see below), this object contains the s
If no `path` was specified for the column, it has the same value as `object` variable.

| `report`
| xref:/midpoint/reference/misc/reports/report-functions/[Report Script Library]
| xref:/midpoint/reference/misc/reports/configuration/report-functions.adoc/[Report Script Library]
provides functions supporting report processing.

| `basic`
Expand Down Expand Up @@ -175,13 +173,17 @@ Rather, we want to have one report definition and run the report with different
Imagine that you need to report all users who have an account on specific resources.
In such a case, _resource_ will be a parameter for the report, so we don't need to prepare a new report definition for each resource.
The _resource_ parameter will be set before the report is run.
The parameter is set in the "Report configuration before run" modal window when you "Run" the report from the UI.
In the modal window you can see the parameters in the "search" section.

Usage of the parameter is very simple.
We just use the name of the parameter in expression of query.

If the _Report configuration before run_ attribute in an expression is set to "filterAll", the outcome is that if the parameter is not set all values are returned as valid.

image::collection-parameters.png[]

.Object collection report with parameter
.*Object Collection Report with Parameter*
[source,xml]
----
<report xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
Expand Down Expand Up @@ -275,7 +277,7 @@ Please see the example below.

image::collection-subreport.png[]

In the example above, we have the report, where for each shadow (row) we want to search for the owner of the shadow.
In the example above we have the report where for each shadow (row) we want to search for the owner of the shadow.
Therefore, the sub-report is defined with the expression to look for the shadow owner.
The result of the expression is stored to the property called `user` and later used in the column expression to pull the desired information.
In this case, we need to get the e-mail address of the user.
Expand Down Expand Up @@ -568,7 +570,6 @@ image::collection-example.png[]

- xref:/midpoint/reference/misc/reports/examples/[Report Examples]
- xref:/midpoint/reference/misc/reports/configuration/[Report Configuration]
- xref:/midpoint/reference/misc/reports/configuration/collection-report.adoc[Collection Based Reports]
- xref:/midpoint/reference/misc/reports/configuration/dashboard-report.adoc[Dashboard Based Reports]
- xref:/midpoint/reference/misc/reports/configuration/report-security.adoc[Report Security]
- xref:/midpoint/reference/misc/reports/configuration/report-task-definition.adoc[Report Task Definition]
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/misc/reports/configuration/dashboard-example.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 16 additions & 9 deletions docs/misc/reports/configuration/dashboard-report.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
:page-keywords: [ 'report', 'collection' ,'collections' ]
:page-upkeep-status: green

== Description

=== Dashboard Report
== Dashboard Report

The dashboard engine generates reports based on a xref:/midpoint/reference/admin-gui/dashboards/[Dashboard object].
A dashboard consists out of objects which we call widgets.
Expand Down Expand Up @@ -38,18 +36,19 @@ The _view_ (configuration of columns present in the report) can be defined at a

image::dashboard-view.png[75%]

For example in our picture, in the first line under screenshot, you can see the views for types `ResourceType`, `AuditEventRecordType` and `TaskType`.
For example in our picture, in the first line under the screenshot, you can see the views for types `ResourceType`, `AuditEventRecordType` and `TaskType`.

The final view of the widget in a dashboard report is merged from the three levels of definitions for the view.
The view configuration in a report for the type of object, view in a dashboard for widget and from view in a object collection which contains configuration for a widget.

The view configuration in a report for the type of object, view in a dashboard for widget and from view in an object collection which contains configuration for a widget.
Columns from views are merged in the same way as in a Collection report.
Also, we can use attribute `useOnlyReportView` for using only views defined by report.

When we don't use the _view_ parameters, the report will contain default columns.
In an expression for a column you can use the variable 'object' which represent the searched object or object defined in the _path_ property.
For more information about view configuration please see xref:/midpoint/reference/admin-gui/collections-views/configuration/#views[Views].

.Example of view for RoleType
.*Example of View for RoleType*
[source,xml]
----
<presentation>
Expand Down Expand Up @@ -88,7 +87,7 @@ return objects.size();
</presentation>
----

.Example of view in Report
.*Example of View in Report*
[source,xml]
----
<report>
Expand Down Expand Up @@ -119,7 +118,7 @@ return objects.size();
</report>
----

==== Report for an Asynchronous Widget
=== Report for an Asynchronous Widget

A Dashboard report has two kinds of output.
The most common case is to generate an output file with reported data.
Expand All @@ -146,10 +145,18 @@ Configuration of Dashboard report contains attribute _storeExportedWidgetData_,

|===

==== Example of Generated Report
=== Example of Generated Report

On the screenshot, we can see an example of a generated report of a Dashboard report in the HTML format.
On the top, we can see the table of widgets with name, message and status.
Under the table of widgets, the report continues with one table for every widget.

image::dashboard-example.png[75%]

== See Also

- xref:/midpoint/reference/misc/reports/examples/[Report Examples]
- xref:/midpoint/reference/misc/reports/configuration/[Report Configuration]
- xref:/midpoint/reference/misc/reports/configuration/collection-report.adoc[Collection Based Reports]
- xref:/midpoint/reference/misc/reports/configuration/report-security.adoc[Report Security]
- xref:/midpoint/reference/misc/reports/configuration/report-task-definition.adoc[Report Task Definition]

0 comments on commit 2f0144c

Please sign in to comment.