This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

disk temperature colors

Post/Debate your Suggestions & Requests of XigmaNAS here. This ONLY pertains to XigmaNAS.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
chachi420
Starter
Starter
Posts: 55
Joined: 26 May 2014 22:35
Status: Offline

disk temperature colors

Post by chachi420 »

Hello everyone,
I am a complete noob and I was just playing around with the php codes and I thought it would be cool to display the temperatures of the disks under STATUS > DISKS with some colors based on defined value of temperature. So for ex, color of the temperatures above 30 will be red and otherwise will be green. Here is the simple code I wrote.

Code: Select all

if($temp <= 29){
	 $temp = "<div style=\"color: green; font-weight: bold;\">$temp</div>"; 
}
else
{
         $temp = "<div style=\"color: red; font-weight: bold;\">$temp</div>"; 
}
Where to place it: Do the 'find word in the page' thing with ctrl+F and type in "temp". AFTER the 6th 'temp' (which ends like this " htmlspecialchars($temp));?> ") so put it right after that semicolon after the 6th 'temp' word and save it. Of course, you can modify the code however you want and you can set the temperature you want in the code in the beginning. Set the threshold however you want and the color as well. Have fun with it. I thought it'd be helpful only because my disks used to get pretty hot and i had to go through all temperatures to see which one was higher. Now, if i see red color, boom!, i go and turn on the fan or something. My NAS is on one heck of an old computer so no good ventilation system lol. That's why I did this. I'm attaching a screenshot as well to see how it looks before you try it.
status check.JPG
You do not have the required permissions to view the files attached to this post.

RedAntz
experienced User
experienced User
Posts: 125
Joined: 11 Jul 2012 07:46
Location: Sydney, Australia
Status: Offline

Re: disk temperature colors

Post by RedAntz »

Hi chachi420,

Thanks for suggestions. New feature to highlight temperature text in Status|Disks page based on Informal and Critical threshold at Temperature monitoring section in Disks|Management|S.M.A.R.T. is implemented and will be available in next release.

chachi420
Starter
Starter
Posts: 55
Joined: 26 May 2014 22:35
Status: Offline

Re: disk temperature colors

Post by chachi420 »

RedAntz wrote:Hi chachi420,

Thanks for suggestions. New feature to highlight temperature text in Status|Disks page based on Informal and Critical threshold at Temperature monitoring section in Disks|Management|S.M.A.R.T. is implemented and will be available in next release.
Oh wow i didnt even get any notification of this reply. Good thing i just accidentally checked it. Thank you so much!

Post Reply

Return to “Suggestions & Requests”