[pve-devel] [PATCH] rrd : init with timeframe from state manager
Alexandre Derumier
aderumier at odiso.com
Mon Feb 23 13:17:44 CET 2015
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 at odiso.com>
---
www/manager/panel/RRDView.js | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/www/manager/panel/RRDView.js b/www/manager/panel/RRDView.js
index 4ecb95e..9fd3c47 100644
--- a/www/manager/panel/RRDView.js
+++ b/www/manager/panel/RRDView.js
@@ -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;
--
1.7.10.4
More information about the pve-devel
mailing list