Main page (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.
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 attribute
A unique block name. It is used for identifying blocks in the Dashboard. It is also used for languages.
position attribute
Describes 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 attribute
Block type.
Possible values:
toolbar — control panel
list — list
report — report
url — random html
autoupdate attribute
Sets the block update timeout, in seconds.
update attribute
Sets the block update when switching to the dashboard.
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:
window
if set, the button opens a new window (attribute value — function name)
link
if set, the button links to the url specified in the attribute
target
standard link attribute, used together with link
top
if set, overloads the contents of the current window (attribute value — function name)
form
if specified, the button will open a form (the value of the attribute is a function name)
list
if specified, the button will open a list (the value of the attribute is a function name)
img
name of the icon
name
unique 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).
The tag has the following attributes:
func attribute
function name (action name), which data should be shown in that block
rows attribute
limits the number of rows to be displayed on the Dashboard
The toolbtn element
Describes a button.
name attribute
Button 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.
name attribute
Column name; must correspond to the column name of the specified function (action) — see the func attribute of the list-block.
Block-html description (url)
Example of block-html description (type="url")
<block name="journal" position="top" type="url">
<url>https://ispsystem.com/journal?manager=__manager__</url>
</block>
Block-html is designed to insert random html from a given address. It contains one tag: (address of random html).
__manager__
Short name of the manager (for example: core, ispmgr)
__version__
Panel version
__os__
Operating system (for example, Debian, FreeBSD, CentOS)
__arch__
Operating system architecture
__os_version__
Operating system version
Please note that if the panel is accessed via https, the browser will block http addresses and https addresses with a suspicious certificate.
The infolist block type
Values in this list are divided into groups.
XML:
<metadata name="dashboard.info" type="infolist" mgr="billmgr" dashboard="yes">
<rowdata>
<rowgroup name="acc_info">
<row name="id" type="data"/>
<row name="regdate" type="data"/>
<row name="phone" type="data/>
</rowgroup>
<rowgroup name="personal_account">
<row name="provider" type="data/>
<row name="balance" type="link"/>
<row name="annual_turnover" type="data"/>
</rowgroup>
<rowgroup name="service">
<row name="services" type="indicator" view="brackets"/>
</rowgroup>
</rowdata>
</metadata>
<elem>
<id>XXX</id>
<regdate>2013-05-08</regdate>
<phone/>
<provider>FirstDEDIC</provider>
<balance func="payment.add">0.0000 RUB</balance>
<annual_turnover>0.0000 RUB</annual_turnover>
<services_total>80</services_total>
<services_used color="red">10</services_used>
</elem>
The rowgroup element
The elements are grouped according to a certain logic.
rowgroup attributes
name attribute
an element name. It is used for group's name localization.
The row element
Describes a raw.
row attributes
name attribute
an element name. It is used for row's name localization.
type attribute
specifies a data type. Possible values: data, link, indicator
Description of types:
- data — plain 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
view attribute
only for the indicator type, if it is set to brackets, show the indicator as 80 (10)
Message description
Most Dashboard messages are uploaded automatically according to the function name. However, some messages 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 heading
msg 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 on the function name.
General recommendations
COREmanager allows you to log in with the name and password of the server administrator (superuser). Often, however, most of the control panel functions are only available to users with administrator privileges. Therefore, it is recommended to create a button for quick access to the Control Panel with administrator rights from the superuser's main page.