You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2017/05/05 02:55:11 UTC
[1/2] incubator-trafficcontrol git commit: fixes exampleurls on a
collection and an individual ds
Repository: incubator-trafficcontrol
Updated Branches:
refs/heads/master ae81f838e -> b4ced6beb
fixes exampleurls on a collection and an individual ds
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/b71ad213
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/b71ad213
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/b71ad213
Branch: refs/heads/master
Commit: b71ad213816366281ec7715b7c8dec0fb3fe7ca9
Parents: ae81f83
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Thu May 4 20:45:03 2017 -0600
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Thu May 4 20:54:38 2017 -0600
----------------------------------------------------------------------
traffic_ops/app/lib/API/Deliveryservice.pm | 27 +++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/b71ad213/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 a6523cf..4104502 100644
--- a/traffic_ops/app/lib/API/Deliveryservice.pm
+++ b/traffic_ops/app/lib/API/Deliveryservice.pm
@@ -69,7 +69,18 @@ sub index {
# build example urls for each delivery service
my @example_urls = ();
my $cdn_domain = $row->cdn->domain_name;
- my $regexp_set = $self->get_regexp_set( $row->deliveryservice_regexes );
+ my $ds_regexes = $row->deliveryservice_regexes;
+ my $regexp_set;
+ my $i = 0;
+
+ while ( my $ds_regex = $ds_regexes->next ) {
+ $regexp_set->[$i]->{id} = $ds_regex->id;
+ $regexp_set->[$i]->{pattern} = $ds_regex->regex->pattern;
+ $regexp_set->[$i]->{type} = $ds_regex->regex->type->name;
+ $regexp_set->[$i]->{set_number} = $ds_regex->set_number;
+ $i++;
+ }
+
@example_urls = &UI::DeliveryService::get_example_urls( $self, $row->id, $regexp_set, $row, $cdn_domain, $row->protocol );
push(
@@ -171,7 +182,19 @@ sub show {
# build example urls for the delivery service
my @example_urls = ();
my $cdn_domain = $row->cdn->domain_name;
- my $regexp_set = $self->get_regexp_set( $row->deliveryservice_regexes );
+
+ $ds_regexes->reset; # need to reset the curson
+ my $regexp_set;
+ my $i = 0;
+
+ while ( my $ds_regex = $ds_regexes->next ) {
+ $regexp_set->[$i]->{id} = $ds_regex->id;
+ $regexp_set->[$i]->{pattern} = $ds_regex->regex->pattern;
+ $regexp_set->[$i]->{type} = $ds_regex->regex->type->name;
+ $regexp_set->[$i]->{set_number} = $ds_regex->set_number;
+ $i++;
+ }
+
@example_urls = &UI::DeliveryService::get_example_urls( $self, $row->id, $regexp_set, $row, $cdn_domain, $row->protocol );
push(
[2/2] incubator-trafficcontrol git commit: This closes #546.
Posted by da...@apache.org.
This closes #546.
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/b4ced6be
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/b4ced6be
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/b4ced6be
Branch: refs/heads/master
Commit: b4ced6beb48ed2ec5350c371059158969f38958e
Parents: b71ad21
Author: Dan Kirkwood <da...@gmail.com>
Authored: Thu May 4 20:55:01 2017 -0600
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Thu May 4 20:55:01 2017 -0600
----------------------------------------------------------------------
----------------------------------------------------------------------