Changeset 115
- Timestamp:
- 05/30/05 10:54:38 (18 years ago)
- Location:
- trunk/web/addons/toga
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/addons/toga/conf.php
r111 r115 18 18 // singlecpu when less than all cpus are in use 19 19 // 20 $JOB_NODE_MARKING_ALLCPUS = "J"; 21 $JOB_NODE_MARKING_SINGLECPU = "j"; 20 //$JOB_NODE_MARKING_ALLCPUS = "J"; 21 //$JOB_NODE_MARKING_SINGLECPU = "j"; 22 $JOB_NODE_MARKING = "J"; 22 23 23 24 // XML Datasource for Toga -
trunk/web/addons/toga/libtoga.php
r114 r115 391 391 392 392 global $SMALL_CLUSTERIMAGE_NODEWIDTH, $JOB_NODE_MARKING_ALLCPUS, $JOB_NODE_MARKING_SINGLECPU; 393 global $JOB_NODE_MARKING; 393 394 394 395 $this->load = $this->determineLoad(); … … 417 418 418 419 if( count( $this->jobs ) > 0 ) 419 420 if( $this->tasks < $this->cpus ) 421 $node_mark = $JOB_NODE_MARKING_SINGLECPU; 422 423 else if( $this->tasks == $this->cpus ) 424 $node_mark = $JOB_NODE_MARKING_ALLCPUS; 420 $node_mark = $JOB_NODE_MARKING; 421 422 // if( $this->tasks < $this->cpus ) 423 // $node_mark = $JOB_NODE_MARKING_SINGLECPU; 424 425 // else if( $this->tasks == $this->cpus ) 426 // $node_mark = $JOB_NODE_MARKING_ALLCPUS; 425 427 426 428 if( $node_mark ) -
trunk/web/addons/toga/overview.php
r114 r115 33 33 34 34 $days = intval( $time / 86400 ); 35 $time = $days ? $time % ($days * 86400) : $time; 36 35 37 if( $days > 0 ) { 36 $time = $time % ($days * 86400);37 38 if( $days > 1 ) 38 39 $date_str .= $days . 'days - '; … … 40 41 $date_str .= $days . 'day - '; 41 42 } 43 42 44 $hours = intval( $time / 3600 ); 45 $time = $hours ? $time % ($hours * 3600) : $time; 46 43 47 if( $hours > 0 ) { 44 $time = $time % ($hours * 3600);45 48 $date_str .= $hours . ':'; 46 49 $date_unit = ' hours'; 47 50 } 51 48 52 $minutes = intval( $time / 60 ); 53 $seconds = $minutes ? $time % ($minutes * 60) : $time; 54 49 55 if( $minutes > 0 ) { 50 $seconds = $time % ($minutes * 60); 51 $date_str .= $minutes . ':'; 56 57 if( $minutes >= 10 ) 58 $date_str .= $minutes . ':'; 59 else 60 $date_str .= '0' . $minutes . ':'; 61 52 62 $date_unit = (!isset($date_unit)) ? 'minutes' : $date_unit; 53 } 63 } else if( $days > 0 or $hours > 0 ) { 64 $date_str .= '00:'; 65 $date_unit = (!isset($date_unit)) ? 'minutes' : $date_unit; 66 } 67 54 68 $date_unit = (!isset($date_unit)) ? 'seconds' : $date_unit; 55 $date_str .= $seconds . ' ' . $date_unit; 69 70 if( $seconds > 0 ) { 71 72 if( $seconds >= 10 ) 73 $date_str .= $seconds . ' ' . $date_unit; 74 else 75 $date_str .= '0' . $seconds . ' ' . $date_unit; 76 77 } else if ( $days > 0 or $hours > 0 or $minutes > 0 ) 78 $date_str .= '00 ' . $date_unit; 56 79 57 80 return $date_str;
Note: See TracChangeset
for help on using the changeset viewer.