Add button to cell for improved user experience
parent
7da02d52d7
commit
2bcee88692
|
@ -73,9 +73,9 @@ const Dashboard = ({
|
|||
synchronizer={synchronizer}
|
||||
/>
|
||||
: <div className="dashboard__empty">
|
||||
<p>This Dashboard has no Graphs</p>
|
||||
<p>This Dashboard has no Cells</p>
|
||||
<button className="btn btn-primary btn-m" onClick={onAddCell}>
|
||||
Add Graph
|
||||
<span className="icon plus" />Add a Cell
|
||||
</button>
|
||||
</div>}
|
||||
</div>
|
||||
|
|
|
@ -209,8 +209,17 @@ const AutoRefresh = ComposedComponent => {
|
|||
},
|
||||
|
||||
renderNoResults() {
|
||||
if (this.props.children) {
|
||||
return this.props.children
|
||||
const {children, queries} = this.props
|
||||
if (children) {
|
||||
return children
|
||||
}
|
||||
|
||||
if (!queries.length) {
|
||||
return (
|
||||
<div className="graph-empty">
|
||||
<p>Build a Graph below</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
@ -69,7 +69,16 @@ class NameableGraph extends Component {
|
|||
onEdit={onSummonOverlayTechnologies}
|
||||
/>
|
||||
<div className="dash-graph--container">
|
||||
{children}
|
||||
{cell.queries.length
|
||||
? children
|
||||
: <div className="graph-empty">
|
||||
<button
|
||||
className="no-query--button btn btn-md btn-primary"
|
||||
onClick={() => onSummonOverlayTechnologies(cell)}
|
||||
>
|
||||
Add Graph
|
||||
</button>
|
||||
</div>}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue