Skip to content
Postgres Explain Visualizer 2
TypeScript Vue CSS HTML TSQL JavaScript Dockerfile
Branch: master
Clone or download
Latest commit 73b3d82 Oct 9, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example Invite message only on home page Oct 7, 2019
public
src Don't change url on source tab click Oct 9, 2019
.browserslistrc
.dockerignore
.editorconfig Adding editor config Apr 24, 2019
.gitignore Change build target directories Sep 11, 2019
.travis.yml
AUTHORS.md Update AUTHORS.md Aug 16, 2019
CONTRIBUTING.md
Dockerfile
LICENSE
README.md
babel.config.js
nginx.conf
package-lock.json
package.json
postcss.config.js
tsconfig.json Adding automated tests for text plans Aug 13, 2019
tslint.json New sample May 7, 2019
vue.config.js

README.md

pev2

A VueJS component to show a graphical vizualization of a PostgreSQL execution plan.

Greenkeeper badge

See Demo.

Disclaimer

This project is a rewrite of the excellent Postgres Explain Visualizer (pev). Kudos go to Alex Tatiyants.

The pev project was initialy written in early 2016 but seems to be abandonned since then. There was no activity at all for more than 3 years and counting though there are several issues open and relevant pull requests pending.

The current project has several goals:

  • isolate the plan view component and its dependencies in order to use it in any web app with for example the ability to load a plan without requiring any copy-paste from the user,
  • make it work with recent version of JS frameworks,
  • upgrade Bootstrap to a more recent version,
  • use VueJS just for a matter of taste,
  • maintain the project to match upgrades in PostgreSQL.

Usage

PEV2 is intended to be used as VueJS component.

Install it:

npm install pev2

Declare the PEV2 component and use it:

import pev2 from "pev2";

new Vue({
  el: "#app",
  data: function() {
    return {
      plan: plan,
      query: query
    };
  },
  components: {
    pev2: pev2
  }
});

Then add the PEV2 component to your template:

<div id="app">
  <pev2 :plan-source="plan" :plan-query="query"></pev2>
</div>

PEV2 requires Bootstrap (CSS) and FontAwesome to work so don't forget to add the following in you header (or load them with your favorite bundler).

<link
  href="https://unpkg.com/bootstrap@4.3.1/dist/css/bootstrap.min.css"
  rel="stylesheet"
/>
<link
  href="https://unpkg.com/font-awesome@4.7.0/css/font-awesome.css"
  rel="stylesheet"
/>

For a complete example, see this codesandbox.

You can’t perform that action at this time.