Changeset 149
- Timestamp:
- 06/20/05 14:50:55 (18 years ago)
- Location:
- trunk/web/addons/toga
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/addons/toga/graph.php
r145 r149 48 48 49 49 if (isset($graph)) { 50 $rrd_dirs = $trd->getRrdDirs( $ start, $stop );50 $rrd_dirs = $trd->getRrdDirs( $period_start, $period_stop ); 51 51 $series = ''; 52 52 … … 332 332 # Generate the rrdtool graph command. 333 333 # 334 $command = RRDTOOL . " graph - --start $ start --end $stop ".334 $command = RRDTOOL . " graph - --start $period_start --end $period_stop ". 335 335 "--width $width --height $height $upper_limit $lower_limit ". 336 336 "--title '$title' $vertical_label $extras $background ". -
trunk/web/addons/toga/index.php
r145 r149 38 38 global $metrics, $reports, $m, $default_metric; 39 39 global $default_refresh, $filterorder, $view; 40 global $TARCHD ;40 global $TARCHD, $period_start, $period_stop, $h, $id; 41 41 42 42 if( isset($default_metric) and !isset($m) ) … … 189 189 190 190 if( $view == "search" ) { 191 191 192 $node_menu .= "<B>></B>\n"; 192 193 $node_menu .= "<B>Jobarchive</B> "; 193 194 $tpl->assign("view", "search" ); 194 195 $form_name = "archive_search_form"; 195 $tpl->assign("form_name", $form_name ); 196 $tpl->assignGlobal("form_name", $form_name ); 197 196 198 } else { 197 199 $form_name = "toga_form"; 198 $tpl->assign ("form_name", $form_name );200 $tpl->assignGlobal("form_name", $form_name ); 199 201 $tpl->assign("view", "overview" ); 200 202 } … … 218 220 $metric_menu .= "</SELECT>\n"; 219 221 220 $tpl->assign("metric_menu", $metric_menu );221 222 } 223 224 $tpl->assign("metric_menu", $metric_menu ); 222 225 } 223 226 $m = $metricname; … … 269 272 } 270 273 274 function includeHostPage() { 275 276 global $tpl; 277 278 $tpl->assignInclude( "main", "templates/host_view.tpl" ); 279 } 280 271 281 $tpl = new TemplatePower( "templates/index.tpl" ); 272 282 273 283 $tpl->assignInclude( "header", "templates/header.tpl" ); 274 284 285 if( isset( $h ) and $h != '' ) { 286 $hostname = $h; 287 $view = "host"; 288 } 289 275 290 switch( $view ) { 276 291 … … 283 298 284 299 includeSearchPage(); 300 break; 301 302 case "host": 303 304 includeHostPage(); 285 305 break; 286 306 … … 313 333 break; 314 334 335 case "host": 336 337 include "./host_view.php"; 338 makeHostView(); 339 break; 340 315 341 default: 316 342 -
trunk/web/addons/toga/search.php
r145 r149 164 164 global $clustername, $tpl, $id, $user, $name, $start_from_time, $start_to_time, $queue; 165 165 global $end_from_time, $end_to_time, $filter, $default_showhosts, $m, $hosts_up; 166 global $ start, $stop;166 global $period_start, $period_stop; 167 167 168 168 $metricname = $m; … … 269 269 //printf("start = %s stop = %s\n", $start, $stop ); 270 270 271 if( !$ start ) // Add an additional 5 minutes before272 $ start = intval( $job_start - 600);271 if( !$period_start ) // Add an additional 5 minutes before 272 $period_start = intval( $job_start - (intval( $runningtime * 0.10 ) ) ); 273 273 else 274 $ start = datetimeToEpoch( $start );275 276 if( !$ stop ) // Add an additional 5 minutes after277 $ stop = intval( $job_stop + 600);274 $period_start = datetimeToEpoch( $period_start ); 275 276 if( !$period_stop ) // Add an additional 5 minutes after 277 $period_stop = intval( $job_stop + (intval( $runningtime * 0.10 ) ) ); 278 278 else 279 $ stop = datetimeToEpoch( $stop );279 $period_stop = datetimeToEpoch( $period_stop ); 280 280 281 281 //printf("start = %s stop = %s\n", $start, $stop ); 282 282 283 $tpl->assign(" j_start", epochToDatetime( $start ) );284 $tpl->assign(" j_stop", epochToDatetime( $stop ) );283 $tpl->assign("period_start", epochToDatetime( $period_start ) ); 284 $tpl->assign("period_stop", epochToDatetime( $period_stop ) ); 285 285 286 286 $hosts_up = array(); … … 340 340 $val = $metrics[$host][$metricname]; 341 341 $class = "metric"; 342 $host_link="\"?c=$cluster_url&h=$host_url&job_start=$job_start&job_stop=$job_stop& start=$start&stop=$stop\"";342 $host_link="\"?c=$cluster_url&h=$host_url&job_start=$job_start&job_stop=$job_stop&period_start=$period_start&period_stop=$period_stop\""; 343 343 344 344 if ($val[TYPE]=="timestamp" or $always_timestamp[$metricname]) { … … 347 347 $textval = "$val[VAL] $val[UNITS]"; 348 348 } else { 349 $graphargs = "z=small&c=$cluster_url&m=$metricname&h=$host_url&v=$val[VAL]&x=$max&n=$min&job_start=$job_start&job_stop=$job_stop& start=$start&stop=$stop";349 $graphargs = "z=small&c=$cluster_url&m=$metricname&h=$host_url&v=$val[VAL]&x=$max&n=$min&job_start=$job_start&job_stop=$job_stop&period_start=$period_start&period_stop=$period_stop"; 350 350 } 351 351 if ($textval) { -
trunk/web/addons/toga/templates/search.tpl
r145 r149 52 52 function setPeriodTimestamps() { 53 53 54 document.archive_search_form. start.value = document.archive_search_form.period_start_pick.value;55 document.archive_search_form. stop.value = document.archive_search_form.period_stop_pick.value;54 document.archive_search_form.period_start.value = document.archive_search_form.period_start_pick.value; 55 document.archive_search_form.period_stop.value = document.archive_search_form.period_stop_pick.value; 56 56 } 57 57 … … 258 258 Columns {cols_menu} 259 259 </FONT><BR> 260 261 <INPUT TYPE="HIDDEN" NAME=" start" VALUE="{j_start}">262 <INPUT TYPE="HIDDEN" NAME=" stop" VALUE="{j_stop}">260 <FONT SIZE="-1"> 261 <INPUT TYPE="HIDDEN" NAME="period_start" VALUE="{period_start}"> 262 <INPUT TYPE="HIDDEN" NAME="period_stop" VALUE="{period_stop}"> 263 263 Graph timeperiod from 264 <INPUT TYPE="text" NAME="period_start_pick" VALUE="{ j_start}" ALT="Start time" DISABLED="TRUE">264 <INPUT TYPE="text" NAME="period_start_pick" VALUE="{period_start}" ALT="Start time" DISABLED="TRUE"> 265 265 <a href="javascript:show_calendar('document.archive_search_form.period_start_pick', document.archive_search_form.period_start_pick.value);" alt="Click to select a date/time" title="Click to select a date/time"> 266 266 <img src="cal.gif" width="16" height="16" border="0"></a> 267 267 <a href="#" onClick="javascript: document.archive_search_form.period_start_pick.value=''" alt="Click here to clear field" title="Click here to clear field"> 268 268 <IMG SRC="redcross.jpg" BORDER=0></A> 269 to <INPUT TYPE="text" NAME="period_stop_pick" VALUE="{ j_stop}" ALT="Stop time" DISABLED="TRUE">269 to <INPUT TYPE="text" NAME="period_stop_pick" VALUE="{period_stop}" ALT="Stop time" DISABLED="TRUE"> 270 270 <a href="javascript:show_calendar('document.archive_search_form.period_stop_pick', document.archive_search_form.period_stop_pick.value);" alt="Click to select a date/time" title="Click to select a date/time"> 271 271 <img src="cal.gif" width="16" height="16" border="0"></a>
Note: See TracChangeset
for help on using the changeset viewer.