diff --git a/VERSION b/VERSION
index ff2fd4fbe..9eadd6baa 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.8.5
\ No newline at end of file
+1.8.6
\ No newline at end of file
diff --git a/assets/css/app.scss b/assets/css/app.scss
index ebc81ae59..9ad737513 100644
--- a/assets/css/app.scss
+++ b/assets/css/app.scss
@@ -1,5 +1,7 @@
/* This file is for your main application css. */
@import "~bootstrap/scss/bootstrap";
+@import "../../deps/live_monaco_editor/priv/static/live_monaco_editor.min.css";
+
@import "named_variables";
@import "dashboard";
@import "header";
diff --git a/assets/js/app.js b/assets/js/app.js
index 7b7484ed3..1e6d0579e 100644
--- a/assets/js/app.js
+++ b/assets/js/app.js
@@ -1,6 +1,7 @@
import "../css/app.scss";
import { Socket } from "phoenix";
import "../css/tailwind.css";
+
import "bootstrap";
import ClipboardJS from "clipboard";
import * as Dashboard from "./dashboard";
@@ -19,6 +20,8 @@ import sourceLiveViewHooks from "./source_lv_hooks";
import logsLiveViewHooks from "./log_event_live_hooks";
import $ from "jquery";
import moment from "moment";
+import { CodeEditorHook } from "../../deps/live_monaco_editor/priv/static/live_monaco_editor.esm"
+
// set moment globally before daterangepicker
window.moment = moment;
@@ -50,6 +53,8 @@ const hooks = {
...logsLiveViewHooks,
...LiveModalHooks,
...BillingHooks,
+ CodeEditorHook
+
};
let liveSocket = new LiveSocket("/live", Socket, {
diff --git a/assets/package-lock.json b/assets/package-lock.json
index f0bd55d4a..48ce771d7 100644
--- a/assets/package-lock.json
+++ b/assets/package-lock.json
@@ -38,20 +38,23 @@
"glob": "^10.3.1",
"postcss": "^8.4.31",
"sass": "^1.58.3",
- "tailwindcss": "^3.3.2"
+ "tailwindcss": "^3.4.10"
}
},
"../deps/phoenix": {
- "version": "0.0.1"
+ "version": "1.7.10",
+ "license": "MIT"
},
"../deps/phoenix_html": {
- "version": "0.0.1"
+ "version": "3.3.3"
},
"../deps/phoenix_live_react": {
- "version": "0.0.1"
+ "version": "0.4.2",
+ "license": "MIT"
},
"../deps/phoenix_live_view": {
- "version": "0.0.1"
+ "version": "0.20.1",
+ "license": "MIT"
},
"node_modules/@alloc/quick-lru": {
"version": "5.2.0",
@@ -1685,9 +1688,9 @@
}
},
"node_modules/fast-glob": {
- "version": "3.2.12",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
- "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
+ "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
"dev": true,
"dependencies": {
"@nodelib/fs.stat": "^2.0.2",
@@ -2046,9 +2049,9 @@
}
},
"node_modules/jiti": {
- "version": "1.18.2",
- "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.18.2.tgz",
- "integrity": "sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==",
+ "version": "1.21.6",
+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz",
+ "integrity": "sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==",
"dev": true,
"bin": {
"jiti": "bin/jiti.js"
@@ -3078,9 +3081,9 @@
}
},
"node_modules/tailwindcss": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.2.tgz",
- "integrity": "sha512-9jPkMiIBXvPc2KywkraqsUfbfj+dHDb+JPWtSJa9MLFdrPyazI7q6WX2sUrm7R9eVR7qqv3Pas7EvQFzxKnI6w==",
+ "version": "3.4.10",
+ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.10.tgz",
+ "integrity": "sha512-KWZkVPm7yJRhdu4SRSl9d4AK2wM3a50UsvgHZO7xY77NQr2V+fIrEuoDGQcbvswWvFGbS2f6e+jC/6WJm1Dl0w==",
"dev": true,
"dependencies": {
"@alloc/quick-lru": "^5.2.0",
@@ -3088,10 +3091,10 @@
"chokidar": "^3.5.3",
"didyoumean": "^1.2.2",
"dlv": "^1.1.3",
- "fast-glob": "^3.2.12",
+ "fast-glob": "^3.3.0",
"glob-parent": "^6.0.2",
"is-glob": "^4.0.3",
- "jiti": "^1.18.2",
+ "jiti": "^1.21.0",
"lilconfig": "^2.1.0",
"micromatch": "^4.0.5",
"normalize-path": "^3.0.0",
@@ -3103,7 +3106,6 @@
"postcss-load-config": "^4.0.1",
"postcss-nested": "^6.0.1",
"postcss-selector-parser": "^6.0.11",
- "postcss-value-parser": "^4.2.0",
"resolve": "^1.22.2",
"sucrase": "^3.32.0"
},
@@ -4517,9 +4519,9 @@
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="
},
"fast-glob": {
- "version": "3.2.12",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
- "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
+ "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
"dev": true,
"requires": {
"@nodelib/fs.stat": "^2.0.2",
@@ -4787,9 +4789,9 @@
}
},
"jiti": {
- "version": "1.18.2",
- "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.18.2.tgz",
- "integrity": "sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==",
+ "version": "1.21.6",
+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz",
+ "integrity": "sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==",
"dev": true
},
"jquery": {
@@ -5505,9 +5507,9 @@
"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="
},
"tailwindcss": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.2.tgz",
- "integrity": "sha512-9jPkMiIBXvPc2KywkraqsUfbfj+dHDb+JPWtSJa9MLFdrPyazI7q6WX2sUrm7R9eVR7qqv3Pas7EvQFzxKnI6w==",
+ "version": "3.4.10",
+ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.10.tgz",
+ "integrity": "sha512-KWZkVPm7yJRhdu4SRSl9d4AK2wM3a50UsvgHZO7xY77NQr2V+fIrEuoDGQcbvswWvFGbS2f6e+jC/6WJm1Dl0w==",
"dev": true,
"requires": {
"@alloc/quick-lru": "^5.2.0",
@@ -5515,10 +5517,10 @@
"chokidar": "^3.5.3",
"didyoumean": "^1.2.2",
"dlv": "^1.1.3",
- "fast-glob": "^3.2.12",
+ "fast-glob": "^3.3.0",
"glob-parent": "^6.0.2",
"is-glob": "^4.0.3",
- "jiti": "^1.18.2",
+ "jiti": "^1.21.0",
"lilconfig": "^2.1.0",
"micromatch": "^4.0.5",
"normalize-path": "^3.0.0",
@@ -5530,7 +5532,6 @@
"postcss-load-config": "^4.0.1",
"postcss-nested": "^6.0.1",
"postcss-selector-parser": "^6.0.11",
- "postcss-value-parser": "^4.2.0",
"resolve": "^1.22.2",
"sucrase": "^3.32.0"
},
diff --git a/assets/package.json b/assets/package.json
index 7e99b6b64..0995486c7 100644
--- a/assets/package.json
+++ b/assets/package.json
@@ -38,6 +38,6 @@
"glob": "^10.3.1",
"postcss": "^8.4.31",
"sass": "^1.58.3",
- "tailwindcss": "^3.3.2"
+ "tailwindcss": "^3.4.10"
}
}
diff --git a/lib/logflare_web/live/query_live.ex b/lib/logflare_web/live/query_live.ex
new file mode 100644
index 000000000..437b6deb1
--- /dev/null
+++ b/lib/logflare_web/live/query_live.ex
@@ -0,0 +1,243 @@
+defmodule LogflareWeb.QueryLive do
+ @moduledoc false
+ use LogflareWeb, :live_view
+ use Phoenix.Component
+
+ require Logger
+
+ alias Logflare.Endpoints
+ alias Logflare.Users
+
+ def render(assigns) do
+ ~H"""
+ <.subheader>
+ <:path>
+ ~/<.subheader_path_link live_patch to={~p"/query"}>query
+
+
+
+
+ Query your data with BigQuery SQL directly. You can refer to source names directly in your SELECT queries, for example
+ SELECT datetime(timestamp) as timestamp, event_message, metadata from `MyApp.Logs`
+ Some pointers:
+
+
+ Read the docs
+ to find out more about querying Logflare with BigQuery SQL
+ timestamp
column in your WHERE
clauseCROSS JOIN UNNEST(my_table.my_column) as col
to use nested fields in your query`MyEndpointName`
for query composition
+ No rows returned from query. Try adjusting your query and try again! +
+<%= k %> | +
---|
+ <%= case value = Map.get(row, k) do %> + <% value when is_map(value) or is_list(value) -> %> + + <% value -> %> + + <%= value %> + + <% end %> + + + | +