Skip to content

Commit

Permalink
Merge branch 'main' into bugfix/downtime
Browse files Browse the repository at this point in the history
  • Loading branch information
Mary-Clb authored Feb 2, 2024
2 parents 8fb62f1 + 6f1e445 commit dd4a0ec
Show file tree
Hide file tree
Showing 15 changed files with 238 additions and 122 deletions.
37 changes: 37 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: 2
updates:
# Ensure GitHub Actions are used in their latest version
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"

# Strategy for composer dependencies
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "monthly"
allow:
- dependency-type: "direct"
open-pull-requests-limit: 100
target-branch: "main"
versioning-strategy: "increase"
groups:
dev-dependencies:
patterns:
- "*"

# Strategy for npm dependencies
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
allow:
- dependency-type: "development"
open-pull-requests-limit: 100
target-branch: "main"
versioning-strategy: "increase"
groups:
dev-dependencies:
patterns:
- "*"
18 changes: 11 additions & 7 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,22 @@ on:
- cron: "0 0 * * *"
workflow_dispatch:

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
generate-ci-matrix:
name: "Generate CI matrix"
uses: "glpi-project/plugin-ci-workflows/.github/workflows/generate-ci-matrix.yml@v1"
with:
glpi-version: "10.0.x"
ci:
name: "GLPI ${{ matrix.glpi-version }} - php:${{ matrix.php-version }} - ${{ matrix.db-image }}"
needs: "generate-ci-matrix"
strategy:
fail-fast: false
matrix:
include:
- {glpi-version: "10.0.x", php-version: "7.4", db-image: "mysql:5.7"}
- {glpi-version: "10.0.x", php-version: "8.0", db-image: "mysql:8.0"}
- {glpi-version: "10.0.x", php-version: "8.1", db-image: "mariadb:10.2"}
- {glpi-version: "10.0.x", php-version: "8.2", db-image: "mariadb:11.0"}
- {glpi-version: "10.0.x", php-version: "8.3-rc", db-image: "mysql:8.0"}
matrix: ${{ fromJson(needs.generate-ci-matrix.outputs.matrix) }}
uses: "glpi-project/plugin-ci-workflows/.github/workflows/continuous-integration.yml@v1"
with:
plugin-key: "centreon"
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ This plugin allows you to see in your GLPI interface informations about the host

First, register your url to Centreon, username & password on the Centreon settings page :

![centreon config page](https://github.com/pluginsGLPI/centreon/main/docs/screenshots/centreon-settings.jpg)
![centreon config page](docs/screenshots/centreon-settings.jpg)

As the connexion works successfully, a green badge appears on the bottom of the page.

## See host status in your computers list

You can now have a glimpse of your host status from the computers list :

![centreon status on computer](https://github.com/pluginsGLPI/centreon/main/docs/screenshots/centreon-settings.jpg)
![centreon status on computer](docs/screenshots/centreon-settings.jpg)

## See all information about a host

For seeing more, click on the host and on the Centreon tab : you can access to all general information about the host and its services, without going on your Centreon app !

![centreon host page](https://github.com/pluginsGLPI/centreon/main/docs/screenshots/centreon-accueil.jpg)
![centreon host page](docs/screenshots/centreon-accueil.jpg)

## Timeline and actions

Click on the timeline tab to see what happened on your host recently : yesterday, since one week, or since one month :

![centreon host page](https://github.com/pluginsGLPI/centreon/main/docs/screenshots/centreon-timeline.jpg)
![centreon host page](docs/screenshots/centreon-timeline.jpg)

You can also perform 3 common actions :
1. Send a check
Expand Down
2 changes: 2 additions & 0 deletions ajax/ack.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

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

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

header("Content-Type: text/html; charset=UTF-8");

if (isset($_POST['hostid'])) {
Expand Down
2 changes: 2 additions & 0 deletions ajax/cancelDowntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

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

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

header("Content-Type: text/html; charset=UTF-8");

if (isset($_POST['downtimeid'])) {
Expand Down
2 changes: 2 additions & 0 deletions ajax/hostTimeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

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

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

header("Content-Type: text/html; charset=UTF-8");

if (isset($_GET['period']) && isset($_GET['hostid'])) {
Expand Down
2 changes: 2 additions & 0 deletions ajax/sendCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

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

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

header("Content-Type: text/html; charset=UTF-8");

if (isset($_POST['hostid'])) {
Expand Down
2 changes: 2 additions & 0 deletions ajax/setDowntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

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

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

header("Content-Type: text/html; charset=UTF-8");

if (isset($_POST['params'])) {
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"php": ">=7.4"
},
"require-dev": {
"glpi-project/tools": "^0.7.1",
"glpi-project/tools": "^0.7.2",
"php-parallel-lint/php-parallel-lint": "^1.3",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^9.6",
"squizlabs/php_codesniffer": "^3.7"
"squizlabs/php_codesniffer": "^3.8"
},
"config": {
"optimize-autoloader": true,
Expand Down
Loading

0 comments on commit dd4a0ec

Please sign in to comment.