Changeset 5789
- Timestamp:
- 03/22/11 14:11:11 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.SlaveWindowsServiceSetup/HeuristicLab.Clients.Hive.Slave.SlaveWindowsServiceSetup.vdproj
r5780 r5789 2827 2827 "Folders" 2828 2828 { 2829 "{9EF0B969-E518-4E46-987F-47570745A589}:_1CAB3452A07143398B4B614C5E7BFBF1" 2830 { 2831 "Name" = "8:Startup" 2832 "AlwaysCreate" = "11:FALSE" 2833 "Condition" = "8:" 2834 "Transitive" = "11:FALSE" 2835 "Property" = "8:_44D8CB6B7BF4473FB08F71EF2CABE42F" 2836 "Folders" 2837 { 2838 } 2839 } 2829 2840 "{9EF0B969-E518-4E46-987F-47570745A589}:_EB172448DA454A1EACE198BCA7BC8A03" 2830 2841 { … … 2857 2868 "ProductName" = "8:HeuristicLab Hive Slave" 2858 2869 "ProductCode" = "8:{83D128A1-4766-4B19-A449-15B0A1969B99}" 2859 "PackageCode" = "8:{ E16E0DDF-7849-45C1-8379-6F7070E7248C}"2870 "PackageCode" = "8:{C4FAB079-1A52-4750-8B10-308DD1D8A0EE}" 2860 2871 "UpgradeCode" = "8:{F27A07F7-B96C-4375-B9C2-6623E5C2B03E}" 2861 2872 "AspNetVersion" = "8:4.0.30319.0" … … 2987 2998 "Target" = "8:_E425C85EBBC047D2944046574F2FB159" 2988 2999 "Folder" = "8:_EB172448DA454A1EACE198BCA7BC8A03" 3000 "WorkingFolder" = "8:_8564EC48868C45BDB6F26256DBC6B288" 3001 "Icon" = "8:_98295B7BD0CC41ED881E9A9207EF6DB4" 3002 "Feature" = "8:" 3003 } 3004 "{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_3B4D8FB05FCC4E9A908C03F543D4D3B2" 3005 { 3006 "Name" = "8:HeuristicLab Hive Slave" 3007 "Arguments" = "8:" 3008 "Description" = "8:" 3009 "ShowCmd" = "3:1" 3010 "IconIndex" = "3:0" 3011 "Transitive" = "11:FALSE" 3012 "Target" = "8:_E425C85EBBC047D2944046574F2FB159" 3013 "Folder" = "8:_1CAB3452A07143398B4B614C5E7BFBF1" 2989 3014 "WorkingFolder" = "8:_8564EC48868C45BDB6F26256DBC6B288" 2990 3015 "Icon" = "8:_98295B7BD0CC41ED881E9A9207EF6DB4" -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/HeuristicLab.Clients.Hive.Slave.Views-3.4.csproj
r5602 r5789 119 119 <Reference Include="System.ServiceProcess" /> 120 120 <Reference Include="System.Windows.Forms" /> 121 <Reference Include="System.Windows.Forms.DataVisualization" /> 121 122 <Reference Include="System.Xml.Linq" /> 122 123 <Reference Include="System.Data.DataSetExtensions" /> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/SlaveView.Designer.cs
r5602 r5789 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.label1 = new System.Windows.Forms.Label(); 47 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 48 System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); 49 System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); 48 50 this.txtLog = new System.Windows.Forms.TextBox(); 49 51 this.btnPauseAll = new System.Windows.Forms.Button(); … … 52 54 this.btnSleep = new System.Windows.Forms.Button(); 53 55 this.btnAbout = new System.Windows.Forms.Button(); 56 this.jobChart = new System.Windows.Forms.DataVisualization.Charting.Chart(); 57 ((System.ComponentModel.ISupportInitialize)(this.jobChart)).BeginInit(); 54 58 this.SuspendLayout(); 55 //56 // label157 //58 this.label1.AutoSize = true;59 this.label1.Location = new System.Drawing.Point(17, 24);60 this.label1.Name = "label1";61 this.label1.Size = new System.Drawing.Size(85, 13);62 this.label1.TabIndex = 0;63 this.label1.Text = "Hive Slave View";64 59 // 65 60 // txtLog 66 61 // 67 62 this.txtLog.BackColor = System.Drawing.Color.White; 68 this.txtLog.Location = new System.Drawing.Point( 20, 172);63 this.txtLog.Location = new System.Drawing.Point(3, 150); 69 64 this.txtLog.Multiline = true; 70 65 this.txtLog.Name = "txtLog"; 71 66 this.txtLog.ReadOnly = true; 72 67 this.txtLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 73 this.txtLog.Size = new System.Drawing.Size(5 46, 244);68 this.txtLog.Size = new System.Drawing.Size(584, 273); 74 69 this.txtLog.TabIndex = 1; 75 70 // 76 71 // btnPauseAll 77 72 // 78 this.btnPauseAll.Location = new System.Drawing.Point(4 55, 24);73 this.btnPauseAll.Location = new System.Drawing.Point(476, 3); 79 74 this.btnPauseAll.Name = "btnPauseAll"; 80 this.btnPauseAll.Size = new System.Drawing.Size(111, 2 3);75 this.btnPauseAll.Size = new System.Drawing.Size(111, 28); 81 76 this.btnPauseAll.TabIndex = 2; 82 77 this.btnPauseAll.Text = "Pause all jobs"; … … 86 81 // btnStopAll 87 82 // 88 this.btnStopAll.Location = new System.Drawing.Point(4 55, 53);83 this.btnStopAll.Location = new System.Drawing.Point(476, 32); 89 84 this.btnStopAll.Name = "btnStopAll"; 90 this.btnStopAll.Size = new System.Drawing.Size(111, 2 3);85 this.btnStopAll.Size = new System.Drawing.Size(111, 28); 91 86 this.btnStopAll.TabIndex = 3; 92 87 this.btnStopAll.Text = "Stop all jobs"; … … 96 91 // btnRestart 97 92 // 98 this.btnRestart.Location = new System.Drawing.Point(4 55, 111);93 this.btnRestart.Location = new System.Drawing.Point(476, 90); 99 94 this.btnRestart.Name = "btnRestart"; 100 this.btnRestart.Size = new System.Drawing.Size(111, 2 3);95 this.btnRestart.Size = new System.Drawing.Size(111, 28); 101 96 this.btnRestart.TabIndex = 4; 102 97 this.btnRestart.Text = "Restart Core"; … … 106 101 // btnSleep 107 102 // 108 this.btnSleep.Location = new System.Drawing.Point(4 55, 82);103 this.btnSleep.Location = new System.Drawing.Point(476, 61); 109 104 this.btnSleep.Name = "btnSleep"; 110 this.btnSleep.Size = new System.Drawing.Size(111, 2 3);105 this.btnSleep.Size = new System.Drawing.Size(111, 28); 111 106 this.btnSleep.TabIndex = 5; 112 107 this.btnSleep.Text = "Send slave to sleep"; … … 116 111 // btnAbout 117 112 // 118 this.btnAbout.Location = new System.Drawing.Point(4 55, 140);113 this.btnAbout.Location = new System.Drawing.Point(476, 119); 119 114 this.btnAbout.Name = "btnAbout"; 120 this.btnAbout.Size = new System.Drawing.Size(111, 2 3);115 this.btnAbout.Size = new System.Drawing.Size(111, 28); 121 116 this.btnAbout.TabIndex = 6; 122 117 this.btnAbout.Text = "About Hive"; … … 124 119 this.btnAbout.Click += new System.EventHandler(this.btnAbout_Click); 125 120 // 121 // jobChart 122 // 123 chartArea1.Name = "ChartArea1"; 124 this.jobChart.ChartAreas.Add(chartArea1); 125 legend1.Name = "Legend1"; 126 this.jobChart.Legends.Add(legend1); 127 this.jobChart.Location = new System.Drawing.Point(3, 3); 128 this.jobChart.Name = "jobChart"; 129 series1.ChartArea = "ChartArea1"; 130 series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Doughnut; 131 series1.Legend = "Legend1"; 132 series1.Name = "Series1"; 133 this.jobChart.Series.Add(series1); 134 this.jobChart.Size = new System.Drawing.Size(272, 138); 135 this.jobChart.TabIndex = 7; 136 // 126 137 // SlaveView 127 138 // 128 139 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 129 140 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 141 this.Controls.Add(this.jobChart); 130 142 this.Controls.Add(this.btnAbout); 131 143 this.Controls.Add(this.btnSleep); … … 134 146 this.Controls.Add(this.btnPauseAll); 135 147 this.Controls.Add(this.txtLog); 136 this.Controls.Add(this.label1);137 148 this.Name = "SlaveView"; 138 this.Size = new System.Drawing.Size(590, 435); 149 this.Size = new System.Drawing.Size(590, 426); 150 ((System.ComponentModel.ISupportInitialize)(this.jobChart)).EndInit(); 139 151 this.ResumeLayout(false); 140 152 this.PerformLayout(); … … 144 156 #endregion 145 157 146 private System.Windows.Forms.Label label1;147 158 private System.Windows.Forms.TextBox txtLog; 148 159 private System.Windows.Forms.Button btnPauseAll; … … 151 162 private System.Windows.Forms.Button btnSleep; 152 163 private System.Windows.Forms.Button btnAbout; 164 private System.Windows.Forms.DataVisualization.Charting.Chart jobChart; 153 165 } 154 166 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/SlaveView.cs
r5602 r5789 21 21 22 22 using System.Windows.Forms; 23 using System.Windows.Forms.DataVisualization.Charting; 23 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core.Views; … … 83 84 void Content_SlaveStatusChanged(object sender, EventArgs<StatusCommons> e) { 84 85 txtLog.AppendText("got a status changed object from slave\n"); 86 RenderChart(e.Value); 85 87 } 86 88 … … 93 95 } 94 96 #endregion 97 98 private void RenderChart(StatusCommons status) { 99 100 DataPoint pJobs = new DataPoint(status.Jobs.Count, status.Jobs.Count); 101 DataPoint pJobsAborted = new DataPoint(status.JobsAborted, status.JobsAborted); 102 DataPoint pJobsDone = new DataPoint(status.JobsDone, status.JobsDone); 103 DataPoint pJobsFetched = new DataPoint(status.JobsFetched, status.JobsFetched); 104 105 jobChart.Series[0].Points.Add(pJobs); 106 jobChart.Series[0].Points.Add(pJobsAborted); 107 jobChart.Series[0].Points.Add(pJobsDone); 108 jobChart.Series[0].Points.Add(pJobsFetched); 109 } 95 110 96 111 private void btnSoftPause_Click(object sender, System.EventArgs e) { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/ConfigManager.cs
r5711 r5789 29 29 namespace HeuristicLab.Clients.Hive.SlaveCore { 30 30 /// <summary> 31 /// accesses the Server and sends his data (uuid, uptimes, hardware config)31 /// accesses the server and sends his data (uuid, uptimes, hardware config) 32 32 /// </summary> 33 33 public class ConfigManager { … … 65 65 /// <returns>the ClientInfo object</returns> 66 66 public Slave GetClientInfo() { 67 //TODO: how to display connectedsince in gui?68 //hardwareInfo.Login = WcfService.Instance.ConnectedSince;69 67 return slave; 70 68 } … … 75 73 /// <returns></returns> 76 74 public StatusCommons GetStatusForClientConsole() { 77 //Todo: Locking78 75 StatusCommons st = new StatusCommons(); 79 76 st.ClientGuid = slave.Id; … … 143 140 144 141 /// <summary> 145 /// MegaBytes142 /// returns total physical memory of the machine in MB 146 143 /// </summary> 147 144 private static int? GetPhysicalMemory() { … … 154 151 155 152 /// <summary> 156 /// Mhz153 /// returns CPU frequence of the machine in Mhz 157 154 /// </summary> 158 155 private static int? GetCpuSpeed() { … … 189 186 } 190 187 191 Guid guid = new Guid(0, 0, 0, b); 188 // also get machine name and save it to the first 4 bytes 189 Guid guid = new Guid(Environment.MachineName.GetHashCode(), 0, 0, b); 192 190 return guid; 193 191 } else … … 239 237 } 240 238 239 /// <summary> 240 /// returns free memory of machine in MB 241 /// </summary> 241 242 public static int GetFreeMemory() { 242 243 int mb = 0; -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs
r5786 r5789 438 438 private void StartJobInAppDomain(Job myJob, JobData jobData) { 439 439 clientCom.LogMessage("Received new job with id " + myJob.Id); 440 if (engines.ContainsKey(myJob.Id)) 441 throw new Exception("Job with key " + myJob.Id + " already exists"); 442 440 443 String pluginDir = Path.Combine(PluginCache.Instance.PluginTempBaseDir, myJob.Id.ToString()); 441 444 bool pluginsPrepared = false; -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Executor.cs
r5782 r5789 82 82 catch (Exception e) { 83 83 this.currentException = e; 84 Job_JobFailed(this, new HeuristicLab.Common.EventArgs<Exception>(e)); 84 85 } 85 86 }
Note: See TracChangeset
for help on using the changeset viewer.