Bug 36039: New 'datatabase audit' tab in about page
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: JesseM <jesse@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
09bb85409d
commit
6940167048
6
about.pl
6
about.pl
|
|
@ -926,4 +926,10 @@ sub message_broker_check {
|
|||
}
|
||||
}
|
||||
|
||||
if ( $tab eq 'database' ) {
|
||||
use Koha::Database::Auditor;
|
||||
my $db_auditor = Koha::Database::Auditor->new( { is_cli => 0 } );
|
||||
my $audit_diff = $db_auditor->run;
|
||||
$template->param( audit_diff => $audit_diff, audit_warning => $db_auditor->get_warning );
|
||||
}
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
[% WRAPPER tab_item linktab = 1 tabname = "translations" bt_active = tab == "translations" %] <span>Translations</span> [% END %]
|
||||
[% WRAPPER tab_item linktab = 1 tabname = "history" bt_active = tab == "history" %] <span>Timeline</span> [% END %]
|
||||
[% WRAPPER tab_item linktab = 1 tabname = "dedications" bt_active = tab == "dedications" %] <span>Dedications</span> [% END %]
|
||||
[% WRAPPER tab_item linktab = 1 tabname = "database" bt_active = tab == "database" %] <span>Database audit</span> [% END %]
|
||||
[% END %]
|
||||
[% WRAPPER tab_panels %]
|
||||
[% SWITCH tab %]
|
||||
|
|
@ -52,6 +53,7 @@
|
|||
[% CASE 'translations' %] [% PROCESS translations_panel %]
|
||||
[% CASE 'history' %] [% PROCESS history_panel %]
|
||||
[% CASE 'dedications' %] [% PROCESS dedications_panel %]
|
||||
[% CASE 'database' %] [% PROCESS database_panel %]
|
||||
[% CASE %] [% PROCESS about_panel %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
|
@ -1350,3 +1352,14 @@
|
|||
</p>
|
||||
[% END # tab=dedications %]
|
||||
[% END %]
|
||||
|
||||
[% BLOCK database_panel %]
|
||||
[% WRAPPER tab_panel tabname= "database" bt_active = 1 %]
|
||||
<h2>Database audit</h2>
|
||||
<p>Run the following SQL to fix the database:</p>
|
||||
<code>
|
||||
[% audit_diff | html %]
|
||||
</code>
|
||||
<p class="alert alert-warning">[% audit_warning | html %]</p>
|
||||
[% END # tab=database %]
|
||||
[% END %]
|
||||
Loading…
Reference in New Issue