Skip to content

Commit d324dc6

Browse files
Ahmet OeztuerkAhmet Oeztuerk
authored andcommitted
fix default column selection if no columns are selected
1 parent 2574b56 commit d324dc6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/Thruk/Utils/Status.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1872,7 +1872,7 @@ sub set_selected_columns {
18721872
confess("must set a type");
18731873
}
18741874
my $ref_col = $default_cols || $default_compat_columns->{$type} || $default_compat_columns->{$prefix.$type};
1875-
my $cols = Thruk::Base::list($c->req->parameters->{$prefix.'columns'} || Thruk::Base::list($c->req->parameters->{'columns'}) || $ref_col);
1875+
my $cols = Thruk::Base::list( $c->req->parameters->{$prefix.'columns'} || $c->req->parameters->{'columns'} || $ref_col);
18761876
for my $col (@{$cols}) {
18771877
if($col =~ m/^\d+$/mx) {
18781878
push @{$columns}, $ref_col->[$col-1];
@@ -1884,6 +1884,7 @@ sub set_selected_columns {
18841884
$c->stash->{$prefix.'last_col'} = chr(65+$last_col-1); # Excel column names start with A, which has ASCII value 65
18851885
$c->stash->{$prefix.'columns'} = $columns;
18861886
$c->stash->{'last_col'} = chr(65+$last_col-1); # Excel column names start with A, which has ASCII value 65
1887+
# In the combined view when selecting all fields from Hosts and Services, the total number goes beyond 26 and spills over to the AA, AB rows.
18871888
$c->stash->{'columns'} = $columns;
18881889
}
18891890

0 commit comments

Comments
 (0)