New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added minimal web UI #16158
Added minimal web UI #16158
Conversation
TODO: add an option to clamp settings instead of throw in HTTP interface. |
TSan: #15984 |
@@ -0,0 +1,437 @@ | |||
<html> <!-- TODO If I write DOCTYPE HTML something changes but I don't know what. --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xhr.open('POST', url, true); | ||
xhr.send(query); | ||
|
||
xhr.onreadystatechange = function() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious, any particular reason you're mixing modern CSS features (var
) with old IE-style JS? (XHR+onreadystatechange
, for..in
, event.charCode
etc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I "learned" HTML, JS and CSS during my middle-school years in early 2000s (actually never read a book).
I continue to mix my old habits with copy-pasting code from Stackoverflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to use Fetch API but it was not working from file://
page to request the server (most likely due to cross-origin policy, but setting parameter to disable it did not help).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have intention to present this simple page as an example of small self-contained code, so everyone can suggest changes to help me to make it perfect from every kind of sense.
var is_null = (cell === null); | ||
var content = document.createTextNode(is_null ? 'ᴺᵁᴸᴸ' : cell); | ||
td.appendChild(content); | ||
td.className = response.meta[col_idx].type.match(/^(U?Int|Decimal|Float)/) ? 'right' : 'left'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suboptimal, will change.
just use clickhouse server ip to use ,like http://ip:8123/play |
the window is small,50% of the page is better, and Could you provide SQL formatter? |
nice! the first limitations that I notice:
|
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Added minimal web UI to ClickHouse.