Changeset 15908


Ignore:
Timestamp:
04/17/18 13:38:33 (19 months ago)
Author:
jkarder
Message:

#2839: worked on hive project management

  • fixed some bugs
  • cleaned up
Location:
branches/2839_HiveProjectManagement
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/HeuristicLab.Clients.Hive.Administrator-3.3.csproj

    r15576 r15908  
    284284    </ProjectReference>
    285285  </ItemGroup>
    286   <ItemGroup>
    287     <EmbeddedResource Include="Views\ProjectView.resx">
    288       <DependentUpon>ProjectView.cs</DependentUpon>
    289     </EmbeddedResource>
    290   </ItemGroup>
    291286  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    292287  <PropertyGroup>
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectView.Designer.cs

    r15576 r15908  
    2424    /// </summary>
    2525    private void InitializeComponent() {
    26       System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProjectView));
    2726      this.idLabel = new System.Windows.Forms.Label();
    2827      this.idTextBox = new System.Windows.Forms.TextBox();
     
    193192      // refreshButton
    194193      //
    195       this.refreshButton.Image = ((System.Drawing.Image)(resources.GetObject("refreshButton.Image")));
     194      this.refreshButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Refresh;
    196195      this.refreshButton.Location = new System.Drawing.Point(72, 162);
    197196      this.refreshButton.Name = "refreshButton";
  • branches/2839_HiveProjectManagement/HeuristicLab.Services.Access.DataAccess/3.3/AccessService.dbml

    r15577 r15908  
    11<?xml version="1.0" encoding="utf-8"?><Database Name="HeuristicLab.ClientManagement" Class="AccessServiceDataContext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007">
    2   <Connection Mode="AppSettings" ConnectionString="Data Source=HIVELAB;Integrated Security=SSPI;Initial Catalog=HeuristicLab.AccessService" SettingsObjectName="HeuristicLab.Services.Access.DataAccess.Properties.Settings" SettingsPropertyName="HeuristicLab_ClientManagementConnectionString" Provider="System.Data.SqlClient" />
     2  <Connection Mode="AppSettings" ConnectionString="Data Source=localhost;Integrated Security=SSPI;Initial Catalog=HeuristicLab.AccessService" SettingsObjectName="HeuristicLab.Services.Access.DataAccess.Properties.Settings" SettingsPropertyName="HeuristicLab_ClientManagementConnectionString" Provider="System.Data.SqlClient" />
    33  <Table Name="dbo.Resource" Member="Resources">
    44    <Type Name="Resource" InheritanceCode="Resource" IsInheritanceDefault="true">
  • branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimProjectDao.cs

    r15671 r15908  
    5555        (from dimProject in db.GetTable<DimProject>()
    5656         where dimProject.ProjectId == projectId
    57          select dimProject).ToList());
     57         select dimProject));
    5858    private static readonly Func<DataContext, Guid, Guid> GetLastValidIdByProjectIdQuery =
    5959      CompiledQuery.Compile((DataContext db, Guid projectId) =>
     
    6767        (from dimProject in db.GetTable<DimProject>()
    6868         where dimProject.DateExpired == null
    69          select dimProject).ToList());
     69         select dimProject));
    7070    #endregion
    7171  }
  • branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/JobDao.cs

    r15643 r15908  
    6060        (from job in db.GetTable<Job>()
    6161         where job.State == jobState
    62          select job).ToList());
     62         select job));
    6363    private static readonly Func<DataContext, JobState, IEnumerable<Guid>> GetJobIdsByStateQuery =
    6464      CompiledQuery.Compile((DataContext db, JobState jobState) =>
    6565        (from job in db.GetTable<Job>()
    6666         where job.State == jobState
    67          select job.JobId).ToList());
     67         select job.JobId));
    6868    private static readonly Func<DataContext, IEnumerable<Job>> GetJobsReadyForDeletionQuery =
    6969      CompiledQuery.Compile((DataContext db) =>
     
    7575              || task.State == TaskState.Aborted
    7676              || task.State == TaskState.Failed).All(x => x)
    77          select job).ToList());
     77         select job));
    7878    #endregion
    7979
  • branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/TaskDao.cs

    r15666 r15908  
    6565    /// <returns></returns>
    6666    public IEnumerable<Task> GetParentTasks(IEnumerable<Guid> resourceIds, int count, bool finished) {
    67       var query = from t in Table
    68                   where t.State == TaskState.Waiting
     67    var query = from t in Table
     68                where t.State == TaskState.Waiting
    6969                    && t.IsParentTask
    70                     && !t.Job.AssignedJobResources.Select(x => x.ResourceId).Except(resourceIds).Any()
     70                    && t.Job.AssignedJobResources.All(x => resourceIds.ToList().Contains(x.ResourceId))
    7171                    && t.FinishWhenChildJobsFinished == finished
    7272                    && t.ChildJobs.Any()
  • branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HeuristicLab.Services.Hive.DataAccess-3.3.csproj

    r15658 r15908  
    153153    <Compile Include="Properties\AssemblyInfo.cs" />
    154154    <None Include="Properties\AssemblyInfo.cs.frame" />
    155     <Compile Include="Settings.cs" />
    156155    <Compile Include="Settings.Designer.cs">
    157156      <AutoGen>True</AutoGen>
  • branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml

    r15671 r15908  
    3737      <Column Name="HbInterval" Type="System.Int32" DbType="Int" CanBeNull="false" />
    3838      <Column Name="OwnerUserId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
    39       <Association Name="Resource_AssignedProjectResource" Member="AssignedProjectResources" Storage="_AssignedResources" ThisKey="ResourceId" OtherKey="ResourceId" Type="AssignedProjectResource" />
     39      <Association Name="Resource_AssignedProjectResource" Member="AssignedProjectResources" ThisKey="ResourceId" OtherKey="ResourceId" Type="AssignedProjectResource" />
    4040      <Association Name="Resource_Resource" Member="ChildResources" ThisKey="ResourceId" OtherKey="ParentResourceId" Type="Resource" />
    4141      <Association Name="Resource_Downtime" Member="Downtimes" Storage="_UptimeCalendars" ThisKey="ResourceId" OtherKey="ResourceId" Type="Downtime" />
     
    261261      <Column Name="StartDate" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
    262262      <Column Name="EndDate" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
    263       <Association Name="Project_AssignedProjectResource" Member="AssignedProjectResources" Storage="_AssignedResources" ThisKey="ProjectId" OtherKey="ProjectId" Type="AssignedProjectResource" />
     263      <Association Name="Project_AssignedProjectResource" Member="AssignedProjectResources" ThisKey="ProjectId" OtherKey="ProjectId" Type="AssignedProjectResource" />
    264264      <Association Name="Project_Job" Member="Jobs" ThisKey="ProjectId" OtherKey="ProjectId" Type="Job" />
    265265      <Association Name="Project_Project" Member="ChildProjects" Storage="_Projects" ThisKey="ProjectId" OtherKey="ParentProjectId" Type="Project" />
     
    284284    </Type>
    285285  </Table>
    286   <Table Name="" Member="FactProjectInfos">
     286  <Table Name="[statistics].FactProjectInfo" Member="FactProjectInfos">
    287287    <Type Name="FactProjectInfo">
    288288      <Column Name="ProjectId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
     
    296296    </Type>
    297297  </Table>
    298   <Table Name="" Member="DimProjects">
     298  <Table Name="[statistics].DimProject" Member="DimProjects">
    299299    <Type Name="DimProject">
    300300      <Column Name="Id" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
  • branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs

    r15760 r15908  
    941941    private System.Nullable<System.Guid> _OwnerUserId;
    942942   
    943     private EntitySet<AssignedProjectResource> _AssignedResources;
     943    private EntitySet<AssignedProjectResource> _AssignedProjectResources;
    944944   
    945945    private EntitySet<Resource> _ChildResources;
     
    973973    public Resource()
    974974    {
    975       this._AssignedResources = new EntitySet<AssignedProjectResource>(new Action<AssignedProjectResource>(this.attach_AssignedResources), new Action<AssignedProjectResource>(this.detach_AssignedResources));
     975      this._AssignedProjectResources = new EntitySet<AssignedProjectResource>(new Action<AssignedProjectResource>(this.attach_AssignedProjectResources), new Action<AssignedProjectResource>(this.detach_AssignedProjectResources));
    976976      this._ChildResources = new EntitySet<Resource>(new Action<Resource>(this.attach_ChildResources), new Action<Resource>(this.detach_ChildResources));
    977977      this._UptimeCalendars = new EntitySet<Downtime>(new Action<Downtime>(this.attach_UptimeCalendars), new Action<Downtime>(this.detach_UptimeCalendars));
     
    11061106    }
    11071107   
    1108     [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedProjectResource", Storage="_AssignedResources", ThisKey="ResourceId", OtherKey="ResourceId")]
     1108    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedProjectResource", Storage="_AssignedProjectResources", ThisKey="ResourceId", OtherKey="ResourceId")]
    11091109    public EntitySet<AssignedProjectResource> AssignedProjectResources
    11101110    {
    11111111      get
    11121112      {
    1113         return this._AssignedResources;
    1114       }
    1115       set
    1116       {
    1117         this._AssignedResources.Assign(value);
     1113        return this._AssignedProjectResources;
     1114      }
     1115      set
     1116      {
     1117        this._AssignedProjectResources.Assign(value);
    11181118      }
    11191119    }
     
    12251225    }
    12261226   
    1227     private void attach_AssignedResources(AssignedProjectResource entity)
     1227    private void attach_AssignedProjectResources(AssignedProjectResource entity)
    12281228    {
    12291229      this.SendPropertyChanging();
     
    12311231    }
    12321232   
    1233     private void detach_AssignedResources(AssignedProjectResource entity)
     1233    private void detach_AssignedProjectResources(AssignedProjectResource entity)
    12341234    {
    12351235      this.SendPropertyChanging();
     
    56515651    private System.Nullable<System.DateTime> _EndDate;
    56525652   
    5653     private EntitySet<AssignedProjectResource> _AssignedResources;
     5653    private EntitySet<AssignedProjectResource> _AssignedProjectResources;
    56545654   
    56555655    private EntitySet<Job> _Jobs;
     
    56855685    public Project()
    56865686    {
    5687       this._AssignedResources = new EntitySet<AssignedProjectResource>(new Action<AssignedProjectResource>(this.attach_AssignedResources), new Action<AssignedProjectResource>(this.detach_AssignedResources));
     5687      this._AssignedProjectResources = new EntitySet<AssignedProjectResource>(new Action<AssignedProjectResource>(this.attach_AssignedProjectResources), new Action<AssignedProjectResource>(this.detach_AssignedProjectResources));
    56885688      this._Jobs = new EntitySet<Job>(new Action<Job>(this.attach_Jobs), new Action<Job>(this.detach_Jobs));
    56895689      this._Projects = new EntitySet<Project>(new Action<Project>(this.attach_Projects), new Action<Project>(this.detach_Projects));
     
    58575857    }
    58585858   
    5859     [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_AssignedProjectResource", Storage="_AssignedResources", ThisKey="ProjectId", OtherKey="ProjectId")]
     5859    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_AssignedProjectResource", Storage="_AssignedProjectResources", ThisKey="ProjectId", OtherKey="ProjectId")]
    58605860    public EntitySet<AssignedProjectResource> AssignedProjectResources
    58615861    {
    58625862      get
    58635863      {
    5864         return this._AssignedResources;
    5865       }
    5866       set
    5867       {
    5868         this._AssignedResources.Assign(value);
     5864        return this._AssignedProjectResources;
     5865      }
     5866      set
     5867      {
     5868        this._AssignedProjectResources.Assign(value);
    58695869      }
    58705870    }
     
    59635963    }
    59645964   
    5965     private void attach_AssignedResources(AssignedProjectResource entity)
     5965    private void attach_AssignedProjectResources(AssignedProjectResource entity)
    59665966    {
    59675967      this.SendPropertyChanging();
     
    59695969    }
    59705970   
    5971     private void detach_AssignedResources(AssignedProjectResource entity)
     5971    private void detach_AssignedProjectResources(AssignedProjectResource entity)
    59725972    {
    59735973      this.SendPropertyChanging();
     
    63316331  }
    63326332 
    6333   [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
     6333  [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].FactProjectInfo")]
    63346334  public partial class FactProjectInfo : INotifyPropertyChanging, INotifyPropertyChanged
    63356335  {
     
    65956595  }
    65966596 
    6597   [global::System.Data.Linq.Mapping.TableAttribute(Name="")]
     6597  [global::System.Data.Linq.Mapping.TableAttribute(Name="[statistics].DimProject")]
    65986598  public partial class DimProject : INotifyPropertyChanging, INotifyPropertyChanged
    65996599  {
  • branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive.JanitorService/3.3/ProjectInstaller.Designer.cs

    r14185 r15908  
    5050      // serviceProcessInstaller1
    5151      //
    52       this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalSystem;
     52      this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.NetworkService;
    5353      this.serviceProcessInstaller1.Installers.AddRange(new System.Configuration.Install.Installer[] {
    5454            this.serviceInstaller1});
  • branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive/3.3/HiveService.cs

    r15819 r15908  
    391391
    392392          var job = jobDao.Save(newJob);
    393           if (userPriorityDao.GetById(jobDto.OwnerUserId) == null) {
     393          if (userPriorityDao.GetById(newJob.OwnerUserId) == null) {
    394394            userPriorityDao.Save(new DA.UserPriority {
    395               UserId = jobDto.OwnerUserId,
    396               DateEnqueued = jobDto.DateCreated
     395              UserId = newJob.OwnerUserId,
     396              DateEnqueued = newJob.DateCreated
    397397            });
    398398          }
  • branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive/3.3/HiveStatisticsGenerator.cs

    r15716 r15908  
    421421        let uStats = projectUsageStats.Where(x => x.ProjectId == dimp.ProjectId).SingleOrDefault()
    422422        select new FactProjectInfo {
    423             ProjectId = dimp.ProjectId,
     423            ProjectId = dimp.Id,
    424424            DimTime = newTime,
    425425            NumTotalCores = aStats != null ? aStats.Cores : 0,
  • branches/2839_HiveProjectManagement/HeuristicLab.Services.WebApp.Maintenance/3.3/WebApi/SpaceUsageController.cs

    r14185 r15908  
    3636    public IEnumerable<TableInformation> GetHiveTableInformation() {
    3737      var tables = new List<string> {
    38         "AssignedResources",
     38        "AssignedJobResource",
     39        "AssignedProjectResource",
    3940        "Downtime",
    4041        "Job",
     
    4344        "Plugin",
    4445        "PluginData",
     46        "Project",
     47        "ProjectPermission",
    4548        "RequiredPlugins",
    4649        "Resource",
    47         "ResourcePermission",
    4850        "StateLog",
    4951        "Task",
     
    6567        "statistics.DimClient",
    6668        "statistics.DimJob",
     69        "statistics.DimProject",
    6770        "statistics.DimTime",
    6871        "statistics.DimUser",
    6972        "statistics.FactClientInfo",
     73        "statistics.FactProjectInfo",
    7074        "statistics.FactTask"
    7175      };
Note: See TracChangeset for help on using the changeset viewer.