Merge pull request #1757 from influxdata/prettier-test

Prettier test
pull/10616/head
Andrew Watkins 2017-07-21 15:53:50 -07:00 committed by GitHub
commit bd01e5dd9e
5 changed files with 13 additions and 13 deletions

View File

@ -10,8 +10,7 @@ import CellEditorOverlay from 'src/dashboards/components/CellEditorOverlay'
import DashboardHeader from 'src/dashboards/components/DashboardHeader'
import DashboardHeaderEdit from 'src/dashboards/components/DashboardHeaderEdit'
import Dashboard from 'src/dashboards/components/Dashboard'
import TemplateVariableManager
from 'src/dashboards/components/TemplateVariableManager'
import TemplateVariableManager from 'src/dashboards/components/TemplateVariableManager'
import {errorThrown as errorThrownAction} from 'shared/actions/errors'
@ -82,7 +81,8 @@ class DashboardPage extends Component {
handleCloseTemplateManager(isEdited) {
if (
!isEdited || (isEdited && confirm('Do you want to close without saving?')) // eslint-disable-line no-alert
!isEdited ||
(isEdited && confirm('Do you want to close without saving?')) // eslint-disable-line no-alert
) {
this.setState({isTemplating: false})
}
@ -355,13 +355,13 @@ class DashboardPage extends Component {
showTemplateControlBar={showTemplateControlBar}
>
{dashboards
? dashboards.map((d, i) => (
? dashboards.map((d, i) =>
<li className="dropdown-item" key={i}>
<Link to={`/sources/${sourceID}/dashboards/${d.id}`}>
{d.name}
</Link>
</li>
))
)
: null}
</DashboardHeader>}
{dashboard

View File

@ -137,14 +137,14 @@ export default function ui(state = initialState, action) {
const dashboards = state.dashboards.map(
d =>
(d.id === dashboardID
d.id === dashboardID
? {
...d,
cells: d.cells.map(
c => (c.i === cellID ? {...c, isEditing: false} : c)
),
}
: d)
: d
)
return {...state, dashboards}

View File

@ -44,7 +44,9 @@ class CustomTimeRangeDropdown extends Component {
onClick={this.handleToggleDropdown}
>
<span className="icon clock" />
<span className="dropdown-selected">{`${moment(lower).format('MMM Do HH:mm')}${moment(upper).format('MMM Do HH:mm')}`}</span>
<span className="dropdown-selected">{`${moment(lower).format(
'MMM Do HH:mm'
)} ${moment(upper).format('MMM Do HH:mm')}`}</span>
<span className="caret" />
</button>
<CustomTimeRange

View File

@ -215,7 +215,7 @@ class LayoutRenderer extends Component {
PAGE_HEADER_HEIGHT -
PAGE_CONTAINER_MARGIN -
PAGE_CONTAINER_MARGIN) /
STATUS_PAGE_ROW_COUNT
STATUS_PAGE_ROW_COUNT
: DASHBOARD_LAYOUT_ROW_HEIGHT
}

View File

@ -51,21 +51,20 @@ NameableGraphHeader.propTypes = {
onCancelEditCell: func,
}
const GraphName = ({name, queries}) => (
const GraphName = ({name, queries}) =>
<span className="dash-graph--name">
{name}
{queries && queries.length
? <CustomTimeIndicator queries={queries} />
: null}
</span>
)
GraphName.propTypes = {
name: string,
queries: arrayOf(shape()),
}
const GraphNameInput = ({value, onKeyUp, onChange, onBlur}) => (
const GraphNameInput = ({value, onKeyUp, onChange, onBlur}) =>
<input
className="form-control input-sm dash-graph--name-edit"
type="text"
@ -75,7 +74,6 @@ const GraphNameInput = ({value, onKeyUp, onChange, onBlur}) => (
onBlur={onBlur}
onKeyUp={onKeyUp}
/>
)
GraphNameInput.propTypes = {
value: string,