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">
% if (config->{debug} == 1) {
<p>
<div>
(DBG)route: <%= $c->current_route %><br>
(DBG)trt: <%= $bugr_datas->{trt} %><br>
</p>
</div>
% }
<h1><%= $title %></h1>
<!--br><%= $modul %><br-->
<b>
%=l ('bugr_DO_NOT_PANIC')
</b>
<p>
%=l ('bugr_SME_EXPERIENCE')
</p>
<p>
%=l ('bugr_USE_TEMPLATE')
: <a href="https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs"
target="_blank">https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs</a>.
</p>
<p>
%=l ('bugr_PLEASE_REPORT_HERE')
: <a href="https://bugs.koozali.org" target="_blank">https://bugs.koozali.org</a>.
</p>
<p>
%=l ('bugr_FOLLOWING_REPORT_MIGHT_HELP')
</p>
<p>
%=l ('bugr_REPORT_CONTENT')
<br>
<h2><%= l ('bugr_DO_NOT_PANIC') %></h2>
<br>
<div>
<%= l ('bugr_SME_EXPERIENCE') %>
</div>
<br>
<div>
<%= l ('bugr_USE_TEMPLATE') %>
: <a href="https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs"
target="_blank">https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs</a>
</div>
<br>
<div>
<%= l ('bugr_PLEASE_REPORT_HERE') %>
: <a href="https://bugs.koozali.org"
target="_blank">https://bugs.koozali.org</a>
</div>
<br>
<div>
<%= l ('bugr_FOLLOWING_REPORT_MIGHT_HELP') %>
</div>
<br>
<div>
<%= l ('bugr_REPORT_CONTENT') %>
<br><br>
<ul>
<li>
%=l ('bugr_SME_VERSION')
<%= l ('bugr_SME_VERSION') %>
</li>
<li>
%=l ('bugr_SERVER_MODE')
<%= l ('bugr_SERVER_MODE') %>
</li>
<li>
%=l ('bugr_PREVIOUS_SERVER_MODE')
<%= l ('bugr_PREVIOUS_SERVER_MODE') %>
</li>
<li>
%=l ('bugr_KERNEL_AND_ARCH')
<%= l ('bugr_KERNEL_AND_ARCH') %>
</li>
<li>
%=l ('bugr_INSTALLED_RPMS')
<%= l ('bugr_INSTALLED_RPMS') %>
</li>
<li>
%=l ('bugr_ALTERED_TEMPLATES')
<%= l ('bugr_ALTERED_TEMPLATES') %>
</li>
<li>
%=l ('bugr_ALTERED_EVENTS')
<%= l ('bugr_ALTERED_EVENTS') %>
</li> <li>
%=l ('bugr_YUM_REPOS')
<%= l ('bugr_YUM_REPOS') %>
</li>
<br>
</ul>
%=l ('bugr_PRIVACY')
</p>
</div>
<% my $btn = l('bugr_CREATE_REPORT'); %>
<br>
%= form_for 'bugreport' => (method => 'POST') => begin
%= submit_button "$btn", class => ""
% end
<div>
<%= l ('bugr_PRIVACY') %>
</div>
<p><b>
%=l ('bugr_DONATING')
<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')
<%= l ('bugr_AWARE_SME') %>
<br><br>
<b>
%=l ('bugr_YOUR_HELP')
<%= l ('bugr_YOUR_HELP') %>
</b>
<br><br>
%=l ('bugr_CONSIDER_DONATING')
<%= 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
</div>
<br>
%=l ('bugr_THANK_YOU')
<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>

View File

@ -5,10 +5,10 @@
<div class="card-body">
% if (config->{debug} == 1) {
<p>
<div>
(DBG)route: <%= $c->current_route %><br>
(DBG)trt: <%= $bugr_datas->{trt} %><br>
</p>
</div>
% }
<h1><%= $title %></h1>
@ -17,17 +17,25 @@
<% my $btn = l('bugr_Download this report'); %>
%= form_for 'bugreportD' => (method => 'POST') => begin
%= submit_button "$btn", class => ""
%= hidden_field 'trt' => $bugr_datas->{trt}
% end
<form action="/smanager/bugreportD" 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>
% 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>
<br>
<%= $c->render_to_string(inline=>$out) %>
<br><br>
</div>

View File

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

View File

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

View File

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

View File

@ -5,70 +5,108 @@
<div class="card-body">
%if (config->{debug} == 1) {
<p>
<div>
(DBG)route: <%= $c->current_route %><br>
</p>
%}
</div>
% }
<h1><%= $title %></h1>
<br>
<%= $notif %>
<% my $btn = l('NEXT'); %>
%= form_for 'viewlogfiles' => (method => 'POST') => begin
<p>
%=l 'log_FIRSTPAGE_DESC'
<form action="/smanager/viewlogfiles" method="POST">
<div>
<%=l 'log_FIRSTPAGE_DESC' %>
</div>
<br>
<span class="">
%=l 'log_LOG_FILE_SELECT_DESC'
</span>
<span class="">
<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 => ""
</span>
</p>
%= select_field 'Filename' => $c->findlogFiles(), class => "form-select", id => "LogFileSelect"
</div>
</div>
<p>
%=l 'log_FILTER_PATTERN_DESC'
<br>
<span class="">
%=l 'log_FILTER_PATTERN_LABEL'
</span>
<span class="">
%= text_field 'Matchpattern', class => ""
</span>
</p>
<p>
%=l 'log_MATCH_PATTERN_DESC'
<br>
<span class="">
%=l 'log_MATCH_PATTERN_LABEL'
</span>
<span class="">
%= text_field 'Highlightpattern', class => ""
</span>
</p>
<div>
<%= l 'log_FILTER_PATTERN_DESC' %>
</div>
<p>
%=l 'log_OP_DESC'
<br>
<span class="">
%=l 'log_OP_LABEL'
</span>
<span class="">
<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 => ""
</span>
</p>
% }
%= select_field 'Operation' => [[(l 'log_VIEW') => 'view'],[(l 'DOWNLOAD') => 'download']], class => "form-select", id => "LogOperation"
</div>
</div>
<p>
%=l 'log_END_DESC'
</p>
<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>
%end

View File

@ -5,28 +5,37 @@
<div class="card-body">
% if (config->{debug} == 1) {
<p>
<div>
(DBG)route: <%= $c->current_route %><br>
(DBG)trt: <%= $log_datas->{trt} %><br>
</p>
</div>
% }
<h1><%= $title %></h1>
<br><%= $modul %><br>
<br>
<%= $modul %>
<br>
<p>
<% my $btn = l('log_REFRESH'); %>
%= form_for 'viewlogfilesr' => (method => 'POST') => begin
%= submit_button "$btn", class => ""
<form action="/smanager/viewlogfilesr" 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' => $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}
% end
</p>
</form>
</div>
%end

View File

@ -1,6 +1,6 @@
%define name smeserver-manager-AdminLTE
%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
Name: %{name}
Version: %{version}
@ -26,6 +26,9 @@ AdminLTE is an html framework for admin consoles
wget https://github.com/ColorlibHQ/AdminLTE/archive/master.zip
%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
- Local Networks and a few odd tidies