Add TO Server detail route CDN
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/7dd50c2d Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/7dd50c2d Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/7dd50c2d Branch: refs/heads/master Commit: 7dd50c2d5ec25d8bedc7c8e9e4dab20db61e5a30 Parents: 685ae98 Author: Robert Butts <robert.o.bu...@gmail.com> Authored: Fri Mar 17 10:31:27 2017 -0600 Committer: Dan Kirkwood <dang...@gmail.com> Committed: Thu Mar 30 10:34:14 2017 -0600 ---------------------------------------------------------------------- traffic_ops/app/lib/API/Server.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/7dd50c2d/traffic_ops/app/lib/API/Server.pm ---------------------------------------------------------------------- diff --git a/traffic_ops/app/lib/API/Server.pm b/traffic_ops/app/lib/API/Server.pm index 69ed6c3..527d696 100644 --- a/traffic_ops/app/lib/API/Server.pm +++ b/traffic_ops/app/lib/API/Server.pm @@ -633,9 +633,8 @@ sub details_v11 { my $isadmin = &is_admin($self); my $host_name = $self->param('name'); my $rs_data = $self->db->resultset('Server')->search( { host_name => $host_name }, - { prefetch => [ 'cachegroup', 'type', 'profile', 'status', 'phys_location', 'hwinfos', { 'deliveryservice_servers' => 'deliveryservice' } ], } ); + { prefetch => [ 'cdn', 'cachegroup', 'type', 'profile', 'status', 'phys_location', 'hwinfos', { 'deliveryservice_servers' => 'deliveryservice' } ], } ); while ( my $row = $rs_data->next ) { - my $serv = { "id" => $row->id, "hostName" => $row->host_name, @@ -670,6 +669,7 @@ sub details_v11 { "iloPassword" => $isadmin ? $row->ilo_password : "********", "routerHostName" => $row->router_host_name, "routerPortName" => $row->router_port_name, + "cdnName" => $row->cdn->name, }; my $hw_rs = $row->hwinfos; while ( my $hwinfo_row = $hw_rs->next ) {