Kinto/kinto-admin
Acerca de
Kinto Web Administration Console
Desarrollo web y de aplicacionesCrecimiento de estrellas medido
- in 24h
- -1
- in 7 days
- -1
- in 15 days
- -1
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalKinto Web Administration Console
A Web admin UI to manage data from a Kinto server. Demo.
kinto-admin wants to be the pgAdmin for
Kinto. You can also use it to build administration interfaces for
Kinto-based systems.
Table of Contents
- Prerequisites
- Installation
- Build customization
- Hacking on kinto-admin
- Development server
- Tests
- Custom RJSF fields
- FAQ
- Releasing
- Deploying to github-pages
- License
Prerequisites
NodeJS v16+ and npm 8+ should be installed and available on your machine.
Various pre-commit hooks are available to help prevent you from
pushing sub-optimal code; to use these, pip install --user pre-commit and pre-commit install. (If you have a
.git/hooks/pre-commit.legacy, you can remove it.)
Installation
Prebuilt Single Server Assets
If you intend to use Kinto Admin in a Kinto Server with standard options, since version v3.0.3, you can download prebuilt assets for each release.
Building the Assets
To customize your Kinto Admin installation, you can download the source code and build the asset bundle. Then, you can serve the bundle from your server of choice. See below for customization options.
Latest Release
download the latest release from Github.
Unzip the directory, then install dependencies:
$ cd kinto-admin && npm ci
- Build the static bundle with:
$ npm run build
Earlier Release
To download an earlier release, set a KINTO_ADMIN_VERSION environment variable with the tag you're downloading. For example:
export KINTO_ADMIN_VERSION="v1.2.3"
curl -OL "https://github.com/Kinto/kinto-admin/archive/refs/tags/${KINTO_ADMIN_VERSION}.tar.gz"
# ...
npm ci
npm run build
This will inject the version into the built asset bundle.
Build customization
Use the following options to customize the Kinto Admin build.
Single Server
By default, Kinto Admin gives you the option to connect to multiple Kinto Servers. If you only want Kinto Admin to connect to the server from which it's being served, you can set the KINTO_ADMIN_SINGLE_SERVER flag as an environment variable:
$ KINTO_ADMIN_SINGLE_SERVER=1 npm run build
Building for relative paths
By default, Kinto Admin assumes assets will be served from the root path (/) of the server. If you'd like to serve assets from a different location, set that option with the ASSET_PATH environment variable:
$ ASSET_PATH="/some/prefix/" npm run build
Hacking on kinto-admin
Clone repository:
$ git clone https://github.com/Kinto/kinto-admin.git
Install packages:
$ cd kinto-admin && npm install
Optionally, configure git to use .git-blame-ignore-revs to remove noisy commits (e.g. running prettier on the entire codebase) from git blame:
$ git config blame.ignoreRevsFile .git-blame-ignore-revs
After installation of packages, run the development server.
$ npm run start
Development server
The development server should only be used when working on the
kinto-admin codebase itself. If you're evaluating Kinto Admin, or
building a system that relies on Kinto Admin to administer, you should
install Kinto Admin using the installation instructions above.
To run in development mode:
$ npm run start
The application is served at localhost:3000, and any React component update will trigger a hot reload.
Tests
To run tests:
$ npm run test-all
Custom RJSF fields
We have expanded the RJSF functionality with a base64 encoded file upload. It can be used by declaring a string field on a collection's JSON schema and specifying the base64file widget in the UI schema. Examples:
JSON schema:
{
"type": "object",
"properties": {
"b64example": {
"type": "string",
"title": "Base64 Upload",
"description": "Upload a small file here..."
}
}
}
UI schema:
{
"b64example": {
"ui:widget": "base64file"
},
"ui:order": [
"b64example"
]
}
FAQ
Browser support
Let's be honest, we're mainly testing kinto-admin on recent versions of Firefox and Chrome, so we can't really guarantee proper compatibility with IE, Safari, Opera and others. We're accepting pull requests though.
How to display a nested field value using the collection displayFields property?
Use the dot notation.
For example, if you have the following record:
{
"data": {
"attachment": {
"filename": "font.ttf"
}
}
}
You can use attachment.filename.
We tried our best to make it work with properties having dots in their name.
For instance:
{
"data": {
"target": {
"proof.hash": "abcd",
"merkle.tree": {
"file.name": "foobar"
}
}
}
}
If you use target.merkle.tree.file.name it will render the string
foobar and target.proof.hash will render abcd.
Releasing
Releases can be created through the GitHub UI or through git command line.
Through GitHub UI
- Create a new release as normal
- When tagging your release, enter a standard version number like
vX.Y.Z - After the release is published (including pre-release), built assets will be attached as files, including:
- Source code based on the tagged commit
- A single-server build for kinto-admin in a tar file (this may take a few minutes to show up)
Through git commands
- Tag a commit with
git tag --annotate vX.Y.Z(this will become the version number in the built release) - Push the tag with
git push origin vX.Y.Zorgit push origin --tags - A new release draft will be created automatically with built assets attached as files, including:
- Source code based on the tagged commit
- A single-server build for kinto-admin in a tar file
- This will have
ASSET_PATH=/v1/admin KINTO_ADMIN_SINGLE_SERVER=1build property values - This may take a few minutes to show up
- This will have
- Update the release body with detailed information
- Publish the release when ready
Deploying to github-pages
Repo configuration for forks
- Enable github pages and allow deployment from github actions
- Go Settings > Pages
- Under "Build and deployment" choose Source > GitHub Actions
- Choose which branches should be allowed to deploy to pages
- Go Settings > Environments > Github Pages
- Under "Deployment branches and tags", configure which branches should be allowed to deploy to pages
Deployed automatically on release publish
Github pages will automatically be updated upon release publishing. Version will be the tag created
Running the github action manually
You can deploy to github pages manually for To deploy to github pages manually for any user acceptance testing you may want to do.
- Open Actions
- Select the "Deploy to Github Pages" action
- Select "Run workflow" and choose the branch you wish to build against
- Click "Run workflow"
- Kinto-admin will be deployed to
https://{owner}.github.io/kinto-admin
License
Apache Licence Version 2.0
Explorar proyectos relacionados
Cargando…