mirror of
https://github.com/simon987/toolbox.git
synced 2025-04-10 05:56:44 +00:00
add pev2
This commit is contained in:
parent
f8883e9d97
commit
aca92d07bb
@ -81,7 +81,6 @@ def spectrograph(file: bytes = File(...), x: int = Form(...), y: int = Form(...)
|
|||||||
"-x", str(x), "-y", str(y), "-z", str(z),
|
"-x", str(x), "-y", str(y), "-z", str(z),
|
||||||
"-w", window,
|
"-w", window,
|
||||||
"-o", "-"],
|
"-o", "-"],
|
||||||
cwd="./FlameGraph",
|
|
||||||
stdin=PIPE, stdout=PIPE, stderr=PIPE,
|
stdin=PIPE, stdout=PIPE, stderr=PIPE,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
1069
toolbox-web/package-lock.json
generated
1069
toolbox-web/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -11,6 +11,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.19.2",
|
"axios": "^0.19.2",
|
||||||
"core-js": "^3.6.5",
|
"core-js": "^3.6.5",
|
||||||
|
"pev2": "^0.8.0",
|
||||||
"vue": "^2.6.11",
|
"vue": "^2.6.11",
|
||||||
"vue-class-component": "^7.2.3",
|
"vue-class-component": "^7.2.3",
|
||||||
"vue-property-decorator": "^8.4.2",
|
"vue-property-decorator": "^8.4.2",
|
||||||
|
@ -60,7 +60,7 @@ export default class App extends Vue {
|
|||||||
html, body {
|
html, body {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
overflow: hidden !important;
|
overflow: auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.monospace {
|
.monospace {
|
||||||
|
7
toolbox-web/src/assets/bootstrap.min.css
vendored
Normal file
7
toolbox-web/src/assets/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
toolbox-web/src/assets/pev2.png
Normal file
BIN
toolbox-web/src/assets/pev2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
@ -12,6 +12,12 @@
|
|||||||
<v-card-title>Spectrograph</v-card-title>
|
<v-card-title>Spectrograph</v-card-title>
|
||||||
<v-card-subtitle>Generate spectrograph of audio files with <i>SoX</i></v-card-subtitle>
|
<v-card-subtitle>Generate spectrograph of audio files with <i>SoX</i></v-card-subtitle>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
|
<v-card class="mx-2" max-width="344" to="/tool/pev2">
|
||||||
|
<v-img :src="require('@/assets/pev2.png')" height="200px"></v-img>
|
||||||
|
<v-card-title>PEV2</v-card-title>
|
||||||
|
<v-card-subtitle>Postgres Explain Visualizer</v-card-subtitle>
|
||||||
|
</v-card>
|
||||||
</v-row>
|
</v-row>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
64
toolbox-web/src/components/Pev2.vue
Normal file
64
toolbox-web/src/components/Pev2.vue
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<span>Use with <code>EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON)</code></span>
|
||||||
|
<v-row>
|
||||||
|
<v-col cols="12" md="6">
|
||||||
|
<v-textarea v-model="plan" dense rows="2" label="Plan" outlined></v-textarea>
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="12" md="6">
|
||||||
|
<v-textarea v-model="query" dense rows="2" label="Query" outlined></v-textarea>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
<pev2 class="pev2" ref="pev2" v-if="!loading && plan" :plan-source="plan" :plan-query="query"></pev2>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import pev2 from 'pev2'
|
||||||
|
import { Watch, Component } from 'vue-property-decorator'
|
||||||
|
import Vue from 'vue'
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
components: {
|
||||||
|
pev2: pev2
|
||||||
|
}
|
||||||
|
})
|
||||||
|
export default class Pev2 extends Vue {
|
||||||
|
plan = ""
|
||||||
|
query = ""
|
||||||
|
loading = false
|
||||||
|
|
||||||
|
@Watch("plan")
|
||||||
|
onPlanChange() {
|
||||||
|
if (this.plan) {
|
||||||
|
this.loading = true
|
||||||
|
window.setTimeout(() => this.loading = false, 10)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Watch("query")
|
||||||
|
onQueryChange() {
|
||||||
|
if (this.query) {
|
||||||
|
this.loading = true
|
||||||
|
window.setTimeout(() => this.loading = false, 10)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.plan-container {
|
||||||
|
margin-left: -15px;
|
||||||
|
margin-right: -15px;
|
||||||
|
margin-top: -12px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/* Undo bootstrap fuckery */
|
||||||
|
*:hover {
|
||||||
|
text-decoration: none !important;
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,3 +1,4 @@
|
|||||||
|
import "bootstrap/dist/css/bootstrap.min.css"
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import router from './router'
|
import router from './router'
|
||||||
|
@ -3,13 +3,15 @@ import VueRouter, {RouteConfig} from 'vue-router'
|
|||||||
import Home from '../components/Home.vue'
|
import Home from '../components/Home.vue'
|
||||||
import FlameGraph from '@/components/FlameGraph.vue'
|
import FlameGraph from '@/components/FlameGraph.vue'
|
||||||
import Spectrograph from '@/components/Spectrograph.vue';
|
import Spectrograph from '@/components/Spectrograph.vue';
|
||||||
|
import Pev2 from '@/components/Pev2.vue';
|
||||||
|
|
||||||
Vue.use(VueRouter)
|
Vue.use(VueRouter)
|
||||||
|
|
||||||
const routes: Array<RouteConfig> = [
|
const routes: Array<RouteConfig> = [
|
||||||
{path: '/', component: Home},
|
{path: '/', component: Home},
|
||||||
{path: '/tool/FlameGraph', component: FlameGraph},
|
{path: '/tool/FlameGraph', component: FlameGraph},
|
||||||
{path: '/tool/Spectrograph', component: Spectrograph}
|
{path: '/tool/Spectrograph', component: Spectrograph},
|
||||||
|
{path: '/tool/pev2', component: Pev2}
|
||||||
]
|
]
|
||||||
|
|
||||||
const router = new VueRouter({
|
const router = new VueRouter({
|
||||||
|
@ -2,7 +2,8 @@ import {Tool} from "@/models";
|
|||||||
|
|
||||||
export const tools: Tool[] = [
|
export const tools: Tool[] = [
|
||||||
{name: "FlameGraph", icon: "mdi-bug"},
|
{name: "FlameGraph", icon: "mdi-bug"},
|
||||||
{name: "Spectrograph", icon: "mdi-music"}
|
{name: "Spectrograph", icon: "mdi-music"},
|
||||||
|
{name: "pev2", icon: "mdi-bug"},
|
||||||
]
|
]
|
||||||
|
|
||||||
export const toolByName = (name: string) => {
|
export const toolByName = (name: string) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user