-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
9c44314
commit 39f1088
Showing
7 changed files
with
126 additions
and
2 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,95 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Query and Execution Plan</title> | ||
<style> | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
body { | ||
font-family: Arial, sans-serif; | ||
background-color: #f4f4f4; | ||
margin: 0; | ||
padding: 0; | ||
overflow-x: hidden; | ||
} | ||
|
||
.container { | ||
width: 100%; | ||
max-width: 100%; | ||
margin: 0 auto; | ||
background: #fff; | ||
padding: 5px; | ||
border-radius: 5px; | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
.query, .plan { | ||
margin-bottom: 5px; | ||
} | ||
|
||
.query { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
pre { | ||
white-space: pre; | ||
background: #f0f0f0; | ||
border: 1px solid #ddd; | ||
padding: 10px; | ||
border-radius: 4px; | ||
overflow-x: auto; | ||
font-size: 13px; | ||
max-width: 100%; | ||
word-wrap: normal; | ||
} | ||
|
||
.line { | ||
border-top: 2px solid #000; | ||
margin: 2px 0; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<div class="container"> | ||
<div class="query"> | ||
<pre id="query"></pre> | ||
</div> | ||
|
||
<div class="line"></div> | ||
|
||
<div class="plan"> | ||
<pre id="plan"></pre> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
function escapeHtml(text) { | ||
return text | ||
.replace(/&/g, '&') | ||
.replace(/</g, '<') | ||
.replace(/>/g, '>') | ||
.replace(/"/g, '"') | ||
.replace(/'/g, '''); | ||
} | ||
|
||
function replaceNewlines(text) { | ||
return text.replace(/\r\n|\r|\n/g, '<br>'); | ||
} | ||
|
||
const query = '{query}'; | ||
const plan = `{plan}`; | ||
|
||
document.getElementById('query').innerHTML = escapeHtml(query); | ||
document.getElementById('plan').innerHTML = replaceNewlines(escapeHtml(plan)); | ||
</script> | ||
|
||
</body> | ||
</html> |
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