Cleanup based on comments

pull/10616/head
Alex P 2016-12-06 12:00:33 -08:00 committed by Andrew Watkins
parent 7bcb8a8cb8
commit 251118101c
3 changed files with 3 additions and 23 deletions

View File

@ -117,14 +117,6 @@ export const HostPage = React.createClass({
);
},
renderGraphTips() {
return (
`<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>`
);
},
render() {
const hostID = this.props.params.hostID;
const {layouts, timeRange} = this.state;
@ -137,7 +129,7 @@ export const HostPage = React.createClass({
<h1>{hostID}</h1>
</div>
<div className="page-header__right">
<div className="btn btn-info btn-sm" data-for="graph-tips-tooltip" data-tip={this.renderGraphTips()}>
<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>

View File

@ -56,14 +56,6 @@ export const KubernetesPage = React.createClass({
this.setState({timeRange});
},
renderGraphTips() {
return (
`<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>`
);
},
render() {
const {layouts} = this.props;
const {timeRange} = this.state;
@ -82,7 +74,7 @@ export const KubernetesPage = React.createClass({
<h1>Kubernetes Dashboard</h1>
</div>
<div className="page-header__right">
<div className="btn btn-info btn-sm" data-for="graph-tips-tooltip" data-tip={this.renderGraphTips()}>
<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>

View File

@ -84,10 +84,6 @@ export default React.createClass({
ylabel: _.get(queries, ['0', 'label'], ''),
y2label: _.get(queries, ['1', 'label'], ''),
};
let hasyLabel = false;
if (options.ylabel || options.y2label) {
hasyLabel = true;
}
let roundedValue;
if (showSingleStat) {
@ -98,7 +94,7 @@ export default React.createClass({
}
return (
<div className={classNames({"graph--hasYLabel": hasyLabel})}>
<div className={classNames({"graph--hasYLabel": options.ylabel || options.y2label})}>
{isRefreshing ? this.renderSpinner() : null}
<Dygraph
containerStyle={{width: '100%', height: '300px'}}