Fixed pandora_black in metaconsole

This commit is contained in:
Daniel Maya 2022-01-17 10:22:30 +01:00
parent 98660cd0e3
commit e8d3d93f7f
29 changed files with 72 additions and 74 deletions

View File

@ -302,7 +302,7 @@ function mainModuleGroups()
$table->style[0] = 'color: #ffffff; background-color: #373737; font-weight: bolder; min-width: 230px;';
$table->width = '100%';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$background_color = '#333';
} else {
$background_color = '#fff';

View File

@ -42,7 +42,7 @@ function pandora_realtime_graphs()
global $config;
check_login();
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
ui_require_css_file('pandora_black', 'include/styles/', true);
}

View File

@ -98,7 +98,7 @@ function add_component_selection($id_network_component_type)
global $table_simple;
global $config;
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$background_row = 'background-color: #444';
} else {
$background_row = 'background-color: #cfcfcf';

View File

@ -3914,7 +3914,7 @@ function print_SLA_list($width, $action, $idItem=null)
<input id="hidden-id_server" name="id_server" value="" type="hidden">
<?php
// Set autocomplete image.
$autocompleteImage = html_print_image(($config['style'] === 'pandora_black') ? 'images/agent_mc.menu.png' : 'images/search_agent.png', true, false, true);
$autocompleteImage = html_print_image(($config['style'] === 'pandora_black' && !is_metaconsole()) ? 'images/agent_mc.menu.png' : 'images/search_agent.png', true, false, true);
// Params for agent autocomplete input.
$params = [];
$params['show_helptip'] = true;
@ -4004,23 +4004,23 @@ function print_SLA_list($width, $action, $idItem=null)
],
]
);
if (!empty($services_tmp)
&& $services_tmp != ENTERPRISE_NOT_HOOK
if (!empty($services_tmp)
&& $services_tmp != ENTERPRISE_NOT_HOOK
) {
foreach ($services_tmp as $service) {
$check_module_sla = modules_check_agentmodule_exists(
$service['sla_id_module']
);
$check_module_sla_value = modules_check_agentmodule_exists(
$service['sla_value_id_module']
);
if ($check_module_sla
&& $check_module_sla_value
) {
foreach ($services_tmp as $service) {
$check_module_sla = modules_check_agentmodule_exists(
$service['sla_id_module']
);
$check_module_sla_value = modules_check_agentmodule_exists(
$service['sla_value_id_module']
);
if ($check_module_sla
&& $check_module_sla_value
) {
$services[$service['id']] = $service['name'];
}
}
$services[$service['id']] = $service['name'];
}
}
}
echo '<td class="sla_list_service_col">';
echo html_print_select(

View File

@ -116,7 +116,7 @@ $table_remote->data['ehorus_test'] = $row;
// Print.
echo '<div class="center pdd_b_20px">';
echo '<a target="_blank" rel="noopener noreferrer" href="http://ehorus.com">';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
html_print_image('include/ehorus/images/ehorus-logo.png');
} else {
html_print_image('include/ehorus/images/ehorus-logo-grey.png');

View File

@ -473,7 +473,7 @@ class HTML
bool $direct=false
) {
global $config;
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$text_color = 'style="color: white"';
}

View File

@ -3876,7 +3876,7 @@ function agents_get_status_animation($up=true)
$red = 'images/heartbeat_green.gif';
$green = 'images/heartbeat_green.gif';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$red = 'images/heartbeat_green_black.gif';
$green = 'images/heartbeat_green_black.gif';
}

View File

@ -1555,7 +1555,7 @@ function graphic_combined_module(
$long_index = '';
if ($config['style'] === 'pandora_black' && ($params['pdf'] === false || $params['pdf'] === null )
if (($config['style'] === 'pandora_black' && !is_metaconsole()) && ($params['pdf'] === false || $params['pdf'] === null )
) {
$background_color = '#222';
$params['legend_color'] = '#fff';

View File

@ -471,7 +471,7 @@ function html_print_select_groups(
global $config;
$select2_css = 'select2.min';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$select2_css = 'select2_dark.min';
}
@ -777,11 +777,11 @@ function html_print_select(
if ($style === false) {
$styleText = ' ';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$styleText = 'style="color: white"';
}
} else {
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$style .= ' color: white';
}
@ -922,7 +922,7 @@ function html_print_select(
}
$select2 = 'select2.min';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$select2 = 'select2_dark.min';
}
@ -2820,7 +2820,7 @@ function html_print_input_number(array $settings):string
global $config;
$text_color = '';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$text_color = 'style="color: white"';
}
@ -4297,7 +4297,7 @@ function html_print_autocomplete_modules(
$text_color = '';
$module_icon = 'images/search_module.png';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$text_color = 'color: white';
$module_icon = 'images/brick.menu.png';
}
@ -4599,7 +4599,7 @@ function html_print_input($data, $wrapper='div', $input_only=false)
enterprise_include_once('include/functions_metaconsole.php');
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$style = 'style="color: white"';
}
@ -5260,7 +5260,7 @@ function html_print_autocomplete_users_from_integria(
global $config;
$user_icon = 'images/user_green.png';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$user_icon = 'images/header_user.png';
}
@ -5367,7 +5367,7 @@ function html_print_tabs(array $tabs)
$bg_color = '';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$bg_color = 'style="background-color: #222"';
}
@ -5469,7 +5469,7 @@ function html_print_select_search(
$select2_css = 'select2.min';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$select2_css = 'select2_dark.min';
}

View File

@ -122,7 +122,7 @@ function html_do_report_info($report)
{
global $config;
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$background_color = '#222';
} else {
$background_color = '#f5f5f5';

View File

@ -4964,7 +4964,7 @@ function ui_print_agent_autocomplete_input($parameters)
// Default value.
$icon_agent = 'images/search_agent.png';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$text_color = 'style="color: white"';
$icon_agent = 'images/agent_mc.menu.png';
}
@ -5820,7 +5820,7 @@ function ui_print_agent_autocomplete_input($parameters)
$html = '';
$text_color = '';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$text_color = 'color: white';
}

View File

@ -220,7 +220,7 @@ function vbar_graph(
$options['x']['font']['color'] = '#545454';
if ($options['pdf'] === true) {
$options['x']['font']['color'] = '#000';
} else if ($config['style'] === 'pandora_black') {
} else if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$options['x']['font']['color'] = '#fff';
}
}
@ -238,7 +238,7 @@ function vbar_graph(
// Grid color axes x.
if (isset($options['x']['color']) === false) {
$options['x']['color'] = '#ffffff';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$options['x']['color'] = '#222';
}
}
@ -305,7 +305,7 @@ function vbar_graph(
$options['y']['font']['color'] = '#545454';
if ($options['pdf'] === true) {
$options['y']['font']['color'] = '#000';
} else if ($config['style'] === 'pandora_black') {
} else if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$options['y']['font']['color'] = '#fff';
}
}
@ -323,7 +323,7 @@ function vbar_graph(
// Grid color axes y.
if (isset($options['y']['color']) === false) {
$options['y']['color'] = '#ffffff';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$options['y']['color'] = '#222';
}
}
@ -361,7 +361,7 @@ function vbar_graph(
if (isset($options['grid']['color']) === false) {
$options['grid']['color'] = '#ffffff';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$options['grid']['color'] = '#111';
}
}
@ -373,7 +373,7 @@ function vbar_graph(
'#ffffff',
],
];
if ($config['style'] === 'pandora_black' && $ttl === 1) {
if ($config['style'] === 'pandora_black' && !is_metaconsole() && $ttl === 1) {
$options['grid']['backgroundColor'] = [
'colors' => [
'#222',
@ -746,11 +746,11 @@ function hbar_graph(
return generator_chart_to_pdf('hbar', $params);
}
if ($config['style'] === 'pandora_black' && $ttl === 1) {
if ($config['style'] === 'pandora_black' && !is_metaconsole() && $ttl === 1) {
$backgroundColor = '#222';
}
if ($config['style'] === 'pandora_black' && $ttl === 1) {
if ($config['style'] === 'pandora_black' && !is_metaconsole() && $ttl === 1) {
$tick_color = '#fff';
}

View File

@ -202,7 +202,7 @@ function d3_bullet_chart(
$font = array_shift(explode('.', array_pop(explode('/', $font))));
$invert_color = '';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$invert_color = 'filter: invert(100%);';
}

View File

@ -146,7 +146,7 @@ function flot_area_graph(
break;
}
if ($config['style'] === 'pandora_black' && ($params['pdf'] === false || $params['pdf'] === null) && (isset($is_mobile) === false || $is_mobile === false)
if (($config['style'] === 'pandora_black' && !is_metaconsole()) && ($params['pdf'] === false || $params['pdf'] === null) && (isset($is_mobile) === false || $is_mobile === false)
) {
$background_style = '#222';
$params['grid_color'] = '#fff';

View File

@ -512,7 +512,7 @@ class Widget
if (empty($values['background']) === true) {
$values['background'] = '#ffffff';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$values['background'] = '#222222';
}
}

View File

@ -750,7 +750,7 @@ class EventsListWidget extends Widget
$table->data[$i] = $data;
$bg_color = 'background: #E8E8E8;';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$bg_color = 'background: #222;';
}

View File

@ -318,7 +318,7 @@ class ServiceViewWidget extends Widget
// Css Files.
\ui_require_css_file('tree', 'include/styles/', true);
if ($config['style'] == 'pandora_black') {
if ($config['style'] == 'pandora_black' && !is_metaconsole()) {
\ui_require_css_file('pandora_black', 'include/styles/', true);
}

View File

@ -542,7 +542,7 @@ class TreeViewWidget extends Widget
// Css Files.
\ui_require_css_file('tree', 'include/styles/', true);
if ($config['style'] == 'pandora_black') {
if ($config['style'] == 'pandora_black' && !is_metaconsole()) {
\ui_require_css_file('pandora_black', 'include/styles/', true);
}

View File

@ -68,7 +68,7 @@ if (file_exists('../../include/languages/'.$user_language.'.mo')) {
}
echo '<link rel="stylesheet" href="../../include/styles/pandora.css" type="text/css"/>';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
ui_require_css_file('pandora_black', 'include/styles/', true);
}

View File

@ -64,7 +64,7 @@ if (file_exists('../../include/languages/'.$user_language.'.mo')) {
$l10n->load_tables();
}
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
ui_require_css_file('pandora_black', 'include/styles/', true);
}
@ -97,7 +97,7 @@ echo '<link rel="stylesheet" href="../../include/styles/pandora.css" type="text/
?>
</head>
<?php
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
}
?>
<body bgcolor="#ffffff" class='bg_white'>

View File

@ -79,7 +79,7 @@ if (!check_acl_one_of_groups($config['id_user'], $all_groups, 'AR')) {
if ($refresh > 0) {
$query = ui_get_url_refresh(false);
echo '<meta http-equiv="refresh" content="'.$refresh.'; URL='.$query.'" />';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
echo '<link rel="stylesheet" href="../../include/styles/pandora_black.css" type="text/css"/>';
}
}

View File

@ -67,7 +67,7 @@ if (file_exists('../../include/languages/'.$user_language.'.mo')) {
global $config;
echo '<link rel="stylesheet" href="../../include/styles/pandora.css" type="text/css"/>';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
echo '<link rel="stylesheet" href="../../include/styles/pandora_black.css" type="text/css"/>';
}

View File

@ -147,7 +147,7 @@ echo '<td class="tactical_left_column" id="leftcolumn">';
// The status horizontal bars (Global health, Monitor sanity...
// ---------------------------------------------------------------------
$bg_color = 'background-color: #222';
if ($config['style'] !== 'pandora_black') {
if ($config['style'] !== 'pandora_black' && !is_metaconsole()) {
$bg_color = 'background-color: #fff';
}

View File

@ -72,7 +72,7 @@ echo '<title>'.__('Sound Events').'</title>';
</style>
<?php
echo '<link rel="icon" href="../../'.ui_get_favicon().'" type="image/ico" />';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
echo '<link rel="stylesheet" href="../../include/styles/pandora_black.css" type="text/css" />';
} else {
echo '<link rel="stylesheet" href="../../include/styles/pandora.css" type="text/css" />';

View File

@ -225,7 +225,7 @@ $table->data[0][0] .= '<div class="label_select_parent">'.html_print_input_text(
).'</div>';
$integria_logo = 'images/integria_logo_gray.png';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$integria_logo = 'images/integria_logo.svg';
}

View File

@ -394,20 +394,17 @@ if (!$meta) {
$home_screen .= html_print_select($layouts_aux, 'visual_console', $user_info['data_section'], '', '', '', true);
$home_screen .= '</div>';
$home_screen .= html_print_input_text('data_section', $user_info['data_section'], '', 60, 255, true, false);
// User only can change skins if has more than one group.
$skin = '';
if (function_exists('skins_print_select')) {
if (count($usr_groups) > 1) {
$skin = '<div class="label_select"><p class="edit_user_labels">'.__('Skin').': </p>';
$skin .= skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true).'</div>';
}
}
} else {
$home_screen = '';
$skin = '';
}
// User only can change skins if has more than one group.
$skin = '';
if (function_exists('skins_print_select')) {
if (count($usr_groups) > 1) {
$skin = '<div class="label_select"><p class="edit_user_labels">'.__('Skin').': </p>';
$skin .= skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true).'</div>';
}
}
$timezone = '<div class="label_select"><p class="edit_user_labels">'.__('Timezone').ui_print_help_tip(__('The timezone must be that of the associated server.'), true).'</p>';

View File

@ -97,7 +97,7 @@ $visualConsoleData = $visualConsole->toArray();
$visualConsoleName = $visualConsoleData['name'];
$bg_color = '';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$bg_color = 'style="background-color: #222"';
}

View File

@ -269,7 +269,7 @@ if ($pure === false) {
$class_basic_chart = 'basic_chart_min link-create-item';
$class_delete = 'delete_item delete_min';
$class_copy = 'copy_item';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$class_camera = 'camera_min_white link-create-item';
$class_percentile = 'percentile_item_min_white link-create-item';
$class_module_graph = 'graph_min_white link-create-item';
@ -417,7 +417,7 @@ if ($pure === false) {
}
$bg_color = '';
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$bg_color = 'style="background-color: #222"';
}

View File

@ -78,11 +78,12 @@ if (empty($options['background']) === true) {
$options['background'] = '#ffffff';
}
if ($config['style'] === 'pandora_black') {
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$options['background'] = '#222222';
}
} else if ($options['background'] === '#ffffff'
&& $config['style'] === 'pandora_black'
&& !is_metaconsole()
) {
$options['background'] = '#222222';
} else if ($options['background'] === '#222222'