Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9107 for trunk


Ignore:
Timestamp:
01/04/13 14:21:22 (12 years ago)
Author:
ascheibe
Message:

#1950 fixed handling of IsAllowedPrivileged in the Hive Job Manager

Location:
trunk/sources
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobListView.cs

    r8850 r9107  
    5050
    5151    protected override RefreshableJob CreateItem() {
    52       var refreshableJob = new RefreshableJob() { IsAllowedPrivileged = HiveClient.Instance.IsAllowedPrivileged };
     52      var refreshableJob = new RefreshableJob();
    5353      refreshableJob.Job.Name = "New Hive Job";
    5454      return refreshableJob;
  • trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.Designer.cs

    r8924 r9107  
    375375      this.toolTip.SetToolTip(this.isPrivilegedCheckBox, "If checked, the task will be executed in a privileged sandbox on the slave.");
    376376      this.isPrivilegedCheckBox.UseVisualStyleBackColor = true;
    377       this.isPrivilegedCheckBox.Validated += new System.EventHandler(this.isPrivilegedCheckBox_Validated);
     377      this.isPrivilegedCheckBox.CheckedChanged += new System.EventHandler(this.isPrivilegedCheckBox_CheckChanged);
    378378      //
    379379      // refreshAutomaticallyCheckBox
  • trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.cs

    r9097 r9107  
    140140          executionTimeTextBox.Text = Content.ExecutionTime.ToString();
    141141          resourceNamesTextBox.Text = Content.Job.ResourceNames;
    142           isPrivilegedCheckBox.Checked = Content.Job.IsPrivileged;
     142          isPrivilegedCheckBox.Checked = Content.IsAllowedPrivileged;
    143143          refreshAutomaticallyCheckBox.Checked = Content.RefreshAutomatically;
    144144          logView.Content = Content.Log;
     
    178178        this.jobsTreeView.ReadOnly = !Content.IsControllable || Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded || Content.IsProgressing;
    179179
    180         this.isPrivilegedCheckBox.Enabled = Content.IsAllowedPrivileged && Content.IsControllable && !(Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded) && !Content.IsProgressing;
     180        this.isPrivilegedCheckBox.Enabled = HiveClient.Instance.IsAllowedPrivileged && Content.IsControllable && !(Content.ExecutionState != ExecutionState.Prepared || alreadyUploaded) && !Content.IsProgressing;
    181181        this.refreshAutomaticallyCheckBox.Enabled = Content.IsControllable && alreadyUploaded && jobsLoaded && Content.ExecutionState == ExecutionState.Started && !Content.IsProgressing;
    182182        this.refreshButton.Enabled = Content.IsDownloadable && alreadyUploaded && !Content.IsProgressing;
     
    345345        Invoke(new EventHandler(Content_IsAllowedPrivilegedChanged), sender, e);
    346346      else {
     347        isPrivilegedCheckBox.Checked = Content.IsAllowedPrivileged;
    347348        SetEnabledStateOfControls();
    348349      }
     
    447448    }
    448449
    449     private void isPrivilegedCheckBox_Validated(object sender, EventArgs e) {
    450       if (Content != null && !SuppressEvents) Content.Job.IsPrivileged = isPrivilegedCheckBox.Checked;
     450    private void isPrivilegedCheckBox_CheckChanged(object sender, EventArgs e) {
     451      if (Content != null && !SuppressEvents) Content.IsAllowedPrivileged = isPrivilegedCheckBox.Checked;
    451452    }
    452453
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveClient.cs

    r8939 r9107  
    8383
    8484      try {
    85         this.IsAllowedPrivileged = HiveServiceLocator.Instance.CallHiveService((s) => s.IsAllowedPrivileged());
     85        IsAllowedPrivileged = HiveServiceLocator.Instance.CallHiveService((s) => s.IsAllowedPrivileged());
    8686
    8787        var oldJobs = jobs ?? new ItemCollection<RefreshableJob>();
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/RefreshableJob.cs

    r8994 r9107  
    158158
    159159    // may execute jobs with privileged permissions on slaves
    160     private bool isAllowedPrivileged = true;
    161160    public bool IsAllowedPrivileged {
    162       get { return isAllowedPrivileged; }
     161      get { return Job.IsPrivileged; }
    163162      set {
    164         if (value != isAllowedPrivileged) {
    165           isAllowedPrivileged = value;
     163        if (value != Job.IsPrivileged) {
     164          Job.IsPrivileged = value;
    166165          OnIsAllowedPrivilegedChanged();
    167166        }
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/ServiceClients/Job.cs

    r7259 r9107  
    3535    #region Constructors and Cloning
    3636    public Job() {
    37       this.ResourceNames = "HEAL";
    38       this.DateCreated = DateTime.Now;
    39       this.Permission = Permission.Full;
     37      ResourceNames = "HEAL";
     38      DateCreated = DateTime.Now;
     39      Permission = Permission.Full;
    4040    }
    4141
Note: See TracChangeset for help on using the changeset viewer.