r1145 + adjusting help text further
[racktables] / inc / help.php
CommitLineData
fe339610
DO
1<?
2/*
3*
4* This file contains help rendering functions for RackTables.
5*
6*/
7
8// Generate a link to the help tab.
9function genHelpLink ($tabno)
10{
11 global $root;
12 return "${root}?page=help&tab=${tabno}";
13}
14
15// Checks if a topic is present for page and tab and render a hinting element;
16// do nothing otherwise.
17function lookupHelpTopic ($pageno, $tabno)
18{
19 global $helptab;
20 if (!isset ($helptab[$pageno][$tabno]))
21 return;
ae9a3784 22 echo "<li style='position: absolute; top: 80px; right: 0px;'><a style='background-color: #f0f0f0; border: 0;' href='" . genHelpLink ($helptab[$pageno][$tabno]);
fe339610
DO
23 echo "' alt='Help' title='Help is available for this page'>";
24 printImageHREF ('helphint');
ae9a3784 25 echo '</a>';
fe339610
DO
26 return;
27}
28
29// Prints the help page content.
30function renderHelpTab ($tabno)
31{
32 switch ($tabno)
33 {
34//------------------------------------------------------------------------
35 case 'default':
36 startPortlet ('Hello there!');
37 echo '
38This is the help system of a working RackTables installation. Select one of the
39tabs above to find information on specific topics. If you are new to this
40software, just follow to the next tab.
41';
42 finishPortlet();
43 break;
44//------------------------------------------------------------------------
45 case 'quickstart':
491dbf66 46 startPortlet ('The 1st rack');
fe339610
DO
47 echo
48'
49The datacenter world is built up from resources. The first resource to start
491dbf66 50with is rackspace, which in turn is built up from racks. To create your first
fe339610
DO
51rack, open Configuration->Dictionary page and go to "Edit words" tab.
52<p>
53Here you see a bunch of portlets, each holding some odd data. The one you need
54right now is called "RackRow (3)". The only thing you need to do now is to think
55about the name you want to assign to the first group of your racks and to type
56it into the form and press OK. This can be changed later, so a simple "server
57room" is Ok.
58<p>
59Now get back to the main page and head into Rackspace page. You will see you
60rack row with zero racks. Click it and go to "Add new rack" tab. This is the
491dbf66
DO
61moment where you create the rack itself, supplying its name and height. The rack
62is empty.
fe339610 63';
491dbf66
DO
64 finishPortlet();
65 startPortlet ('The 1st object');
66 echo
67'
68To populate the rack, you need some stuff called objects. Let\'s assume you
69have a server.
70';
71 finishPortlet();
fe339610
DO
72 break;
73//------------------------------------------------------------------------
74 case 'rackspace':
75 startPortlet ('Rack design');
76 echo
77 "Rack design defines the physical layout of a rack cabinet. " .
78 "Most common reason to use the tab is absence of back rails, although " .
79 "any other design can be defined.<p>" .
80 "In this tab you can change mounting atoms' state between 'free' and 'absent'.<br>" .
81 "A selected checkbox means atom presence.";
82 finishPortlet();
83 startPortlet ('Rackspace problems');
84 echo
85 "Rack problems prevent free rackspace from being used for mounting. Such rackspace is considered " .
86 "unusable. After the problem is gone, the atom can become free again. " .
87 "In this tab you can change atoms' state from free to unusable and back.<br>" .
88 "A selected checkbox means a problem.";
89 finishPortlet();
90 break;
491dbf66
DO
91//------------------------------------------------------------------------
92 case 'workflow':
93 startPortlet ('People');
94 echo
95'
96<div class=helptext>
97<ul>
98 <li>Datacenter engineers</li>
99 <li>System administrators</li>
100 <li>Network administrators</li>
101 <li>Helpdesk</li>
102</ul>
103</div>
104';
105 finishPortlet();
106 startPortlet ('Common tasks');
107 echo
108'
109<div class=helptext>
110<ul>
111 <li>Resource allocation</li>
112 <li>Search</li>
113 <li>Changes tracking</li>
114</ul>
115</div>
116';
117 finishPortlet();
118 startPortlet ('Effective collaboration and best practices');
119 echo
120'
121<div class=helptext>
122<ul>
123 <li>Resource allocation</li>
124 <li>Search</li>
125 <li>Changes tracking</li>
126</ul>
127</div>
128';
129 finishPortlet();
130 break;
131//------------------------------------------------------------------------
132 case 'objects':
133 startPortlet ('Object life cycle');
134 echo
135'
136<div class=helptext>
137<ul>
138 <li>Creation</li>
139 <li>Resource allocation</li>
140 <li>Possible changes</li>
141 <li>Retiring</li>
142</ul>
143</div>
144';
145 finishPortlet();
146 break;
fe339610
DO
147//------------------------------------------------------------------------
148 default:
149 startPortlet ('Oops!');
150 echo "There was no help text found for help tab '${tabno}' in renderHelpTab().";
151 finishPortlet();
152 break;
153//------------------------------------------------------------------------
154 }
155}
156
157?>