@@ -171,16 +171,19 @@ function single_rrd_to_array($rrd,$rrdpath){
171171 $ replicaname1 = str_replace ('.rrd ' , '' , $ replicaname );
172172 $ replicaname_explode = explode ("_ " , $ replicaname1 , 2 );
173173 $ replicaname2 = $ replicaname_explode [1 ];
174+ $ replicatograph = str_replace ('/ ' , "+ " ,$ _REQUEST ['replicaname ' ]);
175+ $ replicatograph = ltrim ($ replicatograph , '+ ' );
174176
175- if ($ replicaname2 != str_replace (' ' , "+ " ,$ _REQUEST ['replicaname ' ]))
177+
178+ if ($ replicaname2 != $ replicatograph )
176179
177180 continue ;
178- $ replicadata = single_rrd_to_array ($ replicaname , $ sitename );
181+ $ replicadata = single_rrd_to_array ($ replicaname , $ sitename );
179182
180183 $ ratio = array ();
181184
182185 for ($ j = 0 ; $ j < count ($ replicadata [2 ]); $ j ++){
183- $ ratio [] = $ replicadata [1 ][$ j ]/$ replicadata [2 ][$ j ];
186+ $ ratio [] = $ replicadata [1 ][$ j ]/$ replicadata [2 ][$ j ] * 100 ;
184187 }
185188 $ replicainfo = array ('replica ' => $ replicaname1 , 'time ' => $ replicadata [0 ], 'copied ' => $ replicadata [1 ], 'total ' => $ replicadata [2 ], 'ratio ' => $ ratio );
186189 $ siteinfo ['data ' ][] = $ replicainfo ;
@@ -193,7 +196,7 @@ function single_rrd_to_array($rrd,$rrdpath){
193196}
194197
195198
196- if ( !(isset ($ _REQUEST ['getSiteCSVs ' ])) ){
199+ if ( !(isset ($ _REQUEST ['norm ' ])) ){
197200
198201
199202 $ html = file_get_contents (__DIR__ . '/csvs.html ' );
0 commit comments