Changeset 1590
- Timestamp:
- 04/17/09 12:43:37 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.cs
r1581 r1590 68 68 } 69 69 70 71 #region Backgroundworker 70 72 /// <summary> 71 73 /// event on Ticker … … 83 85 } 84 86 85 private int CapacityRam(int noCores, int freeCores) { 86 return (((noCores - freeCores) / noCores) * 100); 87 } 87 #endregion 88 88 89 89 /// <summary> … … 107 107 item = new ListViewItem(ci.Name, 3, lvg); 108 108 } else { 109 109 int percentageUsage = CapacityRam(ci.NrOfCores, ci.NrOfFreeCores); 110 110 int usage = 0; 111 111 if ((percentageUsage >= 0) && (percentageUsage <= 25)) { … … 301 301 } 302 302 if (currentJob.State != State.offline) { 303 GetSnapshotList(); 303 lvSnapshots.Items.Clear(); 304 if (currentJob.State == State.finished) 305 GetSnapshotList(); 304 306 lvSnapshots.Visible = true; 305 307 } else { … … 313 315 RefreshJob(change); 314 316 } else if (change.Types == Type.Client) { 315 RefreshClient(change);317 RefreshClient(change); 316 318 } else if (change.Types == Type.ClientGroup) { 317 319 RefreshClientGroup(change); … … 534 536 return true; 535 537 } else return false; 538 } 539 540 private int CapacityRam(int noCores, int freeCores) { 541 int capacity = ((noCores - freeCores) / noCores) * 100; 542 System.Diagnostics.Debug.WriteLine(capacity); 543 return capacity; 536 544 } 537 545 … … 621 629 found = true; 622 630 if (job.State != State.offline) { 623 if ((!IsEqual(job.Client, jobold.Client)) || (job.State != jobold.State) 631 if ((!IsEqual(job.Client, jobold.Client)) || (job.State != jobold.State) 624 632 || (job.Percentage != jobold.Percentage)) { 625 633 changes.Add(new Changes { Types = Type.Job, ID = job.Id, ChangeType = Change.Update, Position = i }); … … 658 666 659 667 lvSnapshots.Items.Clear(); 660 IJobManager jobManager = 661 ServiceLocator.GetJobManager(); 668 IJobManager jobManager = ServiceLocator.GetJobManager(); 669 662 670 ResponseObject<JobResult> jobRes = jobManager.GetLastJobResultOf(currentJob.Id, false); 671 672 // iterate threw all snapshots if method is implemented 673 663 674 ListViewItem curSnapshot = new ListViewItem(jobRes.Obj.Client.Name); 664 675 double percentage = jobRes.Obj.Percentage * 100; … … 666 677 curSnapshot.SubItems.Add(jobRes.Obj.timestamp.ToString()); 667 678 lvSnapshots.Items.Add(curSnapshot); 668 669 670 679 } 671 680 672 681 #endregion 673 674 675 682 676 683 }
Note: See TracChangeset
for help on using the changeset viewer.