pandorafms/pandora_console/godmode/agentes/agent_incidents.php

57 lines
1.8 KiB
PHP
Raw Normal View History

<?php
2023-08-17 14:56:55 +02:00
/**
* ITSM.
*
* @category ITSM view
* @package Pandora FMS
* @subpackage Opensource
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2023 Pandora FMS
* 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 for 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.
* ============================================================================
*/
2023-08-25 14:15:32 +02:00
use PandoraFMS\ITSM\ITSM;
global $config;
check_login();
2023-07-21 14:23:42 +02:00
if (!$config['ITSM_enabled']) {
2023-07-18 15:13:08 +02:00
ui_print_error_message(__('In order to access ticket management system, integration with ITSM must be enabled and properly configured'));
2021-02-25 13:18:04 +01:00
return;
}
2023-08-17 14:56:55 +02:00
if (! check_acl($config['id_user'], $id_grupo, 'AW', $id_agente)) {
db_pandora_audit(
2022-01-20 10:55:23 +01:00
AUDIT_LOG_ACL_VIOLATION,
'Trying to access agent manager'
);
include 'general/noaccess.php';
return;
}
2023-08-17 14:56:55 +02:00
try {
2023-08-25 14:15:32 +02:00
$ITSM = new ITSM();
echo $ITSM->getTableIncidencesForAgent($id_agente);
2023-08-17 14:56:55 +02:00
} catch (Exception $e) {
echo $e->getMessage();
}
2023-08-17 14:56:55 +02:00
html_print_action_buttons('');