Changeset 4042 for branches/3.2/sources
- Timestamp:
- 07/18/10 22:16:04 (14 years ago)
- Location:
- branches/3.2/sources
- Files:
-
- 8 added
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/sources/HeuristicLab.Hive.Client.Core/3.2/Core.cs
r3931 r4042 334 334 if (e.Result.StatusMessage != ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOBS_LEFT) { 335 335 Logger.Info("Received new job with id " + e.Result.Job.Id); 336 bool sandboxed = false; 337 List<byte[]> files = new List<byte[]>(); 336 bool sandboxed = false; 338 337 Logger.Debug("Fetching plugins for job " + e.Result.Job.Id); 339 foreach (CachedHivePluginInfoDto plugininfo in PluginCache.Instance.GetPlugins(e.Result.Job.PluginsNeeded)) 340 files.AddRange(plugininfo.PluginFiles); 338 339 PluginCache.Instance.PreparePlugins(e.Result.Job.PluginsNeeded); 340 341 // foreach (CachedHivePluginInfoDto plugininfo in PluginCache.Instance.GetPlugins(e.Result.Job.PluginsNeeded)) 342 // files.AddRange(plugininfo.PluginFiles); 341 343 Logger.Debug("Plugins fetched for job " + e.Result.Job.Id); 342 AppDomain appDomain = HeuristicLab.PluginInfrastructure.Sandboxing.SandboxManager.CreateAndInitSandbox(e.Result.Job.Id.ToString(), files); 343 appDomain.UnhandledException += new UnhandledExceptionEventHandler(appDomain_UnhandledException); 344 lock (engines) { 345 if (!jobs.ContainsKey(e.Result.Job.Id)) { 346 jobs.Add(e.Result.Job.Id, e.Result.Job); 347 appDomains.Add(e.Result.Job.Id, appDomain); 348 Logger.Debug("Creating AppDomain"); 349 Executor engine = (Executor)appDomain.CreateInstanceAndUnwrap(typeof(Executor).Assembly.GetName().Name, typeof(Executor).FullName); 350 Logger.Debug("Created AppDomain"); 351 engine.JobId = e.Result.Job.Id; 352 engine.Queue = MessageQueue.GetInstance(); 353 Logger.Debug("Starting Engine for job " + e.Result.Job.Id); 354 engine.Start(e.Data); 355 engines.Add(e.Result.Job.Id, engine); 356 357 ClientStatusInfo.JobsFetched++; 358 359 Logger.Info("Increment FetchedJobs to:" + ClientStatusInfo.JobsFetched); 344 try { 345 AppDomain appDomain = 346 HeuristicLab.PluginInfrastructure.Sandboxing.SandboxManager.CreateAndInitSandbox( 347 e.Result.Job.Id.ToString(), null); 348 appDomain.UnhandledException += new UnhandledExceptionEventHandler(appDomain_UnhandledException); 349 lock (engines) { 350 if (!jobs.ContainsKey(e.Result.Job.Id)) { 351 jobs.Add(e.Result.Job.Id, e.Result.Job); 352 appDomains.Add(e.Result.Job.Id, appDomain); 353 Logger.Debug("Creating AppDomain"); 354 Executor engine = 355 (Executor) 356 appDomain.CreateInstanceAndUnwrap(typeof (Executor).Assembly.GetName().Name, typeof (Executor).FullName); 357 Logger.Debug("Created AppDomain"); 358 engine.JobId = e.Result.Job.Id; 359 engine.Queue = MessageQueue.GetInstance(); 360 Logger.Debug("Starting Engine for job " + e.Result.Job.Id); 361 engine.Start(e.Data); 362 engines.Add(e.Result.Job.Id, engine); 363 364 ClientStatusInfo.JobsFetched++; 365 366 Logger.Info("Increment FetchedJobs to:" + ClientStatusInfo.JobsFetched); 367 } 360 368 } 369 } catch(Exception exception) { 370 Logger.Error("Creating the Appdomain and loading the job failed for job " + e.Result.Job.Id); 371 Logger.Error("Error thrown is: ", exception); 372 CurrentlyFetching = false; 373 KillAppDomain(e.Result.Job.Id); 361 374 } 362 375 } else … … 482 495 lock (engines) { 483 496 try { 484 engines[id].Dispose(); 485 appDomains[id].UnhandledException -= new UnhandledExceptionEventHandler(appDomain_UnhandledException); 486 AppDomain.Unload(appDomains[id]); 487 appDomains.Remove(id); 497 if(engines.ContainsKey(id)) 498 engines[id].Dispose(); 499 if (appDomains.ContainsKey(id)) { 500 appDomains[id].UnhandledException -= new UnhandledExceptionEventHandler(appDomain_UnhandledException); 501 AppDomain.Unload(appDomains[id]); 502 appDomains.Remove(id); 503 } 488 504 engines.Remove(id); 489 505 jobs.Remove(id); 506 GC.Collect(); 490 507 } 491 508 catch (Exception ex) { -
branches/3.2/sources/HeuristicLab.Hive.Client.Core/3.2/PluginCache.cs
r3578 r4042 8 8 using HeuristicLab.Hive.Contracts.BusinessObjects; 9 9 using HeuristicLab.Tracing; 10 using System.IO; 10 11 11 12 namespace HeuristicLab.Hive.Client.Core { … … 67 68 } 68 69 70 71 internal void PreparePlugins(List<HivePluginInfoDto> requiredPlugins) { 72 List<HivePluginInfoDto> missingPlugins = new List<HivePluginInfoDto>(); 73 foreach (HivePluginInfoDto requiredPlugin in requiredPlugins) { 74 if(ApplicationManager.Manager.Plugins.Count(ipd => ipd.Version.Major == requiredPlugin.Version.Major && ipd.Version.Minor >= requiredPlugin.Version.Minor) == 0) { 75 missingPlugins.Add(requiredPlugin); 76 } 77 } 78 79 Logger.Debug("Requesting missing plugins"); 80 List<CachedHivePluginInfoDto> receivedPlugins = WcfService.Instance.RequestPlugins(missingPlugins); 81 Logger.Debug("Requested missing plugins"); 82 83 foreach (CachedHivePluginInfoDto receivedPlugin in receivedPlugins) { 84 foreach (HivePluginFile hpf in receivedPlugin.PluginFiles) { 85 Logger.Info("writing file " + hpf.Name); 86 File.WriteAllBytes("C:\\temp\\" + hpf.Name.Split('\\').Last(), hpf.BinaryFile); 87 } 88 } 89 90 } 69 91 } 70 92 } -
branches/3.2/sources/HeuristicLab.Hive.Contracts/3.2/BusinessObjects/CachedHivePluginInfoDto.cs
r3011 r4042 25 25 using HeuristicLab.Hive.Contracts.BusinessObjects; 26 26 using System.Runtime.Serialization; 27 using HeuristicLab.PluginInfrastructure.Manager; 27 28 28 29 namespace HeuristicLab.PluginInfrastructure { … … 30 31 [Serializable] 31 32 public class CachedHivePluginInfoDto : HivePluginInfoDto { 32 33 private List<byte[]> pluginFiles = new List<byte[]>(); 33 34 34 /// <summary> 35 35 /// stores the plugin files in a list of byte arrays 36 36 /// </summary> 37 37 [DataMember] 38 public List<byte[]> PluginFiles { 39 get { return pluginFiles; } 40 set { pluginFiles = value; } 38 public List<HivePluginFile> PluginFiles { get; set; } 39 40 public CachedHivePluginInfoDto() { 41 PluginFiles = new List<HivePluginFile>(); 41 42 } 42 43 } -
branches/3.2/sources/HeuristicLab.Hive.Contracts/3.2/BusinessObjects/HivePluginInfoDto.cs
r3011 r4042 37 37 38 38 [DataMember] 39 public StringVersion { get; set; }39 public Version Version { get; set; } 40 40 41 41 [DataMember] -
branches/3.2/sources/HeuristicLab.Hive.Contracts/3.2/HeuristicLab.Hive.Contracts-3.2.csproj
r3578 r4042 91 91 <Compile Include="BusinessObjects\CachedHivePluginInfoDto.cs" /> 92 92 <Compile Include="BusinessObjects\ClientGroupDto.cs" /> 93 <Compile Include="BusinessObjects\HivePluginFile.cs" /> 93 94 <Compile Include="BusinessObjects\ResourceDto.cs" /> 94 95 <Compile Include="BusinessObjects\SerializedJob.cs" /> … … 139 140 <Name>HeuristicLab.PluginInfrastructure</Name> 140 141 </ProjectReference> 142 <ProjectReference Include="..\..\HeuristicLab.Tracing\3.2\HeuristicLab.Tracing-3.2.csproj"> 143 <Project>{EE2034D9-6E27-48A1-B855-42D45F69A4FC}</Project> 144 <Name>HeuristicLab.Tracing-3.2</Name> 145 </ProjectReference> 141 146 </ItemGroup> 142 147 <ItemGroup> -
branches/3.2/sources/HeuristicLab.Hive.Contracts/3.2/Interfaces/IExecutionEngineFacade.cs
r3220 r4042 37 37 Response RequestSnapshot(Guid jobId); 38 38 [OperationContract] 39 ResponseObject<SerializedJob> GetLastSerializedResult(Guid jobId, bool requested );39 ResponseObject<SerializedJob> GetLastSerializedResult(Guid jobId, bool requested, bool snapshot); 40 40 [OperationContract] 41 41 Response AbortJob(Guid jobId); -
branches/3.2/sources/HeuristicLab.Hive.Contracts/3.2/Interfaces/IJobManager.cs
r3578 r4042 48 48 ResponseObject<JobDto> GetLastJobResultOf(Guid jobId); 49 49 [OperationContract] 50 ResponseObject<SerializedJob> GetLastSerializedJobResultOf(Guid jobId, bool requested );50 ResponseObject<SerializedJob> GetLastSerializedJobResultOf(Guid jobId, bool requested, bool snapshot); 51 51 [OperationContract] 52 52 ResponseList<JobResult> GetAllJobResults(Guid jobId); -
branches/3.2/sources/HeuristicLab.Hive.Contracts/3.2/MultiStream.cs
r2117 r4042 6 6 using System.IO; 7 7 using System.Collections; 8 using HeuristicLab.Tracing; 8 9 9 10 namespace HeuristicLab.Hive.Contracts { … … 102 103 103 104 protected override void Dispose(bool disposing) { 104 if (!disposing) {105 //if (!disposing) { 105 106 foreach (Stream s in this.streamList) { 107 Console.WriteLine("DISPOSING STREAM"); 106 108 s.Dispose(); 107 109 } 108 }110 //} 109 111 110 112 base.Dispose(disposing); -
branches/3.2/sources/HeuristicLab.Hive.Engine/3.2/HiveEngine.cs
r3578 r4042 136 136 lock (locker) { 137 137 Logger.Debug("HiveEngine: Results-polling - GetLastResult"); 138 response = executionEngineFacade.GetLastSerializedResult(jobId, false );138 response = executionEngineFacade.GetLastSerializedResult(jobId, false, false); 139 139 Logger.Debug("HiveEngine: Results-polling - Server: " + response.StatusMessage + " success: " + response.Success); 140 140 // loop while … … 144 144 // 4. the result that we get from the server is a snapshot and not the final result 145 145 if (abortRequested) return; 146 if (response.Success && response.Obj != null) {146 if (response.Success && response.Obj != null && response.StatusMessage != ApplicationConstants.RESPONSE_JOB_RESULT_NOT_YET_HERE) { 147 147 Logger.Debug("HiveEngine: Results-polling - Got result!"); 148 148 restoredJob = (Job)PersistenceManager.RestoreFromGZip(response.Obj.SerializedJobData); … … 171 171 // job is finished already 172 172 Logger.Debug("HiveEngine: Abort - GetLastResult(false)"); 173 response = executionEngineFacade.GetLastSerializedResult(jobId, false );173 response = executionEngineFacade.GetLastSerializedResult(jobId, false, false); 174 174 Logger.Debug("HiveEngine: Abort - Server: " + response.StatusMessage + " success: " + response.Success); 175 175 } else { … … 179 179 Thread.Sleep(SNAPSHOT_POLLING_INTERVAL_MS); 180 180 Logger.Debug("HiveEngine: Abort - GetLastResult(true)"); 181 response = executionEngineFacade.GetLastSerializedResult(jobId, true);181 response = executionEngineFacade.GetLastSerializedResult(jobId, false, true); 182 182 Logger.Debug("HiveEngine: Abort - Server: " + response.StatusMessage + " success: " + response.Success); 183 183 retryCount++; … … 264 264 new HivePluginInfoDto(); 265 265 pluginInfo.Name = uniquePlugin.Name; 266 pluginInfo.Version = uniquePlugin.Version .ToString();266 pluginInfo.Version = uniquePlugin.Version; 267 267 pluginInfo.BuildDate = uniquePlugin.BuildDate; 268 268 pluginsNeeded.Add(pluginInfo); -
branches/3.2/sources/HeuristicLab.Hive.Server.ADODataAccess/3.2/JobAdapter.cs
r3011 r4042 369 369 //first check if pluginInfo already exists in the db 370 370 HivePluginInfoDto found = PluginInfoAdapter.GetByNameVersionBuilddate( 371 pluginInfo.Name, pluginInfo.Version , pluginInfo.BuildDate);371 pluginInfo.Name, pluginInfo.Version.ToString(), pluginInfo.BuildDate); 372 372 if (found != null) { 373 373 pluginInfo.Id = found.Id; -
branches/3.2/sources/HeuristicLab.Hive.Server.ADODataAccess/3.2/PluginInfoAdapter.cs
r3011 r4042 27 27 row.PluginId = pluginInfo.Id; 28 28 row.Name = pluginInfo.Name; 29 row.Version = pluginInfo.Version ;29 row.Version = pluginInfo.Version.ToString(); 30 30 row.BuildDate = pluginInfo.BuildDate; 31 31 … … 48 48 49 49 if (!row.IsVersionNull()) { 50 pluginInfo.Version = row.Version;50 pluginInfo.Version = new Version(row.Version); 51 51 } else { 52 52 pluginInfo.Version = null; -
branches/3.2/sources/HeuristicLab.Hive.Server.Console/3.2/HeuristicLab.Hive.Server.Console-3.2.csproj
r3931 r4042 132 132 </Compile> 133 133 <Compile Include="HiveServerConsolePlugin.cs" /> 134 <Compile Include="JobDataFetcher.cs" /> 135 <Compile Include="JobListView.cs"> 136 <SubType>Component</SubType> 137 </Compile> 138 <Compile Include="JobListViewControl.cs"> 139 <SubType>UserControl</SubType> 140 </Compile> 141 <Compile Include="JobListViewControl.Designer.cs"> 142 <DependentUpon>JobListViewControl.cs</DependentUpon> 143 </Compile> 134 144 <Compile Include="LogonDlg.cs"> 135 145 <SubType>Form</SubType> … … 159 169 <DependentUpon>HiveServerManagementConsole.cs</DependentUpon> 160 170 <SubType>Designer</SubType> 171 </EmbeddedResource> 172 <EmbeddedResource Include="JobListView.resx"> 173 <DependentUpon>JobListView.cs</DependentUpon> 174 </EmbeddedResource> 175 <EmbeddedResource Include="JobListViewControl.resx"> 176 <DependentUpon>JobListViewControl.cs</DependentUpon> 161 177 </EmbeddedResource> 162 178 <EmbeddedResource Include="LogonDlg.resx"> -
branches/3.2/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.Designer.cs
r3578 r4042 67 67 this.tpJobControl = new System.Windows.Forms.TabPage(); 68 68 this.scJobControl = new System.Windows.Forms.SplitContainer(); 69 this.lvJobControl = new System.Windows.Forms.ListView(); 69 this.calculatingJobTabControl = new System.Windows.Forms.TabControl(); 70 this.calculatingJobTabPage = new System.Windows.Forms.TabPage(); 71 this.splitContainer5 = new System.Windows.Forms.SplitContainer(); 72 this.cmb_calculatingJob_count = new System.Windows.Forms.ComboBox(); 73 this.btn_calculatingJobs_next = new System.Windows.Forms.Button(); 74 this.btn_calculatingJobs_prev = new System.Windows.Forms.Button(); 75 this.lv_calculatingJobs = new System.Windows.Forms.ListView(); 70 76 this.contextMenuJob = new System.Windows.Forms.ContextMenuStrip(this.components); 71 this. menuItemAbortJob = new System.Windows.Forms.ToolStripMenuItem();77 this.offlineItemAbortJob = new System.Windows.Forms.ToolStripMenuItem(); 72 78 this.menuItemGetSnapshot = new System.Windows.Forms.ToolStripMenuItem(); 73 79 this.ilSmallImgJob = new System.Windows.Forms.ImageList(this.components); 80 this.finishedJobsTabPage = new System.Windows.Forms.TabPage(); 81 this.splitContainer2 = new System.Windows.Forms.SplitContainer(); 82 this.cmb_finishedJob_count = new System.Windows.Forms.ComboBox(); 83 this.btn_finishedJob_next = new System.Windows.Forms.Button(); 84 this.btn_finishedJob_prev = new System.Windows.Forms.Button(); 85 this.lv_finishedJobs = new System.Windows.Forms.ListView(); 86 this.offlineJobsTabPage = new System.Windows.Forms.TabPage(); 87 this.splitContainer4 = new System.Windows.Forms.SplitContainer(); 88 this.cmb_offlineJob_count = new System.Windows.Forms.ComboBox(); 89 this.btn_offlineJob_next = new System.Windows.Forms.Button(); 90 this.btn_offlinejob_prev = new System.Windows.Forms.Button(); 91 this.lv_offlineJobs = new System.Windows.Forms.ListView(); 92 this.AbortContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); 74 93 this.ilSmallImgClient = new System.Windows.Forms.ImageList(this.components); 75 94 this.tpClientControl = new System.Windows.Forms.TabPage(); … … 85 104 this.tcManagementConsole = new System.Windows.Forms.TabControl(); 86 105 this.checkBox1 = new System.Windows.Forms.CheckBox(); 106 this.splitContainer3 = new System.Windows.Forms.SplitContainer(); 107 this.comboBox1 = new System.Windows.Forms.ComboBox(); 108 this.button1 = new System.Windows.Forms.Button(); 109 this.button2 = new System.Windows.Forms.Button(); 110 this.listView1 = new System.Windows.Forms.ListView(); 111 this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); 112 this.calcToolStripAbortItem = new System.Windows.Forms.ToolStripMenuItem(); 87 113 this.menuStrip1.SuspendLayout(); 88 114 this.plClientDetails.SuspendLayout(); … … 97 123 this.scJobControl.Panel2.SuspendLayout(); 98 124 this.scJobControl.SuspendLayout(); 125 this.calculatingJobTabControl.SuspendLayout(); 126 this.calculatingJobTabPage.SuspendLayout(); 127 this.splitContainer5.Panel1.SuspendLayout(); 128 this.splitContainer5.Panel2.SuspendLayout(); 129 this.splitContainer5.SuspendLayout(); 99 130 this.contextMenuJob.SuspendLayout(); 131 this.finishedJobsTabPage.SuspendLayout(); 132 this.splitContainer2.Panel1.SuspendLayout(); 133 this.splitContainer2.Panel2.SuspendLayout(); 134 this.splitContainer2.SuspendLayout(); 135 this.offlineJobsTabPage.SuspendLayout(); 136 this.splitContainer4.Panel1.SuspendLayout(); 137 this.splitContainer4.Panel2.SuspendLayout(); 138 this.splitContainer4.SuspendLayout(); 139 this.AbortContextMenuStrip.SuspendLayout(); 100 140 this.tpClientControl.SuspendLayout(); 101 141 this.scClientControl.Panel1.SuspendLayout(); … … 107 147 this.contextMenuGroup.SuspendLayout(); 108 148 this.tcManagementConsole.SuspendLayout(); 149 this.splitContainer3.Panel1.SuspendLayout(); 150 this.splitContainer3.Panel2.SuspendLayout(); 151 this.splitContainer3.SuspendLayout(); 109 152 this.SuspendLayout(); 110 153 // … … 480 523 // scJobControl.Panel1 481 524 // 482 this.scJobControl.Panel1.Controls.Add(this. lvJobControl);525 this.scJobControl.Panel1.Controls.Add(this.calculatingJobTabControl); 483 526 // 484 527 // scJobControl.Panel2 … … 489 532 this.scJobControl.TabIndex = 0; 490 533 // 491 // lvJobControl 492 // 493 this.lvJobControl.AllowDrop = true; 494 this.lvJobControl.ContextMenuStrip = this.contextMenuJob; 495 this.lvJobControl.Dock = System.Windows.Forms.DockStyle.Fill; 496 this.lvJobControl.LargeImageList = this.ilLargeImgJob; 497 this.lvJobControl.Location = new System.Drawing.Point(0, 0); 498 this.lvJobControl.MultiSelect = false; 499 this.lvJobControl.Name = "lvJobControl"; 500 this.lvJobControl.Size = new System.Drawing.Size(454, 386); 501 this.lvJobControl.SmallImageList = this.ilSmallImgJob; 502 this.lvJobControl.TabIndex = 0; 503 this.lvJobControl.UseCompatibleStateImageBehavior = false; 504 this.lvJobControl.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lvJobControl_MouseUp); 505 this.lvJobControl.MouseMove += new System.Windows.Forms.MouseEventHandler(this.lvJobControl_MouseMove); 506 this.lvJobControl.Click += new System.EventHandler(this.OnLVJobControlClicked); 534 // calculatingJobTabControl 535 // 536 this.calculatingJobTabControl.Controls.Add(this.calculatingJobTabPage); 537 this.calculatingJobTabControl.Controls.Add(this.finishedJobsTabPage); 538 this.calculatingJobTabControl.Controls.Add(this.offlineJobsTabPage); 539 this.calculatingJobTabControl.Dock = System.Windows.Forms.DockStyle.Fill; 540 this.calculatingJobTabControl.Location = new System.Drawing.Point(0, 0); 541 this.calculatingJobTabControl.Name = "calculatingJobTabControl"; 542 this.calculatingJobTabControl.SelectedIndex = 0; 543 this.calculatingJobTabControl.Size = new System.Drawing.Size(454, 386); 544 this.calculatingJobTabControl.TabIndex = 0; 545 // 546 // calculatingJobTabPage 547 // 548 this.calculatingJobTabPage.Controls.Add(this.splitContainer5); 549 this.calculatingJobTabPage.Location = new System.Drawing.Point(4, 22); 550 this.calculatingJobTabPage.Name = "calculatingJobTabPage"; 551 this.calculatingJobTabPage.Padding = new System.Windows.Forms.Padding(3); 552 this.calculatingJobTabPage.Size = new System.Drawing.Size(446, 360); 553 this.calculatingJobTabPage.TabIndex = 2; 554 this.calculatingJobTabPage.Text = "Calculating Jobs"; 555 this.calculatingJobTabPage.UseVisualStyleBackColor = true; 556 // 557 // splitContainer5 558 // 559 this.splitContainer5.Dock = System.Windows.Forms.DockStyle.Fill; 560 this.splitContainer5.Location = new System.Drawing.Point(3, 3); 561 this.splitContainer5.Name = "splitContainer5"; 562 this.splitContainer5.Orientation = System.Windows.Forms.Orientation.Horizontal; 563 // 564 // splitContainer5.Panel1 565 // 566 this.splitContainer5.Panel1.Controls.Add(this.cmb_calculatingJob_count); 567 this.splitContainer5.Panel1.Controls.Add(this.btn_calculatingJobs_next); 568 this.splitContainer5.Panel1.Controls.Add(this.btn_calculatingJobs_prev); 569 // 570 // splitContainer5.Panel2 571 // 572 this.splitContainer5.Panel2.Controls.Add(this.lv_calculatingJobs); 573 this.splitContainer5.Size = new System.Drawing.Size(440, 354); 574 this.splitContainer5.SplitterDistance = 28; 575 this.splitContainer5.TabIndex = 3; 576 // 577 // cmb_calculatingJob_count 578 // 579 this.cmb_calculatingJob_count.FormattingEnabled = true; 580 this.cmb_calculatingJob_count.Items.AddRange(new object[] { 581 "25", 582 "50", 583 "75", 584 "100"}); 585 this.cmb_calculatingJob_count.Location = new System.Drawing.Point(165, 3); 586 this.cmb_calculatingJob_count.Name = "cmb_calculatingJob_count"; 587 this.cmb_calculatingJob_count.Size = new System.Drawing.Size(48, 21); 588 this.cmb_calculatingJob_count.TabIndex = 2; 589 this.cmb_calculatingJob_count.SelectedIndexChanged += new System.EventHandler(this.cmb_count_SelectedIndexChanged); 590 // 591 // btn_calculatingJobs_next 592 // 593 this.btn_calculatingJobs_next.Location = new System.Drawing.Point(84, 3); 594 this.btn_calculatingJobs_next.Name = "btn_calculatingJobs_next"; 595 this.btn_calculatingJobs_next.Size = new System.Drawing.Size(75, 23); 596 this.btn_calculatingJobs_next.TabIndex = 1; 597 this.btn_calculatingJobs_next.Text = "-->"; 598 this.btn_calculatingJobs_next.UseVisualStyleBackColor = true; 599 this.btn_calculatingJobs_next.Click += new System.EventHandler(this.btn_next_Click); 600 // 601 // btn_calculatingJobs_prev 602 // 603 this.btn_calculatingJobs_prev.Location = new System.Drawing.Point(3, 3); 604 this.btn_calculatingJobs_prev.Name = "btn_calculatingJobs_prev"; 605 this.btn_calculatingJobs_prev.Size = new System.Drawing.Size(75, 23); 606 this.btn_calculatingJobs_prev.TabIndex = 0; 607 this.btn_calculatingJobs_prev.Text = "<--"; 608 this.btn_calculatingJobs_prev.UseVisualStyleBackColor = true; 609 this.btn_calculatingJobs_prev.Click += new System.EventHandler(this.btn_prev_Click); 610 // 611 // lv_calculatingJobs 612 // 613 this.lv_calculatingJobs.ContextMenuStrip = this.contextMenuJob; 614 this.lv_calculatingJobs.Dock = System.Windows.Forms.DockStyle.Fill; 615 this.lv_calculatingJobs.LargeImageList = this.ilLargeImgJob; 616 this.lv_calculatingJobs.Location = new System.Drawing.Point(0, 0); 617 this.lv_calculatingJobs.Name = "lv_calculatingJobs"; 618 this.lv_calculatingJobs.Size = new System.Drawing.Size(440, 322); 619 this.lv_calculatingJobs.SmallImageList = this.ilSmallImgJob; 620 this.lv_calculatingJobs.TabIndex = 0; 621 this.lv_calculatingJobs.UseCompatibleStateImageBehavior = false; 622 this.lv_calculatingJobs.SelectedIndexChanged += new System.EventHandler(this.lv_Jobs_SelectedIndexChanged); 507 623 // 508 624 // contextMenuJob 509 625 // 510 626 this.contextMenuJob.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 511 this.menuItem AbortJob,512 this. menuItemGetSnapshot});627 this.menuItemGetSnapshot, 628 this.calcToolStripAbortItem}); 513 629 this.contextMenuJob.Name = "contextMenuJob"; 514 630 this.contextMenuJob.Size = new System.Drawing.Size(145, 48); 515 631 // 516 // menuItemAbortJob517 // 518 this. menuItemAbortJob.Name = "menuItemAbortJob";519 this. menuItemAbortJob.Size = new System.Drawing.Size(144, 22);520 this. menuItemAbortJob.Text = "Abort";632 // offlineItemAbortJob 633 // 634 this.offlineItemAbortJob.Name = "offlineItemAbortJob"; 635 this.offlineItemAbortJob.Size = new System.Drawing.Size(152, 22); 636 this.offlineItemAbortJob.Text = "Abort"; 521 637 // 522 638 // menuItemGetSnapshot … … 533 649 this.ilSmallImgJob.Images.SetKeyName(1, "Forward.png"); 534 650 this.ilSmallImgJob.Images.SetKeyName(2, "pause.png"); 651 // 652 // finishedJobsTabPage 653 // 654 this.finishedJobsTabPage.Controls.Add(this.splitContainer2); 655 this.finishedJobsTabPage.Location = new System.Drawing.Point(4, 22); 656 this.finishedJobsTabPage.Name = "finishedJobsTabPage"; 657 this.finishedJobsTabPage.Padding = new System.Windows.Forms.Padding(3); 658 this.finishedJobsTabPage.Size = new System.Drawing.Size(446, 360); 659 this.finishedJobsTabPage.TabIndex = 0; 660 this.finishedJobsTabPage.Text = "Finished Jobs"; 661 this.finishedJobsTabPage.UseVisualStyleBackColor = true; 662 // 663 // splitContainer2 664 // 665 this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; 666 this.splitContainer2.Location = new System.Drawing.Point(3, 3); 667 this.splitContainer2.Name = "splitContainer2"; 668 this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; 669 // 670 // splitContainer2.Panel1 671 // 672 this.splitContainer2.Panel1.Controls.Add(this.cmb_finishedJob_count); 673 this.splitContainer2.Panel1.Controls.Add(this.btn_finishedJob_next); 674 this.splitContainer2.Panel1.Controls.Add(this.btn_finishedJob_prev); 675 // 676 // splitContainer2.Panel2 677 // 678 this.splitContainer2.Panel2.Controls.Add(this.lv_finishedJobs); 679 this.splitContainer2.Size = new System.Drawing.Size(440, 354); 680 this.splitContainer2.SplitterDistance = 28; 681 this.splitContainer2.TabIndex = 2; 682 // 683 // cmb_finishedJob_count 684 // 685 this.cmb_finishedJob_count.FormattingEnabled = true; 686 this.cmb_finishedJob_count.Items.AddRange(new object[] { 687 "25", 688 "50", 689 "75", 690 "100"}); 691 this.cmb_finishedJob_count.Location = new System.Drawing.Point(165, 3); 692 this.cmb_finishedJob_count.Name = "cmb_finishedJob_count"; 693 this.cmb_finishedJob_count.Size = new System.Drawing.Size(48, 21); 694 this.cmb_finishedJob_count.TabIndex = 2; 695 this.cmb_finishedJob_count.SelectedIndexChanged += new System.EventHandler(this.cmb_count_SelectedIndexChanged); 696 // 697 // btn_finishedJob_next 698 // 699 this.btn_finishedJob_next.Location = new System.Drawing.Point(84, 3); 700 this.btn_finishedJob_next.Name = "btn_finishedJob_next"; 701 this.btn_finishedJob_next.Size = new System.Drawing.Size(75, 23); 702 this.btn_finishedJob_next.TabIndex = 1; 703 this.btn_finishedJob_next.Text = "-->"; 704 this.btn_finishedJob_next.UseVisualStyleBackColor = true; 705 this.btn_finishedJob_next.Click += new System.EventHandler(this.btn_next_Click); 706 // 707 // btn_finishedJob_prev 708 // 709 this.btn_finishedJob_prev.Location = new System.Drawing.Point(3, 3); 710 this.btn_finishedJob_prev.Name = "btn_finishedJob_prev"; 711 this.btn_finishedJob_prev.Size = new System.Drawing.Size(75, 23); 712 this.btn_finishedJob_prev.TabIndex = 0; 713 this.btn_finishedJob_prev.Text = "<--"; 714 this.btn_finishedJob_prev.UseVisualStyleBackColor = true; 715 this.btn_finishedJob_prev.Click += new System.EventHandler(this.btn_prev_Click); 716 // 717 // lv_finishedJobs 718 // 719 this.lv_finishedJobs.Dock = System.Windows.Forms.DockStyle.Fill; 720 this.lv_finishedJobs.LargeImageList = this.ilLargeImgJob; 721 this.lv_finishedJobs.Location = new System.Drawing.Point(0, 0); 722 this.lv_finishedJobs.Name = "lv_finishedJobs"; 723 this.lv_finishedJobs.Size = new System.Drawing.Size(440, 322); 724 this.lv_finishedJobs.SmallImageList = this.ilSmallImgJob; 725 this.lv_finishedJobs.TabIndex = 0; 726 this.lv_finishedJobs.UseCompatibleStateImageBehavior = false; 727 this.lv_finishedJobs.SelectedIndexChanged += new System.EventHandler(this.lv_Jobs_SelectedIndexChanged); 728 // 729 // offlineJobsTabPage 730 // 731 this.offlineJobsTabPage.Controls.Add(this.splitContainer4); 732 this.offlineJobsTabPage.Location = new System.Drawing.Point(4, 22); 733 this.offlineJobsTabPage.Name = "offlineJobsTabPage"; 734 this.offlineJobsTabPage.Padding = new System.Windows.Forms.Padding(3); 735 this.offlineJobsTabPage.Size = new System.Drawing.Size(446, 360); 736 this.offlineJobsTabPage.TabIndex = 1; 737 this.offlineJobsTabPage.Text = "Offline Jobs"; 738 this.offlineJobsTabPage.UseVisualStyleBackColor = true; 739 // 740 // splitContainer4 741 // 742 this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill; 743 this.splitContainer4.Location = new System.Drawing.Point(3, 3); 744 this.splitContainer4.Name = "splitContainer4"; 745 this.splitContainer4.Orientation = System.Windows.Forms.Orientation.Horizontal; 746 // 747 // splitContainer4.Panel1 748 // 749 this.splitContainer4.Panel1.Controls.Add(this.cmb_offlineJob_count); 750 this.splitContainer4.Panel1.Controls.Add(this.btn_offlineJob_next); 751 this.splitContainer4.Panel1.Controls.Add(this.btn_offlinejob_prev); 752 // 753 // splitContainer4.Panel2 754 // 755 this.splitContainer4.Panel2.Controls.Add(this.lv_offlineJobs); 756 this.splitContainer4.Size = new System.Drawing.Size(440, 354); 757 this.splitContainer4.SplitterDistance = 28; 758 this.splitContainer4.TabIndex = 3; 759 // 760 // cmb_offlineJob_count 761 // 762 this.cmb_offlineJob_count.FormattingEnabled = true; 763 this.cmb_offlineJob_count.Items.AddRange(new object[] { 764 "25", 765 "50", 766 "75", 767 "100"}); 768 this.cmb_offlineJob_count.Location = new System.Drawing.Point(165, 3); 769 this.cmb_offlineJob_count.Name = "cmb_offlineJob_count"; 770 this.cmb_offlineJob_count.Size = new System.Drawing.Size(48, 21); 771 this.cmb_offlineJob_count.TabIndex = 2; 772 this.cmb_offlineJob_count.SelectedIndexChanged += new System.EventHandler(this.cmb_count_SelectedIndexChanged); 773 // 774 // btn_offlineJob_next 775 // 776 this.btn_offlineJob_next.Location = new System.Drawing.Point(84, 3); 777 this.btn_offlineJob_next.Name = "btn_offlineJob_next"; 778 this.btn_offlineJob_next.Size = new System.Drawing.Size(75, 23); 779 this.btn_offlineJob_next.TabIndex = 1; 780 this.btn_offlineJob_next.Text = "-->"; 781 this.btn_offlineJob_next.UseVisualStyleBackColor = true; 782 this.btn_offlineJob_next.Click += new System.EventHandler(this.btn_next_Click); 783 // 784 // btn_offlinejob_prev 785 // 786 this.btn_offlinejob_prev.Location = new System.Drawing.Point(3, 3); 787 this.btn_offlinejob_prev.Name = "btn_offlinejob_prev"; 788 this.btn_offlinejob_prev.Size = new System.Drawing.Size(75, 23); 789 this.btn_offlinejob_prev.TabIndex = 0; 790 this.btn_offlinejob_prev.Text = "<--"; 791 this.btn_offlinejob_prev.UseVisualStyleBackColor = true; 792 this.btn_offlinejob_prev.Click += new System.EventHandler(this.btn_prev_Click); 793 // 794 // lv_offlineJobs 795 // 796 this.lv_offlineJobs.ContextMenuStrip = this.AbortContextMenuStrip; 797 this.lv_offlineJobs.Dock = System.Windows.Forms.DockStyle.Fill; 798 this.lv_offlineJobs.LargeImageList = this.ilLargeImgJob; 799 this.lv_offlineJobs.Location = new System.Drawing.Point(0, 0); 800 this.lv_offlineJobs.Name = "lv_offlineJobs"; 801 this.lv_offlineJobs.Size = new System.Drawing.Size(440, 322); 802 this.lv_offlineJobs.SmallImageList = this.ilSmallImgJob; 803 this.lv_offlineJobs.TabIndex = 0; 804 this.lv_offlineJobs.UseCompatibleStateImageBehavior = false; 805 this.lv_offlineJobs.SelectedIndexChanged += new System.EventHandler(this.lv_Jobs_SelectedIndexChanged); 806 // 807 // AbortContextMenuStrip 808 // 809 this.AbortContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 810 this.offlineItemAbortJob}); 811 this.AbortContextMenuStrip.Name = "AbortContextMenuStrip"; 812 this.AbortContextMenuStrip.Size = new System.Drawing.Size(105, 26); 535 813 // 536 814 // ilSmallImgClient … … 675 953 this.checkBox1.Text = "checkBox1"; 676 954 this.checkBox1.UseVisualStyleBackColor = true; 955 // 956 // splitContainer3 957 // 958 this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; 959 this.splitContainer3.Location = new System.Drawing.Point(3, 3); 960 this.splitContainer3.Name = "splitContainer3"; 961 this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal; 962 // 963 // splitContainer3.Panel1 964 // 965 this.splitContainer3.Panel1.Controls.Add(this.comboBox1); 966 this.splitContainer3.Panel1.Controls.Add(this.button1); 967 this.splitContainer3.Panel1.Controls.Add(this.button2); 968 // 969 // splitContainer3.Panel2 970 // 971 this.splitContainer3.Panel2.Controls.Add(this.listView1); 972 this.splitContainer3.Size = new System.Drawing.Size(440, 354); 973 this.splitContainer3.SplitterDistance = 28; 974 this.splitContainer3.TabIndex = 2; 975 // 976 // comboBox1 977 // 978 this.comboBox1.FormattingEnabled = true; 979 this.comboBox1.Items.AddRange(new object[] { 980 "25", 981 "50", 982 "75", 983 "100"}); 984 this.comboBox1.Location = new System.Drawing.Point(165, 3); 985 this.comboBox1.Name = "comboBox1"; 986 this.comboBox1.Size = new System.Drawing.Size(48, 21); 987 this.comboBox1.TabIndex = 2; 988 // 989 // button1 990 // 991 this.button1.Location = new System.Drawing.Point(84, 3); 992 this.button1.Name = "button1"; 993 this.button1.Size = new System.Drawing.Size(75, 23); 994 this.button1.TabIndex = 1; 995 this.button1.Text = "-->"; 996 this.button1.UseVisualStyleBackColor = true; 997 // 998 // button2 999 // 1000 this.button2.Location = new System.Drawing.Point(3, 3); 1001 this.button2.Name = "button2"; 1002 this.button2.Size = new System.Drawing.Size(75, 23); 1003 this.button2.TabIndex = 0; 1004 this.button2.Text = "<--"; 1005 this.button2.UseVisualStyleBackColor = true; 1006 // 1007 // listView1 1008 // 1009 this.listView1.Dock = System.Windows.Forms.DockStyle.Fill; 1010 this.listView1.LargeImageList = this.ilLargeImgJob; 1011 this.listView1.Location = new System.Drawing.Point(0, 0); 1012 this.listView1.Name = "listView1"; 1013 this.listView1.Size = new System.Drawing.Size(440, 322); 1014 this.listView1.SmallImageList = this.ilSmallImgJob; 1015 this.listView1.TabIndex = 0; 1016 this.listView1.UseCompatibleStateImageBehavior = false; 1017 // 1018 // toolStripMenuItem1 1019 // 1020 this.toolStripMenuItem1.Name = "toolStripMenuItem1"; 1021 this.toolStripMenuItem1.Size = new System.Drawing.Size(152, 22); 1022 this.toolStripMenuItem1.Text = "Abort"; 1023 // 1024 // calcToolStripAbortItem 1025 // 1026 this.calcToolStripAbortItem.Name = "calcToolStripAbortItem"; 1027 this.calcToolStripAbortItem.Size = new System.Drawing.Size(144, 22); 1028 this.calcToolStripAbortItem.Text = "Abort"; 677 1029 // 678 1030 // HiveServerManagementConsole … … 703 1055 this.scJobControl.Panel2.ResumeLayout(false); 704 1056 this.scJobControl.ResumeLayout(false); 1057 this.calculatingJobTabControl.ResumeLayout(false); 1058 this.calculatingJobTabPage.ResumeLayout(false); 1059 this.splitContainer5.Panel1.ResumeLayout(false); 1060 this.splitContainer5.Panel2.ResumeLayout(false); 1061 this.splitContainer5.ResumeLayout(false); 705 1062 this.contextMenuJob.ResumeLayout(false); 1063 this.finishedJobsTabPage.ResumeLayout(false); 1064 this.splitContainer2.Panel1.ResumeLayout(false); 1065 this.splitContainer2.Panel2.ResumeLayout(false); 1066 this.splitContainer2.ResumeLayout(false); 1067 this.offlineJobsTabPage.ResumeLayout(false); 1068 this.splitContainer4.Panel1.ResumeLayout(false); 1069 this.splitContainer4.Panel2.ResumeLayout(false); 1070 this.splitContainer4.ResumeLayout(false); 1071 this.AbortContextMenuStrip.ResumeLayout(false); 706 1072 this.tpClientControl.ResumeLayout(false); 707 1073 this.scClientControl.Panel1.ResumeLayout(false); … … 713 1079 this.contextMenuGroup.ResumeLayout(false); 714 1080 this.tcManagementConsole.ResumeLayout(false); 1081 this.splitContainer3.Panel1.ResumeLayout(false); 1082 this.splitContainer3.Panel2.ResumeLayout(false); 1083 this.splitContainer3.ResumeLayout(false); 715 1084 this.ResumeLayout(false); 716 1085 this.PerformLayout(); … … 755 1124 private System.Windows.Forms.TabPage tpJobControl; 756 1125 private System.Windows.Forms.SplitContainer scJobControl; 757 private System.Windows.Forms.ListView lvJobControl;758 1126 private System.Windows.Forms.CheckBox checkBox1; 759 1127 private System.Windows.Forms.ContextMenuStrip contextMenuJob; 760 private System.Windows.Forms.ToolStripMenuItem menuItemAbortJob;1128 private System.Windows.Forms.ToolStripMenuItem offlineItemAbortJob; 761 1129 private System.Windows.Forms.ToolStripMenuItem menuItemGetSnapshot; 762 1130 private System.Windows.Forms.ToolStripMenuItem viewToolStripMenuItem; … … 779 1147 private System.Windows.Forms.ToolStripMenuItem projectToolStripMenuItem; 780 1148 private System.Windows.Forms.ToolStripMenuItem menuItemOpenCalendar; 1149 private System.Windows.Forms.TabControl calculatingJobTabControl; 1150 private System.Windows.Forms.TabPage finishedJobsTabPage; 1151 private System.Windows.Forms.TabPage offlineJobsTabPage; 1152 private System.Windows.Forms.TabPage calculatingJobTabPage; 1153 private System.Windows.Forms.SplitContainer splitContainer2; 1154 private System.Windows.Forms.Button btn_finishedJob_next; 1155 private System.Windows.Forms.Button btn_finishedJob_prev; 1156 private System.Windows.Forms.ComboBox cmb_finishedJob_count; 1157 private System.Windows.Forms.ListView lv_finishedJobs; 1158 private System.Windows.Forms.SplitContainer splitContainer3; 1159 private System.Windows.Forms.ComboBox comboBox1; 1160 private System.Windows.Forms.Button button1; 1161 private System.Windows.Forms.Button button2; 1162 private System.Windows.Forms.ListView listView1; 1163 private System.Windows.Forms.SplitContainer splitContainer5; 1164 private System.Windows.Forms.ComboBox cmb_calculatingJob_count; 1165 private System.Windows.Forms.Button btn_calculatingJobs_next; 1166 private System.Windows.Forms.Button btn_calculatingJobs_prev; 1167 private System.Windows.Forms.ListView lv_calculatingJobs; 1168 private System.Windows.Forms.SplitContainer splitContainer4; 1169 private System.Windows.Forms.ComboBox cmb_offlineJob_count; 1170 private System.Windows.Forms.Button btn_offlineJob_next; 1171 private System.Windows.Forms.Button btn_offlinejob_prev; 1172 private System.Windows.Forms.ListView lv_offlineJobs; 1173 private System.Windows.Forms.ContextMenuStrip AbortContextMenuStrip; 1174 private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; 1175 private System.Windows.Forms.ToolStripMenuItem calcToolStripAbortItem; 781 1176 } 782 1177 } -
branches/3.2/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.cs
r3931 r4042 44 44 public delegate void closeForm(bool cf, bool error); 45 45 46 public delegate void updateListView(JobDataFetcher fetcher, ListView sender, int category); 47 46 48 public partial class HiveServerManagementConsole : Form { 47 49 … … 65 67 private TreeNode hoverNode; 66 68 private List<ListViewGroup> lvClientGroups; 69 70 private JobDataFetcher jdfFinished = null; 71 private JobDataFetcher jdfOffline = null; 72 private JobDataFetcher jdfCalculating = null; 73 74 67 75 #endregion 68 76 … … 85 93 Init(); 86 94 AddClients(); 87 AddJobs(); 88 timerSyncronize.Start(); 89 } 90 95 //AddJobs(); 96 StartAutoUpdateTimers(); 97 //timerSyncronize.Start(); 98 } 99 100 private void StartAutoUpdateTimers() { 101 jdfCalculating.NewDataAvailable += new EventHandler(jdf_NewDataAvailable); 102 jdfOffline.NewDataAvailable += new EventHandler(jdf_NewDataAvailable); 103 jdfFinished.NewDataAvailable += new EventHandler(jdf_NewDataAvailable); 104 jdfFinished.Start(); 105 jdfOffline.Start(); 106 jdfCalculating.Start(); 107 } 108 109 void jdf_NewDataAvailable(object sender, EventArgs e) { 110 JobDataFetcher fetcher = (JobDataFetcher) sender; 111 if (fetcher.PollStates.Contains(State.finished)) { 112 updateJobListView(fetcher, lv_finishedJobs, 0); 113 } else if(fetcher.PollStates.Contains(State.calculating)) { 114 updateJobListView(fetcher, lv_calculatingJobs, 1); 115 } else if (fetcher.PollStates.Contains(State.offline)) { 116 updateJobListView(fetcher, lv_offlineJobs, 2); 117 } 118 } 119 120 private void updateJobListView(JobDataFetcher fetcher, ListView listView, int category) { 121 if (listView.InvokeRequired) { 122 listView.Invoke(new updateListView(updateJobListView), new object[] { fetcher, listView, category }); 123 } else { 124 listView.BeginUpdate(); 125 listView.Items.Clear(); 126 foreach (JobDto job in fetcher.CachedJobs) { 127 ListViewItem lvi = new ListViewItem(job.Id.ToString(), category); 128 lvi.Tag = job; 129 listView.Items.Add(lvi); 130 } 131 listView.EndUpdate(); 132 } 133 } 134 135 91 136 private void Init() { 92 //adding context menu items for jobs 93 menuItemAbortJob.Click += (s, e) => { 94 IJobManager jobManager = ServiceLocator.GetJobManager(); 95 if (lvJobControl.SelectedItems.Count == 1) { 96 jobManager.AbortJob(((JobDto)(lvJobControl.SelectedItems[0].Tag)).Id); 137 138 jdfFinished = new JobDataFetcher(new State[] {State.finished}, 50); 139 jdfCalculating = new JobDataFetcher(new State[] {State.calculating}, 50); 140 jdfOffline = new JobDataFetcher(new State[] {State.offline}, 50); 141 142 cmb_finishedJob_count.SelectedItem = "50"; 143 cmb_offlineJob_count.SelectedItem = "50"; 144 cmb_calculatingJob_count.SelectedItem = "50"; 145 146 calcToolStripAbortItem.Click += (s, e) => { 147 if(lv_calculatingJobs.SelectedItems.Count > 0) { 148 ServiceLocator.GetJobManager().AbortJob(((JobDto) lv_calculatingJobs.SelectedItems[0].Tag).Id); 97 149 } 98 150 }; 99 151 100 //adding context menu items for jobs 101 menuItemGetSnapshot.Click += (s, e) => { 102 IJobManager jobManager = ServiceLocator.GetJobManager(); 103 if (lvJobControl.SelectedItems.Count == 1) { 104 jobManager.RequestSnapshot(((JobDto)(lvJobControl.SelectedItems[0].Tag)).Id); 152 offlineItemAbortJob.Click += (s, e) => { 153 if (lv_offlineJobs.SelectedItems.Count > 0) { 154 ServiceLocator.GetJobManager().AbortJob(((JobDto)lv_offlineJobs.SelectedItems[0].Tag).Id); 105 155 } 106 156 }; … … 256 306 257 307 258 /// <summary>259 /// Adds Exceptionobs to ListView and TreeView260 /// </summary>261 private void AddJobs() {262 try {263 List<ListViewItem> jobObjects = new List<ListViewItem>();264 IJobManager jobManager =265 ServiceLocator.GetJobManager();266 if (jobManager == null) {267 Logger.Error("Jobmanager is null");268 jobs = new ResponseList<JobDto>();269 } else {270 jobs = jobManager.GetAllJobs();271 }272 273 274 if (lvJobControl != null) lvJobControl.Items.Clear();275 276 ListViewGroup lvJobCalculating = new ListViewGroup("calculating", HorizontalAlignment.Left);277 ListViewGroup lvJobFinished = new ListViewGroup("finished", HorizontalAlignment.Left);278 ListViewGroup lvJobPending = new ListViewGroup("pending", HorizontalAlignment.Left);279 280 jobGroup = new List<ListViewGroup>();281 jobGroup.Add(lvJobCalculating);282 jobGroup.Add(lvJobFinished);283 jobGroup.Add(lvJobPending);284 285 if (jobs != null && jobs.List != null) {286 287 foreach (JobDto job in jobs.List) {288 if (job.State == State.calculating) {289 ListViewItem lvi = new ListViewItem(job.Id.ToString(), 1, lvJobCalculating);290 lvi.Tag = job;291 jobObjects.Add(lvi);292 293 lvi.ToolTipText = (job.Percentage * 100) + "% of job calculated";294 } else if (job.State == State.finished) {295 ListViewItem lvi = new ListViewItem(job.Id.ToString(), 0, lvJobFinished);296 lvi.Tag = job;297 jobObjects.Add(lvi);298 } else if (job.State == State.offline || job.State == State.pending) {299 ListViewItem lvi = new ListViewItem(job.Id.ToString(), 2, lvJobPending);300 lvi.Tag = job;301 jobObjects.Add(lvi);302 }303 } // Jobs304 lvJobControl.BeginUpdate();305 foreach (ListViewItem lvi in jobObjects) {306 lvJobControl.Items.Add(lvi);307 }308 // actualization309 lvJobControl.Groups.Add(lvJobCalculating);310 lvJobControl.Groups.Add(lvJobFinished);311 lvJobControl.Groups.Add(lvJobPending);312 lvJobControl.EndUpdate();313 314 if (currentJob != null) {315 JobClicked();316 }317 }318 }319 catch (Exception ex) {320 Logger.Error(ex);321 closeFormEvent(true, true);322 this.Close();323 }324 }325 326 308 private void AddClients() { 327 309 lvClientGroups = new List<ListViewGroup>(); … … 543 525 544 526 private void RefreshJob(Changes change) { 545 if (change.ChangeType == Change.Update) {527 /*if (change.ChangeType == Change.Update) { 546 528 for (int i = 0; i < lvJobControl.Items.Count; i++) { 547 529 if (lvJobControl.Items[i].Text == change.ID.ToString()) { … … 591 573 } 592 574 } 593 } 575 } */ 594 576 } 595 577 … … 626 608 627 609 private void OnLVJobControlClicked(object sender, EventArgs e) { 628 currentJob = (JobDto)lvJobControl.SelectedItems[0].Tag; 610 JobListView jlv = (JobListView) sender; 611 currentJob = (JobDto)jlv.SelectedItems[0].Tag; 629 612 JobClicked(); 630 613 } 631 614 632 615 private void lvJobControl_MouseMove(object sender, MouseEventArgs e) { 633 if ((lvJobControl.GetItemAt(e.X, e.Y) != null) && 634 (lvJobControl.GetItemAt(e.X, e.Y).ToolTipText != null)) { 635 tt.SetToolTip(lvJobControl, lvJobControl.GetItemAt(e.X, e.Y).ToolTipText); 616 JobListView jlv = (JobListView) sender; 617 if ((jlv.GetItemAt(e.X, e.Y) != null) && 618 (jlv.GetItemAt(e.X, e.Y).ToolTipText != null)) { 619 tt.SetToolTip(jlv, jlv.GetItemAt(e.X, e.Y).ToolTipText); 636 620 } 637 621 } … … 640 624 // If the right mouse button was clicked and released, 641 625 // display the shortcut menu assigned to the ListView. 642 lvJobControl.ContextMenuStrip.Items.Clear(); 643 ListViewHitTestInfo hitTestInfo = lvJobControl.HitTest(e.Location); 644 if (e.Button == MouseButtons.Right && hitTestInfo.Item != null && lvJobControl.SelectedItems.Count == 1) { 645 JobDto selectedJob = (JobDto)lvJobControl.SelectedItems[0].Tag; 626 JobListView jlv = (JobListView)sender; 627 jlv.ContextMenuStrip.Items.Clear(); 628 ListViewHitTestInfo hitTestInfo = jlv.HitTest(e.Location); 629 if (e.Button == MouseButtons.Right && hitTestInfo.Item != null && jlv.SelectedItems.Count == 1) { 630 JobDto selectedJob = (JobDto)jlv.SelectedItems[0].Tag; 646 631 647 632 if (selectedJob != null && selectedJob.State == State.calculating) { 648 lvJobControl.ContextMenuStrip.Items.Add(menuItemAbortJob);649 lvJobControl.ContextMenuStrip.Items.Add(menuItemGetSnapshot);650 } 651 } 652 lvJobControl.ContextMenuStrip.Show(new Point(e.X, e.Y));633 jlv.ContextMenuStrip.Items.Add(offlineItemAbortJob); 634 jlv.ContextMenuStrip.Items.Add(menuItemGetSnapshot); 635 } 636 } 637 jlv.ContextMenuStrip.Show(new Point(e.X, e.Y)); 653 638 } 654 639 … … 745 730 private void largeIconsToolStripMenuItem_Click(object sender, EventArgs e) { 746 731 lvClientControl.View = View.LargeIcon; 747 lvJobControl.View = View.LargeIcon;732 //lvJobControl.View = View.LargeIcon; 748 733 largeIconsToolStripMenuItem.CheckState = CheckState.Checked; 749 734 smallIconsToolStripMenuItem.CheckState = CheckState.Unchecked; … … 753 738 private void smallIconsToolStripMenuItem_Click(object sender, EventArgs e) { 754 739 lvClientControl.View = View.SmallIcon; 755 lvJobControl.View = View.SmallIcon;740 //lvJobControl.View = View.SmallIcon; 756 741 largeIconsToolStripMenuItem.CheckState = CheckState.Unchecked; 757 742 smallIconsToolStripMenuItem.CheckState = CheckState.Checked; … … 761 746 private void listToolStripMenuItem_Click(object sender, EventArgs e) { 762 747 lvClientControl.View = View.List; 763 lvJobControl.View = View.List;748 //lvJobControl.View = View.List; 764 749 largeIconsToolStripMenuItem.CheckState = CheckState.Unchecked; 765 750 smallIconsToolStripMenuItem.CheckState = CheckState.Unchecked; … … 859 844 #endregion 860 845 861 862 846 private void btn_prev_Click(object sender, EventArgs e) { 847 if (sender == btn_finishedJob_prev) 848 jdfFinished.Backward(); 849 else if (sender == btn_calculatingJobs_prev) 850 jdfCalculating.Backward(); 851 else if (sender == btn_offlinejob_prev) { 852 jdfOffline.Backward(); 853 } 854 } 855 856 private void btn_next_Click(object sender, EventArgs e) { 857 if (sender == btn_finishedJob_next) 858 jdfFinished.Forward(); 859 else if (sender == btn_calculatingJobs_next) 860 jdfCalculating.Forward(); 861 else if (sender == btn_offlineJob_next) { 862 jdfOffline.Forward(); 863 } 864 } 865 866 private void cmb_count_SelectedIndexChanged(object sender, EventArgs e) { 867 ComboBox box = (ComboBox) sender; 868 if (box.SelectedItem != null) { 869 int val; 870 if (Int32.TryParse(box.SelectedItem.ToString(), out val)) { 871 if (box == cmb_offlineJob_count) { 872 jdfOffline.NrOfEntriesOnPage = val; 873 } 874 else if (box == cmb_finishedJob_count) { 875 jdfFinished.NrOfEntriesOnPage = val; 876 } 877 else if (box == cmb_calculatingJob_count) { 878 jdfCalculating.NrOfEntriesOnPage = val; 879 } 880 } 881 } 882 } 883 884 private void lv_Jobs_SelectedIndexChanged(object sender, EventArgs e) { 885 ListView lv = (ListView) sender; 886 if(lv.SelectedItems.Count > 0) { 887 foreach (ListViewItem lvi in lv.SelectedItems) { 888 currentJob = (JobDto) lvi.Tag; 889 JobClicked(); 890 } 891 } 892 } 863 893 } 864 894 } -
branches/3.2/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.resx
r3578 r4042 129 129 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 130 130 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABo 131 FwAAAk1TRnQBSQFMAgEBBAEAA RQBAAEUAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo131 FwAAAk1TRnQBSQFMAgEBBAEAAXQBAAF0AQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo 132 132 AwABgAMAAUADAAEBAQABCAYAASAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA 133 133 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 … … 239 239 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 240 240 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAO 241 DgAAAk1TRnQBSQFMAgEBAwEAA RQBAAEUAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo241 DgAAAk1TRnQBSQFMAgEBAwEAAXQBAAF0AQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo 242 242 AwABgAMAASADAAEBAQABCAYAARAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA 243 243 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 … … 308 308 <value>462, 9</value> 309 309 </metadata> 310 <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 311 <data name="btnRefresh.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> 310 <metadata name="updaterWoker.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 311 <value>286, 48</value> 312 </metadata> 313 <metadata name="contextMenuJob.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 314 <value>144, 48</value> 315 </metadata> 316 <metadata name="ilSmallImgJob.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 317 <value>17, 48</value> 318 </metadata> 319 <data name="ilSmallImgJob.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64"> 312 320 <value> 313 iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 314 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAABcQQAA 315 XEEBRtDlPgAAA3hJREFUSEu1ls1PE2EQxj229ouPVNErgZOJicZDjR68mHg1JgYvxov/gIlHxARBoxGU 316 KlJUVJDypVIQKkXBpIootoC0tLS0pZEIiILfikAfZ5Zuu9sWaDQ2edLt7vvOrzPzzsxuALBBquIeRR7p 317 CKmQVJSmeC3vyUu0FzNOD3NIFhJYpU8VuGBXpiVeK+6L2sgRQQKAbm4hTZ/pVcA8ooN9Ug/H7GY4Z3PS 318 Eq/lPbyXbbAttsm2RUB7CT3oDmXj+Ts9uiay0B7IQFtU7YFMPAxmoiMUl5WurRMrsoWz0DuZjb4pPWxk 319 g20RoF0A0EU+u2d2aWEZz8Adlxq3R9SodWlQ59bg7qgG9SSzR4tGrxZNYytqId3z6XDfr8MDUuu4Dhb6 320 Q7ZwJupHtGLI8hlQwG7xhpo3atwi4wz4F4g1lCGGqoABhWXPlbgxrBa0HqTBqyMPWHFPXk4dRXd4p8yT 321 8j4le1HIgCLjSyWuD6nWhNhC+zHz3Y6lyHcsR35h7qcDg+9PwjdvpFADT8J7ZeEyOVQMOCUAKghgGlSt 322 Cnk2eVwwstbncXiPLCfVzo1xwOV+JaqcqpSQNr8BXxYCGJw5ja7gflj82zEwfQIRLMp43QSQJt7kkAAu 323 EeBaFFAtCdVNSnpHYB+dpmwh6XeiJ8v94WKS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HH 353 C6wBoQMAAWcLTQGhEgABUAE2AjcCNgY3AjYBoQEAAqwC2wfVAdsB1AGsAaEBAAFMAU0CWQJTBlkBUwFN 354 AaEQAAGhDjYBNQGhAawN1AGsAaEBTQFTAk0KUwFNEAABbA82AccO1AGsAYwBUwJNC1MBTRAAAWwGNgFX 355 CDYBxwTUAdwJ1AGsAWcCTQJTAZoB/wGaAVMC/wRTAU0QAAFsBTYBGwH/CDYBxwTUAv8B3AfUAawBZwFN 356 A1MBmgH/ARoBUwL/BFMBTRAAAWwENgFYAv8B9gc2AccE1AT/AdwF1AGsAWcEUwGaAf8BGgFTAv8EUwFN 357 EAABbAQ2Af8B9gE2Af8BnwY2AccE1Ab/AdsD1AGsAWcEUwGaAf8BGgFTAv8EUwFNEAABbAQ2AXkCNgFY 358 Af8BWAU2AccE1AT/AfQF1AGsAWcEUwGaAf8BGgFTAv8EUwFNEAABbAg2ARsB/wU2AccE1AP/B9QBrAFn 359 BFMBmgH/ARoBUwL/BFMBTRAAAWwJNgH/AZ8ENgHHBNQB/wnUAawBZwRTAXUBGgF6AVMCGgRTAU0QAAFs 360 DTYBNwE2AccO1AGsAWcOUwFNEAABhgw2AjcBNgHHAa0M1AHbAawBhg5TAU0RAAE2DDcBNgFsAQABrAHV 361 AdsI1ALbAawBxwEAAU0CeglTAXoBTQFnEQABoQM2BzcCNgFQAgABoQKsAbMH1AGzAqwCAAHEAk0JUwFN 362 AUwUAAGGCWwBoQUACscBoQUAAYYIZwGMAaESAAFCAU0BPgcAAT4DAAEoAwABQAMAARADAAEBAQABAQUA 363 AYAXAAP/AQABwAEBAcABAQHAAQECAAGAAQABgAEAAYBbAAGAAQABgAEAAYADAAGAAQEBgAEBAYABAQIA 364 AeABAwHgAQMB4AEDAgAL 331 365 </value> 332 366 </data> 333 <metadata name=" contextMenuGroup.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">334 <value> 504, 38</value>367 <metadata name="AbortContextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 368 <value>621, 9</value> 335 369 </metadata> 336 370 <metadata name="ilSmallImgClient.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 337 <value> 17, 50</value>371 <value>961, 9</value> 338 372 </metadata> 339 373 <data name="ilSmallImgClient.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64"> … … 342 376 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 343 377 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABy 344 DAAAAk1TRnQBSQFMAgEBBAEAA RQBAAEUAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo378 DAAAAk1TRnQBSQFMAgEBBAEAAXQBAAF0AQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo 345 379 AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA 346 380 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 … … 398 432 </value> 399 433 </data> 400 <metadata name="contextMenuJob.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 401 <value>246, 40</value> 402 </metadata> 403 <metadata name="ilSmallImgJob.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 404 <value>137, 50</value> 405 </metadata> 406 <data name="ilSmallImgJob.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64"> 434 <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 435 <data name="btnRefresh.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> 407 436 <value> 408 AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w 409 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 410 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABq 411 CQAAAk1TRnQBSQFMAgEBAwEAARQBAAEUAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo 412 AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA 413 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 414 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA 415 AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm 416 AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM 417 AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA 418 ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8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WEZz8Adlxq3R9SodWlQ59bg7qgG9SSzR4tGrxZNYytqId3z6XDfr8MDUuu4Dhb6 444 Q7ZwJupHtGLI8hlQwG7xhpo3atwi4wz4F4g1lCGGqoABhWXPlbgxrBa0HqTBqyMPWHFPXk4dRXd4p8yT 445 8j4le1HIgCLjSyWuD6nWhNhC+zHz3Y6lyHcsR35h7qcDg+9PwjdvpFADT8J7ZeEyOVQMOCUAKghgGlSt 446 Cnk2eVwwstbncXiPLCfVzo1xwOV+JaqcqpSQNr8BXxYCGJw5ja7gflj82zEwfQIRLMp43QSQJt7kkAAu 447 EeBaFFAtCdVNSnpHYB+dpmwh6XeiJ8v94WKSMwxolpysKjlAIQBWg0hPVk/4ED4tePB5YUzQl99+fP0d 448 wKOJXULiRYgMUN6vQCURRUidK5dCchZDM+fou5RUgqH3JRSiAzJPuEZYXCMNkhphSNVrSYjKXyhwhQAi 449 pMW7OykEsz9eU6g2xWqEw9Xo3SoAUkGuJQKMdEOEJAI4oa0+AzgnHK5W3w54P5pgf3ssVu2JEBmgjDxg 450 gAhp9hiSPFiOLODjz2H8WJwWnoU+tQhJFxOf6IkMcLFPgYqBFQCrKQqY/+XF9Ld+GSyCJbhnK1Drzlqz 451 pVSSPbHQCs/bFbj0ShmDNI4a4J9rosLTC4k3u7fBFjxMST4I82huWi2lTNIqCoqp2RkH4pBKp07w5Kok 452 8asVYurmqAbb5EYaa9eVBLhMXkg9+RtInVsNkyM24fJjA4db9t2RjagZ5tMUD1e6kFqaI40eNRrcKrFV 453 rwycxJF5nbpg65gG1qCG2oQ2pk667gzKZaXfrK6QBm0+DW5QvlKOzCgkaeifp6HPWm/4rzv0/+dryx8H 454 ysmLkjulowAAAABJRU5ErkJggg== 452 455 </value> 453 456 </data> 454 <metadata name=" updaterWoker.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">455 <value> 388, 41</value>457 <metadata name="contextMenuGroup.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 458 <value>803, 9</value> 456 459 </metadata> 457 460 </root> -
branches/3.2/sources/HeuristicLab.Hive.Server.Console/3.2/ServiceLocator.cs
r2118 r4042 34 34 35 35 serverConsoleFacade = factory.CreateChannel(); 36 ((ICommunicationObject)serverConsoleFacade).Faulted += ServiceLocator_Faulted; 36 37 } 37 38 38 39 return serverConsoleFacade; 40 } 41 42 static void ServiceLocator_Faulted(object sender, EventArgs e) { 43 ((ICommunicationObject)serverConsoleFacade).Abort(); 44 ((ICommunicationObject)serverConsoleFacade).Faulted -= ServiceLocator_Faulted; 45 serverConsoleFacade = null; 39 46 } 40 47 -
branches/3.2/sources/HeuristicLab.Hive.Server.Core/3.2/ClientCommunicator.cs
r3931 r4042 725 725 CachedHivePluginInfoDto currCachedPlugin = new CachedHivePluginInfoDto { 726 726 Name = currPlugin.Name, 727 Version = currPlugin.Version .ToString(),727 Version = currPlugin.Version, 728 728 BuildDate = currPlugin.BuildDate 729 729 }; 730 730 731 731 foreach (string fileName in from file in currPlugin.Files select file.Name) { 732 currCachedPlugin.PluginFiles.Add( File.ReadAllBytes(fileName));732 currCachedPlugin.PluginFiles.Add(new HivePluginFile(File.ReadAllBytes(fileName), fileName)); 733 733 } 734 734 response.Plugins.Add(currCachedPlugin); -
branches/3.2/sources/HeuristicLab.Hive.Server.Core/3.2/ClientFacade.cs
r3931 r4042 100 100 #region IClientFacade Members 101 101 102 [SpringTransaction(UserTransaction = true)] 102 103 public Stream SendStreamedJob(Guid clientId) { 103 104 MultiStream stream = -
branches/3.2/sources/HeuristicLab.Hive.Server.Core/3.2/DefaultScheduler.cs
r3018 r4042 8 8 using System.Threading; 9 9 using HeuristicLab.DataAccess.Interfaces; 10 using System.Transactions; 11 using HeuristicLab.Hive.Contracts; 10 12 11 13 namespace HeuristicLab.Hive.Server.Core { … … 32 34 /// Critical section /// 33 35 jobLock.WaitOne(); 34 35 ClientDto client = DaoLocator.ClientDao.FindById(clientId);36 LinkedList<JobDto> allOfflineJobsForClient =37 new LinkedList<JobDto>(DaoLocator.JobDao.FindFittingJobsForClient(State.offline, client.NrOfFreeCores,38 client.FreeMemory, client.Id));39 40 36 JobDto jobToCalculate = null; 41 if (allOfflineJobsForClient != null && allOfflineJobsForClient.Count > 0) { 42 jobToCalculate = allOfflineJobsForClient.First.Value; 43 jobToCalculate.State = State.calculating; 44 jobToCalculate.Client = client; 45 jobToCalculate.Client.State = State.calculating; 46 jobToCalculate.DateCalculated = DateTime.Now; 47 DaoLocator.JobDao.AssignClientToJob(client.Id, jobToCalculate.Id); 48 DaoLocator.JobDao.Update(jobToCalculate); 49 DaoLocator.ClientDao.Update(jobToCalculate.Client); 37 using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = ApplicationConstants.ISOLATION_LEVEL_SCOPE })) { 38 ClientDto client = DaoLocator.ClientDao.FindById(clientId); 39 LinkedList<JobDto> allOfflineJobsForClient = 40 new LinkedList<JobDto>(DaoLocator.JobDao.FindFittingJobsForClient(State.offline, client.NrOfFreeCores, 41 client.FreeMemory, client.Id)); 42 if (allOfflineJobsForClient != null && allOfflineJobsForClient.Count > 0) { 43 jobToCalculate = allOfflineJobsForClient.First.Value; 44 jobToCalculate.State = State.calculating; 45 jobToCalculate.Client = client; 46 jobToCalculate.Client.State = State.calculating; 47 jobToCalculate.DateCalculated = DateTime.Now; 48 DaoLocator.JobDao.AssignClientToJob(client.Id, jobToCalculate.Id); 49 DaoLocator.JobDao.Update(jobToCalculate); 50 DaoLocator.ClientDao.Update(jobToCalculate.Client); 51 } 52 scope.Complete(); 50 53 } 51 54 jobLock.ReleaseMutex(); -
branches/3.2/sources/HeuristicLab.Hive.Server.Core/3.2/ExecutionEngineFacade.cs
r3220 r4042 53 53 54 54 public ResponseObject<SerializedJob> 55 GetLastSerializedResult(Guid jobId, bool requested ) {56 return jobManager.GetLastSerializedJobResultOf(jobId, requested );55 GetLastSerializedResult(Guid jobId, bool requested, bool snapshot) { 56 return jobManager.GetLastSerializedJobResultOf(jobId, requested, snapshot); 57 57 } 58 58 -
branches/3.2/sources/HeuristicLab.Hive.Server.Core/3.2/HeuristicLab.Hive.Server.Core-3.2.csproj
r3011 r4042 120 120 </Compile> 121 121 <Compile Include="Settings.cs" /> 122 <Compile Include="SpringTransaction.cs" /> 122 123 </ItemGroup> 123 124 <ItemGroup> -
branches/3.2/sources/HeuristicLab.Hive.Server.Core/3.2/JobManager.cs
r3931 r4042 105 105 ResponseList<JobDto> response = new ResponseList<JobDto>(); 106 106 response.List = new List<JobDto>(DaoLocator.JobDao.FindWithLimitations(jobState, offset, count)); 107 response.Success = true; 107 108 return response; 108 109 } … … 237 238 } 238 239 240 //Requested means: there MUST be a job result which gets sent back 239 241 public ResponseObject<SerializedJob> 240 GetLastSerializedJobResultOf(Guid jobId, bool requested ) {242 GetLastSerializedJobResultOf(Guid jobId, bool requested, bool snapshot) { 241 243 ResponseObject<SerializedJob> response = 242 244 new ResponseObject<SerializedJob>(); 243 245 244 246 JobDto job = DaoLocator.JobDao.FindById(jobId); 245 if (requested && (job.State == State.requestSnapshot || job.State == State.requestSnapshotSent)) { 247 248 //if it's a snapshot but the result hasn't reached the server yet... 249 if (snapshot && (job.State == State.requestSnapshot || job.State == State.requestSnapshotSent)) { 246 250 response.Success = true; 247 251 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_RESULT_NOT_YET_HERE; … … 250 254 } 251 255 256 //if it's NOT a snapshot, NEITHER request NOR is it finished 257 if(!requested && !snapshot && job.State != State.finished) { 258 response.Success = true; 259 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_RESULT_NOT_YET_HERE; 260 261 return response; 262 } 263 264 //every other case - snapshot, job finished or it's requested 252 265 response.Success = true; 253 266 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_JOB_RESULT_SENT; 254 267 response.Obj = new SerializedJob(); 255 268 response.Obj.JobInfo = job; 269 256 270 response.Obj.SerializedJobData = 257 271 DaoLocator.JobDao.GetBinaryJobFile(jobId); 272 258 273 return response; 259 274 } -
branches/3.2/sources/HeuristicLab.Hive.Server.Core/3.2/ServerConsoleFacade.cs
r3578 r4042 122 122 } 123 123 124 public ResponseObject<SerializedJob> GetLastSerializedJobResultOf(Guid jobId, bool requested ) {124 public ResponseObject<SerializedJob> GetLastSerializedJobResultOf(Guid jobId, bool requested, bool snapshot) { 125 125 secMan.Authorize("AccessJobResults", sessionID, jobId); 126 return jobManager.GetLastSerializedJobResultOf(jobId, requested );126 return jobManager.GetLastSerializedJobResultOf(jobId, requested, snapshot); 127 127 } 128 128 -
branches/3.2/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/BaseDao.cs
r3931 r4042 19 19 Context.SubmitChanges(ConflictMode.ContinueOnConflict); 20 20 } catch (ChangeConflictException e) { 21 21 22 Logger.Warn("Concurrency Exception! " + e.Message); 22 23 foreach (ObjectChangeConflict conflict in Context.ChangeConflicts) { … … 30 31 conflict.Resolve(RefreshMode.KeepChanges); 31 32 } 32 Context.SubmitChanges(ConflictMode.FailOnFirstConflict); 33 //next round! 34 CommitChanges(); 35 //Context.SubmitChanges(ConflictMode.FailOnFirstConflict); 33 36 } 34 37 } -
branches/3.2/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/PluginInfoDao.cs
r3578 r4042 43 43 44 44 public void InsertPluginDependenciesForJob(JobDto jobDto) { 45 foreach (HivePluginInfoDto info in jobDto.PluginsNeeded) { 45 foreach (HivePluginInfoDto info in jobDto.PluginsNeeded) { 46 46 PluginInfo dbpi = 47 Context.PluginInfos.Where(pi => pi.Name.Equals(info.Name) && pi.Version == info.Version ).SingleOrDefault();47 Context.PluginInfos.Where(pi => pi.Name.Equals(info.Name) && pi.Version == info.Version.ToString()).SingleOrDefault(); 48 48 if (dbpi == null) { 49 49 dbpi = new PluginInfo { 50 50 BuildDate = info.BuildDate.ToString(), 51 51 Name = info.Name, 52 Version = info.Version 52 Version = info.Version.ToString() 53 53 }; 54 54 Context.PluginInfos.InsertOnSubmit(dbpi); … … 82 82 target.Name = source.Name; 83 83 target.PluginId = source.Id; 84 target.Version = source.Version ;84 target.Version = source.Version.ToString(); 85 85 86 86 return target; … … 96 96 target.Name = source.Name; 97 97 target.Id = source.PluginId; 98 target.Version = source.Version;98 target.Version = new Version(source.Version); 99 99 100 100 return target; -
branches/3.2/sources/HeuristicLab.Hive.Server/3.2/MainForm.Designer.cs
r2067 r4042 37 37 this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); 38 38 this.tsExit = new System.Windows.Forms.ToolStripMenuItem(); 39 this.btnClose = new System.Windows.Forms.Button();40 39 this.ctxNotifyMenu.SuspendLayout(); 41 40 this.SuspendLayout(); … … 72 71 this.tsExit}); 73 72 this.ctxNotifyMenu.Name = "ctxNotifyMenu"; 74 this.ctxNotifyMenu.Size = new System.Drawing.Size( 106, 54);73 this.ctxNotifyMenu.Size = new System.Drawing.Size(96, 54); 75 74 // 76 75 // tsShowInfo 77 76 // 78 77 this.tsShowInfo.Name = "tsShowInfo"; 79 this.tsShowInfo.Size = new System.Drawing.Size( 105, 22);78 this.tsShowInfo.Size = new System.Drawing.Size(95, 22); 80 79 this.tsShowInfo.Text = "&Info"; 81 80 this.tsShowInfo.Click += new System.EventHandler(this.ShowInfo); … … 84 83 // 85 84 this.toolStripSeparator1.Name = "toolStripSeparator1"; 86 this.toolStripSeparator1.Size = new System.Drawing.Size( 102, 6);85 this.toolStripSeparator1.Size = new System.Drawing.Size(92, 6); 87 86 // 88 87 // tsExit 89 88 // 90 89 this.tsExit.Name = "tsExit"; 91 this.tsExit.Size = new System.Drawing.Size( 105, 22);90 this.tsExit.Size = new System.Drawing.Size(95, 22); 92 91 this.tsExit.Text = "E&xit"; 93 92 this.tsExit.Click += new System.EventHandler(this.CloseApp); 94 93 // 95 // btnClose96 //97 this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;98 this.btnClose.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));99 this.btnClose.Location = new System.Drawing.Point(279, 1);100 this.btnClose.Name = "btnClose";101 this.btnClose.Size = new System.Drawing.Size(22, 21);102 this.btnClose.TabIndex = 2;103 this.btnClose.Text = "X";104 this.btnClose.UseVisualStyleBackColor = true;105 this.btnClose.Click += new System.EventHandler(this.btnClose_Click);106 //107 94 // MainForm 108 95 // 109 this.AcceptButton = this.btnClose;110 96 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 111 97 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 112 this.CancelButton = this.btnClose;113 98 this.ClientSize = new System.Drawing.Size(304, 166); 114 this.ControlBox = false;115 this.Controls.Add(this.btnClose);116 99 this.Controls.Add(this.rtfServices); 117 100 this.Controls.Add(this.label1); 118 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed ToolWindow;101 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 119 102 this.Name = "MainForm"; 120 this.ShowInTaskbar = false;121 103 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 122 104 this.Text = "Hive Server"; 123 this. TopMost = true;105 this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); 124 106 this.ctxNotifyMenu.ResumeLayout(false); 125 107 this.ResumeLayout(false); … … 137 119 private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; 138 120 private System.Windows.Forms.ToolStripMenuItem tsExit; 139 private System.Windows.Forms.Button btnClose;140 121 } 141 122 } -
branches/3.2/sources/HeuristicLab.Hive.Server/3.2/MainForm.cs
r2065 r4042 50 50 } 51 51 52 private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { 53 } 54 52 55 } 53 56 } -
branches/3.2/sources/HeuristicLab.Hive.Server/3.2/ServiceCallInterception.cs
r3931 r4042 9 9 using HeuristicLab.Hive.Contracts; 10 10 using HeuristicLab.Tracing; 11 using System.Reflection; 12 using HeuristicLab.Hive.Server.Core; 11 13 12 14 namespace HeuristicLab.Hive.Server { 13 15 internal class ServiceCallInterception : IMethodInterceptor { 14 15 16 private const bool UseTransactions = true; 16 17 17 18 public object Invoke(IMethodInvocation invocation) { 19 bool userTransaction = false; 20 18 21 DateTime start = DateTime.Now; 19 22 Logger.Info("Entering Method: " + invocation.Method.Name); 20 23 21 if (!ContextFactory.IsContextNull()) {24 if (!ContextFactory.IsContextNull()) { 22 25 Logger.Info("Not null context found - why wasn't this disposed?"); 23 26 try { 24 27 Logger.Info("Trying to dispose"); 25 28 ContextFactory.Context.Dispose(); 26 } catch (Exception e) { 29 } 30 catch (Exception e) { 27 31 Logger.Error(e); 28 32 } … … 30 34 } 31 35 Logger.Info("Context info: Timeout: " + ContextFactory.Context.Connection.ConnectionTimeout + " | " + 32 ContextFactory.Context.Connection.State + " | Conn: " + ContextFactory.Context + " | HashCode is: " + ContextFactory.Context.Connection.GetHashCode()); 36 ContextFactory.Context.Connection.State + " | Conn: " + ContextFactory.Context + " | HashCode is: " + 37 ContextFactory.Context.Connection.GetHashCode()); 33 38 Object obj = null; 34 39 35 /*if (invocation.Method.Name.Equals("SendStreamedJob") || invocation.Method.Name.Equals("StoreFinishedJobResultStreamed")) { 36 ContextFactory.Context.Connection.Open(); 37 if(UseTransactions) { 38 Logger.Debug("Opening Transaction"); 39 ContextFactory.Context.Transaction = ContextFactory.Context.Connection.BeginTransaction(ApplicationConstants.ISOLATION_LEVEL); 40 } else { 41 Logger.Debug("Not using a Transaction"); 42 } 43 try { 44 obj = invocation.Proceed(); 45 Logger.Info("leaving context open for streaming"); 46 } 47 catch (Exception e) { 48 Logger.Error("Exception occured during method invocation", e); 49 ContextFactory.Context.Dispose(); 50 ContextFactory.Context = null; 51 } 52 } else { */ 53 if(UseTransactions) { 54 using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = ApplicationConstants.ISOLATION_LEVEL_SCOPE })) { 55 try { 56 Logger.Debug("Current Transaction Isolation level is: " + Transaction.Current.IsolationLevel); 57 obj = invocation.Proceed(); 58 scope.Complete(); 59 } 60 catch (Exception e) { 61 Logger.Error("Exception occured during method invocation", e); 62 Logger.Error("Inner Exception: ", e.InnerException); 63 } 64 finally { 65 ContextFactory.Context.Dispose(); 66 Logger.Debug("Disposed Context"); 67 ContextFactory.Context = null; 68 Logger.Debug("Set Context Null"); 69 } 70 } 71 } else { 40 Object[] attributes = invocation.Method.GetCustomAttributes(typeof (SpringTransaction), true); 41 foreach (Object o in attributes) { 42 SpringTransaction st = (SpringTransaction) o; 43 userTransaction = st.UserTransaction; 44 } 45 if (UseTransactions && !userTransaction) { 46 using ( 47 TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, 48 new TransactionOptions 49 {IsolationLevel = ApplicationConstants.ISOLATION_LEVEL_SCOPE})) { 72 50 try { 73 obj = invocation.Proceed(); 51 Logger.Debug("Current Transaction Isolation level is: " + Transaction.Current.IsolationLevel); 52 obj = invocation.Proceed(); 53 scope.Complete(); 74 54 } 75 55 catch (Exception e) { 76 Logger.Error("Exception occured during method invocation", e); 56 Logger.Error("Exception occured during method invocation", e); 57 Logger.Error("Inner Exception: ", e.InnerException); 77 58 } 78 59 finally { … … 81 62 ContextFactory.Context = null; 82 63 Logger.Debug("Set Context Null"); 83 } 64 } 84 65 } 66 } 67 else { 68 try { 69 obj = invocation.Proceed(); 70 } 71 catch (Exception e) { 72 Logger.Error("Exception occured during method invocation", e); 73 } 74 finally { 75 ContextFactory.Context.Dispose(); 76 Logger.Debug("Disposed Context"); 77 ContextFactory.Context = null; 78 Logger.Debug("Set Context Null"); 79 } 80 } 85 81 //} 86 82 TimeSpan ts = DateTime.Now - start; 87 83 if (ts.Seconds > 2) { 88 84 Logger.Warn("Invocation took: " + ts); 89 } else if (ts.Seconds > 10) { 85 } 86 else if (ts.Seconds > 10) { 90 87 Logger.Error("Invocation took: " + ts); 91 } else { 92 Logger.Info("Invocation took: " + ts); ; 88 } 89 else { 90 Logger.Info("Invocation took: " + ts); 91 ; 93 92 } 94 93 Logger.Info("Leaving Method: " + invocation.Method.Name); 95 94 96 95 return obj; 97 96 } 98 97 } 99 98 } 100 101 -
branches/3.2/sources/HeuristicLab.PluginInfrastructure/Sandboxing/SandboxManager.cs
r3578 r4042 65 65 66 66 #region permission set for sandbox 67 // 68 //pset = new PermissionSet(PermissionState.None);69 //pset.AddPermission(new SecurityPermission(SecurityPermissionFlag.Execution));70 //pset.AddPermission(new ReflectionPermission(ReflectionPermissionFlag.MemberAccess));71 //FileIOPermission fPerm = new FileIOPermission(PermissionState.None);67 //Uncomment code for sandboxed appdomain 68 pset = new PermissionSet(PermissionState.None); 69 pset.AddPermission(new SecurityPermission(SecurityPermissionFlag.Execution)); 70 pset.AddPermission(new ReflectionPermission(ReflectionPermissionFlag.AllFlags)); 71 FileIOPermission fPerm = new FileIOPermission(PermissionState.None); 72 72 73 //foreach (IPluginDescription plugin in ApplicationManager.Manager.Plugins) { 74 // fPerm.AddPathList(FileIOPermissionAccess.Read | FileIOPermissionAccess.PathDiscovery, plugin.Files.ToArray()); 75 //} 73 foreach (IPluginDescription plugin in ApplicationManager.Manager.Plugins) { 74 foreach (IPluginFile pluginFile in plugin.Files) { 75 fPerm.AddPathList(FileIOPermissionAccess.Read | FileIOPermissionAccess.PathDiscovery, pluginFile.Name); 76 //fPerm.AddPathList(FileIOPermissionAccess.AllAccess, pluginFile.Name); 77 } 78 } 76 79 77 //pset.AddPermission(fPerm);80 pset.AddPermission(fPerm); 78 81 #endregion 79 82 80 83 #region permission set of unrestricted appdomain 81 84 // unrestricted appdomain 82 pset = new PermissionSet(PermissionState.Unrestricted);85 //pset = new PermissionSet(PermissionState.Unrestricted); 83 86 #endregion 84 87 … … 86 89 //setup.PrivateBinPath = pluginDir; 87 90 setup.ApplicationBase = AppDomain.CurrentDomain.SetupInformation.ApplicationBase; 88 AppDomain applicationDomain = AppDomain.CreateDomain(name, AppDomain.CurrentDomain.Evidence, setup, pset, CreateStrongName(Assembly.GetExecutingAssembly())); 91 AppDomain applicationDomain = AppDomain.CreateDomain(name, AppDomain.CurrentDomain.Evidence, setup, pset, new StrongName[] {CreateStrongName(Assembly.GetExecutingAssembly())}); 92 89 93 Type applicationManagerType = typeof(DefaultApplicationManager); 90 94 DefaultApplicationManager applicationManager = … … 93 97 PluginDescription[] plugins = ApplicationManager.Manager.Plugins.Cast<PluginDescription>().ToArray(); 94 98 applicationManager.PrepareApplicationDomain(apps, plugins); 95 //if (files != null && files.Count() > 0)96 //applicationManager.LoadAssemblies(files);99 if (files != null && files.Count() > 0) 100 applicationManager.LoadAssemblies(files); 97 101 return applicationDomain; 98 102 }
Note: See TracChangeset
for help on using the changeset viewer.