Update some primatives to use constants

pull/10616/head
Andrew Watkins 2017-03-30 12:28:30 -07:00
parent f6b0a13fbe
commit 2a43dac1f3
1 changed files with 3 additions and 3 deletions

View File

@ -94,7 +94,7 @@ const Visualization = React.createClass({
return (
<div className={classNames("graph", {active: true})} style={{height}}>
<VisHeader views={VIEWS} view={view} onToggleView={this.handleToggleView} name={name || 'Graph'}/>
<div className={classNames({"graph-container": view === 'graph', "table-container": view === 'table'})}>
<div className={classNames({"graph-container": view === GRAPH, "table-container": view === TABLE})}>
{this.renderVisualization(view, queries, heightPixels, onEditRawStatus)}
</div>
</div>
@ -103,9 +103,9 @@ const Visualization = React.createClass({
renderVisualization(view, queries, heightPixels, onEditRawStatus) {
switch (view) {
case 'graph':
case GRAPH:
return this.renderGraph(queries)
case 'table':
case TABLE:
return <MultiTable queries={queries} height={heightPixels} onEditRawStatus={onEditRawStatus} />
default:
this.renderGraph(queries)