mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
2012-06-06 Vanessa Gil <vanessa.gil@artica.es>
* operation/agentes/exportdata.php operation/agentes/exportdata.csv.php operation/agentes/exportdata.excel.php: Fixed bug export data: If you choose first the type of export, the chosen agent modules are not loaded into the page. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6419 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
e0fabc8d61
commit
46c286b8ea
@ -1,3 +1,11 @@
|
|||||||
|
2012-06-06 Vanessa Gil <vanessa.gil@artica.es>
|
||||||
|
|
||||||
|
* operation/agentes/exportdata.php
|
||||||
|
operation/agentes/exportdata.csv.php
|
||||||
|
operation/agentes/exportdata.excel.php: Fixed bug export
|
||||||
|
data: If you choose first the type of export, the chosen
|
||||||
|
agent modules are not loaded into the page.
|
||||||
|
|
||||||
2012-06-06 Hirofumi Kosaka <kosaka@rworks.jp>
|
2012-06-06 Hirofumi Kosaka <kosaka@rworks.jp>
|
||||||
|
|
||||||
* godmode/agentes/planned_downtime.php: fixed that 'Affect'
|
* godmode/agentes/planned_downtime.php: fixed that 'Affect'
|
||||||
|
@ -48,9 +48,9 @@ $end_date = get_parameter_post ('end_date', 0);
|
|||||||
$start_time = get_parameter_post ('start_time', 0);
|
$start_time = get_parameter_post ('start_time', 0);
|
||||||
$end_time = get_parameter_post ('end_time', 0);
|
$end_time = get_parameter_post ('end_time', 0);
|
||||||
$export_type = get_parameter_post ('export_type', 'data');
|
$export_type = get_parameter_post ('export_type', 'data');
|
||||||
$export_btn = get_parameter_post ('export_btn', 0);
|
$export_btn = get_parameter ('export_btn', 0);
|
||||||
|
|
||||||
if (!empty ($export_btn) && !empty ($module)) {
|
if (!empty ($module)) {
|
||||||
|
|
||||||
// Disable SQL cache
|
// Disable SQL cache
|
||||||
global $sql_cache;
|
global $sql_cache;
|
||||||
@ -165,8 +165,9 @@ if (!empty ($export_btn) && !empty ($module)) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
elseif (!empty ($export_btn) && empty ($module)) {
|
else {
|
||||||
ui_print_error_message (__('No modules specified'));
|
ui_print_error_message (__('No modules specified'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -49,7 +49,7 @@ $end_time = get_parameter_post ('end_time', 0);
|
|||||||
$export_type = get_parameter_post ('export_type', 'data');
|
$export_type = get_parameter_post ('export_type', 'data');
|
||||||
$export_btn = get_parameter_post ('export_btn', 0);
|
$export_btn = get_parameter_post ('export_btn', 0);
|
||||||
|
|
||||||
if (!empty ($export_btn) && !empty ($module)) {
|
if (!empty ($module)) {
|
||||||
|
|
||||||
// Disable SQL cache
|
// Disable SQL cache
|
||||||
global $sql_cache;
|
global $sql_cache;
|
||||||
@ -157,19 +157,9 @@ if (!empty ($export_btn) && !empty ($module)) {
|
|||||||
unset ($output);
|
unset ($output);
|
||||||
$output = "";
|
$output = "";
|
||||||
} // main foreach
|
} // main foreach
|
||||||
echo $dataend;
|
echo $dataend;
|
||||||
|
|
||||||
/*
|
|
||||||
switch ($export_type) {
|
|
||||||
case "excel":
|
|
||||||
exit; // Necesary for CSV export, if not give problems
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
*/
|
else {
|
||||||
|
|
||||||
}
|
|
||||||
elseif (!empty ($export_btn) && empty ($module)) {
|
|
||||||
ui_print_error_message (__('No modules specified'));
|
ui_print_error_message (__('No modules specified'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +125,6 @@ if (is_ajax ()) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Load global vars
|
// Load global vars
|
||||||
require_once ("include/config.php");
|
require_once ("include/config.php");
|
||||||
require_once ("include/functions_agents.php");
|
require_once ("include/functions_agents.php");
|
||||||
@ -166,7 +165,7 @@ $end_date = get_parameter_post ('end_date', 0);
|
|||||||
$start_time = get_parameter_post ('start_time', 0);
|
$start_time = get_parameter_post ('start_time', 0);
|
||||||
$end_time = get_parameter_post ('end_time', 0);
|
$end_time = get_parameter_post ('end_time', 0);
|
||||||
$export_type = get_parameter_post ('export_type', 'data');
|
$export_type = get_parameter_post ('export_type', 'data');
|
||||||
$export_btn = get_parameter_post ('export_btn', 0);
|
$export_btn = get_parameter ('export_btn', 0);
|
||||||
|
|
||||||
if (!empty ($export_btn) && !empty ($module)) {
|
if (!empty ($export_btn) && !empty ($module)) {
|
||||||
|
|
||||||
@ -285,7 +284,7 @@ elseif (!empty ($export_btn) && empty ($module)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (empty($export_btn)) {
|
if (empty($export_btn)) {
|
||||||
echo '<form method="post" action="index.php?sec=reporting&sec2=operation/agentes/exportdata" name="export_form">';
|
echo '<form method="post" action="index.php?sec=reporting&sec2=operation/agentes/exportdata" name="export_form" id="export_form">';
|
||||||
|
|
||||||
$table->width = '98%';
|
$table->width = '98%';
|
||||||
$table->border = 0;
|
$table->border = 0;
|
||||||
@ -369,8 +368,8 @@ if (empty($export_btn)) {
|
|||||||
html_print_table ($table);
|
html_print_table ($table);
|
||||||
|
|
||||||
// Submit button
|
// Submit button
|
||||||
echo '<div class="action-buttons" style="width:80%;">';
|
echo '<div class="action-buttons" style="width:98%;">';
|
||||||
html_print_submit_button (__('Export'), 'export_btn', $disabled_export_button, 'class="sub wand"');
|
html_print_button (__('Export'), 'export_btn', $disabled_export_button, 'change_action()', 'class="sub wand"');
|
||||||
echo '</div></form>';
|
echo '</div></form>';
|
||||||
}
|
}
|
||||||
ui_require_jquery_file ('pandora.controls');
|
ui_require_jquery_file ('pandora.controls');
|
||||||
@ -460,13 +459,13 @@ $(document).ready (function () {
|
|||||||
//Force to style of items
|
//Force to style of items
|
||||||
$(".ui-autocomplete").css("text-align", "left");
|
$(".ui-autocomplete").css("text-align", "left");
|
||||||
}
|
}
|
||||||
|
|
||||||
$("select#export_type").trigger('change');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("select#export_type").change (function () {
|
function change_action() {
|
||||||
type = $("#export_type").val();
|
type = $("#export_type").val();
|
||||||
var f = document.forms.export_form;
|
var f = document.forms.export_form;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'csv':
|
case 'csv':
|
||||||
f.action = "operation/agentes/exportdata.csv.php";
|
f.action = "operation/agentes/exportdata.csv.php";
|
||||||
@ -476,10 +475,11 @@ $("select#export_type").change (function () {
|
|||||||
break;
|
break;
|
||||||
case 'avg':
|
case 'avg':
|
||||||
case 'data':
|
case 'data':
|
||||||
f.action = "index.php?sec=reporting&sec2=operation/agentes/exportdata";
|
f.action = "index.php?sec=reporting&sec2=operation/agentes/exportdata&export_btn=1";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
$("#export_form").submit();
|
||||||
|
}
|
||||||
|
|
||||||
function submit_group() {
|
function submit_group() {
|
||||||
var f = document.forms.export_form;
|
var f = document.forms.export_form;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user