diff --git a/Changes b/Changes
index 10379d9..2110823 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,6 @@
3.N.N - NN-XXX-2013
====================
-- Added a new option called 'temperatures_scale' to be able to toggle between
+- Added a new option called 'temperature_scale' to be able to toggle between
values in Celsius or in Fahrenheit.
(suggested by Bryan Guidroz, bryanguidroz AT hotmail.com)
diff --git a/lib/Monitorix.pm b/lib/Monitorix.pm
index 5a5394d..fe28447 100644
--- a/lib/Monitorix.pm
+++ b/lib/Monitorix.pm
@@ -55,7 +55,7 @@ sub celsius_to {
my ($config, $celsius) = @_;
$celsius = $celsius || 0;
- if(lc($config->{temperatures_scale}) eq "f") {
+ if(lc($config->{temperature_scale}) eq "f") {
return ($celsius * (9 / 5)) + 32;
}
return $celsius;
diff --git a/lib/disk.pm b/lib/disk.pm
index 62ed5b5..00951ab 100644
--- a/lib/disk.pm
+++ b/lib/disk.pm
@@ -246,7 +246,7 @@ sub disk_cgi {
$title = !$silent ? $title : "";
- if(lc($config->{temperatures_scale}) eq "f") {
+ if(lc($config->{temperature_scale}) eq "f") {
$temp_scale = "Fahrenheit";
}
@@ -379,7 +379,7 @@ sub disk_cgi {
print("
\n");
print(" \n");
}
- if(lc($config->{temperatures_scale}) eq "f") {
+ if(lc($config->{temperature_scale}) eq "f") {
push(@CDEF, "CDEF:temp_0=9,5,/,temp0,*,32,+");
push(@CDEF, "CDEF:temp_1=9,5,/,temp1,*,32,+");
push(@CDEF, "CDEF:temp_2=9,5,/,temp2,*,32,+");
diff --git a/lib/hptemp.pm b/lib/hptemp.pm
index 54deef9..40e3902 100644
--- a/lib/hptemp.pm
+++ b/lib/hptemp.pm
@@ -208,7 +208,7 @@ sub hptemp_cgi {
$title = !$silent ? $title : "";
- if(lc($config->{temperatures_scale}) eq "f") {
+ if(lc($config->{temperature_scale}) eq "f") {
$temp_scale = "Fahrenheit";
}
@@ -350,7 +350,7 @@ sub hptemp_cgi {
push(@tmp, "COMMENT: \\n");
}
}
- if(lc($config->{temperatures_scale}) eq "f") {
+ if(lc($config->{temperature_scale}) eq "f") {
push(@CDEF, "CDEF:temp_0=9,5,/,temp0,*,32,+");
push(@CDEF, "CDEF:temp_1=9,5,/,temp1,*,32,+");
push(@CDEF, "CDEF:temp_2=9,5,/,temp2,*,32,+");
@@ -468,7 +468,7 @@ sub hptemp_cgi {
push(@tmp, "COMMENT: \\n") unless ($n + 1) % 2;
}
}
- if(lc($config->{temperatures_scale}) eq "f") {
+ if(lc($config->{temperature_scale}) eq "f") {
push(@CDEF, "CDEF:temp_0=9,5,/,temp0,*,32,+");
push(@CDEF, "CDEF:temp_1=9,5,/,temp1,*,32,+");
push(@CDEF, "CDEF:temp_2=9,5,/,temp2,*,32,+");
@@ -575,7 +575,7 @@ sub hptemp_cgi {
push(@tmp, "COMMENT: \\n") unless ($n + 1) % 2;
}
}
- if(lc($config->{temperatures_scale}) eq "f") {
+ if(lc($config->{temperature_scale}) eq "f") {
push(@CDEF, "CDEF:temp_0=9,5,/,temp0,*,32,+");
push(@CDEF, "CDEF:temp_1=9,5,/,temp1,*,32,+");
push(@CDEF, "CDEF:temp_2=9,5,/,temp2,*,32,+");
diff --git a/lib/lmsens.pm b/lib/lmsens.pm
index 454f940..fd2e505 100644
--- a/lib/lmsens.pm
+++ b/lib/lmsens.pm
@@ -337,7 +337,7 @@ sub lmsens_cgi {
$title = !$silent ? $title : "";
- if(lc($config->{temperatures_scale}) eq "f") {
+ if(lc($config->{temperature_scale}) eq "f") {
$temp_scale = "Fahrenheit";
}
@@ -553,7 +553,7 @@ sub lmsens_cgi {
print(" |
\n");
print(" \n");
}
- if(lc($config->{temperatures_scale}) eq "f") {
+ if(lc($config->{temperature_scale}) eq "f") {
push(@CDEF, "CDEF:core_0=9,5,/,core0,*,32,+");
push(@CDEF, "CDEF:core_1=9,5,/,core1,*,32,+");
push(@CDEF, "CDEF:core_2=9,5,/,core2,*,32,+");
@@ -832,7 +832,7 @@ sub lmsens_cgi {
push(@tmpz, "LINE2:cpu_1#EEEE44:CPU 1") unless !$lmsens->{list}->{'cpu1'};
push(@tmpz, "LINE2:cpu_2#EE44EE:CPU 2") unless !$lmsens->{list}->{'cpu2'};
push(@tmpz, "LINE2:cpu_3#44EE44:CPU 3") unless !$lmsens->{list}->{'cpu3'};
- if(lc($config->{temperatures_scale}) eq "f") {
+ if(lc($config->{temperature_scale}) eq "f") {
push(@CDEF, "CDEF:mb_0=9,5,/,mb0,*,32,+");
push(@CDEF, "CDEF:mb_1=9,5,/,mb1,*,32,+");
push(@CDEF, "CDEF:cpu_0=9,5,/,cpu0,*,32,+");
@@ -1033,7 +1033,7 @@ sub lmsens_cgi {
push(@tmpz, "LINE2:gpu_6#EE44EE:GPU 6\\g") unless !$lmsens->{list}->{'gpu6'};
push(@tmpz, "LINE2:gpu_7#EEEE44:GPU 7\\g") unless !$lmsens->{list}->{'gpu7'};
push(@tmpz, "LINE2:gpu_8#963C74:GPU 8\\g") unless !$lmsens->{list}->{'gpu8'};
- if(lc($config->{temperatures_scale}) eq "f") {
+ if(lc($config->{temperature_scale}) eq "f") {
push(@CDEF, "CDEF:gpu_0=9,5,/,gpu0,*,32,+");
push(@CDEF, "CDEF:gpu_1=9,5,/,gpu1,*,32,+");
push(@CDEF, "CDEF:gpu_2=9,5,/,gpu2,*,32,+");
diff --git a/lib/nvidia.pm b/lib/nvidia.pm
index 87b0c4d..4be6428 100644
--- a/lib/nvidia.pm
+++ b/lib/nvidia.pm
@@ -229,7 +229,7 @@ sub nvidia_cgi {
$title = !$silent ? $title : "";
- if(lc($config->{temperatures_scale}) eq "f") {
+ if(lc($config->{temperature_scale}) eq "f") {
$temp_scale = "Fahrenheit";
}
@@ -341,7 +341,7 @@ sub nvidia_cgi {
print(" |
\n");
print(" \n");
}
- if(lc($config->{temperatures_scale}) eq "f") {
+ if(lc($config->{temperature_scale}) eq "f") {
push(@CDEF, "CDEF:temp_0=9,5,/,temp0,*,32,+");
push(@CDEF, "CDEF:temp_1=9,5,/,temp1,*,32,+");
push(@CDEF, "CDEF:temp_2=9,5,/,temp2,*,32,+");
diff --git a/monitorix.conf b/monitorix.conf
index c742d75..0c7bccc 100644
--- a/monitorix.conf
+++ b/monitorix.conf
@@ -11,7 +11,7 @@ iface_mode = graph
enable_zoom = y
netstats_in_bps = n
disable_javascript_void = n
-temperatures_scale = c
+temperature_scale = c
base_dir = /usr/share/monitorix/
base_lib = /var/lib/monitorix/
|