Skip to content

Commit

Permalink
Merge pull request #444 from bento-platform/chore/rm-dead-grafana-code
Browse files Browse the repository at this point in the history
chore: remove a check for the old Grafana iframe tab
  • Loading branch information
davidlougheed authored Sep 11, 2024
2 parents 01a9665 + b017cb6 commit 1579604
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,9 @@ const App = () => {

const openSignInWindow = useOpenSignInWindowCallback(signInWindow, SIGN_IN_WINDOW_FEATURES);

// On the cBioPortal and Grafana tabs, eliminate the margin around the content
// to give as much space as possible to the application itself.
const margin =
window.location.pathname.endsWith("cbioportal") || window.location.pathname.endsWith("grafana") ? 0 : 26;
// On the cBioPortal tab, eliminate the margin around the content to give as much space as possible to the
// application itself.
const margin = window.location.pathname.endsWith("cbioportal") ? 0 : 26;

const threshold = useSelector((state) => state.explorer.otherThresholdPercentage) / 100;

Expand Down
8 changes: 4 additions & 4 deletions src/components/SiteHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ const CustomHeaderText = memo(() => (
<h1 style={{ color: "rgba(255, 255, 255, 0.95)", float: "left", margin: "0 24px 0 0" }}>{CUSTOM_HEADER}</h1>
));

const openGrafanaInNewTab = () => {
window.open(BENTO_GRAFANA_URL, "_blank");
};

const SiteHeader = () => {
const dispatch = useDispatch();

Expand Down Expand Up @@ -85,10 +89,6 @@ const SiteHeader = () => {
const performSignOut = usePerformSignOut();
const hasValidGrafanaRole = useHasValidGrafanaRole();

const openGrafanaInNewTab = () => {
window.open(BENTO_GRAFANA_URL, "_blank");
};

const menuItems = useMemo(
() => [
{
Expand Down

0 comments on commit 1579604

Please sign in to comment.