2016-03-04 13:59:34 -06:00
|
|
|
<rt-require dependency="./graph/graph.component" as="PowerGraph"/>
|
|
|
|
|
<rt-require dependency="./table/table.component" as="PowerTable"/>
|
2016-02-22 14:36:07 -06:00
|
|
|
<div id="power_view">
|
|
|
|
|
<div class="btn-group">
|
|
|
|
|
<button
|
2016-03-02 12:07:31 -06:00
|
|
|
rt-if="this.house"
|
|
|
|
|
rt-repeat="month in this.house.availableMonths()"
|
2016-02-29 18:20:00 -06:00
|
|
|
data-param="month"
|
2016-02-22 14:36:07 -06:00
|
|
|
data-value="{month}"
|
|
|
|
|
key="data-month-{month}"
|
|
|
|
|
class="btn-warning btn btn-sm"
|
2016-03-02 12:07:31 -06:00
|
|
|
rt-class="{active: month === this.house.state.month}"
|
2016-02-29 18:20:00 -06:00
|
|
|
onClick="{this.setParam.bind(this)}">{month}</button>
|
2016-02-22 14:36:07 -06:00
|
|
|
</div>
|
2016-03-04 13:59:34 -06:00
|
|
|
<div class="alert alert-warning" rt-if="this.loading_power_data">
|
2016-02-29 18:20:00 -06:00
|
|
|
Retrieving power data...
|
2016-02-22 14:36:07 -06:00
|
|
|
</div>
|
|
|
|
|
<div id="power_date_setter"></div>
|
2016-03-04 13:59:34 -06:00
|
|
|
<PowerGraph
|
|
|
|
|
rt-if="this.props.view === 'graph'"
|
|
|
|
|
state_manager="{this.props.state_manager}"
|
|
|
|
|
house="{this.props.house}"
|
|
|
|
|
month="{this.props.month}"
|
|
|
|
|
year="{this.props.year}"
|
|
|
|
|
power_range="{this.props.power_range}" ></PowerGraph>
|
|
|
|
|
<PowerTable
|
|
|
|
|
rt-if="this.props.view === 'table'"
|
|
|
|
|
state_manager="{this.props.state_manager}"
|
|
|
|
|
house="{this.props.house}"
|
|
|
|
|
month="{this.props.month}"
|
|
|
|
|
year="{this.props.year}"
|
|
|
|
|
power_range="{this.props.power_range}" ></PowerTable>
|
2016-02-22 14:36:07 -06:00
|
|
|
</div>
|