diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-05-31 14:28:45 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-05-31 14:28:45 +0000 |
| commit | bfb41b23166d700a588f192bd0ad6e819595adba (patch) | |
| tree | 1c47a9bd2077047e9da96dfa5dfb3000a4d6c22c /frontends/php/include/forms.inc.php | |
| parent | 100ead984d87b8d482709fcea91e49d677dbb50b (diff) | |
| download | zabbix-bfb41b23166d700a588f192bd0ad6e819595adba.tar.gz zabbix-bfb41b23166d700a588f192bd0ad6e819595adba.tar.xz zabbix-bfb41b23166d700a588f192bd0ad6e819595adba.zip | |
- improved graphs, added selector of data calculation function (Eugene)
NOTE: don't finished historical graphs
git-svn-id: svn://svn.zabbix.com/trunk@2933 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/forms.inc.php')
| -rw-r--r-- | frontends/php/include/forms.inc.php | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php index 2e9c5706..719b9a8d 100644 --- a/frontends/php/include/forms.inc.php +++ b/frontends/php/include/forms.inc.php @@ -822,7 +822,7 @@ if(isset($_REQUEST["gitemid"])) { - $result=DBselect("select itemid,color,drawtype,sortorder,yaxisside from graphs_items". + $result=DBselect("select itemid,color,drawtype,sortorder,yaxisside,calc_fnc,show_history,history_len from graphs_items". " where gitemid=".$_REQUEST["gitemid"]); $row=DBfetch($result); @@ -835,6 +835,9 @@ $drawtype = $row["drawtype"]; $sortorder = $row["sortorder"]; $yaxisside = $row["yaxisside"]; + $calc_fnc = $row["calc_fnc"]; + $show_history = $row["show_history"]; + $history_len = $row["history_len"]; } else { @@ -843,6 +846,9 @@ $drawtype = get_request("drawtype", 0); $sortorder = get_request("sortorder", 0); $yaxisside = get_request("yaxisside", 1); + $calc_fnc = get_request("calc_fnc", 2); + $show_history = get_request("show_history", 0); + $history_len = get_request("history_len", 5); } @@ -864,6 +870,13 @@ } $frmGItem->AddRow(S_PARAMETER, $cmbItems); + $cmbFnc = new CComboBox("calc_fnc",$calc_fnc); + $cmbFnc->AddItem(CALC_FNC_ALL, S_ALL_SMALL); + $cmbFnc->AddItem(CALC_FNC_MIN, S_MIN_SMALL); + $cmbFnc->AddItem(CALC_FNC_AVG, S_AVG_SMALL); + $cmbFnc->AddItem(CALC_FNC_MAX, S_MAX_SMALL); + $frmGItem->AddRow(S_FUNCTION, $cmbFnc); + $cmbType = new CComboBox("drawtype",$drawtype); $cmbType->AddItem(0,get_drawtype_description(0)); $cmbType->AddItem(1,get_drawtype_description(1)); @@ -892,6 +905,21 @@ $frmGItem->AddRow(S_SORT_ORDER_1_100, new CTextBox("sortorder",$sortorder,3)); + $cmbHist = new CComboBox("show_history",$show_history,"submit()"); + $cmbHist->AddItem(0,S_NO); + $cmbHist->AddItem(1,S_DAILY); + $cmbHist->AddItem(2,S_WEEKLY); + $cmbHist->AddItem(3,S_MONTHLY); + $frmGItem->AddRow(S_SHOW_HISTORY, $cmbHist); + + switch($show_history) + { + case 1: $frmGItem->AddRow(S_LAST_DAYS, new CTextBox("history_len",$history_len, 15)); break; + case 2: $frmGItem->AddRow(S_LAST_WEEKS, new CTextBox("history_len",$history_len, 15)); break; + case 3: $frmGItem->AddRow(S_LAST_MONTHS, new CTextBox("history_len",$history_len,15)); break; + default: $frmGItem->AddVar("history_len",$history_len); + } + $frmGItem->AddItemToBottomRow(new CButton("save",S_SAVE)); $frmGItem->AddItemToBottomRow(SPACE); if(isset($itemid)) |
