* Thu Mar 06 2025 Brian Read <brianr@koozali.org> 11.0.0-63.sme

- Add boot.svg image to Bug Report panel [SME: 12953]
- Move report template to inside smanager tree
- Add one-off systemd task to create boot.svg run from panel
This commit is contained in:
Brian Read 2025-03-07 15:41:55 +00:00
parent f9bf8cf064
commit 4f00dfbdb1
5 changed files with 76 additions and 5 deletions

View File

@ -0,0 +1,9 @@
[Unit]
Description=Koozali SME Server boot diagnostic tool
After=sme-server.target
PartOf=sme-server.target
[Service]
Type=oneshot
ExecStart=/bin/sh -c "/usr/bin/systemd-analyze plot > /usr/share/smanager/themes/default/public/images/boot.svg"
RemainAfterExit=yes

View File

@ -78,7 +78,7 @@ sub create_configuration_report {
# create the reporting template # create the reporting template
my $configreport_template = Text::Template->new( my $configreport_template = Text::Template->new(
TYPE => 'FILE', TYPE => 'FILE',
SOURCE => '/etc/e-smith/web/common/configuration_report.tmpl', SOURCE => '/usr/share/smanager/themes/default/public/configuration_report.tmpl',
UNTAINT => 1 UNTAINT => 1
); );
my $report_creation_time = gen_locale_date_string; my $report_creation_time = gen_locale_date_string;
@ -115,10 +115,22 @@ sub create_configuration_report {
# prcess template # prcess template
my $result = $configreport_template->fill_in(HASH => \%vars); my $result = $configreport_template->fill_in(HASH => \%vars);
#take out any multiple blank lines
#$result =~ s/\n{3,}/\n/g;
# write processed template to file # write processed template to file
open(my $cfgrep, '>', $configreportfile) or die "Could not create temporary file for config report!"; open(my $cfgrep, '>', $configreportfile) or die "Could not create temporary file for config report!";
print $cfgrep $result; print $cfgrep $result;
close $cfgrep; close $cfgrep;
#And create boot analysis image - now run externally by systemd, only run once per boot.
$result = `/usr/bin/systemctl start bootsequence.service`;
if (!$? == 0) {
warn "/usr/bin/systemd-analyze plot Command failed \n";
}
} ## end sub create_configuration_report } ## end sub create_configuration_report
sub show_config_report { sub show_config_report {

View File

@ -0,0 +1,38 @@
Configuration report created {$report_creation_time}
==================
Base configuration
==================
SME server version: {$releaseversion}
SME server mode: {$systemmode}
SME server previous mode: {$previoussystemmode }
Running Kernel: {$curkernel}
===========================
New RPMs not in base system
===========================
{ foreach $i (@newrpms) {
$OUT .= "$i";
}
}
===========================
Custom and modified templates
===========================
{ foreach $i (@templates) {
$OUT .= "$i";
}
}
===========================
Modified events
===========================
{ foreach $i (@events) {
$OUT .= "$i";
}
}
=======================
Additional repositories
=======================
{ foreach $r (@repositories) {
$OUT .= "$r";
}
}
DONE!

View File

@ -22,6 +22,13 @@
%= hidden_field 'trt' => $bugr_datas->{trt} %= hidden_field 'trt' => $bugr_datas->{trt}
% end % end
% my $out = "================== <br />";
% $out .= "Boot anaysis image (right click and save image to download)<br />";
% $out .= "================== <br />";
% $out .= "<img src='images/boot.svg' alt='boot timing image' width=95% >";
<br><%= $c->render_to_string(inline=>$out) %><br>
</div> </div>
%end %end

View File

@ -2,7 +2,7 @@ Summary: Sme server navigation module : manager 2
%define name smeserver-manager %define name smeserver-manager
Name: %{name} Name: %{name}
%define version 11.0.0 %define version 11.0.0
%define release 62 %define release 63
Version: %{version} Version: %{version}
Release: %{release}%{?dist} Release: %{release}%{?dist}
License: GPL License: GPL
@ -143,6 +143,11 @@ true
%defattr(-,root,root) %defattr(-,root,root)
%changelog %changelog
* Thu Mar 06 2025 Brian Read <brianr@koozali.org> 11.0.0-63.sme
- Add boot.svg image to Bug Report panel [SME: 12953]
- Move report template to inside smanager tree
- Add one-off systemd task to create boot.svg run from panel
* Tue Mar 04 2025 Brian Read <brianr@koozali.org> 11.0.0-62.sme * Tue Mar 04 2025 Brian Read <brianr@koozali.org> 11.0.0-62.sme
- Update *_en.lex files to conform to standard english punctuation [SME: 11809] - Update *_en.lex files to conform to standard english punctuation [SME: 11809]