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,70 +5,108 @@
<div class="card-body">
%if (config->{debug} == 1) {
<p>
(DBG)route: <%= $c->current_route %><br>
</p>
%}
<div>
(DBG)route: <%= $c->current_route %><br>
</div>
% }
<h1><%= $title %></h1>
<br>
<%= $notif %>
<% my $btn = l('NEXT'); %>
%= form_for 'viewlogfiles' => (method => 'POST') => begin
<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>
<% my $btn = l('NEXT'); %>
<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>
<form action="/smanager/viewlogfiles" method="POST">
<p>
%=l 'log_OP_DESC'
<br>
<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>
<div>
<%=l 'log_FIRSTPAGE_DESC' %>
</div>
<p>
%=l 'log_END_DESC'
</p>
<br>
<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>
%end