Use graphTips component in dash header & DE header

pull/1124/head
Alex P 2017-03-31 15:26:45 -07:00
parent 8c7e787f84
commit 82f571b645
2 changed files with 5 additions and 7 deletions

View File

@ -1,9 +1,9 @@
import React, {PropTypes} from 'react'
import ReactTooltip from 'react-tooltip'
import AutoRefreshDropdown from 'shared/components/AutoRefreshDropdown'
import TimeRangeDropdown from 'shared/components/TimeRangeDropdown'
import SourceIndicator from '../../shared/components/SourceIndicator'
import GraphTips from '../../shared/components/GraphTips'
const DashboardHeader = ({
children,
@ -39,6 +39,8 @@ const DashboardHeader = ({
}
</div>
<div className="page-header__right">
<GraphTips />
<SourceIndicator sourceName={source.name} />
{
dashboard ?
<button className="btn btn-info btn-sm" onClick={onAddCell}>
@ -53,12 +55,6 @@ const DashboardHeader = ({
&nbsp;Edit
</button> : null
}
<div className="btn btn-info btn-sm" data-for="graph-tips-tooltip" data-tip="<p><code>Click + Drag</code> Zoom in (X or Y)</p><p><code>Shift + Click</code> Pan Graph Window</p><p><code>Double Click</code> Reset Graph Window</p>">
<span className="icon heart"></span>
Graph Tips
</div>
<ReactTooltip id="graph-tips-tooltip" effect="solid" html={true} offset={{top: 2}} place="bottom" class="influx-tooltip place-bottom" />
<SourceIndicator sourceName={source.name} />
<AutoRefreshDropdown onChoose={handleChooseAutoRefresh} selected={autoRefresh} iconName="refresh" />
<TimeRangeDropdown onChooseTimeRange={handleChooseTimeRange} selected={timeRange} />
<div className="btn btn-info btn-sm" onClick={handleClickPresentationButton}>

View File

@ -4,6 +4,7 @@ import {withRouter} from 'react-router'
import AutoRefreshDropdown from 'shared/components/AutoRefreshDropdown'
import TimeRangeDropdown from '../../shared/components/TimeRangeDropdown'
import SourceIndicator from '../../shared/components/SourceIndicator'
import GraphTips from '../../shared/components/GraphTips'
const {
func,
@ -45,6 +46,7 @@ const Header = React.createClass({
<h1>Explorer</h1>
</div>
<div className="page-header__right">
<GraphTips />
<SourceIndicator sourceName={this.context.source.name} />
<AutoRefreshDropdown onChoose={handleChooseAutoRefresh} selected={autoRefresh} iconName="refresh" />
<TimeRangeDropdown onChooseTimeRange={this.handleChooseTimeRange} selected={timeRange} />