mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
Merge branch 'ent-2740-servicios-favoritos' into 'develop'
Ent 2740 servicios favoritos See merge request artica/pandorafms!1781
This commit is contained in:
commit
2f61ba70df
@ -1,5 +1,8 @@
|
||||
START TRANSACTION;
|
||||
|
||||
ALTER TABLE `tservice` ADD COLUMN `is_favourite` tinyint(1) NOT NULL default 0;
|
||||
UPDATE tservice SET `is_favourite` = 1 WHERE `name` REGEXP '^[_|.|\[|\(]';
|
||||
|
||||
ALTER TABLE tlayout_data ADD COLUMN `show_last_value` tinyint(1) UNSIGNED NULL default '0';
|
||||
ALTER TABLE tlayout MODIFY `name` varchar(600) NOT NULL;
|
||||
|
||||
|
@ -1180,13 +1180,13 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned;
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 20);
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 21);
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
|
||||
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
|
||||
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '727');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '728');
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tconfig_os`
|
||||
@ -1278,6 +1278,8 @@ ALTER TABLE `tservice` ADD COLUMN `quiet` tinyint(1) NOT NULL default 0;
|
||||
ALTER TABLE `tservice` ADD COLUMN `cps` int NOT NULL default 0;
|
||||
ALTER TABLE `tservice` ADD COLUMN `cascade_protection` tinyint(1) NOT NULL default 0;
|
||||
ALTER TABLE `tservice` ADD COLUMN `evaluate_sla` int(1) NOT NULL default 0;
|
||||
ALTER TABLE `tservice` ADD COLUMN `is_favourite` tinyint(1) NOT NULL default 0;
|
||||
UPDATE tservice SET `is_favourite` = 1 WHERE `name` REGEXP '^[_|.|\[|\(]';
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tlayout`
|
||||
|
@ -741,8 +741,8 @@ $table_vc->style[0] = 'font-weight: bold';
|
||||
$table_vc->size[0] = '50%';
|
||||
$table_vc->data = array ();
|
||||
|
||||
$vc_favourite_view_array[0] = 'Classic view';
|
||||
$vc_favourite_view_array[1] = 'View of favorites';
|
||||
$vc_favourite_view_array[0] = __('Classic view');
|
||||
$vc_favourite_view_array[1] = __('View of favorites');
|
||||
$table_vc->data[$row][0] = __('Type of view of visual consoles') .
|
||||
ui_print_help_tip(__('Allows you to directly display the list of favorite visual consoles'), true);
|
||||
$table_vc->data[$row][1] = html_print_select($vc_favourite_view_array, 'vc_favourite_view', $config["vc_favourite_view"], '', '', 0, true);
|
||||
@ -750,7 +750,6 @@ $row++;
|
||||
|
||||
$table_vc->data[$row][0] = __('Number of favorite visual consoles to show in the menu') .
|
||||
ui_print_help_tip(__('If the number is 0 it will not show the pull-down menu and maximum 25 favorite consoles'), true);
|
||||
//$table_vc->data[$row][1] = html_print_input_text ('vc_menu_items', $config["vc_menu_items"], '', 5, 5, true);
|
||||
$table_vc->data[$row][1] = "<input type ='number' value=".$config["vc_menu_items"]." size='5' name='vc_menu_items' min='0' max='25'>";
|
||||
$row++;
|
||||
|
||||
@ -763,8 +762,26 @@ $table_vc->data[$row][1] = html_print_input_text ('vc_line_thickness', $config["
|
||||
echo "<fieldset>";
|
||||
echo "<legend>" . __('Visual consoles configuration') . "</legend>";
|
||||
html_print_table ($table_vc);
|
||||
echo "</fieldset>";
|
||||
echo "</fieldset>";
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Services
|
||||
//----------------------------------------------------------------------
|
||||
$table_ser = new stdClass();
|
||||
$table_ser->width = '100%';
|
||||
$table_ser->class = "databox filters";
|
||||
$table_ser->style[0] = 'font-weight: bold';
|
||||
$table_ser->size[0] = '50%';
|
||||
$table_ser->data = array ();
|
||||
|
||||
$table_ser->data['number'][0] = __('Number of favorite services to show in the menu') .
|
||||
ui_print_help_tip(__('If the number is 0 it will not show the pull-down menu and maximum 25 favorite services'), true);
|
||||
$table_ser->data['number'][1] = "<input type ='number' value=".$config["ser_menu_items"]." size='5' name='ser_menu_items' min='0' max='25'>";
|
||||
|
||||
echo "<fieldset>";
|
||||
echo "<legend>" . __('Services configuration') . "</legend>";
|
||||
html_print_table ($table_ser);
|
||||
echo "</fieldset>";
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// OTHER CONFIGURATION
|
||||
|
@ -530,7 +530,7 @@ function config_update_config () {
|
||||
$error_update[] = __('Product name');
|
||||
if (!config_update_value ('rb_copyright_notice', (string) get_parameter ('rb_copyright_notice')))
|
||||
$error_update[] = __('Copyright notice');
|
||||
|
||||
|
||||
if (!config_update_value ('meta_custom_logo', (string) get_parameter ('meta_custom_logo')))
|
||||
$error_update[] = __('Custom logo metaconsole');
|
||||
if (!config_update_value ('meta_custom_logo_white_bg', (string) get_parameter ('meta_custom_logo_white_bg')))
|
||||
@ -545,7 +545,7 @@ function config_update_config () {
|
||||
$error_update[] = __('Custom title2 login metaconsole');
|
||||
if (!config_update_value ('meta_login_background', (string) get_parameter ('meta_login_background')))
|
||||
$error_update[] = __('Login background metaconsole');
|
||||
|
||||
|
||||
if (!config_update_value ('meta_custom_docs_url', (string) get_parameter ('meta_custom_docs_url')))
|
||||
$error_update[] = __('Custom Docs url');
|
||||
if (!config_update_value ('meta_custom_support_url', (string) get_parameter ('meta_custom_support_url')))
|
||||
@ -553,13 +553,16 @@ function config_update_config () {
|
||||
|
||||
if (!config_update_value ('vc_refr', get_parameter('vc_refr')))
|
||||
$error_update[] = __('Default interval for refresh on Visual Console');
|
||||
if (!config_update_value ('vc_favourite_view', (int) get_parameter('vc_favourite_view', 5)))
|
||||
if (!config_update_value ('vc_favourite_view', (int) get_parameter('vc_favourite_view', 0)))
|
||||
$error_update[] = __('Default line favourite_view for the Visual Console');
|
||||
if (!config_update_value ('vc_menu_items', (int) get_parameter('vc_menu_items', 10)))
|
||||
$error_update[] = __('Default line menu items for the Visual Console');
|
||||
if (!config_update_value ('vc_line_thickness', (int) get_parameter('vc_line_thickness')))
|
||||
$error_update[] = __('Default line thickness for the Visual Console');
|
||||
|
||||
if (!config_update_value ('ser_menu_items', (int) get_parameter('ser_menu_items', 10)))
|
||||
$error_update[] = __('Default line menu items for the Services');
|
||||
|
||||
if (!config_update_value ('agent_size_text_small', get_parameter('agent_size_text_small')))
|
||||
$error_update[] = __('Agent size text');
|
||||
if (!config_update_value ('agent_size_text_medium', get_parameter('agent_size_text_medium')))
|
||||
@ -1300,6 +1303,16 @@ function config_process_config () {
|
||||
config_update_value ('meta_custom_title2_login', __('METACONSOLE'));
|
||||
}
|
||||
|
||||
if (!isset($config['vc_favourite_view'])) {
|
||||
config_update_value('vc_favourite_view', 0);
|
||||
}
|
||||
if (!isset($config['vc_menu_items'])) {
|
||||
config_update_value('vc_menu_items', 10);
|
||||
}
|
||||
if (!isset($config['ser_menu_items'])) {
|
||||
config_update_value('ser_menu_items', 10);
|
||||
}
|
||||
|
||||
if (!isset ($config['history_db_enabled'])) {
|
||||
config_update_value ( 'history_db_enabled', false);
|
||||
}
|
||||
@ -2010,7 +2023,7 @@ function config_process_config () {
|
||||
if (!isset($config['ehorus_req_timeout'])) {
|
||||
config_update_value('ehorus_req_timeout', 5);
|
||||
}
|
||||
|
||||
|
||||
/* Finally, check if any value was overwritten in a form */
|
||||
config_update_config();
|
||||
}
|
||||
|
@ -2476,6 +2476,7 @@ CREATE TABLE IF NOT EXISTS `tservice` (
|
||||
`cps` int NOT NULL default 0,
|
||||
`cascade_protection` tinyint(1) NOT NULL default 0,
|
||||
`evaluate_sla` int(1) NOT NULL default 0,
|
||||
`is_favourite` tinyint(1) NOT NULL default 0,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB
|
||||
COMMENT = 'Table to define services to monitor'
|
||||
|
@ -109,10 +109,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
||||
('custom_report_front_logo', 'images/pandora_logo_white.jpg'),
|
||||
('custom_report_front_header', ''),
|
||||
('custom_report_front_footer', ''),
|
||||
('MR', 20),
|
||||
('MR', 21),
|
||||
('identification_reminder', 1),
|
||||
('identification_reminder_timestamp', 0),
|
||||
('current_package_enterprise', '727'),
|
||||
('current_package_enterprise', '728'),
|
||||
('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.0009765625":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'),
|
||||
('custom_docs_logo', 'default_docs.png'),
|
||||
('custom_support_logo', 'default_support.png'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user