| 1 | package HPC::Runner::Command::stats::Logger::JSON::TableOutput; | ||
| 2 | |||
| 3 | use Moose::Role; | ||
| 4 | use namespace::autoclean; | ||
| 5 | |||
| 6 | use Text::ASCIITable; | ||
| 7 | |||
| 8 | ## TODO This one is mostly the same | ||
| 9 | sub build_table { | ||
| 10 | my $self = shift; | ||
| 11 | my $res = shift; | ||
| 12 | my $id = shift || ''; | ||
| 13 | |||
| 14 | my $start_time = $res->{submission_time} || ''; | ||
| 15 | my $project = $res->{project} || ''; | ||
| 16 | # my $id = $res->{uuid} || ''; | ||
| 17 | my $header = "Time: " . $start_time; | ||
| 18 | $header .= " Project: " . $project; | ||
| 19 | $header .= "\nSubmissionID: " . $id; | ||
| 20 | my $table = Text::ASCIITable->new( { headingText => $header } ); | ||
| 21 | |||
| 22 | return $table; | ||
| 23 | } | ||
| 24 | |||
| 25 | 1; |