Index: trunk/web/addons/job_monarch/js/monarch.js
===================================================================
--- trunk/web/addons/job_monarch/js/monarch.js	(revision 641)
+++ trunk/web/addons/job_monarch/js/monarch.js	(revision 642)
@@ -707,13 +707,15 @@
 				if( records.length == 1 ) // TODO: if job state is running
 				{
-					jobid		= records[0].get('jid');
-
-					myPanel		= createGraphPanel();
-					nodeDatastore	= createNodesDataStore( myparams.c, jobid );
-					graphView	= createGraphView( nodeDatastore, jobid );
+					jobid			= records[0].get('jid');
+
+					var myPanel		= createGraphPanel();
+					var nodeDatastore	= createNodesDataStore( myparams.c, jobid );
+					var graphView		= createGraphView( nodeDatastore, jobid );
+					var graphTab		= createGraphTab( graphView, jobid );
 
 					//graphView.autoShow = true;
 
-					newtab = myPanel.add( graphView );
+					//newtab = myPanel.add( graphView );
+					var newtab = myPanel.add( graphTab );
 					myPanel.setActiveTab( newtab );
 					myPanel.doLayout();
@@ -928,5 +930,6 @@
 				'task':			"GETNODES",
 				'c':			cluster,
-				'jid':			jid
+				'jid':			jid,
+				'metricname':		'load_one'
 			},
 			reader: new Ext.data.JsonReader(
@@ -969,4 +972,5 @@
 			//id:		'jobPanel',
 			itemSelector:	'thumb',
+			region:		'center',
 			title:		jid,
 			style:		'overflow:auto, heigth: auto',
@@ -990,4 +994,33 @@
 }
 
+function createGraphTab( view, jobid )
+{
+	var graphTab =
+
+		new Ext.Panel(
+		{
+			title:	jobid,
+			layout:	'border',
+
+			items:
+			[
+				view,
+				{
+					region: 	'west',
+					split:		true,
+					title:		'Job info',
+					width:		200,
+					layout:		'fit',
+					//id:		'jobinfo-pane',
+					collapsible:	true,
+					border:		true
+				}
+			]
+		});
+
+	return graphTab;
+}
+
+
 function createGraphPanel( view )
 {
@@ -1005,4 +1038,5 @@
 			//id:		'tabPanel',
 			xtype:		'tabpanel',
+			//layout:		'border',
 			//region:		'center',
 			//bodyStyle:	'background: transparent',
@@ -1012,5 +1046,5 @@
 			enableTabScroll:true,
 			resizeTabs:	true,
-			border:		false,
+			//border:		false,
 			bodyStyle:	'overflow:auto; background: transparent; heigth: auto',
 			minTabWidth:	60,
@@ -1039,20 +1073,35 @@
 					listeners:
 					{
-						select: 
+					//	select: 
 								
-						function(combo, record, index)
-						{
-							var metric	= record.data.name;
-
-							var parentPanel	= this.findParentByType( 'tabpanel' );
+					//	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();
-
-							my_dataview.getStore().baseParams.metricname	= metric;
-							my_dataview.getStore().reload();
-						}
+					//		var my_dataview	= parentPanel.getActiveTab().findByType(Ext.DataView);
+
+					//		my_dataview.getStore().baseParams.metricname	= metric;
+					//		my_dataview.getStore().reload();
+					//	}
 					}
 				})
 			]
+
+			//listeners:
+			//{
+			//	tabchange:
+				
+			//	function( panel, tab )
+			//	{
+			//		if( panel.rendered )
+			//		{
+			//			combobox	= tab.findParentByType( 'tabpanel' );
+			//			alert( combobox.xtype );
+			//			combobox.value	= tab.getStore().baseParams.metricname;
+			//		}
+			//	}
+			//}
 		});
 
@@ -1076,7 +1125,7 @@
 			//autoScroll:	true,
 			//defaults:	{autoScroll:true},
-			title:		'Node graph details',
+			title:		'Jobs',
 			//tbar:		panel,
-			items:		panel,
+			items:		[ panel ]
 		
 			//listeners:
@@ -1106,4 +1155,5 @@
 	var nodeDatastore;
 	var graphView;
+	var graphTab;
 	var myWindow;
 	var myPanel;
@@ -1155,8 +1205,9 @@
 			nodeDatastore	= createNodesDataStore( myparams.c, graphJids[w][t] );
 			graphView	= createGraphView( nodeDatastore, graphJids[w][t] );
+			graphTab	= createGraphTab( graphView, graphJids[w][t] );
 
 			nodeDatastore.removeAll();
 
-			lastView	= myPanel.add( graphView );
+			lastView	= myPanel.add( graphTab );
 
 			myPanel.doLayout();
