Bugzilla – Attachment 174109 Details for
Bug 38385
DB updates not displayed properly on the UI
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38385: Improve DB update output on error (UI)
Bug-38385-Improve-DB-update-output-on-error-UI.patch (text/plain), 4.29 KB, created by
Jonathan Druart
on 2024-11-07 10:36:13 UTC
(
hide
)
Description:
Bug 38385: Improve DB update output on error (UI)
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-11-07 10:36:13 UTC
Size:
4.29 KB
patch
obsolete
>From 61400d6c626885e549f2f1de4ee11a90b6cd8cd7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 7 Nov 2024 11:33:03 +0100 >Subject: [PATCH] Bug 38385: Improve DB update output on error (UI) > >When an error occurred during the DB update the UI is not correct. > >1. say_success, say_info, etc. show the span tags and are not colored >2. "Everything went okay" shown even if atomic updates failed >3. The same error can be displayed several time (see https://snipboard.io/IGiKgM.jpg) > >Test plan: >Create a new db rev and/or atomic update >Have some say_* statement to render messages, and raise an error > >For instance: > say_info( $out, "Use blue for further information" ); > > try { > say_warning( $out, "Use yellow for warning/a call to action" ); > $dbh->do(q{}); > } catch { > say_failure( $out, "Use red for danger/failure" ); > $_->rethrow; > }; >--- > .../prog/en/modules/installer/step3.tt | 36 +++++++++---------- > 1 file changed, 17 insertions(+), 19 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >index 6590b93e7ec..6c75a145ec9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >@@ -419,16 +419,15 @@ > <ul> > [% FOR e IN error %] > [% FOR o IN e.output %] >- <li class="update_error"> >- [% o | html %] >- <br/> >- ERROR: [% e.error | $raw %] >- >- [% IF e.output.size > 1 %] >- [% IF loop.first %]<ul>[% ELSIF loop.last %]</ul>[% END %] >- [% END %] >- </li> >+ [% o | $raw %] >+ <br/> >+ [% IF e.output.size > 1 %] >+ [% IF loop.first %]<ul>[% ELSIF loop.last %]</ul>[% END %] >+ [% END %] > [% END %] >+ <li class="update_error"> >+ ERROR: [% e.error | $raw %] >+ </li> > [% END %] > </ul> > [% END %] >@@ -439,21 +438,20 @@ > <ul> > [% FOR e IN atomic_updates.error %] > [% FOR o IN e.output %] >- <li class="update_error"> >- [% o | html %] >- <br/> >- ERROR: [% e.error | $raw %] >- >- [% IF e.output.size > 1 %] >- [% IF loop.first %]<ul>[% ELSIF loop.last %]</ul>[% END %] >- [% END %] >- </li> >+ [% o | $raw %] >+ <br/> >+ [% IF e.output.size > 1 %] >+ [% IF loop.first %]<ul>[% ELSIF loop.last %]</ul>[% END %] >+ [% END %] > [% END %] >+ <li class="update_error"> >+ ERROR: [% e.error | $raw %] >+ </li> > [% END %] > </ul> > [% END %] > >- [% UNLESS error OR has_update_errors %] >+ [% UNLESS error OR atomic_updates.error OR has_update_errors %] > <p>Everything went okay. Update done.</p> > <p><a href="install.pl?step=3&op=finished" class="btn btn-primary">Continue to log in to Koha</a></p> > [% ELSE %] >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38385
:
174109
|
174294
|
174410