2011-11-28 Sergio Martin <sergio.martin@artica.es>
* operation/incidents/incident_detail.php operation/integria_incidents/incident.incident.php operation/events/events_list.php: Fixed some bugs of the create incident from event form included the change of target url when integria incidents are enabled bug: 3438251 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5189 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
40c894dc3d
commit
4ba6cf3494
|
@ -1,3 +1,12 @@
|
||||||
|
2011-11-28 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* operation/incidents/incident_detail.php
|
||||||
|
operation/integria_incidents/incident.incident.php
|
||||||
|
operation/events/events_list.php: Fixed some bugs of the
|
||||||
|
create incident from event form included the change of
|
||||||
|
target url when integria incidents are enabled
|
||||||
|
bug: 3438251
|
||||||
|
|
||||||
2011-11-28 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
2011-11-28 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* operation/events/export_csv.php: Added filter to CSV importation
|
* operation/events/export_csv.php: Added filter to CSV importation
|
||||||
|
|
|
@ -516,7 +516,13 @@ foreach ($result as $event) {
|
||||||
|
|
||||||
// Create incident from this event
|
// Create incident from this event
|
||||||
if (check_acl ($config["id_user"], $event["id_grupo"], "IW") == 1) {
|
if (check_acl ($config["id_user"], $event["id_grupo"], "IW") == 1) {
|
||||||
$data[4] .= '<a href="index.php?sec=incidencias&sec2=operation/incidents/incident_detail&insert_form&from_event='.$event["id_evento"].'">';
|
if(isset($config['integria_enabled']) && $config['integria_enabled'] == 1) {
|
||||||
|
$incidents_path = 'integria_incidents/incident&tab=editor';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$incidents_path = 'incidents/incident_detail&insert_form';
|
||||||
|
}
|
||||||
|
$data[4] .= '<a href="index.php?sec=incidencias&sec2=operation/'.$incidents_path.'&from_event='.$event["id_evento"].'">';
|
||||||
$data[4] .= html_print_image ("images/page_lightning.png", true,
|
$data[4] .= html_print_image ("images/page_lightning.png", true,
|
||||||
array ("title" => __('Create incident from event')));
|
array ("title" => __('Create incident from event')));
|
||||||
$data[4] .= '</a>';
|
$data[4] .= '</a>';
|
||||||
|
|
|
@ -178,16 +178,17 @@ elseif (isset ($_GET["insert_form"])) {
|
||||||
$texto = "";
|
$texto = "";
|
||||||
$usuario = $config["id_user"];
|
$usuario = $config["id_user"];
|
||||||
$id_creator = $config["id_user"];
|
$id_creator = $config["id_user"];
|
||||||
|
$id_grupo = 0;
|
||||||
|
|
||||||
if (isset ($_GET["from_event"])) {
|
if (isset ($_GET["from_event"])) {
|
||||||
$event = get_parameter ("from_event");
|
$event = get_parameter ("from_event");
|
||||||
$titulo = events_get_description ($event);
|
$texto = io_safe_output(events_get_description ($event));
|
||||||
|
$titulo = ui_print_truncate_text(events_get_description ($event), 75, false, true, false);
|
||||||
$id_grupo = events_get_group ($event);
|
$id_grupo = events_get_group ($event);
|
||||||
$origen = "Pandora FMS event";
|
$origen = "Pandora FMS Event";
|
||||||
unset ($event);
|
unset ($event);
|
||||||
}
|
}
|
||||||
$prioridad = 0;
|
$prioridad = 0;
|
||||||
$id_grupo = 0;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
db_pandora_audit("HACK","Trying to get to incident details in an unusual way");
|
db_pandora_audit("HACK","Trying to get to incident details in an unusual way");
|
||||||
|
@ -271,9 +272,9 @@ foreach ($return as $row) {
|
||||||
|
|
||||||
// Only owner could change source or user with Incident management privileges
|
// Only owner could change source or user with Incident management privileges
|
||||||
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
|
||||||
html_print_select ($fields, "origen_form", $estado, '', '', '', false, false, false, 'w135');
|
html_print_select ($fields, "origen_form", $origen, '', '', '', false, false, false, 'w135');
|
||||||
} else {
|
} else {
|
||||||
html_print_select ($fields, "origen_form", $estado, '', '', '', false, false, false, 'w135', true);
|
html_print_select ($fields, "origen_form", $origen, '', '', '', false, false, false, 'w135', true);
|
||||||
}
|
}
|
||||||
echo '</td><td class="datos2"><b>'.__('Group').'</b></td><td class="datos2">';
|
echo '</td><td class="datos2"><b>'.__('Group').'</b></td><td class="datos2">';
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,8 @@ global $result_sources;
|
||||||
global $result_groups;
|
global $result_groups;
|
||||||
global $result_users;
|
global $result_users;
|
||||||
|
|
||||||
|
require_once ("include/functions_events.php"); //To get events group information
|
||||||
|
|
||||||
$resolutions[0] = __('None');
|
$resolutions[0] = __('None');
|
||||||
if (isset ($result_resolutions['resolution'])) {
|
if (isset ($result_resolutions['resolution'])) {
|
||||||
foreach($result_resolutions['resolution'] as $res) {
|
foreach($result_resolutions['resolution'] as $res) {
|
||||||
|
@ -63,6 +65,13 @@ if(!isset($result['id_incidencia'])) {
|
||||||
$result['id_task'] = 0;
|
$result['id_task'] = 0;
|
||||||
$result['descripcion'] = '';
|
$result['descripcion'] = '';
|
||||||
$result['epilog'] = '';
|
$result['epilog'] = '';
|
||||||
|
|
||||||
|
if (isset ($_GET["from_event"])) {
|
||||||
|
$event = get_parameter ("from_event");
|
||||||
|
$result['descripcion'] = io_safe_output(events_get_description ($event));
|
||||||
|
$result['titulo'] = ui_print_truncate_text($result['descripcion'], 75, false, true, false);
|
||||||
|
unset ($event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->width = "98%";
|
$table->width = "98%";
|
||||||
|
@ -73,7 +82,7 @@ $table->colspan[0][0] = 3;
|
||||||
$table->colspan[3][0] = 3;
|
$table->colspan[3][0] = 3;
|
||||||
$table->colspan[4][0] = 3;
|
$table->colspan[4][0] = 3;
|
||||||
|
|
||||||
$table->data[0][0] = "<b>".__('Title')."</b><br/>".html_print_input_text("title", $result['titulo'], '', 50, 255, true);
|
$table->data[0][0] = "<b>".__('Title')."</b><br/>".html_print_input_text("title", $result['titulo'], '', 80, 255, true);
|
||||||
if(isset($result['id_incidencia'])) {
|
if(isset($result['id_incidencia'])) {
|
||||||
$table->data[1][2] = "<b>".__('Assigned user')."</b><br/>".html_print_select ($users, 'id_user', $result['id_usuario'], '', '', 0, true, false, false);
|
$table->data[1][2] = "<b>".__('Assigned user')."</b><br/>".html_print_select ($users, 'id_user', $result['id_usuario'], '', '', 0, true, false, false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue