Log files - Bug reports - Config reports

This commit is contained in:
John Crisp 2025-05-20 13:56:26 +02:00
parent 12f8be6936
commit 6cc847b6b1
9 changed files with 352 additions and 242 deletions

View File

@ -5,94 +5,127 @@
<div class="card-body"> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <div>
(DBG)route: <%= $c->current_route %><br> (DBG)route: <%= $c->current_route %><br>
(DBG)trt: <%= $bugr_datas->{trt} %><br> (DBG)trt: <%= $bugr_datas->{trt} %><br>
</p> </div>
% } % }
<h1><%= $title %></h1> <h1><%= $title %></h1>
<!--br><%= $modul %><br--> <!--br><%= $modul %><br-->
<br>
<b> <h2><%= l ('bugr_DO_NOT_PANIC') %></h2>
%=l ('bugr_DO_NOT_PANIC') <br>
</b> <div>
<p> <%= l ('bugr_SME_EXPERIENCE') %>
%=l ('bugr_SME_EXPERIENCE') </div>
</p> <br>
<p> <div>
%=l ('bugr_USE_TEMPLATE') <%= l ('bugr_USE_TEMPLATE') %>
: <a href="https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs" : <a href="https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs"
target="_blank">https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs</a>. target="_blank">https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs</a>
</p> </div>
<p> <br>
%=l ('bugr_PLEASE_REPORT_HERE') <div>
: <a href="https://bugs.koozali.org" target="_blank">https://bugs.koozali.org</a>. <%= l ('bugr_PLEASE_REPORT_HERE') %>
</p> : <a href="https://bugs.koozali.org"
<p> target="_blank">https://bugs.koozali.org</a>
%=l ('bugr_FOLLOWING_REPORT_MIGHT_HELP') </div>
</p> <br>
<p> <div>
%=l ('bugr_REPORT_CONTENT') <%= l ('bugr_FOLLOWING_REPORT_MIGHT_HELP') %>
<br> </div>
<br>
<div>
<%= l ('bugr_REPORT_CONTENT') %>
<br><br>
<ul> <ul>
<li> <li>
%=l ('bugr_SME_VERSION') <%= l ('bugr_SME_VERSION') %>
</li> </li>
<li> <li>
%=l ('bugr_SERVER_MODE') <%= l ('bugr_SERVER_MODE') %>
</li> </li>
<li> <li>
%=l ('bugr_PREVIOUS_SERVER_MODE') <%= l ('bugr_PREVIOUS_SERVER_MODE') %>
</li> </li>
<li> <li>
%=l ('bugr_KERNEL_AND_ARCH') <%= l ('bugr_KERNEL_AND_ARCH') %>
</li> </li>
<li> <li>
%=l ('bugr_INSTALLED_RPMS') <%= l ('bugr_INSTALLED_RPMS') %>
</li> </li>
<li> <li>
%=l ('bugr_ALTERED_TEMPLATES') <%= l ('bugr_ALTERED_TEMPLATES') %>
</li> </li>
<li> <li>
%=l ('bugr_ALTERED_EVENTS') <%= l ('bugr_ALTERED_EVENTS') %>
</li> <li> </li> <li>
%=l ('bugr_YUM_REPOS') <%= l ('bugr_YUM_REPOS') %>
</li> </li>
<br>
</ul> </ul>
%=l ('bugr_PRIVACY') </div>
</p>
<% my $btn = l('bugr_CREATE_REPORT'); %>
%= form_for 'bugreport' => (method => 'POST') => begin
%= submit_button "$btn", class => ""
% end
<p><b>
%=l ('bugr_DONATING')
</b>
<br><br>
%=l ('bugr_AWARE_SME')
<br><br>
<b>
%=l ('bugr_YOUR_HELP')
</b>
<br><br>
%=l ('bugr_CONSIDER_DONATING')
<br><br>
</p>
%= link_to 'https://wiki.koozali.org/Donate' => begin
%= image '/images/btn_donateCC_LG.gif'
%= hidden_field 'trt' => $bugr_datas->{trt}
% end
<br> <br>
%=l ('bugr_THANK_YOU')
<div>
<%= l ('bugr_PRIVACY') %>
</div>
<br>
% my $btn = l('bugr_CREATE_REPORT');
<form action="/smanager/bugreport" method="POST">
<div class="row g-3 align-items-center">
<div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button>
</div>
</div>
<%= hidden_field 'trt' => $bugr_datas->{trt} %>
</form>
<br>
<div>
<b>
<%= l ('bugr_DONATING') %>
</b>
<br><br>
<%= l ('bugr_AWARE_SME') %>
<br><br>
<b>
<%= l ('bugr_YOUR_HELP') %>
</b>
<br><br>
<%= l ('bugr_CONSIDER_DONATING') %>
<br><br>
</div>
<br>
<div>
<a href="https://wiki.koozali.org/Donate"
target="_blank">
<img src="/smanager/images/btn_donateCC_LG.gif" />
</a>
</div>
<br>
<div>
<a href="https://wiki.koozali.org/Donate"
target="_blank">Donate
</a>
</div>
<br>
<div>
<%= l ('bugr_THANK_YOU') %>
</div>
</div> </div>

View File

@ -5,10 +5,10 @@
<div class="card-body"> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <div>
(DBG)route: <%= $c->current_route %><br> (DBG)route: <%= $c->current_route %><br>
(DBG)trt: <%= $bugr_datas->{trt} %><br> (DBG)trt: <%= $bugr_datas->{trt} %><br>
</p> </div>
% } % }
<h1><%= $title %></h1> <h1><%= $title %></h1>
@ -17,17 +17,25 @@
<% my $btn = l('bugr_Download this report'); %> <% my $btn = l('bugr_Download this report'); %>
%= form_for 'bugreportD' => (method => 'POST') => begin <form action="/smanager/bugreportD" method="POST">
%= submit_button "$btn", class => "" <div class="row g-3 align-items-center">
%= hidden_field 'trt' => $bugr_datas->{trt} <div class="col-md-2">
% end <button type="submit" class="btn btn-primary"><%= $btn %></button>
</div>
</div>
<%= hidden_field 'trt' => $bugr_datas->{trt} %>
</form>
% my $out = "================== <br />"; % my $out = "================== <br />";
% $out .= "Boot anaysis image (right click and save image to download)<br />"; % $out .= "Boot anaysis image (right click and save image to download)<br />";
% $out .= "================== <br />"; % $out .= "================== <br />";
% $out .= "<img src='images/boot.svg' alt='boot timing image' width=95% >"; % $out .= "<img src='images/boot.svg' alt='boot timing image' width=95% >";
<br><%= $c->render_to_string(inline=>$out) %><br> <br>
<%= $c->render_to_string(inline=>$out) %>
<br><br>
</div> </div>

View File

@ -64,13 +64,13 @@
<b>tell me if you find this!</b> <b>tell me if you find this!</b>
<%=$c->l("ln_REMOVE_HOSTS_DESC") %> <%= $c->l("ln_REMOVE_HOSTS_DESC") %>
<br> <br>
<span class=""> <span class="">
<%= $c->l("ln_REMOVE_HOSTS_LABEL") %> <%= $c->l("ln_REMOVE_HOSTS_LABEL") %>
</span> </span>
<span class=""> <span class="">
<%=check_box deletehost=>1, checked=>1 %> <%= check_box deletehost=>1, checked=>1 %>
</span> </span>
<br><br> <br><br>
% } % }

View File

@ -2,8 +2,8 @@
<table class="table table-bordered"> <table class="table table-bordered">
<thead> <thead>
<tr> <tr>
<th><%= l 'rvw_NETWORKING_PARAMS' %></th> <th class="col-md-2"><%= l 'rvw_NETWORKING_PARAMS' %></th>
<th>&nbsp</th> <th class="col-auto">&nbsp</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -47,8 +47,8 @@
<table class="table table-bordered"> <table class="table table-bordered">
<thead> <thead>
<tr> <tr>
<th><%= l 'rvw_SERVER_NAMES' %></th> <th class="col-md-2"><%= l 'rvw_SERVER_NAMES' %></th>
<th>&nbsp</th> <th class="col-auto">&nbsp</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -82,8 +82,8 @@
<table class="table table-bordered"> <table class="table table-bordered">
<thead> <thead>
<tr> <tr>
<th><%= l 'rvw_DOMAIN_INFORMATION' %></th> <th class="col-md-2"><%= l 'rvw_DOMAIN_INFORMATION' %></th>
<th>&nbsp</th> <th class="col-auto">&nbsp</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@ -1,4 +1,5 @@
% layout 'AdminLTE', title => "Sme server 2 - qmailanalog"; % layout 'AdminLTE', title => "Sme server 2 - qmailanalog";
% content_for 'module' => begin % content_for 'module' => begin
<!-- should be moved --> <!-- should be moved -->
@ -7,46 +8,64 @@
<div class="card-body"> <div class="card-body">
%if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <div>
(DBG)route: <%= $c->current_route %><br> (DBG)route: <%= $c->current_route %><br>
</p> </div>
%} % }
<h1><%= $title %></h1> <h1><%= $title %></h1>
<br> <br>
<%= $modul %> <%= $modul %>
<% my $btn = l('qma_GENERATE_REPORT'); %> <% my $btn = l('qma_GENERATE_REPORT'); %>
%= form_for 'qmailanalog' => (method => 'POST') => begin
<p>
<span class=""> <form action="/smanager/qmailanalog" method="POST">
%=l 'qma_REPORT_TYPE'
</span> <div class="row g-3 align-items-center">
<span class=""> <div class="col-md-1">
<!-- (to be sorted) --> <label for="analysis_type" class="col-form-label"><%=l 'qma_REPORT_TYPE' %></label>
%= select_field 'report_type' => $c->reportType_list(), id => "" </div>
</span> <div class="col-auto">
</p> <!-- (to be sorted) -->
<%= select_field 'report_type' => $c->reportType_list(), class => "form-select", id => "analysis_type" %>
</div>
</div>
<br>
<!--And optional parameters, depending on the choice.--> <!--And optional parameters, depending on the choice.-->
<div id=""> <div class="row g-3 align-items-center">
<span class=""> <div class="col-md-1">
%= label_for message_id => 'Message ID:' <label for="message_id_group" class="col-form-label">Message ID:</label>
</span> </div>
<span class=""> <div class="col-auto">
%= text_field 'message_id', placeholder => 'Enter Postfix Message ID', id => "" <input type="text" name="message_id" id="message_id_group" class="form-control" aria-describedby="message_id_group" placeholder="Enter Postfix Message ID">
</span> </div>
</div> </div>
<div id=""> <br>
<span class="">
%= label_for email_address => 'Email Address:' <div class="row g-3 align-items-center">
</span> <div class="col-md-1">
<span class=""> <label for="email_address_group" class="col-form-label">Email Address:</label>
%= email_field 'email_address', placeholder => 'Enter email address', id => "" </div>
</span> <div class="col-auto">
<input type="email" name="email_address" id="email_address_group" class="form-control" aria-describedby="email_address_group" placeholder="Enter Email Address">
</div>
</div> </div>
%= submit_button "$btn", class => "" <br>
% end
<div class="row g-3 align-items-center">
<div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button>
</div>
</div>
</form>
</div> </div>
%end %end

View File

@ -5,70 +5,108 @@
<div class="card-body"> <div class="card-body">
%if (config->{debug} == 1) { %if (config->{debug} == 1) {
<p> <div>
(DBG)route: <%= $c->current_route %><br> (DBG)route: <%= $c->current_route %><br>
</p> </div>
%} % }
<h1><%= $title %></h1> <h1><%= $title %></h1>
<br> <br>
<%= $notif %> <%= $notif %>
<% my $btn = l('NEXT'); %>
%= form_for 'viewlogfiles' => (method => 'POST') => begin <% my $btn = l('NEXT'); %>
<p>
%=l 'log_FIRSTPAGE_DESC'
<br>
<span class="">
%=l 'log_LOG_FILE_SELECT_DESC'
</span>
<span class="">
% param 'Filename' => 'messages';
<!-- select_field 'Filename' => [['toto'], ['tata']], class => "" -->
%= select_field 'Filename' => $c->findlogFiles(), class => ""
</span>
</p>
<p>
%=l 'log_FILTER_PATTERN_DESC'
<br>
<span class="">
%=l 'log_FILTER_PATTERN_LABEL'
</span>
<span class="">
%= text_field 'Matchpattern', class => ""
</span>
</p>
<p> <form action="/smanager/viewlogfiles" method="POST">
%=l 'log_MATCH_PATTERN_DESC'
<br>
<span class="">
%=l 'log_MATCH_PATTERN_LABEL'
</span>
<span class="">
%= text_field 'Highlightpattern', class => ""
</span>
</p>
<p> <div>
%=l 'log_OP_DESC' <%=l 'log_FIRSTPAGE_DESC' %>
<br> </div>
<span class="">
%=l 'log_OP_LABEL'
</span>
<span class="">
%if ($log_datas->{'default_op'} eq 'download') {
% param 'Operation' => 'download';
%}
%= select_field 'Operation' => [[(l 'log_VIEW') => 'view'],[(l 'DOWNLOAD') => 'download']], class => ""
</span>
</p>
<p> <br>
%=l 'log_END_DESC'
</p> <div class="row g-3 align-items-center">
<div class="col-md-2">
<label for="LogFileSelect" class="col-form-label"><%=l 'log_LOG_FILE_SELECT_DESC' %></label>
</div>
<div class="col-auto">
% param 'Filename' => 'messages';
<!-- select_field 'Filename' => [['toto'], ['tata']], class => "" -->
%= select_field 'Filename' => $c->findlogFiles(), class => "form-select", id => "LogFileSelect"
</div>
</div>
<br>
<div>
<%= l 'log_FILTER_PATTERN_DESC' %>
</div>
<br>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<label for="LogFilterPattern" class="col-form-label"><%= l 'log_FILTER_PATTERN_LABEL' %></label>
</div>
<div class="col-auto">
<input type="text" name="Matchpattern" id="LogFilterPattern" class="form-control" aria-describedby="LogFilterPattern">
</div>
</div>
<br>
<div>
<%= l 'log_MATCH_PATTERN_DESC' %>
</div>
<br>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<label for="LogHighlightpattern" class="col-form-label"><%= l 'log_MATCH_PATTERN_LABEL' %></label>
</div>
<div class="col-auto">
<input type="text" name="Highlightpattern" id="LogHighlightpattern" class="form-control" aria-describedby="LogHighlightpattern">
</div>
</div>
<br>
<div>
<%= l 'log_OP_DESC' %>
</div>
<br>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<label for="LogOperation" class="col-form-label"><%= l 'log_OP_LABEL' %></label>
</div>
<div class="col-auto">
%if ($log_datas->{'default_op'} eq 'download') {
% param 'Operation' => 'download';
% }
%= select_field 'Operation' => [[(l 'log_VIEW') => 'view'],[(l 'DOWNLOAD') => 'download']], class => "form-select", id => "LogOperation"
</div>
</div>
<br>
<div>
<%= l 'log_END_DESC' %>
</div>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button>
</div>
</div>
</form>
%= submit_button "$btn", class => ""
% end
</div> </div>
%end %end

View File

@ -5,28 +5,37 @@
<div class="card-body"> <div class="card-body">
% if (config->{debug} == 1) { % if (config->{debug} == 1) {
<p> <div>
(DBG)route: <%= $c->current_route %><br> (DBG)route: <%= $c->current_route %><br>
(DBG)trt: <%= $log_datas->{trt} %><br> (DBG)trt: <%= $log_datas->{trt} %><br>
</p> </div>
% } % }
<h1><%= $title %></h1> <h1><%= $title %></h1>
<br><%= $modul %><br> <br>
<%= $modul %>
<br>
<p>
<% my $btn = l('log_REFRESH'); %> <% my $btn = l('log_REFRESH'); %>
%= form_for 'viewlogfilesr' => (method => 'POST') => begin <form action="/smanager/viewlogfilesr" method="POST">
%= submit_button "$btn", class => ""
%= hidden_field 'trt' => $log_datas->{trt} <div class="row g-3 align-items-center">
%= hidden_field 'Filename' => $log_datas->{filename} <div class="col-md-2">
%= hidden_field 'Matchpattern' => $log_datas->{matchpattern} <button type="submit" class="btn btn-primary"><%= $btn %></button>
%= hidden_field 'Highlightpattern' => $log_datas->{highlightpattern} </div>
%= hidden_field 'Operation' => $log_datas->{operation} </div>
% end
</p> %= hidden_field 'trt' => $log_datas->{trt}
%= hidden_field 'Filename' => $log_datas->{filename}
%= hidden_field 'Matchpattern' => $log_datas->{matchpattern}
%= hidden_field 'Highlightpattern' => $log_datas->{highlightpattern}
%= hidden_field 'Operation' => $log_datas->{operation}
</form>
</div> </div>
%end %end

View File

@ -1,6 +1,6 @@
%define name smeserver-manager-AdminLTE %define name smeserver-manager-AdminLTE
%define version 11.0.0 %define version 11.0.0
%define release 24 %define release 25
Summary: AdminLTE is an html framework for admin consoles - this rpm adds it to smeserver manager2 Summary: AdminLTE is an html framework for admin consoles - this rpm adds it to smeserver manager2
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
@ -26,6 +26,9 @@ AdminLTE is an html framework for admin consoles
wget https://github.com/ColorlibHQ/AdminLTE/archive/master.zip wget https://github.com/ColorlibHQ/AdminLTE/archive/master.zip
%changelog %changelog
* Tue May 20 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 11.0.0-25.sme
- Log files - Bug reports - Config reports
* Mon May 19 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 11.0.0-24.sme * Mon May 19 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 11.0.0-24.sme
- Local Networks and a few odd tidies - Local Networks and a few odd tidies