New maps in progress... (Fixed error in source data)

This commit is contained in:
Arturo Gonzalez 2016-04-12 09:18:14 +02:00
parent 21adfa79b8
commit 0f76fdde49
2 changed files with 7 additions and 15 deletions

View File

@ -38,7 +38,7 @@ if ($create_networkmap) {
$height = 800;
$source_period = 60 * 5;
$source = MAP_SOURCE_GROUP;
$source_data = "";
$source_data = '';
$generation_method = MAP_GENERATION_CIRCULAR;
// Filters
@ -84,12 +84,7 @@ if ($edit_networkmap) {
$height = $values['height'];
$source_period = $values['source_period'];
$source = $values['source'];
if ($source == 'group') {
$source_data = $values['source_data'];
}
else {
$source_data = $values['source_data'];
}
$source_data = $values['source_data'];
$generation_method = $values['generation_method'];
$filter = json_decode($values['filter'], true);
@ -106,8 +101,6 @@ if ($edit_networkmap) {
}
}
//+++++++++++++++TABLE TO CREATE/EDIT NETWORKMAP++++++++++++++++++++++
$buttons['list'] = array('active' => false,
@ -231,7 +224,6 @@ else {
echo '</fieldset>';
$table->data = array();
// ----- Filter configuration --------------------------------------
$table->data["filter_by_tag"][0] = __('Filter by tags');

View File

@ -131,13 +131,13 @@ if ($save_networkmap) {
$name = (string) get_parameter('name', "");
$description = (string) get_parameter('description', "");
$source_period = (int) get_parameter('source_period', 60 * 5);
$source_data = (string) get_parameter('source_data', MAP_SOURCE_GROUP);
switch ($source_data) {
$source = (int) get_parameter('source', MAP_SOURCE_GROUP);
switch ($source) {
case MAP_SOURCE_GROUP:
$source = (string) get_parameter('source_group', 0);
$source_data = (string) get_parameter('source_group', '');
break;
case MAP_SOURCE_IP_MASK:
$source = (string) get_parameter('source_ip_mask', 0);
$source_data = (string) get_parameter('source_ip_mask', '');
break;
}
$width = (int) get_parameter('width', 800);
@ -259,7 +259,7 @@ else if ($delete_networkmap || $duplicate_networkmap || $update_networkmap) {
$description = (string) get_parameter('description', "");
$source_period = (int) get_parameter('source_period', 60 * 5);
$source = (int) get_parameter('source', MAP_SOURCE_GROUP);
$source_data = (string) get_parameter('source_data', 'group');
$source_data = (string) get_parameter('source_data', '');
$width = (int) get_parameter('width', 800);
$height = (int) get_parameter('height', 800);