Changeset 575 for trunk/web2/addons/job_monarch
- Timestamp:
- 01/29/09 14:29:10 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web2/addons/job_monarch/libtoga.php
r574 r575 1049 1049 $this->small = false; 1050 1050 $this->big = false; 1051 $this->selected = false; 1051 1052 } 1052 1053 … … 1177 1178 { 1178 1179 $this->showinfo = $showinfo; 1180 } 1181 1182 function setSelected() 1183 { 1184 $this->selected = true; 1179 1185 } 1180 1186 … … 1268 1274 } 1269 1275 1270 imageFilledRectangle( $this->image, $this->x, $this->y, $this->x+($size-$sep), $this->y+($size-$sep), $black_color ); 1276 $select_color = imageColorAllocate( $this->image, 91, 255, 41 ); 1277 1278 if( $this->selected ) 1279 { 1280 imageFilledRectangle( $this->image, $this->x, $this->y, $this->x+($size), $this->y+($size), $select_color ); 1281 } 1282 else 1283 { 1284 imageFilledRectangle( $this->image, $this->x, $this->y, $this->x+($size-$sep), $this->y+($size-$sep), $black_color ); 1285 } 1271 1286 1272 1287 if( $this->showinfo) … … 1347 1362 $this->height = 0; 1348 1363 $this->output = 1; 1364 $this->selected = ''; 1349 1365 } 1350 1366 … … 1396 1412 $mynjobs = $node->getJobs(); 1397 1413 1398 if( count( $mynjobs ) > 0 ) 1414 if( $filtername == 'host' && $hostname == $filtervalue ) 1415 { 1416 $addhost = 1; 1417 $this->selected = $hostname; 1418 } 1419 else if( count( $mynjobs ) > 0 ) 1399 1420 { 1400 1421 foreach( $mynjobs as $myjob ) … … 1419 1440 else 1420 1441 { 1421 if( $ filtername == 'host' && $hostname== $filtervalue )1442 if( $jobs[$myjob][$filtername] == $filtervalue ) 1422 1443 { 1423 1444 $addhost = 1; 1445 continue; 1424 1446 } 1425 else 1447 else if( $jobs[$myjob][$filtername] != $filtervalue ) 1426 1448 { 1427 if( $jobs[$myjob][$filtername] == $filtervalue ) 1428 { 1429 $addhost = 1; 1430 continue; 1431 } 1432 else if( $jobs[$myjob][$filtername] != $filtervalue ) 1433 { 1434 $addhost = 0; 1435 } 1449 $addhost = 0; 1436 1450 } 1437 1451 if( $filtername == 'query' ) … … 1557 1571 $jobs = $mydatag->getJobs(); 1558 1572 $filtered_nodes = $this->filterNodes( $jobs, $nodes ); 1573 $selected_host = $this->selected; 1559 1574 1560 1575 if( $SORTBY_HOSTNAME != "" ) … … 1951 1966 $nodes[$cur_node]->setShowinfo( 0 ); 1952 1967 } 1968 else 1969 { 1970 if( $selected_host != '' && $host == $selected_host ) 1971 { 1972 $nodes[$cur_node]->setSelected(); 1973 } 1974 } 1953 1975 1954 1976 $nodes[$cur_node]->setCoords( $x, $y );
Note: See TracChangeset
for help on using the changeset viewer.