Sort out text version of table etc

This commit is contained in:
2025-04-08 18:57:30 +01:00
parent 2d1824553b
commit 32d91c4a24
5 changed files with 141 additions and 50 deletions

View File

@@ -6,16 +6,16 @@
'mst_RBL_Servers_to_use' => 'RBL Servers to use',
'mst_Port_number_for_email_server' => 'Port number for email server',
'mst_User_name_for_DB_sending' => 'User name for DB sending',
'mst_Table_of_email_status' => 'Table of email status',
'mst_Table_of_email_status' => '',
'mst_Score_to_fully_reject_emmail' => 'Score to fully reject email',
'mst_User_Password_for_email_sending' => 'User Password for email sending',
'mst_UBL_Servers_to_use' => 'UBL Servers to use',
'mst_Would_you_like_to_save' => 'Would you like to save data in the DB?',
'mst_Specify_if_you_would_like' => 'Specify if you would like to receive email in text or HTML form',
'mst_Port_number_for_DB_server' => 'Port number for DB server',
'mst_Mailstats' => 'mailshots',
'mst_Mailstats' => 'Daily Email Status Table',
'mst_Email_filtering_/_exclusion' => 'Email filtering / exclusion',
'mst_Score_for_tagging_as_spam,' => 'Score for tagging as spam But queued',
'mst_Score_for_tagging_as_spam,' => 'Score for tagging as spam but queued',
'mst_Accumulated_country_codes_(editable)' => 'Accumulated country codes editable',
'mst_Date_for_Stats_display' => 'Date for Stats display',
'mst_Enable_URIBL_checking' => 'Enable URIBL checking',
@@ -27,11 +27,14 @@
'mst_Spamassassin_scores_-_tag_and' => 'Spamassassin scores - tag and reject levels',
'mst_SBL_Servers_to_use' => 'SBL Servers to use',
'mst_Save' => 'Save',
'mst_Descriptive_paragraph' => 'Descriptive paragraph',
'mst_Descriptive_paragraph' => 'The Mailstats contrib analyzes your qpsmtpd log files and creates a webpage and sends a periodic email to the address you specify summarizing your server\'s email activity.
<br>You can use the <I>Configure Mailstats</I> button to set up mailstats and some associated qpsmtpd and spamassassin properties. ',
'mst_APPLY' => 'Apply',
'mst_Enable_DNSBL_checking' => 'Enable DNSBL checking',
'mst_Host_name_for_email_server' => 'Host name for email server',
'mst_Details_for_connection_to_database' => 'Details for connection to database for saving email status',
'mst_TABLE_panel_action_was_successful' => 'TABLE panel action was successful',
'mst_Configure_Mailstats' => 'Configure mailshots',
'mst_Configure_Mailstats' => 'Configure Mailstats',
'mst_User_name_for_email_sending' => 'User name for email sending',
'mst_Full_Window' => 'Full Window',
'mst_Use_Cursor_keys' => '(Use the cursor keys to select the date)'

View File

@@ -4,6 +4,39 @@ Generated by: SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.
object {
border: 1px,solid, darkgrey;
}
.inline-buttons {
display: flex; /* Use flexbox to arrange items horizontally */
gap: 10px; /* Optional: Add space between buttons */
}
.inline-buttons .link {
/* Additional styling can be added here if needed */
}
.inline-buttons .link {
display: inline-block; /* Keep links as inline-block for button shape */
padding: 7px 14px; /* Adjusted padding to approximate 70% of the original */
margin: 0; /* Remove margin */
background-color: #efefef; /* Light gray background color */
color: black; /* Text color */
text-decoration: none; /* Remove underline */
border: 2px solid #bbb; /* Thin, light gray border */
border-radius: 3px; /* Slightly rounded corners */
font-size: 11.2px; /* Adjusted font size to approximate 70% of the original */
text-align: center; /* Center the text */
cursor: pointer; /* Pointer cursor on hover */ }
/* Hover and active effects for better interaction */
.inline-buttons .link:hover {
background-color: #d9d9d9; /* Darker shade on hover */
}
.inline-buttons .link:active {
background-color: #c0c0c0; /* Even darker shade on click */
}
.Mailstats-panel {}
.name {}
.rout {}

View File

@@ -66,6 +66,7 @@ function initializeSelects() {
'mailstats_object' + selectId.replace('StatsDate_select', '');
const mailstatsObject = document.getElementById(objectId);
const mailstatsfull = document.getElementById('mailstats-full-window');
// Check if elements exist before proceeding
if (!dateSelect) {
@@ -88,6 +89,7 @@ function initializeSelects() {
// Update the data attribute with the full URL
mailstatsObject.setAttribute('data', fullUrl);
mailstatsfull.setAttribute('href', fullUrl);
// Force a refresh of the object
// [refresh code here]

View File

@@ -2,11 +2,7 @@
%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-04-05 11:59:08
%#
<div id="Mailstats-TABLE" class="partial Mailstats-TABLE">
<script>
window.onload = function() {
SelectInput();
};
</script>
% if (config->{debug} == 1) {
<pre>
%= dumper $mst_data
@@ -17,23 +13,21 @@
% param 'trt' => $mst_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $mst_data->{trt}
%# Inputs etc in here.
<br>
<div class=inline-buttons>
<a href='mailstatsd?trt=CONFIG' class='link link1'>
%= l('mst_Configure_Mailstats')
</a>
%#= link_to l('mst_Configure_Mailstats'), 'mailstatsd?trt=CONFIG' , class=>'link link1'
<a href='mailstatsd?trt=CONFIG' class='link link1'>
%= l('mst_Configure_Mailstats')
</a>
<a id='mailstats-full-window' href='' class='link link1'>
%= l('mst_Full_Window')
</a>
</div>
<h2 class='subh1'><%=l('mst_Table_of_email_status')%></h2>
<p class='paragraph para1'>
%=l('mst_Descriptive_paragraph')
%= $c->render_to_string(inline=>$c->l('mst_Descriptive_paragraph'))
</p>
<p><span class=label>
@@ -42,8 +36,8 @@
% my @StatsDate_options = $c->get_mailstat_dates();
% param 'StatsDate' => $mst_data->{StatsDate} unless param 'StatsDate';
%= select_field 'StatsDate' => @StatsDate_options, class => 'input', id => 'StatsDate_select'
%=l('mst_Use_Cursor_keys')
<br></span> </p>
<object id = 'mailstats_object' data="<%='' %>" title="<%= $c->stash('title') %>" type="text/html" height='600px' width='100%' ><%= $c->stash('title') %> not found</object>