mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
Fix bugs with SLA item reports
This commit is contained in:
parent
247343c0b6
commit
2a7aa8c1e5
@ -3335,6 +3335,7 @@ function print_SLA_list($width, $action, $idItem=null)
|
|||||||
$params['javascript_is_function_select'] = true;
|
$params['javascript_is_function_select'] = true;
|
||||||
$params['selectbox_id'] = 'id_agent_module_sla';
|
$params['selectbox_id'] = 'id_agent_module_sla';
|
||||||
$params['add_none_module'] = false;
|
$params['add_none_module'] = false;
|
||||||
|
$params['check_only_empty_javascript_on_blur_function'] = true;
|
||||||
if ($meta) {
|
if ($meta) {
|
||||||
$params['use_input_id_server'] = true;
|
$params['use_input_id_server'] = true;
|
||||||
$params['input_id_server_id'] = 'hidden-id_server';
|
$params['input_id_server_id'] = 'hidden-id_server';
|
||||||
@ -4733,8 +4734,10 @@ function addSLARow() {
|
|||||||
var serviceId = $("select#id_service>option:selected").val();
|
var serviceId = $("select#id_service>option:selected").val();
|
||||||
var serviceName = $("select#id_service>option:selected").text();
|
var serviceName = $("select#id_service>option:selected").text();
|
||||||
|
|
||||||
if (((idAgent != '') && (slaMin != '') && (slaMax != '')
|
if ((((idAgent != '') && (idAgent > 0))
|
||||||
&& (slaLimit != '')) || serviceId != '') {
|
&& ((idModule != '') && (idModule > 0)))
|
||||||
|
|| serviceId != null)
|
||||||
|
{
|
||||||
if (nameAgent != '') {
|
if (nameAgent != '') {
|
||||||
//Truncate nameAgent
|
//Truncate nameAgent
|
||||||
var params = [];
|
var params = [];
|
||||||
|
@ -5451,15 +5451,23 @@ function ui_print_agent_autocomplete_input($parameters)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('.((int) $check_only_empty_javascript_on_blur_function).') {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (select_item_click) {
|
if (select_item_click) {
|
||||||
|
select_item_click = 0;
|
||||||
|
$("#'.$input_id.'")
|
||||||
|
.css("background",
|
||||||
|
"url(\"'.$icon_image.'\") right center no-repeat");
|
||||||
return;
|
return;
|
||||||
}
|
} else {
|
||||||
|
// Clear selectbox if item is not selected.
|
||||||
|
$("#'.$selectbox_id.'").empty();
|
||||||
|
$("#'.$selectbox_id.'").append($("<option value=0>'.__('Select an Agent first').'</option>"));
|
||||||
|
$("#'.$selectbox_id.'").attr("disabled", "disabled");
|
||||||
|
// Not allow continue on blur .
|
||||||
|
if ('.((int) $check_only_empty_javascript_on_blur_function).') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Set loading
|
//Set loading
|
||||||
$("#'.$input_id.'")
|
$("#'.$input_id.'")
|
||||||
.css("background",
|
.css("background",
|
||||||
@ -5533,7 +5541,7 @@ function ui_print_agent_autocomplete_input($parameters)
|
|||||||
if ('.((int) !empty($javascript_function_action_after_select_js_call)).') {
|
if ('.((int) !empty($javascript_function_action_after_select_js_call)).') {
|
||||||
'.$javascript_function_action_after_select_js_call.'
|
'.$javascript_function_action_after_select_js_call.'
|
||||||
}
|
}
|
||||||
|
|
||||||
//Set icon
|
//Set icon
|
||||||
$("#'.$input_id.'")
|
$("#'.$input_id.'")
|
||||||
.css("background",
|
.css("background",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user