diff --git a/pandora_console/extras/mr/26.sql b/pandora_console/extras/mr/26.sql
index ac973eaa52..197a523599 100644
--- a/pandora_console/extras/mr/26.sql
+++ b/pandora_console/extras/mr/26.sql
@@ -11,6 +11,7 @@ CREATE TABLE IF NOT EXISTS `tnetwork_matrix` (
UNIQUE (`source`, `destination`, `utimestamp`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ;
+ALTER TABLE `treport_content` ADD COLUMN `show_extended_events` tinyint(1) default '0';
UPDATE `treport_content` SET type="netflow_summary" WHERE type="netflow_pie" OR type="netflow_statistics";
UPDATE `tnetflow_filter` SET aggregate="dstip" WHERE aggregate NOT IN ("dstip", "srcip", "dstport", "srcport");
@@ -22,4 +23,6 @@ ALTER TABLE tagent_custom_fields ADD COLUMN `combo_values` VARCHAR(255) DEFAULT
ALTER TABLE `treport_content` ADD COLUMN `show_extended_events` tinyint(1) default '0';
+ALTER TABLE `trecon_task` ADD COLUMN `summary` text;
+
COMMIT;
diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
index d678198e97..6e5e2ebcc9 100644
--- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
+++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
@@ -1413,6 +1413,7 @@ ALTER TABLE trecon_task ADD `vlan_enabled` int(2) unsigned default '0';
ALTER TABLE trecon_task ADD `wmi_enabled` tinyint(1) unsigned DEFAULT '0';
ALTER TABLE trecon_task ADD `auth_strings` text;
ALTER TABLE trecon_task ADD `autoconfiguration_enabled` tinyint(1) unsigned default '0';
+ALTER TABLE trecon_task ADD `summary` text;
-- ---------------------------------------------------------------------
-- Table `twidget` AND Table `twidget_dashboard`
diff --git a/pandora_console/general/firts_task/collections.php b/pandora_console/general/firts_task/collections.php
index 269de3ba12..8e27ce6ee3 100755
--- a/pandora_console/general/firts_task/collections.php
+++ b/pandora_console/general/firts_task/collections.php
@@ -22,7 +22,7 @@ ui_require_css_file('firts_task');
__('Collections')]); ?>
-
+
true, 'message' => __('There are no custom
__('Custom Fields')]); ?>
-
+
true, 'message' => __('There are no custom
__('Custom Graphs')]); ?>
-
+
__('Fields Manager')]); ?>
-
+
__('Visual Console')]); ?>
-
+
__('Planned Downtime')]); ?>
-
+
__('Discovery server')]); ?>
-
+
';
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if (isset($config['custom_splash_login'])) {
- html_print_image('enterprise/images/custom_splash_login/'.$config['custom_splash_login'], false, [ 'alt' => 'splash', 'border' => 0, 'title' => $splash_title], false, true);
+ html_print_image('enterprise/images/custom_splash_login/'.$config['custom_splash_login'], false, [ 'alt' => 'splash', 'border' => 0], false, true);
} else {
- html_print_image('enterprise/images/custom_splash_login/splash_image_default.png', false, ['alt' => 'logo', 'border' => 0, 'title' => $splash_title], false, true);
+ html_print_image('enterprise/images/custom_splash_login/splash_image_default.png', false, ['alt' => 'logo', 'border' => 0], false, true);
}
} else {
- html_print_image('images/splash_image_default.png', false, ['alt' => 'logo', 'border' => 0, 'title' => $splash_title], false, true);
+ html_print_image('images/splash_image_default.png', false, ['alt' => 'logo', 'border' => 0], false, true);
}
echo '
';
diff --git a/pandora_console/godmode/servers/discovery.php b/pandora_console/godmode/servers/discovery.php
index 46ee2f8979..d9e19abdff 100755
--- a/pandora_console/godmode/servers/discovery.php
+++ b/pandora_console/godmode/servers/discovery.php
@@ -15,8 +15,6 @@ if (! check_acl($config['id_user'], 0, 'AW')) {
ui_require_css_file('discovery');
-ui_print_page_header(__('Discovery'), '', false, '', true);
-
/**
* Mask class names.
diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php
index 2cedd211d4..610353ebb7 100644
--- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php
+++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php
@@ -96,7 +96,8 @@ class DiscoveryTaskList extends Wizard
]
);
- $this->printHeader();
+ // Header
+ ui_print_page_header(__('Task list'), '', false, '', true, '', false, '', GENERIC_SIZE_TEXT, '', $this->printHeader(true));
// Show redirected messages from discovery.php.
if ($status === 0) {
@@ -432,7 +433,7 @@ class DiscoveryTaskList extends Wizard
// Name task.
$data[1] = '';
if ($task['disabled'] != 2) {
- $data[1] .= '';
- $bc[$i] .= ''.$url['label'];
- $bc[$i++] .= '
';
+ $bc[$i] = '';
+
+ if ($separator_beginning === true) {
+ $bc[$i] .= '';
+ if ($task['utimestamp']) {
$result .= '
';
$result .= ''._('Overall Progress').'
';
$result .= '- ';
$result .= d3_progress_bar(
$id_task,
- 90,
+ ($global_progress < 0) ? 100 : $global_progress,
460,
30,
'#EA5434',
@@ -49,40 +58,104 @@ if ($progress_task_discovery) {
'',
'#FFFFFF',
0,
- 0
- );
-
- $result .= '
';
- $result .= ''.__('Searching devices in').' red a scanear
';
- $result .= '- ';
- $result .= d3_progress_bar(
- $id_task.'_2',
- 30,
- 460,
- 30,
- '#2751E1',
- '%',
- '',
- '#FFFFFF',
0,
0
);
- $result .= '
';
- $result .= ''.__('Summary').'
';
- $result .= '- '.__('Estimated').': total de host
';
- $result .= '- '.__('Discovered').': total de agentes
';
- $result .= '- '.__('Not alive/Not found').': total de agentes 1-2
';
+ if ($global_progress > 0) {
+ switch ($summary['step']) {
+ case STEP_SCANNING:
+ $str = __('Scanning network');
+ break;
+
+ case STEP_AFT:
+ $str = __('Finding AFT connectivity');
+ break;
+
+ case STEP_TRACEROUTE:
+ $str = __('Finding traceroute connectivity');
+ break;
+
+ case STEP_GATEWAY:
+ $str = __('Finding gateway connectivity');
+ break;
+
+ default:
+ $str = __('Searching for devices...');
+ break;
+ }
+
+ $result .= '';
+ $result .= ''.$str.' ';
+ $result .= $summary['c_network_name'];
+ $result .= '
';
+ $result .= '- ';
+ $result .= d3_progress_bar(
+ $id_task.'_detail',
+ $summary['c_network_percent'],
+ 460,
+ 30,
+ '#2751E1',
+ '%',
+ '',
+ '#FFFFFF',
+ 0,
+ 0,
+ 0
+ );
+ $result .= '
';
+ }
+
$result .= '
';
- echo $result;
+ $i = 0;
+ $table = new StdClasS();
+ $table->class = 'databox data';
+ $table->width = '75%';
+ $table->styleTable = 'margin: 2em auto 0;border: 1px solid #ddd;background: white;';
+ $table->rowid = [];
+ $table->data = [];
+
+ // Content.
+ $table->data[$i][0] = '
'.__('Hosts discovered').'';
+ $table->data[$i][1] = '
';
+ $table->data[$i][1] .= $summary['summary']['discovered'];
+ $table->data[$i++][1] .= '';
+
+ $table->data[$i][0] = '
'.__('Alive').'';
+ $table->data[$i][1] = '
';
+ $table->data[$i][1] .= $summary['summary']['alive'];
+ $table->data[$i++][1] .= '';
+
+ $table->data[$i][0] = '
'.__('Not alive').'';
+ $table->data[$i][1] = '
';
+ $table->data[$i][1] .= $summary['summary']['not_alive'];
+ $table->data[$i++][1] .= '';
+
+ $table->data[$i][0] = '
'.__('Responding SNMP').'';
+ $table->data[$i][1] = '
';
+ $table->data[$i][1] .= $summary['summary']['SNMP'];
+ $table->data[$i++][1] .= '';
+
+ $table->data[$i][0] = '
'.__('Responding WMI').'';
+ $table->data[$i][1] = '
';
+ $table->data[$i][1] .= $summary['summary']['WMI'];
+ $table->data[$i++][1] .= '';
+
+ $result .= html_print_table($table, true).'
';
} else {
- // Error.
- ui_print_error_message(
- __('Please, select task')
- );
+ $global_progress = -1;
+ $result .= ui_print_error_message(
+ __('No data to show'),
+ '',
+ true
+ ).'';
}
+ $result_array['status'] = $global_progress;
+ $result_array['html'] = $result;
+
+ echo json_encode($result_array);
return;
}
diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php
index 11609d0c81..7259287d68 100644
--- a/pandora_console/include/class/ConsoleSupervisor.php
+++ b/pandora_console/include/class/ConsoleSupervisor.php
@@ -36,7 +36,7 @@ require_once $config['homedir'].'/include/functions_servers.php';
// Enterprise includes.
enterprise_include_once('include/functions_metaconsole.php');
enterprise_include_once('include/functions_license.php');
-enterprise_include_once('extensions/cron/functions.php');
+enterprise_include_once('include/functions_cron.php');
/**
* Base class to run scheduled tasks in cron extension
diff --git a/pandora_console/include/class/CustomNetScan.class.php b/pandora_console/include/class/CustomNetScan.class.php
index a0f8af019d..7477594637 100644
--- a/pandora_console/include/class/CustomNetScan.class.php
+++ b/pandora_console/include/class/CustomNetScan.class.php
@@ -337,9 +337,15 @@ class CustomNetScan extends Wizard
$task_url = '&task='.$this->task['id_rt'];
}
- $breadcrum[] = [
- 'link' => $run_url.'&wiz=hd',
- 'label' => __('Host & Devices'),
+ $breadcrum = [
+ [
+ 'link' => 'index.php?sec=gservers&sec2=godmode/servers/discovery',
+ 'label' => 'Discovery',
+ ],
+ [
+ 'link' => $run_url.'&wiz=hd',
+ 'label' => __('Host & Devices'),
+ ],
];
for ($i = 0; $i < $this->MAXPAGES; $i++) {
@@ -353,7 +359,9 @@ class CustomNetScan extends Wizard
if ($this->page < $this->MAXPAGES) {
// Avoid to print header out of wizard.
$this->prepareBreadcrum($breadcrum);
- $this->printHeader();
+
+ // Header
+ ui_print_page_header(__('NetScan Custom'), '', false, '', true, '', false, '', GENERIC_SIZE_TEXT, '', $this->printHeader(true));
}
$task_url = '';
@@ -376,7 +384,9 @@ class CustomNetScan extends Wizard
if ($this->page < $this->maxPagesNetScan) {
// Avoid to print header out of wizard.
$this->prepareBreadcrum($breadcrum);
- $this->printHeader();
+
+ // Header
+ ui_print_page_header(__('NetScan Custom'), '', false, '', true, '', false, '', GENERIC_SIZE_TEXT, '', $this->printHeader(true));
}
if (isset($this->page) === true
diff --git a/pandora_console/include/class/ManageNetScanScripts.class.php b/pandora_console/include/class/ManageNetScanScripts.class.php
index 377259478a..f3ca4c92b5 100644
--- a/pandora_console/include/class/ManageNetScanScripts.class.php
+++ b/pandora_console/include/class/ManageNetScanScripts.class.php
@@ -92,9 +92,15 @@ class ManageNetScanScripts extends Wizard
$run_url = 'index.php?sec=gservers&sec2=godmode/servers/discovery';
- $breadcrum[] = [
- 'link' => $run_url.'&wiz=hd',
- 'label' => __('Host & Devices'),
+ $breadcrum = [
+ [
+ 'link' => 'index.php?sec=gservers&sec2=godmode/servers/discovery',
+ 'label' => 'Discovery',
+ ],
+ [
+ 'link' => $run_url.'&wiz=hd',
+ 'label' => __('Host & Devices'),
+ ],
];
for ($i = 0; $i < $this->MAXPAGES; $i++) {
@@ -108,7 +114,9 @@ class ManageNetScanScripts extends Wizard
if ($this->page < $this->MAXPAGES) {
// Avoid to print header out of wizard.
$this->prepareBreadcrum($breadcrum);
- $this->printHeader();
+
+ // Header
+ ui_print_page_header(__('Net scan scripts'), '', false, '', true, '', false, '', GENERIC_SIZE_TEXT, '', $this->printHeader(true));
}
$id_script = get_parameter('id_script', 0);
diff --git a/pandora_console/include/class/NetworkMap.class.php b/pandora_console/include/class/NetworkMap.class.php
index 56ef4ce0f5..bdcde8660d 100644
--- a/pandora_console/include/class/NetworkMap.class.php
+++ b/pandora_console/include/class/NetworkMap.class.php
@@ -212,6 +212,13 @@ class NetworkMap
*/
public $tooltipParams;
+ /**
+ * Shows the map using 100% of height and width if is a widget.
+ *
+ * @var boolean
+ */
+ public $isWidget;
+
/**
* Defines a custom method to parse Graphviz output and generate Graph.
* Function pointer.
@@ -380,6 +387,12 @@ class NetworkMap
$this->noPopUp = $options['no_popup'];
}
+ // Initialize as widget?
+ if (isset($options['widget'])) {
+ $this->isWidget = (bool) $options['widget'];
+ $this->isWidget = true;
+ }
+
// Use a custom parser.
if (isset($options['custom_parser'])) {
$this->customParser = $options['custom_parser'];
@@ -596,10 +609,6 @@ class NetworkMap
$this->idGroup = $this->map['id_group'];
switch ($this->map['source']) {
- case SOURCE_GROUP:
- $this->idGroup = $this->map['source_data'];
- break;
-
case SOURCE_TASK:
$this->idTask = $this->map['source_data'];
break;
@@ -608,6 +617,8 @@ class NetworkMap
$this->network = $this->map['source_data'];
break;
+ case SOURCE_GROUP:
+ // Already load.
default:
// Ignore.
break;
@@ -764,7 +775,9 @@ class NetworkMap
// Empty map returns no data.
$nodes = [];
} else {
- if ($this->mapOptions['map_filter']['dont_show_subgroups'] == 'true') {
+ if ($this->mapOptions['map_filter']['dont_show_subgroups'] === 'true'
+ || $this->mapOptions['map_filter']['dont_show_subgroups'] == 1
+ ) {
// Show only current selected group.
$filter['id_grupo'] = $this->idGroup;
} else {
@@ -2776,6 +2789,10 @@ class NetworkMap
false,
true
);
+
+ $output .= '';
+ $output .= '';
+
return $output;
}
@@ -2999,7 +3016,11 @@ class NetworkMap
$table->data = [];
- $table->data['interface_row']['node_source_interface'] = html_print_label('', 'node_source_interface');
+ $table->data['interface_row']['node_source_interface'] = html_print_label(
+ '',
+ 'node_source_interface',
+ true
+ );
$table->data['interface_row']['interface_source_select'] = html_print_select(
[],
@@ -3023,10 +3044,11 @@ class NetworkMap
$table->data['interface_row']['node_target_interface'] = html_print_label(
'',
- 'node_target_interface'
+ 'node_target_interface',
+ true
);
- $output .= 'br>';
+ $output .= '
mapOptions['width'];
+ $output .= ' ;height:'.$this->mapOptions['height'].'">';
$output .= '';
$output .= '
';
@@ -3321,7 +3347,11 @@ class NetworkMap
// Open networkconsole_id div.
$output .= '
mapOptions['width'].'; height: '.$this->mapOptions['height'].';position: relative; overflow: hidden; background: #FAFAFA">';
+ if ($this->isWidget) {
+ $output .= ' style="width: 100%; height: 100%;position: relative; overflow: hidden; background: #FAFAFA">';
+ } else {
+ $output .= ' style="width: '.$this->mapOptions['width'].'px; height: '.$this->mapOptions['height'].'px;position: relative; overflow: hidden; background: #FAFAFA">';
+ }
$output .= '
';
$output .= '