PHPackages                             javer/influxdb-admin-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. javer/influxdb-admin-bundle

ActiveSymfony-bundle[Admin Panels](/categories/admin)

javer/influxdb-admin-bundle
===========================

Provides integration of InfluxDB ODM with SonataAdminBundle

v2.5.0(2y ago)020.3kMITPHPPHP &gt;=8.1

Since Oct 18Pushed 2y ago1 watchersCompare

[ Source](https://github.com/javer/JaverInfluxDBAdminBundle)[ Packagist](https://packagist.org/packages/javer/influxdb-admin-bundle)[ Docs](https://github.com/javer/JaverInfluxDBAdminBundle)[ RSS](/packages/javer-influxdb-admin-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (12)Used By (0)

JaverInfluxDBAdminBundle
========================

[](#javerinfluxdbadminbundle)

This bundle integrates the [InfluxDB Object Document Mapper (ODM) library](https://github.com/javer/influxdb-odm)into SonataAdminBundle so that you can persist and retrieve objects to and from InfluxDB.

[![Build Status](https://github.com/javer/JaverInfluxDBAdminBundle/actions/workflows/test.yaml/badge.svg)](https://github.com/javer/JaverInfluxDBAdminBundle/actions/workflows/test.yaml)

Installation
============

[](#installation)

Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

Applications that use Symfony Flex
----------------------------------

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
$ composer require javer/influxdb-admin-bundle
```

Applications that don't use Symfony Flex
----------------------------------------

[](#applications-that-dont-use-symfony-flex)

### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer require javer/influxdb-admin-bundle
```

### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
    Javer\InfluxDB\AdminBundle\JaverInfluxDBAdminBundle::class => ['all' => true],
];
```

Configuration
=============

[](#configuration)

Full configuration options:

```
javer_influx_db_admin:
    templates:
        form:
            - '@SonataAdmin/Form/form_admin_fields.html.twig'
        filter:
            - '@SonataAdmin/Form/filter_admin_fields.html.twig'
        types:
            list:
                array:      "@SonataAdmin/CRUD/list_array.html.twig"
                boolean:    "@SonataAdmin/CRUD/list_boolean.html.twig"
                date:       "@SonataAdmin/CRUD/list_date.html.twig"
                time:       "@SonataAdmin/CRUD/list_time.html.twig"
                datetime:   "@SonataAdmin/CRUD/list_datetime.html.twig"
                text:       "@SonataAdmin/CRUD/base_list_field.html.twig"
                trans:      "@SonataAdmin/CRUD/list_trans.html.twig"
                string:     "@SonataAdmin/CRUD/base_list_field.html.twig"
                smallint:   "@SonataAdmin/CRUD/base_list_field.html.twig"
                bigint:     "@SonataAdmin/CRUD/base_list_field.html.twig"
                integer:    "@SonataAdmin/CRUD/base_list_field.html.twig"
                decimal:    "@SonataAdmin/CRUD/base_list_field.html.twig"
                identifier: "@SonataAdmin/CRUD/base_list_field.html.twig"
            show:
                array:      "@SonataAdmin/CRUD/show_array.html.twig"
                boolean:    "@SonataAdmin/CRUD/show_boolean.html.twig"
                date:       "@SonataAdmin/CRUD/show_date.html.twig"
                time:       "@SonataAdmin/CRUD/show_time.html.twig"
                datetime:   "@SonataAdmin/CRUD/show_datetime.html.twig"
                text:       "@SonataAdmin/CRUD/base_show_field.html.twig"
                trans:      "@SonataAdmin/CRUD/show_trans.html.twig"
                string:     "@SonataAdmin/CRUD/base_show_field.html.twig"
                smallint:   "@SonataAdmin/CRUD/base_show_field.html.twig"
                bigint:     "@SonataAdmin/CRUD/base_show_field.html.twig"
                integer:    "@SonataAdmin/CRUD/base_show_field.html.twig"
                decimal:    "@SonataAdmin/CRUD/base_show_field.html.twig"
```

Admin class definition
======================

[](#admin-class-definition)

Example of `CpuLoadAdmin` definition:

```
# config/services.yaml
services:
    acme.admin.cpu_load:
        class: App\Admin\CpuLoadAdmin
        arguments: [ ~, App\Measurement\CpuLoad, ~ ]
        tags:
            - { name: sonata.admin, manager_type: influxdb, label: 'CPU Load', pager_type: simple }
```

Please note that you must use `influxdb` as `manager_type` to work with InfluxDB measurement class. Pager `pager_type` can be either `default` or `simple`.

Example of `CpuLoad` measurement class:

```
// src/Measurement/CpuLoad.php
namespace App\Measurement;

use Javer\InfluxDB\ODM\Mapping\Annotations as InfluxDB;

/**
 * @InfluxDB\Measurement(name="cpu_load")
 */
class CpuLoad
{
    /**
     * @InfluxDB\Timestamp(precision="u")
     */
    private ?\DateTime $time = null;

    /**
     * @InfluxDB\Tag(name="server_id", type="integer")
     */
    private ?int $serverId = null;

    /**
     * @InfluxDB\Tag(name="core_number", type="integer")
     */
    private ?int $coreNumber = null;

    /**
     * @InfluxDB\Field(name="load", type="float")
     */
    private ?float $load = null;

    // ...getters and setters
}
```

Example of `CpuLoadAdmin` class:

```
namespace App\Admin;

use Sonata\AdminBundle\Admin\AbstractAdmin;

class CpuLoadAdmin extends AbstractAdmin
{
    protected function generateBaseRouteName(bool $isChildAdmin = false): string
    {
        return 'cpu_load';
    }

    protected function generateBaseRoutePattern(bool $isChildAdmin = false): string
    {
        return 'cpu_load';
    }

    protected function configureListFields(ListMapper $list): void
    {
        // ...
    }

    protected function configureDatagridFilters(DatagridMapper $filter): void
    {
        // ...
    }

    protected function configureShowFields(ShowMapper $show): void
    {
        // ...
    }

    protected function configureFormFields(FormMapper $form): void
    {
        // ...
    }
}
```

Please note that you must explicitly implement `generateBaseRouteName()` and `generateBaseRoutePattern()`because they results cannot detected automatically from the measurement class name.

List field definition
=====================

[](#list-field-definition)

These fields are used to display the information inside the list table.

Example
-------

[](#example)

```
namespace App\Admin;

use Sonata\AdminBundle\Admin\AbstractAdmin;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\FieldDescription\FieldDescriptionInterface;

class CpuLoadAdmin extends AbstractAdmin
{
    protected function configureListFields(ListMapper $list): void
    {
        $list
            ->addIdentifier('time', FieldDescriptionInterface::TYPE_DATETIME, [
                'format' => 'Y-m-d H:i:s.u',
            ])
            ->add('serverId')
            ->add('load')
            ->add(ListMapper::NAME_ACTIONS, ListMapper::TYPE_ACTIONS, [
                'actions' => [
                    'show' => [],
                    'edit' => [],
                    'delete' => [],
                ],
            ]);
    }
}
```

Available types
---------------

[](#available-types)

The most important option for each field is the `type`. The available types include:

- datetime (`FieldDescriptionInterface::TYPE_DATETIME`)
- boolean (`FieldDescriptionInterface::TYPE_BOOLEAN`)
- integer (`FieldDescriptionInterface::TYPE_INTEGER`)
- float (`FieldDescriptionInterface::TYPE_FLOAT`)
- string (`FieldDescriptionInterface::TYPE_STRING`)

If no type is set, the `Admin` class will use the type defined in the doctrine mapping definition.

Filter field definition
=======================

[](#filter-field-definition)

These fields are displayed inside the filter box. They allow you to filter the list of entities by a number of different methods.

Example
-------

[](#example-1)

```
namespace App\Admin;

use Javer\InfluxDB\AdminBundle\Filter\DateTimeRangeFilter;
use Sonata\AdminBundle\Admin\AbstractAdmin;
use Sonata\AdminBundle\Datagrid\DatagridMapper;

class CpuLoadAdmin extends AbstractAdmin
{
    protected function configureDatagridFilters(DatagridMapper $filter): void
    {
        $filter
            ->add('time', DateTimeRangeFilter::class)
            ->add('serverId');
    }
}
```

Available types
---------------

[](#available-types-1)

The most important option for each filter is the `type`. The available types from namespace `Javer\InfluxDB\AdminBundle\Filter` are:

- BooleanFilter
- NumberFilter
- StringFilter
- ChoiceFilter
- CallbackFilter
- DateFilter
- DateTimeFilter
- DateRangeFilter
- DateTimeRangeFilter

Form field definition
=====================

[](#form-field-definition)

These fields are used to edit data on the edit page.

Example
-------

[](#example-2)

```
namespace App\Admin;

use Sonata\AdminBundle\Admin\AbstractAdmin;
use Sonata\AdminBundle\Form\FormMapper;

class CpuLoadAdmin extends AbstractAdmin
{
    protected function configureFormFields(FormMapper $form): void
    {
        $form
            ->add('serverId')
            ->add('load');
    }
}
```

Available types
---------------

[](#available-types-2)

- checkbox
- integer
- text
- choice
- datetime

If no type is set, the `Admin` class will use the one set in the doctrine mapping definition.

InfluxDB Proxy Query
====================

[](#influxdb-proxy-query)

The `ProxyQuery` object is used to add missing features from the original Doctrine Query builder:

```
use Javer\InfluxDB\AdminBundle\Datagrid\ProxyQuery;

$query = $this->measurementManager->createQuery();

$proxyQuery = new ProxyQuery($query);
$proxyQuery->setSortBy('time');
$proxyQuery->setMaxResults(10);

$results = $proxyQuery->execute();
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 95.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~117 days

Recently: every ~190 days

Total

11

Last Release

861d ago

Major Versions

v1.0.2 → v2.0.0-rc.12021-08-16

PHP version history (3 changes)v1.0.0PHP &gt;=7.4

v2.1.0PHP &gt;=8.0

v2.5.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e4ae642c5f1ad16c9b07e976096123f9ef8d50ee7df05123ed1e7f55b29caa9?d=identicon)[javer](/maintainers/javer)

---

Top Contributors

[![javer](https://avatars.githubusercontent.com/u/591296?v=4)](https://github.com/javer "javer (21 commits)")[![manowark](https://avatars.githubusercontent.com/u/4329477?v=4)](https://github.com/manowark "manowark (1 commits)")

---

Tags

symfonyodmadmininfluxdbsonata

###  Code Quality

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/javer-influxdb-admin-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/javer-influxdb-admin-bundle/health.svg)](https://phpackages.com/packages/javer-influxdb-admin-bundle)
```

###  Alternatives

[sonata-project/admin-bundle

The missing Symfony Admin Generator

2.1k19.0M299](/packages/sonata-project-admin-bundle)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k16.7M310](/packages/easycorp-easyadmin-bundle)[sonata-project/doctrine-orm-admin-bundle

Integrate Doctrine ORM into the SonataAdminBundle

46117.7M155](/packages/sonata-project-doctrine-orm-admin-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1714.8k8](/packages/2lenet-crudit-bundle)[pirasterize/sonata-form-builder

A drag&amp;drop form builder for sonata admin

192.9k](/packages/pirasterize-sonata-form-builder)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
