-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
158 additions
and
573 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
154 changes: 80 additions & 74 deletions
154
src/Server/Coderr.Server.Web/Areas/Installation/Views/Sql/Index.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,81 @@ | ||
@{ | ||
ViewBag.Title = "Installation - Database configuration"; | ||
} | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-lg-6"> | ||
<h2>Database configuration</h2> | ||
|
||
<p> | ||
It's time to to configure the database. To do that you need | ||
to start by specifying which database to use. We expect that you have created | ||
a database and configured an account for it. | ||
</p> | ||
<p> | ||
Modify the connectionString named <code>'Db'</code> in <code>web.config.</code> Click on 'Test Connection' to make sure that it works. | ||
</p> | ||
<form method="post" action="@Url.Action("Connection", "Sql")" style="width: 100%" class="form-inline" id="dbForm"> | ||
<div> | ||
<br/><br/> | ||
@Html.Raw(ViewBag.PrevLink) | ||
<button id="saveButton" class="btn">Test Connection</button> | ||
@Html.Raw(ViewBag.NextLink) | ||
</div> | ||
</form> | ||
<br/> | ||
<div class="alert alert-warning" id="error" style="display: none"> | ||
</div> | ||
</div> | ||
<div class="col-lg-6"> | ||
<h2>Limitation</h2> | ||
<p> | ||
<em> | ||
Currently only Microsoft SQL Server 2012 and above is supported. Need any other DB? Feel free to Contribute | ||
by taking the SqlServer class library and convert it to a library for your favorite DB engine. | ||
</em> | ||
</p> | ||
|
||
<h3>Example</h3> | ||
<pre><code>Data Source=(localdb)\ProjectsV12;Initial Catalog=codeRR;Integrated Security=True;Connect Timeout=30;</code></pre> | ||
|
||
<h2>Tip!</h2> | ||
<p> | ||
Do you want to give permissions to the IIS app pool? Add <em>"IIS APPPOOL\YourAppPool"</em> as the windows account in SQL Server Management Studio. | ||
</p> | ||
<p> | ||
For instance <code>IIS APPPOOL\DefaultAppPool</code>. | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
@section scripts | ||
{ | ||
|
||
<script type="text/javascript"> | ||
$('#saveButton') | ||
.click(function(e) { | ||
e.preventDefault(); | ||
var conStr = encodeURIComponent($('[name="connectionString"]').val()); | ||
$ | ||
.getJSON( | ||
'@Url.RouteUrl(new {Area = "Installation", Controller = "Sql", Action = "Validate"})/?connectionString=' + conStr) | ||
.done(function(data) { | ||
if (data.result == "fail") { | ||
$('#error').text(data.reason).show(); | ||
} else { | ||
$('#error').hide(); | ||
$("#testConnection").removeClass("btn-primary"); | ||
$('#saveButton').removeAttr("disabled").addClass("btn-primary"); | ||
humane.log("Connection was successful. Click on the Next button to continue."); | ||
} | ||
}); | ||
}); | ||
</script> | ||
@{ | ||
ViewBag.Title = "Installation - Database configuration"; | ||
} | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-lg-6"> | ||
<h2>Database configuration</h2> | ||
<p> | ||
It's time to configure the database. To do that you need | ||
to start by specifying which database to use. We expect that you have created | ||
a database and configured an account for it. | ||
</p> | ||
<p> | ||
Modify the connectionString named <code>'Db'</code> in <code>web.config.</code> Click on 'Test Connection' to make sure that it works. | ||
</p> | ||
<form method="post" action="@Url.Action("Connection", "Sql")" style="width: 100%" class="form-inline" id="dbForm"> | ||
<div> | ||
<br /><br /> | ||
@Html.Raw(ViewBag.PrevLink) | ||
<button id="testConnection" class="btn btn-primary">Test Connection</button> | ||
@Html.Raw(ViewBag.NextLink) | ||
</div> | ||
</form> | ||
<br /> | ||
<div class="alert alert-warning" id="error" style="display: none"> | ||
</div> | ||
</div> | ||
<div class="col-lg-6"> | ||
<h2>Limitation</h2> | ||
<p> | ||
<em> | ||
Currently only Microsoft SQL Server 2012 and above is supported. Need any other DB? Feel free to Contribute | ||
by taking the SqlServer class library and convert it to a library for your favorite DB engine. | ||
</em> | ||
</p> | ||
<h3>Example</h3> | ||
<pre><code>Data Source=(localdb)\ProjectsV12;Initial Catalog=codeRR;Integrated Security=True;Connect Timeout=30;</code></pre> | ||
<h2>Tip!</h2> | ||
<p> | ||
Do you want to give permissions to the IIS app pool? Add <em>"IIS APPPOOL\YourAppPool"</em> as the windows account in SQL Server Management Studio. | ||
</p> | ||
<p> | ||
For instance <code>IIS APPPOOL\DefaultAppPool</code>. | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
@section scripts | ||
{ | ||
<script type="text/javascript"> | ||
$('[data-name="nextLink"]').addClass("disabled"); | ||
$('#testConnection') | ||
.click(function(e) { | ||
e.preventDefault(); | ||
var conStr = encodeURIComponent($('[name="connectionString"]').val()); | ||
var url = | ||
'@Url.RouteUrl(new {Area = "Installation", Controller = "Sql", Action = "Validate"})/?connectionString=' + | ||
conStr; | ||
$.post(url, | ||
function (data) { | ||
if (data.result === "fail") { | ||
var reason = data.reason.replace(/\\n/g, "<br>") | ||
.replace(/\\'/g, "'") | ||
.replace(/\\"/g, '"') | ||
.replace(/\\\\/g, '\\') | ||
.replace(/\\&/g, "&") | ||
.replace(/\\r/g, "r") | ||
.replace(/\\t/g, "\t") | ||
.replace(/\\b/g, "\b") | ||
.replace(/\\f/g, "\f"); | ||
$('#error').html(reason).show(); | ||
} else { | ||
$('#error').hide(); | ||
$("#testConnection").removeClass("btn-primary").addClass('btn-default'); | ||
$('[data-name="nextLink"]').removeClass('disabled').addClass('btn-primary'); | ||
humane.log("Connection was successful. Click on the Next button to continue."); | ||
} | ||
}); | ||
}); | ||
</script> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.