diff --git a/debian/changelog b/debian/changelog index 5273b7d..c445c5b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,24 @@ +ngcp-www-admin (3.4.4) unstable; urgency=low + + [ Christian Veigl ] + * peering.pm: check if peering rule already exists beforehand + * rewrite_detail.tt: truncate long patterns and suffix with "..." + * bans_ips.tt: access the actual ip with the correct key + + [ dtiefnig ] + * peering.pm: don't treat peering rule updates as duplicates + * peering.pm: also check callee pattern to detect duplicates + * peering_detail.tt: fix layout for peering servers and rules + * rewrite_detail.tt: fix layout for rewrite rules and optimize space usage + + [ agranig ] + * admin.conf,Utils.pm: Add asterisk to call graphs. + + [ apogrebennyk ] + * account_detail.tt: replace hardcoded Euro currency with account.currency + + -- Daniel Tiefnig Wed, 26 Sep 2012 01:43:14 +0200 + ngcp-www-admin (3.4.3) unstable; urgency=low [ Michael Prokop ] diff --git a/etc/admin.conf b/etc/admin.conf index 37a8d0b..f1298ee 100644 --- a/etc/admin.conf +++ b/etc/admin.conf @@ -36,7 +36,9 @@ + sbc="[% networking.iaddress %]:[% sems.bindport %]" + app="[% networking.iaddress %]:[% asterisk.sip.bindport %]" + /> [- END -] flash->{rule_caller_pattern_err_detail} = $c->session->{prov_error_object} if ($c->session->{prov_error_object}); } + # check if peering rule already exists beforehand + my $peer_details; + return unless $c->model('Provisioning')->call_prov( $c, 'voip', 'get_peer_group_details', + { id => $group_id }, + \$peer_details + ); + + if (my ($tmp_rule) = grep ({ + ($_->{callee_prefix} eq $settings->{callee_prefix}) and + ($_->{callee_pattern} eq $settings->{callee_pattern}) and + ($_->{caller_pattern} eq $settings->{caller_pattern}) + } @{$peer_details->{rules}})) + { + $messages{erulerr} = 'Client.Voip.DuplicatePeeringRule' + unless defined $rule_id and $$tmp_rule{id} == $rule_id; + + } + if (keys %messages) { $c->session->{messages} = \%messages; $c->flash->{restore_rule} = $settings; - + if (defined $rule_id and length ($rule_id)) { $c->response->redirect("/peering/detail?group_id=$group_id&reditid=$rule_id"); } @@ -277,12 +295,13 @@ sub save_rule : Local { if ($result) { $messages{erulmsg} = 'Server.Voip.SavedSettings'; $c->session->{messages} = \%messages; - $c->response->redirect("/peering/detail?group_id=$group_id"); - return; } else { + $c->flash->{restore_rule} = $settings; $messages{erulerr} = 'Client.Voip.InputErrorFound'; } + + $c->response->redirect("/peering/detail?group_id=$group_id"); } =head2 delete_rule diff --git a/lib/admin/Utils.pm b/lib/admin/Utils.pm index 3b0f3ba..81c5cc0 100644 --- a/lib/admin/Utils.pm +++ b/lib/admin/Utils.pm @@ -645,6 +645,7 @@ sub process_callmap { $c->config->{sipstats}->{lb_ext}, 'lb', $c->config->{sipstats}->{proxy}, 'proxy', $c->config->{sipstats}->{sbc}, 'sbc', + $c->config->{sipstats}->{app}, 'app', ); my $canvas_margin = 100; # enough free space around diagram for text etc @@ -697,7 +698,7 @@ sub process_callmap { push @uas, $packet->{dst_ip}.':'.$packet->{dst_port}; } } - push @uas, ('lb', 'sbc', 'proxy'); + push @uas, ('lb', 'sbc', 'proxy', 'app'); ### calculate x position of all uas my %uas_pos_x = (); diff --git a/root/tt/account_detail.tt b/root/tt/account_detail.tt index 359e2a0..252fa55 100644 --- a/root/tt/account_detail.tt +++ b/root/tt/account_detail.tt @@ -155,7 +155,7 @@ add - Euro + [% account.currency %] [% END %] diff --git a/root/tt/bans_ips.tt b/root/tt/bans_ips.tt index 910293b..40b558e 100644 --- a/root/tt/bans_ips.tt +++ b/root/tt/bans_ips.tt @@ -18,11 +18,11 @@ [% FOREACH ip IN banned_ips %]
  • -
    [% ip %]
    +
    [% ip.ip %]
    [% UNLESS Catalyst.session.admin.read_only %]
    - +
    diff --git a/root/tt/peering_detail.tt b/root/tt/peering_detail.tt index 8119bc8..c751bfd 100644 --- a/root/tt/peering_detail.tt +++ b/root/tt/peering_detail.tt @@ -12,12 +12,12 @@
    • -
      Name
      +
      Name
      IP Address
      -
      Hostname
      +
      Hostname
      Port
      Protocol
      -
      Weight
      +
      Weight
    • [% id = 0 %] [% FOREACH peer = grp.peers %] @@ -26,7 +26,7 @@
      -
      +
      @@ -34,8 +34,8 @@
      -
      - +
      @@ -49,7 +49,7 @@
      -
      +
      @@ -61,12 +61,12 @@ Cancel
      [% ELSE %] - +
      [% peer.ip %]
      -
      [% peer.host %]
      +
      [% peer.host %]
      [% peer.port %]
      [% peer.transport %]
      -
      [% peer.weight %]
      +
      [% peer.weight %]
      [% UNLESS Catalyst.session.admin.read_only %] Edit @@ -89,7 +89,7 @@
    • -
      +
      @@ -97,8 +97,8 @@
      -
      - +
      @@ -112,7 +112,7 @@
      -
      +
      @@ -159,10 +159,10 @@
      • -
        Callee Prefix
        +
        Callee Prefix
        Callee Pattern
        Caller Pattern
        -
        Description
        +
        Description
      • [% id = 0 %] [% FOREACH rule = grp.rules %] @@ -171,20 +171,20 @@ -
        +
        -
        -
        -
        - +
        @@ -195,10 +195,10 @@ Cancel
        [% ELSE %] -
        [% rule.callee_prefix %]
        +
        [% rule.callee_prefix %]
        [% rule.callee_pattern %]
        [% rule.caller_pattern %]
        -
        [% rule.description %]
        +
        [% rule.description %]
        [% UNLESS Catalyst.session.admin.read_only %] Edit @@ -221,20 +221,20 @@
      • -
        +
        -
        -
        -
        - +
        diff --git a/root/tt/rewrite_detail.tt b/root/tt/rewrite_detail.tt index 7a6156c..d763d6b 100644 --- a/root/tt/rewrite_detail.tt +++ b/root/tt/rewrite_detail.tt @@ -26,6 +26,7 @@

        Rewrite Rule Set [% set.rewrite_set.name %]

        Back

        +

        Very long entries are truncated and suffixed with "...". Hoover over them to see the full entry.

        [% rewrites = [ @@ -85,9 +86,9 @@
        •  
          -
          Match Pattern
          -
          Replacement Pattern
          -
          Description
          +
          Match Pattern
          +
          Replacement Pattern
          +
          Description
        @@ -105,15 +106,15 @@ -
        - +
        -
        -
        +
        @@ -125,9 +126,10 @@ Cancel
        [% ELSE %] -
        [% rule.match_pattern %]
        -
        [% rule.replace_pattern %]
        -
        [% rule.description %]
        +
        [% PROCESS shorten string = rule.match_pattern %]
        +
        [% PROCESS shorten string = rule.replace_pattern %]
        +
        [% PROCESS shorten string = rule.description %]
        +
        [% UNLESS Catalyst.session.admin.read_only %] Edit @@ -159,19 +161,19 @@
         
        -
        - +
        -
        -
        +
        -
        +
        @@ -182,3 +184,11 @@ [% END %] +[% BLOCK shorten %] + [% IF string.length > 20 %] + [% string.substr(0, 20) _ '...' %] + [% ELSE %] + [% string %] + [% END %] +[% END %] +