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;
}
$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);
@ -545,7 +532,6 @@ if ($id_agente) {
'group' => $grouptab,
'gis' => $gistab,
'agent_wizard' => $agent_wizard,
'sap_view' => $saptab,
];
} else {
$onheader = [
@ -561,7 +547,6 @@ if ($id_agente) {
'group' => $grouptab,
'gis' => $gistab,
'agent_wizard' => $agent_wizard,
'sap_view' => $saptab,
];
}
@ -708,36 +693,33 @@ if ($id_agente) {
}
break;
case 'sap_view':
$tab_description = '- '.__('SAP view');
$help_header = 'sap_view';
$tab_name = 'SAP View';
break;
default:
// Default.
break;
}
ui_print_page_header(
agents_get_alias($id_agente),
'images/setup.png',
false,
$help_header,
true,
$onheader,
false,
'',
$config['item_title_size_text'],
'',
ui_print_breadcrums(
[
__('Resources'),
__('Manage agents'),
'<span class="breadcrumb_active">'.$tab_name.'</span>',
]
)
);
$pure = get_parameter('pure', 0);
if (!$pure) {
ui_print_page_header(
agents_get_alias($id_agente),
'images/setup.png',
false,
$help_header,
true,
$onheader,
false,
'',
$config['item_title_size_text'],
'',
ui_print_breadcrums(
[
__('Resources'),
__('Manage agents'),
'<span class="breadcrumb_active">'.$tab_name.'</span>',
]
)
);
}
} else {
// Create agent.
ui_print_page_header(
@ -2369,10 +2351,6 @@ switch ($tab) {
include 'agent_wizard.php';
break;
case 'sap_view':
include 'general/sap_view.php';
break;
default:
if (enterprise_hook('switch_agent_tab', [$tab])) {
// This will make sure that blank pages will have at least some

View File

@ -831,7 +831,7 @@ class Wizard
$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) {
$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 = [
'manage' => $managetab,
'main' => $maintab,
@ -1342,6 +1355,8 @@ $onheader = [
'ux_console' => $ux_console_tab,
'wux_console' => $wux_console_tab,
'url_route_analyzer' => $url_route_analyzer_tab,
'sap_view' => $saptab,
];
// Added after it exists
@ -1505,6 +1520,12 @@ switch ($tab) {
$tab_name = $tab_name_extensions;
break;
case 'sap_view':
$tab_description = '- '.__('SAP view');
$help_header = 'sap_view';
$tab_name = 'SAP View';
break;
default:
$tab_name = '';
$help_header = '';
@ -1612,6 +1633,10 @@ switch ($tab) {
include 'operation/agentes/ehorus.php';
break;
case 'sap_view':
include 'general/sap_view.php';
break;
case 'extension':
$found = false;
foreach ($config['extensions'] as $extension) {