2014-04-07 Vanessa Gil <vanessa.gil@artica.es>
* pandoradb.oracle.sql pandoradb.postgreSQL.sql pandoradb.sql extras/pandoradb_migrate_5.0_to_5.1.mysql.sql extras/pandoradb_migrate_5.0_to_5.1.oracle.sql extras/pandoradb_migrate_5.0_to_5.1.postgreSQL.sql godmode/reporting/reporting_builder.main.php godmode/reporting/reporting_builder.php: Add scheduled reports. * images/csv_disabled.png images/html_disabled.png images/pdf_disabled.png images/xml_disabled.png images/schedule_report.png: Added images. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9737 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
6f60e7f3c4
commit
87e0fb452d
|
@ -1,3 +1,21 @@
|
|||
2014-04-07 Vanessa Gil <vanessa.gil@artica.es>
|
||||
|
||||
* pandoradb.oracle.sql
|
||||
pandoradb.postgreSQL.sql
|
||||
pandoradb.sql
|
||||
extras/pandoradb_migrate_5.0_to_5.1.mysql.sql
|
||||
extras/pandoradb_migrate_5.0_to_5.1.oracle.sql
|
||||
extras/pandoradb_migrate_5.0_to_5.1.postgreSQL.sql
|
||||
godmode/reporting/reporting_builder.main.php
|
||||
godmode/reporting/reporting_builder.php: Add scheduled
|
||||
reports.
|
||||
|
||||
* images/csv_disabled.png
|
||||
images/html_disabled.png
|
||||
images/pdf_disabled.png
|
||||
images/xml_disabled.png
|
||||
images/schedule_report.png: Added images.
|
||||
|
||||
2014-04-05 Junichi Satoh <junichi@rworks.jp>
|
||||
|
||||
* include/help/ja/help_field_match_snmp.php: Updated help.
|
||||
|
|
|
@ -134,3 +134,8 @@ CREATE TABLE IF NOT EXISTS `talert_snmp_action` (
|
|||
`al_field10` text NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `treport`
|
||||
-- ---------------------------------------------------------------------
|
||||
ALTER TABLE `treport` ADD COLUMN `non_interactive` tinyint(1) UNSIGNED NOT NULL default 0;
|
||||
|
|
|
@ -123,3 +123,8 @@ CREATE TABLE talert_snmp_action (
|
|||
al_field9 CLOB default '' NOT NULL,
|
||||
al_field10 CLOB default '' NOT NULL
|
||||
);
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table treport
|
||||
-- ---------------------------------------------------------------------
|
||||
ALTER TABLE treport ADD (non_interactive NUMBER(5, 0) default 0 NOT NULL);
|
||||
|
|
|
@ -96,3 +96,8 @@ CREATE TABLE "talert_snmp_action" (
|
|||
"al_field9" TEXT default '',
|
||||
"al_field10" TEXT default ''
|
||||
);
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table treport
|
||||
-- ---------------------------------------------------------------------
|
||||
ALTER TABLE "treport" ADD COLUMN "non_interactive" SMALLINT DEFAULT 0;
|
||||
|
|
|
@ -91,6 +91,11 @@ if ($report_id_user == $config['id_user'] ||
|
|||
</span>';
|
||||
}
|
||||
|
||||
if ($enterpriseEnable) {
|
||||
$table->data['interactive_report'][0] = __('Non interactive report');
|
||||
$table->data['interactive_report'][1] =__('Yes').' '.html_print_radio_button ('non_interactive', 1, '', $non_interactive, true) .' ';
|
||||
$table->data['interactive_report'][1] .= __('No').' '.html_print_radio_button ('non_interactive', 0, '', $non_interactive, true);
|
||||
}
|
||||
|
||||
$table->data['description'][0] = __('Description');
|
||||
$table->data['description'][1] = html_print_textarea('description', 5, 15, $description, '', true);
|
||||
|
|
|
@ -47,6 +47,33 @@ $idReport = get_parameter('id_report', 0);
|
|||
$offset = get_parameter('offset', 0);
|
||||
$idItem = get_parameter('id_item', 0);
|
||||
$pure = get_parameter('pure',0);
|
||||
$schedule_report = get_parameter('schbutton', '');
|
||||
|
||||
if ($schedule_report != '') {
|
||||
|
||||
$id_user_task = 1;
|
||||
$scheduled = 'no';
|
||||
$date = date(DATE_FORMAT);
|
||||
$time = date(TIME_FORMAT);
|
||||
$parameters[0] = get_parameter('id_schedule_report');
|
||||
//$parameters[1] = db_get_value('schedule_email', 'treport', 'id_report', $id_report);
|
||||
$parameters[1] = get_parameter('schedule_email');
|
||||
$parameters['first_execution'] = strtotime ($date.' '.$time);
|
||||
|
||||
$values = array(
|
||||
'id_usuario' => $config['id_user'],
|
||||
'id_user_task' => $id_user_task,
|
||||
'args' => serialize ($parameters),
|
||||
'scheduled' => $scheduled,
|
||||
'flag_delete' => 1);
|
||||
//html_debug_print($values, "/home/vanessa/code/pandora-code/pandora_console/logDebug.txt");
|
||||
$result = db_process_sql_insert('tuser_task_scheduled', $values);
|
||||
|
||||
ui_print_result_message ($result,
|
||||
__('Your report has been planned, and the system will email you a PDF with the report as soon as its finished'),
|
||||
__('An error has ocurred'));
|
||||
echo '<br>';
|
||||
}
|
||||
|
||||
//Other Checks for the edit the reports
|
||||
if ($idReport != 0) {
|
||||
|
@ -356,7 +383,7 @@ switch ($action) {
|
|||
|
||||
$reports = reports_get_reports ($filter,
|
||||
array ('name', 'id_report', 'description', 'private',
|
||||
'id_user', 'id_group'), $return_all_group, 'RR', $group);
|
||||
'id_user', 'id_group', 'non_interactive'), $return_all_group, 'RR', $group);
|
||||
|
||||
$table->width = '0px';
|
||||
if (sizeof ($reports)) {
|
||||
|
@ -376,7 +403,7 @@ switch ($action) {
|
|||
$next = 4;
|
||||
//Calculate dinamically the number of the column
|
||||
if (enterprise_hook ('load_custom_reporting_1') !== ENTERPRISE_NOT_HOOK) {
|
||||
$next = 6;
|
||||
$next = 7;
|
||||
}
|
||||
|
||||
//Admin options only for RM flag
|
||||
|
@ -420,15 +447,20 @@ switch ($action) {
|
|||
|
||||
$data[1] = $report['description'];
|
||||
|
||||
$data[2] = '<a href="' . $config['homeurl'] . 'index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id='.$report['id_report'].'&pure='.$pure.'">' .
|
||||
html_print_image("images/html.png", true, array('title' => __('HTML view'))) . '</a>';
|
||||
$data[3] = '<a href="'. ui_get_full_url(false, false, false, false) . 'ajax.php?page=' . $config['homedir'] . '/operation/reporting/reporting_xml&id='.$report['id_report'].'">' . html_print_image("images/xml.png", true, array('title' => __('Export to XML'))) . '</a>'; //I chose ajax.php because it's supposed to give XML anyway
|
||||
if (!$report['non_interactive']) {
|
||||
$data[2] = '<a href="' . $config['homeurl'] . 'index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id='.$report['id_report'].'&pure='.$pure.'">' .
|
||||
html_print_image("images/html.png", true, array('title' => __('HTML view'))) . '</a>';
|
||||
$data[3] = '<a href="'. ui_get_full_url(false, false, false, false) . 'ajax.php?page=' . $config['homedir'] . '/operation/reporting/reporting_xml&id='.$report['id_report'].'">' . html_print_image("images/xml.png", true, array('title' => __('Export to XML'))) . '</a>'; //I chose ajax.php because it's supposed to give XML anyway
|
||||
} else {
|
||||
$data[2] = html_print_image("images/html_disabled.png", true);
|
||||
$data[3] = html_print_image("images/xml_disabled.png", true);
|
||||
}
|
||||
|
||||
|
||||
//Calculate dinamically the number of the column
|
||||
$next = 4;
|
||||
if (enterprise_hook ('load_custom_reporting_2') !== ENTERPRISE_NOT_HOOK) {
|
||||
$next = 6;
|
||||
$next = 7;
|
||||
}
|
||||
|
||||
|
||||
|
@ -560,6 +592,7 @@ switch ($action) {
|
|||
$type_access_selected = get_parameter('type_access', 'group_view');
|
||||
$id_group_edit_param = (int)get_parameter('id_group_edit', 0);
|
||||
$report_id_user = get_parameter('report_id_user');
|
||||
$non_interactive = get_parameter('non_interactive', 0);
|
||||
|
||||
// Pretty font by default for pdf
|
||||
$custom_font = 'FreeSans.ttf';
|
||||
|
@ -584,7 +617,8 @@ switch ($action) {
|
|||
'id_group' => $idGroupReport,
|
||||
'description' => $description,
|
||||
'private' => $private,
|
||||
'id_group_edit' => $id_group_edit);
|
||||
'id_group_edit' => $id_group_edit,
|
||||
'non_interactive' => $non_interactive);
|
||||
|
||||
|
||||
$report = db_get_row_filter('treport',
|
||||
|
@ -632,7 +666,8 @@ switch ($action) {
|
|||
'id_group_edit' => $id_group_edit,
|
||||
'id_user' => $config['id_user'],
|
||||
'metaconsole' => $metaconsole_report,
|
||||
'custom_font' => $custom_font));
|
||||
'custom_font' => $custom_font,
|
||||
'non_interactive' => $non_interactive));
|
||||
if ($idOrResult !== false)
|
||||
db_pandora_audit( "Report management", "Create report #$idOrResult");
|
||||
else
|
||||
|
@ -1134,6 +1169,7 @@ switch ($action) {
|
|||
$type_access_selected = reports_get_type_access($report);
|
||||
$id_group_edit = $report['id_group_edit'];
|
||||
$report_id_user = $report['id_user'];
|
||||
$non_interactive = $report['non_interactive'];
|
||||
break;
|
||||
case 'delete':
|
||||
$idItem = get_parameter('id_item');
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
|
@ -1097,7 +1097,8 @@ CREATE TABLE treport (
|
|||
custom_font VARCHAR2(200) default NULL,
|
||||
id_template NUMBER(10, 0) default 0 NOT NULL,
|
||||
id_group_edit NUMBER(19, 0) default 0 NOT NULL,
|
||||
metaconsole NUMBER(5, 0) DEFAULT 0
|
||||
metaconsole NUMBER(5, 0) DEFAULT 0,
|
||||
non_interactive NUMBER(5, 0) default 0 NOT NULL
|
||||
);
|
||||
CREATE SEQUENCE treport_s INCREMENT BY 1 START WITH 1;
|
||||
CREATE OR REPLACE TRIGGER treport_inc BEFORE INSERT ON treport REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT treport_s.nextval INTO :NEW.ID_REPORT FROM dual; END treport_inc;;
|
||||
|
|
|
@ -969,7 +969,8 @@ CREATE TABLE "treport" (
|
|||
"custom_font" varchar(200) default NULL,
|
||||
"id_template" BIGINT NOT NULL default 0,
|
||||
"id_group_edit" BIGINT NOT NULL default 0,
|
||||
"metaconsole" SMALLINT DEFAULT 0
|
||||
"metaconsole" SMALLINT DEFAULT 0,
|
||||
"non_interactive" SMALLINT DEFAULT 0
|
||||
);
|
||||
|
||||
-- -----------------------------------------------------
|
||||
|
|
|
@ -1047,6 +1047,7 @@ CREATE TABLE IF NOT EXISTS `treport` (
|
|||
`id_template` INTEGER UNSIGNED DEFAULT 0,
|
||||
`id_group_edit` mediumint(8) unsigned NULL DEFAULT 0,
|
||||
`metaconsole` tinyint(1) DEFAULT 0,
|
||||
`non_interactive` tinyint(1) UNSIGNED NOT NULL default 0,
|
||||
PRIMARY KEY(`id_report`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
|
Loading…
Reference in New Issue