I am a PHP dev that has been learning Ruby and Rails, and am starting to write my first Rails application.
For my first rails app, I am wanting to write a page that basically scans IP addresses and returns a list of ones that responded. I want each "scan" to be saved as a job that can be referenced later on, and the job itself tell me if the scan completed or if it is still in progress.
To keep things simple, the first page would have a form with fields for a start IP and an end IP. The IPs I am scanning are Proliant iLOs, so I will be using the ipmiutil command in linux to carry this out. The syntax I'm shooting for would be something similar to (the grep is to just show only the IPv4 addresses that return a response):
ipmiutil discover -b
I don't know of any ipmiutils ruby wrappers out there, so am unsure how to get ruby to execute the ipmiutils command.
The 2nd page would be the "results" page which should show me what has returned, and if possible, if anything is still pending, for the current scan I just executed.
The 3rd page would be a list of jobs that were executed.
So in Rails, I've read guides on generating controllers, views, etc. Would I be correct in saying that I need to first generate a scaffold for my "jobs"? Or do I first begin by simply generating a controller? This is sort of where I'm stuck.
My other question is, in PHP, it's very clear to me how to pass POST values in a form from one page to another, and how to store those in a SESSION if necessary. I'm not 100% certain how this is handled in Rails (though it looks like it would be handled with the controller via routes, correct?). Is the best approach for this application to store POST values in a SESSION in cache?
Thanks for any info - I know this is sort of a non-specific, generalized question (or rather group of questions), but honestly I have no one around me who is a Rails expert, so have no one to ask these types of questions to. I've been reading a lot of material and am currently in the middle of the Agile Web Dev with Rails 5 book, but I need to start applying the things I've read to retain the knowledge, and I keep having questions like these.
In any case, I appreciate any info.