Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d03af97
fix version setup.php
Mary-Clb Jun 16, 2025
84fbeea
diplaying configuration page even if conf is not registered yet
Mary-Clb Jun 17, 2025
dc618b1
refacto
Mary-Clb Jun 17, 2025
4210816
fix phpcs
Mary-Clb Jun 17, 2025
a66516f
fix phpcs
Mary-Clb Jun 17, 2025
15d7c22
fix logo url
Mary-Clb Jun 17, 2025
da994e3
fix ajax URL's and front files with correct rights
Mary-Clb Jun 17, 2025
3c84da9
fix URL's for host timeline
Mary-Clb Jun 17, 2025
489d0f6
fix downtimes and cancel
Mary-Clb Jun 19, 2025
9e25b65
fix phpcs
Mary-Clb Jun 19, 2025
439391a
add functions comments
Mary-Clb Jun 23, 2025
2ba4d44
fix phpstan
Mary-Clb Jun 23, 2025
fb7ad7f
fix phpstan
Mary-Clb Jun 23, 2025
f75056b
fix phpstan
Mary-Clb Jun 23, 2025
3f82e1f
add ajax and settimeout
Mary-Clb Jun 23, 2025
0ef2cb9
fix phpcs
Mary-Clb Jun 23, 2025
462e146
fix review errors
Mary-Clb Jun 24, 2025
8a0d3db
fix acknowledgement
Mary-Clb Jun 24, 2025
2bdda7d
rm php_codesniffer
Mary-Clb Jun 24, 2025
7154adc
fix setup.php
Mary-Clb Jun 24, 2025
7bb9fcf
rm php-unit
Mary-Clb Jun 24, 2025
e4a6893
fixes for CIs
Rom1-B Jun 24, 2025
c101078
fix phpstan errors
Mary-Clb Jun 24, 2025
ee52cf9
fix phpstan & phpcs
Mary-Clb Jun 24, 2025
6018380
fixes for review
Mary-Clb Jun 24, 2025
394438e
fix for review
Mary-Clb Jun 24, 2025
7ac1f38
fixes for review
Mary-Clb Jul 1, 2025
4c8fbd9
update plugin version to 1.1.0-beta1
Mary-Clb Jul 1, 2025
3bce4e2
psalm
Rom1-B Aug 19, 2025
ae02d6e
beta2
Rom1-B Aug 20, 2025
6b1ecdd
psalm + rector
Rom1-B Sep 29, 2025
ad78a81
release GLPI 11.0
Rom1-B Sep 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
name: "Generate CI matrix"
uses: "glpi-project/plugin-ci-workflows/.github/workflows/generate-ci-matrix.yml@v1"
with:
glpi-version: "10.0.x"
glpi-version: "11.0.x"
ci:
name: "GLPI ${{ matrix.glpi-version }} - php:${{ matrix.php-version }} - ${{ matrix.db-image }}"
needs: "generate-ci-matrix"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules/
tests/files/_logs/*.log
vendor/
.gh_token
.phpunit.result.cache
10 changes: 6 additions & 4 deletions .twig_cs.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

declare(strict_types=1);

use FriendsOfTwig\Twigcs;
use FriendsOfTwig\Twigcs\Finder\TemplateFinder;
use FriendsOfTwig\Twigcs\Config\Config;
use Glpi\Tools\GlpiTwigRuleset;

$finder = Twigcs\Finder\TemplateFinder::create()
$finder = TemplateFinder::create()
->in(__DIR__ . '/templates')
->name('*.html.twig')
->ignoreVCSIgnored(true);

return Twigcs\Config\Config::create()
return Config::create()
->setFinder($finder)
->setRuleSet(\Glpi\Tools\GlpiTwigRuleset::class)
->setRuleSet(GlpiTwigRuleset::class)
;
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [UNRELEASED]
## [1.1.0] - 2025-09-29

### Added

- GLPI 11 compatibility

## [1.0.3] - 2025-09-04

Expand Down
2 changes: 0 additions & 2 deletions ajax/ack.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@

use GlpiPlugin\Centreon\Host;

include('../../../inc/includes.php');

Session::checkRight('computer', UPDATE);

header('Content-Type: text/html; charset=UTF-8');
Expand Down
3 changes: 1 addition & 2 deletions ajax/cancelDowntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@

use GlpiPlugin\Centreon\Host;

include('../../../inc/includes.php');

Session::checkLoginUser();
Session::checkRight('computer', UPDATE);

header('Content-Type: text/html; charset=UTF-8');
Expand Down
46 changes: 46 additions & 0 deletions ajax/checkDowntime.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php

/**
* -------------------------------------------------------------------------
* Centreon plugin for GLPI
* -------------------------------------------------------------------------
*
* LICENSE
*
* This file is part of Centreon.
*
* Centreon 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; either version 3 of the License, or
* (at your option) any later version.
*
* Centreon 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.
*
* You should have received a copy of the GNU General Public License
* along with Centreon. If not, see <http://www.gnu.org/licenses/>.
* -------------------------------------------------------------------------
* @copyright Copyright (C) 2022-2023 by Centreon plugin team.
* @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
* @link https://github.com/pluginsGLPI/centreon
* -------------------------------------------------------------------------
*/

use GlpiPlugin\Centreon\Host;

use function Safe\json_encode;

Session::checkRight('computer', UPDATE);

header('Content-Type: application/json');

if (!isset($_GET['host_id'])) {
echo json_encode(['error' => 'Missing host_id']);
} else {
$host_id = $_GET['host_id'];
$host = new Host();
$res = $host->oneHost($host_id);
echo json_encode(['in_downtime' => $res['in_downtime'] ?? null]);
}
2 changes: 0 additions & 2 deletions ajax/hostTimeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@

use GlpiPlugin\Centreon\Host;

include('../../../inc/includes.php');

Session::checkRight('computer', READ);

header('Content-Type: text/html; charset=UTF-8');
Expand Down
2 changes: 0 additions & 2 deletions ajax/sendCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@

use GlpiPlugin\Centreon\Host;

include('../../../inc/includes.php');

Session::checkRight('computer', UPDATE);

header('Content-Type: text/html; charset=UTF-8');
Expand Down
2 changes: 0 additions & 2 deletions ajax/setDowntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@

use GlpiPlugin\Centreon\Host;

include('../../../inc/includes.php');

Session::checkRight('computer', UPDATE);

header('Content-Type: text/html; charset=UTF-8');
Expand Down
4 changes: 2 additions & 2 deletions centreon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
</authors>
<versions>
<version>
<num>1.1.0-beta2</num>
<num>1.1.0</num>
<compatibility>11.0.0</compatibility>
<download_url>https://github.com/pluginsGLPI/centreon/releases/download/1.1.0-beta2/glpi-centreon-1.1.0-beta2.tar.bz2</download_url>
<download_url>https://github.com/pluginsGLPI/centreon/releases/download/1.1.0/glpi-centreon-1.1.0.tar.bz2</download_url>
</version>
<version>
<num>1.0.3</num>
Expand Down
19 changes: 4 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,16 @@
{
"require": {
"php": ">=7.4"
"php": ">=8.2"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.86",
"friendsoftwig/twigcs": "^6.1",
"glpi-project/tools": "^0.8.0",
"php-parallel-lint/php-parallel-lint": "^1.4",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan": "^2.1",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpunit/phpunit": "^9.6",
"squizlabs/php_codesniffer": "^3.13"
"glpi-project/tools": "^0.8"
},
"config": {
"optimize-autoloader": true,
"platform": {
"php": "7.4.0"
"php": "8.2.99"
},
"sort-packages": true,
"allow-plugins": {
"phpstan/extension-installer": true
}
"sort-packages": true
},
"autoload": {
"psr-4": {
Expand Down
Loading