Up to date letsencrypt files and fix up validate template in custom
This commit is contained in:
parent
171bd5a141
commit
ce91fbab45
@ -52,7 +52,7 @@ our $ddb = esmith::DomainsDB->open() || die("Couldn't open Domains db");
|
||||
my $c = shift;
|
||||
my $prefix_data = shift; #Data hash as parameter
|
||||
# Validation for each field
|
||||
my $ret = "Error from params";
|
||||
my $ret = "";
|
||||
if (! TRUE) #validate $c->param('status')
|
||||
{$ret .= 'Validation for status failed';}
|
||||
if (! TRUE) #validate $c->param('hookScript')
|
||||
|
@ -1,6 +1,6 @@
|
||||
package SrvMngr::Controller::Letsencrypt;
|
||||
#
|
||||
# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-11-29 13:00:55
|
||||
# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-11-29 15:59:19
|
||||
#
|
||||
#----------------------------------------------------------------------
|
||||
# heading : Network
|
||||
@ -137,8 +137,8 @@ sub do_update {
|
||||
# the value of trt will tell you which panel has returned
|
||||
my $trt = $c->param('trt') || 'LIST'; #hidden control on every form.
|
||||
my $ret = 'ok';
|
||||
#Validate the parameters in a custom sub one for each panel (although only one of these will be executed)
|
||||
|
||||
#Validate the parameters in a custom sub one for each panel (although only one of these will be executed)
|
||||
my $thispanel;
|
||||
|
||||
if ($trt eq 'LIST'){
|
||||
@ -171,12 +171,12 @@ sub do_update {
|
||||
$thispanel = 'CHECKONEDOMAIN';
|
||||
}
|
||||
|
||||
|
||||
if ($ret ne "ok"){
|
||||
$c->do_display($thispanel);
|
||||
} else {
|
||||
#Do whatever is needed, including writing values to the DB
|
||||
|
||||
|
||||
if ($trt eq 'LIST'){
|
||||
#do whatever is required ...
|
||||
$ret = $c->perform_LIST(\%lets_data);
|
||||
@ -271,7 +271,6 @@ sub do_update {
|
||||
$lets_data{'trt'} = 'none';
|
||||
}
|
||||
$c->do_display($lets_data{'trt'});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
%#
|
||||
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-11-29 13:00:55
|
||||
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-11-29 15:59:19
|
||||
%#
|
||||
<div id="Letsencrypt-CHECKALLDOMAINS" class="partial Letsencrypt-CHECKALLDOMAINS">
|
||||
<script>
|
||||
|
@ -1,5 +1,5 @@
|
||||
%#
|
||||
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-11-29 13:00:55
|
||||
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-11-29 15:59:19
|
||||
%#
|
||||
<div id="Letsencrypt-CHECKALLENABLEDDOMAINS" class="partial Letsencrypt-CHECKALLENABLEDDOMAINS">
|
||||
<script>
|
||||
|
@ -1,5 +1,5 @@
|
||||
%#
|
||||
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-11-29 13:00:55
|
||||
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-11-29 15:59:19
|
||||
%#
|
||||
<div id="Letsencrypt-CHECKONEDOMAIN" class="partial Letsencrypt-CHECKONEDOMAIN">
|
||||
<script>
|
||||
|
@ -1,5 +1,5 @@
|
||||
%#
|
||||
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-11-29 13:00:55
|
||||
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-11-29 15:59:19
|
||||
%#
|
||||
<div id="Letsencrypt-LIST" class="partial Letsencrypt-LIST">
|
||||
<script>
|
||||
|
@ -1,5 +1,5 @@
|
||||
%#
|
||||
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-11-29 13:00:55
|
||||
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-11-29 15:59:19
|
||||
%#
|
||||
<div id="Letsencrypt-PARAMS" class="partial Letsencrypt-PARAMS">
|
||||
<script>
|
||||
|
@ -1,5 +1,5 @@
|
||||
%#
|
||||
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-11-29 13:00:55
|
||||
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-11-29 15:59:19
|
||||
%#
|
||||
% layout 'default', title => "Sme server 2 - Letsencrypt certificate", share_dir => './';
|
||||
%# css specific to this panel:
|
||||
@ -26,7 +26,7 @@
|
||||
</p>
|
||||
|
||||
%} elsif ($c->stash('success')) {
|
||||
<div class='sme-border'>
|
||||
<div class='success '>
|
||||
<h2><%=$c->l('lets_Status_Report') %></h2><p>
|
||||
%= $c->l($c->stash('success'));
|
||||
</p>
|
||||
|
@ -1,52 +1,54 @@
|
||||
#
|
||||
# Generated by SM2Gen version: SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-11-17 14:48:52
|
||||
# Generated by SM2Gen version: SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-11-29 15:59:19
|
||||
#
|
||||
'lets_Loop_through_checking_the_letsencrypt' => 'Loop through checking the letsencrypt status for a specific domain',
|
||||
'lets_Brief_description' => 'Brief description',
|
||||
'lets_CONFIG_LETSENCRYPT' => 'confirm Letsencrypt',
|
||||
'lets_SERVICE_STATUS' => 'Service Status',
|
||||
'lets_Expiry' => 'Expiry',
|
||||
'lets_EMAIL' => 'Email',
|
||||
'lets_One_domain_check_result' => 'One domain check result',
|
||||
'lets_Current_certificate_details' => 'Current certificate details',
|
||||
'lets_LABEL_POINT' => 'Label Point',
|
||||
'lets_IS_IN_CERT' => 'Is In cart',
|
||||
'lets_LABEL_LECERT' => 'Label secret',
|
||||
'lets_Enabled_domains_check_result' => 'Enabled domains check result',
|
||||
'lets_Letsencrypt_certificate' => 'Letsencrypt certificate',
|
||||
'lets_Check_all_domains' => 'Check all domains',
|
||||
'lets_CONFIG' => 'Config',
|
||||
'lets_CONFIGUREMODE_STATUS' => 'Configuremode Status',
|
||||
'lets_Domain_name_/_HOSTNAME' => 'Domain name / HOSTNAME',
|
||||
'lets_Loop_through_checking_the_letsencrypt' => 'Loop through checking the letsencrypt status for each configured domain which is enabled',
|
||||
'lets_CHECK_ALL_ENABLED_DOMAINS' => 'Check All Enabled Domains',
|
||||
'lets_PARAMS_panel_action_was_successful' => 'PARAMS panel action was successful',
|
||||
'lets_CHECKALLENABLEDDOMAINS_panel_action_was_successful' => 'CHECKALLENABLEDDOMAINS panel action was successful',
|
||||
'lets_HOOKSCRIPT_STATUS' => 'Hookscript Status',
|
||||
'lets_LABEL_POINT' => 'Label Point',
|
||||
'lets_Brief_description' => 'Brief description',
|
||||
'lets_Manage_letsencrypt-config_settings:' => 'Manage letsencrypt-config settings',
|
||||
'lets_Loop_through_checking_the_letsencrypt' => 'Loop through checking the letsencrypt status for a specific domain',
|
||||
'lets_Check_just_one_domain' => 'Check just one domain',
|
||||
'lets_List_of_Domains_and_Hosts' => 'List of Domains and Hosts',
|
||||
'lets_Save' => 'Save',
|
||||
'lets_Internal_IP' => 'Internal IP',
|
||||
'lets_Loop_through_checking_the_letsencrypt' => 'Loop through checking the letsencrypt status for each configured domain',
|
||||
'lets_Internet_IP' => 'Internet IP',
|
||||
'lets_SERVICE_STATUS' => 'Service Status',
|
||||
'lets_ACCEPT_TERMS_STATUS' => 'Accept Terms Status',
|
||||
'lets_Status_Report' => 'Status Report',
|
||||
'lets_One_domain_check_result' => 'One domain check result',
|
||||
'lets_CHECK' => 'Check',
|
||||
'lets_Check_just_one_domain' => 'Check just one domain',
|
||||
'lets_External_Interface_IP' => 'External Interface IP',
|
||||
'lets_Not_Before' => 'Not Before',
|
||||
'lets_Content' => 'Content',
|
||||
'lets_All_domains_check_result' => 'All domains check result',
|
||||
'lets_LIST_panel_action_was_successful' => 'LIST panel action was successful',
|
||||
'lets_CONFIGUREMODE_STATUS' => 'Configuremode Status',
|
||||
'lets_CONFIG_LETSENCRYPT' => 'confirm Letsencrypt',
|
||||
'lets_CHECKONEDOMAIN_panel_action_was_successful' => 'CHECKONEDOMAIN panel action was successful',
|
||||
'lets_LABEL_NAMESERVERS' => 'Label timeservers',
|
||||
'lets_APPLY' => 'Apply',
|
||||
'lets_CHECKALLDOMAINS_panel_action_was_successful' => 'CHECKALLDOMAINS panel action was successful',
|
||||
'lets_CHECK_ALL_ENABLED_DOMAINS' => 'Check All Enabled Domains',
|
||||
'lets_Issuer' => 'Issuer',
|
||||
'lets_Check_all_domains' => 'Check all domains',
|
||||
'lets_Current_certificate_details' => 'Current certificate details',
|
||||
'lets_CHECKALLENABLEDDOMAINS_panel_action_was_successful' => 'CHECKALLENABLEDDOMAINS panel action was successful',
|
||||
'lets_Internet_IP' => 'Internet IP',
|
||||
'lets_CHECK_ALL_DOMAINS' => 'Check All Domains',
|
||||
'lets_HOSTOVERRIDE_STATUS' => 'Hostoverride Status',
|
||||
'lets_API_STATUS' => 'ape Status',
|
||||
'lets_APPLY' => 'Apply',
|
||||
'lets_EMAIL' => 'Email',
|
||||
'lets_HOOKSCRIPT_STATUS' => 'Hookscript Status',
|
||||
'lets_Check_all_enabled_domains' => 'Check all enabled domains',
|
||||
'lets_KEYSIZE_STATUS' => 'Keysize Status',
|
||||
'lets_Issuer' => 'Issuer',
|
||||
'lets_Domains_name' => 'Domains name',
|
||||
'lets_CONFIG' => 'Config',
|
||||
'lets_CHECKALLDOMAINS_panel_action_was_successful' => 'CHECKALLDOMAINS panel action was successful',
|
||||
'lets_Content' => 'Content',
|
||||
'lets_Back' => 'Back',
|
||||
'lets_Domains_name' => 'Domains name',
|
||||
'lets_Internal_IP' => 'Internal IP',
|
||||
'lets_For_this_Server' => 'For this Server',
|
||||
'lets_Manage_letsencrypt-config_settings:' => 'Manage letsencrypt-config settings',
|
||||
'lets_LIST_panel_action_was_successful' => 'LIST panel action was successful',
|
||||
'lets_LABEL_LECERT' => 'Label secret',
|
||||
'lets_CHECKONEDOMAIN_panel_action_was_successful' => 'CHECKONEDOMAIN panel action was successful',
|
||||
'lets_ACCEPT_TERMS_STATUS' => 'Accept Terms Status',
|
||||
'lets_Loop_through_checking_the_letsencrypt' => 'Loop through checking the letsencrypt status for each configured domain',
|
||||
'lets_IS_IN_CERT' => 'Is In cart',
|
||||
'lets_Not_Before' => 'Not Before',
|
||||
'lets_All_domains_check_result' => 'All domains check result',
|
||||
'lets_API_STATUS' => 'ape Status',
|
||||
'lets_Error_Status_Report' => 'Error Status Report',
|
||||
'lets_PARAMS_panel_action_was_successful' => 'PARAMS panel action was successful',
|
||||
'lets_Letsencrypt_certificate' => 'Letsencrypt certificate',
|
||||
'lets_LABEL_NAMESERVERS' => 'Label timeservers',
|
||||
'lets_KEYSIZE_STATUS' => 'Keysize Status',
|
||||
'lets_Loop_through_checking_the_letsencrypt' => 'Loop through checking the letsencrypt status for each configured domain which is enabled',
|
||||
'lets_Enabled_domains_check_result' => 'Enabled domains check result',
|
||||
|
@ -114,7 +114,7 @@ sub get_${tablecontrol[0]} {
|
||||
my $prefix_data = shift; #Data hash as parameter
|
||||
my $ret = "";
|
||||
<tal:block tal:repeat="field fields[panel]">
|
||||
if (! TRUE) #copy or perform with value: ${field} e.g. $c->setprop(dbentry,dbkey,$c->param('${field}')
|
||||
if (! TRUE) #copy or perform with value: ${field} e.g. $c->setprop(dbentry,dbkey,$c->param('${field}')))
|
||||
{$ret .= 'Perform failed for ${field} failed';}</tal:block>
|
||||
if ($ret eq "") {$ret = 'ok';}
|
||||
return $ret;
|
||||
|
Loading…
Reference in New Issue
Block a user