Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/07/17 10:32:07 (7 years ago)
Author:
jkarder
Message:

#2839:

  • worked on resources and projects views
  • changed resource selector to be able to select projects and assigned resources
  • updated service clients
Location:
branches/HiveProjectManagement/HeuristicLab.Clients.Hive/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveProjectManagement/HeuristicLab.Clients.Hive/3.3/HiveClient.cs

    r15401 r15412  
    255255        refreshableJob.IsProgressing = true;
    256256        refreshableJob.Progress.Start("Connecting to server...");
    257         IEnumerable<string> resourceNames = ToResourceNameList("");
    258         var resourceIds = new List<Guid>();
    259         foreach (var resourceName in resourceNames) {
    260           Guid resourceId = HiveServiceLocator.Instance.CallHiveService((s) => s.GetResourceId(resourceName));
    261           if (resourceId == Guid.Empty) {
    262             throw new ResourceNotFoundException(string.Format("Could not find the resource '{0}'", resourceName));
    263           }
    264           resourceIds.Add(resourceId);
    265         }
    266257
    267258        foreach (OptimizerHiveTask hiveJob in refreshableJob.HiveTasks.OfType<OptimizerHiveTask>()) {
     
    293284        foreach (HiveTask hiveTask in refreshableJob.HiveTasks) {
    294285          var task = TS.Task.Factory.StartNew((hj) => {
    295             UploadTaskWithChildren(refreshableJob.Progress, (HiveTask)hj, null, resourceIds, jobCount, totalJobCount, configFilePlugin.Id, refreshableJob.Job.Id, refreshableJob.Log, cancellationToken);
     286            UploadTaskWithChildren(refreshableJob.Progress, (HiveTask)hj, null, refreshableJob.Job.ResourceIds, jobCount, totalJobCount, configFilePlugin.Id, refreshableJob.Job.Id, refreshableJob.Log, cancellationToken);
    296287          }, hiveTask);
    297288          task.ContinueWith((x) => refreshableJob.Log.LogException(x.Exception), TaskContinuationOptions.OnlyOnFaulted);
     
    377368              hiveTask.Task.Id = HiveServiceLocator.Instance.CallHiveService((s) => s.AddChildTask(parentHiveTask.Task.Id, hiveTask.Task, taskData));
    378369            } else {
    379               hiveTask.Task.Id = HiveServiceLocator.Instance.CallHiveService((s) => s.AddTask(hiveTask.Task, taskData));
     370              hiveTask.Task.Id = HiveServiceLocator.Instance.CallHiveService((s) => s.AddTask(hiveTask.Task, taskData, groups.ToList()));
    380371            }
    381372          }
  • branches/HiveProjectManagement/HeuristicLab.Clients.Hive/3.3/ServiceClients/HiveServiceClient.cs

    r15401 r15412  
    3030    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.PluginData))]
    3131    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.ProjectPermission))]
     32    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.AssignedProjectResource))]
    3233    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Downtime))]
    3334    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.UserPriority))]
     
    11661167                    this.ProjectIdField = value;
    11671168                    this.RaisePropertyChanged("ProjectId");
     1169                }
     1170            }
     1171        }
     1172    }
     1173   
     1174    [System.Diagnostics.DebuggerStepThroughAttribute()]
     1175    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
     1176    [System.Runtime.Serialization.DataContractAttribute(Name="AssignedProjectResource", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.DataTransfer")]
     1177    [System.SerializableAttribute()]
     1178    public partial class AssignedProjectResource : HeuristicLab.Clients.Hive.HiveItem
     1179    {
     1180       
     1181        [System.Runtime.Serialization.OptionalFieldAttribute()]
     1182        private System.Guid ProjectIdField;
     1183       
     1184        [System.Runtime.Serialization.OptionalFieldAttribute()]
     1185        private System.Guid ResourceIdField;
     1186       
     1187        [System.Runtime.Serialization.DataMemberAttribute()]
     1188        public System.Guid ProjectId
     1189        {
     1190            get
     1191            {
     1192                return this.ProjectIdField;
     1193            }
     1194            set
     1195            {
     1196                if ((this.ProjectIdField.Equals(value) != true))
     1197                {
     1198                    this.ProjectIdField = value;
     1199                    this.RaisePropertyChanged("ProjectId");
     1200                }
     1201            }
     1202        }
     1203       
     1204        [System.Runtime.Serialization.DataMemberAttribute()]
     1205        public System.Guid ResourceId
     1206        {
     1207            get
     1208            {
     1209                return this.ResourceIdField;
     1210            }
     1211            set
     1212            {
     1213                if ((this.ResourceIdField.Equals(value) != true))
     1214                {
     1215                    this.ResourceIdField = value;
     1216                    this.RaisePropertyChanged("ResourceId");
    11681217                }
    11691218            }
     
    22102259       
    22112260        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddTask", ReplyAction="http://tempuri.org/IHiveService/AddTaskResponse")]
    2212         System.Guid AddTask(HeuristicLab.Clients.Hive.Task task, HeuristicLab.Clients.Hive.TaskData taskData);
     2261        System.Guid AddTask(HeuristicLab.Clients.Hive.Task task, HeuristicLab.Clients.Hive.TaskData taskData, System.Collections.Generic.List<System.Guid> resourceIds);
    22132262       
    22142263        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddChildTask", ReplyAction="http://tempuri.org/IHiveService/AddChildTaskResponse")]
     
    23182367        System.Collections.Generic.List<HeuristicLab.Clients.Hive.ProjectPermission> GetProjectPermissions(System.Guid projectId);
    23192368       
     2369        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AssignProjectResources", ReplyAction="http://tempuri.org/IHiveService/AssignProjectResourcesResponse")]
     2370        void AssignProjectResources(System.Guid projectId, System.Collections.Generic.List<System.Guid> resourceIds);
     2371       
     2372        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/UnassignProjectResources", ReplyAction="http://tempuri.org/IHiveService/UnassignProjectResourcesResponse")]
     2373        void UnassignProjectResources(System.Guid projectId, System.Collections.Generic.List<System.Guid> resourceIds);
     2374       
     2375        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetAssignedResourcesForProject", ReplyAction="http://tempuri.org/IHiveService/GetAssignedResourcesForProjectResponse")]
     2376        System.Collections.Generic.List<HeuristicLab.Clients.Hive.AssignedProjectResource> GetAssignedResourcesForProject(System.Guid projectId);
     2377       
    23202378        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddSlave", ReplyAction="http://tempuri.org/IHiveService/AddSlaveResponse")]
    23212379        System.Guid AddSlave(HeuristicLab.Clients.Hive.Slave slave);
     
    24162474        }
    24172475       
    2418         public System.Guid AddTask(HeuristicLab.Clients.Hive.Task task, HeuristicLab.Clients.Hive.TaskData taskData)
    2419         {
    2420             return base.Channel.AddTask(task, taskData);
     2476        public System.Guid AddTask(HeuristicLab.Clients.Hive.Task task, HeuristicLab.Clients.Hive.TaskData taskData, System.Collections.Generic.List<System.Guid> resourceIds)
     2477        {
     2478            return base.Channel.AddTask(task, taskData, resourceIds);
    24212479        }
    24222480       
     
    25962654        }
    25972655       
     2656        public void AssignProjectResources(System.Guid projectId, System.Collections.Generic.List<System.Guid> resourceIds)
     2657        {
     2658            base.Channel.AssignProjectResources(projectId, resourceIds);
     2659        }
     2660       
     2661        public void UnassignProjectResources(System.Guid projectId, System.Collections.Generic.List<System.Guid> resourceIds)
     2662        {
     2663            base.Channel.UnassignProjectResources(projectId, resourceIds);
     2664        }
     2665       
     2666        public System.Collections.Generic.List<HeuristicLab.Clients.Hive.AssignedProjectResource> GetAssignedResourcesForProject(System.Guid projectId)
     2667        {
     2668            return base.Channel.GetAssignedResourcesForProject(projectId);
     2669        }
     2670       
    25982671        public System.Guid AddSlave(HeuristicLab.Clients.Hive.Slave slave)
    25992672        {
  • branches/HiveProjectManagement/HeuristicLab.Clients.Hive/3.3/ServiceClients/Job.cs

    r15401 r15412  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using System.ComponentModel;
    2425using HeuristicLab.Common;
     
    2627namespace HeuristicLab.Clients.Hive {
    2728  public partial class Job : IDeepCloneable, IContent {
     29    public List<Guid> ResourceIds { get; set; }
    2830
    2931    #region Constructors and Cloning
     
    4345      this.Id = original.Id;
    4446      this.Permission = original.Permission;
     47      this.ResourceIds = original.ResourceIds;
    4548    }
    4649    public override IDeepCloneable Clone(Cloner cloner) {
Note: See TracChangeset for help on using the changeset viewer.