Change: Job Queue Description not required

This commit is contained in:
Gary Sharp
2014-02-04 10:51:33 +11:00
parent 3f63281dc4
commit ad28729a85
10 changed files with 360 additions and 322 deletions
+6 -6
View File
@@ -126,9 +126,9 @@
<Compile Include="Migrations\201310282325491_DBv11.Designer.cs"> <Compile Include="Migrations\201310282325491_DBv11.Designer.cs">
<DependentUpon>201310282325491_DBv11.cs</DependentUpon> <DependentUpon>201310282325491_DBv11.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Migrations\201401270857381_DBv12.cs" /> <Compile Include="Migrations\201402032322432_DBv12.cs" />
<Compile Include="Migrations\201401270857381_DBv12.Designer.cs"> <Compile Include="Migrations\201402032322432_DBv12.Designer.cs">
<DependentUpon>201401270857381_DBv12.cs</DependentUpon> <DependentUpon>201402032322432_DBv12.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Migrations\Configuration.cs" /> <Compile Include="Migrations\Configuration.cs" />
<Compile Include="Migrations\DiscoDataMigrator.cs" /> <Compile Include="Migrations\DiscoDataMigrator.cs" />
@@ -178,8 +178,8 @@
<EmbeddedResource Include="Migrations\201310282325491_DBv11.resx"> <EmbeddedResource Include="Migrations\201310282325491_DBv11.resx">
<DependentUpon>201310282325491_DBv11.cs</DependentUpon> <DependentUpon>201310282325491_DBv11.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Migrations\201401270857381_DBv12.resx"> <EmbeddedResource Include="Migrations\201402032322432_DBv12.resx">
<DependentUpon>201401270857381_DBv12.cs</DependentUpon> <DependentUpon>201402032322432_DBv12.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx"> <EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
@@ -194,7 +194,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions> <ProjectExtensions>
<VisualStudio> <VisualStudio>
<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" /> <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" />
</VisualStudio> </VisualStudio>
</ProjectExtensions> </ProjectExtensions>
<Import Project="$(SolutionDir)\.nuget\nuget.targets" /> <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
File diff suppressed because one or more lines are too long
@@ -11,7 +11,7 @@ namespace Disco.Data.Migrations
string IMigrationMetadata.Id string IMigrationMetadata.Id
{ {
get { return "201401270857381_DBv12"; } get { return "201402032322432_DBv12"; }
} }
string IMigrationMetadata.Source string IMigrationMetadata.Source
@@ -39,7 +39,7 @@ namespace Disco.Data.Migrations
{ {
Id = c.Int(nullable: false, identity: true), Id = c.Int(nullable: false, identity: true),
Name = c.String(nullable: false, maxLength: 100), Name = c.String(nullable: false, maxLength: 100),
Description = c.String(nullable: false, maxLength: 500), Description = c.String(maxLength: 500),
Icon = c.String(nullable: false, maxLength: 25), Icon = c.String(nullable: false, maxLength: 25),
IconColour = c.String(nullable: false, maxLength: 10), IconColour = c.String(nullable: false, maxLength: 10),
DefaultSLAExpiry = c.Int(), DefaultSLAExpiry = c.Int(),
File diff suppressed because one or more lines are too long
@@ -13,7 +13,7 @@ namespace Disco.Models.Repository
public int Id { get; set; } public int Id { get; set; }
[Required, StringLength(100)] [Required, StringLength(100)]
public string Name { get; set; } public string Name { get; set; }
[Required, StringLength(500), DataType(DataType.MultilineText)] [StringLength(500), DataType(DataType.MultilineText)]
public string Description { get; set; } public string Description { get; set; }
[Required, StringLength(25)] [Required, StringLength(25)]
public string Icon { get; set; } public string Icon { get; set; }
@@ -36,8 +36,6 @@ namespace Disco.Services.Jobs.JobQueues
// Verify // Verify
if (string.IsNullOrWhiteSpace(JobQueue.Name)) if (string.IsNullOrWhiteSpace(JobQueue.Name))
throw new ArgumentException("The Job Queue Name is required"); throw new ArgumentException("The Job Queue Name is required");
if (string.IsNullOrWhiteSpace(JobQueue.Description))
throw new ArgumentException("The Job Queue Description is required");
// Name Unique // Name Unique
if (_cache.GetQueues().Count(q => q.JobQueue.Name == JobQueue.Name) > 0) if (_cache.GetQueues().Count(q => q.JobQueue.Name == JobQueue.Name) > 0)
@@ -65,8 +63,6 @@ namespace Disco.Services.Jobs.JobQueues
// Verify // Verify
if (string.IsNullOrWhiteSpace(JobQueue.Name)) if (string.IsNullOrWhiteSpace(JobQueue.Name))
throw new ArgumentException("The Job Queue Name is required"); throw new ArgumentException("The Job Queue Name is required");
if (string.IsNullOrWhiteSpace(JobQueue.Description))
throw new ArgumentException("The Job Queue Description is required");
// Name Unique // Name Unique
if (_cache.GetQueues().Count(q => q.JobQueue.Id != JobQueue.Id && q.JobQueue.Name == JobQueue.Name) > 0) if (_cache.GetQueues().Count(q => q.JobQueue.Id != JobQueue.Id && q.JobQueue.Name == JobQueue.Name) > 0)
@@ -64,7 +64,14 @@
else else
{ {
<pre> <pre>
@if (string.IsNullOrEmpty(Model.Token.JobQueue.Description))
{
<text>&lt;None&gt;</text>
}
else
{
@Model.Token.JobQueue.Description @Model.Token.JobQueue.Description
}
</pre> </pre>
} }
</td> </td>
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1567,10 +1567,10 @@
<Generator>RazorGenerator</Generator> <Generator>RazorGenerator</Generator>
<LastGenOutput>Create_Redirect.generated.cs</LastGenOutput> <LastGenOutput>Create_Redirect.generated.cs</LastGenOutput>
</None> </None>
<Content Include="Views\Job\JobParts\Queues.cshtml"> <None Include="Views\Job\JobParts\Queues.cshtml">
<Generator>RazorGenerator</Generator> <Generator>RazorGenerator</Generator>
<LastGenOutput>Queues.generated.cs</LastGenOutput> <LastGenOutput>Queues.generated.cs</LastGenOutput>
</Content> </None>
<None Include="Views\Job\JobParts\_Subject.cshtml"> <None Include="Views\Job\JobParts\_Subject.cshtml">
<Generator>RazorGenerator</Generator> <Generator>RazorGenerator</Generator>
<LastGenOutput>_Subject.generated.cs</LastGenOutput> <LastGenOutput>_Subject.generated.cs</LastGenOutput>