Skip to content
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

Monospace font in query output log #3739

Closed
otsaloma opened this issue Apr 26, 2019 · 1 comment
Closed

Monospace font in query output log #3739

otsaloma opened this issue Apr 26, 2019 · 1 comment
Labels

Comments

@otsaloma
Copy link
Contributor

I use the Python query runner and print calls to do debugging. The output shows up in normal paragraphs of sans-serif text, which doesn't really work for certain kinds of output, such as pandas.DataFrame.head. Below is what I mean, that's how I hacked it in my copy, but there is likely to be a more elegant fix.

diff --git a/client/app/pages/queries/query.html b/client/app/pages/queries/query.html
index d95b0b76..1eca38a2 100644
--- a/client/app/pages/queries/query.html
+++ b/client/app/pages/queries/query.html
@@ -224,7 +224,7 @@
                 <div class="d-flex flex-column p-absolute static-position__mobile" style="left: 0; top: 0; right: 0; bottom: 0;">
                   <div class="p-10" ng-show="showLog">
                     <p>Log Information:</p>
-                    <p ng-repeat="l in queryResult.getLog()">{{l}}</p>
+                    <p ng-repeat="l in queryResult.getLog()" style="font-family: monospace; white-space: pre; margin: 0;">{{l}}</p>
                   </div>
                   <ul class="tab-nav">
                     <rd-tab ng-if="!query.visualizations.length" tab-id="table" name="Table" base-path="query.getUrl(sourceMode)"></rd-tab>
@arikfr
Copy link
Member

arikfr commented Apr 28, 2019

This makes sense. You're welcome to make a pull request which implements this, but please move the style definition to a style file instead of inline styling.

otsaloma pushed a commit to otsaloma/redash that referenced this issue Apr 29, 2019
@arikfr arikfr closed this as completed in 48955b5 Apr 29, 2019
harveyrendell pushed a commit to pushpay/redash that referenced this issue Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants