You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by fr...@apache.org on 2017/03/13 16:46:16 UTC

[1/3] incubator-trafficcontrol git commit: remove unnecessary database query

Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/2.0.x fe3b7d2cd -> 2e8cabad4


remove unnecessary database query


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

Branch: refs/heads/2.0.x
Commit: b85fe31ed769ac005929171e81692edcfa3d8a57
Parents: fe3b7d2
Author: Dave Neuman <ne...@apache.org>
Authored: Tue Mar 7 12:30:08 2017 -0700
Committer: Eric Friedrich <fr...@apache.org>
Committed: Mon Mar 13 12:30:03 2017 -0400

----------------------------------------------------------------------
 traffic_ops/app/lib/UI/ConfigFiles.pm | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/b85fe31e/traffic_ops/app/lib/UI/ConfigFiles.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/UI/ConfigFiles.pm b/traffic_ops/app/lib/UI/ConfigFiles.pm
index a609963..cc2c10e 100644
--- a/traffic_ops/app/lib/UI/ConfigFiles.pm
+++ b/traffic_ops/app/lib/UI/ConfigFiles.pm
@@ -1509,11 +1509,9 @@ sub ssl_multicert_dot_config {
 	foreach my $ds (@ds_list) {
 		my $ds_id        = $ds->id;
 		my $xml_id       = $ds->xml_id;
-		my $rs_ds        = $self->db->resultset('Deliveryservice')->search( { 'me.id' => $ds_id }, { prefetch => ['type'] } );
-		my $data         = $rs_ds->single;
 		my $domain_name  = UI::DeliveryService::get_cdn_domain( $self, $ds_id );
 		my $ds_regexes   = UI::DeliveryService::get_regexp_set( $self, $ds_id );
-		my @example_urls = UI::DeliveryService::get_example_urls( $self, $ds_id, $ds_regexes, $data, $domain_name, $data->protocol );
+		my @example_urls = UI::DeliveryService::get_example_urls( $self, $ds_id, $ds_regexes, $ds, $domain_name, $ds->protocol );
 
 		#first one is the one we want
 		my $hostname = $example_urls[0];


[3/3] incubator-trafficcontrol git commit: This closes #336

Posted by fr...@apache.org.
This closes #336


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

Branch: refs/heads/2.0.x
Commit: 2e8cabad4f982766ebff3cef90ceb3e036e17ce0
Parents: c3f735e
Author: Eric Friedrich <fr...@apache.org>
Authored: Mon Mar 13 12:30:25 2017 -0400
Committer: Eric Friedrich <fr...@apache.org>
Committed: Mon Mar 13 12:30:25 2017 -0400

----------------------------------------------------------------------

----------------------------------------------------------------------



[2/3] incubator-trafficcontrol git commit: moved domain_name query out of loop, see comment in code

Posted by fr...@apache.org.
moved domain_name query out of loop, see comment in code


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

Branch: refs/heads/2.0.x
Commit: c3f735e7a72cf81f0c039430e574e993ed71d66f
Parents: b85fe31
Author: Dave Neuman <ne...@apache.org>
Authored: Wed Mar 8 07:44:09 2017 -0700
Committer: Eric Friedrich <fr...@apache.org>
Committed: Mon Mar 13 12:30:09 2017 -0400

----------------------------------------------------------------------
 traffic_ops/app/lib/UI/ConfigFiles.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/c3f735e7/traffic_ops/app/lib/UI/ConfigFiles.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/UI/ConfigFiles.pm b/traffic_ops/app/lib/UI/ConfigFiles.pm
index cc2c10e..78a19b2 100644
--- a/traffic_ops/app/lib/UI/ConfigFiles.pm
+++ b/traffic_ops/app/lib/UI/ConfigFiles.pm
@@ -1506,10 +1506,12 @@ sub ssl_multicert_dot_config {
 	my $protocol_search = '> 0';
 	my @ds_list = $self->db->resultset('Deliveryservice')->search( { -and => [ 'server.id' => $server->id, 'me.protocol' => \$protocol_search ] },
 		{ join => { deliveryservice_servers => { server => undef } }, } );
+	#get the domain_name from the first result since it should all be the same CDN
+	#TODO, the domain_name param needs to be a field on the CDN and not a param
+	my $domain_name  = UI::DeliveryService::get_cdn_domain( $self, $ds_list[0]->id );
 	foreach my $ds (@ds_list) {
 		my $ds_id        = $ds->id;
 		my $xml_id       = $ds->xml_id;
-		my $domain_name  = UI::DeliveryService::get_cdn_domain( $self, $ds_id );
 		my $ds_regexes   = UI::DeliveryService::get_regexp_set( $self, $ds_id );
 		my @example_urls = UI::DeliveryService::get_example_urls( $self, $ds_id, $ds_regexes, $ds, $domain_name, $ds->protocol );