diff --git a/lib/admin/Controller/peering.pm b/lib/admin/Controller/peering.pm index f88b962..652b9f9 100644 --- a/lib/admin/Controller/peering.pm +++ b/lib/admin/Controller/peering.pm @@ -367,6 +367,7 @@ sub create_peer : Local { my $grpid = $c->request->params->{grpid}; my $name = $c->request->params->{name}; 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 $weight = $c->request->params->{weight}; @@ -382,6 +383,7 @@ sub create_peer : Local { data => { name => $name, ip => $ip, + host => $host, port => $port, weight => $weight, }, @@ -465,6 +467,7 @@ sub edit_peer : Local { my $peerid = $c->request->params->{peerid}; my $name = $c->request->params->{name}; 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 $weight = $c->request->params->{weight}; @@ -477,6 +480,7 @@ sub edit_peer : Local { data => { name => $name, ip => $ip, + host => $host, port => $port, weight => $weight, }, @@ -491,7 +495,7 @@ sub edit_peer : Local { } else { - $messages{erulerr} = 'Client.Voip.InputErrorFound'; + $messages{serverr} = 'Client.Voip.InputErrorFound'; } } else { # TODO: add proper values here and set them in tt diff --git a/root/tt/peering_detail.tt b/root/tt/peering_detail.tt index 6968a38..1f407c4 100644 --- a/root/tt/peering_detail.tt +++ b/root/tt/peering_detail.tt @@ -14,8 +14,9 @@
  • Name
    IP Address
    -
    Port
    -
    Weight
    +
    Hostname
    +
    Port
    +
    Weight
  • [% id = 0 %] [% FOREACH peer = grp.peers %] @@ -25,19 +26,23 @@
    -
    -
    -
    +
    + +
    +
    -
    - +
    @@ -50,8 +55,9 @@ [% ELSE %]
    [% peer.ip %]
    -
    [% peer.port %]
    -
    [% peer.weight %]
    +
    [% peer.host %]
    +
    [% peer.port %]
    +
    [% peer.weight %]
    [% UNLESS Catalyst.session.admin.read_only %] Edit @@ -75,22 +81,26 @@
    -
    -
    -
    +
    + +
    +
    -
    - +
    -
    +
    @@ -120,15 +130,15 @@
    -
    -
    -
    @@ -165,15 +175,15 @@
    -
    -
    -