Changeset 3578 for trunk/sources/HeuristicLab.Hive.Server.Console/3.2
- Timestamp:
- 05/01/10 13:58:24 (14 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/HiveServerManagementConsole.Designer.cs
r3022 r3578 55 55 this.chContent = new System.Windows.Forms.ColumnHeader(); 56 56 this.chDetails = new System.Windows.Forms.ColumnHeader(); 57 this.lvSnapshots = new System.Windows.Forms.ListView();58 this.chClientCalculated = new System.Windows.Forms.ColumnHeader();59 this.chProgress = new System.Windows.Forms.ColumnHeader();60 this.chSnapshotTime = new System.Windows.Forms.ColumnHeader();61 57 this.lblProgress = new System.Windows.Forms.Label(); 62 58 this.lblStatus = new System.Windows.Forms.Label(); … … 85 81 this.menuItemAddGroup = new System.Windows.Forms.ToolStripMenuItem(); 86 82 this.menuItemDeleteGroup = new System.Windows.Forms.ToolStripMenuItem(); 83 this.menuItemOpenCalendar = new System.Windows.Forms.ToolStripMenuItem(); 87 84 this.lvClientControl = new System.Windows.Forms.ListView(); 88 85 this.tcManagementConsole = new System.Windows.Forms.TabControl(); 89 86 this.checkBox1 = new System.Windows.Forms.CheckBox(); 90 this.menuItemOpenCalendar = new System.Windows.Forms.ToolStripMenuItem();91 87 this.menuStrip1.SuspendLayout(); 92 88 this.plClientDetails.SuspendLayout(); … … 350 346 this.plJobDetails.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; 351 347 this.plJobDetails.Controls.Add(this.lvJobDetails); 352 this.plJobDetails.Controls.Add(this.lvSnapshots);353 348 this.plJobDetails.Controls.Add(this.lblProgress); 354 349 this.plJobDetails.Controls.Add(this.lblStatus); … … 372 367 this.lvJobDetails.Location = new System.Drawing.Point(17, 124); 373 368 this.lvJobDetails.Name = "lvJobDetails"; 374 this.lvJobDetails.Size = new System.Drawing.Size(382, 175);369 this.lvJobDetails.Size = new System.Drawing.Size(382, 243); 375 370 this.lvJobDetails.TabIndex = 17; 376 371 this.lvJobDetails.UseCompatibleStateImageBehavior = false; … … 386 381 this.chDetails.Text = "Details"; 387 382 this.chDetails.Width = 255; 388 //389 // lvSnapshots390 //391 this.lvSnapshots.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {392 this.chClientCalculated,393 this.chProgress,394 this.chSnapshotTime});395 this.lvSnapshots.Enabled = false;396 this.lvSnapshots.FullRowSelect = true;397 this.lvSnapshots.GridLines = true;398 this.lvSnapshots.Location = new System.Drawing.Point(17, 310);399 this.lvSnapshots.Name = "lvSnapshots";400 this.lvSnapshots.Size = new System.Drawing.Size(382, 69);401 this.lvSnapshots.TabIndex = 16;402 this.lvSnapshots.UseCompatibleStateImageBehavior = false;403 this.lvSnapshots.View = System.Windows.Forms.View.Details;404 //405 // chClientCalculated406 //407 this.chClientCalculated.Text = "Client Calculated";408 this.chClientCalculated.Width = 112;409 //410 // chProgress411 //412 this.chProgress.Text = "Progress";413 this.chProgress.Width = 100;414 //415 // chSnapshotTime416 //417 this.chSnapshotTime.Text = "Snapshot request";418 this.chSnapshotTime.Width = 166;419 383 // 420 384 // lblProgress … … 657 621 this.menuItemOpenCalendar}); 658 622 this.contextMenuGroup.Name = "contextMenuJob"; 659 this.contextMenuGroup.Size = new System.Drawing.Size(154, 92);623 this.contextMenuGroup.Size = new System.Drawing.Size(154, 70); 660 624 // 661 625 // menuItemAddGroup … … 670 634 this.menuItemDeleteGroup.Size = new System.Drawing.Size(153, 22); 671 635 this.menuItemDeleteGroup.Text = "Delete Group"; 636 // 637 // menuItemOpenCalendar 638 // 639 this.menuItemOpenCalendar.Name = "menuItemOpenCalendar"; 640 this.menuItemOpenCalendar.Size = new System.Drawing.Size(153, 22); 641 this.menuItemOpenCalendar.Text = "Open Calendar"; 672 642 // 673 643 // lvClientControl … … 705 675 this.checkBox1.Text = "checkBox1"; 706 676 this.checkBox1.UseVisualStyleBackColor = true; 707 //708 // menuItemOpenCalendar709 //710 this.menuItemOpenCalendar.Name = "menuItemOpenCalendar";711 this.menuItemOpenCalendar.Size = new System.Drawing.Size(153, 22);712 this.menuItemOpenCalendar.Text = "Open Calendar";713 677 // 714 678 // HiveServerManagementConsole … … 782 746 private System.Windows.Forms.Label lblStatus; 783 747 private System.Windows.Forms.Label lblProgress; 784 private System.Windows.Forms.ListView lvSnapshots;785 private System.Windows.Forms.ColumnHeader chClientCalculated;786 private System.Windows.Forms.ColumnHeader chProgress;787 748 private System.Windows.Forms.Label lblStateClient; 788 749 private System.Windows.Forms.Label lblState; … … 796 757 private System.Windows.Forms.ListView lvJobControl; 797 758 private System.Windows.Forms.CheckBox checkBox1; 798 private System.Windows.Forms.ColumnHeader chSnapshotTime;799 759 private System.Windows.Forms.ContextMenuStrip contextMenuJob; 800 760 private System.Windows.Forms.ToolStripMenuItem menuItemAbortJob; -
trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.cs
r3220 r3578 242 242 CloneList(jobsOld, out jobsOldHelp); 243 243 244 GetDelta(jobsOld.List, jobsOldHelp); 244 if(jobsOld != null && jobsOld.List != null && jobsOldHelp != null) 245 GetDelta(jobsOld.List, jobsOldHelp); 245 246 246 247 } … … 419 420 lvJobDetails.Items.Clear(); 420 421 421 lvSnapshots.Enabled = true; 422 423 if (currentJob.State == State.offline) { 422 ResponseObject<JobDto> response = ServiceLocator.GetJobManager().GetJobByIdWithDetails(currentJob.Id); 423 424 if(response.Success == false || response.Obj == null) 425 return; 426 427 JobDto job = response.Obj; 428 429 //lvSnapshots.Enabled = true; 430 431 if (job.State == State.offline) { 424 432 pbJobControl.Image = ilLargeImgJob.Images[2]; 425 } else if ( currentJob.State == State.calculating) {433 } else if (job.State == State.calculating) { 426 434 pbJobControl.Image = ilLargeImgJob.Images[1]; 427 } else if ( currentJob.State == State.finished) {435 } else if (job.State == State.finished) { 428 436 pbJobControl.Image = ilLargeImgJob.Images[0]; 429 437 } 430 438 431 lblJobName.Text = currentJob.Id.ToString();432 if ( currentJob.Percentage != null) {439 lblJobName.Text = job.Id.ToString(); 440 if (job.Percentage != null) { 433 441 progressJob.Value = (int) (currentJob.Percentage*100); 434 442 lblProgress.Text = (int) (currentJob.Percentage*100) + "% calculated"; … … 437 445 ListViewItem lvi = new ListViewItem(); 438 446 lvi.Text = "User:"; 439 lvi.SubItems.Add( currentJob.UserId.ToString());447 lvi.SubItems.Add(job.UserId.ToString()); 440 448 lvJobDetails.Items.Add(lvi); 441 449 … … 443 451 lvi = new ListViewItem(); 444 452 lvi.Text = "created at:"; 445 lvi.SubItems.Add( currentJob.DateCreated.ToString());453 lvi.SubItems.Add(job.DateCreated.ToString()); 446 454 lvJobDetails.Items.Add(lvi); 447 455 448 if ( currentJob.ParentJob != null) {456 if (job.ParentJob != null) { 449 457 lvi = null; 450 458 lvi = new ListViewItem(); 451 459 lvi.Text = "Parent job:"; 452 lvi.SubItems.Add( currentJob.ParentJob.ToString());460 lvi.SubItems.Add(job.ParentJob.ToString()); 453 461 lvJobDetails.Items.Add(lvi); 454 462 } … … 457 465 lvi = new ListViewItem(); 458 466 lvi.Text = "Priority:"; 459 lvi.SubItems.Add( currentJob.Priority.ToString());467 lvi.SubItems.Add(job.Priority.ToString()); 460 468 lvJobDetails.Items.Add(lvi); 461 469 462 if ( currentJob.Project != null) {470 if (job.Project != null) { 463 471 lvi = null; 464 472 lvi = new ListViewItem(); 465 473 lvi.Text = "Project:"; 466 lvi.SubItems.Add( currentJob.Project.Name.ToString());474 lvi.SubItems.Add(job.Project.Name.ToString()); 467 475 lvJobDetails.Items.Add(lvi); 468 476 } 469 477 470 if ( currentJob.Client != null) {478 if (job.Client != null) { 471 479 lvi = null; 472 480 lvi = new ListViewItem(); 473 481 lvi.Text = "Calculation begin:"; 474 lvi.SubItems.Add( currentJob.DateCalculated.ToString());482 lvi.SubItems.Add(job.DateCalculated.ToString()); 475 483 lvJobDetails.Items.Add(lvi); 476 484 … … 479 487 lvi = new ListViewItem(); 480 488 lvi.Text = "Client calculated:"; 481 lvi.SubItems.Add( currentJob.Client.Name.ToString());489 lvi.SubItems.Add(job.Client.Name.ToString()); 482 490 lvJobDetails.Items.Add(lvi); 483 491 484 if (currentJob.State == State.finished) { 485 IJobManager jobManager = 486 ServiceLocator.GetJobManager(); 487 ResponseObject<JobResult> jobRes = null; 488 //Todo: jobManager.GetLastJobResultOf(currentJob.Id); 489 490 if (jobRes != null && jobRes.Obj != null) { 491 lvi = null; 492 if (job.State == State.finished) { 493 lvi = null; 492 494 lvi = new ListViewItem(); 493 495 lvi.Text = "Calculation ended:"; 494 lvi.SubItems.Add(job Res.Obj.DateFinished.ToString());496 lvi.SubItems.Add(job.DateFinished.ToString()); 495 497 lvJobDetails.Items.Add(lvi); 496 498 } 497 499 } 498 } 499 if (currentJob.State != State.offline) { 500 lvSnapshots.Items.Clear(); 501 GetSnapshotList(); 502 } else { 503 lvSnapshots.Visible = false; 504 } 505 } 500 } 506 501 507 502 /// <summary> … … 776 771 private void CloneList(ResponseList<JobDto> oldList, out IDictionary<int, JobDto> newList) { 777 772 newList = new Dictionary<int, JobDto>(); 778 for (int i = 0; i < oldList.List.Count; i++) { 779 newList.Add(i, oldList.List[i]); 773 if (oldList != null && oldList.List != null) { 774 for (int i = 0; i < oldList.List.Count; i++) { 775 newList.Add(i, oldList.List[i]); 776 } 780 777 } 781 778 } 782 779 783 780 private bool IsEqual(ClientDto ci1, ClientDto ci2) { 781 if (ci1 == null && ci2 == null) { 782 return true; 783 } 784 784 if (ci2 == null) { 785 785 return false; … … 849 849 } 850 850 851 private void GetSnapshotList() {852 853 lvSnapshots.Items.Clear();854 IJobManager jobManager = ServiceLocator.GetJobManager();855 856 ResponseList<JobResult> jobRes = jobManager.GetAllJobResults(currentJob.Id);857 858 if (jobRes != null && jobRes.List != null) {859 foreach (JobResult jobresult in jobRes.List) {860 ListViewItem curSnapshot = new ListViewItem(jobresult.ClientId.ToString());861 double percentage = jobresult.Percentage * 100;862 curSnapshot.SubItems.Add(percentage.ToString() + " %");863 curSnapshot.SubItems.Add(jobresult.Timestamp.ToString());864 lvSnapshots.Items.Add(curSnapshot);865 }866 }867 868 if ((jobRes.List == null) || (jobRes.List.Count == 0)) {869 lvSnapshots.Visible = false;870 } else {871 lvSnapshots.Visible = true;872 }873 874 }875 876 851 #endregion 877 852 -
trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.resx
r3022 r3578 129 129 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 130 130 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABo 131 FwAAAk1TRnQBSQFMAgEBBAEAA QwBAAEMAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo131 FwAAAk1TRnQBSQFMAgEBBAEAARQBAAEUAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo 132 132 AwABgAMAAUADAAEBAQABCAYAASAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA 133 133 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 … … 239 239 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 240 240 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAO 241 DgAAAk1TRnQBSQFMAgEBAwEAA QwBAAEMAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo241 DgAAAk1TRnQBSQFMAgEBAwEAARQBAAEUAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo 242 242 AwABgAMAASADAAEBAQABCAYAARAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA 243 243 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 … … 312 312 <value> 313 313 iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 314 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAABcQ gAA315 XE IB62nEUwAAA3hJREFUSEu1ls1PE2EQxj229ouPVNErgZOJicZDjR68mHg1JgYvxov/gIlHxARBoxGU314 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAABcQQAA 315 XEEBRtDlPgAAA3hJREFUSEu1ls1PE2EQxj229ouPVNErgZOJicZDjR68mHg1JgYvxov/gIlHxARBoxGU 316 316 KlJUVJDypVIQKkXBpIootoC0tLS0pZEIiILfikAfZ5Zuu9sWaDQ2edLt7vvOrzPzzsxuALBBquIeRR7p 317 317 CKmQVJSmeC3vyUu0FzNOD3NIFhJYpU8VuGBXpiVeK+6L2sgRQQKAbm4hTZ/pVcA8ooN9Ug/H7GY4Z3PS … … 342 342 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 343 343 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABy 344 DAAAAk1TRnQBSQFMAgEBBAEAA QwBAAEMAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo344 DAAAAk1TRnQBSQFMAgEBBAEAARQBAAEUAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo 345 345 AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA 346 346 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 … … 409 409 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 410 410 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABq 411 CQAAAk1TRnQBSQFMAgEBAwEAA QwBAAEMAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo411 CQAAAk1TRnQBSQFMAgEBAwEAARQBAAEUAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo 412 412 AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA 413 413 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
Note: See TracChangeset
for help on using the changeset viewer.