rrd : init with timeframe from state manager

avoid to init the rrd with default timeframe,
then reload with timefrom state manager

this avoid to reload twice the rrds

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier 2015-02-23 13:17:44 +01:00 committed by Dietmar Maurer
parent 1adf98da71
commit b12ca796be

View File

@ -17,6 +17,13 @@ Ext.define('PVE.panel.RRDView', {
var sp = Ext.state.Manager.getProvider();
var stateinit = sp.get(stateid);
if (stateinit) {
if(stateinit.timeframe !== me.timeframe || stateinit.cf !== me.rrdcffn){
me.timeframe = stateinit.timeframe;
me.rrdcffn = stateinit.cf;
}
}
if (!me.timeframe) {
if(stateinit && stateinit.timeframe){
me.timeframe = stateinit.timeframe;