#6917 metaconsole config changes

This commit is contained in:
Daniel Maya 2021-05-25 09:58:18 +00:00 committed by Daniel Rodriguez
parent f3d6dafad2
commit e6713c2f2c
4 changed files with 49 additions and 9 deletions

View File

@ -11,4 +11,14 @@ ALTER TABLE `talert_snmp_action` ADD COLUMN `al_field18` TEXT NOT NULL AFTER `al
ALTER TABLE `talert_snmp_action` ADD COLUMN `al_field19` TEXT NOT NULL AFTER `al_field18`;
ALTER TABLE `talert_snmp_action` ADD COLUMN `al_field20` TEXT NOT NULL AFTER `al_field19`;
SET @st_oum755 = (SELECT IF(
(SELECT COUNT(*) FROM tconfig WHERE token LIKE 'meta_custom_logo' AND value like 'logo_pandora_metaconsola.png') > 0,
"UPDATE `tconfig` set value = 'pandoraFMS_metaconsole_full.svg' WHERE token LIKE 'meta_custom_logo'",
"SELECT 1"
));
PREPARE pr_oum755 FROM @st_oum755;
EXECUTE pr_oum755;
DEALLOCATE PREPARE pr_oum755;
COMMIT;

View File

@ -1032,6 +1032,14 @@ function config_update_config()
$error_update[] = __('Custom subtitle header');
}
if (!config_update_value('meta_custom_title_header', (string) get_parameter('meta_custom_title_header'))) {
$error_update[] = __('Meta custom title header');
}
if (!config_update_value('meta_custom_subtitle_header', (string) get_parameter('meta_custom_subtitle_header'))) {
$error_update[] = __('Meta custom subtitle header');
}
if (!config_update_value('custom_title1_login', (string) get_parameter('custom_title1_login'))) {
$error_update[] = __('Custom title1 login');
}
@ -1060,10 +1068,6 @@ function config_update_config()
$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'))) {
$error_update[] = __('Custom logo metaconsole (white background)');
}
@ -2291,6 +2295,20 @@ function config_process_config()
config_update_value('custom_logo_collapsed', 'pandora_logo_green_collapsed.png');
}
if (is_metaconsole()) {
if (!isset($config['meta_custom_logo'])) {
config_update_value('meta_custom_logo', 'pandoraFMS_metaconsole_full.svg');
}
if (!isset($config['meta_custom_logo_collapsed'])) {
config_update_value('meta_custom_logo_collapsed', 'pandoraFMS_metaconsole_collapse.svg');
}
if (!isset($config['meta_menu_type'])) {
config_update_value('meta_menu_type', 'classic');
}
}
if (!isset($config['custom_logo_white_bg'])) {
config_update_value('custom_logo_white_bg', 'pandora_logo_head_white_bg.png');
}
@ -2327,6 +2345,14 @@ function config_process_config()
config_update_value('custom_subtitle_header', __('the Flexible Monitoring System'));
}
if (!isset($config['meta_custom_title_header'])) {
config_update_value('meta_custom_title_header', __('PandoraFMS Metaconsole'));
}
if (!isset($config['meta_custom_subtitle_header'])) {
config_update_value('meta_custom_subtitle_header', __('Centralized operation console'));
}
if (!isset($config['custom_title1_login'])) {
config_update_value('custom_title1_login', __('PANDORA FMS'));
}
@ -2359,10 +2385,6 @@ function config_process_config()
config_update_value('meta_custom_support_url', 'https://support.pandorafms.com');
}
if (!isset($config['meta_custom_logo'])) {
config_update_value('meta_custom_logo', 'logo_pandora_metaconsola.png');
}
if (!isset($config['meta_custom_logo_white_bg'])) {
config_update_value('pandora_logo_head_white_bg', 'pandora_logo_head_white_bg.png');
}

View File

@ -1,5 +1,5 @@
div#page {
width: 90% !important;
width: auto;
margin: 0 auto;
}

View File

@ -70,6 +70,14 @@ if (is_ajax() === true) {
}
}
} else {
if ((bool) is_metaconsole() === true) {
echo '<div class="meta_container_dashboard">';
}
// Run.
$cs->run();
if ((bool) is_metaconsole() === true) {
echo '</div>';
}
}