This commit is contained in:
cesar991 2016-08-17 17:15:44 +02:00
commit b78ffe0576
10 changed files with 40 additions and 20 deletions

View File

@ -277,7 +277,7 @@ function extension_db_check_tables_differences($connection_test,
ui_print_info_message(
__('You can execute this SQL query for to fix.') . "<br />" .
'<pre>' .
"ALTER TABLE " . $table . " MODIFY COLUMN " . $field . " " . $value . ";" .
"ALTER TABLE " . $table . " MODIFY COLUMN " . $name_field . " " . $value . ";" .
'</pre>'
);
break;
@ -289,7 +289,7 @@ function extension_db_check_tables_differences($connection_test,
ui_print_info_message(
__('You can execute this SQL query for to fix.') . "<br />" .
'<pre>' .
"ALTER TABLE " . $table . " MODIFY COLUMN " . $field . "INT NULL;" .
"ALTER TABLE " . $table . " MODIFY COLUMN " . $name_field . "INT NULL;" .
'</pre>'
);
}
@ -297,7 +297,7 @@ function extension_db_check_tables_differences($connection_test,
ui_print_info_message(
__('You can execute this SQL query for to fix.') . "<br />" .
'<pre>' .
"ALTER TABLE " . $table . " MODIFY COLUMN " . $field . "INT NOT NULL;" .
"ALTER TABLE " . $table . " MODIFY COLUMN " . $name_field . "INT NOT NULL;" .
'</pre>'
);
}

View File

@ -46,3 +46,9 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '3
-- Table `tplanned_downtime_agents`
-- ---------------------------------------------------------------------
ALTER TABLE tplanned_downtime_agents ADD COLUMN `manually_disabled` tinyint(1) DEFAULT 0;
-- ---------------------------------------------------------------------
-- Table `tlink`
-- ---------------------------------------------------------------------
UPDATE `tlink` SET `link` = 'http://library.pandorafms.com/' WHERE `name` = 'Module library';

View File

@ -46,3 +46,8 @@ INSERT INTO tconfig (token, value) VALUES ('days_autodisable_deletion', '30');
-- Table `tplanned_downtime_agents`
-- ---------------------------------------------------------------------
ALTER TABLE tplanned_downtime_agents ADD COLUMN manually_disabled NUMBER(5, 0) DEFAULT 0;
-- ---------------------------------------------------------------------
-- Table `tlink`
-- ---------------------------------------------------------------------
UPDATE tlink SET link = 'http://library.pandorafms.com/' WHERE name = 'Module library';

View File

@ -29,9 +29,17 @@ require_once ('include/functions_servers.php');
$search_string = io_safe_output(urldecode(trim(get_parameter ("search_string", ""))));
global $policy_page;
if (!isset($policy_page))
$policy_page = false;
// Search string filter form
//echo '<form id="create_module_type" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=module&id_agente='.$id_agente.'">';
echo '<form id="create_module_type" method="post" action="'.$url.'">';
if (($policy_page) || (isset($agent)))
echo '<form id="" method="post" action="">';
else
echo '<form id="create_module_type" method="post" action="'.$url.'">';
echo '<table width="100%" cellpadding="2" cellspacing="2" class="databox filters" >';
echo "<tr><td class='datos' style='width:20%; font-weight: bold;'>";
echo __('Search') . ' ' .
@ -41,7 +49,7 @@ echo "<td class='datos' style='width:20%'>";
html_print_submit_button (__('Filter'), 'filter', false, 'class="sub search"');
echo "</td>";
echo "<td class='datos' style='width:20%'></td>";
//echo '</form>';
echo '</form>';
// Check if there is at least one server of each type available to assign that
// kind of modules. If not, do not show server type in combo
@ -92,15 +100,8 @@ if (strstr($sec2, "enterprise/godmode/policies/policies") !== false) {
unset($modules['predictionserver']);
}
global $policy_page;
if (!isset($policy_page))
$policy_page = false;
$show_creation = false;
echo "</form>";
if (($policy_page) || (isset($agent))) {
if ($policy_page) {
$show_creation = true;

View File

@ -270,6 +270,7 @@ if (isset($_GET["create"])) {
// --------------------------------
//Pandora Admin must see all columns
if (! check_acl ($config['id_user'], 0, "PM")) {
$sql = sprintf('SELECT *
FROM trecon_task RT, tusuario_perfil UP
WHERE
@ -309,11 +310,13 @@ if ($result !== false) {
// Network recon task
$data[2] = html_print_image ("images/network.png", true, array ("title" => __('Network recon task')))."&nbsp;&nbsp;";
$data[2] .= network_profiles_get_name ($row["id_network_profile"]);
$mode_name = '';
}
else {
// APP recon task
$data[2] = html_print_image ("images/plugin.png", true). "&nbsp;&nbsp;";
$data[2] .= db_get_sql (sprintf("SELECT name FROM trecon_script WHERE id_recon_script = %d", $row["id_recon_script"]));
$mode_name = db_get_sql (sprintf("SELECT name FROM trecon_script WHERE id_recon_script = %d", $row["id_recon_script"]));
$data[2] .= $mode_name;
}
@ -355,8 +358,13 @@ if ($result !== false) {
if (in_array($task_group, $user_groups_w)){
$data[8] = '<a href="index.php?sec=estado&sec2=operation/servers/recon_view">' . html_print_image("images/eye.png", true) . '</a>';
$data[8] .= '<a href="index.php?sec=gservers&sec2=godmode/servers/manage_recontask&delete='.$row["id_rt"].'">' . html_print_image("images/cross.png", true, array("border" => '0')) . '</a>';
$data[8] .= '<a href="index.php?sec=gservers&sec2=godmode/servers/manage_recontask_form&update='.$row["id_rt"].'">' .html_print_image("images/config.png", true) . '</a>';
if($mode_name != 'IPAM Recon'){
$data[8] .= '<a href="index.php?sec=gservers&sec2=godmode/servers/manage_recontask_form&update='.$row["id_rt"].'">' .html_print_image("images/config.png", true) . '</a>';
} else {
$sql_ipam = 'select id from tipam_network where id_recon_task =' . $row["id_rt"];
$id_recon_ipam = db_get_sql($sql_ipam);
$data[8] .= '<a href="index.php?sec=godmode/extensions&sec2=enterprise/extensions/ipam&action=edit&id=' . $id_recon_ipam . '">' . html_print_image("images/config.png", true) . '</a>';
}
if($row["disabled"] == 0) {
$data[8] .= '<a href="index.php?sec=gservers&sec2=godmode/servers/manage_recontask&id='.$row["id_rt"].'&disabled=1">' .html_print_image("images/lightbulb.png", true) . '</a>';
}

View File

@ -248,7 +248,7 @@ $table->data[4][0] = "<b>".__('Interval');
$table->data[4][0] .= ui_print_help_tip (__('Manual interval means that it will be executed only On-demand'), true);
$values = array (0 => __('Defined'), 1 => __('Manual'));
$table->data[4][1] = html_print_select ($values, "interval_manual_defined", (int)($interval == 0), '','','',true);
$table->data[4][1] = html_print_select ($values, "interval_manual_defined", (int)($interval === 0), '','','',true);
$table->data[4][1] .= '<span id="interval_manual_container">';
$table->data[4][1] .= html_print_extended_select_for_time ('interval' , $interval, '', '', '0', false, true, false, false);

View File

@ -241,7 +241,7 @@ INSERT INTO tlink VALUES (1,'Pandora FMS Manual','http://wiki.pandorafms.com/?ti
INSERT INTO tlink VALUES (2,'Pandora FMS','http://pandorafms.com');
INSERT INTO tlink VALUES (3,'Report a bug','{https://sourceforge.net/tracker/?func=add&amp;group_id=155200&amp;atid=794852}');
INSERT INTO tlink VALUES (4,'Suggest new feature','http://sourceforge.net/tracker/?group_id=155200&amp;atid=794855');
INSERT INTO tlink VALUES (5,'Module library','http://pandorafms.com/pandora/repository/en');
INSERT INTO tlink VALUES (5,'Module library','http://library.pandorafms.com/');
-- Update curr val of sequence
update_currval('tlink', 'id_link');

View File

@ -209,7 +209,7 @@ INSERT INTO "tlink" VALUES
(2,'Pandora FMS','http://pandorafms.com'),
(3,'Report a bug','https://sourceforge.net/tracker/?func=add&amp;group_id=155200&amp;atid=794852'),
(4,'Suggest new feature','http://sourceforge.net/tracker/?group_id=155200&amp;atid=794855'),
(5,'Module library','http://pandorafms.com/pandora/repository/en');
(5,'Module library','http://library.pandorafms.com/');
COMMIT WORK;
SELECT setval('tlink_id_link_seq', (SELECT (SELECT MAX(id_link) FROM tlink)));

View File

@ -199,7 +199,7 @@ INSERT INTO `tlink` VALUES
(2,'Pandora FMS','http://pandorafms.com'),
(3,'Report a bug','https://sourceforge.net/tracker/?func=add&amp;group_id=155200&amp;atid=794852'),
(4,'Suggest new feature','http://sourceforge.net/tracker/?group_id=155200&amp;atid=794855'),
(5,'Module library','http://pandorafms.com/pandora/repository/en');
(5,'Module library','http://library.pandorafms.com/');
UNLOCK TABLES;

View File

@ -97,7 +97,7 @@ def create_data_server_module(driver,module_name,agent_name=None,type_of_module=
driver.find_element_by_xpath('//ul[@class="mn"]/li/a/img[@data-title="Modules"]').click()
Select(driver.find_element_by_id("moduletype")).select_by_visible_text("Create a new data server module")
driver.find_element_by_xpath('//*[@id="create_module_type"]/table/tbody/tr/td[5]/input').click()
driver.find_element_by_xpath('//*[@id="main"]/form/table/tbody/tr/td[5]/input').click()
driver.find_element_by_xpath('//a[contains(.,"Advanced options")]').click()