From ed87b27708cff56f765b4d217b676b271673d293 Mon Sep 17 00:00:00 2001 From: Gary Sharp Date: Thu, 6 Jun 2013 12:09:14 +1000 Subject: [PATCH] Fix: Device Profile Creation Regression caused by b17ed91fb00c6606df94b407fc0355a8b43deb76 --- Disco.BI/Properties/AssemblyInfo.cs | 4 +-- Disco.Data/Properties/AssemblyInfo.cs | 4 +-- Disco.Models/Properties/AssemblyInfo.cs | 4 +-- Disco.Services/Properties/AssemblyInfo.cs | 4 +-- .../Properties/AssemblyInfo.cs | 4 +-- .../Controllers/DeviceProfileController.cs | 10 ++++++- .../Config/Views/DeviceProfile/Create.cshtml | 4 +-- .../Views/DeviceProfile/Create.generated.cs | 30 +++++++++++-------- Disco.Web/Properties/AssemblyInfo.cs | 4 +-- 9 files changed, 41 insertions(+), 27 deletions(-) diff --git a/Disco.BI/Properties/AssemblyInfo.cs b/Disco.BI/Properties/AssemblyInfo.cs index a2b38375..a0613423 100644 --- a/Disco.BI/Properties/AssemblyInfo.cs +++ b/Disco.BI/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0603.2017")] -[assembly: AssemblyFileVersion("1.2.0603.2017")] \ No newline at end of file +[assembly: AssemblyVersion("1.2.0606.1156")] +[assembly: AssemblyFileVersion("1.2.0606.1156")] \ No newline at end of file diff --git a/Disco.Data/Properties/AssemblyInfo.cs b/Disco.Data/Properties/AssemblyInfo.cs index 2ca87e2d..0e6c2530 100644 --- a/Disco.Data/Properties/AssemblyInfo.cs +++ b/Disco.Data/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0603.2017")] -[assembly: AssemblyFileVersion("1.2.0603.2017")] \ No newline at end of file +[assembly: AssemblyVersion("1.2.0606.1156")] +[assembly: AssemblyFileVersion("1.2.0606.1156")] \ No newline at end of file diff --git a/Disco.Models/Properties/AssemblyInfo.cs b/Disco.Models/Properties/AssemblyInfo.cs index f5cbcc3c..313d1400 100644 --- a/Disco.Models/Properties/AssemblyInfo.cs +++ b/Disco.Models/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0603.2017")] -[assembly: AssemblyFileVersion("1.2.0603.2017")] \ No newline at end of file +[assembly: AssemblyVersion("1.2.0606.1156")] +[assembly: AssemblyFileVersion("1.2.0606.1156")] \ No newline at end of file diff --git a/Disco.Services/Properties/AssemblyInfo.cs b/Disco.Services/Properties/AssemblyInfo.cs index ac698c56..d537bf3d 100644 --- a/Disco.Services/Properties/AssemblyInfo.cs +++ b/Disco.Services/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0603.2017")] -[assembly: AssemblyFileVersion("1.2.0603.2017")] \ No newline at end of file +[assembly: AssemblyVersion("1.2.0606.1156")] +[assembly: AssemblyFileVersion("1.2.0606.1156")] \ No newline at end of file diff --git a/Disco.Web.Extensions/Properties/AssemblyInfo.cs b/Disco.Web.Extensions/Properties/AssemblyInfo.cs index c78a7e0e..17e2f1d1 100644 --- a/Disco.Web.Extensions/Properties/AssemblyInfo.cs +++ b/Disco.Web.Extensions/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0603.2017")] -[assembly: AssemblyFileVersion("1.2.0603.2017")] \ No newline at end of file +[assembly: AssemblyVersion("1.2.0606.1156")] +[assembly: AssemblyFileVersion("1.2.0606.1156")] \ No newline at end of file diff --git a/Disco.Web/Areas/Config/Controllers/DeviceProfileController.cs b/Disco.Web/Areas/Config/Controllers/DeviceProfileController.cs index e5676c38..6704794e 100644 --- a/Disco.Web/Areas/Config/Controllers/DeviceProfileController.cs +++ b/Disco.Web/Areas/Config/Controllers/DeviceProfileController.cs @@ -10,6 +10,7 @@ using Disco.Services.Plugins.Features.CertificateProvider; using Disco.Services.Plugins; using Disco.Services.Plugins.Features.UIExtension; using Disco.Models.UI.Config.DeviceProfile; +using Disco.Models.Repository; namespace Disco.Web.Areas.Config.Controllers { @@ -65,7 +66,14 @@ namespace Disco.Web.Areas.Config.Controllers public virtual ActionResult Create() { - var m = new Models.DeviceProfile.CreateModel(); + var m = new Models.DeviceProfile.CreateModel() + { + DeviceProfile = new DeviceProfile() + { + ComputerNameTemplate = "DeviceProfile.ShortName + '-' + SerialNumber", + ProvisionADAccount = true + } + }; // UI Extensions UIExtensions.ExecuteExtensions(this.ControllerContext, m); diff --git a/Disco.Web/Areas/Config/Views/DeviceProfile/Create.cshtml b/Disco.Web/Areas/Config/Views/DeviceProfile/Create.cshtml index 40b53f5d..61705f4c 100644 --- a/Disco.Web/Areas/Config/Views/DeviceProfile/Create.cshtml +++ b/Disco.Web/Areas/Config/Views/DeviceProfile/Create.cshtml @@ -29,8 +29,8 @@ - - + @Html.HiddenFor(model => model.DeviceProfile.ComputerNameTemplate) + @Html.HiddenFor(model => model.DeviceProfile.ProvisionADAccount)

diff --git a/Disco.Web/Areas/Config/Views/DeviceProfile/Create.generated.cs b/Disco.Web/Areas/Config/Views/DeviceProfile/Create.generated.cs index 052e53e5..496a21a5 100644 --- a/Disco.Web/Areas/Config/Views/DeviceProfile/Create.generated.cs +++ b/Disco.Web/Areas/Config/Views/DeviceProfile/Create.generated.cs @@ -31,7 +31,7 @@ namespace Disco.Web.Areas.Config.Views.DeviceProfile using Disco.Web; using Disco.Web.Extensions; - [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.4.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")] [System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceProfile/Create.cshtml")] public partial class Create : System.Web.Mvc.WebViewPage { @@ -124,23 +124,29 @@ WriteLiteral("
"); #line default #line hidden -WriteLiteral("\r\n \r\n \r\n \r\n \r\n \r\n \r\n"); -WriteLiteral(" type=\"hidden\""); +WriteLiteral(" "); -WriteLiteral(" name=\"ComputerNameTemplate\""); + + #line 32 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml" + Write(Html.HiddenFor(model => model.DeviceProfile.ComputerNameTemplate)); -WriteLiteral(" value=\"DeviceProfile.ShortName + \'-\' + SerialNumber\""); + + #line default + #line hidden +WriteLiteral("\r\n"); -WriteLiteral(" />\r\n model.DeviceProfile.ProvisionADAccount)); -WriteLiteral(" name=\"ProvisionADAccount\""); - -WriteLiteral(" value=\"True\""); - -WriteLiteral(" />\r\n