Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/16/11 14:12:30 (14 years ago)
Author:
ascheibe
Message:

#1233

  • use SlaveComm Endpoint from app.config
  • various further slave bugfixes/cleanups
  • added preliminary icon for hive slave ui and some slave ui improvements
  • added resource deletion to admin ui
  • fix service exception thrown if there is no EventLog
File:
1 edited

Legend:

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

    r5676 r5711  
    145145
    146146    private void btnRemoveGroup_Click(object sender, EventArgs e) {
     147      //TODO: display some warning?
    147148      if (treeSlaveGroup.SelectedNode != null && treeSlaveGroup.SelectedNode.Tag != null) {
    148         Content.Remove((Resource)treeSlaveGroup.SelectedNode.Tag);
     149        Resource res = (Resource)treeSlaveGroup.SelectedNode.Tag;
     150        Content.Remove(res);
     151
     152        if (res is Slave) {
     153          ServiceLocator.Instance.CallHiveService(service => service.DeleteSlave(res.Id));
     154        } else if (res is SlaveGroup) {
     155          //only delete empty groups
     156          if (Content.Where(s => s.ParentResourceId == res.Id).Count() < 0) {
     157            ServiceLocator.Instance.CallHiveService(service => service.DeleteSlaveGroup(res.Id));
     158          } else {
     159            MessageBox.Show("Only empty groups can be deleted.");
     160          }
     161        }
    149162      }
    150163    }
Note: See TracChangeset for help on using the changeset viewer.