Méthode Swing has a powerful Dashboard system, which allows users to specify their own set of widgets according to their role. The dashboard is extendable by adding custom widgets.
Dashboard structure
The Dashboard is the first screen you see when you log in to Méthode Swing. It can be configured to display many different boxes, called Widgets, depending on your role. Each dashboard is divided in 1 to 3 columns, which can host one or more widgets. The dashboard is responsive in both width and height (depending on the selected widgets).
Dashboard configuration
The dashboard can be configured as separated file SwingDashboards.xml outside Swing configuration file and it follows exactly the same level configuration rules of the WebClientConfig.xml, refer to WebClientConfig - MAIN CONFIGURATION.
|
As far as the Dashboard configuration is concerned, for the parameters found under the <profile> key, no merge will be applied and the hierarchy to be respected is the usual one: |
Throughout this chapter the Sample dashboard configuration will be taken as reference.
Dashboards are specific to the user role and in this chapter we’ll focus on the Reporter profile.
<profile>
<id>reporter</id>
<cols>
<col>
<widget>
<type>topics</type>
</widget>
</col>
<col>
<widget>
<type>mediafeed</type>
<eomPath>/Globe/Images/Sport/</eomPath>
</widget>
<widget>
<type>feed</type>
<eomData>recents</eomData>
</widget>
</col>
<col>
<widget>
<type>feed</type>
<eomData>pinboard</eomData>
</widget>
</col>
</cols>
</profile>
Each profile defines three main properties: id and columns.
id
The id should match the Role defined in the configuration (e.g. Reporter).
|
The role is case insensitive. |
|
It is possible to use the same dashboard for different roles but separating them with a comma, like the following example: <id>reporter,manager</id> |
Footer
| This section has been deprecated and will be removed in a future release. |
Columns
As we can see from the code above, three columns are defined (three widgets objects inside cols array). The first column has a label localized using the dashboard.incoming key and only one widget:
-
topics
The second column has no label and two widgets:
-
mediafeed
-
feed with recents list
The third one:
-
feed with pinboard objects list
| Each widget might require some additional parameters which can be added as extra parameters inside each widget. |
The dashboard configuration allows to have less than three columns and with different width sizes. By default the columns area is divided by the number of columns defined. As we saw we set three columns, therefore the space is divided by three. If we set only two columns, the entire space will be evenly divided between the two.
<profile>
<id>reporter</id>
<cols>
<col>
<widget>
<type>topics</type>
</widget>
</col>
<col>
<widget>
<type>feed</type>
<eomData>recents</eomData>
</widget>
</col>
</cols>
</profile>
It’s also possible to tell one column to take the space of two columns using the span parameter like so:
<profile>
<id>reporter</id>
<cols>
<col>
<span>2</span>
<widget>
<type>topics</type>
</widget>
</col>
<col>
<widget>
<type>feed</type>
<eomData>recents</eomData>
</widget>
</col>
</cols>
</profile>
| The span parameter must be defined at the widget/label parameter level. |
| Parameter | Values | Description | Default value |
|---|---|---|---|
span (optional) |
Number |
The amount of columns to be taken |
1 |
label (optional) |
String |
The label displayed above the column |
|
widgets (required) |
Array of objects |
Containing the widget type to load inside the column |
Detailed widgets configuration
Calendar
The Calendar widget can include more calendars. By default, the calendar lists all the tasks assigned to the current user.
Calendars can (and should) be configured in MyArea > Profile > Calendars. If no calendar is configured, the user can specify a set of calendars in the widget configuration.
| This widget has been deprecated and will be removed in a future release. |
Chart
The chart widget groups all the EOM Object in a query according to their statuses.
The chart shows the percentage of the selected status with respect to the total objects analyzed. It is possible to click on the statuses on the left to change the showm element.
| The widget has fixed height. |
The widget can be configured with the following options:
| Parameter | Values | Description | Default value |
|---|---|---|---|
type (required) |
"chart" |
Widget identifier |
|
title |
String |
Title appearing at the top. |
The title/name of the query |
icon |
String |
The icon appearing at the top. To see the list of available icons, click here. |
"icon-bar-chart" (Font Awesome icon) |
eomId (required) (1) |
ID of a query |
Only queries are supported. |
|
eomPath (required) (1) |
Path of a query |
The path of the Query to analyze |
|
limit |
Number |
The number of objects to consider for the analysis |
All the items are considered |
hideEmptyStatus |
true/false |
If true, hides the objects without status from the analysis |
true |
targetStatus |
Status name (e.g. "Newsflow/Editing") |
The target status appears at the top and is selected by default. |
(1) See box below.
| eomId or eomPath are required and mutually exclusive. If not inserted, fake data is used. |
Sample configuration
<widget>
<type>chart</type>
<eomId>0$1.0.424028453</eomId>
<hideEmptyStatus>true</hideEmptyStatus>
<targetStatus>NewsFlow/Editing</targetStatus>
</widget>
Contacts
The contact widget lists all the favourite contacts of the user. For each contact, it is possible to see the user information. Also, it is possible to Send a message, Remove the user from favourites, and to search for other users.
| The widget automatically resizes itself according to the available space. |
The widget can be configured with the following options:
| Parameter | Values | Description | Default value |
|---|---|---|---|
type (required) |
"contacts" |
Widget identifier |
Sample configuration
<widget>
<type>contacts</type>
</widget>
DiggFeeds
DiggFeed widget displays the best articles, videos, and original content the web is talking about right now, based on www.digg.com.
| This widget has been deprecated and will be removed in a future release. |
GridList
The gridList widget provides an advanced grid system to show query results.
|
The bold style is applied to all the objects (new and already listed items) who are involved in alert or alert_in events. For example, if an object is already available in the list and it’s edited, its line will be bold-highlight after its release/closure. |
|
The column width configured in columnCfgCatalogs.swing.xml is not taken into account when applied to the gridList, the system adapts the column width to the available space for the widget. |
The widget can be configured with the following options:
| Parameter | Values | Description | Default value |
|---|---|---|---|
type (required) |
"gridList" |
Widget identifier |
|
title (optional, ignored by Swing App) |
String |
Title appearing at the top. If omitted, the query name is shown. |
"Simple query" |
dataType |
String |
The type of data shown in the widget. Only |
"eomquery" |
count |
Integer |
The maximum number of results shown in the widget. It must match with the MaxResultItems value configured in the query when the value is greater than 100. |
100 |
allowColumnResize |
Boolean |
If true, allow column resize |
false |
addLocalInfoColumn |
Boolean |
This column represents the info related to Checked-out Stories |
false |
autoUpdate |
Boolean |
If false, the alert queries are not automatically updated, but a refresh button appears |
true |
filterOpened |
Boolean |
If true, if a query filter is available, show it. |
false |
onItemSelected |
String |
The command that should be executed when an item is selected. |
|
onDoubleClick |
String |
The command that should be executed when an item is double clicked. |
|
eomId (required) (1) |
eomID of a query |
Only query are supported. |
|
eomPath (required) (1) |
Path |
The path of the EOM Objects to analyze. The path can be specified using the format <dbId>$<path> or <connectionId>$<path>. |
|
catalogName |
String |
If specified, it indicates the column catalog view to use to render in the query. |
|
filters |
Array of objects |
It is possible to configure filters for the grid. |
See Filters |
defaultFilterLabel |
String |
The label that appears in the filter combobox as default |
filter.nofilter in translation.json |
cols |
Array of objects |
It is possible to configure custom columns for the grid. |
|
removeWhenOut |
true/false |
Valid for Alert queries only. If true, the row is removed when the item does not match the query criteria. |
false |
rowHeight |
Number |
The height (in px) of each row (minimum is 20) |
35 |
(1) See box below.
|
Either eomId or eomPath is required and are mutually exclusive. These parameters have the following priority:
|
Filters
The gridList widget allows to configure alternative queries and custom filter of the query as explained below.
Custom filter
The custom filter with which the query is saved will be automatically displayed by clicking on the funnel icon that appears in the top-right of the widget.
Preliminary condition is that the query must be created in Swing and with a filter.
See the section How to create a custom filter for queries for further information about the filter configuration.
Alternative queries
It is possible to create alternative queries which can be selected from the drop-down menu that appears in the top-right of the widget.
The alternative queries must be configured directly in the gridlist widget specifing the eomId or eomPath parameter as displayed in the following example:
<filters>
<filter>
<name>Images</name>
<eomId>199$1.0.533062401</eomId>
</filter>
<filter>
<name>Wires</name>
<eomPath>/SysConfig/Common/GridlistQueries/Query1</eomPath>
</filter>
</filters>
Result Set Options
The gridList widget has the possibility to configure the result set options. If the resultSetOptions setting is not specified, the default value for all the options is applied.
-
showSystemAttributes - if true shows the system attributes in the response (default: true)
-
showAttributes - if true shows the attributes in the response (default: true)
-
showUsageTickets - if true shows the usage tickets in the response (default: true)
-
showVirtualAttributes - if true shows the virtual attributes in the response (default: true)
-
showXml - if true shows system attributes, attributes, usage tickets and virtual attributes in xml format if their are shown in the response (default: true)
-
showJson - if true shows system attributes, attributes, usage tickets and virtual attributes in Json format if their are shown in the response (default: true)
-
showPath - if true shows the file system path in the response (default: false)
|
Enabling showPath option may negatively affect query response time performance. |
ResultSet options can be configured in the following way:
<resultSetOptions>
<showAttributes>false</showAttributes>
<showSystemAttributes>false</showSystemAttributes>
<showUsageTickets>false</showUsageTickets>
<showVirtualAttributes>false</showVirtualAttributes>
<showXml>false</showXml>
<showJson>false</showJson>
<showPath>false</showPath>
</resultSetOptions>
Columns and renderers
The gridList widget has the possibility to allow custom columns. If the cols setting is not specified, all the columns specified in the column catalog are shown (to specify the column catalog, please refer to the catalogName setting).
Custom columns can be configured in the following way:
<col>
<field>locker</field>
<renderer>locker</renderer>
</col>
<col>
<renderer>type</renderer>
</col>
<col>
<title>Name</title>
<renderer>preview</renderer>
</col>
<col>
<title>Count</title>
<field>Counter</field>
</col>
Each column can have:
-
title - the column’s name. It can also be empty.
-
field - this property associates the column to a value. It can the name of the column in the column catalog, or the name of the JSON result property coming from the REST API. If nothing else is specified, the result is shown "as is" (without elaboration, as a plain text).
-
renderer - is an optional function that elaborates the field value or the item, and returns an HTML that is shown inside the grid cell. More examples below.
Renderers
The renderer in the XML configuration is specified as a string, and can be:
-
the name of a common Swing renderer, chosen from this list:
| Parameter | Description | Required a Field |
|---|---|---|
type |
Shows an icon which represents the object’s type (e.i. EOM::CompondStory, Image) |
No, the object’s type is loaded by default |
title |
Shows a string with the object’s title saved in its System attribute. The object filename is visualized when the title is empty. |
No, the object’s title (or the filename) is loaded by default |
name |
Shows a string with the object’s filename |
No, the object’s filename is loaded by default |
summary |
Shows a string with the object’s summary saved in its System attribute, if available |
No, the object’s summary saved in the System attribute is loaded by default |
locker |
Shows a padlock when the object is locked by a user and shows a popover with the information of this the user |
No, the info about the user who is locking the object is loaded by default |
status |
Shows a colored circle which represents the current status of the object |
No, the current object’s status is loaded by default |
channel |
Shows an icon and the name of the object’s channel saved in its System attribute |
No, the object’s channel saved in the System attribute is loaded by default |
channelicon |
Shows an icon symbolizing the object’s channel saved in its System attribute |
No, the object’s channel saved in the System attribute is loaded by default |
date |
Shows the date set in the field, respecting the configured date format |
Yes, it is necessary to specify which date you want to visualized (e.i. created, last_modify), there is no a default |
user |
Shows the user name set in the field and shows a popover with its information |
Yes, it is necessary to specify which user you want to visualized (e.i. owner, last_modifier), there is no a default |
preview |
Shows the text set in the field as a link, allowing to directly open the object preview window |
Yes, it is necessary to specify which string you want to visualized as a link, there is no a default |
open |
Shows the text set in the field as a link, allowing to directly edit the object in a new browser window |
Yes, it is necessary to specify which string you want to visualized as a link, there is no a default |
openreadonly |
Shows the text set in the field property as a link, allowing to directly open in read only mode the object in a new browser window |
Yes, it is necessary to specify which string you want to visualized as a link, there is no a default |
opencompare |
Shows the text set in the field property as a link, allowing to directly open in side by side mode a channel copy object with its master in a new browser window NOTE the opencompare renderer is valid only for channel copy objects and if the PadmaPriv_enableSideBySide is set to true, if the object is a master or the privilege PadmaPriv_enableSideBySide is set to false the open rendered will be used. |
Yes, it is necessary to specify which string you want to visualized as a link, there is no a default |
actionsleft |
Shows three-dots that allow to open the drop-down menu with all the available actions. Use this if the column is on the left side of the table |
No |
actionsright |
Shows three-dots that allow to open the drop-down menu with all the available actions. Use this if the column is on the right side of the table |
No |
-
the name of a custom renderer. It is possible to configure a custom renderer in the following way.
eidosmedia.webclient.extensions.renderers.add(rendererName, callback);
For example:
eidosmedia.webclient.extensions.renderers.add('reportactions', function(data, ctx, getColumnValue, setSortableValue) {
var result = "";
result = '<div class="em-dd" style="text-align:center; width: 20px;">'+
' <button class="btn btn-mini dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="padding: 0 10px; background: transparent !important;cursor: pointer;border: none;">'+
' <i class="fa fa-ellipsis-v"/>'+
' </button>'+
' <ul class="dropdown-menu aligned documents pull-right">'+
' <li>'+
' <a data-obj-action="openreadonly" data-obj-id="'+data.id+'">Open</a>'+
' </li>'+
' <li>'+
' <a data-obj-action="objectpanel" data-obj-id="'+data.id+'">Object panel</a>'+
' </li>'+
' <li>'+
' <a data-obj-action="workflowmap" data-obj-id="'+data.id+'">Diagram workflow</a>'+
' </li>'+
' <li>'+
' <a data-obj-action="properties" data-obj-id="'+data.id+'">Properties</a>'+
' </li>'+
' </ul>'+
'</div>';
return $(result)[0];
});
The renderer function must return an HTML or, better, a DOM object to be put inside the cell. In the example above, a custom dropdown menu is created with only the selected actions. Please notice how the actions are built, by using the "data-obj-action" and the "data-obj-id" attributes.
The callback has the following parameters:
-
data the JSON information of the object
-
ctx is the Context Object, where the ActiveObject is the current element.
-
getColumnValue is a method to retrieve the value of a particular column of the column catalog. It is useful if a cell should combine more values from different columns.
-
setSortableValue is a method to be called in other to set the value to be used in case of sorting. See example below (customrenderersort)
Example of sorting with custom renderer
// Custom renderer
eidosmedia.webclient.extensions.renderers.add('surname', function(data, ctx, getColumnValue, setSortableValue) {
var value = getColumnValue('lastName') + ' ' + getColumnValue('firstName');
// We specify that we need to sort by this raw value.
setSortableValue(value);
// We return a custom html but that's not to include in the sort.
return '<b>NAME: </b>' + value;
});
The rendererName must be put inside the configuration of the widget and will be automatically called.
onItemSelected, onDoubleClick
The onItemSelected and onDoubleClick properties can receive the name of a generic Swing command to be executed when a row is selected or double clicked. An example is the following:
-
in the widget configuration
<onItemSelected>selectedGridItem</onItemSelected>
<!-- or onDoubleClick -->
-
in the Plugin folder
eidosmedia.webclient.commands.add('selectedGridItem', {
action: function( ctx ) {
var info = ctx.activeObject.getInfo();
alert(info.name);
}
});
See Commands documentation for further information.
Full Example
<widget>
<type>gridList</type>
<title>Simple query</title>
<dataType>eomquery</dataType>
<onItemSelected>selectedGridItem</onItemSelected>
<autoUpdate>false</autoUpdate>
<eomPath>eomfs:/Configurations/Profiles/my.user/Queries/My Queries/TEST_PRIME_QUERY_IMAGES</eomPath>
<filters>
<filter>
<name>Videos</name>
<eomId>199$1.0.533062401</eomId>
</filter>
<filter>
<name>Created by me</name>
<eomId>199$1.0.707875571</eomId>
</filter>
</filters>
<cols>
<col>
<title></title>
<!-- Custom renderer, see below -->
<renderer>reportactions</renderer>
</col>
<col>
<renderer>status</renderer>
</col>
<col>
<renderer>type</renderer>
</col>
<col>
<title>Name</title>
<field>name</field>
<renderer>preview</renderer>
</col>
<col>
<field>locker</field>
<renderer>locker</renderer>
</col>
<col>
<renderer>mycustomrenderer</renderer>
</col>
<col>
<renderer>actionsright</renderer>
</col>
</cols>
</widget>
And, as a plugin:
// Custom command for itemSelected
eidosmedia.webclient.commands.set('selectedGridItem', {
override: false,
action: function( ctx ) {
//alert(ctx.activeObject.getName());
var info = ctx.activeObject.getInfo();
// do something...
}
});
// Custom renderer
eidosmedia.webclient.extensions.renderers.add('mycustomrenderer', function(data, ctx, getColumnValue) {
// Takes the value of two Column Catalog columns and show them together
return getColumnValue('Column1') + ' - ' + getColumnValue('Column2');
});
Feed
The Feed widget displays the latest RSS feeds or Internal query results.
|
The widget automatically resizes itself according to the available space. |
The widget can be configured with the following options:
| Parameter | Values | Description | Default value |
|---|---|---|---|
type (required) |
"feed" |
Widget identifier |
|
title |
String |
Title appearing at the top. |
The title/name of the query |
icon |
String |
The icon appearing at the top. To see the list of available icons, click here. |
"icon-search" (if query) or "icon-rss" (if rss) (Font Awesome icon) |
eomId (required) (1) |
eomID of a query |
Only query are supported. |
|
eomPath (required) (1) |
Path |
The path of the EOM Objects to analyze. The path can be specified using the format <dbId>$<path> or <connectionId>$<path>. |
|
eomData (required) (1) |
A string identifier of particular data. |
Only "recents", "favourites" and "pinboard" are supported. |
"recents", "favourites", "pinboard" |
rss (required) (1) |
String |
The URL of a RSS feed. |
e.g. "http://feeds.bbci.co.uk/news/rss.xml" for the BBC news feed |
rowHeight |
Number |
The height (in px) of each row (minimum is 30) |
45 |
showObjectTitle |
true/false |
If false, the file name is shown |
true |
removeWhenOut |
true/false |
Valid for Alert queries only. If true, the row is removed when the item does not match the query criteria. |
false |
(1) See box below.
|
Either eomId, eomPath, eomData or rss are required and are mutually exclusive. These parameters have the following priority:
|
Sample configuration
Please remember that eomId, eomPath, eomData and rss are MUTUALLY EXCLUSIVE, and the priority order is as described above.
<widget>
<type>feed</type>
<eomId>99$1.1234567890</eomId>
<eomPath>99$/Globe/Stories/Politics</eomPath>
<eomData>recents</eomData>
<rss>http://feeds.bbci.co.uk/news/rss.xml</rss>
</widget>
HTML Panel
The HTML Panel widget displays an HTML page or a story converted in HTML format.
| The widget automatically resizes itself according to the available space. |
The widget can be configured with the following options:
| Parameter | Values | Description | Default value |
|---|---|---|---|
type (required) |
"htmlpanel" |
Widget identifier |
|
path (optional) |
String |
The (virtual) path to an html file. |
"/SysConfig/welcome.html" ( if no path is specified ) |
|
The widget as it is supports ONLY .html files. If no path is specified, the widget tries to open '/SysConfig/welcome.html'. If it is not available, the widget shows an error. |
Sample configuration
<widget>
<type>htmlpanel</type>
<path>/globe/Local/home.html</path>
</widget>
Mediafeed
The MediaFeed widget displays internal query results in the specified format.
The widget can be configured with the following options:
| Parameter | Values | Description | Default value |
|---|---|---|---|
type (required) |
"mediafeed" |
Widget identifier |
|
title |
String |
Title appearing at the top. |
The title/name of the query |
icon |
String |
The icon appearing at the top. To see the list of available icons, click here. |
"icon-picture"(Font Awesome icon) |
count |
Integer |
The maximum number of results shown in the widget |
(Unlimited) |
hideEmpty |
Boolean |
Hide empty placeholders |
false |
previewType |
String |
The preview format to load. Supported formats are: thumbnail and lowres |
thumbnail |
eomId (required) (1) |
eomID of a query |
Only query are supported. (If you need to use a folder, use the eomPath method). |
|
eomPath (required) (1) |
Path |
The path of the EOM Objects to analyze |
(1) See box below.
| eomId or eomPath are required and mutually exclusive. |
Sample configuration
<widget>
<type>mediafeed</type>
<eomId>0$1.0.433342320</eomId>
<count>48</count>
</widget>
Message Receiver
The Messagereceiver is a prototype widget that shows communication between widgets.
It is possible to send a message to a widget by using the following code
ctx.sendWidgetMessage(message, params, targetIdentifier);
-
message is the name of the message (e.g. "onSelectedItem")
-
params is anything you want to pass as a message parameter (e.g. a javascript object with information)
-
targetIdentifier is the name of the target widget, specified with the identifier property in a widget settings.
Target Widget Settings Example
<widget>
<type>customwidget1</type>
<identifier>myCustomWidget</identifier>
</widget>
Code to send a message
// Send back a message to myCustomWidget
ctx.sendWidgetMessage('checkStuff', { test: true, stringBuffer: 'simple elements' }, 'myCustomWidget');
Target Widget implementation
Target widget should implement the onWidgetMessage method, such as the following example.
{
onWidgetMessage: function(ctx, message, payload) {
switch(message) {
case 'preview':
// Do something...
break;
}
}
}
Sample configuration
<widget>
<type>messagereceiver</type>
</widget>
Messages
The Messages widget displays the Inbox or the Outbox messages.
The widget can be configured with the following options:
| Parameter | Values | Description | Default value |
|---|---|---|---|
type (required) |
"messages" |
Widget identifier |
|
dataType |
"inbox" or "outbox" |
The type of messages to be shown. |
|
icon |
String |
The icon appearing at the top. To see the list of available icons, click here. |
"fa fa-envelope"(Font Awesome icon) |
count |
Integer |
The maximum number of results shown in the widget |
(Unlimited) |
Sample configuration
<widget>
<type>messages</type>
<dataType>inbox</dataType>
<count>48</count>
</widget>
Previews
The resultspreview widget allows to visualized the preview of print pages returned by queries or by folders listed in eomdb paths.
In detail, selecting a page from the list it is possible to visualize its preview with the workflow status of all the linked stories and also the empty shapes.
From the preview the user can perform some actions on the selected shape, like create a new story, link an existing one, edit or unlink the already linked story.
The widget can be configured with the following options:
| Parameter | Values | Description |
|---|---|---|
type (required) |
"resultspreview" |
Widget identifier |
title |
String |
Title visualized at the top of the widget |
results (required) |
A list of <result> |
A configurable list of queries/folders visualized in the drop-down menu. See Result attribute |
gridoptions |
Object |
Options that describes the layout of the grid displaying the results. See Grid options |
options |
Object |
An object that can specify additional parameters for different types of object. Right now only for print pages is supported. See Options |
Result attribute
A result can contains a query or a folder configured in the EOMDB. Each result tag must contains the following attributes:
| Attribute | Values | Description |
|---|---|---|
type (required) |
"folder" / "query" |
The type of the content configured in the result tag, it can be "folder" or "query" |
key (required) |
"eomPath" / "eomId" |
The key in the eomdb. If the content is a path it must be set to "eomPath", instead if the content is a loid it must be set to "eomId" |
name (required) |
String |
The name visualized in the dropdown list |
Grid options
The gridoptions allows to configure the layout of the grid. It manages the following patameters:
| Parameter | Values | Description | Default value |
|---|---|---|---|
hideViewSelector |
boolean |
If true, it visualize all the configured view options usually used to change the Results view between list/thumbnail. |
false |
gridToolbarOnly |
boolean |
If true, it visualize the toolbar containing the drop-down of the configured results, the button to expand/collapse the columns and the refresh button |
false |
useBreadcrumb |
boolean |
If true, it visualize an info about the content selected in the drop-down menu, it could be the path of the folder or the name of the query |
true |
Options
Right now, the unique implemented options is about the print pages objects.
| Container | Parameter | Values | Description | Default value |
|---|---|---|---|---|
printpage |
loadGrid |
boolean |
Loads the grid content to get the page dimensions |
false |
|
Just note that:
|
Sample configuration
<widget>
<title>Pages of the day</title>
<type>resultspreview</type>
<options>
<printpage>
<loadGrid>true</loadGrid>
</printpage>
</options>
<gridoptions>
<hideViewSelector>false</hideViewSelector>
<gridToolbarOnly>true</gridToolbarOnly>
<useBreadcrumb>false</useBreadcrumb>
</gridoptions>
<results>
<result type="folder" key="eomPath" name="Foreign">/Globe/Print/Pages/Foreign</result>
<result type="folder" key="eomPath" name="News">/Globe/Print/Pages/News</result>
<result type="query" key="eomPath" name="My Assigned pages">/Globe/Print/Pages/queryPages</result>
</results>
</widget>
Quicklinks
Quicklinks provide the fastest access to some specified functions.
| The widget has fixed height. |
The Quicklinks widget can be configured with the following options:
| Parameter | Values | Description |
|---|---|---|
type (required) |
"quicklinks" or "quicklinkslist" |
Widget identifier |
links (optional) |
Array of <link> objects |
The list of links appearing in the widget. See the next table to the default configuration. |
Each link can be configured as follows:
| Parameter | Values | Description |
|---|---|---|
icon (required) |
String |
The icon of the action. To see the list of available icons, click here. |
label (required) |
String |
It can be a localization code (please see Localization documentation for details) or the label of the action. |
action (required) |
String |
The action name. The possibilities are listed below. |
params (mandatory for "newcustomcontent", "newaudio" and "search") |
Object |
A tag containing all the parameters that can only be used with the actions "newcustomcontent", "newaudio" and "search". |
Action configuration
The action must be one of the following:
-
"newcontent": opens the New Story dialog
-
"newdwp": opens the New DWP dialog
-
"newdwc": opens the New DWC dialog
-
"newgallery": opens the New Gallery dialog
-
"newtopic": opens the New Topic dialog
-
"newtopicplan": opens the New Topic Plan dialog
-
"newmessage": opens the New Message dialog
-
"quickstory": creates directly a new Story with the default values configured in the relative <story> editor (only this quick create is managed by Swing App)
-
"quickwebpage": creates directly a new DWC with the default values configured in the relative <webpage> editor
-
"quickgallery": creates directly a new Gallery with the default values configured in the relative <gallery> editor
-
"quicktopic": creates directly a new Topic with the default values configured in the relative <topic> editor
-
"quicktopicplan": creates directly a new Topic Plan with the default values configured in the relative <topicplan> editor
-
"newcustomcontent": creates a new document with the parameters specified in the params section
-
"search": open the quicksearch mask with specific parameters specified in the params section (not available for Swing App)
-
"newaudio": creates a new audio with the parameters specified in the params section (available only for Swing Mobile)
-
"newmedia": upload a new media with the parameters specified in the params section (available only for Swing Mobile)
| Swing Mobile supports "newcustomcontent", "newaudio" and "newmedia" actions only |
The "newcustomcontent" action configuration
The newcustomcontent action parameters are:
| Parameter | Values | Description |
|---|---|---|
name (required) |
String |
The new object default name. A timestamp is appended in case of multiple files with the same name. |
type (required) |
Object type |
The type of the new object (e.g. EOM::CompoundStory, EOM::Topic, …). |
template (required) |
String |
The path to the object template. The template is not required for the EOM::Topic type. |
folderPath |
String |
The workfolder to save the file into. If omitted, the current user default workfolder is used. |
insert |
String |
The new object insert. |
edition |
String |
The new object edition. If not specified or is equal to default, the default edition of the default team of the user is used (if it has a default edition, otherwise edition None) |
channel |
String |
The new object output channel. If not specified, the user’s default channel is used. |
issueDate |
String |
If not set, it will the next available date. |
failIfNotValid |
Boolean |
If true, the request fails if the workfolder is not valid for the given channel. Default value is false if not specified. |
defaultWorkfolder |
String |
The default workfolder to save the file into if the specified workfolder or the current user default workfolder is not valid, if this porperty is specified the *failIfNotValid* value will be ignored. |
offline |
Boolean |
If true, the template will be available in offline mode. |
offlineTagWizard |
String |
The path for the tagwizard configuration file to use. It is required in order to use the tagwizard story panel on local stories when offline. |
local |
Boolean |
If true, when working in offline mode, the object will be always created as local even if the network is online (available only for Story objects). |
rename |
Boolean |
If true, a modal dialog will be shown to let the user modify the object name at creation time. |
Example of params
<params>
<name>New Story.xml</name>
<type>EOM::CompoundStory</type>
<channel>Globe-Web</channel>
<edition>Home</edition>
<template>/SysConfig/Globe/Templates/story.xml</template>
<folderPath>workfolder:///Globe/Sport</folderPath>
</params>
The "newaudio" action configuration
The newaudio action parameters are:
| Parameter | Values | Description |
|---|---|---|
name |
String |
The new default name (without the file extension). A timestamp is appended. |
folderPath |
String |
The workfolder to save the file into. |
offline |
Boolean |
If true, the action will be available in offline mode. |
Example of params
<params>
<name>NewAudio</name>
<folderPath>workfolder:///Globe/Politics</folderPath>
<offline>true</offline>
</params>
The "newmedia" action configuration
The newmedia action parameters are:
| Parameter | Values | Description |
|---|---|---|
folderPath |
String |
The workfolder to save the file into. |
Example of params
<params>
<folderPath>workfolder:///Globe/Politics</folderPath>
</params>
The "search" action configuration
It is possible to choose between two differents search configurations, based on an input string or on a query id of an existing query, so the mandatory parameters of this action are:
| Parameter | Values | Description |
|---|---|---|
domain (required) |
String |
The domain in which the search must be placed. |
input (required) |
String |
The text to search. |
OR
| Parameter | Values | Description |
|---|---|---|
queryId (required) |
String |
The id of the query to execute. |
<params>
<domain>{DOMAIN-NAME}</domain>
<input>{TEXT-TO-SEARCH}</input>
<!-- Please notice that if the value has spaces (such as NewsFlow/For Approval), it must be placed between quotes -->
</params>
... or ...
<params>
<queryId>199$1.0.123456789</queryId>
</params>
Sample configuration
<widget>
<type>quicklinks</type>
<links>
<link>
<icon>emui-icon-file</icon>
<label>header.menu.newfile</label>
<action>newcontent</action>
</link>
<link>
<icon>icon-edit</icon>
<label>header.menu.quickcreatestory</label>
<action>quickstory</action>
</link>
<link>
<icon>icon-edit</icon>
<label>Quick Topic creation</label>
<action>newcustomcontent</action>
<params>
<type>EOM::Topic</type>
<name>NewTop.pkg</name>
</params>
</link>
<link>
<icon>emui-icon-query</icon>
<label>Last modified search</label>
<action>search</action>
<params>
<queryId>199$1.0.123456789</queryId>
</params>
</link>
</links>
</widget>
Recents
The Recents widget displays a summary of your last edited objects and can be used only in the footer section.
| This widget has been deprecated and will be removed in a future release. |
Shortcuts
The Shortcuts widget provide shortcuts to the current user’s folders.
| The widget has variable height. |
The widget can be configured with the following options:
| Parameter | Values | Description | Default value |
|---|---|---|---|
type (required) |
"shortcuts" |
Widget identifier |
|
title |
String |
Title appearing at the top of the widget. |
"Shortcuts" |
shortcuts |
Array of objects |
A list of paths + label to be shown in the widget. See example for further detail. |
|
Each shortcut has the following parameters:
|
Sample configuration
<widget>
<type>shortcuts</type>
<shortcuts>
<shortcut>
<path>home</path>
<label>User home folder</label>
</shortcut>
<shortcut>
<path>work</path>
<label>User work folder</label>
</shortcut>
<shortcut>
<databaseId>199</databaseId>
<path>/any/other/path</path>
<label>Database 199 root folder</label>
</shortcut>
</shortcuts>
</widget>
Social Trends
SocialTrends widget provides the latest Trending Topics of 2 specified locations and it’s only available if Méthode Social is available.
| This widget has been deprecated and will be removed in a future release. |
Timeline
The Timeline widget allows to shows all the created Topic items, grouped by date.
The widget can be configured with the following options:
| Parameter | Values | Description | Default value |
|---|---|---|---|
type (required) |
"timeline" |
Widget identifier |
|
title |
String |
Widget header label |
"TIMELINE" |
query (required) |
String |
id or path of the parametric query. Multiple query can be configured. At least one query is required. The query should be parametric and will be executed for each day passing the current day as parameter. |
|
before |
Number |
number of issue dates represented before today |
7 |
after |
Number |
number of issue dates represented after today |
60 |
dateFormat |
String |
Can be "dueDate" (default), "issueDate" or custom metadata xpath in which a date formatted as "YYYYMMDDHHmm" can be found. It represent the date field on which Topic Item are grouped inside a timeline day. |
"dueDate" |
dayFormat |
String |
Can be "issueDate", "dueDate" or custom metadata xpath in which a date formatted as "YYYYMMDD" or "YYYYMMDDHHmm" can be found. It represent the date field on which Topic Item are grouped by day (needed for events, since Topic Item for a specific day are obtained through the configured query).
If dateFormat it is specified, dayFormat will take the same value, unless it is explicitly specified. If dateFormat is not specified, dayFormat defaults to issueDate NOTE: If the configured query has a criteria for dueDate, dayFormat must be set to "dueDate". |
"issueDate" |
expandItems |
Boolean |
If true, all sections inside a timeline day are automatically expanded when a timeline day is expanded |
false |
fieldConfiguration |
Array of Objects (optional) |
If added to the configuration it gives the possibility to show custom info from the topic item object into the widget. It can be configured adding a list of maximum 4 field with the following attributes: - value(string): the name of the property to show - icon:(string): the class name from Swing Icon Fonts or Font Awesome - type(string): "date" or "text" - outputFormat: if the type is date it defines the date format |
null |
Sample configuration
Dashboard configuration example:
<widget>
<type>timeline</type>
<before>10</before>
<after>10</after>
<queries>
<query name="politics">/SysConfig/Common/Queries/Timeline/politics</query>
<query name="business">/SysConfig/Common/Queries/Timeline/business</query>
</queries>
</widget>
Query example:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE EOMSearch>
<EOMSearch version="1.0"
xmlns="http://EidosMedia.com/EOM/SearchEngine"
xmlns:se="http://EidosMedia.com/EOM/SearchEngine"
xmlns:q="http://EidosMedia.com/EOM/SearchEngine/query"
xmlns:qm="http://EidosMedia.com/EOM/SearchEngine/query/macro"
xmlns:qa="http://EidosMedia.com/EOM/SearchEngine/query/alias"
xmlns:qui="http://EidosMedia.com/EOM/SearchEngine/query/UI"
xmlns:i="http://EidosMedia.com/query/interpolate">
<q:Query type="INDEX">
<q:Properties>
<q:Index name="tasks@meth01_eomse1" />
<q:Sort on="CONTENT/TASK/DUE_DATE" type="ASCENDING" />
</q:Properties>
<q:Boolean>
<ObjectInfo>
<type>EOM::TopicItem</type>
</ObjectInfo>
<se:SysAttributes>
<props>
<workFolder>/Globe-Tablet/Politics</workFolder>
<productInfo>
<issuedate q:op="RANGE">
<q:LowValue>
<i:variable name="fromDate" />
</q:LowValue>
<q:HighValue>
<i:variable name="toDate" />
</q:HighValue>
</issuedate>
</productInfo>
</props>
</se:SysAttributes>
</q:Boolean>
</q:Query>
</EOMSearch>
Custom fields configuration example:
<widget>
<type>timeline</type>
<before>10</before>
<after>10</after>
<queries>
<query name="politics">/SysConfig/Common/Queries/Timeline/politics</query>
<query name="business">/SysConfig/Common/Queries/Timeline/business</query>
</queries>
<fieldConfiguration>
<field icon="swing-icon-user" value="creator"></field>
<field value="metadata:///ObjectMetadata/Info/date"></field>
<field icon="fas fa-newspaper" value="sysAttr:///workFolder"></field>
<field type="date" icon="swing-icon-calendar" outputFormat="DD/MM/YYYY" value="sysAttr:///productInfo/issueDate"></field>
</fieldConfiguration>
</widget>
To do List
The Todolist widget allows to keep track of the activities to be done.
| This widget has been deprecated and will be removed in a future release. |
Topics
The Topics widget shows internal incoming or outgoing tasks.
| The widget automatically resizes itself according to the available space. |
|
Starting from Swing 5.2020.04 by default the Topics widget will not show the number of correlations of each task anymore, but only the possible presence of correlations. This change is aimed to overcome the huge performance degradation caused by the listing of all correlations linked to the task items. For backward compatibility, it will still be possible to show the number of correlations by using the parameter showCorrelationNumber and setting it to true (its default value is false), however the usage of this parameter is strongly discouraged for the performance reasons mentioned above. |
The widget can be configured with the following options:
| Parameter | Values | Description | Default value |
|---|---|---|---|
type (required) |
"topics" |
Widget identifier |
|
title |
String |
Title appearing at the top. |
|
dataType |
String |
The type of the Tasks / Topic Items to show. Possible values [incoming / outgoing] |
"incoming" |
count |
Integer |
Maximum number of topic items to show |
15 |
excludes |
String |
The type of topic items to exclude ("EOM::TopicItem" or "EOM::WorkflowTask") |
(no exclusions) |
date |
String |
The date of topic items to be displayed ("duedate" or "issuedate") |
"duedate" |
showCorrelationNumber |
Boolean |
Show the number of correlations |
false |
|
The title you see in the widget preview (e.g. "INCOMING"), is the column title, not the widget’s one. |
Sample configuration
<widget>
<type>topics</type>
<dataType>incoming</dataType>
<count>15</count>
<excludes>EOM::WorkflowTask</excludes>
</widget>
Multiple Dashboards
It is possible to configure more than one dashboard at the same time. To do so, add other dashboards to the dashboards array, configured as described above.
| The id of each dashboard must be unique. |
|
For each dashboard, you can express multiple profiles. The user will see all (and only) the dashboards availables for their profile ( typically "Reporter" / "Editor" … ). When a user has not been assigned a specific role, the default Swing dashboard will be displayed instead. If needed, it is possible configure a custom default dashboard using the key <id>default</id>. |
Changes from the previous configuration
-
The new configuration uses the keyword dashboards (plural), in lieu of the old "dashboard".
-
dashboards is an array of JSON objects, not a single JSON object.
-
The new configuration can have multiple widgets of the same type. Thus, to identify a widget the user should use the keyword type, not the old keyword id.
Sample dashboard configuration
This is an example of a complete configuration of the main dashboard: it supports three profiles (the default ones: Reporter, Editor, Manager).
<dashboards>
<dashboard>
<id>mainDashboard</id>
<label>Main Dashboard</label>
<icon>fa fa-fort-awesome</icon>
<profiles>
<profile>
<id>reporter</id>
<cols>
<col>
<widget>
<type>topics</type>
<title>My Incoming</title>
</widget>
</col>
<col>
<widget>
<type>mediafeed</type>
<eomPath>/Globe/Images/Sport/</eomPath>
</widget>
<widget>
<type>feed</type>
<eomData>recents</eomData>
</widget>
</col>
<col>
<widget>
<type>feed</type>
<rss>favourites</rss>
</widget>
</col>
</cols>
</profile>
<profile>
<id>manager</id>
<cols>
<col>
<widget>
<type>topics</type>
<title>My Outgoing</title>
<dataType>outgoing</dataType>
</widget>
</col>
<col>
<widget>
<type>chart</type>
</widget>
<widget>
<type>contacts</type>
</widget>
</col>
<col>
<widget>
<type>quicklinks</type>
</widget>
</col>
</cols>
</profile>
<profile>
<id>editor</id>
<cols>
<col>
<widget>
<type>topics</type>
<dataType>outgoing</dataType>
</widget>
</col>
<col>
<widget>
<type>contacts</type>
</widget>
<widget>
<type>feed</type>
<eomData>pinboard</eomData>
</widget>
</widget>
</col>
<col>
<widget>
<type>chart</type>
</widget>
</col>
</cols>
</profile>
</profiles>
</dashboard>
</dashboards>