Config Wizards Customization Question

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
niebais
Posts: 349
Joined: Tue Apr 13, 2010 2:15 pm

Re: Config Wizards Customization Question

Post by niebais »

Nevermind, the two options:
define("CONFIGWIZARD_MODE_GETSTAGE4OPTS","get_stage4_opts");
define("CONFIGWIZARD_MODE_GETSTAGE5OPTS","get_stage5_opts");

Which should work, do not. :) Any ideas? CONFIGWIZARD_MODE_GETSTATE3OPTS does hide the options like in the example, so just two pages more to go :)
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Config Wizards Customization Question

Post by mguthrie »

Are you looking to hide the whole stage of the wizard, or just the form elements?
User avatar
niebais
Posts: 349
Joined: Tue Apr 13, 2010 2:15 pm

Re: Config Wizards Customization Question

Post by niebais »

I'd like to hide the whole stages.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Config Wizards Customization Question

Post by mguthrie »

Just out of curiousity, did the trick with the hidden "nextstep" input work for skipping stages?

<input type="hidden" name="nextstep" value="commit" />

If not I'll have to dig into the code a little more and create a solution. I don't think we have an argument to skip ahead on stages, but I could be wrong. Our lead developer is out of town this week so I'll have to ask him when he gets back.
User avatar
niebais
Posts: 349
Joined: Tue Apr 13, 2010 2:15 pm

Re: Config Wizards Customization Question

Post by niebais »

I put this in the GETSTAGE3HTML part in the output (<input type="hidden" name="nextstep" value="commit" />) , but it didn't seem to do anything. The only thing that has worked so far is this section:

case CONFIGWIZARD_MODE_GETSTAGE3OPTS:
//hide options for this stage
$result=CONFIGWIZARD_HIDE_OPTIONS;
break;

But that only hid one section and not all the stages. I alsy tried
case CONFIGWIZARD_MODE_GETSTAGE4OPTS: (and also 5)
//hide options for this stage
$result=CONFIGWIZARD_HIDE_OPTIONS;
break;
But this did nothing. I guess we'll just wait for what the lead developer says.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Config Wizards Customization Question

Post by mguthrie »

We may have to do some work on our wizard framework to simplify some of this. I'm not sure the code exists yet to do what you're looking for, but you're definitely not the only person writing custom wizards. I'll put on our development TODO list to document how to create a custom wizard, and maybe we can flesh out some of the features so a simple argument can be passed to skip to a desired stage.
Locked