Changeset 6727
- Timestamp:
- 10/06/08 14:20:18 (2 months ago)
- Location:
- trunk/centreon/www/include/views/graphs
- Files:
-
- 4 modified
-
graphODS/generateImages/generateODSImage.php (modified) (1 diff)
-
graphODS/generateImages/generateODSImageZoom.php (modified) (3 diffs)
-
graphODS/generateImages/generateODSMetricImage.php (modified) (1 diff)
-
statusGraphs/displayServiceStatus.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/centreon/www/include/views/graphs/graphODS/generateImages/generateODSImage.php
r6725 r6727 301 301 302 302 $command_line = $oreon->optGen["rrdtool_path_bin"].$command_line." 2>&1"; 303 304 /* 305 * Add Timezone for current user. 306 */ 307 308 $command_line = "export TZ='UTC".$CentreonGMT->getMyGMTForRRD()."' ; ".$command_line; 309 303 310 $command_line = escape_command("$command_line"); 304 311 if ($oreon->optGen["debug_rrdtool"] == "1") -
trunk/centreon/www/include/views/graphs/graphODS/generateImages/generateODSImageZoom.php
r6725 r6727 74 74 * Get GMT for current user 75 75 */ 76 $ gmt = $CentreonGMT->getMyGMTFromSession($_GET["session_id"]);76 $CentreonGMT->getMyGMTFromSession($_GET["session_id"]); 77 77 78 78 /* … … 179 179 $cpt = 0; 180 180 $metrics = array(); 181 while ($metric =& $DBRESULT->fetchrow()) {181 while ($metric =& $DBRESULT->fetchrow()) { 182 182 if (!isset($_GET["metric"]) || (isset($_GET["metric"]) && isset($_GET["metric"][$metric["metric_id"]])) || isset($_GET["index_id"]) || $pass){ 183 183 $metrics[$metric["metric_id"]]["metric_id"] = $metric["metric_id"]; … … 278 278 279 279 $command_line = $oreon->optGen["rrdtool_path_bin"].$command_line." 2>&1"; 280 281 /* 282 * Add Timezone for current user. 283 */ 284 285 $command_line = "export TZ='CMT".$CentreonGMT->getMyGMTForRRD()."' ; ".$command_line; 286 287 /* 288 * Escape Special Chars 289 */ 280 290 $command_line = escape_command("$command_line"); 291 281 292 if ( $oreon->optGen["debug_rrdtool"] == "1" ) 282 293 error_log("[" . date("d/m/Y H:s") ."] RDDTOOL : $command_line \n", 3, $oreon->optGen["debug_path"]."rrdtool.log"); 283 294 284 //print $command_line;285 295 $fp = popen($command_line , 'r'); 286 296 if (isset($fp) && $fp ) { -
trunk/centreon/www/include/views/graphs/graphODS/generateImages/generateODSMetricImage.php
r6725 r6727 265 265 266 266 $command_line = $oreon->optGen["rrdtool_path_bin"].$command_line." 2>&1"; 267 268 /* 269 * Add Timezone for current user. 270 */ 271 272 $command_line = "export TZ='CMT".$CentreonGMT->getMyGMTForRRD()."' ; ".$command_line; 273 267 274 $command_line = escape_command("$command_line"); 268 275 if ( $oreon->optGen["debug_rrdtool"] == "1" ) -
trunk/centreon/www/include/views/graphs/statusGraphs/displayServiceStatus.php
r6646 r6727 24 24 require_once $centreon_path."www/DBconnect.php"; 25 25 require_once $centreon_path."www/class/Session.class.php"; 26 require_once $centreon_path."/www/class/centreonGMT.class.php"; 26 27 require_once $centreon_path."www/class/Oreon.class.php"; 28 require_once $centreon_path."www/include/common/common-Func.php"; 27 29 28 30 Session::start(); 29 31 $oreon =& $_SESSION["oreon"]; 30 32 31 require_once $centreon_path."www/include/common/common-Func.php";32 33 $CentreonGMT = new CentreonGMT(); 34 33 35 function getStatusDBDir($pearDBO){ 34 36 $data =& $pearDBO->query("SELECT `RRDdatabase_status_path` FROM `config` LIMIT 1"); … … 41 43 */ 42 44 43 (!isset($_GET["start"])) ? $start = time() - (60*60* 48):$start = $_GET["start"];45 (!isset($_GET["start"])) ? $start = time() - (60*60*24): $start = $_GET["start"]; 44 46 (!isset($_GET["end"])) ? $end = time() : $end = $_GET["end"]; 45 47 … … 60 62 exit; 61 63 } else { 64 65 /* 66 * Get GMT for current user 67 */ 68 $CentreonGMT->getMyGMTFromSession($_GET["session_id"]); 69 62 70 /* 63 71 * Get Values … … 169 177 $command_line .= " AREA:ok#19EE11 "; 170 178 $command_line .= " AREA:unk#FFFFFF "; 171 $command_line .= " COMMENT:\" \\l\" "; 179 180 /* 181 * Add comment start and end time inf graph footer. 182 */ 183 184 $rrd_time = addslashes($CentreonGMT->getDate("Y\/m\/d G:i", $start)); 185 $rrd_time = str_replace(":", "\:", $rrd_time); 186 $rrd_time2 = addslashes($CentreonGMT->getDate("Y\/m\/d G:i", $end)) ; 187 $rrd_time2 = str_replace(":", "\:", $rrd_time2); 188 $command_line .= " COMMENT:\" From $rrd_time to $rrd_time2 \\c\" "; 189 190 $command_line = $oreon->optGen["rrdtool_path_bin"].$command_line." 2>&1"; 191 172 192 $command_line .= " LINE1:ok#19EE11:\"Ok\" "; 173 193 $command_line .= " LINE1:warn#F8C706:\"Warning\" "; … … 181 201 $command_line .= " GPRINT:v1:AVERAGE:\"Average\:%7.2lf%s\\l\""; 182 202 183 $command_line = $oreon->optGen["rrdtool_path_bin"].$command_line." 2>&1"; 203 /* 204 * Add Timezone for current user. 205 */ 206 $command_line = "export TZ='CMT".$CentreonGMT->getMyGMTForRRD()."' ; ".$command_line; 207 208 /* 209 * Escale special char 210 */ 184 211 $command_line = escape_command("$command_line"); 212 185 213 if ($oreon->optGen["debug_rrdtool"] == "1") 186 214 error_log("[" . date("d/m/Y H:s") ."] RDDTOOL : $command_line \n", 3, $oreon->optGen["debug_path"]."rrdtool.log"); 187 //print $command_line;215 188 216 $fp = popen($command_line , 'r'); 189 217 if (isset($fp) && $fp ) {
