- Timestamp:
- 06/07/05 15:31:15 (18 years ago)
- Location:
- trunk/web
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/addons/toga/conf.php
r115 r129 1 1 <?php 2 // Show hosts in a jobview by default? 3 // 4 $default_showhosts = 1; 2 5 3 6 // Path to Ganglia's web frontend root … … 15 18 16 19 // How to mark nodes with a job in clusterimage 17 // allcpus when all cpu's are in use18 // singlecpu when less than all cpus are in use19 20 // 20 //$JOB_NODE_MARKING_ALLCPUS = "J";21 //$JOB_NODE_MARKING_SINGLECPU = "j";22 21 $JOB_NODE_MARKING = "J"; 23 22 … … 27 26 $DATA_SOURCE = '127.0.0.1:8649'; 28 27 28 // Is there a jobarchive? 29 // 30 $TARCHD = 1; 31 29 32 ?> -
trunk/web/addons/toga/index.php
r126 r129 37 37 global $self, $filter, $cluster_url, $get_metric_string; 38 38 global $metrics, $reports, $m, $default_metric; 39 global $default_refresh; 39 40 40 41 if( isset($default_metric) and !isset($m) ) … … 46 47 $metricname = "load_one"; 47 48 48 //$metricname = ($m) ? $m : $default_metric; 49 //printf( "m = %s, metricname = %s, default_metric = %s\n", $m, $metricname, $default_metric ); 50 if ( $context == "control" && $controlroom < 0 ) 51 $header = "header-nobanner"; 52 else 53 $header = "header"; 49 $header = "header"; 54 50 55 51 # Maintain our path through the grid tree. 56 52 $me = $self . "@" . $grid[$self][AUTHORITY]; 57 53 58 if ($initgrid) {59 $gridstack = array();60 $gridstack[] = $me; 61 } elseif ($gridwalk=="fwd") {54 $gridstack = array(); 55 $gridstack[] = $me; 56 57 if ($gridwalk=="fwd") { 62 58 # push our info on gridstack, format is "name@url>name2@url". 63 59 if (end($gridstack) != $me) { … … 99 95 100 96 # The page to go to when "Get Fresh Data" is pressed. 101 if (isset($page)) 102 $tpl->assign("page",$page); 103 else 104 $tpl->assign("page","./"); 97 $tpl->assign("page","./"); 105 98 106 99 # Templated Logo image … … 169 162 170 163 if( array_key_exists( "id", $filter ) ) { 171 //$context_ranges[]="hour";172 //$context_ranges[]="day";173 //$context_ranges[]="week";174 //$context_ranges[]="month";175 //$context_ranges[]="year";176 //if ($jobrange)177 // $context_ranges[]="job";178 179 //$range_menu = "<B>Last</B> "180 // ."<SELECT NAME=\"r\" OnChange=\"toga_form.submit();\">\n";181 //foreach ($context_ranges as $v) {182 // $url=rawurlencode($v);183 // $range_menu .= "<OPTION VALUE=\"$url\" ";184 // if ($v == $range)185 // $range_menu .= "SELECTED";186 // $range_menu .= ">$v\n";187 // }188 // $range_menu .= "</SELECT>\n";189 190 // $tpl->assign("range_menu", $range_menu);191 192 //$metricname = $m;193 164 194 165 if (is_array($context_metrics) ) { … … 237 208 } 238 209 239 function include Jobview() {210 function includeSearchpage() { 240 211 global $tpl; 241 212 242 $tpl->assignInclude( "main", "templates/jobview.tpl" ); 213 $tpl->assignInclude( "main", "templates/search.tpl" ); 214 215 } 216 217 function includeSearchThumb() { 218 global $tpl; 219 220 $tpl->assignInclude( "archive", "templates/inc_search.tpl" ); 221 243 222 } 244 223 … … 249 228 } 250 229 251 function makeJobview() {252 253 }254 255 230 $tpl = new TemplatePower( "templates/index.tpl" ); 256 231 … … 262 237 263 238 includeOverview(); 264 break; 265 266 //case "jobview": 267 268 // includeJobview(); 269 // break; 239 if( $TARCHD ) 240 includeSearchThumb(); 241 break; 242 243 case "search": 244 245 includeSearchPage(); 246 break; 270 247 271 248 default: … … 280 257 $title = "Torque Report"; 281 258 makeHeader(); 259 $tpl->assign("cluster_url", rawurlencode($clustername) ); 260 $tpl->assign("cluster", $clustername ); 282 261 283 262 switch( $view ) { … … 289 268 break; 290 269 291 //case "jobview": 292 293 // makeJobview(); 294 // break; 270 case "search": 271 272 include "./search.php"; 273 makeSearchPage(); 274 break; 295 275 296 276 default: -
trunk/web/addons/toga/libtoga.php
r126 r129 60 60 chdir( $GANGLIA_PATH ); 61 61 62 $context = 'cluster'; 63 62 64 include_once "./conf.php"; 63 65 include_once "./functions.php"; 64 66 include_once "./ganglia.php"; 65 include_once "./get_context.php";67 //include_once "./get_context.php"; 66 68 include_once "./get_ganglia.php"; 67 69 … … 76 78 // 77 79 global $context, $clustername, $reports; 80 78 81 //$clustername = $httpvars->getClusterName(); 79 //$context = 'cluster';80 81 82 82 83 global $default_metric; -
trunk/web/addons/toga/overview.php
r128 r129 7 7 //$tpl->assign( "self", "./index.php" ); 8 8 $tpl->assign( "clustername", $clustername ); 9 10 if( $TARCHD ) 11 $tpl->assign( "cluster_url", rawurlencode($clustername) ); 9 12 10 13 $data_gatherer->parseXML(); … … 426 429 global $sortorder, $sortby, $filter, $sh, $hc, $m; 427 430 global $cluster_url, $get_metric_string, $host_url, $metrics; 428 global $start, $end, $reports, $gnodes ;431 global $start, $end, $reports, $gnodes, $default_showhosts; 429 432 430 433 $metricname = $m; … … 523 526 $tpl->assignGlobal("f_jobs_nr", $f_jobs ); 524 527 525 if( array_key_exists( "id", $filter ) ) {528 if( array_key_exists( "id", $filter ) and $start_time ) { 526 529 $tpl->newBlock( "showhosts" ); 527 530 … … 545 548 $tpl->assign("cols_menu", $cols_menu); 546 549 547 if( $sh) $showhosts = $sh;548 if( !$showhosts) $showhosts = 0;550 $showhosts = isset($sh) ? $sh : $default_showhosts; 551 //if( !$showhosts) $showhosts = $default_showhosts; 549 552 $tpl->assign("checked$showhosts", "checked"); 550 553 -
trunk/web/addons/toga/templates/header.tpl
r126 r129 29 29 <INPUT TYPE="SUBMIT" VALUE="Get Fresh Data"> 30 30 </TD> 31 <TD></TD> 31 32 </TR> 32 33 <TR> 33 <TD COLSPAN= "1">34 <TD COLSPAN=1> 34 35 {metric_menu} 35 36 {range_menu} … … 39 40 <B>{alt_view}</B> 40 41 </TD> 42 <!-- INCLUDE BLOCK : archive --> 41 43 </TR> 42 44 </TABLE> -
trunk/web/templates/toga/cluster_extra.tpl
r113 r129 3 3 <tr> 4 4 <td valign=center> 5 <a href="./addons/toga/?c={cluster}"><b> Torque Job's</b></a>5 <a href="./addons/toga/?c={cluster}"><b>Joblist</b></a> 6 6 </td> 7 7 </tr>
Note: See TracChangeset
for help on using the changeset viewer.