diff --git a/provisioning_status.phtml b/provisioning_status.phtml index f0e74ab..d7c1fdf 100644 --- a/provisioning_status.phtml +++ b/provisioning_status.phtml @@ -1,81 +1,81 @@ "CDRTool_Session", "auth" => "CDRTool_Auth", "perm" => "CDRTool_Perm" ) ); require("provisioning_statistics.php"); $perm->check("statistics"); $title="Provisioning usage statistics"; include("header.phtml"); global $CDRTool; if (strlen($CDRTool['filter']['domain'])) { $allowedDomains = explode(' ', $CDRTool['filter']['domain']); } $layout = new pageLayoutLocal(); $layout->showTopMenu($title); $start_date = isset($_REQUEST['start_date']) ? new DateTime($_REQUEST['start_date']) : new DateTime('-30 days'); $stop_date = isset($_REQUEST['stop_date']) ? new DateTime($_REQUEST['stop_date']) : new DateTime('now'); if ($start_date == $stop_date) { $start_date = $start_date->setTime(00, 00, 00); $stop_date = $stop_date->setTime(00, 00, 00); $stop_date->add(new DateInterval('P1D')); } print ""; foreach (array_keys($DATASOURCES) as $datasource) { if (isset($DATASOURCES[$datasource]['db_ngnpro_stats'])) { $stats= new ProvisioningStatistics(); list($data1, $data2) = $stats->getTopRequestsProvisioning($DATASOURCES[$datasource]['db_ngnpro_stats'], $start_date, $stop_date); // Fetch the required data $donutData = $stats->getData($data1, $data2); $requests_number = $stats->getNumber($DATASOURCES[$datasource]['db_ngnpro_stats'], $start_date, $stop_date); $interval = $start_date->diff($stop_date); $requests_time_new = $stats->getRequestsTime($DATASOURCES[$datasource]['db_ngnpro_stats'], $interval->days, $start_date, $stop_date); $requests_new = $stats->getRequestsProvisioning($DATASOURCES[$datasource]['db_ngnpro_stats'], $interval->days, $start_date, $stop_date); print "
".$start_date->format('F j, Y H:i:s')." - ".$stop_date->format('F j, Y H:i:s')."
"; print "
"; - print ""; + print ""; print "
"; print "
$requests_number[0] requests between ".$start_date->format('Y-m-d H:i:s')." and ".$stop_date->format('Y-m-d H:i:s')."
"; print "

Top 5 percentages are calculated from the total amount of requests in the top 5. The Top 5 donut can be zoomed to reveal distribution from each source IP. The percentages in the zoomed donut are based on the total amount of the specific SOAP port.

The Line graphs can be zoomed by selecting an area in the graph. The graphs can be zoomed out with a mouse-click on the graph.

"; print "
"; $stats->printChartDonut("Top 5 distribution of request types", $donutData); print "
"; print "
"; $stats->printLineCharts($datasource, $requests_new, $requests_time_new); print "
"; } } $layout->showFooter(); page_close(); ?> diff --git a/sip_usage.phtml b/sip_usage.phtml index 431e923..86309dc 100644 --- a/sip_usage.phtml +++ b/sip_usage.phtml @@ -1,277 +1,277 @@ "CDRTool_Session", "auth" => "CDRTool_Auth", "perm" => "CDRTool_Perm" )); $loginname=$auth->auth["uname"]; $perm->check("statistics"); $start_date = isset($_REQUEST['start_date']) ? new DateTime($_REQUEST['start_date']) : new DateTime('-1 days'); $stop_date = isset($_REQUEST['stop_date']) ? new DateTime($_REQUEST['stop_date']) : new DateTime('now'); if ($start_date == $stop_date){ $start_date = $start_date->setTime(00, 00, 00); $stop_date = $stop_date->setTime(00, 00, 00); $stop_date->add(new DateInterval('P1D')); } global $CDRTool; require("sip_statistics.php"); // trap AJAX requests if (isset($_POST['action'])) { switch ($_POST['action']) { case 'log': $layout = new pageLayoutLocal(); try { $entity = new MRTGEntity($_POST['entity']); $json = $entity->retrieveLog(); } catch (Exception $e) { $json = json_encode(array('error' => "entity not found")); } break; } // return data and terminate print $json; exit; } // setup $mrtggraphs = new MRTGGraphs(); ?> var start_date_set=\"".$start_date->format('Y-m-d H:i:s')."\";var stop_date_set=\"".$stop_date->format('Y-m-d H:i:s')."\";";?>
format('F j, Y H:i:s')." - ".$stop_date->format('F j, Y H:i:s')?>

entities) ; foreach ($mrtggraphs->entities as $entity) : if (strstr($entity->name,'total')) { ?>

title; ?> (MRTG)


entities) ; foreach ($mrtggraphs->entities as $entity) : if (!strstr($entity->name,'total')) { if ($counter == 3){ $counter = 0; print "
"; } $counter++; ?>

title; ?> (MRTG)

layout->showFooter(); ?>