Skip to content

Business intelligence made simple

Removed error highlighting (broken before previous commit) [skip ci]

Andrew Kanecb20585b84f7
diff --git a/app/views/blazer/queries/_form.html.erb b/app/views/blazer/queries/_form.html.erb
index 62edbd82..a1481428 100644
--- a/app/views/blazer/queries/_form.html.erb
+++ b/app/views/blazer/queries/_form.html.erb
@@ -77,20 +77,6 @@
cancelAllQueries()
}
- var results = ""
-
- function getErrorLine() {
- var errorLine = results.substring(0, 200).includes("alert-danger") && /LINE (\d+)/g.exec(results)
-
- if (errorLine) {
- errorLine = parseInt(errorLine[1], 10)
- if (editor.getSelectedText().length >= 10) {
- errorLine += editor.getSelectionRange().start.row
- }
- return errorLine
- }
- }
-
function getSQL() {
var selectedText = editor.getSelectedText()
var text = selectedText.length < 10 ? editor.getValue() : selectedText
@@ -98,7 +84,6 @@
}
function showResults(data) {
- results = data
$("#results-html").html(data)
}
@@ -116,13 +101,7 @@
$("#results-html").show()
}
- var errorLine
-
function run(e) {
- results = ""
- if (errorLine) {
- editor.getSession().removeGutterDecoration(errorLine - 1, "error")
- }
startRunning()
cancelAllQueries()
@@ -131,14 +110,6 @@
runQuery(data, function (data) {
stopRunning()
showResults(data)
-
- errorLine = getErrorLine()
- if (errorLine) {
- editor.getSession().addGutterDecoration(errorLine - 1, "error")
- editor.scrollToLine(errorLine, true, true, function () {})
- editor.gotoLine(errorLine, 0, true)
- editor.focus()
- }
}, function (data) {
stopRunning()
$("#results-html").addClass("query-error")