pandorafms/pandora_console/operation/search_agents.php

76 lines
2.3 KiB
PHP
Raw Normal View History

<?php
2023-06-08 13:19:01 +02:00
// Pandora FMS - https://pandorafms.com
// ==================================================
2023-06-08 11:53:13 +02:00
// Copyright (c) 2005-2023 Pandora FMS
2023-06-08 13:19:01 +02:00
// Please see https://pandorafms.com/community/ for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
global $config;
2023-05-04 16:01:08 +02:00
/*
enterprise_include_once('include/functions_policies.php');
require_once $config['homedir'].'/include/functions_users.php';*/
// Datatables list.
try {
$columns = [
'agent',
'comentarios',
'os',
'interval',
'group_icon',
'module',
'status',
'alert',
'last_contact',
];
$column_names = [
__('Agent'),
__('Description'),
__('OS'),
__('Interval'),
__('Group'),
__('Modules'),
__('Status'),
__('Alerts'),
__('Last contact'),
];
$tableId = 'agents_search';
$stringSearchSQL = $_SESSION['stringSearchSQL'];
2023-05-04 16:01:08 +02:00
unset($_SESSION['stringSearchSQL']);
2023-05-04 16:01:08 +02:00
// Load datatables user interface.
ui_print_datatable(
2023-03-10 12:40:21 +01:00
[
2023-05-04 16:01:08 +02:00
'id' => $tableId,
'class' => 'info_table',
'style' => 'width: 99%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => 'operation/search_agents.getdata',
'ajax_data' => [
'search_agents' => 1,
'stringSearchSQL' => $stringSearchSQL,
],
2023-05-04 16:01:08 +02:00
'order' => [
'field' => 'alias',
'direction' => 'asc',
],
'search_button_class' => 'sub filter float-right',
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar',
2023-03-10 12:40:21 +01:00
]
);
2023-05-08 09:42:17 +02:00
html_print_action_buttons('');
2023-05-04 16:01:08 +02:00
} catch (Exception $e) {
echo $e->getMessage();
}