You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by mi...@apache.org on 2016/11/01 19:51:49 UTC
[1/3] incubator-trafficcontrol git commit: example urls should have
never been removed from the api - deliveryservice.pm#index
Repository: incubator-trafficcontrol
Updated Branches:
refs/heads/master e4d369834 -> 99efeffd6
example urls should have never been removed from the api - deliveryservice.pm#index
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/f1bdf5b1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/f1bdf5b1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/f1bdf5b1
Branch: refs/heads/master
Commit: f1bdf5b1bcef2b4ba1305e79ba948994a2166671
Parents: 46e423e
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Tue Nov 1 12:58:30 2016 -0600
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Tue Nov 1 13:51:15 2016 -0600
----------------------------------------------------------------------
traffic_ops/app/lib/API/Deliveryservice.pm | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/f1bdf5b1/traffic_ops/app/lib/API/Deliveryservice.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/API/Deliveryservice.pm b/traffic_ops/app/lib/API/Deliveryservice.pm
index 441b949..27ee53c 100644
--- a/traffic_ops/app/lib/API/Deliveryservice.pm
+++ b/traffic_ops/app/lib/API/Deliveryservice.pm
@@ -49,6 +49,10 @@ sub index {
my $rs_data = $self->db->resultset("Deliveryservice")->search( \%criteria, { order_by => 'me.' . $orderby } );
while ( my $row = $rs_data->next ) {
+ my $cdn_domain = $self->get_cdn_domain_by_ds_id( $row->id );
+ my $regexp_set = &UI::DeliveryService::get_regexp_set( $self, $row->id );
+ my @example_urls = &UI::DeliveryService::get_example_urls( $self, $row->id, $regexp_set, $row, $cdn_domain, $row->protocol );
+
push(
@data, {
"active" => \$row->active,
@@ -64,6 +68,7 @@ sub index {
"dnsBypassTtl" => $row->dns_bypass_ttl,
"dscp" => $row->dscp,
"edgeHeaderRewrite" => $row->edge_header_rewrite,
+ "exampleURLs" => \@example_urls,
"geoLimitRedirectURL" => $row->geolimit_redirect_url,
"geoLimit" => $row->geo_limit,
"geoLimitCountries" => $row->geo_limit_countries,
[3/3] incubator-trafficcontrol git commit: This closes #33
Posted by mi...@apache.org.
This closes #33
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/99efeffd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/99efeffd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/99efeffd
Branch: refs/heads/master
Commit: 99efeffd610326d6755d0dd98990b19e31696622
Parents: f1bdf5b
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Tue Nov 1 13:51:39 2016 -0600
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Tue Nov 1 13:51:39 2016 -0600
----------------------------------------------------------------------
----------------------------------------------------------------------
[2/3] incubator-trafficcontrol git commit: fix example URLs for HTTP
deliverservices. This fixes TC-13
Posted by mi...@apache.org.
fix example URLs for HTTP deliverservices. This fixes TC-13
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/46e423e5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/46e423e5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/46e423e5
Branch: refs/heads/master
Commit: 46e423e5cf795b3c8c93e5d3790513436d81a40a
Parents: e4d3698
Author: Dave Neuman <ne...@apache.org>
Authored: Tue Nov 1 12:38:13 2016 -0600
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Tue Nov 1 13:51:15 2016 -0600
----------------------------------------------------------------------
traffic_ops/app/lib/UI/DeliveryService.pm | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/46e423e5/traffic_ops/app/lib/UI/DeliveryService.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/UI/DeliveryService.pm b/traffic_ops/app/lib/UI/DeliveryService.pm
index 3efd334..a3fce79 100644
--- a/traffic_ops/app/lib/UI/DeliveryService.pm
+++ b/traffic_ops/app/lib/UI/DeliveryService.pm
@@ -133,30 +133,30 @@ sub get_example_urls {
}
}
}
- else {
+ else { # TODO: Is this necessary? Could this be consolidated?
foreach my $re ( @{$regexp_set} ) {
if ( $re->{type} eq 'HOST_REGEXP' ) {
my $host = $re->{pattern};
- my $url;
+ my $http_url;
+ my $https_url;
$host =~ s/\\//g;
$host =~ s/\.\*//g;
$host =~ s/\.//g;
- my $p =
- defined( $example_urls[ $re->{set_number} ] )
- ? $example_urls[ $re->{set_number} ]
- : "";
+
if ( $re->{set_number} == 0 ) {
- $example_urls[ $re->{set_number} ] = $scheme . '://ccr.' . $host . "." . $cdn_domain . $p;
+ $http_url = $scheme . '://ccr.' . $host . "." . $cdn_domain;
+ push( @example_urls, $http_url );
if ($scheme2) {
- $url = $scheme2 . '://ccr.' . $host . "." . $cdn_domain . $p;
- push( @example_urls, $url );
+ $https_url = $scheme2 . '://ccr.' . $host . "." . $cdn_domain;
+ push( @example_urls, $https_url );
}
}
else {
- $example_urls[ $re->{set_number} ] = $scheme . '://' . $re->{pattern} . $p;
+ $http_url = $scheme . '://' . $re->{pattern};
+ push( @example_urls, $http_url );
if ($scheme2) {
- $url = $scheme2 . '://' . $re->{pattern} . $p;
- push( @example_urls, $url );
+ $https_url = $scheme2 . '://' . $re->{pattern};
+ push( @example_urls, $https_url );
}
}
}