Skip to content

fix(webui): make metric SQLs readable with syntax highlighting#1282

Closed
Mohamed-Elfardy wants to merge 3 commits intocybertec-postgresql:masterfrom
Mohamed-Elfardy:fix/sql-queries-syntax-highlighting
Closed

fix(webui): make metric SQLs readable with syntax highlighting#1282
Mohamed-Elfardy wants to merge 3 commits intocybertec-postgresql:masterfrom
Mohamed-Elfardy:fix/sql-queries-syntax-highlighting

Conversation

@Mohamed-Elfardy
Copy link
Copy Markdown
Contributor

Fixes #1241

The SQL queries displayed in the web ui were unreadable
so i
Added react-syntax-highlighter for dependency.
Replaced plain text rendering with SyntaxHighlighter component.
Used Light build to minimize bundle size.
Added wrapLongLines for better readability.

before:
image

after :
image

@pashagolub
Copy link
Copy Markdown
Collaborator

thanks for woking on this. Should it follow the color palette? It's kind of weird to have black theme for SQL surrounded by white theme

@Mohamed-Elfardy
Copy link
Copy Markdown
Contributor Author

It's kind of weird to have black theme for SQL surrounded by white theme

I wanted to make the queries more clear.

i think this is more suitable than the dark theme
image

@0xgouda
Copy link
Copy Markdown
Collaborator

0xgouda commented Mar 6, 2026

duplicate of: #1280

plus why didn't you include the AI policy fields?

@Mohamed-Elfardy
Copy link
Copy Markdown
Contributor Author

duplicate of: #1280

i didn't duplicate anything from this pr even didn't see the changes on code he had done.

plus why didn't you include the AI policy fields?

i will make sure from now to make the PRs include it.

@0xgouda
Copy link
Copy Markdown
Collaborator

0xgouda commented Mar 6, 2026

i didn't duplicate anything from this pr even didn't see the changes on code he had done.

I didn't mean that you toke from him, but given that both of you didn't ask to work on it and that he sent his PR earlier, he has a higher priority.

@pashagolub pashagolub closed this Mar 6, 2026
@pashagolub pashagolub self-assigned this Mar 6, 2026
@pashagolub pashagolub added the wontfix This will not be worked on label Mar 6, 2026
@Mohamed-Elfardy Mohamed-Elfardy deleted the fix/sql-queries-syntax-highlighting branch March 14, 2026 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The metric sqls in webui are not readable

3 participants