https://github.com/jackd248/systeminformationbundle
Sonata Admin bundle to display systemically relevant information
https://github.com/jackd248/systeminformationbundle
Last synced: over 1 year ago
JSON representation
Sonata Admin bundle to display systemically relevant information
- Host: GitHub
- URL: https://github.com/jackd248/systeminformationbundle
- Owner: jackd248
- License: mit
- Created: 2021-11-02T08:22:11.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-31T08:53:04.000Z (over 1 year ago)
- Last Synced: 2025-04-15T22:54:02.856Z (over 1 year ago)
- Language: PHP
- Size: 908 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
System Information Bundle

Simple Sonata Admin bundle to get a system information overview.

This bundle combines the functionalities of the following bundles and displays the aggregated information within the backend:
- [LiipMonitorBundle](https://github.com/liip/LiipMonitorBundle)
- [Symfony Requirements Checker](https://github.com/symfony/requirements-checker)
## Install
Follow the steps to enable the system information overview in the sonata backend.
### Composer
Install bundle via composer
```bash
$ composer require kmi/system-information-bundle
```
### Routing
Add a routing entry in `config/routes/kmi_system_information.yaml`
```yaml
kmi_system_information:
resource: "@SystemInformationBundle/Resources/config/routing.yaml"
```
Extend the file with the routing definition of the LiipMonitorBundle
```yaml
_monitor:
resource: "@LiipMonitorBundle/Resources/config/routing.xml"
prefix: /monitor/health
```
### Templates
Add a twig entry in `config/packages/twig.yaml`
```yaml
paths:
'%kernel.project_dir%/vendor/kmi/system-information-bundle/src/Resources/views': SystemInformationBundle
```
### Sonata Admin Menu
Add optionally a sonata admin menu entry in `config/packages/sonata_admin.yaml` or use the system indicator twig extension (see below)
```yaml
sonata_admin:
dashboards:
groups:
app.admin.group.system:
label: 'System'
icon: ''
roles: ['ROLE_SUPER_ADMIN']
on_top: true
items:
- route: kmi_system_information_overview
label: System
```
### Assets
Install the bundle assets
```bash
$ php bin/console assets:install
$ php bin/console cache:clear
```
### Register checks
Configure [LiipMonitorBundle](https://github.com/liip/LiipMonitorBundle) in `config/packages/monitor.yaml`.
See an example in [monitor.yaml](docs/examples/monitor.yaml)
### Ready
Access the system overview page `/admin/system`.
## Twig Extensions
The bundle comes with several twig extensions
### System Indicator
The system indicator twig extension gives you a short overview about the system status in the sonata header:

Extend the Sonata Admin `standard_layout.html.twig` to enable the twig function in the backend header:
```html
{% block sonata_top_nav_menu %}
{% endblock %}
```
### App Version
Displays the application version defined in the `composer.json` file:
```html
{{ version() }}
```
### Environment Indicator
The environment indicator gives you a fast indicator about the current environment:

Extend the Sonata Admin `standard_layout.html.twig` to enable the twig function in the backend header:
```html
{% extends '@!SonataAdmin/standard_layout.html.twig' %}
{% block sonata_breadcrumb %}
{{ parent() }}
{% endblock %}
```
Extend the Sonata User `login.html.twig` to enable the twig function in the login screen:
```html
{% extends '@!SonataUser/Admin/Security/login.html.twig' %}
{% block sonata_wrapper %}
{{ parent() }}
{{ environment()|raw }}
{% endblock sonata_wrapper %}
```