Merge remote-tracking branch 'origin/ent-4226-mejoras-plugin-sap' into ent-EDF

Conflicts:
	pandora_console/extras/mr/33.sql
This commit is contained in:
fbsanchez 2019-11-20 18:23:17 +01:00
commit 6996969995
3 changed files with 48 additions and 45 deletions

View File

@ -486,19 +486,6 @@ if ($id_agente) {
$agent_wizard['active'] = false; $agent_wizard['active'] = false;
} }
$is_sap = agents_get_sap_agents($id_agente);
if ($is_sap) {
$saptab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=sap_view&page=1&id_agente='.$id_agente.'">'.html_print_image('images/sap_icon.png', true, ['title' => __('SAP view')]).'</a>';
if ($tab == 'sap_view') {
$saptab['active'] = true;
} else {
$saptab['active'] = false;
}
} else {
$saptab = '';
}
$total_incidents = agents_get_count_incidents($id_agente); $total_incidents = agents_get_count_incidents($id_agente);
@ -545,7 +532,6 @@ if ($id_agente) {
'group' => $grouptab, 'group' => $grouptab,
'gis' => $gistab, 'gis' => $gistab,
'agent_wizard' => $agent_wizard, 'agent_wizard' => $agent_wizard,
'sap_view' => $saptab,
]; ];
} else { } else {
$onheader = [ $onheader = [
@ -561,7 +547,6 @@ if ($id_agente) {
'group' => $grouptab, 'group' => $grouptab,
'gis' => $gistab, 'gis' => $gistab,
'agent_wizard' => $agent_wizard, 'agent_wizard' => $agent_wizard,
'sap_view' => $saptab,
]; ];
} }
@ -708,36 +693,33 @@ if ($id_agente) {
} }
break; break;
case 'sap_view':
$tab_description = '- '.__('SAP view');
$help_header = 'sap_view';
$tab_name = 'SAP View';
break;
default: default:
// Default. // Default.
break; break;
} }
ui_print_page_header( $pure = get_parameter('pure', 0);
agents_get_alias($id_agente), if (!$pure) {
'images/setup.png', ui_print_page_header(
false, agents_get_alias($id_agente),
$help_header, 'images/setup.png',
true, false,
$onheader, $help_header,
false, true,
'', $onheader,
$config['item_title_size_text'], false,
'', '',
ui_print_breadcrums( $config['item_title_size_text'],
[ '',
__('Resources'), ui_print_breadcrums(
__('Manage agents'), [
'<span class="breadcrumb_active">'.$tab_name.'</span>', __('Resources'),
] __('Manage agents'),
) '<span class="breadcrumb_active">'.$tab_name.'</span>',
); ]
)
);
}
} else { } else {
// Create agent. // Create agent.
ui_print_page_header( ui_print_page_header(
@ -2369,10 +2351,6 @@ switch ($tab) {
include 'agent_wizard.php'; include 'agent_wizard.php';
break; break;
case 'sap_view':
include 'general/sap_view.php';
break;
default: default:
if (enterprise_hook('switch_agent_tab', [$tab])) { if (enterprise_hook('switch_agent_tab', [$tab])) {
// This will make sure that blank pages will have at least some // This will make sure that blank pages will have at least some

View File

@ -831,7 +831,7 @@ class Wizard
$first_block_printed = true; $first_block_printed = true;
} }
$output .= '<div class="edit_discovery_info" style="'.$row['style'].'">'; $output .= '<div class="edit_discovery_info '.$row['class'].'" style="'.$row['style'].'">';
foreach ($row['columns'] as $column) { foreach ($row['columns'] as $column) {
$width = isset($column['width']) ? 'width: '.$column['width'].';' : 'width: 100%;'; $width = isset($column['width']) ? 'width: '.$column['width'].';' : 'width: 100%;';

View File

@ -1329,6 +1329,19 @@ if ($config['ehorus_enabled'] && !empty($config['ehorus_custom_field'])
} }
} }
$is_sap = agents_get_sap_agents($id_agente);
if ($is_sap) {
$saptab['text'] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=sap_view&page=1&id_agente='.$id_agente.'">'.html_print_image('images/sap_icon.png', true, ['title' => __('SAP view')]).'</a>';
if ($tab == 'sap_view') {
$saptab['active'] = true;
} else {
$saptab['active'] = false;
}
} else {
$saptab = '';
}
$onheader = [ $onheader = [
'manage' => $managetab, 'manage' => $managetab,
'main' => $maintab, 'main' => $maintab,
@ -1342,6 +1355,8 @@ $onheader = [
'ux_console' => $ux_console_tab, 'ux_console' => $ux_console_tab,
'wux_console' => $wux_console_tab, 'wux_console' => $wux_console_tab,
'url_route_analyzer' => $url_route_analyzer_tab, 'url_route_analyzer' => $url_route_analyzer_tab,
'sap_view' => $saptab,
]; ];
// Added after it exists // Added after it exists
@ -1505,6 +1520,12 @@ switch ($tab) {
$tab_name = $tab_name_extensions; $tab_name = $tab_name_extensions;
break; break;
case 'sap_view':
$tab_description = '- '.__('SAP view');
$help_header = 'sap_view';
$tab_name = 'SAP View';
break;
default: default:
$tab_name = ''; $tab_name = '';
$help_header = ''; $help_header = '';
@ -1612,6 +1633,10 @@ switch ($tab) {
include 'operation/agentes/ehorus.php'; include 'operation/agentes/ehorus.php';
break; break;
case 'sap_view':
include 'general/sap_view.php';
break;
case 'extension': case 'extension':
$found = false; $found = false;
foreach ($config['extensions'] as $extension) { foreach ($config['extensions'] as $extension) {