Changeset 571 for trunk/web2/addons
- Timestamp:
- 01/26/09 16:03:50 (15 years ago)
- Location:
- trunk/web2/addons/job_monarch
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web2/addons/job_monarch/css/styles.css
r570 r571 39 39 { 40 40 float: left; 41 margin: 4px;41 margin: 2px; 42 42 margin-right: 0; 43 padding: 5px;43 padding: 2px; 44 44 } -
trunk/web2/addons/job_monarch/jobstore.php
r569 r571 35 35 } 36 36 37 global $c, $clustername, $cluster ;37 global $c, $clustername, $cluster, $metrics; 38 38 39 39 // Grid Paging stuff … … 422 422 function getNodes() 423 423 { 424 global $jobs, $jobids, $clustername ;424 global $jobs, $jobids, $clustername, $metrics; 425 425 426 426 $display_nodes = array(); … … 438 438 if( !in_array( $jobnode, $display_nodes) ) 439 439 { 440 $display_nodes[ ] = $jobnode;440 $display_nodes[$jobid] = $jobnode; 441 441 } 442 442 } 443 443 } 444 444 } 445 //print_r( $display_nodes ); 445 446 446 $node_results = array(); 447 447 $result_count = count( $display_nodes ); 448 foreach( $display_nodes as $dnode ) 449 { 450 448 foreach( $display_nodes as $jobid => $host ) 449 { 451 450 $nr = array(); 452 451 $nr['c'] = $clustername; 453 $nr['h'] = $ dnode;452 $nr['h'] = $host ; 454 453 $nr['x'] = '5'; 455 454 $nr['v'] = '0'; 455 456 $cpus = $metrics[$host]["cpu_num"]["VAL"]; 457 458 if ( !$cpus ) 459 { 460 $cpus = 1; 461 } 462 463 $load_one = $metrics[$host]["load_one"]["VAL"]; 464 $load = ((float) $load_one) / $cpus; 465 $load_color = load_color($load); 466 467 $nr['l'] = $load_color; 468 469 $job_runtime = (int) $jobs[$jobid]['reported'] - (int) $jobs[$jobid]['start_timestamp']; 470 $job_window = intval($job_runtime * 1.2); 471 472 $nr['jr'] = -$job_window; 473 $nr['js'] = (int) $jobs[$jobid]['start_timestamp']; 456 474 457 475 $node_results[] = $nr; -
trunk/web2/addons/job_monarch/js/jobgrid.js
r570 r571 595 595 {name: 'c', type: 'string', mapping: 'c'}, 596 596 {name: 'h', type: 'string', mapping: 'h'}, 597 {name: 'x', type: 'string', mapping: 'x'}, 597 598 {name: 'v', type: 'string', mapping: 'v'}, 598 {name: 'x', type: 'string', mapping: 'x'} 599 {name: 'l', type: 'string', mapping: 'l'}, 600 {name: 'jr', type: 'string', mapping: 'jr'}, 601 {name: 'js', type: 'string', mapping: 'js'} 599 602 ]), 600 603 listeners: { … … 634 637 tpl: new Ext.XTemplate( 635 638 '<tpl for=".">', 636 '<div class="rrd-float"><img src="../../graph.php?z=small& h={h}&x={x}&v={v}&c={c}" border="0"></div>',639 '<div class="rrd-float"><img src="../../graph.php?z=small&c={c}&h={h}&l={l}&v={v}&x={x}&r=job&jr={jr}&js={js}" border="0"></div>', 637 640 '</tpl>' 638 641 ) … … 641 644 var images = new Ext.Panel({ 642 645 id:'images', 643 title:'My Images',646 //title:'My Images', 644 647 region:'center', 645 648 bodyStyle: 'background: transparent', 646 margins: '5 5 50',649 //margins: '2 2 2 0', 647 650 layout:'fit', 648 651 items: GraphView … … 655 658 height : 300, 656 659 closeAction :'hide', 660 title: 'Node graph details', 657 661 layout: 'fit', 658 662 tbar: new Ext.form.ComboBox({ … … 668 672 selectOnFocus:true, 669 673 xtype: 'combo', 670 width:190 674 width:190, 675 listeners: { 676 select: function(combo, record, index){ 677 var metric = record.data.name; 678 // doe iets 679 } 680 } 681 671 682 }), 672 683 items: [ images ]
Note: See TracChangeset
for help on using the changeset viewer.