Changeset 404
- Timestamp:
- 07/04/07 22:40:08 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/addons/job_monarch/libtoga.php
r350 r404 1210 1210 foreach( $nodes as $hostname => $node ) 1211 1211 { 1212 $x = 0;1213 $y = 0;1212 $x = null; 1213 $y = null; 1214 1214 1215 1215 if( $x_present && $y_present ) … … 1228 1228 if( $n < 2 ) 1229 1229 { 1230 //printf( "removing node %s - x present & y present + <2 x,y matches\n", $hostname ); 1230 1231 unset( $nodes[$hostname] ); 1231 1232 } … … 1238 1239 if( $n < 1 ) 1239 1240 { 1241 //printf( "removing node %s - x present & !y present + <1 x match\n", $hostname ); 1240 1242 unset( $nodes[$hostname] ); 1241 1243 } … … 1249 1251 if( $n < 1 ) 1250 1252 { 1253 //printf( "removing node %s - y present & !x present + <1 y match\n", $hostname ); 1251 1254 unset( $nodes[$hostname] ); 1252 1255 } … … 1258 1261 1259 1262 1260 if( !$x_min ) 1263 //printf( "node %s x_min %s x %s\n", $hostname, $x_min, $x ); 1264 1265 if( !$x_min && $x != null ) 1261 1266 { 1262 1267 $x_min = $x; 1263 1268 } 1264 else if( $x < $x_min )1269 else if( $x < $x_min && $x != null ) 1265 1270 { 1266 1271 $x_min = $x; 1267 1272 } 1268 if( !$x_max )1273 if( !$x_max && $x != null ) 1269 1274 { 1270 1275 $x_max = $x; 1271 1276 } 1272 else if( $x > $x_max )1277 else if( $x > $x_max && $x != null ) 1273 1278 { 1274 1279 $x_max = $x; 1275 1280 } 1276 if( !$y_min )1281 if( !$y_min && $y != null ) 1277 1282 { 1278 1283 $y_min = $y; 1279 1284 } 1280 else if( $y < $y_min )1285 else if( $y < $y_min && $y != null ) 1281 1286 { 1282 1287 $y_min = $y; 1283 1288 } 1284 if( !$y_max )1289 if( !$y_max && $y != null ) 1285 1290 { 1286 1291 $y_max = $y; 1287 1292 } 1288 else if( $y > $y_max )1293 else if( $y > $y_max && $y != null ) 1289 1294 { 1290 1295 $y_max = $y; … … 1368 1373 } 1369 1374 } 1375 //print_r( $nodes ); 1370 1376 1371 1377 for( $n = $x_min; $n <= $x_max; $n++ ) … … 1398 1404 if ( $nn < 2 ) 1399 1405 { 1406 //printf( "skipping node %s - y present & x present + <2 x,y matchs\n", $host); 1400 1407 continue; 1401 1408 } 1402 if( ( $rx ) > $n )1409 if( intval( $rx ) > $n ) 1403 1410 { 1404 1411 $m = $y_max + 1; 1412 //printf( "skipping node %s - y present & x present + rx %s > n %s\n", $rx, $n); 1413 continue; 1414 } 1415 if( intval( $ry ) > $m ) 1416 { 1417 //printf( "skipping node %s - y present & x present + ry %s > m %s\n", $ry, $m); 1405 1418 continue; 1406 1419 } … … 1416 1429 1417 1430 if( !in_array( $host, $filtered_nodes ) ) 1431 { 1432 printf( "setting node %s showinfo to 0 - not found in filtered_nodes", $host); 1418 1433 $nodes[$cur_node]->setShowinfo( 0 ); 1434 } 1419 1435 1420 1436 $nodes[$cur_node]->setCoords( $x, $y ); … … 1427 1443 else if( $this->isBig() ) 1428 1444 $nodes[$cur_node]->drawBig(); 1445 1446 $cur_node++; 1429 1447 } 1430 1448 if( $this->isBig() ) … … 1448 1466 } 1449 1467 1450 $cur_node++;1451 1468 } 1452 1469 } … … 1483 1500 1484 1501 if( !in_array( $host, $filtered_nodes ) ) 1502 { 1485 1503 $nodes[$host]->setShowinfo( 0 ); 1504 } 1486 1505 1487 1506 if( $this->isSmall() )
Note: See TracChangeset
for help on using the changeset viewer.