summaryrefslogtreecommitdiffstats
path: root/frontends
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-05-14 10:39:04 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-05-14 10:39:04 +0000
commit98d6bd2a2a74500aca4dc08403f01f69caf6f36e (patch)
treeb320911b4f919e72d83c312d99200e84cd578fcd /frontends
parent9277e40994703347caafd46b75a58df75f269340 (diff)
downloadzabbix-98d6bd2a2a74500aca4dc08403f01f69caf6f36e.tar.gz
zabbix-98d6bd2a2a74500aca4dc08403f01f69caf6f36e.tar.xz
zabbix-98d6bd2a2a74500aca4dc08403f01f69caf6f36e.zip
- improved history.php (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1770 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends')
-rw-r--r--frontends/php/history.php72
1 files changed, 19 insertions, 53 deletions
diff --git a/frontends/php/history.php b/frontends/php/history.php
index 627c48d1..fd7366b8 100644
--- a/frontends/php/history.php
+++ b/frontends/php/history.php
@@ -89,64 +89,30 @@
?>
<?php
+ if(!isset($_GET["config"]))
+ {
+ $_GET["config"]=0;
+ }
+
+# $h1=S_CONFIGURATION_OF_USERS_AND_USER_GROUPS;
$item=get_item_by_itemid($_GET["itemid"]);
$h1="<A HREF='latest.php?hostid=$hostid'>$host</A> : $description";
- show_table_header($h1);
-
- $h1="";
- if($_GET["action"] =="showhistory")
- {
- $h1=$h1."<b>[<A HREF=\"history.php?action=showhistory&itemid=".$_GET["itemid"]."\">".S_LAST_HOUR_GRAPH."</A>]</b> ";
- }
- else
- {
- $item=get_item_by_itemid($_GET["itemid"]);
- if($item["value_type"] == 0)
- {
- $h1=$h1."<A HREF=\"history.php?action=showhistory&itemid=".$_GET["itemid"]."\">".S_LAST_HOUR_GRAPH."</A> ";
- }
- }
- if($_GET["action"] =="showhistory2")
- {
- $h1=$h1."<b>[<A HREF=\"history.php?action=showhistory2&itemid=".$_GET["itemid"]."\">".S_LAST_HOUR_GRAPH_DIFF."</A>]</b> ";
- }
- else
- {
- $item=get_item_by_itemid($_GET["itemid"]);
- if($item["value_type"] == 0)
- {
- $h1=$h1."<A HREF=\"history.php?action=showhistory2&itemid=".$_GET["itemid"]."\">".S_LAST_HOUR_GRAPH_DIFF."</A> ";
- }
- }
- if($_GET["action"] =="showvalues")
- {
- $h1=$h1."<b>[<A HREF=\"history.php?action=showvalues&itemid=".$_GET["itemid"]."&period=3600\">".S_VALUES_OF_LAST_HOUR."</A>]</b> ";
- }
- else
- {
- $h1=$h1."<A HREF=\"history.php?action=showvalues&itemid=".$_GET["itemid"]."&period=3600\">".S_VALUES_OF_LAST_HOUR."</A> ";
- }
- if($_GET["action"] =="showfreehist")
- {
- $h1=$h1."<b>[<A HREF=\"history.php?action=showfreehist&itemid=".$_GET["itemid"]."\">".S_VALUES_OF_SPECIFIED_PERIOD."</A>]</b> ";
- }
- else
- {
- $h1=$h1."<A HREF=\"history.php?action=showfreehist&itemid=".$_GET["itemid"]."\">".S_VALUES_OF_SPECIFIED_PERIOD."</A> ";
- }
- if($_GET["action"] =="showplaintxt")
- {
- $h1=$h1."<b>[<A HREF=\"history.php?action=showplaintxt&itemid=".$_GET["itemid"]."\">".S_VALUES_IN_PLAIN_TEXT_FORMAT."</A>]</b> ";
- }
- else
- {
- $h1=$h1."<A HREF=\"history.php?action=showplaintxt&itemid=".$_GET["itemid"]."\">".S_VALUES_IN_PLAIN_TEXT_FORMAT."</A> ";
- }
- show_table_header($h1);
- echo "<br>";
+# $h2=S_GROUP."&nbsp;";
+ $h2="<input class=\"biginput\" name=\"itemid\" type=\"hidden\" value=\"".$_GET["itemid"]."\">";
+ $h2=$h2."<select class=\"biginput\" name=\"action\" onChange=\"submit()\">";
+ $h2=$h2."<option value=\"showhistory\" ".iif(isset($_GET["action"])&&$_GET["action"]=="showhistory","selected","").">".S_LAST_HOUR_GRAPH;
+ $h2=$h2."<option value=\"showhistory2\" ".iif(isset($_GET["action"])&&$_GET["action"]=="showhistory2","selected","").">".S_LAST_HOUR_GRAPH_DIFF;
+ $h2=$h2."<option value=\"showvalues\" ".iif(isset($_GET["action"])&&$_GET["action"]=="showvalues","selected","").">".S_VALUES_OF_LAST_HOUR;
+ $h2=$h2."<option value=\"showfreehist\" ".iif(isset($_GET["action"])&&$_GET["action"]=="showfreehist","selected","").">".S_VALUES_OF_SPECIFIED_PERIOD;
+ $h2=$h2."<option value=\"showplaintxt\" ".iif(isset($_GET["action"])&&$_GET["action"]=="showplaintxt","selected","").">".S_VALUES_IN_PLAIN_TEXT_FORMAT;
+ $h2=$h2."</select>";
+
+ show_header2($h1, $h2, "<form name=\"selection\" method=\"get\" action=\"history.php\">", "</form>");
+?>
+<?php
if($_GET["action"]=="showfreehist")
{
if(!isset($_GET["period"]))