Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
ae6c5a4e
Commit
ae6c5a4e
authored
10 years ago
by
Cam Saul
Browse files
Options
Downloads
Patches
Plain Diff
don't log empty API call bodies. Show the title of an annotation
parent
46883430
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
resources/frontend_client/app/annotation/partials/annotation_form.html
+1
-1
1 addition, 1 deletion
...ntend_client/app/annotation/partials/annotation_form.html
src/metabase/middleware/log_api_call.clj
+4
-4
4 additions, 4 deletions
src/metabase/middleware/log_api_call.clj
with
5 additions
and
5 deletions
resources/frontend_client/app/annotation/partials/annotation_form.html
+
1
−
1
View file @
ae6c5a4e
...
...
@@ -14,7 +14,7 @@
<span
class=
"text-grey-3"
>
added an annotation for
</span>
<span
class=
"text-brand"
>
{{getAnnotationTimeframe(annotation)}}
</span>
</p>
<p
class=
"text-grey-5"
>
{{annotation.title}}
</p>
<p
class=
"text-grey-4"
>
{{annotation.body}}
</p>
</div>
</li>
...
...
This diff is collapsed.
Click to expand it.
src/metabase/middleware/log_api_call.clj
+
4
−
4
View file @
ae6c5a4e
...
...
@@ -42,13 +42,13 @@
(
defn-
log-request
[{
:keys
[
uri
request-method
body
]}]
(
log/debug
(
color/blue
(
format
"%s %s "
(
.toUpperCase
(
name
request-method
))
uri
)
(
when
-let
[
body-output
(
with-out-st
r
(
pp
rin
t
body
))
]
(
str
"\n"
body-output
)))))
(
when
(
o
r
(
st
rin
g?
body
)
(
coll?
body
))
(
str
"\n"
(
with-out-str
(
pprint
body
))
)))))
(
defn-
log-response
[{
:keys
[
uri
request-method
]}
{
:keys
[
status
body
]}
elapsed-time
]
(
let
[
error?
(
>=
status
400
)
color-fn
(
if
error?
color/red
color/green
)]
(
log/debug
(
color-fn
(
format
"%s %s %d (%d ms)"
(
.toUpperCase
(
name
request-method
))
uri
status
elapsed-time
)
(
when
(
or
error?
(
not
only-display-output-on-error
))
(
when
-let
[
body-output
(
with-out-st
r
(
pp
rin
t
body
))
]
(
str
"\n"
body-output
)))))))
(
when
(
o
r
(
st
rin
g?
body
)
(
coll?
body
))
(
str
"\n"
(
with-out-str
(
pprint
body
))
)))))))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment