COREmanager Documentation

Main menu

 

General description

The main menu XML contains:

  • list of links to the panel modules;
  • home page address;
  • start form address;
  • general information — information about passwords, link to copyright, general localization messages.

In the current themes, the main menu is the overview page of the panel, consisting of the logo, menu, copyright, top bar and work frame, in which the modules are loaded.

Main menu in orion:

The main menu consists of groups of elements. These groups can be collapsed by clicking the group name or by clicking the "Collapse all" button.

The menu has three states: full, favorite, and popular. Buttons are used to switch between them.

The XML with the main menu carries the indication of the start page function. In some cases, the XML may also carry the function of the form to be opened.

XML description

XML COREmanager:

<doc lang="ru" func="desktop" binary="/core" host="https://127.0.01:1500" stylesheet="desktop" theme="/manimg/orion/" css="main.css" logo="logo.png" logolink="" favicon="favicon.ico" localdir="default/">
  <mainmenu level="30" name="Administrator" startpage="dashboard">
    <node name="srvset" bigsprite="yes" sprite="yes">
      <node name="product" action="product" type="list" popular="yes"/>
      <node name="plugin" action="plugin" type="list" popular="yes"/>
    </node>
    <node name="sysstat" bigsprite="yes" sprite="yes">
      <node name="sysinfo" action="sysinfo" type="list" popular="yes"/>
      <node name="longtask" action="longtask" type="list" popular="yes"/>
      <node name="request" action="request" type="list" popular="yes"/>
      <node name="session" action="session" type="list" popular="yes"/>
      <node name="journal" action="journal" type="list" popular="yes"/>
      <node name="authlog" action="authlog" type="list" favorite="yes" popular="yes"/>
      <node name="errorjournal" action="errorjournal" type="list" popular="yes"/>
      <node name="problems" action="problems" type="list" popular="yes"/>
    </node>
    <node name="set" bigsprite="yes" sprite="yes">
      <node name="srvparam" action="srvparam" type="form" popular="yes"/>
      <node name="brand" action="brand" type="form" popular="yes"/>
      <node name="usermenu" action="usermenu" type="list" popular="yes"/>
      <node name="usrparam" action="usrparam" type="form" popular="yes"/>
    </node>
    <node name="mgrhelp" bigsprite="yes" sprite="yes">
      <node name="changelog" action="changelog" type="list" popular="yes"/>
      <node name="community" function="http://forum.ispsystem.com/ru/index.php"/>
      <node name="handbook" function="http://ru.5.ispdoc.com/index.php/core-handbook-30"/>
    </node>
  </mainmenu>
  <user name="root" level="30" hostname="127.0.0.1:1500" lang="ru" dashboard="yes"/>
  <path level="30">root</path>
  <mgr version="5.8.1-08.08.13_10:51_IRKT">core</mgr>
  <version mgr="core">
    <core type="alpha">5.8.1-08.08.13_10:51_IRKT</core>
  </version>
  <messages name="desktop" checked="yes">...</messages>
  <pwgenlen>8</pwgenlen>
  <pwgencharacters>
    1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
  </pwgencharacters>
  <pwstrength>1</pwstrength>
  <copyright href="http://ispsystem.com/">ISPsystem &copy; 1997-2013</copyright>
  <tparams>
    <out>devel</out>
  </tparams>
</doc>

The mainmenu element

The mainmenu element contains a list of groups with menu elements.

The mainmenu attributes

@startpage contains the name of the start page (list) function.

@startform contains the start form function name.

The node (group) element

The node element contains a list of menu elements in this group.

Attributes of the node (group) element

@name — group name, sets group icon (name + '.png') and local message

@sprite indicates that the icon is in the sprite

@bigsprite indicates that the large icon near the module header is in the sprite

The node element

Contains information about the function of the module.

Attributes of the node element

@name sets the local message

@action sets the name of the function to be called

@function sets the link to open in a new window

@type specifies the type of function: list or form

@popular indicates that the element is in the popular menu

@favorite indicates that the element is in the favorite menu

Localization

The node elements are taken from localized messages by the value of the @name attribute with the menu_ prefix. Detailed messages of menu control elements: localized messages with the names hint_mautohide, hint_mbarall, hint_mbarfavorite, hint_mbarhide, hint_mbarpopular, hint_mbarshow, hint_mfixmenu.

The modernmenu element

Contains the list of menu items that can be either in a group or without a group. Used to display the menu in a new style. Can be enabled by clicking the icon next to the Favorites and Popular icons. Optional element.

The node (group) element

Contains a list of menu items. The behavior is similar to groups in mainmenu, except that the group with @type="noname" does not display the group name, and each menu item lies on the first level and has its own icon.

Attributes of the node (group) element

  • @name : group name. Sets the group icon and the local message (not used for @type="noname")
  • @type : can only have the noname value. The attribute indicates that:
    • the menu items in this group have their own icons and are on the first level;
    • the group does not have its own header or the ability to collapse, is indented from the other groups.

The node (menu item) element

Similar to the menu items from the mainmenu, except that the @name attribute is assigned not only a localized name, but also an individual item icon.

Example of XML for modernmenu
<mainmenu>
...
  <modernmenu>
  <node name="noname_file" type="noname">
    <node name="revisium_antivirus_func" action="revisium_antivirus_func" type="external"/>
    <node name="backup2.superlist" action="backup2.superlist" type="list"/>
    <node name="file" noapi="yes" action="file" type="list" favorite="yes"/>
  </node>
  <node name="noname_user" type="noname">
    <node name="user" action="user" type="list" favorite="yes" pin="yes"/>
    <node name="ftp.user" action="ftp.user" type="list" popular="yes"/>
  </node>
  <node name="noname_plugin" type="noname">
    <node name="plugin" action="plugin" type="form"/>
  </node>
  <node name="set">
    <node name="websettings" action="websettings" type="form" popular="yes"/>
    <node name="srvparam" action="srvparam" type="form"/>
    <node name="feature" action="feature" type="list" favorite="yes"/>
    <node name="phpversions" action="phpversions" type="list" pin="yes"/>
    <node name="ipaddrlist" action="ipaddrlist" type="list"/>
    <node name="aps.catalog" action="aps.catalog" type="list"/>
    <node name="dns.blacklist" action="dns.blacklist" type="list"/>
    <node name="emailnotify" action="emailnotify" type="form" popular="yes"/>
    <node name="panelsettings" action="panelsettings" type="form" popular="yes"/>
  </node>
</modernmenu>

Comments:

1 — menu item from a group with @type="noname"

2 — normal modernmenu group

Top panel

The top panel contains:

  • information about the alpha version of the panel and COREmanager;
  • host name;
  • information about the authorized user and the authorization nesting level;
  • links to panel settings, help pages, and session end.

The topmenu element

The element is responsible for displaying a dropdown menu in the upper right corner before the element displaying the host name.

Example of XML:

<topmenu name="project">
  <node name="ninja" img="p-ninjaon" action="usrparam" key="1" sprite="yes" active="yes"/>
  <node name="root" img="p-root" action="usrparam" key="2"/>
</topmenu>

Name element attributes

@name — name, used for localization

The node element

Describes the menu item.

Attributes of the node element

@name — menu item name, used for localization

@img — name of the picture to be displayed

@image — path to the picture if it is not in the theme

@action — name of the function to be called when the menu item is selected

@key — key to be passed as an elid parameter when selecting a menu item

@sprite — picture, located in the sprite

@active — active menu item

Localization

topmenu signature — message localized by @name attribute value

detailed topmenu message — message localized by @name attribute value with hint_ prefix

topmenu menu items messages — messages localized by @name attribute value

The usermenu element

Allows to insert additional links in the user menu. Links will be inserted in place of the "Log out" link.

XML:

<usermenu>
  <node name="login" action="logon" img="sb-logout"/>
  <node name="register" action="register" img="sb-logout"/>
</usermenu>

Example from orion:

The usermenu element

Contains a list of links

The node element

Describes the link

Attributes of the node element

@name — element name for localization

@action — name of the function to be called If @type is set, the module will open By default, the linked followed is MGRURL?func=@action

@img — name of the picture to be displayed on the left

@type sets the type of module to be opened

The path element

Contains information about the current authorized user and the level of authorization nesting (the user can log in under another user's account with lower permissions, and log in with an account with a lower level from under than the first user).

The @level attribute contains the user level. Each user level has its own icon (lv-[@level]). The element itself contains the user's login. The path elements are arranged in order of user level nesting.

If there is more than one path element, all but the first user login must be in the form of a link to follow under that user. When you click on the link you need to call the chlevel function with the lp parameter equal to the difference of the total number of path elements and the number of the current one (i.e. how many levels back you need to go). For example, in the image above to go back to root MGR_URL?func=chlevel&lp=1.

The user element

Contains information about the user. The @hostname attribute contains the host name.

The version element

Contains information about the product version and COREmanager version. It has child elements by panel name (for example: core, ipmgr, dnsmgr). Elements contain the @type attribute: if it is alpha, the version information must be displayed. The product name is taken from the element name and the version is taken from its content.

When you click on the "Help" link, the help function needs to be called in a new window with the topic parameter containing the name of the function of the active module. For example, MGR_URL?func=help&topic=usrparam. Then the control panel will redirect to the required documentation page. The link to the documentation can be external, then theform element will have the @helpurl attribute with the link to be opened in a new window. If the link has the _LANG_ macro, then the language needs to be changed to the current language.

Logout

To end the session, you need to call the logon function.

Localization

The top panel messages are localized messages named cpset, help2, logout.

Detailed top panel messages are localized messages with the names msg_cpset, msg_help, msg_logout.

Detailed messages for user level change elements — a localized message with the name msg_chlevel.

Contains copyright information: the @href attribute contains the link, and the content contains the text representation of the link. Located at the bottom of the main menu.

The pdf element

Indicates that the panel supports exporting reports to pdf.

The path to the logo is contained in the @logo attribute of the doc root element. If the @logolink attribute is not empty, when you click on the logo, the link from the attribute must be followed (the link is set up in branding).

Notifications

This is the block with the icons in the upper left corner.

Example from orion:

The notify function must be called to retrieve data about the block. The response from the control panel will contain an XML in the following format:

<doc stylesheet="notify" ...\>
  <messages name="notify">
    <msg name="hint_basket">My basket</msg>
    <msg name="hint_messages">My messages</msg>
    <msg name="hint_warning">Warning</msg>
  </messages>
  <notify>
    <item name="basket" action="longtask" img="p-newmsg" type="list">
      <msg>50</msg>
    </item>
    <item name="messages" action="journal" img="m-service" type="list">
      <msg>91</msg>
    </item>
    <item name="warning" action="problems" img="p-error" type="list">
      <msg>75</msg>
    </item>
  </notify>
  <timeout>30</timeout>
  <tparams>
    <out>devel</out>
    <func>notify</func>
  </tparams>
</doc>

The notify.xsl template is applied to this XML.

The notify element

Contains a list of notification elements. Read more inNotifications.