Merge branch 'ent-12352-integrar-tablas-de-merge-en-el-pandoradb-sql' into 'develop'
add tables merge process pandora_enterprise#12352 See merge request artica/pandorafms!6722
This commit is contained in:
commit
04126c2407
|
@ -1,5 +1,45 @@
|
|||
START TRANSACTION;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `tmerge_error` (
|
||||
`id` int(10) NOT NULL auto_increment,
|
||||
`id_node` int(10) default 0,
|
||||
`phase` int(10) default 0,
|
||||
`step` int(10) default 0,
|
||||
`msg` LONGTEXT default "",
|
||||
`action` text default "",
|
||||
`utimestamp` int(20) unsigned NOT NULL default 0,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
ALTER TABLE `tmerge_error` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `tmerge_steps` (
|
||||
`id` int(10) NOT NULL auto_increment,
|
||||
`id_node` int(10) default 0,
|
||||
`phase` int(10) default 0,
|
||||
`total` int(10) default 0,
|
||||
`step` int(10) default 0,
|
||||
`debug` varchar(1024) default "",
|
||||
`action` varchar(100) default "",
|
||||
`affected` varchar(100) default "",
|
||||
`query` mediumtext default "",
|
||||
`utimestamp` int(20) unsigned NOT NULL default 0,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
ALTER TABLE `tmerge_steps` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `tmerge_queries` (
|
||||
`steps` int(10) NOT NULL auto_increment,
|
||||
`action` varchar(100) default "",
|
||||
`affected` varchar(100) default "",
|
||||
`utimestamp` int(20) unsigned NOT NULL default 0,
|
||||
`query` LONGTEXT NOT NULL default "",
|
||||
PRIMARY KEY (`steps`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
ALTER TABLE `tmerge_queries` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
|
||||
|
||||
-- Update version for plugin oracle
|
||||
UPDATE `tdiscovery_apps` SET `version` = '1.2' WHERE `short_name` = 'pandorafms.oracle';
|
||||
|
||||
|
@ -11,4 +51,4 @@ ALTER TABLE `tusuario` CHANGE COLUMN `metaconsole_data_section` `metaconsole_dat
|
|||
ALTER TABLE `tmensajes` ADD COLUMN `icon_notification` VARCHAR(250) NULL DEFAULT NULL AFTER `url`;
|
||||
|
||||
|
||||
COMMIT;
|
||||
COMMIT;
|
||||
|
|
|
@ -875,8 +875,6 @@ function get_parameterBetweenListValues($name, $values, $default)
|
|||
*
|
||||
* @return mixed Whatever was in that parameter, cleaned however
|
||||
*/
|
||||
|
||||
|
||||
function get_parameter_checkbox($name, $default='')
|
||||
{
|
||||
$sent = get_parameter($name.'_sent', 0);
|
||||
|
@ -2002,8 +2000,6 @@ function index_array($array, $index='id', $value='name')
|
|||
* @param int Id of module type
|
||||
* @return string Graph type, as used in stat_win.php (Graphs launcher)
|
||||
*/
|
||||
|
||||
|
||||
function return_graphtype($id_module_type)
|
||||
{
|
||||
switch ($id_module_type) {
|
||||
|
@ -2360,8 +2356,6 @@ function string2image(
|
|||
* @param string SQL code
|
||||
* @return string SQL code validated (it will return empty if SQL is not ok)
|
||||
**/
|
||||
|
||||
|
||||
function check_sql($sql)
|
||||
{
|
||||
// We remove "*" to avoid things like SELECT * FROM tusuario
|
||||
|
@ -2383,8 +2377,6 @@ function check_sql($sql)
|
|||
*
|
||||
* @return boolean 0 on success exit() on no success
|
||||
*/
|
||||
|
||||
|
||||
function check_login($output=true)
|
||||
{
|
||||
global $config;
|
||||
|
|
|
@ -3258,8 +3258,6 @@ function api_get_group_agent_by_alias($thrash1, $thrash2, $other, $thrash3)
|
|||
*
|
||||
* @param $thrash3 Don't use.
|
||||
*/
|
||||
|
||||
|
||||
function api_get_locate_agent($id, $thrash1, $thrash2, $thrash3)
|
||||
{
|
||||
if (!is_metaconsole()) {
|
||||
|
@ -7273,8 +7271,6 @@ function api_set_tag($id, $thrash1, $other, $thrash3)
|
|||
*
|
||||
* @param type of return json or csv.
|
||||
*/
|
||||
|
||||
|
||||
function api_get_all_planned_downtimes($thrash1, $thrash2, $other, $returnType='json')
|
||||
{
|
||||
global $config;
|
||||
|
@ -7337,8 +7333,6 @@ function api_get_all_planned_downtimes($thrash1, $thrash2, $other, $returnType='
|
|||
*
|
||||
* @param type of return json or csv.
|
||||
*/
|
||||
|
||||
|
||||
function api_get_planned_downtimes_items($thrash1, $thrash2, $other, $returnType='json')
|
||||
{
|
||||
global $config;
|
||||
|
@ -7430,8 +7424,6 @@ function api_get_planned_downtimes_items($thrash1, $thrash2, $other, $returnType
|
|||
*
|
||||
* @param type of return json or csv.
|
||||
*/
|
||||
|
||||
|
||||
function api_set_planned_downtimes_deleted($id, $thrash1, $thrash2, $returnType)
|
||||
{
|
||||
global $config;
|
||||
|
@ -12101,8 +12093,6 @@ function api_set_disable_module($agent_name, $module_name, $other, $thrash4)
|
|||
* @param $thrash3 Don't use.
|
||||
* @param $thrash4 Don't use.
|
||||
*/
|
||||
|
||||
|
||||
function api_set_enable_module($agent_name, $module_name, $other, $thrash4)
|
||||
{
|
||||
if (defined('METACONSOLE')) {
|
||||
|
@ -12169,8 +12159,6 @@ function api_set_enable_module($agent_name, $module_name, $other, $thrash4)
|
|||
|
||||
// http://localhost/pandora_console/include/api.php?op=set&op2=disable_alert&id=c2cea5860613e363e25f4ba185b54fe28f869ff8a5e8bb46343288337c903531&id2=Status&other=Warning%20condition
|
||||
*/
|
||||
|
||||
|
||||
function api_set_disable_alert($agent_name, $module_name, $template_name, $thrash4)
|
||||
{
|
||||
global $config;
|
||||
|
@ -12216,8 +12204,6 @@ function api_set_disable_alert($agent_name, $module_name, $template_name, $thras
|
|||
|
||||
// http://localhost/pandora_console/include/api.php?op=set&op2=disable_alert_alias&id=garfio&id2=Status&other=Warning%20condition
|
||||
*/
|
||||
|
||||
|
||||
function api_set_disable_alert_alias($agent_alias, $module_name, $template_name, $thrash4)
|
||||
{
|
||||
global $config;
|
||||
|
@ -12269,8 +12255,6 @@ function api_set_disable_alert_alias($agent_alias, $module_name, $template_name,
|
|||
|
||||
// http://localhost/pandora_console/include/api.php?op=set&op2=enable_alert&id=garfio&id2=Status&other=Warning%20condition
|
||||
*/
|
||||
|
||||
|
||||
function api_set_enable_alert($agent_name, $module_name, $template_name, $thrash4)
|
||||
{
|
||||
global $config;
|
||||
|
@ -12316,8 +12300,6 @@ function api_set_enable_alert($agent_name, $module_name, $template_name, $thrash
|
|||
|
||||
// http://localhost/pandora_console/include/api.php?op=set&op2=enable_alert_alias&id=garfio&id2=Status&other=Warning%20condition
|
||||
*/
|
||||
|
||||
|
||||
function api_set_enable_alert_alias($agent_alias, $module_name, $template_name, $thrash4)
|
||||
{
|
||||
global $config;
|
||||
|
@ -12369,8 +12351,6 @@ function api_set_enable_alert_alias($agent_alias, $module_name, $template_name,
|
|||
|
||||
// http://localhost/pandora_console/include/api.php?op=set&op2=disable_module_alerts&id=garfio&id2=Status
|
||||
*/
|
||||
|
||||
|
||||
function api_set_disable_module_alerts($agent_name, $module_name, $other, $thrash4)
|
||||
{
|
||||
global $config;
|
||||
|
@ -12449,8 +12429,6 @@ function api_set_disable_module_alerts($agent_name, $module_name, $other, $thras
|
|||
* @param $thrash4 Don't use.
|
||||
* // http://localhost/pandora_console/include/api.php?op=set&op2=enable_module_alerts&id=garfio&id2=Status
|
||||
*/
|
||||
|
||||
|
||||
function api_set_enable_module_alerts($agent_name, $module_name, $other, $thrash4)
|
||||
{
|
||||
global $config;
|
||||
|
@ -13184,7 +13162,7 @@ function api_set_create_event($id, $trash1, $other, $returnType)
|
|||
|
||||
if ($other['data'][21] != '') {
|
||||
$values['event_custom_id'] = $other['data'][21];
|
||||
}else{
|
||||
} else {
|
||||
$values['event_custom_id'] = '';
|
||||
}
|
||||
|
||||
|
@ -13613,8 +13591,6 @@ function api_get_pandora_servers($trash1, $trash2, $other, $returnType)
|
|||
*
|
||||
* @param $thrash3 Don't use.
|
||||
*/
|
||||
|
||||
|
||||
function api_set_enable_disable_agent($id, $thrash2, $other, $thrash3)
|
||||
{
|
||||
if (defined('METACONSOLE')) {
|
||||
|
@ -13699,8 +13675,6 @@ function api_set_enable_disable_agent($id, $thrash2, $other, $thrash3)
|
|||
*
|
||||
* TODO: Add support to events.
|
||||
*/
|
||||
|
||||
|
||||
function api_set_pagerduty_webhook($type, $matchup_path, $tresh2, $return_type)
|
||||
{
|
||||
global $config;
|
||||
|
@ -16808,8 +16782,6 @@ function api_set_reset_agent_counts($id, $thrash1, $thrash2, $thrash3)
|
|||
* api.php?op=get&op2=list_all_user&return_type=json&apipass=1234&user=admin&pass=pandora
|
||||
* @return
|
||||
*/
|
||||
|
||||
|
||||
function api_get_list_all_user($thrash1, $thrash2, $other, $returnType)
|
||||
{
|
||||
global $config;
|
||||
|
@ -16884,8 +16856,6 @@ function api_get_list_all_user($thrash1, $thrash2, $other, $returnType)
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
|
||||
|
||||
function api_get_info_user_name($thrash1, $thrash2, $other, $returnType)
|
||||
{
|
||||
global $config;
|
||||
|
@ -16960,8 +16930,6 @@ function api_get_info_user_name($thrash1, $thrash2, $other, $returnType)
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
|
||||
|
||||
function api_get_filter_user_group($thrash1, $thrash2, $other, $returnType)
|
||||
{
|
||||
global $config;
|
||||
|
@ -17046,8 +17014,6 @@ function api_get_filter_user_group($thrash1, $thrash2, $other, $returnType)
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
|
||||
function api_set_delete_user_permission($thrash1, $thrash2, $other, $returnType)
|
||||
{
|
||||
global $config;
|
||||
|
@ -17105,8 +17071,6 @@ function api_set_delete_user_permission($thrash1, $thrash2, $other, $returnType)
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
|
||||
function api_set_add_permission_user_to_group($thrash1, $thrash2, $other, $returnType)
|
||||
{
|
||||
global $config;
|
||||
|
|
|
@ -183,8 +183,6 @@ function html_f2str($function, $params)
|
|||
*
|
||||
* @return string HTML code if return parameter is true.
|
||||
*/
|
||||
|
||||
|
||||
function html_print_side_layer($params)
|
||||
{
|
||||
global $config;
|
||||
|
@ -4592,8 +4590,6 @@ function html_print_checkbox_switch_extended(
|
|||
*
|
||||
* @return string HTML code if return parameter is true.
|
||||
*/
|
||||
|
||||
|
||||
function html_print_checkbox_switch($name, $value, $checked=false, $return=false, $disabled=false, $script='', $disabled_hidden=false, $class='')
|
||||
{
|
||||
$output = html_print_checkbox_switch_extended($name, $value, (bool) $checked, $disabled, $script, '', true, '', $class);
|
||||
|
|
|
@ -637,6 +637,7 @@ class View extends \HTML
|
|||
* Returns a popup for networkLink viewer.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* phpcs:disable Squiz.Commenting.FunctionCommentThrowTag.Missing
|
||||
*/
|
||||
public function networkLinkPopup()
|
||||
|
|
|
@ -4556,7 +4556,6 @@ PRIMARY KEY (`id`)
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
-- Table `tdemo_data`
|
||||
-- ---------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tdemo_data` (
|
||||
|
@ -4566,6 +4565,7 @@ CREATE TABLE IF NOT EXISTS `tdemo_data` (
|
|||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tpandora_cve`
|
||||
-- ---------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tpandora_cve` (
|
||||
|
@ -4597,7 +4597,6 @@ CREATE TABLE IF NOT EXISTS `tfiles_repo_group` (
|
|||
FOREIGN KEY (`id_file`) REFERENCES tfiles_repo(`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `tmodule_synth`
|
||||
-- -----------------------------------------------------
|
||||
|
@ -4611,4 +4610,47 @@ CREATE TABLE IF NOT EXISTS `tpolicy_modules_synth` (
|
|||
FOREIGN KEY (`id_agent_module_target`) REFERENCES tpolicy_modules(`id`)
|
||||
ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `tmerge_error`
|
||||
-- -----------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tmerge_error` (
|
||||
`id` int(10) NOT NULL auto_increment,
|
||||
`id_node` int(10) default 0,
|
||||
`phase` int(10) default 0,
|
||||
`step` int(10) default 0,
|
||||
`msg` LONGTEXT default "",
|
||||
`action` text default "",
|
||||
`utimestamp` int(20) unsigned NOT NULL default 0,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tmerge_steps`
|
||||
-- ---------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tmerge_steps` (
|
||||
`id` int(10) NOT NULL auto_increment,
|
||||
`id_node` int(10) default 0,
|
||||
`phase` int(10) default 0,
|
||||
`total` int(10) default 0,
|
||||
`step` int(10) default 0,
|
||||
`debug` varchar(1024) default "",
|
||||
`action` varchar(100) default "",
|
||||
`affected` varchar(100) default "",
|
||||
`query` mediumtext default "",
|
||||
`utimestamp` int(20) unsigned NOT NULL default 0,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tmerge_queries`
|
||||
-- ---------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tmerge_queries` (
|
||||
`steps` int(10) NOT NULL auto_increment,
|
||||
`action` varchar(100) default "",
|
||||
`affected` varchar(100) default "",
|
||||
`utimestamp` int(20) unsigned NOT NULL default 0,
|
||||
`query` LONGTEXT NOT NULL default "",
|
||||
PRIMARY KEY (`steps`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
Loading…
Reference in New Issue