Page 1 of 1

custom wizard hostgroups

Posted: Thu Nov 21, 2013 1:01 pm
by iivanyi
Hello,

I've created a wizard based on the linux-server wizard, and I'm trying to figure out how to set the default contacts and hostgroups to be ones I specify.

I believe I need to look at the templates sub-dir, but I'm unsure what I need to do here.

Would someone be able to point me in the right direction?

Regards

Re: custom wizard hostgroups

Posted: Thu Nov 21, 2013 1:16 pm
by abrist
The wizard should use a template. You should find many "use" vars in the different arrays for the services in the php. For example:

Code: Select all

  if(!host_exists($hostname)){
        $objs[]=array(
              "type" => OBJECTTYPE_HOST,
              "use" => "xiwizard_linuxserver_host",
              "host_name" => $hostname,
              "address" => $hostaddress,
              "icon_image" => $icon,
              "statusmap_image" => $icon,
              "_xiwizard" => $wizard_name,
         );
  }
The important part is:

Code: Select all

   "use" => "xiwizard_linuxserver_host",
As it defines the template for the object to use: "xiwizard_linuxserver_host"