Configure Life Report widgets - SysAdmin
The Live report widget displays reports on data that are based on a live query. The query conforms with the censhare JSON data model. An optional transformation can provide a toolbar or formats and transforms the data output to the template.
Context
The Live report widget can be used on any asset page and in any context. censhare provides preconfigured transformations. For example, the Quality checks report on the properties and assigned media assets in products that generates a checklist and completion bar.
Prerequisites
Familiarity with XSLT in and the censhare JSON data model.
Introduction
Based on a live query, the Live report widget displays asset data on an asset page. The data retrieved from the query can be processed in a separate transformation. The data output is configured in an HTML template. The data can be retrieved from the censhare JSON data model.
Optionally, you can add a Toolbar transformation to provide interactive elements such as filters, selectors or preview options. Template, query, transformation, and toolbar transformation work together and must be configured accordingly:
The Template generates the HTML output of the widget. If no query and/or transformation is defined, the template can display static data. The asset type is module.dialog., the resource usage is censhare:live-report-query.
The Query (optional) is written in XML or XSLT. The result must be a valid censhare query. The asset type is module.search. The resource usage is censhare:live-report-query.
The Transformation (optional) provides a data model for the template. You can use the transformation to manipulate the data from the query. The asset type is module.transformation. The resource usage is censhare:live-report-transformation. The results of the transformation must be formatted as follows:
<result> ... </result>
Note: For live queries, always use a separate query and transformation. If the query is included in the transformation, the widget works like a Report widget without a live query.
The Toolbar transformation (optional) creates controls that allow users to filter, select, or change the displayed data. The asset type is module.transformation. The resource usage is censhare:toolbar-transformation. For more information, see Create toolbar transformations.
Configuration overview
Configure the widget in your personal workspace - Place and configure the Live report widget on an asset and carry out the configuration there. This configuration is only applied to your personal workspace.
Create a widget configuration with XML - Add a configuration to an XML workspace template and assign the template to a role.
Configure the Live report widget in your personal workspace
To add the widget to an asset page, switch to the developer mode in your censhare account. For more information, see The developer mode in censhare Web.
Open the asset where you want to place the Live report widget.
Select the tab on which you want to place the widget. If you need to add a new tab, open the page actions menu and select Manage tabs. For more information, see Tabs in censhare Web.
In the page actions menu, select Add widget type
In the Add widget dialog, select Live report widget. and click OK.
In the widget, click and select Configure widget.
In the Generic configuration area, define how the widget and list items in the widget are displayed on the asset page. For more information, see Generic Widget Configuration.
In the Live report area, configure the data shown in the widget. For more information, see the Live report section below.
To save your changes to your personal workspace and close the dialog, click OK.
Live report
In this section, you configure the report transformation and an optional toolbar transformation:
Field | Mandatory | Description |
Template | yes | Select a template from the list that creates an HTML output from the queried data. The template must be stored in a Dialog asset and the usage set to Live report template. |
Query | no | Select a query from the list that is executed when you open the asset page and retrieves the data displayed in the widget. The query is configured in an XSL stylesheet. The stylesheet must be stored in a Search asset and the usage set to Live report query. |
Transformation | no | Optionally, select a transformation to manipulate the queried data. The transformation uses XSL and must be stored in a Transformation asset and the usage set to Live report transformation. |
Toolbar transformation | no | Optionally, select a toolbar. For more information, see Create toolbar transformations. |
Allow manual refresh | no | Activate the checkbox to generate a icon in the widget header. If a user clicks on it, censhare refreshes the data shown in the widget. |
Workspace XML configuration
As a system administrator, you can create widget configurations and add them to the XML file of a workspace template. Fore more information see Customize with XML files - SysAdmin.
The following code snippet shows the configuration schema:
<widget kind="csLiveReportWidget">
<configuration xmlns:censhare="http://www.censhare.com/xml/3.0.0/censhare">
<templateKey censhare:_annotation.datatype="string">[TEMPLATE.RESOURCE.KEY]</templateKey>
<queryKey censhare:_annotation.datatype="string">[QUERY.RESOURCE.KEY]</queryKey>
<transformationKey censhare:_annotation.datatype="string">[TRANSFORMATION.RESOURCE.KEY]</transformationKey>
<toolbarTransformationKey censhare:_annotation.datatype="string">[TOOLBAR.TRANSFORMATION.RESOURCE.KEY]</toolbarTransformationKey>
<refresh censhare:_annotation.datatype="boolean">[TRUE|FALSE]</refresh>
</configuration>
</widget>
Remarks
Element / attribute | Mandatory | Description |
<widget/> | yes | References the widget this configuration is based on. For attributes and elements that can be added here, see Generic widget configuration - SysAdmin. |
kind | yes | Select "csLiveReportWidget". |
<configuration/> | yes | Contains the configuration of the widget. |
<templateKey/> | yes | Selects the template for the HTML output. |
<queryKey/> | no | Selects the query to retrieve the desired data. |
<transformationKey/> | no | Selects the transformation to be shown in the widget. |
<toolbarTransformationKey/> | no | Select an optional toolbar to be shown in the widget header. |
<refresh/> | no | When set to "true", allows users to refresh the displayed data manually. |