@@ -148,13 +205,33 @@ export const SourcePage = React.createClass({
)
- },
-})
-
-function mapStateToProps(_) {
- return {}
+ }
}
-export default connect(mapStateToProps, {addSourceAction, updateSourceAction})(
- withRouter(SourcePage)
-)
+const {func, shape, string} = PropTypes
+
+SourcePage.propTypes = {
+ params: shape({
+ id: string,
+ sourceID: string,
+ }),
+ router: shape({
+ push: func.isRequired,
+ }).isRequired,
+ location: shape({
+ query: shape({
+ redirectPath: string,
+ }).isRequired,
+ }).isRequired,
+ notify: func,
+ addSourceAction: func,
+ updateSourceAction: func,
+}
+
+const mapStateToProps = () => ({})
+
+export default connect(mapStateToProps, {
+ notify: publishNotification,
+ addSourceAction,
+ updateSourceAction,
+})(withRouter(SourcePage))
diff --git a/ui/src/sources/index.js b/ui/src/sources/index.js
index 9cb7df89eb..416cd7a817 100644
--- a/ui/src/sources/index.js
+++ b/ui/src/sources/index.js
@@ -1,4 +1,3 @@
-import CreateSource from './containers/CreateSource'
import SourcePage from './containers/SourcePage'
import ManageSources from './containers/ManageSources'
-export {CreateSource, SourcePage, ManageSources}
+export {SourcePage, ManageSources}
diff --git a/ui/src/style/layout/page-header.scss b/ui/src/style/layout/page-header.scss
index 4477b6c291..9b2d89cc3b 100644
--- a/ui/src/style/layout/page-header.scss
+++ b/ui/src/style/layout/page-header.scss
@@ -23,6 +23,7 @@ $page-header-weight: 400 !important;
max-width: 100%;
}
.page-header__container {
+ position: relative;
width: 100%;
display: flex;
align-items: center;
@@ -31,6 +32,26 @@ $page-header-weight: 400 !important;
width: 100%;
max-width: ($page-wrapper-max-width - $page-wrapper-padding - $page-wrapper-padding);
}
+.page-header__container.page-header__source-page {
+ justify-content: center;
+}
+.page-header__col-md-8 {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+@media screen and (min-width: 992px) {
+ /*
+ NOTE:
+ Breakpoint and % width are based on the bootstrap grid
+ If the source form column sizing is ever changed, this
+ will have to be manually updated
+ */
+ .page-header__col-md-8 {
+ width: 66.66667%;
+ }
+}
.page-header__left,
.page-header__right {
display: flex;
diff --git a/ui/src/style/layout/page.scss b/ui/src/style/layout/page.scss
index 51680d3cec..935a685ea7 100644
--- a/ui/src/style/layout/page.scss
+++ b/ui/src/style/layout/page.scss
@@ -22,6 +22,11 @@
width: 100%;
height: calc(100% - #{$chronograf-page-header-height}) !important;
@include gradient-v($g2-kevlar,$g0-obsidian);
+
+ &:only-child {
+ top: 0;
+ height: 100%;
+ }
}
.container-fluid {
padding: ($chronograf-page-header-height / 2) $page-wrapper-padding;
@@ -36,7 +41,7 @@
.page-contents.presentation-mode {
top: 0;
height: 100% !important;
-
+
.container-fluid {padding: 8px !important;}
.template-control--manage {display: none;}
-}
\ No newline at end of file
+}