diff --git a/lib/NGCP/Panel/Controller/Root.pm b/lib/NGCP/Panel/Controller/Root.pm index 9a21da1615..c50d1d1af6 100644 --- a/lib/NGCP/Panel/Controller/Root.pm +++ b/lib/NGCP/Panel/Controller/Root.pm @@ -1,12 +1,8 @@ package NGCP::Panel::Controller::Root; use Sipwise::Base; BEGIN { extends 'Catalyst::Controller' } -use Carp qw(longmess); -use Convert::Ascii85 qw(); -use Data::Dumper qw(Dumper); use DateTime qw(); use DateTime::Format::RFC3339 qw(); -use IO::Compress::Xz qw(xz); use NGCP::Panel::Widget; use Scalar::Util qw(blessed); use Time::HiRes qw(); @@ -147,23 +143,7 @@ sub end :Private { my $incident = DateTime->from_epoch(epoch => Time::HiRes::time); my $incident_id = sprintf '%X', $incident->strftime('%s%N'); my $incident_timestamp = DateTime::Format::RFC3339->new->format_datetime($incident); - my $crash_state; - $c->log->error(join(q(), @{ $c->error })); - if ($c->config->{log_crash_state}) { - local $Data::Dumper::Indent = 1; - local $Data::Dumper::Useqq = 1; - local $Data::Dumper::Deparse = 1; - local $Data::Dumper::Quotekeys = 0; - local $Data::Dumper::Sortkeys = 1; - my $buffer; - xz(\(join(q(), @{ $c->error }) . longmess . Dumper($c) . Dumper($c->config)), \$buffer); - $crash_state = Convert::Ascii85::encode($buffer); - $crash_state =~ s/(.{80})/$1\n/g; - } - $c->log->error( - "Exception id $incident_id at $incident_timestamp crash_state:" . - ($crash_state ? ("\n" . $crash_state) : ' disabled') - ); + $c->log->error("fatal error, id=$incident_id, timestamp=$incident_timestamp, error=".join(q(), @{ $c->error })); $c->clear_errors; $c->stash( exception_incident => $incident_id, diff --git a/ngcp_panel.conf b/ngcp_panel.conf index 25a027d655..1ff24d1e80 100644 --- a/ngcp_panel.conf +++ b/ngcp_panel.conf @@ -10,9 +10,6 @@ log4perl.appender.Default.layout=PatternLayout log4perl.appender.Default.layout.ConversionPattern=%d{ISO8601} [%p] [%F +%L] %m{chomp}%n # perhaps also add: host=%H pid=%P -# each crash state is <50 KiB -log_crash_state 0 - schema_class NGCP::Schema @@ -82,5 +79,3 @@ log_crash_state 0 keyfile /etc/ssl/ngcp/api/ca-key.pem certfile /etc/ssl/ngcp/api/ca-cert.pem - -cache_root /run/shm diff --git a/share/layout/body.tt b/share/layout/body.tt index f45e4027f2..5a5e6280eb 100644 --- a/share/layout/body.tt +++ b/share/layout/body.tt @@ -118,7 +118,8 @@ $(function () { -%] $('a').each(function() { var _text = $(this).text().trim(); - if(_text == "Back" || + if(_text == "Back" || + $(this).hasClass('ngcp-error-button') || $(this).hasClass('accordion-toggle') || $(this).parents('#footer').length || $(this).parents('#topbar').length) { diff --git a/share/templates/error_page.tt b/share/templates/error_page.tt index 7bf908312a..4f83d1e7b3 100644 --- a/share/templates/error_page.tt +++ b/share/templates/error_page.tt @@ -4,32 +4,24 @@
-

Oops!

+

Sorry!

[% c.response.status %] Internal server error

-

Sorry, an exceptional error has occured:

- +

We are terribly sorry, an exceptional error has occured:

+
incident number: [% exception_incident %]
+
time of incident: [% exception_timestamp %]
+

Details have been logged on the server. If you want to report the error, describe what you were doing or attempting to do just before.

- - -   - Back to Dashboard - - - - -   - Contact Support - + + Back to Dashboard + + Contact Support