Remove passed-in props from all SourceIndicator instances
Signed-off-by: Alex Paxton <thealexpaxton@gmail.com>pull/10616/head
parent
02e9b63501
commit
37c3a1948e
|
@ -154,7 +154,7 @@ class AdminPage extends Component {
|
|||
<h1 className="page-header__title">Admin</h1>
|
||||
</div>
|
||||
<div className="page-header__right">
|
||||
<SourceIndicator sourceName={source.name} />
|
||||
<SourceIndicator />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -156,7 +156,7 @@ class AlertsApp extends Component {
|
|||
<h1 className="page-header__title">Alert History</h1>
|
||||
</div>
|
||||
<div className="page-header__right">
|
||||
<SourceIndicator sourceName={source.name} />
|
||||
<SourceIndicator />
|
||||
<CustomTimeRangeDropdown
|
||||
onApplyTimeRange={this.handleApplyTime}
|
||||
timeRange={timeRange}
|
||||
|
|
|
@ -18,7 +18,6 @@ const DashboardHeader = ({
|
|||
handleChooseTimeRange,
|
||||
handleChooseAutoRefresh,
|
||||
handleClickPresentationButton,
|
||||
source,
|
||||
onAddCell,
|
||||
onEditDashboard,
|
||||
onToggleTempVarControls,
|
||||
|
@ -49,7 +48,7 @@ const DashboardHeader = ({
|
|||
</div>
|
||||
<div className="page-header__right">
|
||||
<GraphTips />
|
||||
<SourceIndicator sourceName={source.name} />
|
||||
<SourceIndicator />
|
||||
{dashboard
|
||||
? <button className="btn btn-primary btn-sm" onClick={onAddCell}>
|
||||
<span className="icon plus" />
|
||||
|
@ -107,7 +106,6 @@ DashboardHeader.defaultProps = {
|
|||
}
|
||||
|
||||
DashboardHeader.propTypes = {
|
||||
sourceID: string,
|
||||
children: array,
|
||||
buttonText: string,
|
||||
dashboard: shape({}),
|
||||
|
@ -121,7 +119,6 @@ DashboardHeader.propTypes = {
|
|||
handleChooseTimeRange: func.isRequired,
|
||||
handleChooseAutoRefresh: func.isRequired,
|
||||
handleClickPresentationButton: func.isRequired,
|
||||
source: shape({}),
|
||||
onAddCell: func,
|
||||
onEditDashboard: func,
|
||||
onToggleTempVarControls: func,
|
||||
|
|
|
@ -1,26 +1,17 @@
|
|||
import React, {PropTypes} from 'react'
|
||||
import React 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>
|
||||
const DashboardsHeader = () =>
|
||||
<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 />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const {string} = PropTypes
|
||||
|
||||
DashboardsHeader.propTypes = {
|
||||
sourceName: string.isRequired,
|
||||
}
|
||||
</div>
|
||||
|
||||
export default DashboardsHeader
|
||||
|
|
|
@ -22,12 +22,6 @@ const Header = React.createClass({
|
|||
}).isRequired,
|
||||
},
|
||||
|
||||
contextTypes: {
|
||||
source: shape({
|
||||
name: string,
|
||||
}),
|
||||
},
|
||||
|
||||
handleChooseTimeRange(bounds) {
|
||||
this.props.actions.setTimeRange(bounds)
|
||||
},
|
||||
|
@ -48,7 +42,7 @@ const Header = React.createClass({
|
|||
</div>
|
||||
<div className="page-header__right">
|
||||
<GraphTips />
|
||||
<SourceIndicator sourceName={this.context.source.name} />
|
||||
<SourceIndicator />
|
||||
<div
|
||||
className="btn btn-sm btn-default"
|
||||
onClick={showWriteForm}
|
||||
|
|
|
@ -84,7 +84,7 @@ export const HostsPage = React.createClass({
|
|||
<h1 className="page-header__title">Host List</h1>
|
||||
</div>
|
||||
<div className="page-header__right">
|
||||
<SourceIndicator sourceName={source.name} />
|
||||
<SourceIndicator />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -99,7 +99,7 @@ const KapacitorRules = ({
|
|||
)
|
||||
}
|
||||
|
||||
const PageContents = ({children, source}) =>
|
||||
const PageContents = ({children}) =>
|
||||
<div className="page">
|
||||
<div className="page-header">
|
||||
<div className="page-header__container">
|
||||
|
@ -109,7 +109,7 @@ const PageContents = ({children, source}) =>
|
|||
</h1>
|
||||
</div>
|
||||
<div className="page-header__right">
|
||||
<SourceIndicator sourceName={source && source.name} />
|
||||
<SourceIndicator />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -139,7 +139,6 @@ KapacitorRules.propTypes = {
|
|||
|
||||
PageContents.propTypes = {
|
||||
children: node,
|
||||
source: shape(),
|
||||
onCloseTickscript: func,
|
||||
}
|
||||
|
||||
|
|
|
@ -4,14 +4,13 @@ import TimeRangeDropdown from 'shared/components/TimeRangeDropdown'
|
|||
import SourceIndicator from 'shared/components/SourceIndicator'
|
||||
|
||||
const RuleHeaderSave = ({
|
||||
source,
|
||||
onSave,
|
||||
timeRange,
|
||||
validationError,
|
||||
onChooseTimeRange,
|
||||
}) =>
|
||||
<div className="page-header__right">
|
||||
<SourceIndicator sourceName={source.name} />
|
||||
<SourceIndicator />
|
||||
<TimeRangeDropdown
|
||||
onChooseTimeRange={onChooseTimeRange}
|
||||
selected={timeRange}
|
||||
|
@ -41,7 +40,6 @@ const RuleHeaderSave = ({
|
|||
const {func, shape, string} = PropTypes
|
||||
|
||||
RuleHeaderSave.propTypes = {
|
||||
source: shape({}).isRequired,
|
||||
onSave: func.isRequired,
|
||||
validationError: string.isRequired,
|
||||
onChooseTimeRange: func.isRequired,
|
||||
|
|
|
@ -11,7 +11,6 @@ const addName = list => list.map(l => ({...l, name: `${l.db}.${l.rp}`}))
|
|||
const TickscriptHeader = ({
|
||||
task: {id, type, dbrps},
|
||||
task,
|
||||
source: {name},
|
||||
onSave,
|
||||
onChangeType,
|
||||
onChangeID,
|
||||
|
@ -26,7 +25,7 @@ const TickscriptHeader = ({
|
|||
: <TickscriptStaticID id={task.name} />}
|
||||
</div>
|
||||
<div className="page-header__right">
|
||||
<SourceIndicator sourceName={name} />
|
||||
<SourceIndicator />
|
||||
<TickscriptType type={type} onChangeType={onChangeType} />
|
||||
<MultiSelectDBDropdown
|
||||
selectedItems={addName(dbrps)}
|
||||
|
@ -48,7 +47,6 @@ const {arrayOf, bool, func, shape, string} = PropTypes
|
|||
|
||||
TickscriptHeader.propTypes = {
|
||||
onSave: func,
|
||||
source: shape(),
|
||||
onSelectDbrps: func.isRequired,
|
||||
task: shape({
|
||||
dbrps: arrayOf(
|
||||
|
|
|
@ -62,7 +62,7 @@ class ManageSources extends Component {
|
|||
<h1 className="page-header__title">Configuration</h1>
|
||||
</div>
|
||||
<div className="page-header__right">
|
||||
<SourceIndicator sourceName={source.name} />
|
||||
<SourceIndicator />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -125,7 +125,7 @@ export const SourcePage = React.createClass({
|
|||
</h1>
|
||||
</div>
|
||||
<div className="page-header__right">
|
||||
<SourceIndicator sourceName={source.name} />
|
||||
<SourceIndicator />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -56,7 +56,7 @@ class StatusPage extends Component {
|
|||
<h1 className="page-header__title">Status</h1>
|
||||
</div>
|
||||
<div className="page-header__right">
|
||||
<SourceIndicator sourceName={source.name} />
|
||||
<SourceIndicator />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue