mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-09-25 19:09:08 +02:00
Download wait message
This commit is contained in:
parent
e0afcd0b85
commit
718be360d5
@ -124,6 +124,8 @@ if (!empty($groups)) {
|
|||||||
if (!empty($downtimes)) {
|
if (!empty($downtimes)) {
|
||||||
ob_clean();
|
ob_clean();
|
||||||
// Show contentype header
|
// Show contentype header
|
||||||
|
// Set cookie for download control.
|
||||||
|
setDownloadCookieToken();
|
||||||
header('Content-type: text/csv');
|
header('Content-type: text/csv');
|
||||||
header('Content-Disposition: attachment; filename="pandora_planned_downtime_'.date('Y/m/d H:i:s').'.csv"');
|
header('Content-Disposition: attachment; filename="pandora_planned_downtime_'.date('Y/m/d H:i:s').'.csv"');
|
||||||
|
|
||||||
@ -161,7 +163,7 @@ if (!empty($downtimes)) {
|
|||||||
if (!empty($downtime_agents)) {
|
if (!empty($downtime_agents)) {
|
||||||
foreach ($downtime_agents as $downtime_agent) {
|
foreach ($downtime_agents as $downtime_agent) {
|
||||||
$downtime_items = [];
|
$downtime_items = [];
|
||||||
$downtime_items[] = $downtime_agent[alias];
|
$downtime_items[] = $downtime_agent['alias'];
|
||||||
|
|
||||||
if (!$downtime_agent['all_modules']) {
|
if (!$downtime_agent['all_modules']) {
|
||||||
$agent_id = $downtime_agent['agent_id'];
|
$agent_id = $downtime_agent['agent_id'];
|
||||||
|
@ -907,7 +907,7 @@ if ($downtimes === false && $filter_performed === false) {
|
|||||||
__('Export to CSV'),
|
__('Export to CSV'),
|
||||||
'csv_export',
|
'csv_export',
|
||||||
false,
|
false,
|
||||||
'location.href="godmode/agentes/planned_downtime.export_csv.php?'.$filter_params_str.'"',
|
'blockResubmit($(this)); location.href=\'godmode/agentes/planned_downtime.export_csv.php?'.$filter_params_str.'\'',
|
||||||
'class="sub next"'
|
'class="sub next"'
|
||||||
);
|
);
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
@ -189,6 +189,8 @@ if ($export_profile) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set cookie for download control.
|
||||||
|
setDownloadCookieToken();
|
||||||
// Send headers to tell the browser we're sending a file
|
// Send headers to tell the browser we're sending a file
|
||||||
header('Content-type: application/octet-stream');
|
header('Content-type: application/octet-stream');
|
||||||
header('Content-Disposition: attachment; filename='.preg_replace('/\s/', '_', $profile_info['name']).'.csv');
|
header('Content-Disposition: attachment; filename='.preg_replace('/\s/', '_', $profile_info['name']).'.csv');
|
||||||
@ -285,7 +287,7 @@ foreach ($result as $row) {
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
$data[3] = '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&delete_profile=1&delete_profile='.$row['id_np'].'" '.'onclick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>';
|
$data[3] = '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&delete_profile=1&delete_profile='.$row['id_np'].'" '.'onclick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>';
|
||||||
$data[3] .= '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&export_profile='.$row['id_np'].'">'.html_print_image('images/csv.png', true, ['title' => __('Export to CSV'), 'class' => 'invert_filter']).'</a>';
|
$data[3] .= '<a onclick="blockResubmit($(this))" href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&export_profile='.$row['id_np'].'">'.html_print_image('images/csv.png', true, ['title' => __('Export to CSV'), 'class' => 'invert_filter']).'</a>';
|
||||||
|
|
||||||
array_push($table->data, $data);
|
array_push($table->data, $data);
|
||||||
}
|
}
|
||||||
|
@ -143,6 +143,7 @@ class Diagnostics extends Wizard
|
|||||||
[
|
[
|
||||||
'title' => __('Export to PDF'),
|
'title' => __('Export to PDF'),
|
||||||
'class' => 'invert_filter',
|
'class' => 'invert_filter',
|
||||||
|
'onclick' => 'blockResubmit($(this))',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
$header_buttons = [
|
$header_buttons = [
|
||||||
|
@ -86,6 +86,9 @@ if (!empty($module)) {
|
|||||||
while (@ob_end_clean()) {
|
while (@ob_end_clean()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set cookie for download control.
|
||||||
|
setDownloadCookieToken();
|
||||||
|
|
||||||
header('Content-type: application/octet-stream');
|
header('Content-type: application/octet-stream');
|
||||||
header('Content-Disposition: attachment; filename=export_'.date('Ymd', $start).'_'.date('Ymd', $end).'.'.$extension);
|
header('Content-Disposition: attachment; filename=export_'.date('Ymd', $start).'_'.date('Ymd', $end).'.'.$extension);
|
||||||
header('Pragma: no-cache');
|
header('Pragma: no-cache');
|
||||||
|
@ -85,6 +85,9 @@ if (!empty($module)) {
|
|||||||
while (@ob_end_clean()) {
|
while (@ob_end_clean()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set cookie for download control.
|
||||||
|
setDownloadCookieToken();
|
||||||
|
|
||||||
header('Content-type: application/octet-stream');
|
header('Content-type: application/octet-stream');
|
||||||
header('Content-Disposition: attachment; filename=export_'.date('Ymd', $start).'_'.date('Ymd', $end).'.'.$extension);
|
header('Content-Disposition: attachment; filename=export_'.date('Ymd', $start).'_'.date('Ymd', $end).'.'.$extension);
|
||||||
header('Pragma: no-cache');
|
header('Pragma: no-cache');
|
||||||
|
@ -402,9 +402,11 @@ ui_require_jquery_file('bgiframe');
|
|||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'csv':
|
case 'csv':
|
||||||
|
blockResubmit($(this));
|
||||||
f.action = "operation/agentes/exportdata.csv.php";
|
f.action = "operation/agentes/exportdata.csv.php";
|
||||||
break;
|
break;
|
||||||
case 'excel':
|
case 'excel':
|
||||||
|
blockResubmit($(this));
|
||||||
f.action = "operation/agentes/exportdata.excel.php";
|
f.action = "operation/agentes/exportdata.excel.php";
|
||||||
break;
|
break;
|
||||||
case 'avg':
|
case 'avg':
|
||||||
|
@ -111,6 +111,9 @@ $filename = 'tickets_export-'.date('Ymd').'-'.date('His').'.csv';
|
|||||||
|
|
||||||
ob_clean();
|
ob_clean();
|
||||||
|
|
||||||
|
// Set cookie for download control.
|
||||||
|
setDownloadCookieToken();
|
||||||
|
|
||||||
header('Content-Type: text/csv; charset=utf-8');
|
header('Content-Type: text/csv; charset=utf-8');
|
||||||
header('Content-Disposition: attachment; filename='.$filename);
|
header('Content-Disposition: attachment; filename='.$filename);
|
||||||
|
|
||||||
|
@ -428,7 +428,7 @@ $integria_incidents_form .= '<div class="float-right mrgn_lft_5px">'.html_print_
|
|||||||
__('Export to CSV'),
|
__('Export to CSV'),
|
||||||
'csv_export',
|
'csv_export',
|
||||||
false,
|
false,
|
||||||
"location.href='operation/incidents/integriaims_export_csv.php?tickets_filters=$decode_csv'",
|
"blockResubmit($(this)); location.href='operation/incidents/integriaims_export_csv.php?tickets_filters=$decode_csv'",
|
||||||
'class="sub next"',
|
'class="sub next"',
|
||||||
true
|
true
|
||||||
).'</div>';
|
).'</div>';
|
||||||
|
@ -140,7 +140,7 @@ $table->data['1']['2'] .= html_print_submit_button(
|
|||||||
__('Export to CSV'),
|
__('Export to CSV'),
|
||||||
'export_csv',
|
'export_csv',
|
||||||
false,
|
false,
|
||||||
'class="sub next"',
|
'class="sub next" onclick="blockResumit($(this))"',
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -221,6 +221,8 @@ if (get_parameter('export_csv')) {
|
|||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set cookie for download control.
|
||||||
|
setDownloadCookieToken();
|
||||||
// Write metadata.
|
// Write metadata.
|
||||||
header('Content-type: text/csv;');
|
header('Content-type: text/csv;');
|
||||||
header('Content-Disposition: attachment; filename="network_data.csv"');
|
header('Content-Disposition: attachment; filename="network_data.csv"');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user