Skip to content

Commit

Permalink
sort commands
Browse files Browse the repository at this point in the history
  • Loading branch information
mickenordin committed Feb 10, 2017
1 parent f13e682 commit 35ade7f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/Thruk/Controller/api_conf.pm
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,14 @@ sub display_command_selection {
-action => "api_conf.cgi"
);
$command_form .= '<select name="command">';
my @names;
foreach my $hash ( sort values $c->stash->{commands} ) {
my $name = $hash->{name};
push @names, $hash->{name};
}
foreach my $temp (sort @names) {
my $name = $temp;
$name =~ s/check_//g;
$command_form .= "<option value=\"$name\">$hash->{name}</option>";
$command_form .= "<option value=\"$name\">$temp</option>";
}
$command_form .= '</select">';
$command_form .= $q->hidden( 'page_type', "commands" );
Expand Down Expand Up @@ -1938,7 +1942,6 @@ sub commands {
$command_page .= $q->end_form;
}

# This is create/delete dialog
}
elsif ( $mode eq "modify" ) {

Expand Down

0 comments on commit 35ade7f

Please sign in to comment.