diff --git a/Targets/CreateStarterWebsite/CreateStarterWebsite-Custom.pm.new b/Targets/CreateStarterWebsite/CreateStarterWebsite-Custom.pm.new index ff97552..dd245ab 100644 --- a/Targets/CreateStarterWebsite/CreateStarterWebsite-Custom.pm.new +++ b/Targets/CreateStarterWebsite/CreateStarterWebsite-Custom.pm.new @@ -2,7 +2,7 @@ # Routines to be edited by the developer to provide validation for parameters # 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-14 17:41 +# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-15 12:03 # use esmith::util; diff --git a/Targets/CreateStarterWebsite/CreateStarterWebsite.pm b/Targets/CreateStarterWebsite/CreateStarterWebsite.pm index c809e82..971e2ac 100644 --- a/Targets/CreateStarterWebsite/CreateStarterWebsite.pm +++ b/Targets/CreateStarterWebsite/CreateStarterWebsite.pm @@ -1,6 +1,6 @@ package SrvMngr::Controller::CreateStarterWebsite; # -# Generated by version:SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-14 17:41 +# Generated by version:SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-15 12:03 # #---------------------------------------------------------------------- # heading : Miscellaneous diff --git a/Targets/CreateStarterWebsite/_csw_PARAMS.html.ep b/Targets/CreateStarterWebsite/_csw_PARAMS.html.ep index 005ddc3..9748321 100644 --- a/Targets/CreateStarterWebsite/_csw_PARAMS.html.ep +++ b/Targets/CreateStarterWebsite/_csw_PARAMS.html.ep @@ -1,5 +1,5 @@ %# -%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-13 19:20 +%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-15 12:03 %#
-

- %= l('csw_Hello_PARAMS'); -

- % my $btn = l('csw_APPLY'); - %= form_for "CreateStarterWebsited" => (method => 'POST') => begin - - % param 'trt' => $csw_data->{trt} unless param 'trt'; - %= hidden_field 'trt' => $csw_data->{trt} - %# Inputs etc in here. - -

<%=l('csw_Manage_CreateStarterWebsite_settings:')%>

- -

- %=l('csw_To_create_a_simple_web') -

- -

- %=l('csw_You_can_leave_any_field') -

- -

- %=l('csw_The_text_that_you_enter') -

- -

- %=l('csw_Do_not_use_this_optionif') -

- -

- %=l('csw_') - - %= -

- -

- %=l('csw_First_header,_typically_used_for') -

- -

- %=l('csw_') - - %= -

- -

- %=l('csw_Text_following_first_header,_typically') -

- - - %=l('csw_') - - % param 'text1' => $csw_data->{text1} unless param 'text1'; - %= text_area 'text1', cols=>40, rows=>10 -
- -

- %=l('csw_Second_header,_typically_used_for') -

- -

- %=l('csw_') - - %= -

- -

- %=l('csw_Text_following_second_header,_typically') -

- - - %=l('csw_') - - % param 'text2' => $csw_data->{text2} unless param 'text2'; - %= text_area 'text2', cols=>40, rows=>10 -
- -

- %=l('csw_When_you_create_this_web') -

- -

- %=l('csw_Do_you_wish_to_proceed?') -

- - %# Probably finally by a submit. - %end -
diff --git a/Targets/Diskusage/Diskusage-Custom.pm.new b/Targets/DiskUsage/DiskUsage-Custom.pm similarity index 86% rename from Targets/Diskusage/Diskusage-Custom.pm.new rename to Targets/DiskUsage/DiskUsage-Custom.pm index 343a208..18a97ca 100644 --- a/Targets/Diskusage/Diskusage-Custom.pm.new +++ b/Targets/DiskUsage/DiskUsage-Custom.pm @@ -2,7 +2,7 @@ # Routines to be edited by the developer to provide validation for parameters # 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-14 12:09 +# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-15 10:49 # use esmith::util; @@ -36,7 +36,11 @@ our $ddb = esmith::DomainsDB->open() || die("Couldn't open Domains db"); # Return an array of hashes of the contents for each row and column for Table1 # default is a single row of strings "col1header-1, col2header-1, col3Header-1 etc" my $c = shift; - my @ret = {}; + my $control_data = $self->stash('Table1'); + my @ret = {} +# foreach my $colHead (@$control_data) { +# my ret{$colHead} = "$colhead-1" +# }; return \@ret } @@ -44,7 +48,11 @@ our $ddb = esmith::DomainsDB->open() || die("Couldn't open Domains db"); # Return an array of hashes of the contents for each row and column for Table2 # default is a single row of strings "col1header-1, col2header-1, col3Header-1 etc" my $c = shift; - my @ret = {}; + my $control_data = $self->stash('Table2'); + my @ret = {} +# foreach my $colHead (@$control_data) { +# my ret{$colHead} = "$colhead-1" +# }; return \@ret } diff --git a/Targets/Diskusage/Diskusage-Custom.pm b/Targets/DiskUsage/DiskUsage-Custom.pm.new similarity index 71% rename from Targets/Diskusage/Diskusage-Custom.pm rename to Targets/DiskUsage/DiskUsage-Custom.pm.new index 8209d5c..9230b3a 100644 --- a/Targets/Diskusage/Diskusage-Custom.pm +++ b/Targets/DiskUsage/DiskUsage-Custom.pm.new @@ -2,7 +2,7 @@ # Routines to be edited by the developer to provide validation for parameters # 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-14 11:53 +# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-15 11:51 # use esmith::util; @@ -33,14 +33,26 @@ our $ddb = esmith::DomainsDB->open() || die("Couldn't open Domains db"); # Get control data for tables(s) sub get_Table1 { + # Return an array of hashes of the contents for each row and column for Table1 + # default is a single row of strings "col1header-1, col2header-1, col3Header-1 etc" my $c = shift; - my @ret = {}; + my $control_data = $self->stash('Table1'); + my @ret = {} +# foreach my $colHead (@$control_data) { +# my ret{$colHead} = "$colhead-1" +# }; return \@ret } sub get_Table2 { + # Return an array of hashes of the contents for each row and column for Table2 + # default is a single row of strings "col1header-1, col2header-1, col3Header-1 etc" my $c = shift; - my @ret = {}; + my $control_data = $self->stash('Table2'); + my @ret = {} +# foreach my $colHead (@$control_data) { +# my ret{$colHead} = "$colhead-1" +# }; return \@ret } diff --git a/Targets/Diskusage/Diskusage.pm b/Targets/DiskUsage/DiskUsage.pm similarity index 96% rename from Targets/Diskusage/Diskusage.pm rename to Targets/DiskUsage/DiskUsage.pm index c8a93e7..1c72247 100644 --- a/Targets/Diskusage/Diskusage.pm +++ b/Targets/DiskUsage/DiskUsage.pm @@ -1,19 +1,19 @@ -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-14 12:09 +# Generated by version:SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-15 11:51 # #---------------------------------------------------------------------- # heading : Miscellaneous # description : Disk Usage # navigation : 2000 400 # -# name : diskusage, method : get, url : /diskusage, ctlact : Diskusage#main -# name : diskusageu, method : post, url : /diskusageu, ctlact : Diskusage#do_update -# name : diskusaged, method : get, url : /diskusaged, ctlact : Diskusage#do_display +# name : diskusage, method : get, url : /diskusage, ctlact : DiskUsage#main +# name : diskusageu, method : post, url : /diskusageu, ctlact : DiskUsage#do_update +# name : diskusaged, method : get, url : /diskusaged, ctlact : DiskUsage#do_display # # routes : end # -# Documentation: https://wiki.contribs.org/Diskusage +# Documentation: https://wiki.contribs.org/DiskUsage #---------------------------------------------------------------------- # @@ -49,7 +49,7 @@ our $ndb = esmith::NetworksDB->open() || die("Couldn't open Network db"); our $hdb = esmith::HostsDB->open() || die("Couldn't open Hosts db"); our $ddb = esmith::DomainsDB->open() || die("Couldn't open Domains db"); -require '/usr/share/smanager/lib/SrvMngr/Controller/Diskusage-Custom.pm'; #The code that is to be added by the developer +require '/usr/share/smanager/lib/SrvMngr/Controller/DiskUsage-Custom.pm'; #The code that is to be added by the developer sub main { # diff --git a/Targets/Diskusage/du_PARAMS.html.ep b/Targets/DiskUsage/_du_PARAMS.html.ep similarity index 91% rename from Targets/Diskusage/du_PARAMS.html.ep rename to Targets/DiskUsage/_du_PARAMS.html.ep index 9ca8189..d965337 100644 --- a/Targets/Diskusage/du_PARAMS.html.ep +++ b/Targets/DiskUsage/_du_PARAMS.html.ep @@ -1,7 +1,7 @@ %# -%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-14 12:09 +%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-15 11:51 %# -
+