my $csv = Text::CSV_XS->new({ binary => 1, map { ( $_ => $self->profile->get($_) ) } qw(sep_char escape_char quote_char),});
if ($self->worker->is_multiplexed) {
- foreach my $ri (keys %{ $self->displayable_columns }) {
- $csv->print($file->fh, [ map { $_->{name} } @{ $self->displayable_columns->{$ri} } ]);
+ foreach my $p (@{ $self->worker->profile }) {
+ $csv->print($file->fh, [ map { $_->{name} } @{ $self->displayable_columns->{$p->{row_ident}} } ]);
$file->fh->print("\r\n");
}
- foreach my $ri (keys %{ $self->displayable_columns }) {
- $csv->print($file->fh, [ map { $_->{description} } @{ $self->displayable_columns->{$ri} } ]);
+ foreach my $p (@{ $self->worker->profile }) {
+ $csv->print($file->fh, [ map { $_->{description} } @{ $self->displayable_columns->{$p->{row_ident}} } ]);
$file->fh->print("\r\n");
}
} else {
[%- IF SELF.worker.is_multiplexed %]
<table>
<tr class="listheading">
- [%- FOREACH ri = SELF.displayable_columns.keys %]
- <th>[%- ri %]</th>
+ [%- FOREACH p = SELF.worker.profile %]
+ <th>[%- p.row_ident %]</th>
[%- END %]
</tr>
<tr class="listrow[% loop.count % 2 %]">
- [%- FOREACH ri = SELF.displayable_columns.keys %]
+ [%- FOREACH p = SELF.worker.profile %]
+ [% SET ri = p.row_ident %]
<td>
<table>
<tr class="listheading">