summaryrefslogtreecommitdiffstats
path: root/frontends/php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-04-14 12:43:04 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-04-14 12:43:04 +0000
commit85eb904a1fd41b28292bc5bdb033ee568a7389b8 (patch)
treeaaecb58771482c2a99519af4913ca266852975b9 /frontends/php
parent819de36831781bda2871ad2413da78bcd7362cc0 (diff)
downloadzabbix-85eb904a1fd41b28292bc5bdb033ee568a7389b8.tar.gz
zabbix-85eb904a1fd41b28292bc5bdb033ee568a7389b8.tar.xz
zabbix-85eb904a1fd41b28292bc5bdb033ee568a7389b8.zip
- added uptime/downtime action condition for discovery
git-svn-id: svn://svn.zabbix.com/trunk@4013 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php')
-rw-r--r--frontends/php/include/actions.inc.php12
-rw-r--r--frontends/php/include/defines.inc.php1
-rw-r--r--frontends/php/include/forms.inc.php3
-rw-r--r--frontends/php/include/locales/en_gb.inc.php2
4 files changed, 17 insertions, 1 deletions
diff --git a/frontends/php/include/actions.inc.php b/frontends/php/include/actions.inc.php
index cc2757a1..1a783696 100644
--- a/frontends/php/include/actions.inc.php
+++ b/frontends/php/include/actions.inc.php
@@ -323,6 +323,7 @@ include_once 'include/discovery.inc.php';
$str_type[CONDITION_TYPE_DSERVICE_TYPE] = S_SERVICE_TYPE;
$str_type[CONDITION_TYPE_DSERVICE_PORT] = S_SERVICE_PORT;
$str_type[CONDITION_TYPE_DSTATUS] = S_DISCOVERY_STATUS;
+ $str_type[CONDITION_TYPE_DUPTIME] = S_UPTIME_DOWNTIME;
if(isset($str_type[$conditiontype]))
return $str_type[$conditiontype];
@@ -369,6 +370,9 @@ include_once 'include/discovery.inc.php';
case CONDITION_TYPE_DSTATUS:
$str_val = discovery_object_status2str($value);
break;
+ case CONDITION_TYPE_DUPTIME:
+ $str_val = $value;
+ break;
default:
return S_UNKNOWN;
break;
@@ -471,7 +475,8 @@ include_once 'include/discovery.inc.php';
CONDITION_TYPE_DHOST_IP,
CONDITION_TYPE_DSERVICE_TYPE,
CONDITION_TYPE_DSERVICE_PORT,
- CONDITION_TYPE_DSTATUS
+ CONDITION_TYPE_DSTATUS,
+ CONDITION_TYPE_DUPTIME
);
if(isset($conditions[$eventsource]))
@@ -565,6 +570,10 @@ include_once 'include/discovery.inc.php';
$operators[CONDITION_TYPE_DSTATUS] = array(
CONDITION_OPERATOR_EQUAL,
);
+ $operators[CONDITION_TYPE_DUPTIME] = array(
+ CONDITION_OPERATOR_MORE_EQUAL,
+ CONDITION_OPERATOR_LESS_EQUAL
+ );
if(isset($operators[$conditiontype]))
return $operators[$conditiontype];
@@ -647,6 +656,7 @@ include_once 'include/discovery.inc.php';
case CONDITION_TYPE_TRIGGER_NAME:
case CONDITION_TYPE_TRIGGER_VALUE:
case CONDITION_TYPE_TRIGGER_SEVERITY:
+ case CONDITION_TYPE_DUPTIME:
break;
default:
error(S_INCORRECT_CONDITION_TYPE);
diff --git a/frontends/php/include/defines.inc.php b/frontends/php/include/defines.inc.php
index ebe75931..b7324fea 100644
--- a/frontends/php/include/defines.inc.php
+++ b/frontends/php/include/defines.inc.php
@@ -111,6 +111,7 @@
define('CONDITION_TYPE_DSERVICE_TYPE', 8);
define('CONDITION_TYPE_DSERVICE_PORT', 9);
define('CONDITION_TYPE_DSTATUS', 10);
+ define('CONDITION_TYPE_DUPTIME', 11);
define('CONDITION_OPERATOR_EQUAL', 0);
define('CONDITION_OPERATOR_NOT_EQUAL', 1);
diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php
index a09d994d..2466a531 100644
--- a/frontends/php/include/forms.inc.php
+++ b/frontends/php/include/forms.inc.php
@@ -2976,6 +2976,9 @@ include_once 'include/discovery.inc.php';
$rowCondition[] = $cmbCondVal;
break;
+ case CONDITION_TYPE_DUPTIME:
+ $rowCondition[] = new CNumericBox('new_condition[value]','600',15);
+ break;
}
$frmAction->AddRow(S_NEW_CONDITION, array(
diff --git a/frontends/php/include/locales/en_gb.inc.php b/frontends/php/include/locales/en_gb.inc.php
index 53f8d220..993ce5bd 100644
--- a/frontends/php/include/locales/en_gb.inc.php
+++ b/frontends/php/include/locales/en_gb.inc.php
@@ -38,6 +38,8 @@
'S_SERVICE_PORT'=> 'Service port',
'S_DISCOVERY_STATUS'=> 'Discovery status',
+ 'S_UPTIME_DOWNTIME'=> 'Uptime/Downtime',
+
'S_DISCOVERY_RULE'=> 'Discovery rule',
'S_DISCOVERY'=> 'Discovery',
'S_DISCOVERY_BIG'=> 'DISCOVERY',