Ticket #24 (new feature)

Opened 12 months ago

Last modified 12 months ago

Show available drive space

Reported by: sophos7 Owned by: Cheez
Priority: Insignificant Milestone:
Component: HellaWorld Version: 1.9
Keywords: Cc:

Description

I wanted a way to show the drive space available on the 2 volumes that I use with HellaNZB. I made changes to the config.php file as well as the default.php. I am a novice and can't stress that enough. I want to adapt my "update" to be more inline with the coding style of this project.

One issue with this "update" is that if you check to have page auto update every 15 seconds the data disappears. I figured the way to fix this was to put the data into HellaWorld.php. Again I am defaulting to the primary maintainer of this project for guidance on coding style.

See attached files.

Shawn

Attachments

config.php (1.4 kB) - added by sophos7 12 months ago.
config.php file
default.php (11.8 kB) - added by sophos7 12 months ago.
default.php from templates folder
freespace.rar (7.0 kB) - added by sophos7 12 months ago.
All files go to respective dirs. FreeSpace?.php goes in ../classes/

Change History

Changed 12 months ago by sophos7

config.php file

Changed 12 months ago by sophos7

default.php from templates folder

Changed 12 months ago by sophos7

I want to add that today and this weekend (Friday 01-18-2009 - monday) I am going to try and move this information to be in the HellaWorld.php file so that the default.php does not need to include the config.php file. Also I would like the Megabyte, Gigabyte, and so on to be dynamic. So when I have a Terra free it shows 1.2 Tb and when less then a Terra will show 800.56 Gb and less then Gig 945.49 Mb as well as Kb... and i figure if it gets to less than a Kb then maybe just put a message that says "UM, you are screwed!" ha, not really but you get the idea.

I will post my success/failure Monday.

Changed 12 months ago by sophos7

UPDATE: when I said Hellaworld.php... I mean HellaController.php

Changed 12 months ago by sophos7

All files go to respective dirs. FreeSpace?.php goes in ../classes/

Changed 12 months ago by sophos7

uploaded freespace.rar

This has all the alterations. Each file goes to its respective path. The new file FreeSpace?.php goes in ../classes/

The auto refresh is still not working. I was able to get the text to show in the header but when i try to include FreeSpace?.php into hellaworld.php it makes the refresh button go away.

What this DOES DO... This allows user to set new variables in config.php for a user friendly name of 2 drives and their path location. Based on this information HellaWorld will show the user friendly drive name, the space available on the drive. It will also format and make accordingly for IEC prefixes. Meaning that if you have less than 1 gig your reading will be in MiB. if you have less then a Terra reading will be in GiB and so forth.

thanks, shawn

Note: See TracTickets for help on using tickets.