-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcreate_template_documentation
executable file
·57 lines (45 loc) · 1.47 KB
/
create_template_documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
rm -rf documentation
mkdir documentation
cat > documentation/index.html <<'EOF'
<script type="text/javascript">
<!--//
function goToPage763(mySelect){
PageIndex2=mySelect.selectedIndex;
{
if( mySelect.options[PageIndex2].value != "none")
{
frames['iframe2'].location.href = mySelect.options[PageIndex2].value;
}
}
}
//-->
</script>
<form name="form763">
<p>
Template:
<select name="select763" size="1" onchange="goToPage763(this.form.select763)">
<option value="none" selected="selected"> Select a page and go </option>
EOF
for i in Custom*.xml; do
DOCUFILE="documentation/${i%%.xml}.html"
DOCUFILE="$(echo $DOCUFILE|tr ' ' '_')"
xalan -in "$i" -out $DOCUFILE -xsl transform.xsl;
echo "<option value=\"$(echo ${i%%.xml}|tr ' ' '_').html\"> ${i%%.xml}</option>" >> documentation/index.html
done
cat >> documentation/index.html <<'EOF'
</select>
</p>
<p>
<!-- The code below is the code in the body of this document that writes the form-->
<iframe name="iframe2" src="start.html" align="top" height="90%" width="99%" hspace="10" vspace="10" align="left">
If you can see this, your browser does not support iframes!
</iframe>
<a href="http://www.zabbix.com/documentation/3.2/manual/config/items" target="_new">Zabbix Manual: Items </a></BR>
<a href="http://www.zabbix.com/documentation/3.2/manual/config/triggers" target="_new">Zabbix Manual: Triggers </a>
</p>
</form>
EOF
cat > documentation/start.html <<'EOF'
Please select a template...
EOF