38 lines
1.3 KiB
Plaintext
38 lines
1.3 KiB
Plaintext
<rt-require dependency="./graph/graph.component" as="EnergyGraph"/>
|
|
<rt-require dependency="./table/table.component" as="EnergyTable"/>
|
|
<div id="energy_view">
|
|
<div class="alert alert-warning" rt-if="this.loading_energy_data">
|
|
Retrieving energy data...
|
|
</div>
|
|
<div rt-if="this.props.view === 'graph'">
|
|
<h4>Select Data</h4>
|
|
<div class="btn-group" role="group">
|
|
<button
|
|
data-param="graph_attr"
|
|
data-value="consumption"
|
|
rt-class="{active: this.props.graph_attr === 'consumption'}"
|
|
onClick="{this.setParam.bind(this)}"
|
|
type="button" class="btn btn-primary">Consumption</button>
|
|
<button
|
|
data-param="graph_attr"
|
|
data-value="production"
|
|
rt-class="{active: this.props.graph_attr === 'production'}"
|
|
onClick="{this.setParam.bind(this)}"
|
|
type="button" class="btn btn-primary">Production</button>
|
|
</div>
|
|
</div>
|
|
|
|
<EnergyGraph
|
|
rt-if="this.props.view === 'graph'"
|
|
house="{this.props.house}"
|
|
state_manager="{this.props.state_manager}"
|
|
graph_attr="{this.props.graph_attr}"
|
|
year="{this.props.year}" ></EnergyGraph>
|
|
<EnergyTable
|
|
rt-if="this.props.view === 'table'"
|
|
state_manager="{this.props.state_manager}"
|
|
house="{this.props.house}"
|
|
graph_attr="{this.props.graph_attr}"
|
|
year="{this.props.year}" ></EnergyTable>
|
|
</div>
|