COREmanager Documentation

Dashboard description

 


Introduction

A Dashboard is the main page of a control panel, which serves as a point to all other modules of the control panel. If the Dashboard is active, in the upper part of the main menu, the "Home" link will display.

The Dashboard is described using an xml-document that should locate in the etc/xml directory. Use the following format for a file name: "manager name" + "_dashboard_" + "user role" + ".xml" (for example, "core_dashboard_30.xml"). When accessing the Dashboard for the first time, in the var/userconf/ directory, a configuration file named "manager name" + "." + "username" + "." + "dashboard.xml" is created (for example, "core.root.dashboard.xml"). Thus, each user can have his own Dashboard settings.

Changes made to the Dashboard xml will be automatically specified in configuration files.

If the file is not present in etc/xml, the Dashboard is considered inactive and the "Home" link is not displayed in the main menu.

Note: the column with the sorted attribute must be present for block-lists. Otherwise, the limit on the number of records to be displayed will not be applied!

XML description

Dashboard XML must contain one or several elements. Each block describes either a toolbar or a list.

following is an example of the COREmanager Dashboard XML.

Example of Dashboard XML

<?xml version="1.0"?>
<doc>
        <block name="taskbar" position="top" type="toolbar">
                <toolbtn form="usrparam" img="mb-set" name="usrparam"/>
                <toolbtn list="journal.stat" img="t-credit" name="report"/>
                <toolbtn form="brand" img="t-credit" name="brand"/>
        </block>
        <block name="session" position="top" type="list" func="session" rows="5">
                <toolbtn name="kill"/>
                <col name="id"/>
                <col name="name" sort="alpha" sorted="+1"/>
                <col name="level"/>
                <col name="ip"/>
                <col name="idle"/>
        </block>
        <block name="journal" position="top" type="list" func="journal" rows="7">
                <toolbtn name="edit" type="edit"/>
                <col name="time" sort="alpha" sorted="-1"/>
                <col name="user"/>
                <col name="ip"/>
                <col name="funcname"/>
        </block>
        <block name="longtask" position="top" type="list" func="longtask" rows="5">
                <toolbtn name="view" default="yes"/>
                <toolbtn name="delete"/>
                <col name="name"/>
                <col name="queue"/>
                <col name="id"/>
                <col name="startdate"/>
                <col name="enddate"sort="alpha" sorted="-1"/>
                <col name="pidfile"/>
                <col name="status"/>
        </block>
</doc>

General description of Dashboard block

Example

        <block name="taskbar" position="top" type="list" func="journal" rows="7">
                <toolbtn name="edit" type="edit"/>
                <col name="time" sort="alpha" sorted="-1"/>
                <col name="user"/>
                <col name="ip"/>
                <col name="funcname"/>
        </block>

name - block unique name. It is used for identifying a block in the Dashboard. It is also used for languages.

position - вescribes block location in relation to other blocks.

Possible values:

top - at the top (the block is expanded into two columns)

left - at the left

right - at the right

Block location also depends on the location of the tag inside the xml-file - the higher the block, the higher it will be on the list.

type - block type.

Possible values:

toolbar - control panel

Description of control panel block (toolbar)

Example of the control panel block (type="toolbar")

        <block name="taskbar" position="top" type="toolbar">
                <toolbtn form="usrparam" img="mb-set" name="usrparam"/>
                <toolbtn list="journal.stat" img="t-credit" name="report"/>
                <toolbtn form="brand" img="t-credit" name="brand"/>
        </block>

A control panel block contains a number of buttons for quick access to panel's functions.

Each button is described with the  tag with the following attributes:

formif specified, the button will open a form (the value of attribute is a function name)listif specified, the button will open a list (the value of attribute is a function name)imgname of the icon"nameunique name of the icon. It is used to identify a button and for languages.

Description of list-block (list)

Example of the list-block (type="list")

        <block name="journal" position="top" type="list" func="journal" rows="7">
                <toolbtn name="edit"/>
                <col name="time" sort="alpha" sorted="-1"/>
                <col name="user"/>
                <col name="ip"/>
                <col name="funcname"/>
        </block>

A list-block is used for describing a list (table) with data. It contains 2 types of tags: (buttons) and (table columns).

A column with the sorted attribute must be present, otherwise limit on the number of raws to be displayed won't be applied!

The tag has the following attributes:

funcfunction name(action name), which data should be shown in that blockrowslimits the number of raws to be displayed on the Dashboard

The toolbtn element

Describes a button.

namebutton unique name; must correspond to the name of the function button (action name) - see the func attribute of the list-block.

The col element

Describes a column.

namecolumn name; must correspond to the column name of the specified function (action) - see the func attribute of the list-block.

Message description

Most Dashboard messages are uploaded automatically according to the function name. However, some massages should be specified manually in the message description file (for example, mgr_msg_ru.xml)

Example of message description

	<messages name="dashboard">
		<msg name="title">/Dashboard</msg>
		<msg name="title_taskbar">Toolbar panel</msg>
		<msg name="taskbar_usrparam">Control panel</msg>
		<msg name="taskbar_report">Operation log. Report</msg>
		<msg name="taskbar_brand">Branding settings</msg>
	</messages>

msg name="title"describes Dashboard's headingmsg name="title_[block]"describes a block name; [block] - block name (); it is used for toolbar-blocks, for list-blocks the message is uploaded automatically based on the function name; if you need to change a list-block heading, you can specify it here - the heading will have a higher priority and will be shown on the Dashboard.msg name="[block]_[button]"describes a button caption; [block] - block name, [button] - button name (); used for toolbar-blocks; for list-block the message is uploaded automatically based the function name.