A Dashboard is a number of blocks of different types. The page is divided into there regions: TOP, LEFT, RIGHT. Blocks can be moved between regions, and up and down within the region. Blocks can be collapsed.
They are classified by its content - Task bar (large icons), List, and Report (Diagram).
The following is an XML of the COREmanager Home page:
The block element
Contains information about the block position, its status, type, and function to call to get its content.
Attributes of the block element
@name a block name
@position a block position, possible values top, left, right
@type a block type, possible values taskbar, list, report, infolist, url
@display block status, possible values min/max - collapsed or not
@func a name of the function that should be called to obtain the block's content. It is applied to the list, report and infolist types
@autoupdatetimeout to update the block, in seconds
The taskbar block
This block is a number of buttons to call a specific function.
The toolbtn element
Contains information about the button, its icon, and behavior.
Attributes of the toolbtn element
@name a button name
@top call functions from the attribute's value, and reboot desktop
@form open a form, the name of the form's function in the attribute value
@list open a list, the name of the lists's function in the attribute value
@window call a function from the attribute's value in a new window
@link open the url from the attribute value
@targeta standard attribute of the link, which is used along with the link
@img a name of the button's icon
@sprite an icon is included into the sprite
text to an icom localized messages based on the icon's name
The list-type block
Buttons (if any) in this list are located in a separate column, in each string. Buttons are handled in the same way as in the show/hide list and types.
Getting the block content
A list block doesn't contain any useful information. To get a list, send a request something like this MGR_URL?func=@list&dashboard=@name, where @list and @name attributes of the block element.
This request will handle modules.xsl, a distinctive feature of the XML is that the metadata element contains the @dashboard attribute
The url-type block
This is a frame. A path to the file for the frame is taken from the url element
The infolist-type block
Values in this list are divided into groups.
The rowgroup element
The elements are grouped according to a certain logic.
@name an element name. It is used for group's name localization
The row element
Describes a raw.
@namean element name. It is used for raw's name localisation@typespecifies a data type. Possible values: data, link, indicator
- data - text
- link - link to a form (a function name and elid are specified by the @func and @elid attributes in the element with the value for string), or an external resource (the link is specified in the @url attribute in the element with the value for string)
- indicator - is displayed like 80 (10), the first figure is taken from STRINGNAME_total, the second one - STRINGNAME_used, you can also set a color using the @color attribute
@viewonly for the type - indicator, if it is set to brackets, show the indicator as 80 (10)
The report-type block
This is a report, which contains only diagrams without table data.
Getting block contents
To get the contents, send the call something like this MGR_URL?func=@func&dashboard=@name, where @func, @name are attributes of the block element. Besides, the element may contain child elements param with the @name attribute, that should be passed in the call.
<xml> \<block ...\> <param name="foo">bar</param> <param name="bar">foo</param> </block> </xml>
The dashboard-report.xsl template will be applied to the panel's response.
Saving block after modification
When changing block's position or collapsing, send a call to the control panel to save data, something like this MGR_URL?func=dashboard.save&out=xml&block=BLOCK_NAME&display=DISPLAY&order=ORDER&position=POSITION , where BLOCK_NAME - the block name, DISPLAY - the block status min/max, POSITION - current region of the block top/left/right, ORDER - block position in the region (0, 1 ,2) . A response may not be handled.
block heading a localized message based on the block's name + the title_ prefix.