Better names for variables

Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/f84a4e23
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/f84a4e23
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/f84a4e23

Branch: refs/heads/master
Commit: f84a4e2372d9e33cc5517e826a02b96e7e0792e9
Parents: 613e4ba
Author: Jan van Doorn <jan_vando...@cable.comcast.com>
Authored: Mon Jan 2 14:03:33 2017 -0700
Committer: Jan van Doorn <j...@apache.org>
Committed: Fri Feb 17 17:49:10 2017 +0000

----------------------------------------------------------------------
 traffic_ops/app/lib/UI/Profile.pm               | 10 ++++++----
 traffic_ops/app/templates/profile/_form.html.ep |  2 +-
 2 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/f84a4e23/traffic_ops/app/lib/UI/Profile.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/UI/Profile.pm 
b/traffic_ops/app/lib/UI/Profile.pm
index e386341..996555b 100644
--- a/traffic_ops/app/lib/UI/Profile.pm
+++ b/traffic_ops/app/lib/UI/Profile.pm
@@ -31,6 +31,7 @@ sub index {
        $self->stash( profile => {} );
 }
 
+# stash the cdn array for a form select.. optional second arg is the one that 
is selected.
 sub stash_cdn_selector {
        my $self = shift;
        my $selected = shift || -1;
@@ -47,20 +48,21 @@ sub stash_cdn_selector {
        $self->stash( cdns => \@cdns );
 }
 
+# stash the profile_type array for a form select. optional second arg is the 
one that is selected.
 sub stash_profile_type_selector {
        my $self = shift;
        my $selected = shift || -1;
 
        my $enum_possible = $self->enum_values("profile_type");
-       my @possible;
+       my @types;
     foreach my $val ( @{$enum_possible} ) {
        if ($val eq $selected) {
-                       push(@possible, [ $val => $val , selected => 'true' ] );
+                       push(@types, [ $val => $val , selected => 'true' ] );
        } else {
-                       push(@possible, [ $val => $val ] );
+                       push(@types, [ $val => $val ] );
        }
        }
-       $self->stash( profile_type_possible  => \@possible );
+       $self->stash( profile_types  => \@types );
 }
 
 # for the fancybox view

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/f84a4e23/traffic_ops/app/templates/profile/_form.html.ep
----------------------------------------------------------------------
diff --git a/traffic_ops/app/templates/profile/_form.html.ep 
b/traffic_ops/app/templates/profile/_form.html.ep
index 3301d37..9bc22f6 100644
--- a/traffic_ops/app/templates/profile/_form.html.ep
+++ b/traffic_ops/app/templates/profile/_form.html.ep
@@ -40,5 +40,5 @@
         <span class="field-with-error"><%= field('profile.type')->error 
%></span>
     <% } %>
     %= label_for 'profile.type' => '* Profile Type', class => 'label'
-    %= field('profile.type')->select( \@{$profile_type_possible} )
+    %= field('profile.type')->select( \@{$profile_types} )
 </div>
\ No newline at end of file

Reply via email to