From 2f2ba839abaef70eac1b162c54579123141dfd98 Mon Sep 17 00:00:00 2001 From: nickmorales Date: Tue, 26 Jan 2016 20:44:58 +0000 Subject: [PATCH] cleanup STDERR printing --- lib/SGN/Controller/BreedersToolbox/Trial.pm | 6 ++-- lib/SGN/View/Trial.pm | 52 ++++++++++++++++++++++++++--- 2 files changed, 49 insertions(+), 9 deletions(-) diff --git a/lib/SGN/Controller/BreedersToolbox/Trial.pm b/lib/SGN/Controller/BreedersToolbox/Trial.pm index 6ba5e5ec8..9e74a12d0 100644 --- a/lib/SGN/Controller/BreedersToolbox/Trial.pm +++ b/lib/SGN/Controller/BreedersToolbox/Trial.pm @@ -22,9 +22,9 @@ sub trial_init : Chained('/') PathPart('breeders/trial') CaptureArgs(1) { print STDERR "TRIAL INIT...".localtime()."\n"; - $c->stash->{trial_id} = $trial_id; print STDERR "TRIAL ID = $trial_id\n"; + my $schema = $c->dbic_schema("Bio::Chado::Schema"); $c->stash->{schema} = $schema; my $trial; @@ -38,7 +38,6 @@ sub trial_init : Chained('/') PathPart('breeders/trial') CaptureArgs(1) { } $c->stash->{trial} = $trial; - print STDERR "Check2: ".localtime()."\n"; } sub old_trial_url : Path('/breeders_toolbox/trial') Args(1) { @@ -51,7 +50,6 @@ sub old_trial_url : Path('/breeders_toolbox/trial') Args(1) { sub trial_info : Chained('trial_init') PathPart('') Args(0) { my $self = shift; my $c = shift; - print STDERR "Check3: ".localtime()."\n"; my $format = $c->req->param("format"); my $user = $c->user(); @@ -157,7 +155,7 @@ sub trial_info : Chained('trial_init') PathPart('') Args(0) { $c->stash->{template} = '/breeders_toolbox/trial.mas'; } - print STDERR "check 6: ".(time()-$start_time)."\n"; + print STDERR "End Load Trial Detail Page: ".localtime()."\n"; } diff --git a/lib/SGN/View/Trial.pm b/lib/SGN/View/Trial.pm index e5ce2fabf..257dc4689 100644 --- a/lib/SGN/View/Trial.pm +++ b/lib/SGN/View/Trial.pm @@ -19,11 +19,53 @@ sub trial_detail_design_view { $design_result_html .= qq{Plot NameAccession NameCheck NameRow numberCol numberBlock NumberBlock Row NumberBlock Col NumberRep Number}; foreach my $key (sort { $a <=> $b} keys %design) { - $design_result_html .= "".$design{$key}->{plot_name} ."".$design{$key}->{accession_name} ."".$design{$key}->{check_name}."".$design{$key}->{row_number}."".$design{$key}->{col_number}."".$design{$key}->{block_number}."".$design{$key}->{block_row_number}."".$design{$key}->{block_col_number}.""; - if ($design{$key}->{rep_number}) { - $design_result_html .= "".$design{$key}->{rep_number}.""; - } - $design_result_html .= ""; + $design_result_html .= ""; + if ($design{$key}->{plot_name}) { + $design_result_html .= "".$design{$key}->{plot_name}.""; + } else { + $design_result_html .= ""; + } + if ($design{key}->{accession_name}) { + $design_result_html .= "".$design{$key}->{accession_name}.""; + } else { + $design_result_html .= ""; + } + if ($design{key}->{check_name}) { + $design_result_html .= "".$design{$key}->{check_name}.""; + } else { + $design_result_html .= ""; + } + if ($design{key}->{row_number}) { + $design_result_html .= "".$design{$key}->{row_number}.""; + } else { + $design_result_html .= ""; + } + if ($design{key}->{col_number}) { + $design_result_html .= "".$design{$key}->{col_number}.""; + } else { + $design_result_html .= ""; + } + if ($design{key}->{block_number}) { + $design_result_html .= "".$design{$key}->{block_number}.""; + } else { + $design_result_html .= ""; + } + if ($design{key}->{block_row_number}) { + $design_result_html .= "".$design{$key}->{block_row_number}.""; + } else { + $design_result_html .= ""; + } + if ($design{key}->{block_col_number}) { + $design_result_html .= "".$design{$key}->{block_col_number}.""; + } else { + $design_result_html .= ""; + } + if ($design{key}->{rep_number}) { + $design_result_html .= "".$design{$key}->{rep_number}.""; + } else { + $design_result_html .= ""; + } + $design_result_html .= ""; } $design_result_html .= ""; return "$design_result_html"; -- 2.11.4.GIT