More fixing paragraph text quotes etc

This commit is contained in:
Brian Read 2024-09-16 14:01:17 +01:00
parent 265901414c
commit 5fc9f9b763
26 changed files with 199 additions and 216 deletions

View File

@ -2,7 +2,7 @@
# Routines to be edited by the developer to provide validation for parameters # Routines to be edited by the developer to provide validation for parameters
# and provison of the control data for table(s) # and provison of the control data for table(s)
# #
# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-15 15:56 # Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-16 12:31:58
# #
use esmith::util; use esmith::util;

View File

@ -1,6 +1,6 @@
package SrvMngr::Controller::CreateStarterWebsite; package SrvMngr::Controller::CreateStarterWebsite;
# #
# Generated by version:SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-15 15:56 # Generated by version:SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-16 12:31:58
# #
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# heading : Miscellaneous # heading : Miscellaneous

View File

@ -1,5 +1,5 @@
%# %#
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-15 15:56 %# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-16 12:31:58
%# %#
<div id="CreateStarterWebsite-PARAMS" class="partial CreateStarterWebsite-PARAMS"> <div id="CreateStarterWebsite-PARAMS" class="partial CreateStarterWebsite-PARAMS">
<script> <script>
@ -17,6 +17,8 @@
%= hidden_field 'trt' => $csw_data->{trt} %= hidden_field 'trt' => $csw_data->{trt}
%# Inputs etc in here. %# Inputs etc in here.
<h1><%=l('csw_Create_a_starter_website')%></h1>
<h2><%=l('csw_Manage_CreateStarterWebsite_settings:')%></h2> <h2><%=l('csw_Manage_CreateStarterWebsite_settings:')%></h2>
<p> <p>

View File

@ -1,6 +1,6 @@
% layout 'default', title => "Sme server 2 - Create Starter Website", share_dir => './'; % layout 'default', title => "Sme server 2 - Create Starter Website", share_dir => './';
%# %#
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-15 15:56 %# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-16 12:31:58
%# %#
% content_for 'module' => begin % content_for 'module' => begin
<div id="module" class="module CreateStarterWebsite-panel"> <div id="module" class="module CreateStarterWebsite-panel">

View File

@ -1,17 +1,18 @@
'csw_You_can_leave_any_field' => 'You can leave any field blank if you do not need it. ', 'csw_First_header,_typically_used_for' => 'First header, Typically used for short phrases such as Leader in the field of textile manufacturing',
'csw_To_create_a_simple_web' => 'To create a simple web page for your company, Fill in the fields below and click onCreate. ',
'csw_Text_following_first_header,_typically' => 'Text following first header, Typically used for a paragraph of marketing information. ', 'csw_Text_following_first_header,_typically' => 'Text following first header, Typically used for a paragraph of marketing information. ',
'csw_Do_not_use_this_optionif' => 'Do not use this optionif you have already customized your web site, Since it will overwrite the 'index. Htm' file in your web site directory. ',
'csw_Text_following_second_header,_typically' => 'Text following second header, Typically used for contact or ordering information:',
'csw_First_header,_typically_used_for' => 'First header, Typically used for short phrases such as 'Leader in the field of textile manufacturing'',
'csw_Second_header,_typically_used_for' => 'Second header, Typically used for short phrases such as 'For more information' or 'To order our products':',
'csw_PARAMS_panel_action_was_successful' => 'PARAMS panel action was successful',
'csw_Manage_CreateStarterWebsite_settings:' => 'Manage CreateStarterWebsite settings:', 'csw_Manage_CreateStarterWebsite_settings:' => 'Manage CreateStarterWebsite settings:',
'csw_The_text_that_you_enter' => 'The text that you enter below will be line wrapped for a nicer appearance in your web page. Leave a blank line whenever you want to start a new paragraph. If you need to force a line break without starting a new paragraph (for example after each line of a mailing address), Then type the four-character sequence', 'csw_Create' => 'Create',
'csw_Create_Starter_Website' => 'Create Starter Website',
'csw_Create_a_starter_website' => 'Create a starter website',
'csw_Hello_PARAMS' => 'Hello PARAMS', 'csw_Hello_PARAMS' => 'Hello PARAMS',
'csw_APPLY' => 'Apply',
'csw_Text_following_second_header,_typically' => 'Text following second header, Typically used for contact or ordering information:',
'csw_When_you_create_this_web' => 'When you create this web page, The file index. Htm will be overwritten in your web site directory. ',
'csw_' => '', 'csw_' => '',
'csw_Do_you_wish_to_proceed?' => 'Do you wish to proceed?', 'csw_Do_you_wish_to_proceed?' => 'Do you wish to proceed?',
'csw_Create_Starter_Website' => 'Create Starter Website', 'csw_PARAMS_panel_action_was_successful' => 'PARAMS panel action was successful',
'csw_When_you_create_this_web' => 'When you create this web page, The file 'index. Htm' will be overwritten in your web site directory. ', 'csw_To_create_a_simple_web' => 'To create a simple web page for your company, Fill in the fields below and click onCreate. ',
'csw_Create' => 'Create', 'csw_You_can_leave_any_field' => 'You can leave any field blank if you do not need it. ',
'csw_APPLY' => 'Apply', 'csw_Second_header,_typically_used_for' => 'Second header, Typically used for short phrases such as For more information or To order our products:',
'csw_Do_not_use_this_optionif' => 'Do not use this optionif you have already customized your web site, Since it will overwrite the index. Htm file in your web site directory. ',
'csw_The_text_that_you_enter' => 'The text that you enter below will be line wrapped for a nicer appearance in your web page. Leave a blank line whenever you want to start a new paragraph. If you need to force a line break without starting a new paragraph (for example after each line of a mailing address), Then type the four-character sequence',

View File

@ -2,7 +2,7 @@
# Routines to be edited by the developer to provide validation for parameters # Routines to be edited by the developer to provide validation for parameters
# and provison of the control data for table(s) # and provison of the control data for table(s)
# #
# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-15 11:51 # Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-16 11:18
# #
use esmith::util; use esmith::util;

View File

@ -1,6 +1,6 @@
package SrvMngr::Controller::DiskUsage; package SrvMngr::Controller::DiskUsage;
# #
# Generated by version:SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-15 11:51 # Generated by version:SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-16 11:18
# #
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# heading : Miscellaneous # heading : Miscellaneous

View File

@ -1,5 +1,5 @@
%# %#
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-15 11:51 %# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-16 11:18
%# %#
<div id="DiskUsage-PARAMS" class="partial DiskUsage-PARAMS"> <div id="DiskUsage-PARAMS" class="partial DiskUsage-PARAMS">
<script> <script>
@ -17,11 +17,9 @@
%= hidden_field 'trt' => $du_data->{trt} %= hidden_field 'trt' => $du_data->{trt}
%# Inputs etc in here. %# Inputs etc in here.
<h2><%=l('du_Manage_DiskUsage_settings:')%></h2> <h1><%=l('du_Disk_usage')%></h1>
<p> <h2><%=l('du_Manage_DiskUsage_settings:')%></h2>
%=l('du_')
</p>
<p> <p>
%=l('du_Wed_Sep_11_19:01:00_BST') %=l('du_Wed_Sep_11_19:01:00_BST')
@ -59,10 +57,6 @@ tmpfs 2.0G 648K 2.0G 1% /run
</table> </table>
<p>
%=l('du_')
</p>
<br /><table class="sme-border TableSort sme-table"> <br /><table class="sme-border TableSort sme-table">
<thead> <thead>
<tr table-head-row> <tr table-head-row>

View File

@ -1,6 +1,6 @@
% layout 'default', title => "Sme server 2 - Disk Usage", share_dir => './'; % layout 'default', title => "Sme server 2 - Disk Usage", share_dir => './';
%# %#
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-15 11:51 %# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-16 11:18
%# %#
% content_for 'module' => begin % content_for 'module' => begin
<div id="module" class="module DiskUsage-panel"> <div id="module" class="module DiskUsage-panel">

View File

@ -1,11 +1,11 @@
'du_' => '',
'du_Manage_DiskUsage_settings:' => 'Manage DiskUsage settings:',
'du_PARAMS_panel_action_was_successful' => 'PARAMS panel action was successful',
'du_Wed_Sep_11_19:01:00_BST' => 'Wed Sep 11 19:01:00 BST 2024',
'du_Path' => 'Path', 'du_Path' => 'Path',
'du_I-bays' => 'I-bays', 'du_I-bays' => 'I-bays',
'du_Hello_PARAMS' => 'Hello PARAMS', 'du_PARAMS_panel_action_was_successful' => 'PARAMS panel action was successful',
'du_Usage' => 'Usage', 'du_Disk_usage' => 'Disk usage',
'du_Users' => 'Users',
'du_Disk_Usage' => 'Disk Usage',
'du_APPLY' => 'Apply', 'du_APPLY' => 'Apply',
'du_Wed_Sep_11_19:01:00_BST' => 'Wed Sep 11 19:01:00 BST 2024',
'du_Users' => 'Users',
'du_Manage_DiskUsage_settings:' => 'Manage DiskUsage settings:',
'du_Hello_PARAMS' => 'Hello PARAMS',
'du_Disk_Usage' => 'Disk Usage',
'du_Usage' => 'Usage',

View File

@ -2,7 +2,7 @@
# Routines to be edited by the developer to provide validation for parameters # Routines to be edited by the developer to provide validation for parameters
# and provison of the control data for table(s) # and provison of the control data for table(s)
# #
# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.10.12 at 2024-09-03 13:54 # Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-16 11:52
# #
use esmith::util; use esmith::util;
@ -40,8 +40,14 @@ our $ddb = esmith::DomainsDB->open() || die("Couldn't open Domains db");
# Get control data for tables(s) # Get control data for tables(s)
sub get_ibays { sub get_ibays {
# Return an array of hashes of the contents for each row and column for ibays
# default is a single row of strings "col1header-1, col2header-1, col3Header-1 etc"
my $c = shift; my $c = shift;
my @ret = {}; my $control_data = $self->stash('ibays');
my @ret = {}
# foreach my $colHead (@$control_data) {
# my ret{$colHead} = "$colhead-1"
# };
return \@ret return \@ret
} }
@ -88,9 +94,4 @@ sub create_link{
my $link = "$route?trt=$panel&Selected=$index"; my $link = "$route?trt=$panel&Selected=$index";
return $link; return $link;
} }
1; 1;

View File

@ -1,6 +1,6 @@
package SrvMngr::Controller::Nfsshare; package SrvMngr::Controller::Nfsshare;
# #
# Generated by version:SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.10.12 at 2024-09-03 13:54 # Generated by version:SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-16 11:52
# #
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# heading : Network # heading : Network
@ -265,19 +265,3 @@ sub do_display {
$c->render("nfsshare"); $c->render("nfsshare");
} }
1; 1;

View File

@ -1,5 +1,5 @@
%# %#
%# Generated by SM2Gen version:0.8 Chameleon version:3.8.1 On Python:3.12.3 at 2024-09-13 18:38 %# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-16 11:52
%# %#
<div id="Nfsshare-PARAMS" class="partial Nfsshare-PARAMS"> <div id="Nfsshare-PARAMS" class="partial Nfsshare-PARAMS">
<script> <script>
@ -13,27 +13,30 @@
% my $btn = l('nfs_APPLY'); % my $btn = l('nfs_APPLY');
%= form_for "Nfsshared" => (method => 'POST') => begin %= form_for "Nfsshared" => (method => 'POST') => begin
% param 'trt' => ${prefix}_data->{trt} unless param 'trt'; % param 'trt' => $nfs_data->{trt} unless param 'trt';
%= hidden_field 'trt' => ${prefix}_data->{trt} %= hidden_field 'trt' => $nfs_data->{trt}
%# Inputs etc in here. %# Inputs etc in here.
<h1><%=l('NFS_Share_Contrib')%></h1>
<h2><%=l('nfs_Manage_NFS_Ibay_settings:')%></h2> <h2><%=l('nfs_Manage_NFS_Ibay_settings:')%></h2>
<p> <p>
%= l('nfs_These_parameters_will_be_effective') %=l('nfs_These_parameters_will_be_effective')
</p> </p>
<p><span class=label> <p><span class=label>
%=l('nfs_Information_Bay_name') %=l('nfs_Information_Bay_name')
</span><span class=data> </span><span class=data>
%= stash("IbayName") % param 'IbayName' => $nfs_data->{IbayName} unless param 'IbayName';
</span></p> %= text_field 'IbayName', size => '50', class => 'input' , pattern=>'.*' , placeholder=>'IbayName'
<br></span></p>
<p><span class=label> <p><span class=label>
%=l('nfs_Share_owner_Group') %=l('nfs_Share_owner_Group')
</span><span class=data> </span><span class=data>
% my @ShareOwnerGrp_options = ['Write = admin, Read = group', 'Write = group, Read = everyone', 'Write = group, Read = group']; % my @ShareOwnerGrp_options = ['Write = admin, Read = group', 'Write = group, Read = everyone', 'Write = group, Read = group'];
% param 'ShareOwnerGrp' => ${prefix}_data->{ShareOwnerGrp} unless param 'ShareOwnerGrp'; % param 'ShareOwnerGrp' => $nfs_data->{ShareOwnerGrp} unless param 'ShareOwnerGrp';
%= select_field 'ShareOwnerGrp' => @ShareOwnerGrp_options, class => 'input' %= select_field 'ShareOwnerGrp' => @ShareOwnerGrp_options, class => 'input'
<br></span> </p> <br></span> </p>
@ -41,7 +44,7 @@
%=l('nfs_Enable_the_NFS_Share') %=l('nfs_Enable_the_NFS_Share')
</span><span class=data> </span><span class=data>
% my @EnableNFSshare_options = ['Disabled', 'Enabled']; % my @EnableNFSshare_options = ['Disabled', 'Enabled'];
% param 'EnableNFSshare' => ${prefix}_data->{EnableNFSshare} unless param 'EnableNFSshare'; % param 'EnableNFSshare' => $nfs_data->{EnableNFSshare} unless param 'EnableNFSshare';
%= select_field 'EnableNFSshare' => @EnableNFSshare_options, class => 'input' %= select_field 'EnableNFSshare' => @EnableNFSshare_options, class => 'input'
<br></span> </p> <br></span> </p>
@ -49,18 +52,18 @@
%=l('nfs_EnableShare_on_local_network') %=l('nfs_EnableShare_on_local_network')
</span><span class=data> </span><span class=data>
% my @ShareOnLocalNetwork_options = ['Disabled', 'Enabled']; % my @ShareOnLocalNetwork_options = ['Disabled', 'Enabled'];
% param 'ShareOnLocalNetwork' => ${prefix}_data->{ShareOnLocalNetwork} unless param 'ShareOnLocalNetwork'; % param 'ShareOnLocalNetwork' => $nfs_data->{ShareOnLocalNetwork} unless param 'ShareOnLocalNetwork';
%= select_field 'ShareOnLocalNetwork' => @ShareOnLocalNetwork_options, class => 'input' %= select_field 'ShareOnLocalNetwork' => @ShareOnLocalNetwork_options, class => 'input'
<br></span> </p> <br></span> </p>
<p> <p>
%= l('nfs_For_writing_permissions,allowing_the_root') %=l('nfs_For_writing_permissions,allowing_the_root')
</p> </p>
<span class=label> <span class=label>
%=l('nfs_NFS_Client(s)_allowed') %=l('nfs_NFS_Client(s)_allowed')
</span><span class=data> </span><span class=data>
% param 'NFSClientsAllowed' => ${prefix}_data->{NFSClientsAllowed} unless param 'NFSClientsAllowed'; % param 'NFSClientsAllowed' => $nfs_data->{NFSClientsAllowed} unless param 'NFSClientsAllowed';
%= text_area 'NFSClientsAllowed', cols=>40, rows=>5 %= text_area 'NFSClientsAllowed', cols=>40, rows=>5
</span><br> </span><br>
@ -68,7 +71,7 @@
%=l('nfs_File_system_permissions') %=l('nfs_File_system_permissions')
</span><span class=data> </span><span class=data>
% my @FileSystemPermissions_options = ['Read only', 'Read and Write']; % my @FileSystemPermissions_options = ['Read only', 'Read and Write'];
% param 'FileSystemPermissions' => ${prefix}_data->{FileSystemPermissions} unless param 'FileSystemPermissions'; % param 'FileSystemPermissions' => $nfs_data->{FileSystemPermissions} unless param 'FileSystemPermissions';
%= select_field 'FileSystemPermissions' => @FileSystemPermissions_options, class => 'input' %= select_field 'FileSystemPermissions' => @FileSystemPermissions_options, class => 'input'
<br></span> </p> <br></span> </p>
@ -76,7 +79,7 @@
%=l('nfs_Write_(a)synchronously') %=l('nfs_Write_(a)synchronously')
</span><span class=data> </span><span class=data>
% my @WriteAsync_options = ['Synchronous', 'Asynchronous']; % my @WriteAsync_options = ['Synchronous', 'Asynchronous'];
% param 'WriteAsync' => ${prefix}_data->{WriteAsync} unless param 'WriteAsync'; % param 'WriteAsync' => $nfs_data->{WriteAsync} unless param 'WriteAsync';
%= select_field 'WriteAsync' => @WriteAsync_options, class => 'input' %= select_field 'WriteAsync' => @WriteAsync_options, class => 'input'
<br></span> </p> <br></span> </p>
@ -84,7 +87,7 @@
%=l('nfs_Delays_the_disk_writing') %=l('nfs_Delays_the_disk_writing')
</span><span class=data> </span><span class=data>
% my @DelayWrite_options = ['Write delay', 'No write delay']; % my @DelayWrite_options = ['Write delay', 'No write delay'];
% param 'DelayWrite' => ${prefix}_data->{DelayWrite} unless param 'DelayWrite'; % param 'DelayWrite' => $nfs_data->{DelayWrite} unless param 'DelayWrite';
%= select_field 'DelayWrite' => @DelayWrite_options, class => 'input' %= select_field 'DelayWrite' => @DelayWrite_options, class => 'input'
<br></span> </p> <br></span> </p>
@ -92,7 +95,7 @@
%=l('nfs_Squash_the_power_of_users') %=l('nfs_Squash_the_power_of_users')
</span><span class=data> </span><span class=data>
% my @Squash_options = ['All users squash', 'No root squash', 'root squash']; % my @Squash_options = ['All users squash', 'No root squash', 'root squash'];
% param 'Squash' => ${prefix}_data->{Squash} unless param 'Squash'; % param 'Squash' => $nfs_data->{Squash} unless param 'Squash';
%= select_field 'Squash' => @Squash_options, class => 'input' %= select_field 'Squash' => @Squash_options, class => 'input'
<br></span> </p> <br></span> </p>
@ -100,7 +103,7 @@
%=l('nfs_Browse_the_parent_folders') %=l('nfs_Browse_the_parent_folders')
</span><span class=data> </span><span class=data>
% my @BrowseParents_options = ['Hide folder', 'Show folder']; % my @BrowseParents_options = ['Hide folder', 'Show folder'];
% param 'BrowseParents' => ${prefix}_data->{BrowseParents} unless param 'BrowseParents'; % param 'BrowseParents' => $nfs_data->{BrowseParents} unless param 'BrowseParents';
%= select_field 'BrowseParents' => @BrowseParents_options, class => 'input' %= select_field 'BrowseParents' => @BrowseParents_options, class => 'input'
<br></span> </p> <br></span> </p>
@ -108,28 +111,14 @@
%=l('nfs_Requests_on_secure_ports') %=l('nfs_Requests_on_secure_ports')
</span><span class=data> </span><span class=data>
% my @SecurePorts_options = ['Secure', 'Insecure']; % my @SecurePorts_options = ['Secure', 'Insecure'];
% param 'SecurePorts' => ${prefix}_data->{SecurePorts} unless param 'SecurePorts'; % param 'SecurePorts' => $nfs_data->{SecurePorts} unless param 'SecurePorts';
%= select_field 'SecurePorts' => @SecurePorts_options, class => 'input' %= select_field 'SecurePorts' => @SecurePorts_options, class => 'input'
<br></span> </p> <br></span> </p>
<p> <p>
%= l('nfs_Set_the_uid_and_gid') %=l('nfs_Set_the_uid_and_gid')
</p> </p>
<p><span class=label>
%=l('nfs_Set_the_UID.')
</span><span class=data>
% param 'SetUID' => ${prefix}_data->{SetUID} unless param 'SetUID';
%= text_field 'SetUID', size => '50', class => 'input' , pattern=>'.*' , placeholder=>'SetUID'
<br></span></p>
<p><span class=label>
%=l('nfs_Set_the_GID.')
</span><span class=data>
% param 'SetGID' => ${prefix}_data->{SetGID} unless param 'SetGID';
%= text_field 'SetGID', size => '50', class => 'input' , pattern=>'.*' , placeholder=>'SetGID'
<br></span></p>
<span class='data'> <span class='data'>
%= submit_button l('nfs_Save'), class => 'action' %= submit_button l('nfs_Save'), class => 'action'
</span> </span>

View File

@ -1,5 +1,5 @@
%# %#
%# Generated by SM2Gen version:0.8 Chameleon version:3.8.1 On Python:3.12.3 at 2024-09-13 18:38 %# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-16 11:52
%# %#
<div id="Nfsshare-TABLE" class="partial Nfsshare-TABLE"> <div id="Nfsshare-TABLE" class="partial Nfsshare-TABLE">
<script> <script>
@ -13,10 +13,12 @@
% my $btn = l('nfs_APPLY'); % my $btn = l('nfs_APPLY');
%= form_for "Nfsshared" => (method => 'POST') => begin %= form_for "Nfsshared" => (method => 'POST') => begin
% param 'trt' => ${prefix}_data->{trt} unless param 'trt'; % param 'trt' => $nfs_data->{trt} unless param 'trt';
%= hidden_field 'trt' => ${prefix}_data->{trt} %= hidden_field 'trt' => $nfs_data->{trt}
%# Inputs etc in here. %# Inputs etc in here.
<h1><%=l('NFS_Share_Contrib')%></h1>
<h2><%=l('nfs_Manage_NFS_Ibay_settings:')%></h2> <h2><%=l('nfs_Manage_NFS_Ibay_settings:')%></h2>
<br /><table class="sme-border TableSort sme-table"> <br /><table class="sme-border TableSort sme-table">
@ -32,10 +34,10 @@
% my $control_data = $self->stash('ibays'); % my $control_data = $self->stash('ibays');
% foreach my $row (@$control_data) { % foreach my $row (@$control_data) {
<tr class='table-row'> <tr class='table-row'>
<td class='sme-border table-col table-col-Name'><%=$c->render_to_string(inline=>$row->{Name})%></td> <td class='sme-border table-col table-col-Name'><%=$c->render_to_string(inline=>$row->{'Name'})%></td>
<td class='sme-border table-col table-col-Description'><%=$c->render_to_string(inline=>$row->{Description})%></td> <td class='sme-border table-col table-col-Description'><%=$c->render_to_string(inline=>$row->{'Description'})%></td>
<td class='sme-border table-col table-col-flag'><%=$c->render_to_string(inline=>$row->{flag})%></td> <td class='sme-border table-col table-col-flag'><%=$c->render_to_string(inline=>$row->{'flag'})%></td>
<td class='sme-border table-col table-col-Modify'><%=$c->render_to_string(inline=>$row->{Modify})%></td> <td class='sme-border table-col table-col-Modify'><%=$c->render_to_string(inline=>$row->{'Modify'})%></td>
</tr> </tr>
%} %}
</tbody> </tbody>

View File

@ -1,6 +1,6 @@
% layout 'default', title => "Sme server 2 - NFS data share", share_dir => './'; % layout 'default', title => "Sme server 2 - NFS data share", share_dir => './';
%# %#
%# Generated by SM2Gen version:0.8 Chameleon version:3.8.1 On Python:3.12.3 at 2024-09-14 05:33 %# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-16 11:52
%# %#
% content_for 'module' => begin % content_for 'module' => begin
<div id="module" class="module Nfsshare-panel"> <div id="module" class="module Nfsshare-panel">
@ -17,22 +17,22 @@
%= $c->render_to_string(inline => stash('modul') ); %= $c->render_to_string(inline => stash('modul') );
% } % }
%if (${prefix}_data->{first}) { %if ($nfs_data->{first}) {
<br><p> <br><p>
%=$c->render_to_string(inline =>$c->l(${prefix}_data->{first})) %=$c->render_to_string(inline =>$c->l($nfs_data->{first}))
</p> </p>
%} elsif (${prefix}_data->{success}) { %} elsif ($nfs_data->{success}) {
<div class='sme-border'> <div class='sme-border'>
<h2> Operation Status Report</h2><p> <h2> Operation Status Report</h2><p>
%= $c->l(${prefix}_data->{success}); %= $c->l($nfs_data->{success});
</p> </p>
</div> </div>
%} elsif (${prefix}_data->{error}) { %} elsif ($nfs_data->{error}) {
<div class='sme-error'> <div class='sme-error'>
<h2> Operation Status Report - error</h2><p> <h2> Operation Status Report - error</h2><p>
%= $c->l(${prefix}_data->{error}); %= $c->l($nfs_data->{error});
</p> </p>
</div> </div>
%} %}
@ -40,11 +40,11 @@
%#Routing to partials according to trt parameter. %#Routing to partials according to trt parameter.
%#This ought to be cascading if/then/elsif, but is easier to just stack the if/then's rather like a case statement' %#This ought to be cascading if/then/elsif, but is easier to just stack the if/then's rather like a case statement'
% if (${prefix}_data->{trt} eq "PARAMS") { % if ($nfs_data->{trt} eq "PARAMS") {
%= include 'partials/_nfs_PARAMS' %= include 'partials/_nfs_PARAMS'
%} %}
% if (${prefix}_data->{trt} eq "TABLE") { % if ($nfs_data->{trt} eq "TABLE") {
%= include 'partials/_nfs_TABLE' %= include 'partials/_nfs_TABLE'
%} %}

View File

@ -1,28 +1,27 @@
'nfs_Manage_NFS_Ibay_settings:' => 'Manage NFS Ibay settings:', 'NFS_Share_Contrib' => 'Share Contrib',
'nfs_Set_the_uid_and_gid' => 'Set the uid and gid if you want all requests appear to be from one user or one group, Otherwise leave blank',
'nfs_Set_the_GID.' => 'Set the GID. ',
'nfs_File_system_permissions' => 'File system permissions',
'nfs_Action' => 'Action',
'nfs_Hello_PARAMS' => 'Hello PARAMS',
'nfs_Save' => 'Save',
'nfs_Squash_the_power_of_users' => 'Squash the power of users',
'nfs_Set_the_UID.' => 'Set the UID. ',
'nfs_PARAMS_panel_action_was_successful' => 'PARAMS panel action was successful',
'nfs_TABLE_panel_action_was_successful' => 'TABLE panel action was successful',
'nfs_APPLY' => 'Apply',
'nfs_Enable_the_NFS_Share' => 'Enable the NFS Share',
'nfs_Name' => 'Name',
'nfs_EnableShare_on_local_network' => 'Enableshare on local network',
'nfs_These_parameters_will_be_effective' => 'These parameters will be effective only if the share is enabled. The share is in /home/e-smith/files/ibays//files',
'nfs_Share_owner_Group' => 'Share owner Group',
'nfs_Browse_the_parent_folders' => 'Browse the parent folders',
'nfs_NFS_Client(s)_allowed' => 'NFS Client(s) allowed', 'nfs_NFS_Client(s)_allowed' => 'NFS Client(s) allowed',
'Nfs_status' => 'Status', 'nfs_These_parameters_will_be_effective' => 'These parameters will be effective only if the share is enabled. The share is in /home/e-smith/files/ibays//files',
'nfs_Information_Bay_name' => 'Information Bay name',
'nfs_Requests_on_secure_ports' => 'Requests on secure ports',
'nfs_NFS_data_share' => 'NFS data share',
'nfs_Delays_the_disk_writing' => 'Delays the disk writing',
'nfs_Hello_TABLE' => 'Hello TABLE',
'nfs_For_writing_permissions,allowing_the_root' => 'For writing permissions, Allowing the root user and using insecure ports, You must configure a list of one IP per line, Being part of the local network(s). ', 'nfs_For_writing_permissions,allowing_the_root' => 'For writing permissions, Allowing the root user and using insecure ports, You must configure a list of one IP per line, Being part of the local network(s). ',
'nfs_Description' => 'Description', 'nfs_Requests_on_secure_ports' => 'Requests on secure ports',
'nfs_Write_(a)synchronously' => 'Write (a)synchronously', 'nfs_Write_(a)synchronously' => 'Write (a)synchronously',
'nfs_Share_owner_Group' => 'Share owner Group',
'nfs_NFS_data_share' => 'NFS data share',
'nfs_Action' => 'Action',
'nfs_Hello_TABLE' => 'Hello TABLE',
'nfs_APPLY' => 'Apply',
'nfs_PARAMS_panel_action_was_successful' => 'PARAMS panel action was successful',
'nfs_File_system_permissions' => 'File system permissions',
'Nfs_status' => 'Status',
'nfs_EnableShare_on_local_network' => 'Enableshare on local network',
'nfs_Description' => 'Description',
'nfs_Information_Bay_name' => 'Information Bay name',
'nfs_Browse_the_parent_folders' => 'Browse the parent folders',
'nfs_Set_the_uid_and_gid' => 'Set the uid and gid if you want all requests appear to be from one user or one group, Otherwise leave blank',
'nfs_Squash_the_power_of_users' => 'Squash the power of users',
'nfs_Save' => 'Save',
'nfs_Delays_the_disk_writing' => 'Delays the disk writing',
'nfs_Name' => 'Name',
'nfs_Hello_PARAMS' => 'Hello PARAMS',
'nfs_TABLE_panel_action_was_successful' => 'TABLE panel action was successful',
'nfs_Manage_NFS_Ibay_settings:' => 'Manage NFS Ibay settings:',
'nfs_Enable_the_NFS_Share' => 'Enable the NFS Share',

View File

@ -1,6 +1,6 @@
package SrvMngr::Controller::${PackageName}; package SrvMngr::Controller::${PackageName};
# #
# Generated by version:${version} # Generated by ${version}
# #
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# heading : ${MenuHeading} # heading : ${MenuHeading}

View File

@ -1,10 +1,10 @@
# #
# Generated by ${version}
#
#
# Routines to be edited by the developer to provide validation for parameters # Routines to be edited by the developer to provide validation for parameters
# and provison of the control data for table(s) # and provison of the control data for table(s)
# #
# Generated by ${version}
#
use esmith::util; use esmith::util;
use esmith::HostsDB; use esmith::HostsDB;
use esmith::AccountsDB; use esmith::AccountsDB;

View File

@ -47,12 +47,16 @@
]]></Text> ]]></Text>
<SubHeader><![CDATA[ <SubHeader><![CDATA[
<h2><%=l('${value}')%></h2>]]> <h2><%=l('${Value}')%></h2>]]>
</SubHeader> </SubHeader>
<Header><![CDATA[
<h1><%=l('${Value}')%></h1>]]>
</Header>
<Paragraph><![CDATA[ <Paragraph><![CDATA[
<p> <p>
%=l('${value}') %=l('${Value}')
</p> </p>
]]></Paragraph> ]]></Paragraph>

View File

@ -1,7 +1,7 @@
% layout 'default', title => "Sme server 2 - ${MenuDescription}", share_dir => './';
%# %#
%# Generated by ${version} %# Generated by ${version}
%# %#
% layout 'default', title => "Sme server 2 - ${MenuDescription}", share_dir => './';
% content_for 'module' => begin % content_for 'module' => begin
<div id="module" class="module ${PackageName}-panel"> <div id="module" class="module ${PackageName}-panel">

View File

@ -1,61 +0,0 @@
{
'PackageName': 'CreateStarterWebsite',
'prefix': 'csw',
'MenuHeading': 'Miscellaneous',
'MenuDescription': 'Create Starter Website',
'MenuNavigation': '2000 400',
'firstPanel': 'PARAMS',
'signalEvent': 'smeserver-createstarterwebsite-update',
'html': {
'Name': 'params',
'route': 'PARAMS',
'Header': 'Create a starter website',
'SubHeader': 'Manage CreateStarterWebsite settings:',
'Paragraph1': 'To create a simple web page for your company, fill in the fields below and click onCreate.',
'Paragraph2': 'You can leave any field blank if you do not need it.',
'Paragraph3': 'The text that you enter below will be line wrapped for a nicer appearance in your web page. Leave a blank line whenever you want to start a new paragraph. If you need to force a line break without starting a new paragraph (for example after each line of a mailing address), then type the four-character sequence',
'Paragraph4': 'Do not use this optionif you have already customized your web site, since it will overwrite the \\\'index.htm\\\' file in your web site directory.',
'Input1': {
'Type': 'Text',
'Value': '',
'Name': 'companyName',
'Label': null
},
'Paragraph5': 'First header, typically used for short phrases such as \\\'Leader in the field of textile manufacturing\\\'',
'Input2': {
'Type': 'Text',
'Value': '',
'Name': 'header1',
'Label': null
},
'Paragraph6': 'Text following first header, typically used for a paragraph of marketing information.',
'Input3': {
'Type': 'Textarea',
'Value': '',
'Name': 'text1',
'Label': null
},
'Paragraph7': 'Second header, typically used for short phrases such as \\\'For more information\\\' or \\\'To order our products\\\':',
'Input4': {
'Type': 'Text',
'Value': '',
'Name': 'header2',
'Label': null
},
'Paragraph8': 'Text following second header, typically used for contact or ordering information:',
'Input5': {
'Type': 'Textarea',
'Value': '',
'Name': 'text2',
'Label': null
},
'Paragraph9': 'When you create this web page, the file \\\'index.htm\\\' will be overwritten in your web site directory.',
'Paragraph10': 'Do you wish to proceed?',
'Input6': {
'Type': 'Submit',
'Value': 'Create',
'Name': 'Next',
'Label': null
}
}
}

View File

@ -15,14 +15,14 @@
'Paragraph1': 'To create a simple web page for your company, fill in the fields below and click onCreate.', 'Paragraph1': 'To create a simple web page for your company, fill in the fields below and click onCreate.',
'Paragraph2': 'You can leave any field blank if you do not need it.', 'Paragraph2': 'You can leave any field blank if you do not need it.',
'Paragraph3': 'The text that you enter below will be line wrapped for a nicer appearance in your web page. Leave a blank line whenever you want to start a new paragraph. If you need to force a line break without starting a new paragraph (for example after each line of a mailing address), then type the four-character sequence', 'Paragraph3': 'The text that you enter below will be line wrapped for a nicer appearance in your web page. Leave a blank line whenever you want to start a new paragraph. If you need to force a line break without starting a new paragraph (for example after each line of a mailing address), then type the four-character sequence',
'Paragraph4': 'Do not use this optionif you have already customized your web site, since it will overwrite the \'index.htm\' file in your web site directory.', 'Paragraph4': 'Do not use this optionif you have already customized your web site, since it will overwrite the index.htm file in your web site directory.',
'Input1': { 'Input1': {
'Type': 'Text', 'Type': 'Text',
'Value': '', 'Value': '',
'Name': 'companyName', 'Name': 'companyName',
'Label': null 'Label': null
}, },
'Paragraph5': 'First header, typically used for short phrases such as \'Leader in the field of textile manufacturing\'', 'Paragraph5': 'First header, typically used for short phrases such as Leader in the field of textile manufacturing',
'Input2': { 'Input2': {
'Type': 'Text', 'Type': 'Text',
'Value': '', 'Value': '',
@ -36,7 +36,7 @@
'Name': 'text1', 'Name': 'text1',
'Label': null 'Label': null
}, },
'Paragraph7': 'Second header, typically used for short phrases such as \'For more information\' or \'To order our products\':', 'Paragraph7': 'Second header, typically used for short phrases such as For more information or To order our products:',
'Input4': { 'Input4': {
'Type': 'Text', 'Type': 'Text',
'Value': '', 'Value': '',
@ -50,7 +50,7 @@
'Name': 'text2', 'Name': 'text2',
'Label': null 'Label': null
}, },
'Paragraph9': 'When you create this web page, the file \'index.htm\' will be overwritten in your web site directory.', 'Paragraph9': 'When you create this web page, the file index.htm will be overwritten in your web site directory.',
'Paragraph10': 'Do you wish to proceed?', 'Paragraph10': 'Do you wish to proceed?',
'Input6': { 'Input6': {
'Type': 'Submit', 'Type': 'Submit',

View File

@ -12,8 +12,7 @@
'route': 'PARAMS', 'route': 'PARAMS',
'Header': 'Disk usage', 'Header': 'Disk usage',
'SubHeader': 'Manage DiskUsage settings:', 'SubHeader': 'Manage DiskUsage settings:',
'Paragraph1': '', 'Paragraph1': 'Wed Sep 11 19:01:00 BST 2024',
'Paragraph2': 'Wed Sep 11 19:01:00 BST 2024',
'Preformatted1': 'Filesystem Size Used Avail Use% Mounted on\n/dev/mapper/main-root 29G 4.8G 24G 17% /\ndevtmpfs 2.0G 0 2.0G 0% /dev\ntmpfs 2.0G 12K 2.0G 1% /dev/shm\ntmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup\ntmpfs 2.0G 648K 2.0G 1% /run\n/dev/sda1 497M 111M 386M 23% /boot', 'Preformatted1': 'Filesystem Size Used Avail Use% Mounted on\n/dev/mapper/main-root 29G 4.8G 24G 17% /\ndevtmpfs 2.0G 0 2.0G 0% /dev\ntmpfs 2.0G 12K 2.0G 1% /dev/shm\ntmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup\ntmpfs 2.0G 648K 2.0G 1% /run\n/dev/sda1 497M 111M 386M 23% /boot',
'Table1': { 'Table1': {
'Type': 'Table', 'Type': 'Table',
@ -29,7 +28,6 @@
'Table1-Path' 'Table1-Path'
] ]
}, },
'Paragraph3': '',
'Table2': { 'Table2': {
'Type': 'Table', 'Type': 'Table',
'TableControl': 'Table2', 'TableControl': 'Table2',

View File

@ -21,24 +21,54 @@ def validate_html(html):
except Exception as e: except Exception as e:
raise ValueError("Invalid HTML document") from e raise ValueError("Invalid HTML document") from e
def convert_double_quotes_to_span(text):
"""Convert single-quoted text to <span>...</span>."""
# Use a regular expression to find single-quoted text and replace it
return re.sub(r'"(.*?)"', r"<span class=emphasis-para>\1</span>", text)
# def sanitize_text(text):
# # Replace newlines with spaces
# print(f"--{text}--")
# decoded_text = html.unescape(text)
# sanitized_text = decoded_text.replace("\n", "").replace(
# "\r", " "
# ) # Handle both Unix and Windows line endings
# # Replace tabs with spaces
# sanitized_text = sanitized_text.replace("\t", "")
# # map single quotes to double
# # sanitized_text = sanitized_text.replace("'", '"')
# #Map signle and double quotes to nothing
# sanitized_text.replace("'","").replace('"','')
# #Take out any multiple spaces - reduce to one.
# sanitized_text = ' '.join(sanitized_text.split())
# # Strip leading and trailing whitespace
# sanitized_text = sanitized_text.strip()
# #sanitized_text = convert_double_quotes_to_span(sanitized_text)
# print(f"++{sanitized_text}++")
# return sanitized_text
def sanitize_text(text): def sanitize_text(text):
# Replace newlines with spaces # Replace newlines with spaces
print(f"--{text}--")
# Take out html entities
decoded_text = html.unescape(text) decoded_text = html.unescape(text)
sanitized_text = decoded_text.replace("\n", "").replace( # Take out newlines
"\r", " " sanitized_text = decoded_text.replace('\n', ' ').replace('\r', ' ') # Handle both Unix and Windows line endings
) # Handle both Unix and Windows line endings
# Replace tabs with spaces # Replace tabs with spaces
sanitized_text = sanitized_text.replace("\t", "") sanitized_text = sanitized_text.replace('\t', ' ')
# map single quotes to double # Replace quote characters
sanitized_text = sanitized_text.replace("'", '"') sanitized_text = sanitized_text.replace('"', '').replace("'", '') # Remove double and single quotes
#Take out any multiple spaces - reduce to one. #Take out any multiple spaces - reduce to one.
sanitized_text = ' '.join(sanitized_text.split()) sanitized_text = ' '.join(sanitized_text.split())
# Strip leading and trailing whitespace # Strip leading and trailing whitespace
sanitized_text = sanitized_text.strip() sanitized_text = sanitized_text.strip()
print(f"++{sanitized_text}++")
return sanitized_text return sanitized_text
def extract_data(html): def extract_data(html):
"""Extract paragraphs, inputs, tables, and pre blocks from HTML and organize them in order.""" """Extract paragraphs, inputs, tables, and pre blocks from HTML and organize them in order."""
soup = BeautifulSoup(html, "lxml") soup = BeautifulSoup(html, "lxml")
@ -68,7 +98,10 @@ def extract_data(html):
text = element.get_text(strip=True) text = element.get_text(strip=True)
if text: # Ignore empty paragraphs if text: # Ignore empty paragraphs
# Sanitise text freom newlines,tabs and escape quotes. # Sanitise text freom newlines,tabs and escape quotes.
records.append({"Type": "Paragraph", "Text": sanitize_text(text)}) sanitised_text = sanitize_text(text)
if sanitised_text == "":
continue
records.append({"Type": "Paragraph", "Text": sanitised_text})
elif element.name == "pre": elif element.name == "pre":
text = element.get_text(strip=True) text = element.get_text(strip=True)

View File

@ -293,6 +293,43 @@ def get_translation(message="Hello", language="french"):
quit() quit()
return translated_message return translated_message
def check_file_version(filename):
#
# check modified versusu creation date of file and return +".new" if modified since creation
#
try:
with open(filename, 'r') as file:
# Read the first three lines
header_lines = [file.readline().strip() for _ in range(3)]
# Extract the timestamp
for line in header_lines:
if 'at' in line:
# Split at 'at', expect the timestamp to be in the third part
timestamp_str = line.split('at')[2].strip()
break
else:
raise ValueError("Invalid file format: no timestamp found.")
# Convert the string timestamp to a datetime object
file_timestamp = datetime.strptime(timestamp_str, '%Y-%m-%d %H:%M:%S')
# Get the last modified time of the file
file_modified_time = datetime.fromtimestamp(os.path.getmtime(filename))
# Compare the timestamps
if file_modified_time > file_timestamp:
return f"{filename}.new"
else:
return filename
except FileNotFoundError:
print(f"Error: The file '{filename}' does not exist.")
return None
except Exception as e:
print(f"An error occurred: {e}")
return None
def convert_lex_to_dict(pairs_string): def convert_lex_to_dict(pairs_string):
# Splitting pairs string by comma and newline, excluding empty lines # Splitting pairs string by comma and newline, excluding empty lines
@ -315,7 +352,7 @@ if __name__ == "__main__":
version_match = re.search(version_pattern, python_version) version_match = re.search(version_pattern, python_version)
python_version = version_match.group(0) if version_match else "Unknown" python_version = version_match.group(0) if version_match else "Unknown"
current_datetime = datetime.now() current_datetime = datetime.now()
formatted_datetime = current_datetime.strftime("%Y-%m-%d %H:%M") formatted_datetime = current_datetime.strftime("%Y-%m-%d %H:%M:%S")
strVersion = ( strVersion = (
"SM2Gen version:" "SM2Gen version:"
+ SME2Gen_version + SME2Gen_version