Skip to content

shuchang-wang/elasticvue

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elasticvue

Donate Chrome web store Edge extension Firefox addon Docker build

Elasticsearch gui for your browser https://elasticvue.com

Elasticsearch is a trademark of Elasticsearch BV, registered in the U.S. and in other countries.

Demo

Contents

  1. About
  2. Usage
  3. Browser support
  4. Troubleshooting
  5. Comparing with other frontends
  6. Development
  7. i18n
  8. Contributing

About

Elasticvue is a free and open-source gui for elasticsearch, allowing you to search and filter your clusters data right in your browser. Screenshots

It officially works with the following elasticsearch versions:

Other versions might or might not work depending on the features you use.

Features

  • Cluster overview
  • Index & alias management
  • Shard overview, shard relocation
  • Searching and filtering documents
  • Manually running any query against your cluster
  • Snapshot + repository management
  • Utilities, e.g. deleting all indices

Usage

Running

You can use one of the following ways to run elasticvue:

Browser extensions

Start elasticvue by clicking on the icon in your toolbar.

Docker

Use the existing image:

Or build the image locally:

  • Checkout the repo git clone https://github.com/cars10/elasticvue.git
  • Open the folder cd elasticvue
  • Build docker build -t elasticvue .
  • Run docker run -p 8080:8080 elasticvue

Or use docker-compose:

  • docker-compose up -d

Then open https://localhost:8080 in your browser.

Online version

Visit https://app.elasticvue.com.

Run locally

  • Checkout the repo git clone https://github.com/cars10/elasticvue.git
  • Open the folder cd elasticvue
  • Install dependencies yarn install
  • Run a production server via yarn prod or dev server yarn serve

Alternatively run yarn build and host the assets yourself. Example nginx config for hosting on example.com/:

server {
  listen 80;
  server_name example.com;
  root /var/www/elasticvue/dist;
  location / {
    try_files $uri $uri/ /index.html?$args;
  }
}

Run locally with subdirectory

If you want to host elasticvue under a subdirectory (like www.example.com/elasticvue) then you have to set the VUE_APP_PUBLIC_PATH environment variable while building elasticvue. The URL has to start and end with a slash!

VUE_APP_PUBLIC_PATH=/elasticvue/ yarn build

You also need to adjust your webserver config, for example:

server {
    listen 80;
    server_name _;

    root /var/www/elasticvue/dist;
    location ^~ /elasticvue {
        alias /var/www/elasticvue/dist;
        try_files $uri $uri/ /index.html?$args;
    }
}

See the official vuejs deployment guide for more details.

Elasticsearch configuration

You have to enable CORS to allow connection to your elasticsearch cluster if you do not use the browser extensions.

Find your elasticsearch configuration (for example /etc/elasticsearch/elasticsearch.yml) and add the following lines:

# enable CORS
http.cors.enabled: true

# Then set the allowed origins based on how you run elasticvue. Chose only one:
# for docker / running locally
http.cors.allow-origin: "https://localhost:8080"
# online version
http.cors.allow-origin: /https?:\/\/app.elasticvue.com/

# and if your cluster uses authorization you also have to add:
http.cors.allow-headers: X-Requested-With,Content-Type,Content-Length,Authorization

If you use docker to run your elasticsearch cluster you can pass the options via environment variables:

docker run -p 9200:9200 \
           -e "http.cors.enabled=true" \
           -e "http.cors.allow-origin=/.*/" \
           elasticsearch

This also works for docker-compose:

services:
  elasticsearch:
    image: elasticsearch
    environment:
      - http.cors.enabled=true
      - http.cors.allow-origin=/.*/
    ports:
      - 9200:9200

After configuration restart your cluster and you should be able to connect.

Browser Support

Please use an up-to-date version of:

  • Chrome / Chromium
  • Firefox
  • Edge (2020, Chrome based)

Troubleshooting

Before opening an issue please try to reset elasticvue to its default settings:

  1. Open the settings
  2. Download a backup of your current elasticvue data
  3. Click Disconnect and reset

This will reset all your saved filters, and you have to reconnect to your cluster. Feel free to open an issue if your problem persists.

Comparing with other frontends

See the Wiki. Comparing to other frontends

Development

Please make sure to use node 14.x

Setup and running

# clone
git clone https://github.com/cars10/elasticvue.git
cd elasticvue

# install dependencies
yarn install

# serve with hot reload at localhost:8080
yarn serve

# tests
yarn test:unit   # add --watch to watch test files

# for e2e tests you need a running elasticsearch server on port 9123
yarn test:e2e    # add --headless for headless mode

Other commands

# linting
yarn lint

# minimized build for production
yarn build

# create bundle size report at dist/report.html, dist/legacy-report.html
yarn build --report

Building the chrome/firefox extensions: (Hint: you need web-ext for the firefox extension to build)

yarn build_browser_extensions

i18n

Elasticvue is available in the following languages:

  • english
  • chinese

Help wanted

I do not speak chinese and therefore rely on your help to keep the chinese translation up-to-date. Please open a PR if you notice missing/wrong translations in the chinese version.

Adding a new language

If you want to add a new language: translate src/locales/en.json and open a PR.

Contributing

See CONTRIBUTING.md.

TODO

Road to 1.0

  • upgrade to vue 3. Blocked by vuetify (not compatible yet)
  • add support to directly edit/delete document #30
  • support client certificates when connecting to elasticsearch cluster #33

Future

  • cluster settings
  • data import/export

Internal stuff and refactorings

  • add more specs

License

MIT

About

Elasticsearch gui for the browser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vue 64.7%
  • JavaScript 30.2%
  • SCSS 2.9%
  • Shell 1.3%
  • Rust 0.6%
  • HTML 0.2%
  • Dockerfile 0.1%