New VZCC/VZPP pages are created by adding new *.xsl files to the C:\Program Files\SWSoft\vzcp\xsl\screens directory inside the Service VPS. Since these xsl
files are written specifically for the XML generated by vzagent, it is recommended not to create new files from scratch but use existing files as a starting point. In this subsection, we will consider a situation when you want to add a new dashboard to your VZPP, say, for housing external links related to your business. So, here is what you should do (we suppose that you are working inside the Service VPS):
Note: The C:\Program Files\SWSoft\vzcp\xsl\screens directory inside the Service VPS contains the *.xsl files common for both VZCC and VZPP. However, there are some *.xsl files used for creating VZCC pages only. These files are located in the
C:\Program Files\SWSoft\vzcp\xsl\screens\cc directory in the Service VPS. Decide on any existing VZPP dashboard file and make a copy of it in the C:\Program
Files\SWSoft\vzcp\xsl\screens directory. For example, you can copy the
vps.xsl file to be a basis for your new page and call it my_dash.xsl.
Open the newly-created file for editing by means of a text editor (e.g. Notepad). Find the following line in the file:
<ui:screen id="07.03.00.00" title="{sw:text('VPS Management')}" icon="vps_management" cred="/vps/management">
and change the value of the following attributes:
id. When defining the id values for your own VZPP pages, you should leave the first dyad intact (it identifies VZPP as a module), change the second one to a large number (to identify your personal screens), and have the last two ones at your choice (they would identify different subscreens within the group of your personal screens). Thus, your may define the following ID for your VZPP page:
<ui:screen id="07.99.01.00" …>
title. Change the value of the attribute to what you wish to be reflected as the title of your dashboard on the VZPP page.
icon. Change the value of the attribute to point to the icon file you wish to be displayed to the left of the dashboard title. The icon file itself should be placed to the
C:\Program
Files\SWSoft\vzcp\static\vz\skins\<skin_name>\icons folder with the following name mask: <id>_32.gif. The id value of this mask should be entered as the value of the select attribute instead of the vps_management string.
Note: There are a number of subdirectories in the C:\Program
Files\SWSoft\vzcp\static\vz\skins\ directory. One subdirectory corresponds to one VZPP skin defining such VZPP elements as its general layout, icons and images, and the color palette. Therefore, to allow your new icon to be displayed when using any of the existing skins, you should place the icon file in each subdirectory.
cred. Optional. Change the ID of the cred attribute responsible for granting VPS administrators access to this link on the VZPP menu. This ID should be specified in the
C:\Program Files\SWSoft\vzcp\etc\vzcpcon.conf\vzcpcon.conf
file inside the Service VPS between the <auth> and </auth> tags. Detailed information on the cred attribute is provided in the Adding VZCC/VZPP Links subsection (on page 160).
Inasmuch as there is no need in connecting to any VPS for displaying any dashboard page, and so vzagent is not involved in the process, vzcpcon uses not the XML response from
vzagent to build an HTML page, but the static C:\Program
Files\SWSoft\vzcp\etc\pp\dashboard.xml file. So, you further need to define your dashboard in this file. Open it for editing by means of any editor (for example, of
Notepad).
Note: While adding a new VZCC page, you should work with the dashboard.xml file located in the C:\Program Files\SWSoft\vzcp\etc\cc\ directory.
There are four <dashboard> elements defined in this file, including the top dashboard providing links to the three others.
Copy one of the children <dashboard> elements inside the file to provide a basis for defining your own dashboard, for example, the Services dashboard:
<!-- VPS Services dashboard -->
<dashboard id="07.04.01.00" name="VPS Services" cred="/vps/services"> <item href="$baseurl/services" title="System Services"
icon="services" tip="srv_screen" cred="system_services" platform="linux">
<text>On this screen you may manage various services in this VPS.</text>
</item>
<item href="$baseurl/proc" title="System Processes" icon="processes"
tip="proc_screen" cred="system_processes">
<text>On this screen you may check processes currently running in your VPS and send them system signals.</text> </item>
… </dashboard>
Now edit this dashboard definition to reflect your own template: Edit the commentary describing your dashboard;
Edit the value of the id attribute of the <dashboard> element to reflect the screen ID you have specified in the my_dash.xsl file;
Edit the value of the name attribute of the <dashboard> element to provide a good description to your dashboard. There are no restrictions as to what this name should be; Create as many <item> elements as the number of links on your dashboard;
Edit the value of the href attribute of each <item> element. This will be the value of the href attribute of the <a> element in the resulting HTML. You may specify an absolute path here as well.
Edit the value of the title attribute of each <item> element. This will be the text between the <a> and </a> tags in the resulting HTML.
Edit the value of the icon attribute of each <item> element to point to the icon you wish to be displayed to the left of the title. See above for details on how this value should be specified.
Edit the value of the tip attribute of each <item> element to display the brief description of the page currently opened in VZPP. The value of the tip attribute should be specified as the id attribute of the <tip> element in the
C:\vz\private\1\root\Program Files\SWSoft\vzcp\etc\tips.xml
file inside the Service VPS.
Edit the value of the cred attribute of each <item> element, if any, to grant a VPS administrator access to the VZPP page. Detailed information on the cred attribute is provided in the Adding VZCC/VZPP Links subsection (on page 160).
Enter win32 as the value of the platform attribute of each <item> element if you wish the link defined by this <item> element to be available on Windows Hardware Nodes only. Otherwise, remove this attribute from the <item> element.
You may additionally define the target attribute for any <item> element that would be copied as the target attribute for the <a> element in the resulting HTML.
Edit the text between the <text> and </text> tags for each <item> element. This will be the description of your link on the HTML page.
At last you have to create an additional <item> element for the top dashboard. For example, you may define it as follows:
<item href="$baseurl/my_link" title="External Links" icon="external_links">
<text>
Various external links gathered for your convenience. </text>
</item>
That is almost all about creating a new dashboard of yours. You may now access it by typing https://<Service_VPS_IP_address_or_hostname>:<TCP_port>/cp/my_dash
into the address line of your browser or by following the proper link from the top VZPP dashboard. However, after creating your new dashboard, you may naturally want to provide a link to it in the left VZPP menu. Please consult the Adding VZCC/VZPP Links subsection (on page 160) to know how to add your own links to the VZPP menu.