Maily debugging info to find reason nfsshare works but diskusage fails
This commit is contained in:
parent
436bc6d2f2
commit
20d5828803
@ -1,7 +1,7 @@
|
|||||||
%#
|
%#
|
||||||
%# Generated by SM2Gen version:0.8 Chameleon version:3.8.1 On Python:3.12.3 ( at 2024-09-12 19:46
|
%# Generated by SM2Gen version:0.8 Chameleon version:3.8.1 On Python:3.12.3 at 2024-09-13 15:33
|
||||||
%#
|
%#
|
||||||
<div id="DiskUsage-PARAMS" class="partial DiskUsage-PARAMS">
|
<div id="Diskusage-PARAMS" class="partial Diskusage-PARAMS">
|
||||||
<script>
|
<script>
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
SelectInput();
|
SelectInput();
|
||||||
@ -11,7 +11,7 @@
|
|||||||
%= l('du Hello PARAMS');
|
%= l('du Hello PARAMS');
|
||||||
</h2>
|
</h2>
|
||||||
% my $btn = l('APPLY');
|
% my $btn = l('APPLY');
|
||||||
%= form_for "DiskUsaged" => (method => 'POST') => begin
|
%= form_for "Diskusaged" => (method => 'POST') => begin
|
||||||
|
|
||||||
% param 'trt' => ${prefix}_data->{trt} unless param 'trt';
|
% param 'trt' => ${prefix}_data->{trt} unless param 'trt';
|
||||||
%= hidden_field 'trt' => ${prefix}_data->{trt}
|
%= hidden_field 'trt' => ${prefix}_data->{trt}
|
||||||
@ -27,7 +27,7 @@
|
|||||||
%= l('Wed Sep 11 19:01:00 BST 2024')
|
%= l('Wed Sep 11 19:01:00 BST 2024')
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
Filesystem Size Used Avail Use% Mounted on
|
Filesystem Size Used Avail Use% Mounted on
|
||||||
/dev/mapper/main-root 29G 4.8G 24G 17% /
|
/dev/mapper/main-root 29G 4.8G 24G 17% /
|
||||||
devtmpfs 2.0G 0 2.0G 0% /dev
|
devtmpfs 2.0G 0 2.0G 0% /dev
|
||||||
@ -35,7 +35,7 @@ tmpfs 2.0G 12K 2.0G 1% /dev/shm
|
|||||||
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
|
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
|
||||||
tmpfs 2.0G 648K 2.0G 1% /run
|
tmpfs 2.0G 648K 2.0G 1% /run
|
||||||
/dev/sda1 497M 111M 386M 23% /boot'
|
/dev/sda1 497M 111M 386M 23% /boot'
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
<br /><table class="sme-border TableSort sme-table">
|
<br /><table class="sme-border TableSort sme-table">
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
% 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:3.8.1 On Python:3.12.3 ( at 2024-09-12 19:46
|
%# Generated by SM2Gen version:0.8 Chameleon version:3.8.1 On Python:3.12.3 at 2024-09-13 15:33
|
||||||
%#
|
%#
|
||||||
% content_for 'module' => begin
|
% content_for 'module' => begin
|
||||||
<div id="module" class="module DiskUsage-panel">
|
<div id="module" class="module Diskusage-panel">
|
||||||
|
|
||||||
% if ($config->{debug} == 1) {
|
% if ($config->{debug} == 1) {
|
||||||
<p>
|
<p>
|
||||||
|
@ -119,9 +119,9 @@
|
|||||||
</Table>
|
</Table>
|
||||||
|
|
||||||
<Preformatted><![CDATA[
|
<Preformatted><![CDATA[
|
||||||
<pre>
|
<pre>
|
||||||
${value}'
|
${value}'
|
||||||
</pre>
|
</pre>
|
||||||
]]>
|
]]>
|
||||||
</Preformatted>
|
</Preformatted>
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
'Paragraph1': 'To create a simple web page for your company, fill \n\t in the fields below and click onCreate.',
|
'Paragraph1': 'To create a simple web page for your company, fill \n\t 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 \n\t for a nicer appearance in your web page. Leave a blank line \n\t whenever you want to start a new paragraph. If you need \n\t to force a line break without starting a new paragraph (for \n\t example after each line of a mailing address), then type \n\t the four-character sequence',
|
'Paragraph3': 'The text that you enter below will be line wrapped \n\t for a nicer appearance in your web page. Leave a blank line \n\t whenever you want to start a new paragraph. If you need \n\t to force a line break without starting a new paragraph (for \n\t example after each line of a mailing address), then type \n\t the four-character sequence',
|
||||||
'Paragraph4': 'Do not use this optionif you have already customized your web site, since it will \n\t overwrite the \'index.htm\' file in your web site directory.',
|
'Paragraph4': 'Do not use this option if you have already customized your web site, since it will \n\t overwrite the \'index.htm\' file in your web site directory.',
|
||||||
'Input1': {
|
'Input1': {
|
||||||
'Type': 'Text',
|
'Type': 'Text',
|
||||||
'Value': '',
|
'Value': '',
|
||||||
|
@ -1,48 +1,47 @@
|
|||||||
{
|
{
|
||||||
'PackageName': 'DiskUsage',
|
PackageName: 'Diskusage',
|
||||||
'prefix': 'du',
|
prefix: 'du',
|
||||||
'MenuHeading': 'Miscellaneous',
|
MenuHeading: 'Miscellaneous',
|
||||||
'MenuDescription': 'Disk Usage',
|
MenuDescription: 'Disk Usage',
|
||||||
'MenuNavigation': '2000 400',
|
MenuNavigation: '2000 400',
|
||||||
'firstPanel': 'PARAMS',
|
firstPanel: 'PARAMS',
|
||||||
'signalEvent': 'smeserver-diskusage-update',
|
signalEvent: 'smeserver-diskusage-update',
|
||||||
'html': [ {
|
html: [{
|
||||||
'Name': 'params',
|
Name: 'params',
|
||||||
'route': 'PARAMS',
|
route: 'PARAMS',
|
||||||
'Header': 'Disk usage',
|
Header: 'Disk usage',
|
||||||
'SubHeader': 'Manage DiskUsage settings:',
|
SubHeader: 'Manage DiskUsage settings:',
|
||||||
'Paragraph1': ' ',
|
Paragraph1: ' ',
|
||||||
'Paragraph2': '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',
|
||||||
'TableControl': 'Table1',
|
TableControl: 'Table1',
|
||||||
'TopHeadings': [
|
TopHeadings: [
|
||||||
'I-bays',
|
'I-bays',
|
||||||
'Usage',
|
'Usage',
|
||||||
'Path'
|
'Path'
|
||||||
],
|
],
|
||||||
'Columns': [
|
Columns: [
|
||||||
'Table1-I-bays',
|
'Table1-I-bays',
|
||||||
'Table1-Usage',
|
'Table1-Usage',
|
||||||
'Table1-Path'
|
'Table1-Path'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
'Paragraph3': ' ',
|
Paragraph3: ' ',
|
||||||
'Table2': {
|
Table2: {
|
||||||
'Type': 'Table',
|
Type: 'Table',
|
||||||
'TableControl': 'Table2',
|
TableControl: 'Table2',
|
||||||
'TopHeadings': [
|
TopHeadings: [
|
||||||
'Users',
|
'Users',
|
||||||
'Usage',
|
'Usage',
|
||||||
'Path'
|
'Path'
|
||||||
],
|
],
|
||||||
'Columns': [
|
Columns: [
|
||||||
'Table2-Users',
|
'Table2-Users',
|
||||||
'Table2-Usage',
|
'Table2-Usage',
|
||||||
'Table2-Path'
|
'Table2-Path'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}]
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@ def insert_spaces_before_caps(text):
|
|||||||
def save_to_json5(data, output_filename, package_name, header, sub_header):
|
def save_to_json5(data, output_filename, package_name, header, sub_header):
|
||||||
"""Save extracted data to a JSON5 file with a specific structure."""
|
"""Save extracted data to a JSON5 file with a specific structure."""
|
||||||
# Generate prefix from uppercase letters in PackageName made into lowercase
|
# Generate prefix from uppercase letters in PackageName made into lowercase
|
||||||
prefix = ''.join(re.findall(r'[A-Z]', package_name)).lowercase()
|
prefix = ''.join(re.findall(r'[A-Z]', package_name)).lower()
|
||||||
|
|
||||||
# Prepare structured html list
|
# Prepare structured html list
|
||||||
structured_html = []
|
structured_html = []
|
||||||
|
@ -309,10 +309,11 @@ if __name__ == "__main__":
|
|||||||
except pkg_resources.DistributionNotFound:
|
except pkg_resources.DistributionNotFound:
|
||||||
chameleon_version = "Version information not available"
|
chameleon_version = "Version information not available"
|
||||||
python_version = sys.version
|
python_version = sys.version
|
||||||
python_version = python_version[:8]
|
version_pattern = r'(\d{1,3}\.\d{1,3}\.\d{1,3})'
|
||||||
|
version_match = re.search(version_pattern, python_version)
|
||||||
|
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")
|
||||||
|
|
||||||
strVersion = (
|
strVersion = (
|
||||||
"SM2Gen version:"
|
"SM2Gen version:"
|
||||||
+ SME2Gen_version
|
+ SME2Gen_version
|
||||||
@ -414,9 +415,11 @@ if __name__ == "__main__":
|
|||||||
get_table_control_data()
|
get_table_control_data()
|
||||||
) # arrays of hashes used to drive rows in tables
|
) # arrays of hashes used to drive rows in tables
|
||||||
|
|
||||||
|
# print(strVersion,tablecontrols,routes)
|
||||||
|
|
||||||
# Generate controller file
|
# Generate controller file
|
||||||
try:
|
try:
|
||||||
controller_template = PageTemplateFile("Templates/controller.pm.tem")
|
controller_template = PageTemplateFile("Templates/controller.pm.tem",CHAMELEON_DEBUG="true")
|
||||||
dbentries = get_db_fields() # Params which correspond to Db fields
|
dbentries = get_db_fields() # Params which correspond to Db fields
|
||||||
try:
|
try:
|
||||||
controller_perl = controller_template.render(
|
controller_perl = controller_template.render(
|
||||||
|
Loading…
Reference in New Issue
Block a user