diff options
author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-01-31 16:06:09 +0000 |
---|---|---|
committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-01-31 16:06:09 +0000 |
commit | 5298227fab3d35cccaf6511f1e8766f3beaa3709 (patch) | |
tree | 36399ce27c226d92e83701e72afc738a79537272 /frontends/php/httpmon.php | |
parent | 771bd2ca1c72c0a6b0289a0b1f871d33387bcec9 (diff) | |
download | zabbix-5298227fab3d35cccaf6511f1e8766f3beaa3709.tar.gz zabbix-5298227fab3d35cccaf6511f1e8766f3beaa3709.tar.xz zabbix-5298227fab3d35cccaf6511f1e8766f3beaa3709.zip |
improoved draft version of httpmonitoring
git-svn-id: svn://svn.zabbix.com/trunk@3777 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/httpmon.php')
-rw-r--r-- | frontends/php/httpmon.php | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/frontends/php/httpmon.php b/frontends/php/httpmon.php index 809aa9c6..8819b47b 100644 --- a/frontends/php/httpmon.php +++ b/frontends/php/httpmon.php @@ -26,6 +26,7 @@ $page["title"] = "S_STATUS_OF_WEB_MONITORING"; $page["file"] = "httpmon.php"; + define('ZBX_PAGE_DO_REFRESH', 1); include_once "include/page_header.php"; @@ -189,24 +190,45 @@ include_once "include/page_header.php"; $name = array(); array_push($name, new CLink($httptest_data["name"],"httpdetails.php?httptestid=".$httptest_data['httptestid'],'action')); - - $status=new CCol(new CLink(httptest_status2str($httptest_data["status"]), - "?group_httptestid%5B%5D=".$httptest_data["httptestid"]. - "&hostid=".$_REQUEST["hostid"]. - "&group_task=".($httptest_data["status"] ? "Activate+selected" : "Disable+selected"), - httptest_status2style($httptest_data["status"]))); $step_cout = DBfetch(DBselect('select count(*) from httpstep where httptestid='.$httptest_data["httptestid"])); $step_cout = $step_cout[0]; + if(isset($httptest_data["lastcheck"])) + $lastcheck = date(S_DATE_FORMAT_YMDHMS,$httptest_data["lastcheck"]); + else + $lastcheck = new CCol('-', 'center'); + + if($httptest_data['curstate'] > 0) + { + $step_data = get_httpstep_by_no($httptest_data['httptestid'], $httptest_data['curstate'] - 1); + $state = 'In check "'.$step_data['name'].'"'; + } + else + { + $state = "Idle till ".date(S_DATE_FORMAT_YMDHMS,$httptest_data['nextcheck']); + } + + if($httptest_data['lastfailedstep'] > 0) + { + $step_data = get_httpstep_by_no($httptest_data['httptestid'], $httptest_data['lastfailedstep'] - 1); + $status['msg'] = 'Failed on "'.$step_data['name'].'"'; + $status['style'] = 'disabled'; + } + else + { + $status['msg'] = 'OK'; + $status['style'] = 'enabled'; + } + array_push($app_rows, new CRow(array( $_REQUEST["hostid"] > 0 ? NULL : SPACE, array(str_repeat(SPACE,6), $name), $step_cout, - "TODO: Idle till TT || In check (X of Z)", // TODO!!! - "TODO: TT", // TODO!!! - "TODO: failed on step X of Z || OK" // TODO!!! + $state, + $lastcheck, + new CSpan($status['msg'], $status['style']) ))); } if($httptest_cnt > 0) |