summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/forms.inc.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-04-28 10:03:56 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-04-28 10:03:56 +0000
commit55d8804ff83518a46e6742ebd0ba6e0fa6df2d8b (patch)
tree497b1375f551fd74294265a401b95a2c093d297b /frontends/php/include/forms.inc.php
parent55963f6c918d2503019875cac9307091b908eaaa (diff)
downloadzabbix-55d8804ff83518a46e6742ebd0ba6e0fa6df2d8b.tar.gz
zabbix-55d8804ff83518a46e6742ebd0ba6e0fa6df2d8b.tar.xz
zabbix-55d8804ff83518a46e6742ebd0ba6e0fa6df2d8b.zip
- improved graphs, added 'Working time' displaying (Eugene)
- added 'Working time' configuration (Eugene) git-svn-id: svn://svn.zabbix.com/trunk@2786 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/forms.inc.php')
-rw-r--r--frontends/php/include/forms.inc.php25
1 files changed, 23 insertions, 2 deletions
diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php
index b876bce4..04bc9ab3 100644
--- a/frontends/php/include/forms.inc.php
+++ b/frontends/php/include/forms.inc.php
@@ -703,8 +703,7 @@
{
$frmGraph->AddVar("graphid",$_REQUEST["graphid"]);
- $result=DBselect("select g.graphid,g.name,g.width,g.height,g.yaxistype,".
- "g.yaxismin,g.yaxismax from graphs g where graphid=".$_REQUEST["graphid"]);
+ $result=DBselect("select * from graphs where graphid=".$_REQUEST["graphid"]);
$row=DBfetch($result);
$frmGraph->SetTitle(S_GRAPH." \"".$row["name"]."\"");
}
@@ -717,6 +716,7 @@
$yaxistype =$row["yaxistype"];
$yaxismin =$row["yaxismin"];
$yaxismax =$row["yaxismax"];
+ $showworkperiod = $row["show_work_period"];
} else {
$name =get_request("name" ,"");
$width =get_request("width" ,900);
@@ -724,11 +724,14 @@
$yaxistype =get_request("yaxistype",GRAPH_YAXIS_TYPE_CALCULATED);
$yaxismin =get_request("yaxismin" ,0.00);
$yaxismax =get_request("yaxismax" ,100.00);
+ $showworkperiod = get_request("show_work_period",1);
+
}
$frmGraph->AddRow(S_NAME,new CTextBox("name",$name,32));
$frmGraph->AddRow(S_WIDTH,new CTextBox("width",$width,5));
$frmGraph->AddRow(S_HEIGHT,new CTextBox("height",$height,5));
+ $frmGraph->AddRow(S_SHOW_WORKING_TIME,new CCheckBox("showworkperiod",$showworkperiod,NULL,NULL,1));
$cmbYType = new CComboBox("yaxistype",$yaxistype,"submit()");
$cmbYType->AddItem(GRAPH_YAXIS_TYPE_CALCULATED,S_CALCULATED);
@@ -1870,6 +1873,7 @@
$frmHouseKeep->SetHelp("web.config.housekeeper.php");
$frmHouseKeep->AddVar("config",get_request("config",0));
$frmHouseKeep->AddVar("refresh_unsupported",$config["refresh_unsupported"]);
+ $frmHouseKeep->AddVar("work_period",$config["work_period"]);
$frmHouseKeep->AddRow(S_DO_NOT_KEEP_ACTIONS_OLDER_THAN,
new CTextBox("alert_history",$config["alert_history"],8));
$frmHouseKeep->AddRow(S_DO_NOT_KEEP_EVENTS_OLDER_THAN,
@@ -1878,6 +1882,22 @@
$frmHouseKeep->Show();
}
+ function insert_work_period_form()
+ {
+ $config=select_config();
+
+ $frmHouseKeep = new CFormTable(S_WORKING_TIME,"config.php");
+ $frmHouseKeep->SetHelp("web.config.workperiod.php");
+ $frmHouseKeep->AddVar("config",get_request("config",7));
+ $frmHouseKeep->AddVar("alert_history",$config["alert_history"]);
+ $frmHouseKeep->AddVar("alarm_history",$config["alarm_history"]);
+ $frmHouseKeep->AddVar("refresh_unsupported",$config["refresh_unsupported"]);
+ $frmHouseKeep->AddRow(S_WORKING_TIME,
+ new CTextBox("work_period",$config["work_period"],35));
+ $frmHouseKeep->AddItemToBottomRow(new CButton("save",S_SAVE));
+ $frmHouseKeep->Show();
+ }
+
function insert_other_parameters_form()
{
$config=select_config();
@@ -1887,6 +1907,7 @@
$frmHouseKeep->AddVar("config",get_request("config",5));
$frmHouseKeep->AddVar("alert_history",$config["alert_history"]);
$frmHouseKeep->AddVar("alarm_history",$config["alarm_history"]);
+ $frmHouseKeep->AddVar("work_period",$config["work_period"]);
$frmHouseKeep->AddRow(S_REFRESH_UNSUPPORTED_ITEMS,
new CTextBox("refresh_unsupported",$config["refresh_unsupported"],8));
$frmHouseKeep->AddItemToBottomRow(new CButton("save",S_SAVE));