Fix visualizations not showing graph name (#1125)
* Pass cell name through to Visualization component. * Rename Header components in Dashboard page to better match their actual component names. * Update changelog. * Fix number on update changelogpull/1129/head
parent
2510388651
commit
f7c5e0f2e2
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
1. [#1104](https://github.com/influxdata/chronograf/pull/1104): Fix windows hosts on host list
|
1. [#1104](https://github.com/influxdata/chronograf/pull/1104): Fix windows hosts on host list
|
||||||
|
2. [#1125](https://github.com/influxdata/chronograf/pull/1125): Fix visualizations not showing graph name
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
1. [#1112](https://github.com/influxdata/chronograf/pull/1112): Add ability to delete a dashboard
|
1. [#1112](https://github.com/influxdata/chronograf/pull/1112): Add ability to delete a dashboard
|
||||||
|
|
|
@ -91,7 +91,13 @@ class CellEditorOverlay extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {onCancel, autoRefresh, timeRange} = this.props
|
const {onCancel, autoRefresh, timeRange} = this.props
|
||||||
const {activeQueryIndex, cellWorkingType, queriesWorkingDraft} = this.state
|
const {
|
||||||
|
activeQueryIndex,
|
||||||
|
cellWorkingName,
|
||||||
|
cellWorkingType,
|
||||||
|
queriesWorkingDraft,
|
||||||
|
} = this.state
|
||||||
|
|
||||||
const queryActions = {
|
const queryActions = {
|
||||||
addQuery: this.handleAddQuery,
|
addQuery: this.handleAddQuery,
|
||||||
..._.mapValues(queryModifiers, (qm) => this.queryStateReducer(qm)),
|
..._.mapValues(queryModifiers, (qm) => this.queryStateReducer(qm)),
|
||||||
|
@ -106,6 +112,7 @@ class CellEditorOverlay extends Component {
|
||||||
queryConfigs={queriesWorkingDraft}
|
queryConfigs={queriesWorkingDraft}
|
||||||
activeQueryIndex={0}
|
activeQueryIndex={0}
|
||||||
cellType={cellWorkingType}
|
cellType={cellWorkingType}
|
||||||
|
cellName={cellWorkingName}
|
||||||
/>
|
/>
|
||||||
<ResizeBottom>
|
<ResizeBottom>
|
||||||
<OverlayControls
|
<OverlayControls
|
||||||
|
|
|
@ -4,8 +4,8 @@ import {connect} from 'react-redux'
|
||||||
import {bindActionCreators} from 'redux'
|
import {bindActionCreators} from 'redux'
|
||||||
|
|
||||||
import CellEditorOverlay from 'src/dashboards/components/CellEditorOverlay'
|
import CellEditorOverlay from 'src/dashboards/components/CellEditorOverlay'
|
||||||
import Header from 'src/dashboards/components/DashboardHeader'
|
import DashboardHeader from 'src/dashboards/components/DashboardHeader'
|
||||||
import EditHeader from 'src/dashboards/components/DashboardHeaderEdit'
|
import DashboardHeaderEdit from 'src/dashboards/components/DashboardHeaderEdit'
|
||||||
import Dashboard from 'src/dashboards/components/Dashboard'
|
import Dashboard from 'src/dashboards/components/Dashboard'
|
||||||
|
|
||||||
import * as dashboardActionCreators from 'src/dashboards/actions'
|
import * as dashboardActionCreators from 'src/dashboards/actions'
|
||||||
|
@ -205,12 +205,12 @@ const DashboardPage = React.createClass({
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
isEditMode ?
|
isEditMode ?
|
||||||
<EditHeader
|
<DashboardHeaderEdit
|
||||||
dashboard={dashboard}
|
dashboard={dashboard}
|
||||||
onCancel={this.handleCancelEditDashboard}
|
onCancel={this.handleCancelEditDashboard}
|
||||||
onSave={this.handleRenameDashboard}
|
onSave={this.handleRenameDashboard}
|
||||||
/> :
|
/> :
|
||||||
<Header
|
<DashboardHeader
|
||||||
buttonText={dashboard ? dashboard.name : ''}
|
buttonText={dashboard ? dashboard.name : ''}
|
||||||
handleChooseAutoRefresh={handleChooseAutoRefresh}
|
handleChooseAutoRefresh={handleChooseAutoRefresh}
|
||||||
autoRefresh={autoRefresh}
|
autoRefresh={autoRefresh}
|
||||||
|
@ -237,7 +237,7 @@ const DashboardPage = React.createClass({
|
||||||
}) :
|
}) :
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
</Header>
|
</DashboardHeader>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
dashboard ?
|
dashboard ?
|
||||||
|
|
|
@ -18,6 +18,7 @@ const {
|
||||||
|
|
||||||
const Visualization = React.createClass({
|
const Visualization = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
|
cellName: string,
|
||||||
cellType: string,
|
cellType: string,
|
||||||
autoRefresh: number.isRequired,
|
autoRefresh: number.isRequired,
|
||||||
timeRange: shape({
|
timeRange: shape({
|
||||||
|
@ -25,7 +26,6 @@ const Visualization = React.createClass({
|
||||||
lower: string,
|
lower: string,
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
queryConfigs: arrayOf(shape({})).isRequired,
|
queryConfigs: arrayOf(shape({})).isRequired,
|
||||||
name: string,
|
|
||||||
activeQueryIndex: number,
|
activeQueryIndex: number,
|
||||||
height: string,
|
height: string,
|
||||||
heightPixels: number,
|
heightPixels: number,
|
||||||
|
@ -74,7 +74,14 @@ const Visualization = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {queryConfigs, timeRange, height, heightPixels} = this.props
|
const {
|
||||||
|
queryConfigs,
|
||||||
|
timeRange,
|
||||||
|
height,
|
||||||
|
heightPixels,
|
||||||
|
cellName,
|
||||||
|
} = this.props
|
||||||
|
|
||||||
const {source} = this.context
|
const {source} = this.context
|
||||||
const proxyLink = source.links.proxy
|
const proxyLink = source.links.proxy
|
||||||
|
|
||||||
|
@ -91,7 +98,7 @@ const Visualization = React.createClass({
|
||||||
<div className={classNames("graph", {active: true})} style={{height}}>
|
<div className={classNames("graph", {active: true})} style={{height}}>
|
||||||
<div className="graph-heading">
|
<div className="graph-heading">
|
||||||
<div className="graph-title">
|
<div className="graph-title">
|
||||||
{name || "Graph"}
|
{cellName || "Graph"}
|
||||||
</div>
|
</div>
|
||||||
<div className="graph-actions">
|
<div className="graph-actions">
|
||||||
<ul className="toggle toggle-sm">
|
<ul className="toggle toggle-sm">
|
||||||
|
|
Loading…
Reference in New Issue