File:
0.02.12a/server/base/help.inc.php (
View as Code)
1: 2: $NATS_Help=array();
3:
4: function ha($id,$text)
5: {
6: global $NATS_Help;
7: $NATS_Help[strtoupper($id)]=$text;
8: }
9:
10: ha("FreeNATS","FreeNATS is a network monitoring package");
11:
12: ha("Node","A node is a system or device which you are monitoring. Note that nodes can have tests pointing to different physical devices and vice-versa");
13: ha("Node:Create","Create a new {node} with this {node:id|NodeID}");
14: ha("Node:ID","The NodeID is a unique text name for a {node}. Maximum length 60 chars and only normal characters allowed.");
15:
16: ha("Group","A group is a collection of one or more {node|nodes}. Note that nodes can be members of more than one group.");
17: ha("Group:Create","Create a new {group} with this name");
18:
19: ha("History:Should","A rough calculation based on 5 minute polling from the start to finish (or now if sooner)");
20:
21: ha("Variable","System variables are used to control the system environment. To delete a variable just save it with a blank name.");
22: ha("Var:log.level","The system log level - 10 is everything, 0 is fatal only. 5-6-ish is probably a good balance.");
23:
24: ha("Var:site.enable.interactive","Must be set (1) to allow interactive web sessions (like this one)");
25:
26: ha("Var:test.icmp.timeout","Timeout in seconds to wait for an ICMP response before declaring a failure in seconds (default 10)");
27: ha("Var:test.icmp.trytwice","If 1 the main tester will try a second ICMP test if the first failed before failing");
28:
29: ha("Var:retain.alert","Days to retain alert records for (default 356). Retain forever with value 0.");
30: ha("Var:retain.record","Days to retain test result records for use in history and graphs (default 356). Retain forever with value 0.");
31: ha("Var:retain.testrun","Days to retain test run records for (default 30). Retain forever with value 0.");
32: function hdisp($id,$html=true)
33: {
34: global $NATS_Help;
35: if (!isset($NATS_Help[strtoupper($id)])) return "";
36: $t=$NATS_Help[strtoupper($id)];
37: $o="";
38: $mode="text";
39: $linktext=false;
40: for ($a=0; $a 41: {
42: $c=$t[$a];
43:
44: if ($c=="{") // start of a link
45: {
46: $mode="link";
47: $linktext=false;
48: $linkid="";
49: $linktxt="";
50: }
51:
52: else if ( ($mode=="link") && ($c=="|") ) // in a link and move into text mode...
53: {
54: $linktext=true;
55: }
56:
57: else if ( ($mode=="link") && ($c=="}") ) // in a link and the end of the link
58: {
59: if (!$linktext) $linktxt=$linkid;
60: if ($html) $o.="";
61: $o.=$linktxt;
62: if ($html) $o.="";
63: $mode="text";
64: }
65:
66: else if ( $mode=="link" ) // in a link
67: {
68: if ($linktext) $linktxt.=$c;
69: else $linkid.=$c;
70: }
71:
72: else // in text
73: $o.=$c;
74: }
75: return $o;
76: }
77:
78: function hlink($id,$size=16)
79: {
80: global $NATS_Help;
81: if (isset($NATS_Help[strtoupper($id)]))
82: return "";
83:
84: return "";
85: }
86:
87: function ph($id,$size=16)
88: {
89: echo hlink($id,$size);
90: }
91: ?>