MySQL, MariaDB, PostgreSQL, SQLite admin for Node.js
Inside settings.json
the control type for blob/bytea fields can be configured like this
{
"file": true,
"binary": true
}
This will add an input type=file
control to the editview, but instead uploading the file to the upload folder, it will store it directly into the database.
Currently the support for blob fields is very basic, if you have any comments leave them in the issue tracker
Like with PostgreSQL you need to install the SQLite bindings separately
# SQLite only: run this inside the express-admin folder
$ npm install [email protected]
The module used is https://github.com/mapbox/node-sqlite3 and it's outlined inside the documentation as well http://simov.github.io/express-admin-site/#install
sqlite
/absolute/path/to/your/database.sqlite
Since SQLite has its own build in auto incrementing id field called rowid
you can configure your project to use them like this:
"columns": [
{
"verbose": "id",
"name": "rowid",
"control": {
"text": true
},
"type": "int(11)",
"allowNull": false,
"defaultValue": null,
"listview": {
"show": false
},
"editview": {
"show": false
}
},
...
]
"table": {
"name": "...",
"pk": "rowid",
"verbose": "..."
}
Pull the latest examples from https://github.com/simov/express-admin-examples/ and see how it's done there
There is a new option available for each table's listview
key inside settings.json
http://simov.github.io/express-admin-site/#settingsjson
"table_name": {
...
"listview": {
"order": { ... },
"page": 25,
"filter": ["column_name1", "column_name2" ...]
}
}
Add any table's column including oneToMany
and manyToMany
columns. Pull the latest examples from https://github.com/simov/express-admin-examples/ and take a look at the controls
table to see how all currently available control types look like inside the Filter panel.
To expand the Filter panel click on the small icon next to the Listview's title.
All filtering options set inside the Filter panel are perceived through the entire user's session. Click on the Clear
button at any time to clear the filtering options.
date
, time
, datetime
, year
, radio
and static select
- http://simov.github.io/express-admin-site/#example-column
"listview": {
"show": true
}
public/upload
make sure you have rights to write thereconfig.json
file http://simov.github.io/express-admin-site/#configjson
settings.json
"control": {
"file": true
}
$ [sudo] npm install [-g] express-admin
# PostgreSQL only: run this inside the express-admin folder
$ npm install [email protected]
http://simov.github.io/express-admin-site/#install
pg
key http://simov.github.io/express-admin-site/#configjson
custom.json
object structure