diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | TODO | 1 | ||||
-rw-r--r-- | frontends/php/actions.php | 8 | ||||
-rw-r--r-- | frontends/php/config.php | 10 | ||||
-rw-r--r-- | frontends/php/graph.php | 2 | ||||
-rw-r--r-- | frontends/php/hosts.php | 6 | ||||
-rw-r--r-- | frontends/php/include/config.inc.php | 22 | ||||
-rw-r--r-- | frontends/php/latest.php | 4 | ||||
-rw-r--r-- | frontends/php/media.php | 4 | ||||
-rw-r--r-- | frontends/php/screenedit.php | 4 | ||||
-rw-r--r-- | frontends/php/services.php | 16 | ||||
-rw-r--r-- | frontends/php/sysmap.php | 10 |
12 files changed, 48 insertions, 40 deletions
@@ -1,5 +1,6 @@ Changes for 1.0beta10: + - non breakable space in PHP forms (Alexei) - new draw type for graphs: Dot (Alexei) - improved media maintenance form (Alexei) - added sort order for custom graphs (Alexei) @@ -1,5 +1,6 @@ 1.0beta10: + - add to forms and other places - fix evaluation of trigger expressions - fix pinger - finish src/zabbix_snmptrapper diff --git a/frontends/php/actions.php b/frontends/php/actions.php index a5bc4d30..9b734f6e 100644 --- a/frontends/php/actions.php +++ b/frontends/php/actions.php @@ -162,7 +162,7 @@ } echo "<br>"; show_table2_header_begin(); - echo "New action"; + echo nbsp("New action"); show_table2_v_delimiter(); echo "<form method=\"get\" action=\"actions.php\">"; @@ -171,7 +171,7 @@ { echo "<input name=\"actionid\" type=\"hidden\" value=".$HTTP_GET_VARS["actionid"].">"; } - echo "Send message to"; + echo nbsp("Send message to"); show_table2_h_delimiter(); echo "<select class=\"biginput\" name=\"userid\" size=\"1\">"; @@ -191,7 +191,7 @@ echo "</select>"; show_table2_v_delimiter(); - echo "When trigger becomes"; + echo nbsp("When trigger becomes"); show_table2_h_delimiter(); echo "<select class=\"biginput\" name=\"good\" size=1>"; echo "<OPTION VALUE=\"1\""; if($good==1) echo "SELECTED"; echo ">ON"; @@ -223,7 +223,7 @@ echo "</SELECT>"; show_table2_v_delimiter(); - echo "Send if trigger's severity equal or more than (for host-based scope only)"; + echo nbsp("Use if trigger's severity equal or more than<br>(for host-based scope only)"); show_table2_h_delimiter(); echo "<select class=\"biginput\" name=\"severity\" size=1>"; echo "<OPTION VALUE=\"0\" "; if($severity==0) echo "SELECTED"; echo ">Not classified"; diff --git a/frontends/php/config.php b/frontends/php/config.php index 514393b6..73c0533c 100644 --- a/frontends/php/config.php +++ b/frontends/php/config.php @@ -80,12 +80,12 @@ show_table2_v_delimiter(); echo "<form method=\"get\" action=\"config.php\">"; - echo "Do not keep alerts older than (in days)"; + echo nbsp("Do not keep alerts older than (in days)"); show_table2_h_delimiter(); echo "<input class=\"biginput\" name=\"alert_history\" value=\"".$config["alert_history"]."\" size=8>"; show_table2_v_delimiter(); - echo "Do not keep alarms older than (in days)"; + echo nbsp("Do not keep alarms older than (in days)"); show_table2_h_delimiter(); echo "<input class=\"biginput\" name=\"alarm_history\" value=\"".$config["alarm_history"]."\" size=8>"; @@ -194,17 +194,17 @@ echo "<input class=\"biginput\" name=\"exec_path\" type=\"hidden\" value=\"$exec_path\">"; show_table2_v_delimiter(); - echo "SMTP server"; + echo nbsp("SMTP server"); show_table2_h_delimiter(); echo "<input class=\"biginput\" name=\"smtp_server\" value=\"".$smtp_server."\" size=30>"; show_table2_v_delimiter(); - echo "SMTP helo"; + echo nbsp("SMTP helo"); show_table2_h_delimiter(); echo "<input class=\"biginput\" name=\"smtp_helo\" value=\"".$smtp_helo."\" size=30>"; show_table2_v_delimiter(); - echo "SMTP email"; + echo nbsp("SMTP email"); show_table2_h_delimiter(); echo "<input class=\"biginput\" name=\"smtp_email\" value=\"".$smtp_email."\" size=30>"; } diff --git a/frontends/php/graph.php b/frontends/php/graph.php index 9221c7b9..d13b2218 100644 --- a/frontends/php/graph.php +++ b/frontends/php/graph.php @@ -199,7 +199,7 @@ echo "</SELECT>"; show_table2_v_delimiter(); - echo "Sort order (0->100)"; + echo nbsp("Sort order (0->100)"); show_table2_h_delimiter(); echo "<input class=\"biginput\" name=\"sortorder\" value=\"$sortorder\" size=3>"; diff --git a/frontends/php/hosts.php b/frontends/php/hosts.php index 59d6959d..f5db394e 100644 --- a/frontends/php/hosts.php +++ b/frontends/php/hosts.php @@ -278,12 +278,12 @@ echo "</select>"; show_table2_v_delimiter(); - echo "New group"; + echo nbsp("New group"); show_table2_h_delimiter(); echo "<input class=\"biginput\" name=\"newgroup\" size=20 value=\"$newgroup\">"; show_table2_v_delimiter(); - echo "Use IP address"; + echo nbsp("Use IP address"); show_table2_h_delimiter(); echo "<INPUT TYPE=\"CHECKBOX\" class=\"biginput\" NAME=\"useip\" $useip onChange=\"submit()\">"; @@ -329,7 +329,7 @@ echo "</select>"; show_table2_v_delimiter(); - echo "Use the host as a template"; + echo nbsp("Use the host as a template"); show_table2_h_delimiter(); echo "<select class=\"biginput\" name=\"host_templateid\" size=\"1\">"; echo "<option value=\"0\" selected>..."; diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php index 8b407207..a4809b67 100644 --- a/frontends/php/include/config.inc.php +++ b/frontends/php/include/config.inc.php @@ -25,6 +25,11 @@ $USER_DETAILS =""; $ERROR_MSG =""; + function nbsp($str) + { + return str_replace(" "," ",$str);; + } + function getmicrotime() { list($usec, $sec) = explode(" ",microtime()); @@ -1567,6 +1572,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; return DBexecute($sql); } + # Update Item status function update_item_status($itemid,$status) @@ -3355,17 +3361,17 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; if(($type==1)||($type==4)) { show_table2_v_delimiter(); - echo "SNMP community"; + echo nbsp("SNMP community"); show_table2_h_delimiter(); echo "<input class=\"biginput\" name=\"snmp_community\" value=\"$snmp_community\" size=16>"; show_table2_v_delimiter(); - echo "SNMP OID"; + echo nbsp("SNMP OID"); show_table2_h_delimiter(); echo "<input class=\"biginput\" name=\"snmp_oid\" value=\"$snmp_oid\" size=40>"; show_table2_v_delimiter(); - echo "SNMP port"; + echo nbsp("SNMP port"); show_table2_h_delimiter(); echo "<input class=\"biginput\" name=\"snmp_port\" value=\"$snmp_port\" size=5>"; } @@ -3407,7 +3413,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; if($type!=2) { show_table2_v_delimiter(); - echo "Update interval (in sec)"; + echo nbsp("Update interval (in sec)"); show_table2_h_delimiter(); echo "<input class=\"biginput\" name=\"delay\" value=\"$delay\" size=5>"; } @@ -3417,7 +3423,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; } show_table2_v_delimiter(); - echo "Keep history (in days)"; + echo nbsp("Keep history (in days)"); show_table2_h_delimiter(); echo "<input class=\"biginput\" name=\"history\" value=\"$history\" size=8>"; @@ -3440,7 +3446,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; echo "</SELECT>"; show_table2_v_delimiter(); - echo "Type of information"; + echo nbsp("Type of information"); show_table2_h_delimiter(); echo "<SELECT class=\"biginput\" NAME=\"value_type\" value=\"$value_type\" size=\"1\">"; echo "<OPTION VALUE=\"0\""; @@ -3454,7 +3460,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; if($type==2) { show_table2_v_delimiter(); - echo "Allowed hosts"; + echo nbsp("Allowed hosts"); show_table2_h_delimiter(); echo "<input class=\"biginput\" name=\"trapper_hosts\" value=\"$trapper_hosts\" size=40>"; } @@ -3613,7 +3619,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid"; echo "<input class=\"biginput\" type=\"password\" name=\"password1\" value=\"$password\" size=20>"; show_table2_v_delimiter(); - echo "Password (once again)"; + echo nbsp("Password (once again)"); show_table2_h_delimiter(); echo "<input class=\"biginput\" type=\"password\" name=\"password2\" value=\"$password\" size=20>"; diff --git a/frontends/php/latest.php b/frontends/php/latest.php index 4f500891..766ceec2 100644 --- a/frontends/php/latest.php +++ b/frontends/php/latest.php @@ -320,14 +320,14 @@ if($row["lastvalue"]-$row["prevvalue"]<0) { $str=convert_units($row["lastvalue"]-$row["prevvalue"],$row["units"],$row["multiplier"]); - $str=str_replace(" "," ",$str); + $str=nbsp($str); echo "<td>$str</td>"; // printf("<td>%0.2f</td>",$row["lastvalue"]-$row["prevvalue"]); } else { $str="+".convert_units($row["lastvalue"]-$row["prevvalue"],$row["units"],$row["multiplier"]); - $str=str_replace(" "," ",$str); + $str=nbsp($str); echo "<td>$str</td>"; // printf("<td>+%0.2f</td>",$row["lastvalue"]-$row["prevvalue"]); } diff --git a/frontends/php/media.php b/frontends/php/media.php index bd6641d8..6ca3280f 100644 --- a/frontends/php/media.php +++ b/frontends/php/media.php @@ -175,12 +175,12 @@ echo "</SELECT>"; show_table2_v_delimiter(); - echo "Send to"; + echo nbsp("Send to"); show_table2_h_delimiter(); echo "<input class=\"biginput\" name=\"sendto\" size=20 value='$sendto'>"; show_table2_v_delimiter(); - echo "Use if severity"; + echo nbsp("Use if severity"); show_table2_h_delimiter(); echo "<select multiple class=\"biginput\" name=\"severity[]\" size=\"5\">"; $selected=iif( (1&$severity) == 1,"selected",""); diff --git a/frontends/php/screenedit.php b/frontends/php/screenedit.php index d01d6bb3..1e314c4c 100644 --- a/frontends/php/screenedit.php +++ b/frontends/php/screenedit.php @@ -153,7 +153,7 @@ if($resource == 0) { show_table2_v_delimiter(); - echo "Graph name"; + echo nbsp("Graph name"); show_table2_h_delimiter(); $result=DBselect("select h.host,i.description,i.itemid from hosts h,items i where h.hostid=i.hostid and h.status in (0,2) and i.status=0 order by h.host,i.description"); echo "<select name=\"itemid\" size=1>"; @@ -175,7 +175,7 @@ if($resource == 1) { show_table2_v_delimiter(); - echo "Graph name"; + echo nbsp("Graph name"); show_table2_h_delimiter(); $result=DBselect("select graphid,name from graphs order by name"); echo "<select name=\"graphid\" size=1>"; diff --git a/frontends/php/services.php b/frontends/php/services.php index 807124e0..a6b1014b 100644 --- a/frontends/php/services.php +++ b/frontends/php/services.php @@ -239,7 +239,7 @@ echo "<input class=\"biginput\" name=\"name\" value=\"$name\" size=32>"; show_table2_v_delimiter(); - echo "Status calculation algorithm"; + echo nbsp("Status calculation algorithm"); show_table2_h_delimiter(); echo "<select class=\"biginput\" name=\"algorithm\" size=1>"; // if(isset($HTTP_GET_VARS["algorithm"])) @@ -275,7 +275,7 @@ echo "</SELECT>"; show_table2_v_delimiter(); - echo "Show SLA"; + echo nbsp("Show SLA"); show_table2_h_delimiter(); if($showsla==1) { @@ -288,12 +288,12 @@ } show_table2_v_delimiter(); - echo "Acceptable SLA (in %)"; + echo nbsp("Acceptable SLA (in %)"); show_table2_h_delimiter(); echo "<input class=\"biginput\" name=\"goodsla\" value=\"$goodsla\" size=6>"; show_table2_v_delimiter(); - echo "Link to trigger ?"; + echo nbsp("Link to trigger ?"); show_table2_h_delimiter(); if(isset($triggerid)&&($triggerid!="")) { @@ -330,7 +330,7 @@ echo "</SELECT>"; show_table2_v_delimiter(); - echo "Sort order (0->999)"; + echo nbsp("Sort order (0->999)"); show_table2_h_delimiter(); echo "<input class=\"biginput\" name=\"sortorder\" value=\"$sortorder\" size=3>"; @@ -364,7 +364,7 @@ echo "<br>"; show_table2_header_begin(); - echo "Link to ..."; + echo nbsp("Link to ..."); show_table2_v_delimiter(); echo "<form method=\"post\" action=\"services.php\">"; @@ -390,7 +390,7 @@ echo "</SELECT>"; show_table2_v_delimiter(); - echo "Soft link ?"; + echo nbsp("Soft link ?"); show_table2_h_delimiter(); // if(isset($HTTP_GET_VARS["softlink"])&&($HTTP_GET_VARS["triggerid"]!="")) // { @@ -414,7 +414,7 @@ echo "<br>"; show_table2_header_begin(); - echo "Add server details"; + echo nbsp("Add server details"); show_table2_v_delimiter(); echo "<form method=\"post\" action=\"services.php\">"; diff --git a/frontends/php/sysmap.php b/frontends/php/sysmap.php index 786bcaeb..95311d6e 100644 --- a/frontends/php/sysmap.php +++ b/frontends/php/sysmap.php @@ -287,12 +287,12 @@ echo "<input class=\"biginput\" name=\"label\" size=32 value=\"$label\">"; show_table2_v_delimiter(); - echo "Coordinate X"; + echo nbsp("Coordinate X"); show_table2_h_delimiter(); echo "<input class=\"biginput\" name=\"x\" size=5 value=\"$x\">"; show_table2_v_delimiter(); - echo "Coordinate Y"; + echo nbsp("Coordinate Y"); show_table2_h_delimiter(); echo "<input class=\"biginput\" name=\"y\" size=5 value=\"$y\">"; @@ -316,7 +316,7 @@ show_table2_v_delimiter(); echo "<form method=\"post\" action=\"sysmap.php?sysmapid=".$HTTP_GET_VARS["sysmapid"]."\">"; - echo "Host 1"; + echo nbsp("Host 1"); show_table2_h_delimiter(); // $result=DBselect("select shostid,label from sysmaps_hosts where sysmapid=".$HTTP_GET_VARS["sysmapid"]." order by label"); echo "<select class=\"biginput\" name=\"shostid1\" size=1>"; @@ -337,7 +337,7 @@ show_table2_v_delimiter(); // echo "<form method=\"get\" action=\"sysmap.php?sysmapid=".$HTTP_GET_VARS["sysmapid"].">"; - echo "Host 2"; + echo nbsp("Host 2"); show_table2_h_delimiter(); echo "<select class=\"biginput\" name=\"shostid2\" size=1>"; for($i=0;$i<DBnum_rows($result);$i++) @@ -349,7 +349,7 @@ echo "</SELECT>"; show_table2_v_delimiter(); - echo "Link status indicator"; + echo nbsp("Link status indicator"); show_table2_h_delimiter(); $result=DBselect("select triggerid,description from triggers order by description"); echo "<select class=\"biginput\" name=\"triggerid\" size=1>"; |