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
6f5723c2
Commit
6f5723c2
authored
8 years ago
by
Allen Gilliland
Browse files
Options
Downloads
Patches
Plain Diff
get onClickOutside working so you can exit the modal and only show the link to admins.
parent
19da2c27
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
frontend/src/components/Logs.jsx
+2
-1
2 additions, 1 deletion
frontend/src/components/Logs.jsx
frontend/src/components/ProfileLink.jsx
+9
-7
9 additions, 7 deletions
frontend/src/components/ProfileLink.jsx
frontend/src/css/components/modal.css
+4
-0
4 additions, 0 deletions
frontend/src/css/components/modal.css
with
15 additions
and
8 deletions
frontend/src/components/Logs.jsx
+
2
−
1
View file @
6f5723c2
...
...
@@ -2,6 +2,7 @@ import React, { Component, PropTypes } from "react";
import
ReactDOM
from
"
react-dom
"
;
import
LoadingAndErrorWrapper
from
"
metabase/components/LoadingAndErrorWrapper.jsx
"
;
import
OnClickOutsideWrapper
from
"
metabase/components/OnClickOutsideWrapper.jsx
"
;
import
reactAnsiStyle
from
"
react-ansi-style
"
;
import
"
react-ansi-style/inject-css
"
;
...
...
@@ -31,7 +32,7 @@ export default class Logs extends Component {
componentWillMount
()
{
this
.
timer
=
setInterval
(
async
()
=>
{
let
response
=
await
fetch
(
"
/api/log
"
,
{
credentials
:
'
same-origin
'
});
let
response
=
await
fetch
(
"
/api/
util/
log
s
"
,
{
credentials
:
'
same-origin
'
});
let
logs
=
await
response
.
json
()
this
.
setState
({
logs
:
logs
.
reverse
()
})
},
1000
);
...
...
This diff is collapsed.
Click to expand it.
frontend/src/components/ProfileLink.jsx
+
9
−
7
View file @
6f5723c2
...
...
@@ -101,11 +101,13 @@ export default class ProfileLink extends Component {
</
a
>
</
li
>
<
li
>
<
a
data-metabase-event
=
{
"
Navbar;Profile Dropdown;Debugging
"
+
tag
}
onClick
=
{
this
.
openModal
.
bind
(
this
,
"
logs
"
)
}
className
=
"Dropdown-item block text-white no-decoration"
>
Logs
</
a
>
</
li
>
{
user
.
is_superuser
&&
<
li
>
<
a
data-metabase-event
=
{
"
Navbar;Profile Dropdown;Debugging
"
+
tag
}
onClick
=
{
this
.
openModal
.
bind
(
this
,
"
logs
"
)
}
className
=
"Dropdown-item block text-white no-decoration"
>
Logs
</
a
>
</
li
>
}
<
li
>
<
a
data-metabase-event
=
{
"
Navbar;Profile Dropdown;About
"
+
tag
}
onClick
=
{
this
.
openModal
.
bind
(
this
,
"
about
"
)
}
className
=
"Dropdown-item block text-white no-decoration"
>
...
...
@@ -141,8 +143,8 @@ export default class ProfileLink extends Component {
</
div
>
</
Modal
>
:
modalOpen
===
"
logs
"
?
<
Modal
className
=
"Modal
"
>
<
Logs
/>
<
Modal
className
=
"Modal
Modal--wide"
onClose
=
{
this
.
closeModal
}
>
<
Logs
onClose
=
{
this
.
closeModal
}
/>
</
Modal
>
:
null
}
</
div
>
...
...
This diff is collapsed.
Click to expand it.
frontend/src/css/components/modal.css
+
4
−
0
View file @
6f5723c2
...
...
@@ -29,6 +29,10 @@
width
:
480px
;
}
.Modal.Modal--wide
{
width
:
85%
;
}
.Modal-backdrop
{
position
:
fixed
;
top
:
0
;
...
...
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