mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
minor changes
This commit is contained in:
parent
70ad1ea986
commit
0771094e85
@ -108,7 +108,7 @@ html_print_action_buttons(
|
|||||||
echo '</form>';
|
echo '</form>';
|
||||||
|
|
||||||
echo '<form id="redirect-form" method="post" action="index.php?sec=view&sec2=operation/agentes/estado_agente">';
|
echo '<form id="redirect-form" method="post" action="index.php?sec=view&sec2=operation/agentes/estado_agente">';
|
||||||
|
html_print_input_hidden('os_type_regex', '');
|
||||||
html_print_input_hidden('os_version_regex', '');
|
html_print_input_hidden('os_version_regex', '');
|
||||||
|
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
@ -129,6 +129,8 @@ echo '</form>';
|
|||||||
item.options += '" ><?php echo html_print_image('images/edit.svg', true, ['title' => __('Edit'), 'class' => 'main_menu_icon invert_filter']); ?></a>';
|
item.options += '" ><?php echo html_print_image('images/edit.svg', true, ['title' => __('Edit'), 'class' => 'main_menu_icon invert_filter']); ?></a>';
|
||||||
|
|
||||||
item.options += '<a href="javascript:" onclick="redirect_to_agents_by_version(\'';
|
item.options += '<a href="javascript:" onclick="redirect_to_agents_by_version(\'';
|
||||||
|
item.options += item.product;
|
||||||
|
item.options += '\',\'';
|
||||||
item.options += item.version;
|
item.options += item.version;
|
||||||
item.options += '\')" ><?php echo html_print_image('images/agents.svg', true, ['title' => __('Show agents'), 'class' => 'main_menu_icon invert_filter']); ?></a>';
|
item.options += '\')" ><?php echo html_print_image('images/agents.svg', true, ['title' => __('Show agents'), 'class' => 'main_menu_icon invert_filter']); ?></a>';
|
||||||
|
|
||||||
@ -140,7 +142,8 @@ echo '</form>';
|
|||||||
item.options += '<form method="post" action="?sec=view&sec2=operation/agentes/estado_agente"></form>';
|
item.options += '<form method="post" action="?sec=view&sec2=operation/agentes/estado_agente"></form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
function redirect_to_agents_by_version(version) {
|
function redirect_to_agents_by_version(product, version) {
|
||||||
|
$('#hidden-os_type_regex').val(product);
|
||||||
$('#hidden-os_version_regex').val(version);
|
$('#hidden-os_version_regex').val(version);
|
||||||
$('#redirect-form').submit();
|
$('#redirect-form').submit();
|
||||||
}
|
}
|
||||||
|
@ -1528,6 +1528,7 @@ function api_set_update_agent($id_agent, $thrash2, $other, $thrash3)
|
|||||||
$learningMode = $other['data'][10];
|
$learningMode = $other['data'][10];
|
||||||
$disabled = $other['data'][11];
|
$disabled = $other['data'][11];
|
||||||
$description = $other['data'][12];
|
$description = $other['data'][12];
|
||||||
|
$osVersion = $other['data'][13];
|
||||||
|
|
||||||
// Check parameters.
|
// Check parameters.
|
||||||
if ($idGroup == 0) {
|
if ($idGroup == 0) {
|
||||||
@ -1623,6 +1624,7 @@ function api_set_update_agent($id_agent, $thrash2, $other, $thrash3)
|
|||||||
'server_name' => $nameServer,
|
'server_name' => $nameServer,
|
||||||
'id_parent' => $idParent,
|
'id_parent' => $idParent,
|
||||||
'custom_id' => $customId,
|
'custom_id' => $customId,
|
||||||
|
'os_version' => $osVersion,
|
||||||
],
|
],
|
||||||
['id_agente' => $id_agent]
|
['id_agente' => $id_agent]
|
||||||
);
|
);
|
||||||
|
@ -170,6 +170,7 @@ $recursion = get_parameter('recursion', 0);
|
|||||||
$status = (int) get_parameter('status', -1);
|
$status = (int) get_parameter('status', -1);
|
||||||
$os = (int) get_parameter('os', 0);
|
$os = (int) get_parameter('os', 0);
|
||||||
$os_version_regex = trim(get_parameter('os_version_regex', ''));
|
$os_version_regex = trim(get_parameter('os_version_regex', ''));
|
||||||
|
$os_type_regex = trim(get_parameter('os_type_regex', ''));
|
||||||
$policies = (array) get_parameter('policies', []);
|
$policies = (array) get_parameter('policies', []);
|
||||||
$ag_custom_fields = (array) get_parameter('ag_custom_fields', []);
|
$ag_custom_fields = (array) get_parameter('ag_custom_fields', []);
|
||||||
|
|
||||||
@ -182,6 +183,10 @@ $onheader = [];
|
|||||||
|
|
||||||
$load_filter_id = (int) get_parameter('filter_id', 0);
|
$load_filter_id = (int) get_parameter('filter_id', 0);
|
||||||
|
|
||||||
|
if (empty($os_type_regex) !== true) {
|
||||||
|
$os = (int) db_get_value_sql('SELECT id_os FROM tconfig_os WHERE `name` REGEXP "'.$os_type_regex.'"');
|
||||||
|
}
|
||||||
|
|
||||||
if ($load_filter_id > 0) {
|
if ($load_filter_id > 0) {
|
||||||
$user_groups_fl = users_get_groups(
|
$user_groups_fl = users_get_groups(
|
||||||
$config['id_user'],
|
$config['id_user'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user