-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add /admin/dashboard/quicksight endpoint. Ensure iframe is expanding …
…to fit the container.
- Loading branch information
1 parent
0d8927b
commit ca15ea1
Showing
5 changed files
with
72 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import * as React from "react"; | ||
import { Store } from "redux"; | ||
import { RootState } from "../store"; | ||
import * as PropTypes from "prop-types"; | ||
import Header from "./Header"; | ||
import Footer from "./Footer"; | ||
import title from "../utils/title"; | ||
import QuicksightDashboard from "./QuicksightDashboard"; | ||
|
||
export interface QuicksightDashboardPageProps extends React.Props<QuicksightDashboardPageProps> { | ||
params: { | ||
library?: string; | ||
}; | ||
} | ||
|
||
export interface QuicksightDashboardPageContext { | ||
editorStore: Store<RootState>; | ||
} | ||
|
||
/** Page holds quicksight dashboards. */ | ||
export default class DashboardPage extends React.Component<QuicksightDashboardPageProps> { | ||
context: QuicksightDashboardPageContext; | ||
|
||
static contextTypes: React.ValidationMap<QuicksightDashboardPageContext> = { | ||
editorStore: PropTypes.object.isRequired as React.Validator<Store>, | ||
}; | ||
|
||
static childContextTypes: React.ValidationMap<object> = { | ||
library: PropTypes.func, | ||
}; | ||
|
||
|
||
getChildContext() { | ||
return { | ||
library: () => this.props.params.library, | ||
}; | ||
} | ||
|
||
|
||
render(): JSX.Element { | ||
const { library } = this.props.params; | ||
return ( | ||
<div className="quicksight-dashboard"> | ||
<Header /> | ||
<main className="body"> | ||
<QuicksightDashboard dashboardId="library"/> | ||
</main> | ||
<Footer /> | ||
</div> | ||
); | ||
} | ||
|
||
UNSAFE_componentWillMount() { | ||
document.title = title("Quicksight Dashboard"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.quicksight-dashboard { | ||
.body { | ||
height: 100%; | ||
margin: 10px; | ||
margin-top: 60px; | ||
} | ||
} |