From 2bd2a0b597912994b44aaaba0d097549cbefd49c Mon Sep 17 00:00:00 2001 From: osmiy Date: Tue, 15 May 2007 10:06:22 +0000 Subject: - finished WEB monitoring (Eugene) - tested WEB monitoring (Eugene) git-svn-id: svn://svn.zabbix.com/trunk@4137 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/httpmon.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'frontends/php/httpmon.php') diff --git a/frontends/php/httpmon.php b/frontends/php/httpmon.php index 35d87a01..d9c516a6 100644 --- a/frontends/php/httpmon.php +++ b/frontends/php/httpmon.php @@ -198,21 +198,21 @@ include_once "include/page_header.php"; else $lastcheck = new CCol('-', 'center'); - if($httptest_data['curstate'] > 0) + if( HTTPTEST_STATE_BUSY == $httptest_data['curstate'] ) { - $step_data = get_httpstep_by_no($httptest_data['httptestid'], $httptest_data['curstate'] - 1); - $state = S_IN_CHECK.' "'.$step_data['name'].'" ['.$httptest_data['curstate'].' '.S_OF_SMALL.' '.$step_cout.']'; + $step_data = get_httpstep_by_no($httptest_data['httptestid'], $httptest_data['curstep']); + $state = S_IN_CHECK.' "'.$step_data['name'].'" ['.$httptest_data['curstep'].' '.S_OF_SMALL.' '.$step_cout.']'; $status['msg'] = S_IN_PROGRESS; $status['style'] = 'unknown'; } - else + else if( HTTPTEST_STATE_IDLE == $httptest_data['curstate'] ) { $state = S_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); + $step_data = get_httpstep_by_no($httptest_data['httptestid'], $httptest_data['lastfailedstep']); $status['msg'] = S_FAILED_ON.' "'.$step_data['name'].'" '. '['.$httptest_data['lastfailedstep'].' '.S_OF_SMALL.' '.$step_cout.'] '. ' '.S_ERROR.': '.$httptest_data['error']; @@ -224,6 +224,12 @@ include_once "include/page_header.php"; $status['style'] = 'enabled'; } } + else + { + $state = S_IDLE_TILL." ".date(S_DATE_FORMAT_YMDHMS,$httptest_data['nextcheck']); + $status['msg'] = S_UNKNOWN; + $status['style'] = 'unknown'; + } array_push($app_rows, new CRow(array( $_REQUEST["hostid"] > 0 ? NULL : SPACE, -- cgit