diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 9086200005..ce54da1409 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 6.0dev-150629
+Version: 6.0dev-150630
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh
index 25d1cccdab..845168ee96 100644
--- a/pandora_agents/unix/DEBIAN/make_deb_package.sh
+++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="6.0dev-150629"
+pandora_version="6.0dev-150630"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index c0f48deb0b..44de38aaba 100644
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -41,7 +41,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '6.0dev';
-use constant AGENT_BUILD => '150629';
+use constant AGENT_BUILD => '150630';
# Commands to retrieve total memory information in kB
use constant TOTALMEMORY_CMDS => {
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index 8017c3055b..0e224890f1 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 6.0dev
-%define release 150629
+%define release 150630
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index 1cbfb83477..b270f055ff 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 6.0dev
-%define release 150629
+%define release 150630
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 7bc5f8d7b0..6ee1d31195 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{150629}
+{150630}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 57fd12ac9c..d103f89c3c 100644
--- a/pandora_agents/win32/pandora.cc
+++ b/pandora_agents/win32/pandora.cc
@@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
-#define PANDORA_VERSION ("6.0dev(Build 150629)")
+#define PANDORA_VERSION ("6.0dev(Build 150630)")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index da33e2eab3..f869c74036 100644
--- a/pandora_agents/win32/versioninfo.rc
+++ b/pandora_agents/win32/versioninfo.rc
@@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
- VALUE "ProductVersion", "(6.0dev(Build 150629))"
+ VALUE "ProductVersion", "(6.0dev(Build 150630))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 7cb8b293aa..ab5d9eec5b 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 6.0dev-150629
+Version: 6.0dev-150630
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh
index 99f5ad7e1e..3f3ea6ee80 100644
--- a/pandora_console/DEBIAN/make_deb_package.sh
+++ b/pandora_console/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="6.0dev-150629"
+pandora_version="6.0dev-150630"
package_pear=0
package_pandora=1
diff --git a/pandora_console/extensions/plugin_registration.php b/pandora_console/extensions/plugin_registration.php
index fa960f510d..67ae8bf31e 100644
--- a/pandora_console/extensions/plugin_registration.php
+++ b/pandora_console/extensions/plugin_registration.php
@@ -22,14 +22,29 @@ function pluginreg_extension_main () {
require ("general/noaccess.php");
return;
}
-
+ ui_require_css_file ('firts_task');
ui_print_page_header (__('Plugin registration'), "images/extensions.png", false, "", true, "" );
- echo "
";
- printf(__("This extension makes registration of server plugins more easy. Here you can upload a server plugin in Pandora FMS 3.x zipped format (.pspz). Please refer to documentation on how to obtain and use Pandora FMS Server Plugins.
You can get more plugins in our Public Resource Library") , "http://pandorafms.com/Library/Library/");
- echo "
' .
+ __("This extension makes registration of server plugins more easy.
+ Here you can upload a server plugin in Pandora FMS 3.x zipped format (.pspz).
+ Please refer to documentation on how to obtain and use Pandora FMS Server Plugins.
+
ICMP (pings),
- SNMP (detecting the topology of networks and their interfaces), and other customized
- type. You can define your own customized recon script.'); ?>
-
+
+
diff --git a/pandora_console/general/firts_task/tags.php b/pandora_console/general/firts_task/tags.php
index 23bdaa85e6..ef8c94b652 100755
--- a/pandora_console/general/firts_task/tags.php
+++ b/pandora_console/general/firts_task/tags.php
@@ -3,21 +3,19 @@ global $config;
check_login ();
ui_require_css_file ('firts_task');
?>
-true, 'message'=> __('There are no recon task defined yet.') ) ); ?>
+true, 'message'=> __('There are no tags defined yet.') ) ); ?>
ICMP (pings),
- SNMP (detecting the topology of networks and their interfaces), and other customized
- type. You can define your own customized recon script.'); ?>
-
-
-
+
+
+
-
+
\ No newline at end of file
+ form_upload("");
+
diff --git a/pandora_console/godmode/update_manager/update_manager.php b/pandora_console/godmode/update_manager/update_manager.php
index 45692f9c28..34d99ba324 100644
--- a/pandora_console/godmode/update_manager/update_manager.php
+++ b/pandora_console/godmode/update_manager/update_manager.php
@@ -53,14 +53,14 @@ ui_print_page_header($title,
switch ($tab) {
case 'setup':
- require("update_manager.setup.php");
+ require($config['homedir'] . "/godmode/update_manager/update_manager.setup.php");
break;
case 'offline':
- require("update_manager.offline.php");
+ require($config['homedir'] . "/godmode/update_manager/update_manager.offline.php");
break;
case 'online':
default:
- require("update_manager.online.php");
+ require($config['homedir'] . "/godmode/update_manager/update_manager.online.php");
break;
}
?>
\ No newline at end of file
diff --git a/pandora_console/images/chart_curve_overview.disabled.png b/pandora_console/images/chart_curve_overview.disabled.png
index 268701fc71..c3586c1684 100644
Binary files a/pandora_console/images/chart_curve_overview.disabled.png and b/pandora_console/images/chart_curve_overview.disabled.png differ
diff --git a/pandora_console/images/chart_curve_overview.png b/pandora_console/images/chart_curve_overview.png
index 477e34f252..f8e69bb221 100644
Binary files a/pandora_console/images/chart_curve_overview.png and b/pandora_console/images/chart_curve_overview.png differ
diff --git a/pandora_console/images/csv_grey.png b/pandora_console/images/csv_grey.png
new file mode 100644
index 0000000000..545cc10576
Binary files /dev/null and b/pandora_console/images/csv_grey.png differ
diff --git a/pandora_console/images/csv_grey_disabled.png b/pandora_console/images/csv_grey_disabled.png
new file mode 100644
index 0000000000..9e4175948b
Binary files /dev/null and b/pandora_console/images/csv_grey_disabled.png differ
diff --git a/pandora_console/images/update.png b/pandora_console/images/update.png
new file mode 100644
index 0000000000..d0f2275ac2
Binary files /dev/null and b/pandora_console/images/update.png differ
diff --git a/pandora_console/images/zoom_cross_grey.disabled.png b/pandora_console/images/zoom_cross_grey.disabled.png
new file mode 100644
index 0000000000..2918f35535
Binary files /dev/null and b/pandora_console/images/zoom_cross_grey.disabled.png differ
diff --git a/pandora_console/images/zoom_cross_grey.png b/pandora_console/images/zoom_cross_grey.png
new file mode 100644
index 0000000000..b39f7bcb2c
Binary files /dev/null and b/pandora_console/images/zoom_cross_grey.png differ
diff --git a/pandora_console/include/ajax/update_manager.ajax.php b/pandora_console/include/ajax/update_manager.ajax.php
index e134ba719d..18d52a5d9f 100644
--- a/pandora_console/include/ajax/update_manager.ajax.php
+++ b/pandora_console/include/ajax/update_manager.ajax.php
@@ -15,8 +15,8 @@
global $config;
-require_once("include/functions_update_manager.php");
-require_once("include/functions_graph.php");
+require_once($config['homedir'] . "/include/functions_update_manager.php");
+require_once($config['homedir'] . "/include/functions_graph.php");
enterprise_include_once("include/functions_update_manager.php");
$upload_file = (boolean) get_parameter("upload_file");
@@ -131,7 +131,7 @@ if ($install_package) {
if (file_exists($config["homedir"]."/".$line)) {
rename($config["homedir"]."/".$line, $package."/backup/".$line);
}
- // Tries to move the new file to the Integria directory
+ // Tries to move the new file to the Pandora directory
$dirname = dirname($line);
if (!file_exists($config["homedir"]."/".$dirname)) {
$dir_array = explode("/", $dirname);
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index 2cd087ea8e..7c817e9f1d 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -22,7 +22,7 @@
/**
* Pandora build version and version
*/
-$build_version = 'PC150629';
+$build_version = 'PC150630';
$pandora_version = 'v6.0dev';
// Do not overwrite default timezone set if defined.
diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php
index 9d1e6052cb..947ddb9f5a 100755
--- a/pandora_console/include/functions_api.php
+++ b/pandora_console/include/functions_api.php
@@ -8049,40 +8049,46 @@ function api_get_module_graph($id_module, $thrash2, $other, $thrash4) {
if (defined ('METACONSOLE')) {
return;
}
-
+
if (is_nan($id_module) || $id_module <= 0) {
returnError('error_module_graph', __(''));
return;
}
-
+
$id_exist = (bool) db_get_value ('id_agente_modulo', 'tagente_modulo', 'id_agente_modulo', $id_module);
-
+
if (!$id_exist) {
// returnError('id_not_found');
return;
}
-
- $graph_seconds =(!empty($other) && isset($other['data'])) ? $other['data'] : 3600; // 1 hour by default
-
+
+ $graph_seconds =
+ (!empty($other) && isset($other['data']))
+ ?
+ $other['data']
+ :
+ SECONDS_1HOUR; // 1 hour by default
+
if (is_nan($graph_seconds) || $graph_seconds <= 0) {
// returnError('error_module_graph', __(''));
return;
}
// Get the html item
- $graph_html = grafico_modulo_sparse($id_module, $graph_seconds, false, 600, 300, '',
- '', false, false, true, time(), '', 0, 0, true, true,
- ui_get_full_url(false) . '/', 1, false, '', false, true);
-
+ $graph_html = grafico_modulo_sparse(
+ $id_module, $graph_seconds, false, 600, 300, '',
+ '', false, false, true, time(), '', 0, 0, true, true,
+ ui_get_full_url(false) . '/', 1, false, '', false, true);
+
$graph_image_file_encoded = false;
-
+
// Get the src of the html item
if (preg_match("//", $graph_html, $matches)) {
if (isset($matches) && isset($matches[1])) {
$file_url = $matches[1];
// Get the file
$graph_image_file = file_get_contents($file_url);
-
+
if ($graph_image_file !== false) {
// Encode the file
$graph_image_file_encoded = base64_encode($graph_image_file);
diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php
index c02408f1dd..3d059d0383 100755
--- a/pandora_console/include/functions_reporting.php
+++ b/pandora_console/include/functions_reporting.php
@@ -95,36 +95,43 @@ function reporting_get_name($id_report) {
return db_get_value('name', 'treport', 'id_report', $id_report);
}
-function reporting_make_reporting_data($id_report, $date, $time,
- $period = null, $type = 'dinamic', $force_width_chart = null,
- $force_height_chart = null) {
+function reporting_make_reporting_data($report = null, $id_report,
+ $date, $time, $period = null, $type = 'dinamic',
+ $force_width_chart = null, $force_height_chart = null) {
global $config;
$return = array();
- $report = db_get_row ('treport', 'id_report', $id_report);
+ if (!empty($report)) {
+ $contents = $report['contents'];
+ }
+ else {
+ $report = db_get_row ('treport', 'id_report', $id_report);
+
+ switch ($config["dbtype"]) {
+ case "mysql":
+ $contents = db_get_all_rows_field_filter ("treport_content",
+ "id_report", $id_report, "`order`");
+ break;
+ case "postgresql":
+ $contents = db_get_all_rows_field_filter ("treport_content",
+ "id_report", $id_report, '"order"');
+ break;
+ case "oracle":
+ $contents = db_get_all_rows_field_filter ("treport_content",
+ "id_report", $id_report, '"order"');
+ break;
+ }
+ }
+
+ $datetime = strtotime($date . ' ' . $time);
+ $report["datetime"] = $datetime;
$report["group"] = $report['id_group'];
$report["group_name"] = groups_get_name ($report['id_group']);
$report['contents'] = array();
- $datetime = strtotime($date . ' ' . $time);
- $report["datetime"] = $datetime;
- switch ($config["dbtype"]) {
- case "mysql":
- $contents = db_get_all_rows_field_filter ("treport_content",
- "id_report", $id_report, "`order`");
- break;
- case "postgresql":
- $contents = db_get_all_rows_field_filter ("treport_content",
- "id_report", $id_report, '"order"');
- break;
- case "oracle":
- $contents = db_get_all_rows_field_filter ("treport_content",
- "id_report", $id_report, '"order"');
- break;
- }
- if ($contents === false) {
+ if (empty($contents)) {
return reporting_check_structure_report($report);
}
@@ -477,9 +484,14 @@ function reporting_SLA($report, $content, $type = 'dinamic',
$edge_interval = 10;
- $slas = db_get_all_rows_field_filter (
- 'treport_content_sla_combined',
- 'id_report_content', $content['id_rc']);
+ if (empty($content['subitems'])) {
+ $slas = db_get_all_rows_field_filter (
+ 'treport_content_sla_combined',
+ 'id_report_content', $content['id_rc']);
+ }
+ else {
+ $slas = $content['subitems'];
+ }
if (empty($slas)) {
$return['failed'] = __('There are no SLAs defined');
@@ -929,12 +941,19 @@ function reporting_event_top_n($report, $content, $type = 'dinamic',
$top_n_value = $content['top_n_value'];
$show_graph = $content['show_graph'];
- //Get all the related data
- $sql = sprintf("SELECT id_agent_module, server_name
- FROM treport_content_item
- WHERE id_report_content = %d", $content['id_rc']);
- $tops = db_process_sql ($sql);
+
+ if (empty($content['subitems'])) {
+ //Get all the related data
+ $sql = sprintf("SELECT id_agent_module, server_name
+ FROM treport_content_item
+ WHERE id_report_content = %d", $content['id_rc']);
+
+ $tops = db_process_sql ($sql);
+ }
+ else {
+ $tops = $content['subitems'];
+ }
// Get chart
reporting_set_conf_charts($width, $height, $only_image, $type,
@@ -1727,13 +1746,22 @@ function reporting_exception($report, $content, $type = 'dinamic',
- //Get all the related data
- $sql = sprintf("
- SELECT id_agent_module, server_name, operation
- FROM treport_content_item
- WHERE id_report_content = %d", $content['id_rc']);
- $exceptions = db_process_sql ($sql);
+
+ if (empty($content['subitems'])) {
+ //Get all the related data
+ $sql = sprintf("
+ SELECT id_agent_module, server_name, operation
+ FROM treport_content_item
+ WHERE id_report_content = %d", $content['id_rc']);
+
+ $exceptions = db_process_sql ($sql);
+ }
+ else {
+ $exceptions = $content['subitems'];
+ }
+
+
if ($exceptions === false) {
$return['failed'] = __('There are no Agent/Modules defined');
}
@@ -3729,14 +3757,21 @@ function reporting_availability($report, $content) {
}
- $sql = sprintf("
- SELECT id_agent_module,
- server_name, operation
- FROM treport_content_item
- WHERE id_report_content = %d",
- $content['id_rc']);
+ if (empty($content['subitems'])) {
+ $sql = sprintf("
+ SELECT id_agent_module,
+ server_name, operation
+ FROM treport_content_item
+ WHERE id_report_content = %d",
+ $content['id_rc']);
+
+ $items = db_process_sql ($sql);
+ }
+ else {
+ $items = $content['subitems'];
+ }
- $items = db_process_sql ($sql);
+
$data = array();
@@ -3964,9 +3999,16 @@ function reporting_general($report, $content) {
$return["max"]["agent"] = null;
$return["max"]["module"] = null;
- $generals = db_get_all_rows_filter(
- 'treport_content_item',
- array('id_report_content' => $content['id_rc']));
+ if (empty($content['subitems'])) {
+ $generals = db_get_all_rows_filter(
+ 'treport_content_item',
+ array('id_report_content' => $content['id_rc']));
+ }
+ else {
+ $generals = $content['subitems'];
+ }
+
+
if (empty($generals)) {
$generals = array();
}
diff --git a/pandora_console/include/functions_reports.php b/pandora_console/include/functions_reports.php
index 5b54f46db2..56a889b281 100755
--- a/pandora_console/include/functions_reports.php
+++ b/pandora_console/include/functions_reports.php
@@ -500,7 +500,8 @@ function reports_get_report_types ($template = false, $not_editor = false) {
$types['simple_baseline_graph'] = array('optgroup' => __('Graphs'),
'name' => __('Simple baseline graph'));
if ($not_editor == false)
- $types['automatic_custom_graph'] = array('optgroup' => __('Graphs'),
+ $types['automatic_custom_graph'] = array(
+ 'optgroup' => __('Graphs'),
'name' => __('Custom graph'));
$types['custom_graph'] = array('optgroup' => __('Graphs'),
'name' => __('Custom graph'));
@@ -513,7 +514,7 @@ function reports_get_report_types ($template = false, $not_editor = false) {
$types['sql_graph_hbar'] = array('optgroup' => __('Graphs'),
'name' => __('SQL horizonal bar graph'));
}
- if ($template) {
+ if ($template && !defined('METACONSOLE')) {
$types['automatic_graph'] = array('optgroup' => __('Graphs'),
'name' => __('Automatic combined Graph'));
}
diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js
index 5cbfdd7e8b..a3f22082a6 100644
--- a/pandora_console/include/graphs/flot/pandora.flot.js
+++ b/pandora_console/include/graphs/flot/pandora.flot.js
@@ -797,7 +797,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
}));
$('#menu_cancelzoom_' + graph_id)
- .attr('src', homeurl + '/images/zoom_cross.png');
+ .attr('src', homeurl + '/images/zoom_cross_grey.png');
currentRanges = ranges;
// don't fire event on the overview to prevent eternal loop
@@ -1250,7 +1250,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
}));
$('#menu_cancelzoom_' + graph_id)
- .attr('src', homeurl + '/images/zoom_cross.disabled.png');
+ .attr('src', homeurl + '/images/zoom_cross_grey.disabled.png');
overview.clearSelection();
currentRanges = null;
});
diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php
index 36fbcd6141..d273d930aa 100644
--- a/pandora_console/include/graphs/functions_flot.php
+++ b/pandora_console/include/graphs/functions_flot.php
@@ -299,14 +299,14 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend,
"border: solid 1px #666; ".
"border-bottom: 0px; " .
"padding: 4px 4px 4px 4px'>
- ";
+ ";
if ($threshold) {
$return .= " ";
}
$return .= " ";
// Export buttons
- $return .= " ";
+ $return .= " ";
// Button disabled. This feature works, but seems that is not useful enough to the final users.
//$return .= " ";
diff --git a/pandora_console/include/help/en/help_action_threshold.php b/pandora_console/include/help/en/help_action_threshold.php
index 7faff692f9..cc3884a85c 100755
--- a/pandora_console/include/help/en/help_action_threshold.php
+++ b/pandora_console/include/help/en/help_action_threshold.php
@@ -6,10 +6,16 @@
Action Threshold
-An alert action will not be executed more than once every action_threshold seconds, regardless of the number of times the alert is fired.
-
-For example, if you have configured an action that sends you an email when the alert fires and you don't want to receive more than one email per hour, you can set the action_threshold to 3600.
-
-Bear in mind that the individual action_threshold of an action overrides the global action_threshold of the alert.
-
+An alert action will not be executed more than once every
+action_threshold seconds, regardless of the number of times the alert is
+fired.
+
+
+For example, if you have configured an action that sends you an email
+when the alert fires and you don't want to receive more than one email
+per hour, you can set the action_threshold to 3600.
+
+
+Bear in mind that the individual action_threshold of an action overrides
+the global action_threshold of the alert.
-Una acción de una alerta no se ejecutará más de una vez cada action_threshold segundos, independientemenete del número de veces que se dispare la alerta.
-
-Por ejemplo, si ha configurado una acción que le envía un email cuando la alerta se dispara y no quiere recibir más de un email por hora, puede configurar un action_threshold de 3600.
-
-Tenga en cuenta que el action_threshold individual de una acción tiene precedencia sobre el action_threshold global de una alerta.
-
+Una acción de una alerta no se ejecutará más de una vez cada
+action_threshold segundos, independientemenete del número de veces que
+se dispare la alerta.
+
+
+Por ejemplo, si ha configurado una acción que le envía un email cuando
+la alerta se dispara y no quiere recibir más de un email por hora, puede
+configurar un action_threshold de 3600.
+
+
+Tenga en cuenta que el action_threshold individual de una acción tiene
+precedencia sobre el action_threshold global de una alerta.
diff --git a/pandora_console/include/javascript/pandora_modules.js b/pandora_console/include/javascript/pandora_modules.js
index 1c1b88c27f..86ee03e9d1 100644
--- a/pandora_console/include/javascript/pandora_modules.js
+++ b/pandora_console/include/javascript/pandora_modules.js
@@ -475,7 +475,10 @@ function delete_macro(prefix) {
var $row3 = $('#'+prefix+nrow3).remove();
}
-function new_macro(prefix) {
+// The callback parameter is for a callback function
+// that will receive the 3 rows (function(row1, row2, row3))
+// to edit them before the new_macro function ends.
+function new_macro(prefix, callback) {
$('#delete_macro_button').show();
var next_row = parseInt($('#next_row').html());
@@ -539,6 +542,9 @@ function new_macro(prefix) {
$('#text-field' + next_number + '_value').val('');
$('#radio-field' + next_number + '_hide').val(0);
+ if (typeof callback === 'function')
+ callback($row1, $row2, $row3);
+
function changeTdId() {
switch(this.id) {
case prefix + (nrow1) + '-0':
@@ -677,6 +683,9 @@ function load_plugin_macros_fields(row_model_id) {
add_macro_field(macro, row_model_id);
}
});
+
+ // Add again the hover event to the 'force_callback' elements
+ forced_title_callback();
}
}
});
diff --git a/pandora_console/include/javascript/update_manager.js b/pandora_console/include/javascript/update_manager.js
index b33968aeca..1388bc73f7 100644
--- a/pandora_console/include/javascript/update_manager.js
+++ b/pandora_console/include/javascript/update_manager.js
@@ -1,6 +1,11 @@
var correct_install_progress = true;
-function form_upload () {
+function form_upload (homeurl) {
+ if (typeof homeurl !== 'undefined')
+ homeurl += '/';
+ else
+ homeurl = '';
+
//Thanks to: http://tutorialzine.com/2013/05/mini-ajax-file-upload-form/
var ul = $('#form-offline_update ul');
@@ -18,7 +23,7 @@ function form_upload () {
// Initialize the jQuery File Upload plugin
$('#form-offline_update').fileupload({
- url: 'ajax.php?page=include/ajax/update_manager.ajax&upload_file=true',
+ url: homeurl + 'ajax.php?page=include/ajax/update_manager.ajax&upload_file=true',
// This element will accept file drag/drop uploading
dropZone: $('#drop_file'),
@@ -31,8 +36,8 @@ function form_upload () {
var tpl = $('