Files
librenms-librenms/html/graph.php
T

40 lines
837 B
PHP
Raw Normal View History

2007-04-03 14:10:23 +00:00
<?php
/**
2016-08-20 12:16:55 +01:00
* LibreNMS
*
2016-08-20 12:16:55 +01:00
* This file is part of LibreNMS.
*
2016-08-20 12:16:55 +01:00
* @package librenms
2013-10-29 05:38:12 +10:00
* @subpackage graphing
* @copyright (C) 2006 - 2012 Adam Armstrong
*/
use LibreNMS\Authentication\LegacyAuth;
use LibreNMS\Data\Store\Datastore;
$start = microtime(true);
2019-04-11 23:26:42 -05:00
$init_modules = array('web', 'graphs', 'auth');
require realpath(__DIR__ . '/..') . '/includes/init.php';
2020-06-30 09:25:01 -05:00
if (!Auth::check()) {
// check for unauthenticated graphs and set auth
$auth = is_client_authorized($_SERVER['REMOTE_ADDR']);
if (!$auth) {
die('Unauthorized');
}
2019-04-11 23:26:42 -05:00
}
2018-07-13 17:08:00 -05:00
set_debug(isset($_GET['debug']));
2019-06-23 00:29:12 -05:00
require \LibreNMS\Config::get('install_dir') . '/includes/html/graphs/graph.inc.php';
2007-04-03 14:10:23 +00:00
Datastore::terminate();
if ($debug) {
echo '<br />';
printf("Runtime %.3fs", microtime(true) - $start);
echo '<br />';
printStats();
}