Low-code Admin panel and Business intelligence Rails engine. No DSL - configurable from the UI. Rails Admin, Active Admin, Blazer modern alternative.
Low-code Admin panel and Business intelligence Rails engine. No DSL - configurable from the UI. Rails Admin, Active Admin, Blazer modern alternative.
Add this line to your application's Gemfile:
gem 'motor-admin'And then execute:
$ bundle installCreate and run migration:
$ rails motor:install && rake db:migrateEverything in the admin panel can be configured using the intuitive settings UI, which can be opened via the icon in the top right corner.
Data displayed on the resource page can be completely customized via SQL queries and dashboards attached to the resource as a tab. Usually, queries used to display resource data should contain {{resource_name_id}} variable.
Learn more about resource customizations
Custom resource actions can be added via Active Record method call, API endpoint, or custom forms. Also, it's possible to override default create/update/delete actions.
Any ActiveRecord model method or attribute can be exposed to the admin panel by adding a new column with the name that matches the method name from the resource model:
…sh MOTOR_ACTIVE_STORAGE_DIRECT_UPLOADS_ENABLED=true
_Note: At the moment, this will enable direct uploads globally_
### I18n
Motor Admin can use Rails ActiveRecord i18n keys to render resource translations:
```yml
es:
activerecord:
models:
customer:
one: Cliente
other: Clientes
attributes:
customer:
name: Nombre
scopes:
customer:
enabled: ActivadoAll admin panel configurations are automatically stored in the config/motor.yml file. It's recommended to include this file in the application git repository to always have the admin panel configurations in sync across different local and remote environments.
It's possible to sync local development admin panel configurations with remote production application via rake motor:sync task:
MOTOR_SYNC_REMOTE_URL=https://remote-app-url/ MOTOR_SYNC_API_KEY=secure-random-string rake motor:syncAdmin panel can be secured with 'Basic authentication' by specifying MOTOR_AUTH_USERNAME and MOTOR_AUTH_PASSWORD environment variables.
Alternatively, it can be secured with devise or any other authentication library used by the application:
authenticate :admin_user do
mount Motor::Admin => '/admin'
endStart webpack dev server:
yarn install && yarn serveSetup development database:
rake app:db:create && rake app:db:setupStart example application in development mode:
MOTOR_DEVELOPMENT=true rails sMotor Admin is licensed under the MIT license.
No open issues yet, or sync has not completed.