Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/02/18 15:51:17 (6 years ago)
Author:
jzenisek
Message:

#2839: applied several fixes:

  • show full project-path in project/resource selector
  • handle lost of project-ownership by not withdrawing permissions
  • update automatically after hand-down save
  • lock jobs for which statistics/deletion is pending
  • lock the disabled checkbox in ProjectResourcesView...
Location:
branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectJobsView.cs

    r15969 r15978  
    144144
    145145    private StringMatrix CreateValueMatrix() {
     146      if (Content == null || Content.Id == Guid.Empty)
     147        return new StringMatrix();
     148
    146149      var jobs = HiveAdminClient.Instance.Jobs[Content.Id];
    147150      var resources = HiveAdminClient.Instance.Resources;
     
    172175      if (InvokeRequired) Invoke((Action)UpdateJobs);
    173176      else {
    174         StringMatrix matrix = null;
    175         if(Content != null) {
    176           matrix = CreateValueMatrix();
     177        if(Content != null && Content.Id != null && Content.Id != Guid.Empty) {
     178          var matrix = CreateValueMatrix();
     179          matrixView.Content = matrix;
     180          if(matrix != null) {
     181            foreach (DataGridViewRow row in matrixView.DataGridView.Rows) {
     182              string val = ((string)row.Cells[0].Value);
     183              if (val == JobState.Online.ToString()) {
     184                row.DefaultCellStyle.BackColor = onlineStatusColor;
     185              } else if (val == JobState.StatisticsPending.ToString()) {
     186                row.DefaultCellStyle.BackColor = statisticsPendingStatusColor;
     187              } else if (val == JobState.DeletionPending.ToString()) {
     188                row.DefaultCellStyle.BackColor = deletionPendingStatusColor;
     189              }
     190            }
     191
     192            matrixView.DataGridView.AutoResizeColumns();
     193            matrixView.DataGridView.Columns[0].MinimumWidth = 90;
     194            matrixView.DataGridView.Columns[1].MinimumWidth = 108;
     195          }
    177196        } else {
    178197          refreshButton.Enabled = false;
    179198          removeButton.Enabled = false;
    180         }
    181         matrixView.Content = matrix;
    182        
    183         foreach(DataGridViewRow row in matrixView.DataGridView.Rows) {
    184           string val = ((string)row.Cells[0].Value);
    185           if (val == JobState.Online.ToString()) {
    186             row.DefaultCellStyle.BackColor = onlineStatusColor;
    187           } else if(val == JobState.StatisticsPending.ToString()) {
    188             row.DefaultCellStyle.BackColor = statisticsPendingStatusColor;
    189           } else if(val == JobState.DeletionPending.ToString()) {
    190             row.DefaultCellStyle.BackColor = deletionPendingStatusColor;
    191           }
    192         }
    193 
    194         matrixView.DataGridView.AutoResizeColumns();
    195         matrixView.DataGridView.Columns[0].MinimumWidth = 90;
    196         matrixView.DataGridView.Columns[1].MinimumWidth = 108;
     199          matrixView.Content = null;
     200        }
    197201      }
    198202    }
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectPermissionsView.cs

    r15955 r15978  
    143143    #region Helpers
    144144    private void UpdatePermissionList() {
     145      AccessClient.Instance.Refresh();
     146
    145147      UpdateUserGroupGenealogy();
    146148      UpdateAssignedPermissions();
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectResourcesView.cs

    r15955 r15978  
    117117          SetAssignedProjectResources(Content.Id, newAssignedResources.Select(x => x.Id), false, true, false);
    118118        });
     119      HiveAdminClient.Instance.Refresh();
    119120      UpdateResourceTree();
    120121    }
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.Designer.cs

    r15953 r15978  
    198198      this.viewHost.Caption = "View";
    199199      this.viewHost.Content = null;
    200       this.viewHost.Enabled = false;
     200      this.viewHost.Enabled = true;
    201201      this.viewHost.Location = new System.Drawing.Point(6, 6);
    202202      this.viewHost.Name = "viewHost";
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs

    r15953 r15978  
    123123      btnRemoveGroup.Enabled = !locked;
    124124      btnSave.Enabled = !locked;
    125       viewHost.Locked = locked;
     125      viewHost.Enabled = true;
     126      //viewHost.Locked = locked;
     127      viewHost.Locked = false;
     128      viewHost.ReadOnly = false;
    126129      scheduleView.Locked = locked;
    127       scheduleView.SetEnabledStateOfSchedule(!scheduleLocked);
     130      //scheduleView.SetEnabledStateOfSchedule(!scheduleLocked);
    128131    }
    129132    #endregion
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ScheduleView.cs

    r15956 r15978  
    234234    }
    235235
    236     public virtual void SetEnabledStateOfSchedule(bool state) {
    237       if (InvokeRequired) {
    238         Invoke(new Action(() => SetEnabledStateOfSchedule(state)));
    239       } else {
    240         if (Content == null || Locked || ReadOnly) state = false;
    241         //groupBox1.Enabled = state;
    242         btnClearCal.Enabled = state;
    243         btnSaveCal.Enabled = state;
    244       }
    245     }
     236    //public virtual void SetEnabledStateOfSchedule(bool state) {
     237    //  if (InvokeRequired) {
     238    //    Invoke(new Action(() => SetEnabledStateOfSchedule(state)));
     239    //  } else {
     240    //    if (Content == null || Locked || ReadOnly) state = false;
     241    //    //groupBox1.Enabled = state;
     242    //    btnClearCal.Enabled = state;
     243    //    btnSaveCal.Enabled = state;
     244    //  }
     245    //}
    246246
    247247    private void btnClearCal_Click(object sender, System.EventArgs e) {
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/SlaveView.cs

    r15422 r15978  
    6060    protected override void SetEnabledStateOfControls() {
    6161      base.SetEnabledStateOfControls();
    62       disposableCheckBox.Enabled = Content != null;
     62      bool enabled = Content != null && !Locked;
     63      disposableCheckBox.Enabled = enabled;
    6364    }
    6465    #endregion
Note: See TracChangeset for help on using the changeset viewer.