From 2f9e996b3aadba9b25fe86e3883344a5734e896e Mon Sep 17 00:00:00 2001 From: Andrew Pogrebennyk Date: Wed, 20 Jun 2012 11:59:34 +0000 Subject: [PATCH] add transport protocol select to peers (admin interface) --- lib/admin/Controller/peering.pm | 4 +++ root/tt/peering_detail.tt | 62 +++++++++++++++++++++------------ 2 files changed, 43 insertions(+), 23 deletions(-) diff --git a/lib/admin/Controller/peering.pm b/lib/admin/Controller/peering.pm index 7d651d6..64a5f12 100644 --- a/lib/admin/Controller/peering.pm +++ b/lib/admin/Controller/peering.pm @@ -377,6 +377,7 @@ sub create_peer : Local { my $ip = $c->request->params->{ip}; my $host = length($c->request->params->{host}) ? $c->request->params->{host} : undef; my $port = $c->request->params->{port}; + my $transport = $c->request->params->{transport}; my $weight = $c->request->params->{weight}; #TODO: add syntax checks here @@ -393,6 +394,7 @@ sub create_peer : Local { ip => $ip, host => $host, port => $port, + transport => $transport, weight => $weight, }, }, @@ -477,6 +479,7 @@ sub edit_peer : Local { my $ip = $c->request->params->{ip}; my $host = length($c->request->params->{host}) ? $c->request->params->{host} : undef; my $port = $c->request->params->{port}; + my $transport = $c->request->params->{transport}; my $weight = $c->request->params->{weight}; # $messages{crulerr} = 'Client.Syntax.MalformedPeerGroupName' @@ -490,6 +493,7 @@ sub edit_peer : Local { ip => $ip, host => $host, port => $port, + transport => $transport, weight => $weight, }, }, diff --git a/root/tt/peering_detail.tt b/root/tt/peering_detail.tt index 79962af..bf37960 100644 --- a/root/tt/peering_detail.tt +++ b/root/tt/peering_detail.tt @@ -13,10 +13,11 @@