Broken Import page after installing PA 2.8

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

winter7200
Posts: 17
Joined: Tue Sep 13, 2011 1:12 pm

UPDATE: Re: Broken Import page after installing PA 2.8

Post by winter7200 »

Found the culprit file: global_form.php

Looked where the variables are coming from so I compared them:

Code: Select all


[root@/home/rr]# diff /home/rr/cacti-0.8.7h/include/global_form.php /home/rr/cacti-plugin-arch/files-0.8.7g/include/global_form.php
4c4
<  | Copyright (C) 2004-2011 The Cacti Group                                 |
---
>  | Copyright (C) 2004-2010 The Cacti Group                                 |
25,26c25,27
< if (!defined("VALID_HOST_FIELDS")) {
<       define("VALID_HOST_FIELDS", "(hostname|snmp_community|snmp_username|snmp_password|snmp_auth_protocol|snmp_priv_passphrase|snmp_priv_protocol|snmp_context|snmp_version|snmp_port|snmp_timeout)");
---
> if (!defined('VALID_HOST_FIELDS')) {
>       $string = api_plugin_hook_function('valid_host_fields', '(hostname|snmp_community|snmp_username|snmp_password|snmp_auth_protocol|snmp_priv_passphrase|snmp_priv_protocol|snmp_context|snmp_version|snmp_port|snmp_timeout)');
>       define('VALID_HOST_FIELDS', $string);
80c81
<               "description" => "Choose the method you wish to use to collect data for this Data Input method.",
---
>               "description" => "Choose what type of data input method this is.",
280c281
<               "friendly_name" => "Minimum Value ('U' for No Mimimum)",
---
>               "friendly_name" => "Minimum Value",
288c289
<               "friendly_name" => "Maximum Value ('U' for No Maximum)",
---
>               "friendly_name" => "Maximum Value",
671c672
<               "description" => "Choose the Host Template to use to define the default Graph Templates and Data Queries associated with this Host.",
---
>               "description" => "Choose what type of host, host template this is. The host template will govern what kinds of data should be gathered from this type of host.",
676,683d676
<       "device_threads" => array(
<               "method" => "drop_array",
<               "friendly_name" => "Number of Collection Threads",
<               "description" => "The number of concurrent threads to use for polling this device.  This applies to the Spine poller only.",
<               "value" => "|arg1:device_threads|",
<               "default" => "1",
<               "array" => $device_threads
<               ),
972c965
<               "description" => "Choose the input method for this Data Query.  This input method defines how data is collected for each Host associated with the Data Query.",
---
>               "description" => "Choose what type of host, host template this is. The host template will govern what kinds of data should be gathered from this type of host.",
998c991
<               "description" => "Choose the Graph Template to use for this Data Query Graph Template item.",
---
>               "description" => "Choose what type of host, host template this is. The host template will govern what kinds of data should be gathered from this type of host.",
1202,1244c1195,1197
< $fields_template_import = array(
<       "import_file" => array(
<               "friendly_name" => "Import Template from Local File",
<               "description" => "If the XML file containing template data is located on your local machine, select it here.",
<               "method" => "file"
<               ),
<       "import_text" => array(
<               "method" => "textarea",
<               "friendly_name" => "Import Template from Text",
<               "description" => "If you have the XML file containing template data as text, you can paste it into this box to import it.",
<               "value" => "",
<               "default" => "",
<               "textarea_rows" => "10",
<               "textarea_cols" => "50",
<               "class" => "textAreaNotes"
<               ),
<       "import_rra" => array(
<               "friendly_name" => "Import RRA Settings",
<               "description" => "Choose whether to allow Cacti to import custom RRA settings from imported templates or whether to use the defaults for this installation.",
<               "method" => "radio",
<               "value" => "",
<               "default" => "1",
<               "on_change" => "changeRRA()",
<               "items" => array(
<                       0 => array(
<                               "radio_value" => "1",
<                               "radio_caption" => "Select your RRA settings below (Recommended)"
<                               ),
<                       1 => array(
<                               "radio_value" => "2",
<                               "radio_caption" => "Use custom RRA settings from the template"
<                               ),
<                       )
<               ),
<       "rra_id" => array(
<               "method" => "drop_multi_rra",
<               "friendly_name" => "Associated RRA's",
<               "description" => "Which RRA's to use when entering data (It is recommended that you <strong>deselect unwanted values</strong>).",
<               "form_id" => "",
<               "sql_all" => "select rra.id from rra where id in (1,2,3,4) order by id",
<               ),
<       );
< ?>
---
>
> api_plugin_hook('config_form');
>

Replaced the PA file with default file and was able to import. I am trying to setup a graph now.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest