diff --git a/source/ipmitool-plugin/usr/local/emhttp/plugins/ipmitool-plugin/IPMIFans.page b/source/ipmitool-plugin/usr/local/emhttp/plugins/ipmitool-plugin/IPMIFans.page index 93d8680e..a15d39eb 100644 --- a/source/ipmitool-plugin/usr/local/emhttp/plugins/ipmitool-plugin/IPMIFans.page +++ b/source/ipmitool-plugin/usr/local/emhttp/plugins/ipmitool-plugin/IPMIFans.page @@ -3,12 +3,12 @@ Title="Fan Control" ---
- + IPMI Fan Control: -: + +   @@ -16,20 +16,21 @@ IPMI Fan Control: temperature sensor: -: - - + Low temperature threshold: -: + High temperature threshold: -: +   @@ -39,20 +40,21 @@ IPMI Fan Control: temperature sensor: -: - - + Low temperature threshold: -: + High temperature threshold: -: +   @@ -62,20 +64,21 @@ IPMI Fan Control: temperature sensor: -: - - + Low temperature threshold: -: + High temperature threshold: -: +   @@ -85,20 +88,21 @@ IPMI Fan Control: temperature sensor: -: - - + Low temperature threshold: -: + High temperature threshold: -: +   @@ -108,20 +112,21 @@ IPMI Fan Control: temperature sensor: -: - - + Low temperature threshold: -: + High temperature threshold: -: +   @@ -131,20 +136,21 @@ IPMI Fan Control: temperature sensor: -: - - + Low temperature threshold: -: + High temperature threshold: -: +   @@ -154,20 +160,21 @@ IPMI Fan Control: temperature sensor: -: - - + Low temperature threshold: -: + High temperature threshold: -: +   @@ -177,20 +184,21 @@ IPMI Fan Control: temperature sensor: -: - - + Low temperature threshold: -: + High temperature threshold: -: +   @@ -200,20 +208,21 @@ IPMI Fan Control: temperature sensor: -: - - + Low temperature threshold: -: + High temperature threshold: -: +   @@ -223,20 +232,21 @@ IPMI Fan Control: temperature sensor: -: - - + Low temperature threshold: -: + High temperature threshold: -: + @@ -246,3 +256,29 @@ IPMI Fan Control: :
+ + diff --git a/source/ipmitool-plugin/usr/local/emhttp/plugins/ipmitool-plugin/IPMISettings.page b/source/ipmitool-plugin/usr/local/emhttp/plugins/ipmitool-plugin/IPMISettings.page index 01c2ecb8..42a6d8b3 100644 --- a/source/ipmitool-plugin/usr/local/emhttp/plugins/ipmitool-plugin/IPMISettings.page +++ b/source/ipmitool-plugin/usr/local/emhttp/plugins/ipmitool-plugin/IPMISettings.page @@ -9,7 +9,7 @@ require_once '/usr/local/emhttp/plugins/ipmitool-plugin/include/ipmitool_helpers
- + Enable Event Notifications: : Display Fan speed: -: @@ -60,6 +60,7 @@ $(function(){ .append("Fan Control: ") .append("Event Notification: "); checkIPMIEVD(document.ipmitool_settings); + //checkIPMIFAN(document.ipmifan_settings); checkREMOTE(document.ipmitool_settings); decData(document.ipmitool_settings); //ip address input mask @@ -71,6 +72,9 @@ function resetDATA(form) { form.IPADDR.value = ""; form.USER.value = ""; form.PASSWORD.value = ""; + form.CPU_TEMP.selectedIndex = 0; + form.MB_TEMP.selectedIndex = 0; + form.DISP_FAN.selectedIndex = 0; form.submit(); } @@ -84,9 +88,9 @@ function checkIPMIEVD(form) { $("#btnApply").prop("disabled", false); } if (form.IPMIEVD.value == "enable") - form.command.value = "/usr/local/emhttp/plugins/ipmitool-plugin/scripts/start"; + form.COMMAND.value = "/usr/local/emhttp/plugins/ipmitool-plugin/scripts/start"; else { - form.command.value = "/usr/local/emhttp/plugins/ipmitool-plugin/scripts/stop"; + form.COMMAND.value = "/usr/local/emhttp/plugins/ipmitool-plugin/scripts/stop"; } } @@ -108,4 +112,5 @@ function verifyDATA(form) { form.USER.value = form.USER.value.replace(/ /g,"_"); form.PASSWORD.value = btoa(form.PASSWORD.value); } - \ No newline at end of file + + diff --git a/source/ipmitool-plugin/usr/local/emhttp/plugins/ipmitool-plugin/include/ipmitool_helpers.php b/source/ipmitool-plugin/usr/local/emhttp/plugins/ipmitool-plugin/include/ipmitool_helpers.php index 0c9f99b0..d352f8af 100644 --- a/source/ipmitool-plugin/usr/local/emhttp/plugins/ipmitool-plugin/include/ipmitool_helpers.php +++ b/source/ipmitool-plugin/usr/local/emhttp/plugins/ipmitool-plugin/include/ipmitool_helpers.php @@ -88,7 +88,9 @@ function ipmi_events($options=null){ } /* get select options for a given sensor type */ -function ipmi_get_options($sensors, $type, $selected=null){ +function ipmi_get_options($sensors, $type, $selected=null, $hdd=null){ + if ($hdd) + $sensors[] = ['Name' => 'HDD Temperature', 'Type' => 'Temperature', 'Status' => 'ok']; $options = ""; foreach($sensors as $sensor){ if ($sensor["Type"] == $type && $sensor["Status"] != "ns"){ @@ -105,6 +107,25 @@ function ipmi_get_options($sensors, $type, $selected=null){ return $options; } +// get options for high or low temp thresholds +function temp_get_options($range, $selected=null){ + $temps = [20,25,30,35,40,45,50,55,60,65,70,75,80]; + if ($range == 'HIGH') + rsort($temps); + $options = ""; + foreach($temps as $temp){ + $options .= "