2012-01-24 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

* operation/incidents/incident.php
	 operation/incidents/incident_detail.php: Modified agent text search
	 due to usability issues.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5420 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2012-01-24 18:54:55 +00:00
parent 8c3fb8d18f
commit 05e87ef279
3 changed files with 20 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2012-01-24 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* operation/incidents/incident.php
operation/incidents/incident_detail.php: Modified agent text search
due to usability issues.
2012-01-24 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php

View File

@ -88,7 +88,7 @@ elseif ($action == "update") {
$estado = get_parameter ("estado_form", 0);
$grupo = get_parameter ("grupo_form", 1);
$usuario = get_parameter ("usuario_form", $config["id_user"]);
$id_agent = get_parameter ("incident_agents");
$id_agent = get_parameter ("id_agent");
$sql = sprintf ("UPDATE tincidencia SET titulo = '%s', origen = '%s', estado = %d, id_grupo = %d, id_usuario = '%s', prioridad = %d, descripcion = '%s', id_lastupdate = '%s', id_agent = %d WHERE id_incidencia = %d",
$titulo, $origen, $estado, $grupo, $usuario, $prioridad, $descripcion, $config["id_user"], $id_agent, $id_inc);
@ -121,11 +121,11 @@ elseif ($action == "insert") {
$prioridad = get_parameter ("prioridad_form");
$id_creator = $config['id_user'];
$estado = get_parameter ("estado_form");
$id_agent = get_parameter ("incident_agents");
$id_agent = get_parameter ("id_agent");
$sql = sprintf ("INSERT INTO tincidencia (inicio, actualizacion, titulo, descripcion, id_usuario, origen, estado, prioridad, id_grupo, id_creator, id_agent) VALUES
(NOW(), NOW(), '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', %d)", $titulo, $descripcion, $config["id_user"], $origen, $estado, $prioridad, $grupo, $config["id_user"], $id_agent);
$id_inc = db_process_sql ($sql, "insert_id");
html_debug_print($sql);
if ($id_inc === false) {
echo '<h3 class="error">'.__('Error creating incident').'</h3>';
}

View File

@ -314,7 +314,11 @@ foreach ($agents_incidents as $agent_incident){
echo '</td></tr><tr><td class="datos"><b>'.__('Agent').'</b></td><td class="datos">';
html_print_select ($result_agent_incidents, "incident_agents", $id_agent, '', __('None'), 0, false, false, false, 'w135', false);
html_print_input_hidden('id_agent', $id_agent);
html_print_input_text_extended ('agent', agents_get_name ($id_agent), 'text-agent', '', 30, 100, false, '', array('style' => 'background: url(images/lightning.png) no-repeat right;'));
ui_print_help_tip(__("Type at least two characters to search"), false);
//html_print_select ($result_agent_incidents, "incident_agents", $id_agent, '', __('None'), 0, false, false, false, 'w135', false);
echo '</td></tr><tr><td class="datos2" colspan="4">';
@ -460,3 +464,9 @@ if (isset ($id_inc)) {
}
}
?>
<script>
$(document).ready (function () {
agent_autocomplete('#text-agent', '#hidden-server_name', '#hidden-id_agent');
});
</script>