add checkbox alias_as_name recon task
This commit is contained in:
parent
5a612b3ab6
commit
8bab8bbada
|
@ -1278,3 +1278,8 @@ UPDATE `tmetaconsole_agent` SET tmetaconsole_agent.alias = tmetaconsole_agent.no
|
|||
-- Table `twidget_dashboard`
|
||||
-- ---------------------------------------------------------------------
|
||||
ALTER TABLE twidget_dashboard MODIFY options LONGTEXT NOT NULL default "";
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `trecon_task`
|
||||
-- ---------------------------------------------------------------------
|
||||
ALTER TABLE trecon_task ADD `alias_as_name` int(2) unsigned default '0';
|
|
@ -107,6 +107,7 @@ if ((isset ($_GET["update"])) OR ((isset ($_GET["create"])))) {
|
|||
$resolve_names = (int) get_parameter ("resolve_names", 0);
|
||||
$parent_detection = (int) get_parameter ("parent_detection", 0);
|
||||
$parent_recursion = (int) get_parameter ("parent_recursion", 1);
|
||||
$alias_as_name = (int) get_parameter ("alias_as_name", 0);
|
||||
|
||||
// Get macros
|
||||
$macros = (string) get_parameter ('macros');
|
||||
|
@ -149,7 +150,8 @@ if (isset($_GET["update"])) {
|
|||
'resolve_names' => $resolve_names,
|
||||
'parent_detection' => $parent_detection,
|
||||
'parent_recursion' => $parent_recursion,
|
||||
'macros' => $macros
|
||||
'macros' => $macros,
|
||||
'alias_as_name' => $alias_as_name
|
||||
);
|
||||
|
||||
$where = array('id_rt' => $id);
|
||||
|
@ -209,7 +211,8 @@ if (isset($_GET["create"])) {
|
|||
'resolve_names' => $resolve_names,
|
||||
'parent_detection' => $parent_detection,
|
||||
'parent_recursion' => $parent_recursion,
|
||||
'macros' => $macros
|
||||
'macros' => $macros,
|
||||
'alias_as_name' => $alias_as_name
|
||||
);
|
||||
|
||||
$name = io_safe_output($name);
|
||||
|
|
|
@ -120,10 +120,10 @@ if (isset($_GET["update"]) || (isset($_GET["upd"]))) {
|
|||
$os_detect = $row["os_detect"];
|
||||
$resolve_names = $row["resolve_names"];
|
||||
$os_detect = $row["os_detect"];
|
||||
$resolve_names = $row["resolve_names"];
|
||||
$parent_detection = $row["parent_detection"];
|
||||
$parent_recursion = $row["parent_recursion"];
|
||||
$macros = $row["macros"];
|
||||
$alias_as_name = $row["alias_as_name"];
|
||||
|
||||
$name_script = db_get_value('name',
|
||||
'trecon_script', 'id_recon_script', $id_recon_script);
|
||||
|
@ -168,6 +168,7 @@ elseif (isset($_GET["create"]) || isset($_GET["crt"])) {
|
|||
$parent_detection = 1;
|
||||
$parent_recursion = 5;
|
||||
$macros = '';
|
||||
$alias_as_name = 0;
|
||||
}
|
||||
|
||||
$modify = false;
|
||||
|
@ -370,6 +371,10 @@ $table->data[20][1] = html_print_checkbox ('parent_detection', 1, $parent_detec
|
|||
$table->data[21][0] = "<b>".__('Parent recursion');
|
||||
$table->data[21][1] = html_print_input_text ('parent_recursion', $parent_recursion, '', 5, 0, true) . ui_print_help_tip (__('Maximum number of parent hosts that will be created if parent detection is enabled.'), true);
|
||||
|
||||
// Alias as name
|
||||
$table->data[22][0] = "<b>".__('Alias as Name');
|
||||
$table->data[22][1] = html_print_checkbox ('alias_as_name', 1, $alias_as_name, true);
|
||||
|
||||
// Different Form url if it's a create or if it's a update form
|
||||
echo '<form name="modulo" method="post" action="index.php?sec=gservers&sec2=godmode/servers/manage_recontask&'.(($id_rt != -1) ? 'update='.$id_rt : 'create=1').'">';
|
||||
html_print_table ($table);
|
||||
|
|
|
@ -727,6 +727,7 @@ CREATE TABLE IF NOT EXISTS `trecon_task` (
|
|||
`parent_recursion` tinyint(1) unsigned default '0',
|
||||
`disabled` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
||||
`macros` TEXT,
|
||||
`alias_as_name` tinyint(2) NOT NULL default '0',
|
||||
PRIMARY KEY (`id_rt`),
|
||||
KEY `recon_task_daemon` (`id_recon_server`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
|
Loading…
Reference in New Issue