Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/08/11 00:04:16 (13 years ago)
Author:
cneumuel
Message:

#1233

  • locking for childHiveJobs in OptimizerHiveJob avoid multi threaded access issues
  • added IsPrivileged to gui
  • minor changes
Location:
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.ExperimentManager/3.4
Files:
2 added
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.ExperimentManager/3.4

    • Property svn:ignore set to
      bin
      HeuristicLab.Clients.Hive.ExperimentManager-3.4.csproj.user
      HeuristicLab.Clients.Hive.ExperimentManager-3.4.csproj.vs10x
      HeuristicLabClientsHiveExperimentManagerPlugin.cs
      obj
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.ExperimentManager/3.4/HeuristicLab.Clients.Hive.ExperimentManager-3.4.csproj

    r6373 r6381  
    151151  </ItemGroup>
    152152  <ItemGroup>
    153     <Compile Include="Views\HiveExperimentListView.cs">
     153    <Compile Include="Views\RefreshableHiveExperimentListView.cs">
    154154      <SubType>UserControl</SubType>
    155155    </Compile>
    156     <Compile Include="Views\HiveExperimentListView.Designer.cs">
    157       <DependentUpon>HiveExperimentListView.cs</DependentUpon>
     156    <Compile Include="Views\RefreshableHiveExperimentListView.Designer.cs">
     157      <DependentUpon>RefreshableHiveExperimentListView.cs</DependentUpon>
    158158    </Compile>
    159159    <Compile Include="Views\HiveExperimentManagerView.cs">
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.ExperimentManager/3.4/Views/HiveExperimentManagerView.Designer.cs

    r6373 r6381  
    4646    private void InitializeComponent() {
    4747      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HiveExperimentManagerView));
    48       this.hiveExperimentListView = new HiveExperimentListView();
     48      this.hiveExperimentListView = new RefreshableHiveExperimentListView();
    4949      this.refreshButton = new System.Windows.Forms.Button();
    5050      this.SuspendLayout();
     
    8686    #endregion
    8787
    88     private HiveExperimentListView hiveExperimentListView;
     88    private RefreshableHiveExperimentListView hiveExperimentListView;
    8989    private System.Windows.Forms.Button refreshButton;
    9090
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.ExperimentManager/3.4/Views/RefreshableHiveExperimentView.Designer.cs

    r6373 r6381  
    5050      this.tabControl = new System.Windows.Forms.TabControl();
    5151      this.jobsTabPage = new System.Windows.Forms.TabPage();
     52      this.jobsTreeView = new HeuristicLab.Clients.Hive.Views.ExperimentManager.HiveJobItemTreeView();
    5253      this.logTabPage = new System.Windows.Forms.TabPage();
    5354      this.logView = new HeuristicLab.Core.Views.LogView();
     
    7374      this.calculatingLabel = new System.Windows.Forms.Label();
    7475      this.jobsLabel = new System.Windows.Forms.Label();
    75       this.jobsTreeView = new HeuristicLab.Clients.Hive.Views.ExperimentManager.HiveJobItemTreeView();
     76      this.isPrivilegedCheckBox = new System.Windows.Forms.CheckBox();
    7677      this.tabControl.SuspendLayout();
    7778      this.jobsTabPage.SuspendLayout();
     
    9091      this.tabControl.Name = "tabControl";
    9192      this.tabControl.SelectedIndex = 0;
    92       this.tabControl.Size = new System.Drawing.Size(821, 520);
     93      this.tabControl.Size = new System.Drawing.Size(717, 452);
    9394      this.tabControl.TabIndex = 4;
    9495      //
     
    9899      this.jobsTabPage.Location = new System.Drawing.Point(4, 22);
    99100      this.jobsTabPage.Name = "jobsTabPage";
    100       this.jobsTabPage.Size = new System.Drawing.Size(813, 494);
     101      this.jobsTabPage.Size = new System.Drawing.Size(709, 426);
    101102      this.jobsTabPage.TabIndex = 5;
    102103      this.jobsTabPage.Text = "Jobs";
    103104      this.jobsTabPage.UseVisualStyleBackColor = true;
     105      //
     106      // jobsTreeView
     107      //
     108      this.jobsTreeView.AllowDrop = true;
     109      this.jobsTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     110                  | System.Windows.Forms.AnchorStyles.Left)
     111                  | System.Windows.Forms.AnchorStyles.Right)));
     112      this.jobsTreeView.Caption = "ItemTree View";
     113      this.jobsTreeView.Content = null;
     114      this.jobsTreeView.Location = new System.Drawing.Point(2, 3);
     115      this.jobsTreeView.Name = "jobsTreeView";
     116      this.jobsTreeView.ReadOnly = false;
     117      this.jobsTreeView.Size = new System.Drawing.Size(704, 420);
     118      this.jobsTreeView.TabIndex = 0;
     119      this.jobsTreeView.DragDrop += new System.Windows.Forms.DragEventHandler(this.jobsTreeView_DragDrop);
     120      this.jobsTreeView.DragEnter += new System.Windows.Forms.DragEventHandler(this.jobsTreeView_DragEnter);
     121      this.jobsTreeView.DragOver += new System.Windows.Forms.DragEventHandler(this.jobsTreeView_DragOver);
    104122      //
    105123      // logTabPage
     
    128146      this.startButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    129147      this.startButton.Image = ((System.Drawing.Image)(resources.GetObject("startButton.Image")));
    130       this.startButton.Location = new System.Drawing.Point(0, 604);
     148      this.startButton.Location = new System.Drawing.Point(0, 536);
    131149      this.startButton.Name = "startButton";
    132150      this.startButton.Size = new System.Drawing.Size(24, 24);
     
    140158      this.stopButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    141159      this.stopButton.Image = ((System.Drawing.Image)(resources.GetObject("stopButton.Image")));
    142       this.stopButton.Location = new System.Drawing.Point(60, 604);
     160      this.stopButton.Location = new System.Drawing.Point(60, 536);
    143161      this.stopButton.Name = "stopButton";
    144162      this.stopButton.Size = new System.Drawing.Size(24, 24);
     
    153171      this.resetButton.Enabled = false;
    154172      this.resetButton.Image = ((System.Drawing.Image)(resources.GetObject("resetButton.Image")));
    155       this.resetButton.Location = new System.Drawing.Point(90, 604);
     173      this.resetButton.Location = new System.Drawing.Point(90, 536);
    156174      this.resetButton.Name = "resetButton";
    157175      this.resetButton.Size = new System.Drawing.Size(24, 24);
     
    165183      this.executionTimeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    166184      this.executionTimeLabel.AutoSize = true;
    167       this.executionTimeLabel.Location = new System.Drawing.Point(595, 611);
     185      this.executionTimeLabel.Location = new System.Drawing.Point(491, 543);
    168186      this.executionTimeLabel.Name = "executionTimeLabel";
    169187      this.executionTimeLabel.Size = new System.Drawing.Size(83, 13);
     
    174192      //
    175193      this.executionTimeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    176       this.executionTimeTextBox.Location = new System.Drawing.Point(684, 608);
     194      this.executionTimeTextBox.Location = new System.Drawing.Point(580, 540);
    177195      this.executionTimeTextBox.Name = "executionTimeTextBox";
    178196      this.executionTimeTextBox.ReadOnly = true;
     
    185203      this.pauseButton.Enabled = false;
    186204      this.pauseButton.Image = ((System.Drawing.Image)(resources.GetObject("pauseButton.Image")));
    187       this.pauseButton.Location = new System.Drawing.Point(30, 604);
     205      this.pauseButton.Location = new System.Drawing.Point(30, 536);
    188206      this.pauseButton.Name = "pauseButton";
    189207      this.pauseButton.Size = new System.Drawing.Size(24, 24);
     
    208226      this.resourceNamesTextBox.Location = new System.Drawing.Point(73, 53);
    209227      this.resourceNamesTextBox.Name = "resourceNamesTextBox";
    210       this.resourceNamesTextBox.Size = new System.Drawing.Size(494, 20);
     228      this.resourceNamesTextBox.Size = new System.Drawing.Size(304, 20);
    211229      this.resourceNamesTextBox.TabIndex = 14;
    212230      this.resourceNamesTextBox.Validated += new System.EventHandler(this.resourceNamesTextBox_Validated);
     
    216234      this.useLocalPluginsCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    217235      this.useLocalPluginsCheckBox.AutoSize = true;
    218       this.useLocalPluginsCheckBox.Location = new System.Drawing.Point(573, 56);
     236      this.useLocalPluginsCheckBox.Location = new System.Drawing.Point(469, 56);
    219237      this.useLocalPluginsCheckBox.Name = "useLocalPluginsCheckBox";
    220238      this.useLocalPluginsCheckBox.Size = new System.Drawing.Size(105, 17);
     
    239257      this.nameTextBox.Location = new System.Drawing.Point(73, 27);
    240258      this.nameTextBox.Name = "nameTextBox";
    241       this.nameTextBox.Size = new System.Drawing.Size(605, 20);
     259      this.nameTextBox.Size = new System.Drawing.Size(501, 20);
    242260      this.nameTextBox.TabIndex = 21;
    243261      this.nameTextBox.Validated += new System.EventHandler(this.nameTextBox_Validated);
     
    274292      this.infoGroupBox.Controls.Add(this.calculatingLabel);
    275293      this.infoGroupBox.Controls.Add(this.jobsLabel);
    276       this.infoGroupBox.Location = new System.Drawing.Point(684, 5);
     294      this.infoGroupBox.Location = new System.Drawing.Point(580, 5);
    277295      this.infoGroupBox.Name = "infoGroupBox";
    278296      this.infoGroupBox.Size = new System.Drawing.Size(133, 89);
     
    335353      this.jobsLabel.Text = "Jobs:";
    336354      //
    337       // jobsTreeView
    338       //
    339       this.jobsTreeView.AllowDrop = true;
    340       this.jobsTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    341                   | System.Windows.Forms.AnchorStyles.Left)
    342                   | System.Windows.Forms.AnchorStyles.Right)));
    343       this.jobsTreeView.Caption = "ItemTree View";
    344       this.jobsTreeView.Content = null;
    345       this.jobsTreeView.Location = new System.Drawing.Point(2, 3);
    346       this.jobsTreeView.Name = "jobsTreeView";
    347       this.jobsTreeView.ReadOnly = false;
    348       this.jobsTreeView.Size = new System.Drawing.Size(808, 488);
    349       this.jobsTreeView.TabIndex = 0;
    350       this.jobsTreeView.DragDrop += new System.Windows.Forms.DragEventHandler(this.jobsTreeView_DragDrop);
    351       this.jobsTreeView.DragEnter += new System.Windows.Forms.DragEventHandler(this.jobsTreeView_DragEnter);
    352       this.jobsTreeView.DragOver += new System.Windows.Forms.DragEventHandler(this.jobsTreeView_DragOver);
     355      // isPrivilegedCheckBox
     356      //
     357      this.isPrivilegedCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     358      this.isPrivilegedCheckBox.AutoSize = true;
     359      this.isPrivilegedCheckBox.Location = new System.Drawing.Point(383, 55);
     360      this.isPrivilegedCheckBox.Name = "isPrivilegedCheckBox";
     361      this.isPrivilegedCheckBox.Size = new System.Drawing.Size(80, 17);
     362      this.isPrivilegedCheckBox.TabIndex = 26;
     363      this.isPrivilegedCheckBox.Text = "IsPrivileged";
     364      this.toolTip.SetToolTip(this.isPrivilegedCheckBox, "If checked, the job will be executed in a privileged sandbox on the slave.");
     365      this.isPrivilegedCheckBox.UseVisualStyleBackColor = true;
     366      this.isPrivilegedCheckBox.CheckedChanged += new System.EventHandler(this.isPrivilegedCheckBox_CheckedChanged);
    353367      //
    354368      // RefreshableHiveExperimentView
     
    356370      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    357371      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     372      this.Controls.Add(this.isPrivilegedCheckBox);
    358373      this.Controls.Add(this.infoGroupBox);
    359374      this.Controls.Add(this.refreshAutomaticallyCheckBox);
     
    372387      this.Controls.Add(this.resetButton);
    373388      this.Name = "RefreshableHiveExperimentView";
    374       this.Size = new System.Drawing.Size(821, 628);
     389      this.Size = new System.Drawing.Size(717, 560);
    375390      this.tabControl.ResumeLayout(false);
    376391      this.jobsTabPage.ResumeLayout(false);
     
    410425    private System.Windows.Forms.Label calculatingLabel;
    411426    private System.Windows.Forms.Label jobsLabel;
     427    private System.Windows.Forms.CheckBox isPrivilegedCheckBox;
    412428
    413429  }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.ExperimentManager/3.4/Views/RefreshableHiveExperimentView.cs

    r6373 r6381  
    103103        resourceNamesTextBox.Text = string.Empty;
    104104        useLocalPluginsCheckBox.Checked = false;
     105        isPrivilegedCheckBox.Checked = false;
    105106        logView.Content = null;
    106         //includeJobsCheckBox.Checked = false;
    107         refreshAutomaticallyCheckBox.Checked = false;
     107        refreshAutomaticallyCheckBox.Checked = false;       
    108108        logView.Content = null;
    109109      } else {
     
    112112        resourceNamesTextBox.Text = Content.HiveExperiment.ResourceNames;
    113113        useLocalPluginsCheckBox.Checked = Content.HiveExperiment.UseLocalPlugins;
    114         //includeJobsCheckBox.Checked = Content.IncludeJobs;
     114        isPrivilegedCheckBox.Checked = Content.HiveExperiment.IsPrivileged;
    115115        refreshAutomaticallyCheckBox.Checked = Content.RefreshAutomatically;
    116116        logView.Content = Content.Log;
     
    138138        this.jobsTreeView.ReadOnly = !Content.IsControllable || Content.HiveExperiment.ExecutionState != ExecutionState.Prepared || alreadyUploaded;
    139139
     140        this.isPrivilegedCheckBox.Enabled = Content.IsControllable && !(Content.HiveExperiment.ExecutionState != ExecutionState.Prepared || alreadyUploaded); // TODO: check if user has the rights to do this
    140141        this.useLocalPluginsCheckBox.Enabled = Content.IsControllable && !(Content.HiveExperiment.ExecutionState != ExecutionState.Prepared || alreadyUploaded);
    141142        this.refreshAutomaticallyCheckBox.Enabled = Content.IsControllable && alreadyUploaded && jobsLoaded && Content.HiveExperiment.ExecutionState == ExecutionState.Started;
    142143        this.refreshButton.Enabled = Content.IsControllable && alreadyUploaded;
    143144        this.Locked = !Content.IsControllable || Content.HiveExperiment.ExecutionState == ExecutionState.Started;
     145
    144146      }
    145147      SetEnabledStateOfExecutableButtons();
     
    296298    private void useLocalPluginsCheckBox_CheckedChanged(object sender, EventArgs e) {
    297299      if (Content != null) Content.HiveExperiment.UseLocalPlugins = useLocalPluginsCheckBox.Checked;
     300    }
     301
     302    private void isPrivilegedCheckBox_CheckedChanged(object sender, EventArgs e) {
     303      if (Content != null) Content.HiveExperiment.IsPrivileged = isPrivilegedCheckBox.Checked;
    298304    }
    299305
Note: See TracChangeset for help on using the changeset viewer.