Merge branch 'ent-1455-auto-sla-no-funciona-cuando-esta-asignada-a-un-agente' into 'develop'

Fixed auto SLA item on visual console when no module is selected

See merge request !922
This commit is contained in:
vgilc 2017-10-13 14:54:23 +02:00
commit cd0a15906f
2 changed files with 7 additions and 9 deletions

View File

@ -698,10 +698,6 @@ function create_button_palette_callback() {
alert($("#message_alert_no_agent").html()); alert($("#message_alert_no_agent").html());
validate = false; validate = false;
} }
if ((values['module'] == 0)) {
alert($("#message_alert_no_module").html());
validate = false;
}
break; break;
case 'label': case 'label':
if ((values['label'] == '')) { if ((values['label'] == '')) {

View File

@ -3792,11 +3792,13 @@ function graph_graphic_moduleevents ($id_agent, $id_module, $width, $height, $pe
$top = $datelimit + ($periodtime * ($i + 1)); $top = $datelimit + ($periodtime * ($i + 1));
$event = db_get_row_filter ('tevento', $event_filter = array ('id_agente' => $id_agent,
array ('id_agente' => $id_agent,
'id_agentmodule' => $id_module,
'utimestamp > '.$bottom, 'utimestamp > '.$bottom,
'utimestamp < '.$top), 'criticity, utimestamp'); 'utimestamp < '.$top);
if ((int)$id_module !== 0) {
$event_filter['id_agentmodule'] = $id_module;
}
$event = db_get_row_filter ('tevento', $event_filter, 'criticity, utimestamp');
if (!empty($event['utimestamp'])) { if (!empty($event['utimestamp'])) {
$data[$cont]['utimestamp'] = $periodtime; $data[$cont]['utimestamp'] = $periodtime;