diff --git a/Targets/_du_PARAMS.html.ep b/Targets/_du_PARAMS.html.ep new file mode 100644 index 0000000..367a34e --- /dev/null +++ b/Targets/_du_PARAMS.html.ep @@ -0,0 +1,89 @@ +%# +%# Generated by SM2Gen version:0.8 Chameleon version:3.8.1 On Python:3.12.3 ( at 2024-09-12 19:46 +%# +
+ +

+ %= l('du Hello PARAMS'); +

+ % my $btn = l('APPLY'); + %= form_for "DiskUsaged" => (method => 'POST') => begin + + % param 'trt' => ${prefix}_data->{trt} unless param 'trt'; + %= hidden_field 'trt' => ${prefix}_data->{trt} + %# Inputs etc in here. + +

<%=l('Manage DiskUsage settings:')%>

+ +

+ %= l('&nbsp') +

+ +

+ %= l('Wed Sep 11 19:01:00 BST 2024') +

+ +
+			Filesystem             Size  Used Avail Use% Mounted on
+/dev/mapper/main-root   29G  4.8G   24G  17% /
+devtmpfs               2.0G     0  2.0G   0% /dev
+tmpfs                  2.0G   12K  2.0G   1% /dev/shm
+tmpfs                  2.0G     0  2.0G   0% /sys/fs/cgroup
+tmpfs                  2.0G  648K  2.0G   1% /run
+/dev/sda1              497M  111M  386M  23% /boot'
+		
+ + +
+ + + + + + + + + % my $control_data = $self->stash('Table1'); + % foreach my $row (@$control_data) { + + + + + + %} + +
<%=l('I-bays')%><%=l('Usage')%><%=l('Path')%>
<%=$c->render_to_string(inline=>$row->{Table1-I-bays})%><%=$c->render_to_string(inline=>$row->{Table1-Usage})%><%=$c->render_to_string(inline=>$row->{Table1-Path})%>
+ + +

+ %= l('&nbsp') +

+ +
+ + + + + + + + + % my $control_data = $self->stash('Table2'); + % foreach my $row (@$control_data) { + + + + + + %} + +
<%=l('Users')%><%=l('Usage')%><%=l('Path')%>
<%=$c->render_to_string(inline=>$row->{Table2-Users})%><%=$c->render_to_string(inline=>$row->{Table2-Usage})%><%=$c->render_to_string(inline=>$row->{Table2-Path})%>
+ + + %# Probably finally by a submit. + %end +
diff --git a/Targets/diskusage.html.ep b/Targets/diskusage.html.ep new file mode 100644 index 0000000..952a523 --- /dev/null +++ b/Targets/diskusage.html.ep @@ -0,0 +1,50 @@ +% layout 'default', title => "Sme server 2 - Disk Usage", share_dir => './'; +%# +%# Generated by SM2Gen version:0.8 Chameleon version:3.8.1 On Python:3.12.3 ( at 2024-09-12 19:46 +%# +% content_for 'module' => begin +
+ + % if ($config->{debug} == 1) { +

+ %= dumper $c->current_route +

+ % } + +

<%=$title%>

+ + % if ( stash('modul') ) { + %= $c->render_to_string(inline => stash('modul') ); + % } + + %if (${prefix}_data->{first}) { +

+ %=$c->render_to_string(inline =>$c->l(${prefix}_data->{first})) +

+ + %} elsif (${prefix}_data->{success}) { +
+

Operation Status Report

+ %= $c->l(${prefix}_data->{success}); +

+
+ + %} elsif (${prefix}_data->{error}) { +
+

Operation Status Report - error

+ %= $c->l(${prefix}_data->{error}); +

+
+ %} + + %#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' + + % if (${prefix}_data->{trt} eq "PARAMS") { + %= include 'partials/_du_PARAMS' + %} + + + +
+%end diff --git a/json5/DiskUsage.json5 b/json5/DiskUsage.json5 index e28b248..d3ff96c 100644 --- a/json5/DiskUsage.json5 +++ b/json5/DiskUsage.json5 @@ -6,7 +6,7 @@ 'MenuNavigation': '2000 400', 'firstPanel': 'PARAMS', 'signalEvent': 'smeserver-diskusage-update', - 'html': { + 'html': [ { 'Name': 'params', 'route': 'PARAMS', 'Header': 'Disk usage', @@ -44,4 +44,5 @@ ] } } + ] }