mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 19:32:31 +00:00 
			
		
		
		
	load data at first click
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8763 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -142,7 +142,6 @@ function loadGroups(data) { | ||||
| 			 | ||||
| 			// Create loader | ||||
| 			var loader = $('<center></center>').append(createLoader()); | ||||
| 			var loader2 = $('<center></center>').append(createLoader()); | ||||
| 			 | ||||
| 			// Create a tab for this group | ||||
| 			var tab = new Tab('nodesPageTabs'); | ||||
| @@ -150,7 +149,7 @@ function loadGroups(data) { | ||||
| 			tab.init(); | ||||
| 			$('#nodes').append(tab.object()); | ||||
| 			tab.add('nodesTab', 'Nodes', loader, false); | ||||
| 			tab.add('graphTab', 'Graphical', loader2, false); | ||||
| 			tab.add('graphTab', 'Graphical', '', false); | ||||
| 			 | ||||
| 			$('#nodesPageTabs').bind('tabsselect', function(event, ui){ | ||||
| 				//for the graphical tab, we should check the graphical data first | ||||
|   | ||||
| @@ -4,8 +4,10 @@ var lparList; | ||||
| var graphicalNodeList; | ||||
| var selectNode; | ||||
| var graphicalDataType = ['nodetype.nodetype', 'ppc.parent', 'nodelist.status', 'vpd.mtm']; | ||||
| var gettingDataFlag = false; | ||||
|  | ||||
| function initGraphicalData(dataTypeIndex){ | ||||
| 	gettingDataFlag = true; | ||||
| 	if (undefined == dataTypeIndex){ | ||||
| 		dataTypeIndex = 0; | ||||
| 	} | ||||
| @@ -34,6 +36,7 @@ function initGraphicalData(dataTypeIndex){ | ||||
| 				initGraphicalData(tempIndex); | ||||
| 			} | ||||
| 			else{ | ||||
| 				gettingDataFlag = false; | ||||
| 				$('#graphTab').empty(); | ||||
| 				for (var temp in nodesList){ | ||||
| 					var nodeName = nodesList[temp]; | ||||
| @@ -100,6 +103,16 @@ function createPhysicalLayout(nodeList){ | ||||
| 		return; | ||||
| 	} | ||||
| 	 | ||||
| 	//it is getting data,so we had to wait now. | ||||
| 	if(gettingDataFlag){ | ||||
| 		return; | ||||
| 	} | ||||
| 	 | ||||
| 	//when the graphical layout is shown, do not need to redraw | ||||
| 	if (1 < $('#graphTab').children().length){ | ||||
| 		return; | ||||
| 	} | ||||
| 	 | ||||
| 	//save the new selected nodes. | ||||
| 	if(graphicalNodeList){ | ||||
| 		for(var i in graphicalNodeList){ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user