Changeset 1723
- Timestamp:
- 04/30/09 14:44:00 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Hive.Server.Console/3.2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerConsole.cs
r1657 r1723 117 117 if (cf) { 118 118 this.Visible = true; 119 ServiceLocator.ShutDownFacade(); 119 120 if (error == true) { 120 121 lblError.Text = "Something went wrong with the server"; -
trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.cs
r1717 r1723 57 57 private Job currentJob = null; 58 58 private ClientInfo currentClient = null; 59 TreeNode currentNode = null; 59 60 60 61 //TODO delete … … 62 63 private string nameCurrentClient = ""; 63 64 private bool flagJob = false; 64 private bool flagClient = false;65 65 66 66 private List<Changes> changes = new List<Changes>(); … … 248 248 } 249 249 250 if (currentNode != null) { 251 lvClientControl.Items.Clear(); 252 lvClientControl.Groups.Clear(); 253 AddGroupsToListView(currentNode); 254 } 250 255 tvClientControl.ExpandAll(); 251 256 } … … 263 268 foreach (Resource resource in clientGroup.Resources) { 264 269 if (resource is ClientInfo) { 265 ListViewItem lvi = new ListViewItem(resource.Name, 0, lvg); 270 int percentageUsage = CapacityRam(((ClientInfo)resource).NrOfCores, ((ClientInfo)resource).NrOfFreeCores); 271 int usage = 3; 272 if ((((ClientInfo)resource).State != State.offline) && 273 (((ClientInfo)resource).State != State.nullState)) { 274 if ((percentageUsage >= 0) && (percentageUsage <= 25)) { 275 usage = 0; 276 } else if ((percentageUsage > 25) && (percentageUsage <= 75)) { 277 usage = 1; 278 } else if ((percentageUsage > 75) && (percentageUsage <= 100)) { 279 usage = 2; 280 } 281 } 282 ListViewItem lvi = new ListViewItem(resource.Name, usage, lvg); 266 283 lvi.Tag = resource as ClientInfo; 267 284 clientGroupList.Add(lvi); … … 457 474 JobClicked(); 458 475 } 476 foreach (Job job in jobs.List) { 477 if (job.Id == change.ID) { 478 lvJobControl.Items[i].Tag = job; 479 break; 480 } 481 } 459 482 State state = jobs.List[change.Position].State; 460 483 System.Diagnostics.Debug.WriteLine(lvJobControl.Items[i].Text.ToString()); … … 579 602 private void OnLVClientClicked(object sender, EventArgs e) { 580 603 nameCurrentClient = lvClientControl.SelectedItems[0].Tag.ToString(); 581 flagClient = true;582 604 ClientClicked(); 583 605 } … … 864 886 lvClientControl.Items.Clear(); 865 887 lvClientControl.Groups.Clear(); 888 currentNode = e.Node; 866 889 AddGroupsToListView(e.Node); 867 890 } -
trunk/sources/HeuristicLab.Hive.Server.Console/3.2/ServiceLocator.cs
r1579 r1723 40 40 return serverConsoleFacade; 41 41 } 42 43 internal static void ShutDownFacade() { 44 serverConsoleFacade = null; 45 } 42 46 } 43 47 }
Note: See TracChangeset
for help on using the changeset viewer.