implement reactjs history
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
<rt-require dependency="./graph/graph.component" as="PowerGraph"/>
|
||||
<rt-require dependency="./table/table.component" as="PowerTable"/>
|
||||
<div id="power_view">
|
||||
<div class="btn-group">
|
||||
<button
|
||||
@@ -10,9 +12,22 @@
|
||||
rt-class="{active: month === this.house.state.month}"
|
||||
onClick="{this.setParam.bind(this)}">{month}</button>
|
||||
</div>
|
||||
<div class="alert alert-warning" rt-if="this.props.location.state.loading_power_data">
|
||||
<div class="alert alert-warning" rt-if="this.loading_power_data">
|
||||
Retrieving power data...
|
||||
</div>
|
||||
<div id="power_date_setter"></div>
|
||||
{this.props.children}
|
||||
<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>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user