Ignore:
Timestamp:
01/26/18 08:51:30 (3 years ago)
Author:
jzenisek
Message:

#2839

  • worked on (restricted) accessibility of hive's administration area for non-admin roles
  • adapted HiveClient & HiveAdminClient entity loading (client- & service-side)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveResourceSelectorDialog.cs

    r15642 r15658  
    8080    #region Overrides
    8181    protected override void OnLoad(EventArgs e) {
    82       HiveAdminClient.Instance.Refreshing += HiveAdminClient_Instance_Refreshing;
    83       HiveAdminClient.Instance.Refreshed += HiveAdminClient_Instance_Refreshed;
     82      HiveClient.Instance.Refreshing += HiveClient_Instance_Refreshing;
     83      HiveClient.Instance.Refreshed += HiveClient_Instance_Refreshed;
    8484      base.OnLoad(e);
    8585    }
    8686
    8787    protected override void OnClosing(CancelEventArgs e) {
    88       HiveAdminClient.Instance.Refreshed -= HiveAdminClient_Instance_Refreshed;
    89       HiveAdminClient.Instance.Refreshing -= HiveAdminClient_Instance_Refreshing;
     88      HiveClient.Instance.Refreshed -= HiveClient_Instance_Refreshed;
     89      HiveClient.Instance.Refreshing -= HiveClient_Instance_Refreshing;
    9090      base.OnClosing(e);
    9191    }
     
    9393
    9494    #region Event Handlers
    95     private void HiveAdminClient_Instance_Refreshing(object sender, EventArgs e) {
    96       if (InvokeRequired) Invoke((Action<object, EventArgs>)HiveAdminClient_Instance_Refreshing, sender, e);
     95    private void HiveClient_Instance_Refreshing(object sender, EventArgs e) {
     96      if (InvokeRequired) Invoke((Action<object, EventArgs>)HiveClient_Instance_Refreshing, sender, e);
    9797      else {
    9898        var mainForm = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>();
     
    102102    }
    103103
    104     private void HiveAdminClient_Instance_Refreshed(object sender, EventArgs e) {
    105       if (InvokeRequired) Invoke((Action<object, EventArgs>)HiveAdminClient_Instance_Refreshed, sender, e);
     104    private void HiveClient_Instance_Refreshed(object sender, EventArgs e) {
     105      if (InvokeRequired) Invoke((Action<object, EventArgs>)HiveClient_Instance_Refreshed, sender, e);
    106106      else {
    107107        var mainForm = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>();
     
    129129
    130130      await SecurityExceptionUtil.TryAsyncAndReportSecurityExceptions(
    131         action: () => UpdateProjects(),
     131        action: () => UpdateInstance(),
    132132        finallyCallback: () => updatingProjects = false);
    133133    }
     
    151151
    152152    #region Helpers
     153    private void UpdateInstance() {
     154      HiveClient.Instance.Refresh();
     155    }
     156
    153157    private void UpdateProjects() {
    154       HiveAdminClient.Instance.Refresh();
     158      HiveClient.Instance.RefreshProjectsAndResources();
    155159      hiveResourceSelector.JobId = jobId;
    156160      hiveResourceSelector.ProjectId = projectId;
Note: See TracChangeset for help on using the changeset viewer.