Make dashboards index header into component
parent
a21cde8054
commit
93459b7a48
|
@ -0,0 +1,28 @@
|
|||
import React, {PropTypes} from 'react'
|
||||
|
||||
import SourceIndicator from 'shared/components/SourceIndicator'
|
||||
|
||||
const DashboardsHeader = ({sourceName}) => {
|
||||
return (
|
||||
<div className="page-header">
|
||||
<div className="page-header__container">
|
||||
<div className="page-header__left">
|
||||
<h1 className="page-header__title">
|
||||
Dashboards
|
||||
</h1>
|
||||
</div>
|
||||
<div className="page-header__right">
|
||||
<SourceIndicator sourceName={sourceName} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const {string} = PropTypes
|
||||
|
||||
DashboardsHeader.propTypes = {
|
||||
sourceName: string.isRequired,
|
||||
}
|
||||
|
||||
export default DashboardsHeader
|
|
@ -5,7 +5,7 @@ import {bindActionCreators} from 'redux'
|
|||
|
||||
import _ from 'lodash'
|
||||
|
||||
import SourceIndicator from 'shared/components/SourceIndicator'
|
||||
import DashboardsHeader from 'src/dashboards/components/DashboardsHeader'
|
||||
import DeleteConfirmTableCell from 'shared/components/DeleteConfirmTableCell'
|
||||
import FancyScrollbar from 'shared/components/FancyScrollbar'
|
||||
|
||||
|
@ -63,18 +63,7 @@ const DashboardsPage = React.createClass({
|
|||
|
||||
return (
|
||||
<div className="page">
|
||||
<div className="page-header">
|
||||
<div className="page-header__container">
|
||||
<div className="page-header__left">
|
||||
<h1 className="page-header__title">
|
||||
Dashboards
|
||||
</h1>
|
||||
</div>
|
||||
<div className="page-header__right">
|
||||
<SourceIndicator sourceName={this.props.source.name} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<DashboardsHeader sourceName={this.props.source.name} />
|
||||
<FancyScrollbar className="page-contents">
|
||||
<div className="container-fluid">
|
||||
<div className="row">
|
||||
|
|
Loading…
Reference in New Issue