trafficcontrol-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neu...@apache.org
Subject [1/2] incubator-trafficcontrol git commit: tc-237 adds api to expose current cdn stats once authenticated
Date Wed, 10 May 2017 19:36:27 GMT
Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master 008bd2904 -> 4e35ed15e


tc-237 adds api to expose current cdn stats once authenticated


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/2547239b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/2547239b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/2547239b

Branch: refs/heads/master
Commit: 2547239be12cb176c04e664402a812c7ee261bb4
Parents: 008bd29
Author: Jeremy Mitchell <mitchell852@gmail.com>
Authored: Mon May 8 13:13:31 2017 -0600
Committer: David Neuman <david.neuman64@gmail.com>
Committed: Wed May 10 13:36:17 2017 -0600

----------------------------------------------------------------------
 traffic_ops/app/lib/TrafficOpsRoutes.pm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/2547239b/traffic_ops/app/lib/TrafficOpsRoutes.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/TrafficOpsRoutes.pm b/traffic_ops/app/lib/TrafficOpsRoutes.pm
index 09322b7..72b1f85 100644
--- a/traffic_ops/app/lib/TrafficOpsRoutes.pm
+++ b/traffic_ops/app/lib/TrafficOpsRoutes.pm
@@ -902,9 +902,13 @@ sub traffic_stats_routes {
 	my $version   = shift;
 	my $namespace = "Extensions::TrafficStats::API";
 
-	$r->get("/api/$version/cdns/usage/overview")->to( 'CdnStats#get_usage_overview', namespace
=> $namespace );
+	# authenticated
 	$r->get("/api/$version/deliveryservice_stats")->over( authenticated => 1 )->to(
'DeliveryServiceStats#index', namespace => $namespace );
 	$r->get("/api/$version/cache_stats")->over( authenticated => 1 )->to( 'CacheStats#index',
namespace => $namespace );
+	$r->get("/api/$version/current_stats")->over( authenticated => 1 )->to( 'CacheStats#current_stats',
namespace => $namespace );
+
+	# unauthenticated
+	$r->get("/api/$version/cdns/usage/overview")->to( 'CdnStats#get_usage_overview', namespace
=> $namespace );
 	$r->get("internal/api/$version/daily_summary")->to( 'CacheStats#daily_summary', namespace
=> $namespace );
 	$r->get("internal/api/$version/current_stats")->to( 'CacheStats#current_stats', namespace
=> $namespace );
 }


Mime
View raw message