docEditor
Kibana plugin for editing and saving index values through forms.
Package
- npm package name:
@dharun235/doc-editor
- GitHub release artifact:
docEditor-9.3.0.zip
Requirements
- Use Kibana
9.3.0.
- Keep this plugin on the same Kibana version as the host repo.
Local setup
git clone --filter=blob:none https://github.com/elastic/kibana.git
cd kibana
- Fetch the appropriate tag. Here it is 9.3.0
git fetch --tags
git checkout v9.3.0
grep '"version"' package.json
- Put this plugin folder inside the Kibana repo at
kibana/plugins/docEditor.
- From the Kibana repo root, run:
yarn kbn bootstrap
- Start Kibana from the Kibana repo root:
yarn start
- For plugin UI development, run this in the plugin folder:
yarn dev --watch
Where to change code
public/: UI code, forms, components, and client-side feature changes.
server/: backend routes, server logic, and data handling.
common/: shared types, config, and code used by both public and server.
kibana.json: Version control of kibana and required plugins for the docEditor plugin
If you are adding a new feature, first decide whether it belongs in public, server, or common, then update the matching files there.
Build the plugin
Build the distributable zip from the plugin folder:
yarn build
The build output is created under build/ and should match the Kibana version, for example:
build/docEditor-9.3.0.zip
Publish
- Package: run
npm publish --access public from this folder after a successful build.
- GitHub release: upload
build/docEditor-9.3.0.zip as the release asset for the matching tag.
Copy to the remote server
Copy the zip to the remote machine:
scp build/docEditor-9.3.0.zip 202Q-lab-user-sudo@202q.mc2.chalmers.se:/tmp/
Then SSH in:
ssh 202Q-lab-user-sudo@202q.mc2.chalmers.se
Install the plugin inside the Kibana directory on the server:
sudo bin/kibana-plugin install file:///tmp/docEditor-9.3.0.zip
Restart Kibana:
sudo systemctl restart kibana
Typical change flow
- Edit the plugin files.
- Run
yarn dev --watch while developing.
- Rebuild with
yarn build.
- Copy the new zip to the server.
- Reinstall the zip and restart Kibana.
Note
- Ensure kibana version, version mentioned inside
kibana.json and elasticsearch is same