summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/graphs.inc.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-10-05 16:59:02 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-10-05 16:59:02 +0000
commit062537835fa9c5abc662e56420dff80edb13d91d (patch)
tree6e94e638f766a8b2b409335aee6e2ae6736c4b03 /frontends/php/include/graphs.inc.php
parenta3ee144e22596c3aea1fab644ed4c93e4466608a (diff)
downloadzabbix-062537835fa9c5abc662e56420dff80edb13d91d.tar.gz
zabbix-062537835fa9c5abc662e56420dff80edb13d91d.tar.xz
zabbix-062537835fa9c5abc662e56420dff80edb13d91d.zip
- [DEV-1] added new graph navigation-bar (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@4839 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/graphs.inc.php')
-rw-r--r--frontends/php/include/graphs.inc.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/frontends/php/include/graphs.inc.php b/frontends/php/include/graphs.inc.php
index 2797a9c3..df1e621e 100644
--- a/frontends/php/include/graphs.inc.php
+++ b/frontends/php/include/graphs.inc.php
@@ -154,6 +154,47 @@
" order by itemid,drawtype,sortorder,color,yaxisside");
}
+ /*
+ * Function: get_min_itemclock_by_graphid
+ *
+ * Description:
+ * Return the time of the 1st apearance of items included in graph in trends
+ *
+ * Author:
+ * Artem Suharev
+ *
+ */
+ function get_min_itemclock_by_graphid($graphid){
+ $row = DBfetch(DBselect('SELECT MIN(t.clock) as clock '.
+ ' FROM graphs_items gi, trends t '.
+ ' WHERE gi.graphid='.$graphid.
+ ' AND t.itemid = gi.itemid'));
+
+ if(!empty($row) && $row)
+ return $row['clock'];
+ return 0;
+ }
+
+ /*
+ * Function: get_min_itemclock_by_itemid
+ *
+ * Description:
+ * Return the time of the 1st apearance of item in trends
+ *
+ * Author:
+ * Artem Suharev
+ *
+ */
+ function get_min_itemclock_by_itemid($itemid){
+ $row = DBfetch(DBselect('SELECT MIN(t.clock) as clock '.
+ ' FROM trends t '.
+ ' WHERE t.itemid='.$itemid));
+
+ if(!empty($row) && $row)
+ return $row['clock'];
+ return 0;
+ }
+
function get_graphitem_by_gitemid($gitemid)
{
$result=DBselect("SELECT * FROM graphs_items WHERE gitemid=$gitemid");