mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-09-26 11:29:12 +02:00
minor fixes in scheduled downtime setup
This commit is contained in:
parent
b117bbfd7e
commit
5c3b5d2be0
@ -382,9 +382,7 @@ if ($create_downtime || $update_downtime) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($is_running) {
|
if ($is_running) {
|
||||||
ui_print_error_message(
|
$result = false;
|
||||||
__('Cannot be modified while the downtime is being executed')
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
if (!empty($values)) {
|
if (!empty($values)) {
|
||||||
$result = db_process_sql_update(
|
$result = db_process_sql_update(
|
||||||
@ -1444,6 +1442,8 @@ function insert_downtime_agent($id_downtime, $user_groups_ad)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready (function () {
|
$(document).ready (function () {
|
||||||
|
populate_agents_selector();
|
||||||
|
|
||||||
$("#id_agents").change(agent_changed_by_multiple_agents);
|
$("#id_agents").change(agent_changed_by_multiple_agents);
|
||||||
$("#modules_selection_mode").change(agent_changed_by_multiple_agents);
|
$("#modules_selection_mode").change(agent_changed_by_multiple_agents);
|
||||||
|
|
||||||
@ -1504,10 +1504,14 @@ function insert_downtime_agent($id_downtime, $user_groups_ad)
|
|||||||
|
|
||||||
// Change agent selector based on group.
|
// Change agent selector based on group.
|
||||||
$("#filter_group").change(function() {
|
$("#filter_group").change(function() {
|
||||||
|
populate_agents_selector();
|
||||||
|
});
|
||||||
|
|
||||||
|
function populate_agents_selector() {
|
||||||
jQuery.post ("ajax.php",
|
jQuery.post ("ajax.php",
|
||||||
{"page": "operation/agentes/ver_agente",
|
{"page": "operation/agentes/ver_agente",
|
||||||
"get_agents_group_json": 1,
|
"get_agents_group_json": 1,
|
||||||
"id_group": this.value,
|
"id_group": $("#filter_group").val(),
|
||||||
"privilege": "AW",
|
"privilege": "AW",
|
||||||
"keys_prefix": "_",
|
"keys_prefix": "_",
|
||||||
"recursion": recursion,
|
"recursion": recursion,
|
||||||
@ -1533,6 +1537,6 @@ function insert_downtime_agent($id_downtime, $user_groups_ad)
|
|||||||
},
|
},
|
||||||
"json"
|
"json"
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user