-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
be74f02
commit 2fb003b
Showing
14 changed files
with
371 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<template> | ||
<div id="inspect-pane" class="ace-github-dark"> | ||
<tabs :labels="['json', 'plan']"> | ||
<template v-slot:json> | ||
<query-request | ||
:host="host" | ||
:query="query"> | ||
</query-request> | ||
</template> | ||
<template v-slot:plan> | ||
<query-request | ||
:host="host" | ||
:query="query" | ||
:params="{plan: true}"> | ||
</query-request> | ||
</template> | ||
</tabs> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "inspect-pane", | ||
} | ||
</script> | ||
|
||
<script setup> | ||
import { defineProps } from 'vue'; | ||
const props = defineProps({ | ||
host: {type: String, required: true }, | ||
query: {type: String, required: true } | ||
}); | ||
</script> | ||
|
||
<style scoped> | ||
#inspect-pane { | ||
position: relative; | ||
grid-column: 3; | ||
grid-row: 3 / 4; | ||
border-radius: var(--border-radius-medium); | ||
height: calc(100vh - 60px); | ||
margin: 0px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<template> | ||
<pre class="query-result-error"><span>error</span>: {{error}}</pre> | ||
</template> | ||
|
||
<script> | ||
export default { name: "query-error" } | ||
</script> | ||
|
||
<script setup> | ||
import { defineProps } from 'vue'; | ||
const props = defineProps({ | ||
error: {type: String, required: true } | ||
}); | ||
</script> | ||
|
||
<style scoped> | ||
pre.query-result-error { | ||
word-wrap: break-word; | ||
} | ||
pre.query-result-error span { | ||
color: var(--bright-red); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<template> | ||
<render/> | ||
</template> | ||
|
||
<script> | ||
export default { name: "query-plan" }; | ||
</script> | ||
|
||
<script setup> | ||
import { h, defineProps } from 'vue'; | ||
const props = defineProps({ | ||
plan: {type: String, required: true} | ||
}); | ||
const render = () => { | ||
let elems = [ ]; | ||
const plan = props.plan; | ||
const lines = plan.split("\n"); | ||
for (const line of lines) { | ||
const tokens = line.split("[[0;"); | ||
for (const token of tokens) { | ||
const color = token.slice(0, 2); | ||
const text = token.slice(3, token.length); | ||
elems.push(h('span', | ||
{class: 'plan-color-' + color}, | ||
[text] | ||
)); | ||
} | ||
elems.push(h('br')); | ||
} | ||
return h('pre', elems); | ||
}; | ||
</script> | ||
|
||
<style> | ||
span.plan-color-49 { | ||
color: var(--primary-text); | ||
} | ||
span.plan-color-37 { | ||
color: var(--secondary-text); | ||
} | ||
span.plan-color-32 { | ||
color: var(--primary-color); | ||
} | ||
span.plan-color-34 { | ||
color: var(--secondary-color); | ||
} | ||
span.plan-color-33 { | ||
color: var(--tertiary-color); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.