summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/config.inc.php19
-rw-r--r--frontends/php/include/defines.inc.php3
2 files changed, 21 insertions, 1 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index 34c67db0..a7e551ad 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -666,6 +666,23 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
}
+ function get_graphitem_by_gitemid($gitemid)
+ {
+ global $ERROR_MSG;
+
+ $sql="select * from graphs_items where gitemid=$gitemid";
+ $result=DBselect($sql);
+ if(DBnum_rows($result) == 1)
+ {
+ return DBfetch($result);
+ }
+ else
+ {
+ $ERROR_MSG="No graph item with gitemid=[$gitemid]";
+ }
+ return $result;
+ }
+
function get_graph_by_graphid($graphid)
{
global $ERROR_MSG;
@@ -680,7 +697,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
{
$ERROR_MSG="No graph with graphid=[$graphid]";
}
- return $graph;
+ return $result;
}
function get_image_by_name($imagetype,$name)
diff --git a/frontends/php/include/defines.inc.php b/frontends/php/include/defines.inc.php
index 24c10940..e1a7f93d 100644
--- a/frontends/php/include/defines.inc.php
+++ b/frontends/php/include/defines.inc.php
@@ -30,6 +30,9 @@
define("AUDIT_RESOURCE_ZABBIX_CONFIG", 2);
define("AUDIT_RESOURCE_MEDIA_TYPE", 3);
define("AUDIT_RESOURCE_HOST", 4);
+ define("AUDIT_RESOURCE_ACTION", 5);
+ define("AUDIT_RESOURCE_GRAPH", 6);
+
define("HOST_STATUS_MONITORED", 0);