Download the PHP package lagdo/jaxon-adminer without Composer
On this page you can find all versions of the php package lagdo/jaxon-adminer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lagdo/jaxon-adminer
More information about lagdo/jaxon-adminer
Files in lagdo/jaxon-adminer
Package jaxon-adminer
Short Description Database management dashboard based on Jaxon and Adminer
License BSD-3-Clause
Homepage https://github.com/lagdo/jaxon-adminer
Informations about the package jaxon-adminer
A database admin dashboard based on Jaxon and Adminer
This package is deprecated. See the Jaxon DbAdmin package.
This package inserts a database admin dashboard into an existing PHP application. Thanks to the Jaxon library, it installs and runs in a page of the application. All its operations are performed with Ajax requests.
It is based on Adminer, so it will provide the same features. For example, it will be able to manage MySQL, PostgreSQL, Sqlite, MsSQL, MongoDb and Oracle databases.
Features
- [x] Connect to a MySQL database.
- [x] Show basic info about the MySQL database server.
- [x] Show the list of tables in the connected database.
- [x] Show detailed info about the MySQL database server.
- [x] Show detailed info about the connected database.
- [x] Connect to PostgreSQL databases.
- [x] Restrict access to server info and databases.
- [x] Execute requests and display results.
- [x] Export databases to an sql file.
- [x] Import databases from one or more sql files.
- [x] Connect to other database types.
- [ ] Add others UI frameworks than Bootstrap, and let the user choose his preferred one (partially implemented, the user can choose between Bootstrap 3 and 4).
- [ ] Improve the Adminer code base (work in progress, see the https://github.com/lagdo/jaxon-adminer-drivers repo).
- [ ] Add tests
Howtos
This blog post on the Jaxon
website explains how to install Jaxon Adminer
on Voyager, an admin panel based on the Laravel
framework: In english, and in french.
Documentation
Install the jaxon library so it bootstraps from a config file and handles ajax requests. Here's the documentation.
Install this package with Composer. If a Jaxon plugin exists for your framework, you can also install it. It will automate the previous step.
Declare the package and the database servers in the app
section of the Jaxon configuration file.
Insert the CSS and javascript codes in the HTML pages of your application using calls to jaxon()->getCss()
and jaxon()->getScript(true)
.
In the page that displays the dashboard, insert the HTML code returned by the call to jaxon()->package(\Lagdo\Adminer\Package::class)->getHtml()
. Two cases are then possible.
-
If the dashboard is displayed on a dedicated page, make a call to
jaxon()->package(\Lagdo\Adminer\Package::class)->ready()
in your PHP code when loading the page. - If the dashboard is loaded with an Ajax request in a page already displayed, execute the javascript code returned the call to
jaxon()->package(\Lagdo\Adminer\Package::class)->getReadyScript()
after the page is loaded.
Additional config options
There are other config options that can be used to customize Jaxon Adminer
operation.
The default
option sets a database server Jaxon Adminer
must connect to when it starts.
The access
options restrict access only to databases or a defined set of databases on any server.
If the access.server
is set to false
at package level, then the access to all servers information will be forbidden.
The access.server
option can also be set at a server level, and in this case it applies only to that specific server.
In the above configuration, the user will be able to access server information only on the second_server
.
The access.databases
and access.schemas
options define the set of databases and schemas the user can access.
This options can only be defined at server level, and will apply to that specific server.
In the above configuration, the user will be able to get access only to three databases on the second_server
, while he will have full access to the first_server
.
Data import
SQL files can be uploaded and executed on a server. This feature is implemented using the Jaxon ajax upload feature, which then needs to be configured in the lib
section of the Jaxon
config file.
As stated in the Jaxon ajax upload documentation, sql_files
is the name
attribute of the file upload field, and of course /path/to/the/upload/dir
needs to be writable.
Other parameters can also be defined to limit the size of the uploaded files or retrict their extensions or mime types.
Data export
Databases can also be exported to various types of files: SQL, CSV, and more. A directory where the exported files are going to be saved must then be defined in the configuration, as well as an url where they can be downloaded.
The web server needs to be setup to serve the files in the dir
from url
.
Change the UI framework
Starting from version 0.6, this package is designed to support multiple UI frameworks, and multiple templates.
The current template is set using the template
option, and it default value is bootstrap3
.
The following UI frameworks are supported:
- Bootstrap 3 (
bootstrap3
) - Bootstrap 4 (
bootstrap4
)
More UI frameworks will be added in future releases.
Contribute
- Issue Tracker: github.com/lagdo/jaxon-adminer/issues
- Source Code: github.com/lagdo/jaxon-adminer
License
The project is licensed under the Apache license.