added the new option 'enable_hourly_view' which enables the ability to select the hourly view in the main page. #141

This commit is contained in:
Jordi Sanfeliu 2016-03-01 11:08:31 +01:00
parent 6b04ba3b40
commit 78577b6e6e
3 changed files with 24 additions and 1 deletions

View File

@ -12,9 +12,11 @@ N.N.N - DD-MMM-2015
(suggested by Pete Perfetti, pete.perfetti AT protonmail.com)
- Added the new option 'priority' to set the priority value in which Monitorix
will run.
- Added the new option "image_format" to specify the file format of each
- Added the new option 'image_format' to specify the file format of each
generated graph. [#132]
- Added name substring match in 'process.pm'. [#136]
- Added the new option 'enable_hourly_view' which enables the ability to select
the hourly view in the main page.
- Fixed in 'libvirt.pm' limiting to 100 all CPU values greater than 100.
- Fixed in 'libvirt.pm' to hide empty groups.
(thanks to Pavel Bauer, pbauer AT algotech.cz for pointing this out)

View File

@ -191,6 +191,15 @@ An example would be: \fIhttp://myexternalwebsite.com\fP
Default value:
.RE
.P
.BI enable_hourly_view
.RS
This option enables or disables the ability to select the hourly view in the main page.
.P
No .rrd file will change by selecting this option and the historical data won't be affected.
.P
Default value: \fIn\fP
.RE
.P
.BI base_dir
.RS
This is the absolute path to the directory where all the web elements are located:

View File

@ -354,6 +354,18 @@ EOF
<p>
<table cellspacing="5" cellpadding="0" bgcolor="$table_back_color" border="1">
<tr>
EOF
if(lc($config{enable_hourly_view} || "") eq "y" ) {
print(OUT <<EOF);
<td bgcolor="$title_back_color">
<input type="radio" name="when" value="1hour">
<font color="$title_fore_color"><b>Hourly&nbsp;</b></font>
</td>
EOF
}
print(OUT <<EOF);
<td bgcolor="$title_back_color">
<input type="radio" checked name="when" value="1day">
<font color="$title_fore_color"><b>Daily&nbsp;</b></font>