Skip to content
Snippets Groups Projects
Commit 6f5723c2 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

get onClickOutside working so you can exit the modal and only show the link to admins.

parent 19da2c27
No related branches found
No related tags found
No related merge requests found
......@@ -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/logs", { credentials: 'same-origin' });
let logs = await response.json()
this.setState({ logs: logs.reverse() })
}, 1000);
......
......@@ -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>
......
......@@ -29,6 +29,10 @@
width: 480px;
}
.Modal.Modal--wide {
width: 85%;
}
.Modal-backdrop {
position: fixed;
top: 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment