diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-05-15 10:06:22 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-05-15 10:06:22 +0000 |
| commit | 2bd2a0b597912994b44aaaba0d097549cbefd49c (patch) | |
| tree | c557188a0ccff743418ed973b81becfa018770f6 /frontends/php/include/httptest.inc.php | |
| parent | 4894534baa0876a46909fb4429093a2289a4d9ef (diff) | |
| download | zabbix-2bd2a0b597912994b44aaaba0d097549cbefd49c.tar.gz zabbix-2bd2a0b597912994b44aaaba0d097549cbefd49c.tar.xz zabbix-2bd2a0b597912994b44aaaba0d097549cbefd49c.zip | |
- finished WEB monitoring (Eugene)
- tested WEB monitoring (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@4137 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/httptest.inc.php')
| -rw-r--r-- | frontends/php/include/httptest.inc.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/frontends/php/include/httptest.inc.php b/frontends/php/include/httptest.inc.php index 409d992a..2c03a4cf 100644 --- a/frontends/php/include/httptest.inc.php +++ b/frontends/php/include/httptest.inc.php @@ -47,6 +47,12 @@ function db_save_step($hostid, $applicationid, $httptestid, $testname, $name, $no, $timeout, $url, $posts, $required, $status_codes, $delay, $history, $trends) { + if( $no <= 0 ) + { + error('Scenario step number can\'t be less then 1'); + return false; + } + if (!eregi('^([0-9a-zA-Z\_\.[.-.]\$ ]+)$', $name)) { error("Scenario step name should contain '0-9a-zA-Z_ .$'- characters only"); @@ -175,7 +181,8 @@ { $result = DBexecute('update httptest set '. ' applicationid='.$applicationid.', name='.zbx_dbstr($name).', delay='.$delay.','. - ' status='.$status.', agent='.zbx_dbstr($agent).', macros='.zbx_dbstr($macros). + ' status='.$status.', agent='.zbx_dbstr($agent).', macros='.zbx_dbstr($macros).','. + ' error='.zbx_dbstr('').', curstate='.HTTPTEST_STATE_UNKNOWN. ' where httptestid='.$httptestid); } else @@ -190,9 +197,9 @@ } $result = DBexecute('insert into httptest'. - ' (httptestid, applicationid, name, delay, status, agent, macros) '. + ' (httptestid, applicationid, name, delay, status, agent, macros, curstate) '. ' values ('.$httptestid.','.$applicationid.','.zbx_dbstr($name).','. - $delay.','.$status.','.zbx_dbstr($agent).','.zbx_dbstr($macros).')' + $delay.','.$status.','.zbx_dbstr($agent).','.zbx_dbstr($macros).','.HTTPTEST_STATE_UNKNOWN.')' ); $test_added = true; @@ -211,7 +218,7 @@ if(!isset($s['status_codes'])) $s['status_codes'] = ''; $result = db_save_step($hostid, $applicationid, $httptestid, - $name, $s['name'], $sid, $s['timeout'], $s['url'], $s['posts'], $s['required'],$s['status_codes'], + $name, $s['name'], $sid+1, $s['timeout'], $s['url'], $s['posts'], $s['required'],$s['status_codes'], $delay, $history, $trends); if(!$result) break; |
