Index: /trunk/web/addons/job_monarch/js/monarch.js
===================================================================
--- /trunk/web/addons/job_monarch/js/monarch.js	(revision 643)
+++ /trunk/web/addons/job_monarch/js/monarch.js	(revision 644)
@@ -712,5 +712,5 @@
 					var nodeDatastore	= createNodesDataStore( myparams.c, jobid );
 					var graphView		= createGraphView( nodeDatastore, jobid );
-					var graphTab		= createGraphTab( graphView, jobid );
+					var graphTab		= createGraphTab( graphView, jobid, nodeDatastore );
 
 					//graphView.autoShow = true;
@@ -979,4 +979,5 @@
 			//autoHeight:	true,
 			autoShow:	true,
+			xtype:		'dataview',
 			//autoScroll:	true,
 			//loadMask:	true,
@@ -997,5 +998,5 @@
 
 
-function createGraphTab( view, jobid )
+function createGraphTab( view, jobid, store )
 {
 	var graphTab =
@@ -1005,6 +1006,72 @@
 			title:		jobid,
 			layout:		'border',
+			xtype:		'panel',
 			bodyStyle:	'overflow:auto; background: transparent; heigth: auto',
 			closable:	true,
+
+			tbar:
+			[
+				'Metric name: ',
+				new Ext.form.ComboBox(
+				{
+					fieldLabel:	'Metric',
+					store:		MetricsDataStore,
+					valueField:	'name',
+					displayField:	'name',
+					typeAhead:	true,
+					mode:		'remote',
+					triggerAction:	'all',
+					emptyText:	'load_one',
+					selectOnFocus:	true,
+					xtype:		'combo',
+					width:		100,
+					listeners:
+					{
+						select: 
+								
+						function(combo, record, index)
+						{
+							var metric	= record.data.name;
+
+							var parentPanel	= this.findParentByType( 'panel' );
+							var my_dataview	= parentPanel.items.get(0);
+
+							my_dataview.getStore().baseParams.metricname	= metric;
+							my_dataview.getStore().reload();
+						}
+					}
+				}),
+				'-',
+				'Range: ',
+				new Ext.form.ComboBox(
+				{
+					fieldLabel:	'Range',
+					//store:		MetricsDataStore,
+					valueField:	'name',
+					displayField:	'name',
+					typeAhead:	true,
+					//mode:		'remote',
+					triggerAction:	'all',
+					emptyText:	'job',
+					selectOnFocus:	true,
+					xtype:		'combo',
+					width:		100,
+					listeners:
+					{
+					//	select: 
+								
+					//	function(combo, record, index)
+					//	{
+					//		var metric	= record.data.name;
+
+					//		var parentPanel	= this.findParentByType( 'panel' );
+					//		var my_dataview	= parentPanel.items.get(0);
+
+					//		my_dataview.getStore().baseParams.metricname	= metric;
+					//		my_dataview.getStore().reload();
+					//	}
+					}
+				}),
+			],
 
 			items:
@@ -1012,5 +1079,5 @@
 				view,
 				{
-					region: 	'west',
+					region: 	'east',
 					split:		true,
 					title:		'Job info',
@@ -1058,41 +1125,4 @@
 			// RB TODO: range combobox; hour, day, week, etc
 
-			tbar:
-			[
-				'Metric name: ',
-				new Ext.form.ComboBox(
-				{
-					fieldLabel:	'Metric',
-					//id:		'myComboBox',
-					store:		MetricsDataStore,
-					valueField:	'name',
-					displayField:	'name',
-					typeAhead:	true,
-					mode:		'remote',
-					triggerAction:	'all',
-					emptyText:	'load_one',
-					selectOnFocus:	true,
-					xtype:		'combo',
-					width:		100,
-					//myview:		view,
-					listeners:
-					{
-					//	select: 
-								
-					//	function(combo, record, index)
-					//	{
-					//		var metric	= record.data.name;
-
-					//		var parentPanel	= this.findParentByType( 'tabpanel' );
-							//var parentPanel	= Ext.getCmp( this.el.up( 'div.x-tab-panel' ).id );
-					//		var my_dataview	= parentPanel.getActiveTab().findByType(Ext.DataView);
-					//		alert( my_dataview.xtype );
-
-					//		my_dataview.getStore().baseParams.metricname	= metric;
-					//		my_dataview.getStore().reload();
-					//	}
-					}
-				})
-			]
 
 			//listeners:
@@ -1200,4 +1230,5 @@
 		layout:		'fit',
 		items:		[ nodePanel ],
+		collapsible:	true,
 		listeners:
 		{
@@ -1272,5 +1303,5 @@
 			nodeDatastore	= createNodesDataStore( myparams.c, graphJids[w][t] );
 			graphView	= createGraphView( nodeDatastore, graphJids[w][t] );
-			graphTab	= createGraphTab( graphView, graphJids[w][t] );
+			graphTab	= createGraphTab( graphView, graphJids[w][t], nodeDatastore );
 
 			nodeDatastore.removeAll();
@@ -1436,4 +1467,5 @@
 		shadow:		true,
 		shadowOffset:	10,
+		bodyStyle:	'overflow:auto; background: transparent; heigth: auto',
 		layout:		'border',
 		items:		
