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

[1/2] incubator-trafficcontrol git commit: prevent api-only searches from happening in UI mode

Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master b6f7c43db -> 8cb6cd9ba


prevent api-only searches from happening in UI mode


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

Branch: refs/heads/master
Commit: c9a868ca38de19030afc2e591380ca5d3cf87311
Parents: b6f7c43
Author: Derek Gelinas <de...@cable.comcast.com>
Authored: Thu Apr 13 10:38:01 2017 -0400
Committer: Jeff Elsloo <je...@cable.comcast.com>
Committed: Thu Apr 13 10:40:34 2017 -0600

----------------------------------------------------------------------
 traffic_ops/bin/traffic_ops_ort.pl | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/c9a868ca/traffic_ops/bin/traffic_ops_ort.pl
----------------------------------------------------------------------
diff --git a/traffic_ops/bin/traffic_ops_ort.pl b/traffic_ops/bin/traffic_ops_ort.pl
index 3fa920a..6fc9a9a 100755
--- a/traffic_ops/bin/traffic_ops_ort.pl
+++ b/traffic_ops/bin/traffic_ops_ort.pl
@@ -357,15 +357,17 @@ sub process_cfg_file {
 	return $CFG_FILE_NOT_PROCESSED if ( !&validate_result( \$uri, \$result ) );
 
 	# Process __SERVER_TCP_PORT__, __HOSTNAME__, __FULL_HOSTNAME__ and __CACHE_IPV4__ values from traffic ops API.
-	if ( $server_tcp_port != 80 ) {
-		$result =~ s/__SERVER_TCP_PORT__/$server_tcp_port/g;
-	}
-	else {
-		$result =~ s/:__SERVER_TCP_PORT__//g;
+	if ( $api_in_use == 1 ) {
+		if ( $server_tcp_port != 80 ) {
+			$result =~ s/__SERVER_TCP_PORT__/$server_tcp_port/g;
+		}
+		else {
+			$result =~ s/:__SERVER_TCP_PORT__//g;
+		}
+		$result =~ s/__CACHE_IPV4__/$server_ipv4/g;
+		$result =~ s/__HOSTNAME__/$hostname_short/g;
+		$result =~ s/__FULL_HOSTNAME__/$hostname_full/g;
 	}
-	$result =~ s/__CACHE_IPV4__/$server_ipv4/g;
-	$result =~ s/__HOSTNAME__/$hostname_short/g;
-	$result =~ s/__FULL_HOSTNAME__/$hostname_full/g;
 
 	my @db_file_lines = @{ &scrape_unencode_text($result) };
 


[2/2] incubator-trafficcontrol git commit: This closes #465.

Posted by el...@apache.org.
This closes #465.


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

Branch: refs/heads/master
Commit: 8cb6cd9ba0aff8016395aa76aea0bc0619276bea
Parents: c9a868c
Author: Jeff Elsloo <je...@cable.comcast.com>
Authored: Thu Apr 13 10:41:03 2017 -0600
Committer: Jeff Elsloo <je...@cable.comcast.com>
Committed: Thu Apr 13 10:41:03 2017 -0600

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

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