Changeset 454 for trunk/web/addons
- Timestamp:
- 02/05/08 16:04:07 (15 years ago)
- Location:
- trunk/web/addons/job_monarch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/addons/job_monarch/conf.php
r417 r454 18 18 // Show the column job attribute 'nodes' hostnames? 19 19 // 20 $COLUMN_NODES = 0;20 $COLUMN_NODES = 1; 21 21 22 22 // Path to Ganglia's web frontend root -
trunk/web/addons/job_monarch/libtoga.php
r428 r454 126 126 } 127 127 128 /** 129 * Replace stripos() 130 * 131 * @category PHP 132 * @package PHP_Compat 133 * @link http://php.net/function.stripos 134 * @author Aidan Lister <aidan@php.net> 135 * @version $Revision: 1.1.1.1 $ 136 * @since PHP 5 137 * @require PHP 4.0.1 (trigger_error) 138 */ 139 if (!function_exists('stripos')) 140 { 141 function stripos ($haystack, $needle, $offset = null) 142 { 143 if (!is_scalar($haystack)) { 144 trigger_error('stripos() expects parameter 1 to be string, ' . gettype($haystack) . ' given', E_USER_WARNING); 145 return false; 146 } 147 148 if (!is_scalar($needle)) { 149 trigger_error('stripos() needle is not a string or an integer.', E_USER_WARNING); 150 return false; 151 } 152 153 if (!is_null($offset) && !is_numeric($offset)) { 154 trigger_error('stripos() expects parameter 3 to be long, ' . gettype($offset) . ' given', E_USER_WARNING); 155 return false; 156 } 157 158 // Manipulate the string if there is an offset 159 $fix = 0; 160 if (!is_null($offset)) 161 { 162 if ($offset > 0) 163 { 164 $haystack = substr($haystack, $offset, strlen($haystack) - $offset); 165 $fix = $offset; 166 } 167 } 168 169 $segments = explode (strtolower($needle), strtolower($haystack), 2); 170 $position = strlen($segments[0]) + $fix; 171 172 return $position; 173 } 174 } 175 128 176 class TarchDbase { 129 177 … … 132 180 function TarchDbase( $ip = null, $dbase = null ) { 133 181 182 global $CLUSTER_CONFS, $clustername; 134 183 global $JOB_ARCHIVE_DBASE; 135 184 185 // Import cluster specific settings 186 // 187 foreach( $CLUSTER_CONFS as $confcluster => $conffile ) 188 { 189 if( strtolower( trim($this->clustername) ) == strtolower(trim($confcluster)) ) 190 { 191 include_once $conffile; 192 } 193 } 194 136 195 $db_fields = explode( '/', $JOB_ARCHIVE_DBASE ); 137 196 138 $this->ip 139 $this->dbase 140 $this->conn 197 $this->ip = $db_fields[0]; 198 $this->dbase = $db_fields[1]; 199 $this->conn = null; 141 200 } 142 201 … … 194 253 $this->resultcount = (int) $count_result[0][count]; 195 254 196 $select_query = "SELECT " . $select_result_idname . " " . $query . " ORDER BY job_id LIMIT " . $SEARCH_RESULT_LIMIT;255 $select_query = "SELECT " . $select_result_idname . " " . $query . " ORDER BY job_id DESC LIMIT " . $SEARCH_RESULT_LIMIT; 197 256 } 198 257 … … 1065 1124 1066 1125 global $SORTBY_HOSTNAME, $SORT_ORDER, $skan_str; 1067 //global $skan_str;1068 1126 global $x_first, $y_first; 1069 1127 1070 1128 foreach( $CLUSTER_CONFS as $confcluster => $conffile ) 1071 1129 { 1072 //printf( "cf %s cc %s\n", $this->clustername, $confcluster);1073 //printf( "cf %s cc %s\n", strtolower( trim($this->clustername)), trim($confcluster) );1074 1130 if( strtolower( trim($this->clustername) ) == strtolower(trim($confcluster)) ) 1075 1131 { 1076 //printf( "cf %s cc %s\n", $conffile, $confcluster);1077 1132 include_once $conffile; 1078 1133 }
Note: See TracChangeset
for help on using the changeset viewer.