Feature #4: Pre-defined/Restricted Locations

Configurable list and location suggestions. Ability to restrict
locations. Shows 'occupied' locations.
This commit is contained in:
Gary Sharp
2014-02-17 21:44:34 +11:00
parent ed7caf8b4a
commit 5be747afbc
35 changed files with 2136 additions and 729 deletions
+19
View File
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Disco.Models.BI.Job
{
public enum LocationModes
{
[Display(Name = "Unrestricted")]
Unrestricted,
[Display(Name = "Optional List")]
OptionalList,
[Display(Name = "Restricted List")]
RestrictedList
}
}
+3 -1
View File
@@ -45,6 +45,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="BI\Job\LocationModes.cs" />
<Compile Include="Services\Authorization\IAuthorizationToken.cs" />
<Compile Include="Services\Authorization\IClaimNavigatorItem.cs" />
<Compile Include="Services\Authorization\IRoleToken.cs" />
@@ -103,6 +104,7 @@
<Compile Include="Repository\User\UserAttachment.cs" />
<Compile Include="Repository\User\UserDetail.cs" />
<Compile Include="Repository\User\AuthorizationRole.cs" />
<Compile Include="Services\Jobs\JobLists\JobLocationReference.cs" />
<Compile Include="Services\Jobs\JobLists\JobTableItemModel.cs" />
<Compile Include="Services\Jobs\JobLists\JobTableModel.cs" />
<Compile Include="Services\Jobs\JobLists\JobTableStatusItemModel.cs" />
@@ -166,7 +168,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_StartDate="2011/7/1" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildAction="Both" />
<UserProperties BuildVersion_BuildAction="Both" BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_StartDate="2011/7/1" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
</VisualStudio>
</ProjectExtensions>
<PropertyGroup>
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Disco.Models.Services.Jobs.JobLists
{
public class JobLocationReference
{
public string Location { get; set; }
public List<JobTableItemModel> References { get; set; }
}
}
@@ -1,4 +1,5 @@
using System;
using Disco.Models.BI.Job;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -10,8 +11,11 @@ namespace Disco.Models.UI.Config.JobPreferences
{
int LongRunningJobDaysThreshold { get; set; }
int StaleJobMinutesThreshold { get; set; }
LocationModes LocationMode { get; set; }
List<string> LocationList { get; set; }
List<KeyValuePair<int, string>> LongRunningJobDaysThresholdOptions();
List<KeyValuePair<int, string>> StaleJobMinutesThresholdOptions();
List<KeyValuePair<string, string>> LocationModeOptions();
}
}
+6 -4
View File
@@ -1,8 +1,7 @@
using System;
using Disco.Models.BI.Job;
using Disco.Models.Services.Jobs.JobLists;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Disco.Models.UI.Job
{
@@ -13,5 +12,8 @@ namespace Disco.Models.UI.Job
List<Repository.DocumentTemplate> AvailableDocumentTemplates { get; set; }
List<Repository.JobSubType> UpdatableJobSubTypes { get; set; }
List<Repository.JobQueue> AvailableQueues { get; set; }
LocationModes LocationMode { get; set; }
List<JobLocationReference> LocationOptions { get; set; }
}
}