Commit e75a1f12 authored by Leo Gordon's avatar Leo Gordon
Browse files

introduced DisplayColumnLength to protect and limit the output of table...

introduced DisplayColumnLength to protect and limit the output of table columns in DisplayData>0 mode
parent 6d268fa9
......@@ -110,6 +110,7 @@
"DisplayJobs" : 0,
"DisplayJobLength" : 64,
"DisplayData" : 0,
"DisplayColumnLength" : 32,
"DisplayConditionLength": 64,
"DisplayInputIDTemplate": 1,
......
......@@ -710,11 +710,13 @@ sub _add_table_node {
my $table_label = '<<table border="0" cellborder="0" cellspacing="0" cellpadding="1"><tr><td colspan="'.($columns||1).'">'. $naked_table->relative_display_name( $hive_pipeline ) .'</td></tr>';
if( $self->config_get('DisplayData') and $columns) {
if( $data_limit and $columns) {
my $display_column_length = $self->config_get('DisplayColumnLength');
$table_label .= '<tr><td colspan="'.$columns.'"> </td></tr>';
$table_label .= '<tr>'.join('', map { qq{<td bgcolor="$table_header_colour" border="1">$_</td>} } @column_names).'</tr>';
foreach my $row (@$table_data) {
$table_label .= '<tr>'.join('', map { qq{<td>$_</td>} } @{$row}{@column_names}).'</tr>';
$table_label .= '<tr>'.join('', map { '<td>'._protect_for_display($_, $display_column_length).'</td>' } @{$row}{@column_names}).'</tr>';
}
if($hit_limit) {
$table_label .= qq{<tr><td colspan="$columns">[ more data ]</td></tr>};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment