From: Julien Rouhaud Date: Fri, 8 Aug 2014 20:01:10 +0000 (+0200) Subject: Slighty improve javascript. X-Git-Tag: v6.0~3^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a198cf6ddfa354a4a5792f32cd2e6291c4177d55;p=pgbadger Slighty improve javascript. - use only one call of sql_select - use only one call of sql_format - use jQuery selector instead of getElementById to avoid js errors when not found. --- diff --git a/pgbadger b/pgbadger index 16cc132..c065785 100755 --- a/pgbadger +++ b/pgbadger @@ -6599,7 +6599,7 @@ sub print_lock_queries_report $max_time $avg_time -
$query
+
$query
$example
@@ -6619,7 +6619,7 @@ sub print_lock_queries_report $details .= " ]"; print $fh qq{
-
$query
+
$query
$details
}; @@ -6682,7 +6682,7 @@ sub print_lock_queries_report $rank $time -
$query
+
$query
$details
@@ -6751,7 +6751,7 @@ sub print_tempfile_report $max_size $avg_size -
$query
+
$query
$example
@@ -6770,7 +6770,7 @@ sub print_tempfile_report $details .= "Bind query: yes
" if ($normalyzed_info{$k}{samples}{$d}{bind}); print $fh qq{
-
$query
+
$query
$details
@@ -6833,7 +6833,7 @@ sub print_tempfile_report $rank $size -
$query
+
$query
$details
@@ -6963,7 +6963,7 @@ sub print_slowest_individual_queries $rank $duration -
$query
+
$query
$details
@@ -7078,7 +7078,7 @@ sub print_time_consuming $max $avg -
$query
+
$query

Times Reported Time consuming queries #$rank

@@ -7118,7 +7118,7 @@ sub print_time_consuming $query = &highlight_code($normalyzed_info{$k}{samples}{$d}{query}); print $fh qq{
-
$query
+
$query
$details
}; @@ -7242,7 +7242,7 @@ sub print_most_frequent $max $avg -
$query
+
$query

Times Reported Time consuming queries #$rank

@@ -7282,7 +7282,7 @@ sub print_most_frequent $query = &highlight_code($normalyzed_info{$k}{samples}{$d}{query}); print $fh qq{
-
$query
+
$query
$details
}; @@ -7407,7 +7407,7 @@ sub print_slowest_queries $duration -
$query
+
$query

Times Reported Time consuming queries #$rank

@@ -7447,7 +7447,7 @@ sub print_slowest_queries $query = &highlight_code($normalyzed_info{$k}{samples}{$d}{query}); print $fh qq{
-
$query
+
$query
$details
}; @@ -9989,10 +9989,10 @@ document.writeln('
*/ @@ -10085,10 +10085,10 @@ document.writeln('
*/ @@ -11097,31 +11097,6 @@ div#littleToc a:hover { text-decoration:none; background-color:#DDDDDD; } WRFILE: pgbadger.js /*