Giter Site home page Giter Site logo

tgaertner / systeminformationbundle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jackd248/systeminformationbundle

0.0 0.0 0.0 887 KB

Sonata Admin bundle to display systemically relevant information

License: MIT License

JavaScript 0.81% PHP 60.19% CSS 8.03% Twig 30.96%

systeminformationbundle's Introduction

System Information Bundle

Settings

Simple Sonata Admin bundle to get a system information overview.

Screenshot

This bundle combines the functionalities of the following bundles and displays the aggregated information within the backend:

Install

Follow the steps to enable the system information overview in the sonata backend.

Composer

Install bundle via composer

$ composer require kmi/system-information-bundle

Routing

Add a routing entry in config/routes/kmi_system_information.yaml

kmi_system_information:
  resource: "@SystemInformationBundle/Resources/config/routing.yaml"

Extend the file with the routing definition of the LiipMonitorBundle

_monitor:
  resource: "@LiipMonitorBundle/Resources/config/routing.xml"
  prefix: /monitor/health

Templates

Add a twig entry in config/packages/twig.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)

sonata_admin:
    dashboards:
        groups:
            app.admin.group.system:
                label: 'System'
                icon: '<i class="fa fa-cogs" aria-hidden="true"></i>'
                roles: ['ROLE_SUPER_ADMIN']
                on_top: true
                items:
                    - route: kmi_system_information_overview
                      label: System

Assets

Install the bundle assets

$ php bin/console assets:install
$ php bin/console cache:clear

Register checks

Configure LiipMonitorBundle in config/packages/monitor.yaml.

See an example in 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:

Screenshot

Extend the Sonata Admin standard_layout.html.twig to enable the twig function in the backend header:

{% block sonata_top_nav_menu %}
    <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">
            <li>
                {{ system_information_indicator()|raw }}
            </li>
        </ul>
    </div>
{% endblock %}

App Version

Displays the application version defined in the composer.json file:

{{ version() }}

Environment Indicator

The environment indicator gives you a fast indicator about the current environment:

Screenshot

Extend the Sonata Admin standard_layout.html.twig to enable the twig function in the backend header:

{% extends '@!SonataAdmin/standard_layout.html.twig' %}
{% block sonata_breadcrumb %}
    <ul class="nav navbar-nav" style="float:left">
        {{ environment()|raw }}
    </ul>
    {{ parent() }}
{% endblock %}

Extend the Sonata User login.html.twig to enable the twig function in the login screen:

{% extends '@!SonataUser/Admin/Security/login.html.twig' %}

{% block sonata_wrapper %}
    {{ parent() }}
    <ul style="position: absolute;top: 10px;left: 10px;">
        {{ environment()|raw }}
    </ul>
{% endblock sonata_wrapper %}

systeminformationbundle's People

Contributors

jackd248 avatar tgaertner avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.