From b25fd7bd35b13660c7d7f641dfb745fbe51933ae Mon Sep 17 00:00:00 2001 From: Kirill Solomko Date: Tue, 5 Mar 2019 18:24:19 +0100 Subject: [PATCH] TT#52006 header manipulations priority is now editable in the UI * it is possible now to manually edit the "priority" field for rules and actions Change-Id: I1d82399250b7838b5150e35d0cc421e5e70df93f --- lib/NGCP/Panel/Form/Header/Action.pm | 11 ++++++++++- lib/NGCP/Panel/Form/Header/ActionAPI.pm | 2 +- lib/NGCP/Panel/Form/Header/Rule.pm | 11 ++++++++++- lib/NGCP/Panel/Form/Header/RuleAPI.pm | 9 --------- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/lib/NGCP/Panel/Form/Header/Action.pm b/lib/NGCP/Panel/Form/Header/Action.pm index 8b300e4369..e684e057e1 100644 --- a/lib/NGCP/Panel/Form/Header/Action.pm +++ b/lib/NGCP/Panel/Form/Header/Action.pm @@ -14,6 +14,15 @@ has_field 'rule_id' => ( type => 'Hidden', ); +has_field 'priority' => ( + type => 'PosInteger', + required => 1, + element_attr => { + rel => ['tooltip'], + title => ['Header rule action priority, smaller value has the higher priority.'], + }, +); + has_field 'header' => ( type => 'Text', label => 'Header', @@ -113,7 +122,7 @@ has_field 'save' => ( has_block 'fields' => ( tag => 'div', class => [qw/modal-body/], - render_list => [qw/rule_id header header_part action_type value_part value rwr_set rwr_set_id rwr_dp rwr_dp_id enabled/ ], + render_list => [qw/rule_id priority header header_part action_type value_part value rwr_set rwr_set_id rwr_dp rwr_dp_id enabled/ ], ); has_block 'actions' => ( diff --git a/lib/NGCP/Panel/Form/Header/ActionAPI.pm b/lib/NGCP/Panel/Form/Header/ActionAPI.pm index 3fdcfcc514..982c28b461 100644 --- a/lib/NGCP/Panel/Form/Header/ActionAPI.pm +++ b/lib/NGCP/Panel/Form/Header/ActionAPI.pm @@ -18,7 +18,7 @@ has_field 'rwr_dp' => ( has_block 'fields' => ( tag => 'div', class => [qw/modal-body/], - render_list => [qw/rule_id header header_part action_type value_part value rwr_set_id rwr_dp enabled/ ], + render_list => [qw/rule_id priority header header_part action_type value_part value rwr_set_id rwr_dp enabled/ ], ); 1; diff --git a/lib/NGCP/Panel/Form/Header/Rule.pm b/lib/NGCP/Panel/Form/Header/Rule.pm index df277ae04e..6a31cc5b5b 100644 --- a/lib/NGCP/Panel/Form/Header/Rule.pm +++ b/lib/NGCP/Panel/Form/Header/Rule.pm @@ -19,6 +19,15 @@ has_field 'name' => ( }, ); +has_field 'priority' => ( + type => 'PosInteger', + required => 1, + element_attr => { + rel => ['tooltip'], + title => ['Header rule priority, smaller value has the higher priority.'], + }, +); + has_field 'direction' => ( type => 'Select', options => [ @@ -70,7 +79,7 @@ has_field 'save' => ( has_block 'fields' => ( tag => 'div', class => [qw/modal-body/], - render_list => [qw/name direction description stopper enabled/], + render_list => [qw/name priority direction description stopper enabled/], ); has_block 'actions' => ( diff --git a/lib/NGCP/Panel/Form/Header/RuleAPI.pm b/lib/NGCP/Panel/Form/Header/RuleAPI.pm index c2a13158f3..228bf18827 100644 --- a/lib/NGCP/Panel/Form/Header/RuleAPI.pm +++ b/lib/NGCP/Panel/Form/Header/RuleAPI.pm @@ -12,15 +12,6 @@ has_field 'set_id' => ( }, ); -has_field 'priority' => ( - type => 'PosInteger', - required => 1, - element_attr => { - rel => ['tooltip'], - title => ['Header rule priority, smaller value has the higher priority.'], - }, -); - has_block 'fields' => ( tag => 'div', class => [qw/modal-body/],