Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/09/11 01:47:51 (13 years ago)
Author:
ascheibe
Message:

#1233 server can now control the slave heartbeat interval

Location:
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs

    r6864 r6893  
    239239          SlaveGroup slaveGroup = (SlaveGroup)res;
    240240          slaveGroup.Store();
    241         }
    242         if (res.Id != Guid.Empty && res.Modified) {
     241        } else if (res.Id != Guid.Empty && res.Modified) {
    243242          res.Store();
    244243        }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/SlaveView.Designer.cs

    r6823 r6893  
    6363      this.txtId = new System.Windows.Forms.TextBox();
    6464      this.label2 = new System.Windows.Forms.Label();
     65      this.label3 = new System.Windows.Forms.Label();
     66      this.txtHbIntervall = new System.Windows.Forms.TextBox();
    6567      this.SuspendLayout();
    6668      //
     
    7072                  | System.Windows.Forms.AnchorStyles.Right)));
    7173      this.txtSlaveState.Enabled = false;
    72       this.txtSlaveState.Location = new System.Drawing.Point(102, 190);
     74      this.txtSlaveState.Location = new System.Drawing.Point(146, 216);
    7375      this.txtSlaveState.Name = "txtSlaveState";
    74       this.txtSlaveState.Size = new System.Drawing.Size(267, 20);
     76      this.txtSlaveState.Size = new System.Drawing.Size(390, 20);
    7577      this.txtSlaveState.TabIndex = 27;
    7678      //
     
    8082                  | System.Windows.Forms.AnchorStyles.Right)));
    8183      this.txtOS.Enabled = false;
    82       this.txtOS.Location = new System.Drawing.Point(102, 164);
     84      this.txtOS.Location = new System.Drawing.Point(146, 190);
    8385      this.txtOS.Name = "txtOS";
    84       this.txtOS.Size = new System.Drawing.Size(267, 20);
     86      this.txtOS.Size = new System.Drawing.Size(390, 20);
    8587      this.txtOS.TabIndex = 26;
    8688      //
     
    8890      //
    8991      this.label15.AutoSize = true;
    90       this.label15.Location = new System.Drawing.Point(3, 193);
     92      this.label15.Location = new System.Drawing.Point(3, 219);
    9193      this.label15.Name = "label15";
    9294      this.label15.Size = new System.Drawing.Size(35, 13);
     
    9799      //
    98100      this.label14.AutoSize = true;
    99       this.label14.Location = new System.Drawing.Point(3, 167);
     101      this.label14.Location = new System.Drawing.Point(3, 193);
    100102      this.label14.Name = "label14";
    101103      this.label14.Size = new System.Drawing.Size(93, 13);
     
    108110                  | System.Windows.Forms.AnchorStyles.Right)));
    109111      this.txtDetailsDescription.Enabled = false;
    110       this.txtDetailsDescription.Location = new System.Drawing.Point(102, 60);
     112      this.txtDetailsDescription.Location = new System.Drawing.Point(146, 86);
    111113      this.txtDetailsDescription.Name = "txtDetailsDescription";
    112       this.txtDetailsDescription.Size = new System.Drawing.Size(267, 20);
     114      this.txtDetailsDescription.Size = new System.Drawing.Size(390, 20);
    113115      this.txtDetailsDescription.TabIndex = 23;
    114116      //
     
    116118      //
    117119      this.label13.AutoSize = true;
    118       this.label13.Location = new System.Drawing.Point(3, 63);
     120      this.label13.Location = new System.Drawing.Point(3, 89);
    119121      this.label13.Name = "label13";
    120122      this.label13.Size = new System.Drawing.Size(63, 13);
     
    126128      this.txtName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    127129                  | System.Windows.Forms.AnchorStyles.Right)));
    128       this.txtName.Location = new System.Drawing.Point(102, 8);
     130      this.txtName.Location = new System.Drawing.Point(146, 8);
    129131      this.txtName.Name = "txtName";
    130       this.txtName.Size = new System.Drawing.Size(267, 20);
     132      this.txtName.Size = new System.Drawing.Size(390, 20);
    131133      this.txtName.TabIndex = 21;
    132134      this.txtName.TextChanged += new System.EventHandler(this.txtName_TextChanged);
     
    137139                  | System.Windows.Forms.AnchorStyles.Right)));
    138140      this.txtCPU.Enabled = false;
    139       this.txtCPU.Location = new System.Drawing.Point(102, 86);
     141      this.txtCPU.Location = new System.Drawing.Point(146, 112);
    140142      this.txtCPU.Name = "txtCPU";
    141       this.txtCPU.Size = new System.Drawing.Size(267, 20);
     143      this.txtCPU.Size = new System.Drawing.Size(390, 20);
    142144      this.txtCPU.TabIndex = 20;
    143145      //
     
    147149                  | System.Windows.Forms.AnchorStyles.Right)));
    148150      this.txtMemory.Enabled = false;
    149       this.txtMemory.Location = new System.Drawing.Point(102, 112);
     151      this.txtMemory.Location = new System.Drawing.Point(146, 138);
    150152      this.txtMemory.Name = "txtMemory";
    151       this.txtMemory.Size = new System.Drawing.Size(267, 20);
     153      this.txtMemory.Size = new System.Drawing.Size(390, 20);
    152154      this.txtMemory.TabIndex = 19;
    153155      //
     
    157159                  | System.Windows.Forms.AnchorStyles.Right)));
    158160      this.txtLastHeartbeat.Enabled = false;
    159       this.txtLastHeartbeat.Location = new System.Drawing.Point(102, 216);
     161      this.txtLastHeartbeat.Location = new System.Drawing.Point(146, 242);
    160162      this.txtLastHeartbeat.Name = "txtLastHeartbeat";
    161       this.txtLastHeartbeat.Size = new System.Drawing.Size(267, 20);
     163      this.txtLastHeartbeat.Size = new System.Drawing.Size(390, 20);
    162164      this.txtLastHeartbeat.TabIndex = 18;
    163165      //
     
    165167      //
    166168      this.label12.AutoSize = true;
    167       this.label12.Location = new System.Drawing.Point(3, 219);
     169      this.label12.Location = new System.Drawing.Point(3, 245);
    168170      this.label12.Name = "label12";
    169171      this.label12.Size = new System.Drawing.Size(80, 13);
     
    174176      //
    175177      this.label11.AutoSize = true;
    176       this.label11.Location = new System.Drawing.Point(3, 115);
     178      this.label11.Location = new System.Drawing.Point(3, 141);
    177179      this.label11.Name = "label11";
    178180      this.label11.Size = new System.Drawing.Size(47, 13);
     
    183185      //
    184186      this.label10.AutoSize = true;
    185       this.label10.Location = new System.Drawing.Point(3, 89);
     187      this.label10.Location = new System.Drawing.Point(3, 115);
    186188      this.label10.Name = "label10";
    187189      this.label10.Size = new System.Drawing.Size(32, 13);
     
    201203      //
    202204      this.label1.AutoSize = true;
    203       this.label1.Location = new System.Drawing.Point(3, 141);
     205      this.label1.Location = new System.Drawing.Point(3, 167);
    204206      this.label1.Name = "label1";
    205207      this.label1.Size = new System.Drawing.Size(70, 13);
     
    212214                  | System.Windows.Forms.AnchorStyles.Right)));
    213215      this.txtFreeMemory.Enabled = false;
    214       this.txtFreeMemory.Location = new System.Drawing.Point(102, 138);
     216      this.txtFreeMemory.Location = new System.Drawing.Point(146, 164);
    215217      this.txtFreeMemory.Name = "txtFreeMemory";
    216       this.txtFreeMemory.Size = new System.Drawing.Size(267, 20);
     218      this.txtFreeMemory.Size = new System.Drawing.Size(390, 20);
    217219      this.txtFreeMemory.TabIndex = 29;
    218220      //
     
    222224                  | System.Windows.Forms.AnchorStyles.Right)));
    223225      this.txtId.Enabled = false;
    224       this.txtId.Location = new System.Drawing.Point(102, 34);
     226      this.txtId.Location = new System.Drawing.Point(146, 60);
    225227      this.txtId.Name = "txtId";
    226       this.txtId.Size = new System.Drawing.Size(267, 20);
     228      this.txtId.Size = new System.Drawing.Size(390, 20);
    227229      this.txtId.TabIndex = 30;
    228230      //
     
    230232      //
    231233      this.label2.AutoSize = true;
    232       this.label2.Location = new System.Drawing.Point(3, 37);
     234      this.label2.Location = new System.Drawing.Point(3, 63);
    233235      this.label2.Name = "label2";
    234236      this.label2.Size = new System.Drawing.Size(19, 13);
     
    236238      this.label2.Text = "Id:";
    237239      //
     240      // label3
     241      //
     242      this.label3.AutoSize = true;
     243      this.label3.Location = new System.Drawing.Point(3, 37);
     244      this.label3.Name = "label3";
     245      this.label3.Size = new System.Drawing.Size(137, 13);
     246      this.label3.TabIndex = 32;
     247      this.label3.Text = "Heartbeat Intervall (in sec) :";
     248      //
     249      // txtHbIntervall
     250      //
     251      this.txtHbIntervall.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     252                  | System.Windows.Forms.AnchorStyles.Right)));
     253      this.txtHbIntervall.Location = new System.Drawing.Point(146, 34);
     254      this.txtHbIntervall.Name = "txtHbIntervall";
     255      this.txtHbIntervall.Size = new System.Drawing.Size(390, 20);
     256      this.txtHbIntervall.TabIndex = 33;
     257      this.txtHbIntervall.TextChanged += new System.EventHandler(this.txtHbIntervall_TextChanged);
     258      //
    238259      // SlaveView
    239260      //
    240261      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    241262      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     263      this.Controls.Add(this.txtHbIntervall);
     264      this.Controls.Add(this.label3);
    242265      this.Controls.Add(this.label2);
    243266      this.Controls.Add(this.txtId);
     
    259282      this.Controls.Add(this.label9);
    260283      this.Name = "SlaveView";
    261       this.Size = new System.Drawing.Size(372, 241);
     284      this.Size = new System.Drawing.Size(539, 267);
    262285      this.ResumeLayout(false);
    263286      this.PerformLayout();
     
    285308    private System.Windows.Forms.TextBox txtId;
    286309    private System.Windows.Forms.Label label2;
     310    private System.Windows.Forms.Label label3;
     311    private System.Windows.Forms.TextBox txtHbIntervall;
    287312  }
    288313}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/SlaveView.cs

    r6688 r6893  
    6161        txtFreeMemory.Clear();
    6262        txtId.Clear();
     63        txtHbIntervall.Clear();
    6364      } else {
    6465        if (Content.GetType() == typeof(Slave)) {
     
    6667          Slave ct = (Slave)Content;
    6768          txtName.Text = ct.Name;
     69          txtHbIntervall.Text = ct.HbInterval.ToString();
    6870          txtCPU.Text = string.Format("{0} Cores @ {1} Mhz, Arch.: {2}", ct.Cores.ToString(), ct.CpuSpeed.ToString(), ct.CpuArchitecture.ToString());
    6971          txtDetailsDescription.Text = ct.Description;
     
    7779          SlaveGroup ct = (SlaveGroup)Content;
    7880          txtName.Text = ct.Name;
     81          txtHbIntervall.Text = ct.HbInterval.ToString();
    7982          ShowSlaveUI(false);
    8083        } else {
     
    113116      }
    114117    }
     118
     119    private void txtHbIntervall_TextChanged(object sender, EventArgs e) {
     120      if (Content != null) {
     121        if (txtHbIntervall.Text.Length > 0) {
     122          try {
     123            int interval = int.Parse(txtHbIntervall.Text);
     124            Content.HbInterval = interval;
     125          }
     126          catch (Exception ex) {
     127            MessageBox.Show("Please enter a numeric value for the Heartbeat Interval.", "HeuristicLab Hive Administrator", MessageBoxButtons.OK, MessageBoxIcon.Error);
     128            txtHbIntervall.Text = "0";
     129          }
     130        }
     131      }
     132    }
    115133  }
    116134}
Note: See TracChangeset for help on using the changeset viewer.