Stop passing SourceIndicator as part of page header options render prop
parent
3659197fce
commit
29994b1947
|
@ -1,6 +1,5 @@
|
|||
import React, {PureComponent} from 'react'
|
||||
|
||||
import SourceIndicator from 'src/shared/components/SourceIndicator'
|
||||
import AlertsTable from 'src/alerts/components/AlertsTable'
|
||||
import NoKapacitorError from 'src/shared/components/NoKapacitorError'
|
||||
import CustomTimeRangeDropdown from 'src/shared/components/CustomTimeRangeDropdown'
|
||||
|
@ -99,6 +98,7 @@ class AlertsApp extends PureComponent<Props, State> {
|
|||
<PageHeader
|
||||
title="Alert History"
|
||||
renderOptions={this.renderHeaderOptions}
|
||||
sourceIndicator={true}
|
||||
/>
|
||||
<div className="page-contents">
|
||||
<div className="container-fluid">
|
||||
|
@ -115,13 +115,10 @@ class AlertsApp extends PureComponent<Props, State> {
|
|||
const {timeRange} = this.state
|
||||
|
||||
return (
|
||||
<>
|
||||
<SourceIndicator />
|
||||
<CustomTimeRangeDropdown
|
||||
onApplyTimeRange={this.handleApplyTime}
|
||||
timeRange={timeRange}
|
||||
/>
|
||||
</>
|
||||
<CustomTimeRangeDropdown
|
||||
onApplyTimeRange={this.handleApplyTime}
|
||||
timeRange={timeRange}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ import _ from 'lodash'
|
|||
|
||||
import DashboardsContents from 'src/dashboards/components/DashboardsPageContents'
|
||||
import PageHeader from 'src/shared/components/PageHeader'
|
||||
import SourceIndicator from 'src/shared/components/SourceIndicator'
|
||||
|
||||
import {createDashboard} from 'src/dashboards/apis'
|
||||
import {
|
||||
|
@ -55,10 +54,7 @@ class DashboardsPage extends PureComponent<Props> {
|
|||
|
||||
return (
|
||||
<div className="page">
|
||||
<PageHeader
|
||||
title="Dashboards"
|
||||
renderOptions={this.renderHeaderOptions}
|
||||
/>
|
||||
<PageHeader title="Dashboards" sourceIndicator={true} />
|
||||
<DashboardsContents
|
||||
dashboardLink={dashboardLink}
|
||||
dashboards={dashboards}
|
||||
|
@ -73,10 +69,6 @@ class DashboardsPage extends PureComponent<Props> {
|
|||
)
|
||||
}
|
||||
|
||||
private renderHeaderOptions = (): JSX.Element => {
|
||||
return <SourceIndicator />
|
||||
}
|
||||
|
||||
private handleCreateDashboard = async (): Promise<void> => {
|
||||
const {
|
||||
source: {id},
|
||||
|
|
|
@ -17,7 +17,6 @@ import OverlayTechnologies from 'src/shared/components/OverlayTechnologies'
|
|||
import ManualRefresh from 'src/shared/components/ManualRefresh'
|
||||
import AutoRefreshDropdown from 'src/shared/components/AutoRefreshDropdown'
|
||||
import TimeRangeDropdown from 'src/shared/components/TimeRangeDropdown'
|
||||
import SourceIndicator from 'src/shared/components/SourceIndicator'
|
||||
import GraphTips from 'src/shared/components/GraphTips'
|
||||
import PageHeader from 'src/shared/components/PageHeader'
|
||||
|
||||
|
@ -121,6 +120,7 @@ export class DataExplorer extends PureComponent<Props, State> {
|
|||
title="Data Explorer"
|
||||
fullWidth={true}
|
||||
renderOptions={this.renderHeaderOptions}
|
||||
sourceIndicator={true}
|
||||
/>
|
||||
<ResizeContainer
|
||||
containerClass="page-contents"
|
||||
|
@ -197,7 +197,6 @@ export class DataExplorer extends PureComponent<Props, State> {
|
|||
return (
|
||||
<>
|
||||
<GraphTips />
|
||||
<SourceIndicator />
|
||||
<div
|
||||
className="btn btn-sm btn-default"
|
||||
onClick={this.handleOpenWriteData}
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import React, {Fragment, Component} from 'react'
|
||||
import React, {Component} from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import {connect} from 'react-redux'
|
||||
import {bindActionCreators} from 'redux'
|
||||
import _ from 'lodash'
|
||||
|
||||
import HostsTable from 'src/hosts/components/HostsTable'
|
||||
import SourceIndicator from 'shared/components/SourceIndicator'
|
||||
import AutoRefreshDropdown from 'shared/components/AutoRefreshDropdown'
|
||||
import ManualRefresh from 'src/shared/components/ManualRefresh'
|
||||
import PageHeader from 'src/shared/components/PageHeader'
|
||||
|
@ -118,6 +117,7 @@ export class HostsPage extends Component {
|
|||
<PageHeader
|
||||
title="Host List"
|
||||
renderOptions={this.renderHeaderOptions}
|
||||
sourceIndicator={true}
|
||||
/>
|
||||
<div className="page-contents">
|
||||
<div className="container-fluid">
|
||||
|
@ -141,15 +141,12 @@ export class HostsPage extends Component {
|
|||
const {autoRefresh, onChooseAutoRefresh, onManualRefresh} = this.props
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<SourceIndicator />
|
||||
<AutoRefreshDropdown
|
||||
iconName="refresh"
|
||||
selected={autoRefresh}
|
||||
onChoose={onChooseAutoRefresh}
|
||||
onManualRefresh={onManualRefresh}
|
||||
/>
|
||||
</Fragment>
|
||||
<AutoRefreshDropdown
|
||||
iconName="refresh"
|
||||
selected={autoRefresh}
|
||||
onChoose={onChooseAutoRefresh}
|
||||
onManualRefresh={onManualRefresh}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ import {getActiveKapacitor} from 'src/shared/apis'
|
|||
import * as kapacitorActionCreators from '../actions/view'
|
||||
|
||||
import KapacitorRules from 'src/kapacitor/components/KapacitorRules'
|
||||
import SourceIndicator from 'src/shared/components/SourceIndicator'
|
||||
import FancyScrollbar from 'src/shared/components/FancyScrollbar'
|
||||
import QuestionMarkTooltip from 'src/shared/components/QuestionMarkTooltip'
|
||||
import PageHeader from 'src/shared/components/PageHeader'
|
||||
|
@ -90,7 +89,11 @@ interface PageContentsProps {
|
|||
|
||||
const PageContents: SFC<PageContentsProps> = ({children}) => (
|
||||
<div className="page">
|
||||
<PageHeader title="Manage Tasks" renderOptions={renderHeaderOptions} />
|
||||
<PageHeader
|
||||
title="Manage Tasks"
|
||||
renderOptions={renderHeaderOptions}
|
||||
sourceIndicator={true}
|
||||
/>
|
||||
<FancyScrollbar className="page-contents fancy-scroll--kapacitor">
|
||||
<div className="container-fluid">
|
||||
<div className="row">
|
||||
|
@ -103,13 +106,10 @@ const PageContents: SFC<PageContentsProps> = ({children}) => (
|
|||
|
||||
const renderHeaderOptions = (): JSX.Element => {
|
||||
return (
|
||||
<>
|
||||
<QuestionMarkTooltip
|
||||
tipID="manage-tasks--tooltip"
|
||||
tipContent="<b>Alert Rules</b> generate a TICKscript for<br/>you using our Builder UI.<br/><br/>Not all TICKscripts can be edited<br/>using the Builder."
|
||||
/>
|
||||
<SourceIndicator />{' '}
|
||||
</>
|
||||
<QuestionMarkTooltip
|
||||
tipID="manage-tasks--tooltip"
|
||||
tipContent="<b>Alert Rules</b> generate a TICKscript for<br/>you using our Builder UI.<br/><br/>Not all TICKscripts can be edited<br/>using the Builder."
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue