322 lines
11 KiB
C#
322 lines
11 KiB
C#
#pragma warning disable 1591
|
|
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
// Runtime Version:4.0.30319.42000
|
|
//
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
|
|
namespace Disco.Web.Views.InitialConfig
|
|
{
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Text;
|
|
using System.Web;
|
|
using System.Web.Helpers;
|
|
using System.Web.Mvc;
|
|
using System.Web.Mvc.Ajax;
|
|
using System.Web.Mvc.Html;
|
|
using System.Web.Routing;
|
|
using System.Web.Security;
|
|
using System.Web.UI;
|
|
using System.Web.WebPages;
|
|
using Disco;
|
|
using Disco.Models.Repository;
|
|
using Disco.Services;
|
|
using Disco.Services.Authorization;
|
|
using Disco.Services.Web;
|
|
using Disco.Web;
|
|
using Disco.Web.Extensions;
|
|
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/InitialConfig/Database.cshtml")]
|
|
public partial class Database : Disco.Services.Web.WebViewPage<Disco.Web.Models.InitialConfig.DatabaseModel>
|
|
{
|
|
public Database()
|
|
{
|
|
}
|
|
public override void Execute()
|
|
{
|
|
|
|
#line 2 "..\..\Views\InitialConfig\Database.cshtml"
|
|
|
|
ViewBag.Title = null;
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n<h1>");
|
|
|
|
|
|
#line 5 "..\..\Views\InitialConfig\Database.cshtml"
|
|
Write(CommonHelpers.Breadcrumbs(Html.ToBreadcrumb("Initial Configuration", MVC.InitialConfig.Index(), "Database")));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</h1>\r\n");
|
|
|
|
|
|
#line 6 "..\..\Views\InitialConfig\Database.cshtml"
|
|
using (Html.BeginForm())
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 8 "..\..\Views\InitialConfig\Database.cshtml"
|
|
Write(Html.ValidationSummary(true));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 8 "..\..\Views\InitialConfig\Database.cshtml"
|
|
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"form\"");
|
|
|
|
WriteLiteral(" style=\"width: 650px\"");
|
|
|
|
WriteLiteral(">\r\n <h2>SQL Server Connection</h2>\r\n <table>\r\n <tr>\r\n " +
|
|
" <th");
|
|
|
|
WriteLiteral(" style=\"width: 150px;\"");
|
|
|
|
WriteLiteral(">\r\n Server:\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 18 "..\..\Views\InitialConfig\Database.cshtml"
|
|
Write(Html.EditorFor(m => m.Server));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 18 "..\..\Views\InitialConfig\Database.cshtml"
|
|
Write(Html.ValidationMessageFor(m => m.Server));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <div");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">\r\n If the default instance of SQL Server is not being use" +
|
|
"d, include the instance name.<br />\r\n For example: <span");
|
|
|
|
WriteLiteral(" class=\"code\"");
|
|
|
|
WriteLiteral(">\"SERVER_NAME\\INSTANCE_NAME\"</span>\r\n </div>\r\n " +
|
|
"</td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
|
|
" Database Name:\r\n </th>\r\n <td>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 30 "..\..\Views\InitialConfig\Database.cshtml"
|
|
Write(Html.EditorFor(m => m.DatabaseName));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 30 "..\..\Views\InitialConfig\Database.cshtml"
|
|
Write(Html.ValidationMessageFor(m => m.DatabaseName));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <div");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(@">
|
|
An attempt will be made to create a database with this name if it does not exist.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
Authentication Method:
|
|
</th>
|
|
<td>
|
|
");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 41 "..\..\Views\InitialConfig\Database.cshtml"
|
|
Write(Html.DropDownListFor(m => m.AuthMethod, Model.AuthMethods));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 41 "..\..\Views\InitialConfig\Database.cshtml"
|
|
Write(Html.ValidationMessageFor(m => m.AuthMethod));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n <div");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">\r\n Integrated Authentication is recommended.<br />\r\n " +
|
|
" To use Integrated Authentication ensure the <span");
|
|
|
|
WriteLiteral(" class=\"code\"");
|
|
|
|
WriteLiteral(">DiscoServiceAccount</span> domain user has the <span");
|
|
|
|
WriteLiteral(" class=\"code\"");
|
|
|
|
WriteLiteral(">db_owner</span> role over the database, or <span");
|
|
|
|
WriteLiteral(" class=\"code\"");
|
|
|
|
WriteLiteral(">sysadmin</span> role if creating a new database.\r\n </div>\r\n " +
|
|
" <div");
|
|
|
|
WriteLiteral(" id=\"auth_Sql\"");
|
|
|
|
WriteLiteral(" style=\"margin-top: 15px; display: none;\"");
|
|
|
|
WriteLiteral(">\r\n <h4>SQL Authentication Credentials</h4>\r\n " +
|
|
" <div");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral(">\r\n The following credentials will be stored in clear-" +
|
|
"text.\r\n </div>\r\n <table");
|
|
|
|
WriteLiteral(" class=\"sub\"");
|
|
|
|
WriteLiteral(">\r\n <tr>\r\n <th>Username" +
|
|
":</th>\r\n <td>");
|
|
|
|
|
|
#line 54 "..\..\Views\InitialConfig\Database.cshtml"
|
|
Write(Html.EditorFor(m => m.Auth_SQL_Username));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 54 "..\..\Views\InitialConfig\Database.cshtml"
|
|
Write(Html.ValidationMessageFor(m => m.Auth_SQL_Username));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</td>\r\n </tr>\r\n <tr>\r\n " +
|
|
" <th>Password:</th>\r\n <" +
|
|
"td>");
|
|
|
|
|
|
#line 58 "..\..\Views\InitialConfig\Database.cshtml"
|
|
Write(Html.EditorFor(m => m.Auth_SQL_Password));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 58 "..\..\Views\InitialConfig\Database.cshtml"
|
|
Write(Html.ValidationMessageFor(m => m.Auth_SQL_Password));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</td>\r\n </tr>\r\n </table>\r\n " +
|
|
" </div>\r\n </td>\r\n </tr>\r\n </table" +
|
|
">\r\n </div>\r\n");
|
|
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"actionBar\"");
|
|
|
|
WriteLiteral(">\r\n <input");
|
|
|
|
WriteLiteral(" id=\"submitForm\"");
|
|
|
|
WriteLiteral(" type=\"submit\"");
|
|
|
|
WriteLiteral(" class=\"button\"");
|
|
|
|
WriteLiteral(" value=\"Continue\"");
|
|
|
|
WriteLiteral(" />\r\n </div>\r\n");
|
|
|
|
|
|
#line 69 "..\..\Views\InitialConfig\Database.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<div");
|
|
|
|
WriteLiteral(" id=\"dialogWait\"");
|
|
|
|
WriteLiteral(" title=\"Please Wait\"");
|
|
|
|
WriteLiteral(">\r\n <h2>\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-lg fa-cog fa-spin\"");
|
|
|
|
WriteLiteral("></i>\r\n Building and Validating Database\r\n </h2>\r\n <div>Please wait " +
|
|
"while the Disco ICT database is created and/or validated</div>\r\n</div>\r\n<script>" +
|
|
"\r\n (function () {\r\n\r\n $(function () {\r\n var initialized = f" +
|
|
"alse;\r\n\r\n $(\'#AuthMethod\').change(function () {\r\n $thi" +
|
|
"s = $(this);\r\n if ($this.val() === \'SQL\') {\r\n " +
|
|
"// Enable Validation\r\n $(\'#Auth_SQL_Username\').attr(\'data-val" +
|
|
"\', true).attr(\'data-val-required\', \'The Username is required\');\r\n " +
|
|
" $(\'#Auth_SQL_Password\').attr(\'data-val\', true).attr(\'data-val-required\', \'T" +
|
|
"he Password is required\');\r\n\r\n $(\'#auth_Sql\').slideDown();\r\n " +
|
|
" } else {\r\n $(\'#Auth_SQL_Username\').attr(\'data-" +
|
|
"val\', false);\r\n $(\'#Auth_SQL_Password\').attr(\'data-val\', fals" +
|
|
"e);\r\n\r\n $(\'#auth_Sql\').slideUp();\r\n }\r\n\r\n " +
|
|
" // Rebuild Validation\r\n if (initialized) {\r\n " +
|
|
" $.validator.unobtrusive.reparse(\'#auth_Sql\');\r\n }\r\n " +
|
|
" }).change();\r\n\r\n $(\'#dialogWait\').dialog({\r\n a" +
|
|
"utoOpen: false,\r\n draggable: false,\r\n modal: true," +
|
|
"\r\n resizable: false,\r\n width: 400,\r\n " +
|
|
" height: 150,\r\n closeOnEscape: false\r\n }).closest(\'.u" +
|
|
"i-dialog\').find(\'.ui-dialog-titlebar-close\').hide();\r\n\r\n $(\'#submitFo" +
|
|
"rm\').closest(\'form\').submit(function () {\r\n if ($(this).valid()) " +
|
|
"{\r\n $(\'#dialogWait\').dialog(\'open\');\r\n }\r\n " +
|
|
" return true;\r\n });\r\n\r\n initialized = true;\r\n " +
|
|
" });\r\n\r\n })();\r\n</script>\r\n");
|
|
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore 1591
|