Changeset 569
- Timestamp:
- 01/26/09 13:06:22 (15 years ago)
- Location:
- trunk/web2/addons/job_monarch
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web2/addons/job_monarch/jobstore.php
r566 r569 61 61 $_SESSION["data"] = &$myxml_data; 62 62 63 global $jobs ;63 global $jobs, $metrics; 64 64 65 65 $data_gatherer = new DataGatherer( $clustername ); … … 92 92 getNodes(); 93 93 break; 94 case "GETMETRICS": 95 getMetrics(); 96 break; 94 97 default: 95 98 echo "{failure:true}"; 96 99 break; 100 } 101 102 function getMetrics( $host=null ) 103 { 104 global $metrics; 105 106 reset($metrics); 107 if( !$host) 108 { 109 $firsthost = key($metrics); 110 } 111 else 112 { 113 $firsthost = $host; 114 } 115 116 $first_metrics = $metrics[$firsthost]; 117 118 $metric_list = array(); 119 120 $metric_count = 0; 121 122 foreach( $first_metrics as $metricname => $metricval ) 123 { 124 $metric = array(); 125 $metric['id'] = $metricname; 126 $metric['name'] = $metricname; 127 128 $metric_list[] = $metric; 129 $metric_count = $metric_count + 1; 130 } 131 132 $results = array(); 133 $results['names'] = $metric_list; 134 $results['total'] = $metric_count; 135 136 $jsonresults = JEncode( $results ); 137 138 echo $jsonresults; 139 140 return 0; 97 141 } 98 142 -
trunk/web2/addons/job_monarch/js/jobgrid.js
r568 r569 532 532 dataIndex: 'nodes', 533 533 width: 100, 534 hidden: true,534 hidden: false, 535 535 renderer: jobCellRender 536 536 },{ … … 560 560 561 561 var win; 562 563 MetricsDataStore = new Ext.data.Store({ 564 id: 'MetricsDataStore', 565 proxy: JobProxy, 566 autoLoad: false, 567 baseParams: { task: "GETMETRICS" }, 568 reader: new Ext.data.JsonReader({ 569 root: 'names', 570 totalProperty: 'total', 571 id: 'id' 572 },[{ 573 name: 'ID' 574 },{ 575 name: 'name' 576 }]) 577 }); 562 578 563 579 SearchField = new Ext.app.SearchField({ … … 638 654 height : 300, 639 655 closeAction :'hide', 640 //tbar: next Ext. 656 tbar: new Ext.form.ComboBox({ 657 fieldLabel: 'Metric', 658 //hiddenName:'ID', 659 store: MetricsDataStore, 660 valueField:'name', 661 displayField:'name', 662 typeAhead: true, 663 mode: 'remote', 664 triggerAction: 'all', 665 emptyText:'Select metric', 666 selectOnFocus:true, 667 xtype: 'combo', 668 width:190 669 }), 641 670 items: [ images ] 642 671 }); 643 672 } 644 673 NodesDataStore.load(); 645 674 win.show(Button); … … 705 734 collapsible: true, 706 735 animCollapse: true, 707 width: 300,708 height: 500,736 width: 500, 737 height: 400, 709 738 x: 10, 710 739 y: 10, … … 748 777 y: 375, 749 778 width:860, 750 height:4 27,779 height:445, 751 780 plain:true, 752 781 shadow: true, -
trunk/web2/addons/job_monarch/libtoga.php
r565 r569 1355 1355 if( $filtername == 'host' && $hostname == $filtervalue ) 1356 1356 { 1357 $addhost = 0;1357 $addhost = 1; 1358 1358 } 1359 1359 else
Note: See TracChangeset
for help on using the changeset viewer.