manuxi / sulu-dashboard-bundle
Dashboard for the Sulu 3 admin: start page with tiles, plus a small interface for other bundles and projects to add their own tiles
Package info
github.com/manuxi/SuluDashboardBundle
Type:symfony-bundle
pkg:composer/manuxi/sulu-dashboard-bundle
Requires
- php: ^8.2
- doctrine/dbal: ^3.6 | ^4.0
- sulu/sulu: ^3.0
- symfony/config: ^6.4 | ^7.0
- symfony/console: ^6.4 | ^7.0
- symfony/dependency-injection: ^6.4 | ^7.0
- symfony/framework-bundle: ^6.4 | ^7.0
- symfony/http-foundation: ^6.4 | ^7.0
- symfony/http-kernel: ^6.4 | ^7.0
- symfony/process: ^6.4 | ^7.0 | ^8.0
- symfony/routing: ^6.4 | ^7.0
- symfony/security-core: ^6.4 | ^7.0
Requires (Dev)
- cmsig/seal-memory-adapter: ^0.12
- doctrine/migrations: ^3.7
- friendsofphp/php-cs-fixer: ^3.64
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^10.5 | ^11.0
- symfony/browser-kit: ^6.4 | ^7.0
- symfony/messenger: ^6.4 | ^7.0 | ^8.0
- symfony/phpunit-bridge: ^6.4 | ^7.0
- symfony/var-exporter: ^6.4 | ^7.0
Suggests
- amoifr/sulu-log-stats-bundle: ~0.1, adds the tab "Visitors" (tiles, charts, top lists) and the tile "Visitors (7 days)" to the dashboard
- doctrine/doctrine-migrations-bundle: Shows the open database migrations on the tile "System"
- symfony/messenger: Shows the failed messages (failure_transport) on the tile "System"
Provides
None
Conflicts
None
Replaces
None
README
The SuluDashboardBundle gives the Sulu 3 admin a start page. Instead of an empty area, editors see what is left to do (open drafts), what happened lately, how complete the translations are and how much content there is.
The page is built only from the components of Sulu (toolbar with language select, grid, cards, tables, publish indicator). Other bundles and projects add their own tiles with a small PHP class, without JavaScript.
The screenshots show the German admin.
Every user can arrange the tiles to their liking. In customize mode a tile can be moved, hidden or reset to the default:
โจ Features
- Open drafts - Pages and articles that are not live as edited, sortable, filter by type and "Only mine", pen button to the form
- Figures - Pages, articles, snippets and media, split by publish state with Sulu's publish indicator
- Translations - Missing and outdated translations per language, with a list of what is missing
- Recent activity - From Sulu's activity API
- Customize - Every user can arrange, hide and reset tiles; the columns balance themselves until then
- Permissions - Own permission for the dashboard; every tile respects the permissions of the content and its own security context
- Tile interface -
DashboardWidgetInterface, display typesnumber,progress,list,bars,chart(line and bar charts in SVG) andcustom(own React component) - Tabs - Bundles can add a whole page as a tab (
DashboardTabProviderInterface); withamoifr/sulu-log-stats-bundle(~0.1) the dashboard gets the tab "Visitors" made of tiles (figures, charts, top lists, table of days; arrange, hide, choose the period) and a tile. The visitor statistics come from the bundle amoifr/sulu-log-stats-bundle by Amoifr. Thank you for such a lean bundle that keeps data to a minimum. - System tab - For administrators only (own permission): a tab of tiles: the condition at a glance (vulnerabilities, PHP support, debug mode in production, open migrations, failed messages, age of the last check), a table of known vulnerabilities (
composer auditby cron job, with package, version, ID, title as a link, severity, date), versions with newer patch releases, PHP settings and OPcache, and disk use. Nothing of it is on the overview. - Errors stay in their tile - Every tile loads its data on its own
๐ Prerequisites
- PHP 8.2 or higher
- Sulu CMS 3.0 or higher
- Symfony 6.4 or higher
๐ฉ๐ปโ๐ญ Installation
Step 1: Install the package
composer require manuxi/sulu-dashboard-bundle
Without Symfony Flex, add the bundle to config/bundles.php:
return [ //... Manuxi\SuluDashboardBundle\SuluDashboardBundle::class => ['all' => true], ];
Step 2: Configure routes
Add to config/routes_admin.yaml:
SuluDashboardBundle: resource: '@SuluDashboardBundle/Resources/config/routes_admin.yaml'
Step 3: Admin JavaScript
In assets/admin/package.json:
"sulu-dashboard-bundle": "file:../../vendor/manuxi/sulu-dashboard-bundle/src/Resources/js"
In assets/admin/app.js:
import 'sulu-dashboard-bundle';
Then build the admin (npm install, npm run build in assets/admin) and clear the cache.
Step 4: Grant permissions
- Go to Sulu Admin โ Settings โ User Roles
- Find the role, open the group Settings
- Enable "view" for
sulu.settings.dashboard - Reload the page
The dashboard has no database tables.
๐ฃ Usage
After the login the admin opens the dashboard; the first menu item Dashboard leads back to it. The language select in the toolbar sets the content language of the tiles.
Check what a user sees without logging in:
php bin/console sulu:dashboard:dump --user=admin --locale=en
Your own tile
final class ProjectsWidget implements DashboardWidgetInterface { // getKey(), getTitle(), getType(), getSecurityContext(), getColumn(), getPriority() ... public function getData(string $locale): array { return ['value' => $this->projects->count()]; } }
With autoconfigure the class is found automatically. More: Your own tile in 5 minutes, including an optional dependency for other bundles.
๐งถ Configuration
# config/packages/sulu_dashboard.yaml sulu_dashboard: start_page: true # true: dashboard on "/", Sulu's search moves to "/search"; false: dashboard on "/dashboard", search stays on "/" tabs: replace_navigation: true # a tab may replace a menu item of another bundle (the statistics of the log statistics) extensions: tab: true # tiles of other bundles in the tab "Extensions"; false: everything on the overview keep_on_overview: [] # keys that stay on the overview anyway log_stats: overview_tile: false # true: small tile "Visitors (7 days)" on the overview (otherwise the tab only) tab: tiles # tiles: the tab "Visitors" is made of tiles; view: the page of the log statistics bundle unchanged layout: balance: true # after loading, move tiles from the end of the longer column into the shorter one (once); false: tiles stay in their column system: composer_binary: composer # tab "System": command in the PATH or path to a composer.phar composer_home: ~ # tab "System": folder for the home and cache of Composer (null: only where the environment has none) max_age: 48 # hours after which the last background check counts as too old disabled_widgets: [] # keys of tiles that are not shown, e.g. ['sulu_activities']
Sulu's search and the dashboard both want the path /. The router of the admin takes the first matching view, so with start_page: true the dashboard moves the search view sulu_search.search to /search (its name, menu item and links stay the same).
๐ Documentation
- Your own tile in 5 minutes - Interface, display types, optional dependency, tag
- Customize the dashboard - Arrange, hide and reset tiles per user (screenshot, admin in German)
- Tabs - A whole page of a bundle as a tab, tab "Extensions" for the tiles of other bundles, visitors from the log statistics
- System - Tab for administrators: vulnerabilities, versions, debug warning, storage, cron job
- Built-in tiles - Tiles, permissions, the permission of the dashboard
๐ฉโ๐ณ Contributing
Contributions are welcome! Please create issues or pull requests.
๐ License
This bundle is licensed under the MIT License. See LICENSE.
๐ Credits
Created and maintained by manuxi.
Thanks to the Sulu team for the great CMS and fantastic support!

