Looking to manipulate the FreeNAS GUI from within the Jail

Status
Not open for further replies.

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I am looking to place some status data on the main FreeNAS GUI page (see example) but I want to control the data through the jail in order to minimize the rework needed each time a newer version of FreeNAS comes out. I know I could rebuild FreeNAS with the modifications but that is not the preferred way, plus distributing it to anyone who wanted it would just plain suck. Using the jail makes the most sence.

For my first version of this project I want to display some hard drive temps on the GUI. If I can achieve this, that sets the groundwork for a more full featured set of applications we the users could build. So the initial design is to display the first up to 5 drives (because that is all I have right now) and show the current temps. If they are under the user defined threshold they will be green, otherwise they will be red. When you click on the drive icon it will open up a window that will display the drive information and additional user selected data. The alerts don't need to be onl the drive temp, it could be any other parameter that we could read. I think tossing an email as well would be in there as I know I don't sit looking at the GUI all the time. And if I can make the computer beep, that would be a nice touch.

Ultimately I would want it to display all drives in a system but even that may have issues since the GUI does have a limit on what it can show on the main page based on free space so I was thinking about a new tab for those who have a lot of drives, that would show the drive data, and if a tab is the only way to go for the entire project, that is fine too. We could get into charts and more stuff but I think keeping it simple to start out would be best. And once that works, try to create a PBI to install it but that really is another topic.

But I don't know if/how to control the GUI from within the jail. I hope the answer comes back with a possibility to do this.


FreeNAS-Modified.jpg
 

Attachments

  • FreeNAS-Modified.jpg
    FreeNAS-Modified.jpg
    15.8 KB · Views: 289

William Grzybowski

Wizard
iXsystems
Joined
May 27, 2011
Messages
1,754
Your expectations are too high.

You can definitely add some views to the GUI using tree menu as a plugin, but changing GUI appearance and default behavior is a no no.
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
Why not run your own web server inside the jail?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Your expectations are too high.

You can definitely add some views to the GUI using tree menu as a plugin, but changing GUI appearance and default behavior is a no no.
Well I had to ask if it were possible.

I'd like to think of this more as adding an application like on a smart phone which would add functionality, not as altering the behavior of the FreeNAS. If that were the case then we would never have had two versions of 8.0.4. (One with multimedia, one without).

Is there any location with some good information on the Plugins interface / API? The FreeNAS doc doesn't give much information about this.

Thanks for humoring me.

-Mark
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Why not run your own web server inside the jail?
I don't follow your train of thought. How would a web server be able to update the FreeNAS GUI page? Or are you saying to create a web page (using the server) to post all critical data that I'm trying to accomplish? I will admit that isn't a bad idea, just curious what extra hardware requirements would be as well as the impact to a slower system would be. Unfortunately that means another steep learning curve for me. I was hoping to master the Plugin coding.

Thanks for the idea.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
Or are you saying to create a web page (using the server) to post all critical data that I'm trying to accomplish?
Yes, one of your concerns was upgrades & losing the customizations. Having it all contained in the jail would avoid this.

IMHO, the jail doesn't make sense for this. All the tools needed to do this are available in the base system currently. I like the tab idea as many people have 6 or more drives not to mention changing the GUI is a no no. :eek: A tab would keep everything contained within said tab and should ease most upgrading woes. There shouldn't be a need to redistribute an entire custom build just any files( e.g. the html, any scripts, etc) for the hard drive temps page and a simple, I imagine, patch to shim it into the GUI.

A more complete Hardware Reporting page is very desired by the community and if this comes along far enough I imagine others would contribute/help maintain it. In fact if sufficiently polished I don't see why it wouldn't be add to FreeNAS itself particularly if coded in a similar fashion to other tabs.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
IMHO, the jail doesn't make sense for this. All the tools needed to do this are available in the base system currently. I like the tab idea as many people have 6 or more drives not to mention changing the GUI is a no no. :eek: A tab would keep everything contained within said tab and should ease most upgrading woes.
Thanks for your feedback. I do like the idea of using the GUI tab. My goal would be for it to become part of the supported project but unfortunately I do see problems there with supportability of many controllers. I'd hate to say that if SMART isn't supported in your system then you are out of luck. I myself couldn't stop there.

Well I guess I'll start on doing some code, may take me a long while since I'm not very familiar with whatever language this is, guess python? Time to learn. I should be able to build 8.3.1 without issue, I just powered up my CVSUP Server VM so I can get it updated, could take all night, been about 8 months or so since I built FreeNAS and having a local CVSUP makes things so much faster.

Once I get something that looks reasonable then I'll have to ask for help in making a patch so others can try it out.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
My goal would be for it to become part of the supported project but unfortunately I do see problems there with supportability of many controllers.
Yes, one of no doubt many issues.

Well I guess I'll start on doing some code, may take me a long while since I'm not very familiar with whatever language this is, guess python?
Python and Django, I believe, are the main ones to read up on. Dojo toolkit is also used.

I should be able to build 8.3.1 without issue, I just powered up my CVSUP Server VM so I can get it updated, could take all night, been about 8 months or so since I built FreeNAS and having a local CVSUP makes things so much faster.
8 months... you did remember to update the SVN URL, I hope.

Edit: I'm thinking of the base FreeNAS code and not ports. Supposedly, only 11 more days of CVSUPing ports though.
 
Status
Not open for further replies.
Top