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