Fixes U4-1079, Installer database step gives no error on failure
This commit is contained in:
@@ -1,353 +1,359 @@
|
||||
<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="database.ascx.cs" Inherits="umbraco.presentation.install.steps.detect"
|
||||
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
|
||||
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
|
||||
<asp:PlaceHolder ID="settings" runat="server" Visible="true">
|
||||
<!-- database box -->
|
||||
<div class="tab main-tabinfo">
|
||||
<div class="container">
|
||||
<h1>Database configuration</h1>
|
||||
<p>
|
||||
<strong>To complete this step you will either need a blank database or, if you do not have a blank database available, choose the SQL CE 4 embedded
|
||||
database (This is the recommended approach for first time users or if you are unsure).</strong></p>
|
||||
<!-- database box -->
|
||||
<div class="tab main-tabinfo">
|
||||
<div class="container">
|
||||
<h1>Database configuration</h1>
|
||||
<p>
|
||||
If you are not using the SQL CE 4 embedded database you will need the connection details for your database, such as the
|
||||
"connection string". You may need to contact your system administrator or web host for this information.</p>
|
||||
</div>
|
||||
<!-- database -->
|
||||
<div class="database-hold">
|
||||
<form action="#">
|
||||
<fieldset>
|
||||
<div class="step">
|
||||
<div class="container">
|
||||
<p>
|
||||
<strong>1. Select which database option best fits you:</strong></p>
|
||||
<strong>To complete this step you will either need a blank database or, if you do not have a blank database available, choose the SQL CE 4 embedded
|
||||
database (This is the recommended approach for first time users or if you are unsure).</strong>
|
||||
</p>
|
||||
<p>
|
||||
If you are not using the SQL CE 4 embedded database you will need the connection details for your database, such as the
|
||||
"connection string". You may need to contact your system administrator or web host for this information.
|
||||
</p>
|
||||
</div>
|
||||
<!-- database -->
|
||||
<div class="database-hold">
|
||||
<form action="#">
|
||||
<fieldset>
|
||||
<div class="step">
|
||||
<div class="container">
|
||||
<p>
|
||||
<strong>1. Select which database option best fits you:</strong>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<input type="radio" id="databaseOptionBlank" name="database" value="blank" />
|
||||
<label for="databaseOptionBlank">I already have a blank SQL Server, SQL Azure or MySQL database</label>
|
||||
<li>
|
||||
<input type="radio" id="databaseOptionBlank" name="database" value="blank" />
|
||||
<label for="databaseOptionBlank">I already have a blank SQL Server, SQL Azure or MySQL database</label>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" id="databaseOptionEmbedded" name="database" value="embedded" />
|
||||
<label for="databaseOptionEmbedded">I want to use SQL CE 4, a free, quick-and-simple embedded database</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" id="databaseOptionEmbedded" name="database" value="embedded" />
|
||||
<label for="databaseOptionEmbedded">I want to use SQL CE 4, a free, quick-and-simple embedded database</label>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" id="databaseOptionAdvanced" name="database" value="advanced" />
|
||||
<label for="databaseOptionAdvanced">I'm an advanced user, let me put in the connection string</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" id="databaseOptionAdvanced" name="database" value="advanced" />
|
||||
<label for="databaseOptionAdvanced">I'm an advanced user, let me put in the connection string</label>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" id="databaseOptionHelp" name="database" value="help" />
|
||||
<label for="databaseOptionHelp">I need help</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" id="databaseOptionHelp" name="database" value="help" />
|
||||
<label for="databaseOptionHelp">I need help</label>
|
||||
|
||||
</li>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- database options -->
|
||||
<div id="database-options">
|
||||
|
||||
|
||||
<!-- blank option -->
|
||||
<div id="database-blank" class="database-option">
|
||||
|
||||
<div class="step">
|
||||
<div class="container">
|
||||
<p>
|
||||
<strong>2. Now choose your database type below.</strong></p>
|
||||
<div class="select">
|
||||
<asp:DropDownList runat="server" ID="DatabaseType" CssClass="sel">
|
||||
<asp:ListItem Value="" Text="Please choose" Selected="True" />
|
||||
<asp:ListItem Value="SqlServer" Text="Microsoft SQL Server" />
|
||||
<asp:ListItem Value="SqlAzure" Text="SQL Azure" />
|
||||
<asp:ListItem Value="MySql" Text="MySQL" />
|
||||
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="step" id="database-blank-inputs">
|
||||
<div class="container">
|
||||
<p class="instructionText">
|
||||
<strong>3. Connection details:</strong> Please fill out the connection information for your database.</p>
|
||||
<div class="instruction-hold">
|
||||
|
||||
|
||||
<asp:PlaceHolder ID="ph_dbError" runat="server" Visible="false">
|
||||
<div class="row error">
|
||||
<p class="text">
|
||||
<strong>
|
||||
<asp:Literal ID="lt_dbError" runat="server" /></strong></p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () { showDatabaseSettings(); });
|
||||
</script>
|
||||
</asp:PlaceHolder>
|
||||
<div class="row sql" runat="server" id="DatabaseServerItem">
|
||||
<asp:Label runat="server" AssociatedControlID="DatabaseServer" ID="DatabaseServerLabel">Server:</asp:Label>
|
||||
<span>
|
||||
<asp:TextBox runat="server" CssClass="text" ID="DatabaseServer" /></span>
|
||||
</div>
|
||||
<div class="row sql" runat="server" id="DatabaseNameItem">
|
||||
<asp:Label runat="server" AssociatedControlID="DatabaseName" ID="DatabaseNameLabel">Database name:</asp:Label>
|
||||
<span>
|
||||
<asp:TextBox runat="server" CssClass="text" ID="DatabaseName" /></span>
|
||||
</div>
|
||||
<div class="row sql" runat="server" id="DatabaseUsernameItem">
|
||||
<asp:Label runat="server" AssociatedControlID="DatabaseUsername" ID="DatabaseUsernameLabel">Username:</asp:Label>
|
||||
<span>
|
||||
<asp:TextBox runat="server" CssClass="text" ID="DatabaseUsername" /></span>
|
||||
</div>
|
||||
<div class="row sql" runat="server" id="DatabasePasswordItem">
|
||||
<asp:Label runat="server" AssociatedControlID="DatabasePassword" ID="DatabasePasswordLabel">Password:</asp:Label>
|
||||
<span>
|
||||
<asp:TextBox runat="server" ID="DatabasePassword" CssClass="text" TextMode="Password" /></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- btn box -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- embedded option -->
|
||||
<div id="database-embedded" class="database-option">
|
||||
<div class="step">
|
||||
<div class="container">
|
||||
|
||||
<p class="instructionText">
|
||||
<strong>2. Simple file-based database:</strong></p>
|
||||
<div class="instruction-hold">
|
||||
<div class="row embeddedError" runat="server" id="embeddedFilesMissing" style="display: none;">
|
||||
<p>
|
||||
<strong>Missing files:</strong> SQL CE 4 requires that you manually add the SQL
|
||||
CE 4 runtime to your Umbraco installation.<br />
|
||||
You can either use the following <a href="http://our.umbraco.org/wiki/install-and-setup/using-sql-ce-4-with-umbraco-46"
|
||||
target="_blank">instructions</a> on how to add SQL CE 4 or select another database type from the dropdown above.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="row embedded" style="display: none;">
|
||||
<p>
|
||||
<strong>Nothing to configure:</strong>SQL CE 4 does not require any configuration,
|
||||
simply click the "install" button to continue.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- advanced option -->
|
||||
<div id="database-advanced" class="database-option">
|
||||
<div class="step">
|
||||
<div class="container">
|
||||
<p>
|
||||
<strong>2. Connection details:</strong> Please fill out the connection information for your database.</strong></p>
|
||||
<!-- database options -->
|
||||
<div id="database-options">
|
||||
|
||||
<div class="instruction-hold">
|
||||
|
||||
<div class="row custom" runat="server" id="DatabaseConnectionString">
|
||||
<asp:Label runat="server" AssociatedControlID="ConnectionString" ID="ConnectionStringLabel">Connection string:</asp:Label>
|
||||
<span class="textarea">
|
||||
<asp:TextBox runat="server" TextMode="MultiLine" CssClass="text textarea" ID="ConnectionString" /></span>
|
||||
</div>
|
||||
<div class="row custom check-hold">
|
||||
|
||||
<!-- blank option -->
|
||||
<div id="database-blank" class="database-option">
|
||||
|
||||
<div class="step">
|
||||
<div class="container">
|
||||
<p>
|
||||
Example: <tt>datalayer=MySQL;server=192.168.2.8;user id=user;password=***;database=umbraco</tt></p>
|
||||
</div>
|
||||
<strong>2. Now choose your database type below.</strong>
|
||||
</p>
|
||||
<div class="select">
|
||||
<asp:DropDownList runat="server" ID="DatabaseType" CssClass="sel">
|
||||
<asp:ListItem Value="" Text="Please choose" Selected="True" />
|
||||
<asp:ListItem Value="SqlServer" Text="Microsoft SQL Server" />
|
||||
<asp:ListItem Value="SqlAzure" Text="SQL Azure" />
|
||||
<asp:ListItem Value="MySql" Text="MySQL" />
|
||||
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="step" id="database-blank-inputs">
|
||||
<div class="container">
|
||||
<p class="instructionText">
|
||||
<strong>3. Connection details:</strong> Please fill out the connection information for your database.
|
||||
</p>
|
||||
<div class="instruction-hold">
|
||||
|
||||
|
||||
<asp:PlaceHolder ID="ph_dbError" runat="server" Visible="false">
|
||||
<div class="row error">
|
||||
<p class="text">
|
||||
<strong>
|
||||
<asp:Literal ID="lt_dbError" runat="server" /></strong>
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () { showDatabaseSettings(); });
|
||||
</script>
|
||||
</asp:PlaceHolder>
|
||||
<div class="row sql" runat="server" id="DatabaseServerItem">
|
||||
<asp:Label runat="server" AssociatedControlID="DatabaseServer" ID="DatabaseServerLabel">Server:</asp:Label>
|
||||
<span>
|
||||
<asp:TextBox runat="server" CssClass="text" ID="DatabaseServer" /></span>
|
||||
</div>
|
||||
<div class="row sql" runat="server" id="DatabaseNameItem">
|
||||
<asp:Label runat="server" AssociatedControlID="DatabaseName" ID="DatabaseNameLabel">Database name:</asp:Label>
|
||||
<span>
|
||||
<asp:TextBox runat="server" CssClass="text" ID="DatabaseName" /></span>
|
||||
</div>
|
||||
<div class="row sql" runat="server" id="DatabaseUsernameItem">
|
||||
<asp:Label runat="server" AssociatedControlID="DatabaseUsername" ID="DatabaseUsernameLabel">Username:</asp:Label>
|
||||
<span>
|
||||
<asp:TextBox runat="server" CssClass="text" ID="DatabaseUsername" /></span>
|
||||
</div>
|
||||
<div class="row sql" runat="server" id="DatabasePasswordItem">
|
||||
<asp:Label runat="server" AssociatedControlID="DatabasePassword" ID="DatabasePasswordLabel">Password:</asp:Label>
|
||||
<span>
|
||||
<asp:TextBox runat="server" ID="DatabasePassword" CssClass="text" TextMode="Password" /></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- btn box -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- help option -->
|
||||
<div id="database-help" class="database-option">
|
||||
<div class="step">
|
||||
<div class="container">
|
||||
<p>
|
||||
<strong>2. Getting a database setup for umbraco.</strong><br />
|
||||
For first time users, we recommend you select "quick-and-simple embedded database".
|
||||
<!-- embedded option -->
|
||||
<div id="database-embedded" class="database-option">
|
||||
<div class="step">
|
||||
<div class="container">
|
||||
|
||||
<p class="instructionText">
|
||||
<strong>2. Simple file-based database:</strong>
|
||||
</p>
|
||||
<div class="instruction-hold">
|
||||
<div class="row embeddedError" runat="server" id="embeddedFilesMissing" style="display: none;">
|
||||
<p>
|
||||
<strong>Missing files:</strong> SQL CE 4 requires that you manually add the SQL
|
||||
CE 4 runtime to your Umbraco installation.<br />
|
||||
You can either use the following <a href="http://our.umbraco.org/wiki/install-and-setup/using-sql-ce-4-with-umbraco-46"
|
||||
target="_blank">instructions</a> on how to add SQL CE 4 or select another database type from the dropdown above.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="row embedded" style="display: none;">
|
||||
<p>
|
||||
<strong>Nothing to configure:</strong>SQL CE 4 does not require any configuration,
|
||||
simply click the "install" button to continue.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- advanced option -->
|
||||
<div id="database-advanced" class="database-option">
|
||||
<div class="step">
|
||||
<div class="container">
|
||||
<p>
|
||||
<strong>2. Connection details:</strong> Please fill out the connection information for your database.</strong>
|
||||
</p>
|
||||
|
||||
<div class="instruction-hold">
|
||||
|
||||
<div class="row custom" runat="server" id="DatabaseConnectionString">
|
||||
<asp:Label runat="server" AssociatedControlID="ConnectionString" ID="ConnectionStringLabel">Connection string:</asp:Label>
|
||||
<span class="textarea">
|
||||
<asp:TextBox runat="server" TextMode="MultiLine" CssClass="text textarea" ID="ConnectionString" /></span>
|
||||
</div>
|
||||
<div class="row custom check-hold">
|
||||
<p>
|
||||
Example: <tt>datalayer=MySQL;server=192.168.2.8;user id=user;password=***;database=umbraco</tt>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- help option -->
|
||||
<div id="database-help" class="database-option">
|
||||
<div class="step">
|
||||
<div class="container">
|
||||
<p>
|
||||
<strong>2. Getting a database setup for umbraco.</strong><br />
|
||||
For first time users, we recommend you select "quick-and-simple embedded database".
|
||||
This will install an easy to use database, that does
|
||||
not require any additional software to use.<br />
|
||||
Alternatively, you can install Microsoft SQL Server, which will require a bit more
|
||||
Alternatively, you can install Microsoft SQL Server, which will require a bit more
|
||||
work to get up and running.<br />
|
||||
We have provided a step-by-step guide in the video instructions below.
|
||||
</p>
|
||||
<span class="btn-link"><a href="http://umbraco.org/getting-started" target="_blank">Open video instructions</a></span>
|
||||
We have provided a step-by-step guide in the video instructions below.
|
||||
</p>
|
||||
<span class="btn-link"><a href="http://umbraco.org/getting-started" target="_blank">Open video instructions</a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="btn-box installbtn">
|
||||
<div class="t"> </div>
|
||||
<asp:LinkButton runat="server" class="single-tab submit btn-install" OnClick="saveDBConfig"><span>install</span> </asp:LinkButton>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="btn-box installbtn">
|
||||
<div class="t"> </div>
|
||||
<asp:LinkButton runat="server" class="single-tab submit btn-install" onclick="saveDBConfig"><span>install</span> </asp:LinkButton>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var hasEmbeddedDlls = <%= HasEmbeddedDatabaseFiles.ToString().ToLower() %>;
|
||||
var currentVersion = '<%=umbraco.GlobalSettings.CurrentVersion%>';
|
||||
var configured = <%= IsConfigured.ToString().ToLower() %>;
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var hasEmbeddedDlls = <%= HasEmbeddedDatabaseFiles.ToString().ToLower() %>;
|
||||
var currentVersion = '<%=umbraco.GlobalSettings.CurrentVersion%>';
|
||||
var configured = <%= IsConfigured.ToString().ToLower() %>;
|
||||
|
||||
jQuery(document).ready(function(){
|
||||
<asp:literal runat="server" id="jsVars" />
|
||||
jQuery(document).ready(function(){
|
||||
<asp:literal runat="server" id="jsVars" />
|
||||
|
||||
|
||||
|
||||
$("input[name='database']").change(function()
|
||||
$("input[name='database']").change(function()
|
||||
{
|
||||
|
||||
switch($(this).val())
|
||||
{
|
||||
|
||||
switch($(this).val())
|
||||
{
|
||||
case "blank":
|
||||
|
||||
$(".database-option").hide();
|
||||
$("#database-blank").show();
|
||||
$(".database-option").hide();
|
||||
$("#database-blank").show();
|
||||
$(".installbtn").show();
|
||||
|
||||
break;
|
||||
break;
|
||||
case "embedded":
|
||||
$(".database-option").hide();
|
||||
$("#database-embedded").show();
|
||||
$(".database-option").hide();
|
||||
$("#database-embedded").show();
|
||||
|
||||
if (!hasEmbeddedDlls) {
|
||||
if (!hasEmbeddedDlls) {
|
||||
$('.embeddedError').show();
|
||||
$(".installbtn").hide();
|
||||
}
|
||||
else {
|
||||
}
|
||||
else {
|
||||
$('.embedded').show();
|
||||
$(".installbtn").show();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
case "advanced":
|
||||
$(".database-option").hide();
|
||||
$("#database-advanced").show();
|
||||
$(".installbtn").show();
|
||||
break;
|
||||
$(".database-option").hide();
|
||||
$("#database-advanced").show();
|
||||
$(".installbtn").show();
|
||||
break;
|
||||
case "help":
|
||||
$(".database-option").hide();
|
||||
$("#database-help").show();
|
||||
$(".installbtn").hide();
|
||||
break;
|
||||
}
|
||||
$(".database-option").hide();
|
||||
$("#database-help").show();
|
||||
$(".installbtn").hide();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
<asp:Literal id="dbinit" runat="server"></asp:Literal>
|
||||
|
||||
});
|
||||
|
||||
<asp:Literal id="dbinit" runat="server"></asp:Literal>
|
||||
|
||||
});
|
||||
</script>
|
||||
</asp:PlaceHolder>
|
||||
|
||||
<asp:PlaceHolder ID="installing" runat="server" Visible="false">
|
||||
<!-- installing umbraco -->
|
||||
<div class="tab install-tab" id="datebase-tab">
|
||||
<div class="container">
|
||||
<h1>
|
||||
Installing Umbraco</h1>
|
||||
<p>
|
||||
The Umbraco database is being configured. This process populates your chosen database with a blank Umbraco instance.</p>
|
||||
<div class="loader">
|
||||
<div class="hold">
|
||||
<div class="progress-bar">
|
||||
</div>
|
||||
<span class="progress-bar-value">0%</span>
|
||||
</div>
|
||||
<strong></strong>
|
||||
</div>
|
||||
</div>
|
||||
<!-- btn box -->
|
||||
<footer class="btn-box" style="display: none;">
|
||||
<div class="t"> </div>
|
||||
<asp:LinkButton class="btn-step btn btn-continue" runat="server" OnClick="gotoNextStep"><span>Continue</span></asp:LinkButton>
|
||||
<asp:LinkButton class="btn-step btn btn-back" style="display: none;" runat="server" OnClick="gotoSettings"><span>Back</span></asp:LinkButton>
|
||||
</footer>
|
||||
</div>
|
||||
<!-- installing umbraco -->
|
||||
<div class="tab install-tab" id="datebase-tab">
|
||||
<div class="container">
|
||||
<h1>Installing Umbraco</h1>
|
||||
<p>
|
||||
The Umbraco database is being configured. This process populates your chosen database with a blank Umbraco instance.
|
||||
</p>
|
||||
<div class="loader">
|
||||
<div class="hold">
|
||||
<div class="progress-bar">
|
||||
</div>
|
||||
<span class="progress-bar-value">0%</span>
|
||||
</div>
|
||||
<strong></strong>
|
||||
</div>
|
||||
</div>
|
||||
<!-- btn box -->
|
||||
<footer class="btn-box" style="display: none;">
|
||||
<div class="t"> </div>
|
||||
<asp:LinkButton class="btn-step btn btn-continue" runat="server" OnClick="gotoNextStep"><span>Continue</span></asp:LinkButton>
|
||||
<asp:LinkButton class="btn-step btn btn-back" Style="display: none;" runat="server" OnClick="gotoSettings"><span>Back</span></asp:LinkButton>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var intervalId = 0;
|
||||
<script type="text/javascript">
|
||||
var intervalId = 0;
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
intervalId = setInterval("progressBarCallback()", 1000);
|
||||
jQuery(".btn-box").hide();
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
data: '{}',
|
||||
dataType: 'json',
|
||||
url: 'utills/p.aspx/installOrUpgrade'
|
||||
});
|
||||
});
|
||||
jQuery(document).ready(function () {
|
||||
intervalId = setInterval("progressBarCallback()", 1000);
|
||||
jQuery(".btn-box").hide();
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
data: '{}',
|
||||
dataType: 'json',
|
||||
url: 'utills/p.aspx/installOrUpgrade'
|
||||
});
|
||||
});
|
||||
|
||||
function progressBarCallback() {
|
||||
jQuery.getJSON('utills/p.aspx?feed=progress', function (data) {
|
||||
function progressBarCallback() {
|
||||
jQuery.getJSON('utills/p.aspx?feed=progress', function (data) {
|
||||
|
||||
updateProgressBar(data.percentage);
|
||||
updateStatusMessage(data.message);
|
||||
updateProgressBar(data.Percentage);
|
||||
updateStatusMessage(data.Description);
|
||||
|
||||
if (data.error != "") {
|
||||
clearInterval(intervalId);
|
||||
updateStatusMessage(data.error);
|
||||
if (data.Error != "") {
|
||||
clearInterval(intervalId);
|
||||
updateStatusMessage(jQuery(".loader > strong").text(), data.Error);
|
||||
|
||||
jQuery(".loader .hold").hide();
|
||||
jQuery(".btn-continue").hide();
|
||||
jQuery(".btn-back").show();
|
||||
jQuery(".btn-box").show();
|
||||
}
|
||||
|
||||
jQuery(".btn-continue").hide();
|
||||
jQuery(".btn-back").show();
|
||||
jQuery(".btn-box").show();
|
||||
}
|
||||
|
||||
if (data.percentage == 100) {
|
||||
clearInterval(intervalId);
|
||||
jQuery(".btn-box").show();
|
||||
jQuery('.ui-progressbar-value').css("background-image", "url(../umbraco_client/installer/images/pbar.gif)");
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
if (data.Percentage == 100) {
|
||||
clearInterval(intervalId);
|
||||
jQuery(".btn-box").show();
|
||||
jQuery('.ui-progressbar-value').css("background-image", "url(../umbraco_client/installer/images/pbar.gif)");
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:PlaceHolder>
|
||||
|
||||
<asp:Panel ID="confirms" runat="server" Visible="False">
|
||||
<asp:PlaceHolder ID="installConfirm" runat="server" Visible="False">
|
||||
<h1>
|
||||
Database installed</h1>
|
||||
<div class="success">
|
||||
<p>
|
||||
Umbraco
|
||||
<asp:PlaceHolder ID="installConfirm" runat="server" Visible="False">
|
||||
<h1>Database installed</h1>
|
||||
<div class="success">
|
||||
<p>
|
||||
Umbraco
|
||||
<%=umbraco.GlobalSettings.CurrentVersion%>
|
||||
has now been copied to your database. Press <b>Continue</b> to proceed.</p>
|
||||
</div>
|
||||
</asp:PlaceHolder>
|
||||
<asp:PlaceHolder ID="upgradeConfirm" runat="server" Visible="False">
|
||||
<h1>
|
||||
Database upgraded</h1>
|
||||
<div class="success">
|
||||
<p>
|
||||
Your database has been upgraded to version:
|
||||
has now been copied to your database. Press <b>Continue</b> to proceed.
|
||||
</p>
|
||||
</div>
|
||||
</asp:PlaceHolder>
|
||||
<asp:PlaceHolder ID="upgradeConfirm" runat="server" Visible="False">
|
||||
<h1>Database upgraded</h1>
|
||||
<div class="success">
|
||||
<p>
|
||||
Your database has been upgraded to version:
|
||||
<%=umbraco.GlobalSettings.CurrentVersion%>.<br />
|
||||
Press <b>Continue</b> to proceed.
|
||||
</p>
|
||||
</div>
|
||||
</asp:PlaceHolder>
|
||||
<!-- btn box -->
|
||||
<footer class="btn-box" style="display: none;">
|
||||
<div class="t"> </div>
|
||||
<asp:LinkButton class="btn-step btn btn-continue" runat="server" OnClick="gotoNextStep"><span>Continue</span></asp:LinkButton>
|
||||
</footer>
|
||||
Press <b>Continue</b> to proceed.
|
||||
</p>
|
||||
</div>
|
||||
</asp:PlaceHolder>
|
||||
<!-- btn box -->
|
||||
<footer class="btn-box" style="display: none;">
|
||||
<div class="t"> </div>
|
||||
<asp:LinkButton class="btn-step btn btn-continue" runat="server" OnClick="gotoNextStep"><span>Continue</span></asp:LinkButton>
|
||||
</footer>
|
||||
</asp:Panel>
|
||||
|
||||
@@ -29,8 +29,11 @@ function updateProgressBar(percent) {
|
||||
});
|
||||
}
|
||||
|
||||
function updateStatusMessage(message) {
|
||||
function updateStatusMessage(message, error) {
|
||||
jQuery(".loader > strong").text(message);
|
||||
if (error != undefined) {
|
||||
jQuery(".loader").append("<p>" + error + "</p>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,353 +1,359 @@
|
||||
<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="database.ascx.cs" Inherits="umbraco.presentation.install.steps.detect"
|
||||
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
|
||||
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
|
||||
<asp:PlaceHolder ID="settings" runat="server" Visible="true">
|
||||
<!-- database box -->
|
||||
<div class="tab main-tabinfo">
|
||||
<div class="container">
|
||||
<h1>Database configuration</h1>
|
||||
<p>
|
||||
<strong>To complete this step you will either need a blank database or, if you do not have a blank database available, choose the SQL CE 4 embedded
|
||||
database (This is the recommended approach for first time users or if you are unsure).</strong></p>
|
||||
<!-- database box -->
|
||||
<div class="tab main-tabinfo">
|
||||
<div class="container">
|
||||
<h1>Database configuration</h1>
|
||||
<p>
|
||||
If you are not using the SQL CE 4 embedded database you will need the connection details for your database, such as the
|
||||
"connection string". You may need to contact your system administrator or web host for this information.</p>
|
||||
</div>
|
||||
<!-- database -->
|
||||
<div class="database-hold">
|
||||
<form action="#">
|
||||
<fieldset>
|
||||
<div class="step">
|
||||
<div class="container">
|
||||
<p>
|
||||
<strong>1. Select which database option best fits you:</strong></p>
|
||||
<strong>To complete this step you will either need a blank database or, if you do not have a blank database available, choose the SQL CE 4 embedded
|
||||
database (This is the recommended approach for first time users or if you are unsure).</strong>
|
||||
</p>
|
||||
<p>
|
||||
If you are not using the SQL CE 4 embedded database you will need the connection details for your database, such as the
|
||||
"connection string". You may need to contact your system administrator or web host for this information.
|
||||
</p>
|
||||
</div>
|
||||
<!-- database -->
|
||||
<div class="database-hold">
|
||||
<form action="#">
|
||||
<fieldset>
|
||||
<div class="step">
|
||||
<div class="container">
|
||||
<p>
|
||||
<strong>1. Select which database option best fits you:</strong>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<input type="radio" id="databaseOptionBlank" name="database" value="blank" />
|
||||
<label for="databaseOptionBlank">I already have a blank SQL Server, SQL Azure or MySQL database</label>
|
||||
<li>
|
||||
<input type="radio" id="databaseOptionBlank" name="database" value="blank" />
|
||||
<label for="databaseOptionBlank">I already have a blank SQL Server, SQL Azure or MySQL database</label>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" id="databaseOptionEmbedded" name="database" value="embedded" />
|
||||
<label for="databaseOptionEmbedded">I want to use SQL CE 4, a free, quick-and-simple embedded database</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" id="databaseOptionEmbedded" name="database" value="embedded" />
|
||||
<label for="databaseOptionEmbedded">I want to use SQL CE 4, a free, quick-and-simple embedded database</label>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" id="databaseOptionAdvanced" name="database" value="advanced" />
|
||||
<label for="databaseOptionAdvanced">I'm an advanced user, let me put in the connection string</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" id="databaseOptionAdvanced" name="database" value="advanced" />
|
||||
<label for="databaseOptionAdvanced">I'm an advanced user, let me put in the connection string</label>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" id="databaseOptionHelp" name="database" value="help" />
|
||||
<label for="databaseOptionHelp">I need help</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" id="databaseOptionHelp" name="database" value="help" />
|
||||
<label for="databaseOptionHelp">I need help</label>
|
||||
|
||||
</li>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- database options -->
|
||||
<div id="database-options">
|
||||
|
||||
|
||||
<!-- blank option -->
|
||||
<div id="database-blank" class="database-option">
|
||||
|
||||
<div class="step">
|
||||
<div class="container">
|
||||
<p>
|
||||
<strong>2. Now choose your database type below.</strong></p>
|
||||
<div class="select">
|
||||
<asp:DropDownList runat="server" ID="DatabaseType" CssClass="sel">
|
||||
<asp:ListItem Value="" Text="Please choose" Selected="True" />
|
||||
<asp:ListItem Value="SqlServer" Text="Microsoft SQL Server" />
|
||||
<asp:ListItem Value="SqlAzure" Text="SQL Azure" />
|
||||
<asp:ListItem Value="MySql" Text="MySQL" />
|
||||
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="step" id="database-blank-inputs">
|
||||
<div class="container">
|
||||
<p class="instructionText">
|
||||
<strong>3. Connection details:</strong> Please fill out the connection information for your database.</p>
|
||||
<div class="instruction-hold">
|
||||
|
||||
|
||||
<asp:PlaceHolder ID="ph_dbError" runat="server" Visible="false">
|
||||
<div class="row error">
|
||||
<p class="text">
|
||||
<strong>
|
||||
<asp:Literal ID="lt_dbError" runat="server" /></strong></p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () { showDatabaseSettings(); });
|
||||
</script>
|
||||
</asp:PlaceHolder>
|
||||
<div class="row sql" runat="server" id="DatabaseServerItem">
|
||||
<asp:Label runat="server" AssociatedControlID="DatabaseServer" ID="DatabaseServerLabel">Server:</asp:Label>
|
||||
<span>
|
||||
<asp:TextBox runat="server" CssClass="text" ID="DatabaseServer" /></span>
|
||||
</div>
|
||||
<div class="row sql" runat="server" id="DatabaseNameItem">
|
||||
<asp:Label runat="server" AssociatedControlID="DatabaseName" ID="DatabaseNameLabel">Database name:</asp:Label>
|
||||
<span>
|
||||
<asp:TextBox runat="server" CssClass="text" ID="DatabaseName" /></span>
|
||||
</div>
|
||||
<div class="row sql" runat="server" id="DatabaseUsernameItem">
|
||||
<asp:Label runat="server" AssociatedControlID="DatabaseUsername" ID="DatabaseUsernameLabel">Username:</asp:Label>
|
||||
<span>
|
||||
<asp:TextBox runat="server" CssClass="text" ID="DatabaseUsername" /></span>
|
||||
</div>
|
||||
<div class="row sql" runat="server" id="DatabasePasswordItem">
|
||||
<asp:Label runat="server" AssociatedControlID="DatabasePassword" ID="DatabasePasswordLabel">Password:</asp:Label>
|
||||
<span>
|
||||
<asp:TextBox runat="server" ID="DatabasePassword" CssClass="text" TextMode="Password" /></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- btn box -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- embedded option -->
|
||||
<div id="database-embedded" class="database-option">
|
||||
<div class="step">
|
||||
<div class="container">
|
||||
|
||||
<p class="instructionText">
|
||||
<strong>2. Simple file-based database:</strong></p>
|
||||
<div class="instruction-hold">
|
||||
<div class="row embeddedError" runat="server" id="embeddedFilesMissing" style="display: none;">
|
||||
<p>
|
||||
<strong>Missing files:</strong> SQL CE 4 requires that you manually add the SQL
|
||||
CE 4 runtime to your Umbraco installation.<br />
|
||||
You can either use the following <a href="http://our.umbraco.org/wiki/install-and-setup/using-sql-ce-4-with-umbraco-46"
|
||||
target="_blank">instructions</a> on how to add SQL CE 4 or select another database type from the dropdown above.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="row embedded" style="display: none;">
|
||||
<p>
|
||||
<strong>Nothing to configure:</strong>SQL CE 4 does not require any configuration,
|
||||
simply click the "install" button to continue.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- advanced option -->
|
||||
<div id="database-advanced" class="database-option">
|
||||
<div class="step">
|
||||
<div class="container">
|
||||
<p>
|
||||
<strong>2. Connection details:</strong> Please fill out the connection information for your database.</strong></p>
|
||||
<!-- database options -->
|
||||
<div id="database-options">
|
||||
|
||||
<div class="instruction-hold">
|
||||
|
||||
<div class="row custom" runat="server" id="DatabaseConnectionString">
|
||||
<asp:Label runat="server" AssociatedControlID="ConnectionString" ID="ConnectionStringLabel">Connection string:</asp:Label>
|
||||
<span class="textarea">
|
||||
<asp:TextBox runat="server" TextMode="MultiLine" CssClass="text textarea" ID="ConnectionString" /></span>
|
||||
</div>
|
||||
<div class="row custom check-hold">
|
||||
|
||||
<!-- blank option -->
|
||||
<div id="database-blank" class="database-option">
|
||||
|
||||
<div class="step">
|
||||
<div class="container">
|
||||
<p>
|
||||
Example: <tt>datalayer=MySQL;server=192.168.2.8;user id=user;password=***;database=umbraco</tt></p>
|
||||
</div>
|
||||
<strong>2. Now choose your database type below.</strong>
|
||||
</p>
|
||||
<div class="select">
|
||||
<asp:DropDownList runat="server" ID="DatabaseType" CssClass="sel">
|
||||
<asp:ListItem Value="" Text="Please choose" Selected="True" />
|
||||
<asp:ListItem Value="SqlServer" Text="Microsoft SQL Server" />
|
||||
<asp:ListItem Value="SqlAzure" Text="SQL Azure" />
|
||||
<asp:ListItem Value="MySql" Text="MySQL" />
|
||||
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="step" id="database-blank-inputs">
|
||||
<div class="container">
|
||||
<p class="instructionText">
|
||||
<strong>3. Connection details:</strong> Please fill out the connection information for your database.
|
||||
</p>
|
||||
<div class="instruction-hold">
|
||||
|
||||
|
||||
<asp:PlaceHolder ID="ph_dbError" runat="server" Visible="false">
|
||||
<div class="row error">
|
||||
<p class="text">
|
||||
<strong>
|
||||
<asp:Literal ID="lt_dbError" runat="server" /></strong>
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () { showDatabaseSettings(); });
|
||||
</script>
|
||||
</asp:PlaceHolder>
|
||||
<div class="row sql" runat="server" id="DatabaseServerItem">
|
||||
<asp:Label runat="server" AssociatedControlID="DatabaseServer" ID="DatabaseServerLabel">Server:</asp:Label>
|
||||
<span>
|
||||
<asp:TextBox runat="server" CssClass="text" ID="DatabaseServer" /></span>
|
||||
</div>
|
||||
<div class="row sql" runat="server" id="DatabaseNameItem">
|
||||
<asp:Label runat="server" AssociatedControlID="DatabaseName" ID="DatabaseNameLabel">Database name:</asp:Label>
|
||||
<span>
|
||||
<asp:TextBox runat="server" CssClass="text" ID="DatabaseName" /></span>
|
||||
</div>
|
||||
<div class="row sql" runat="server" id="DatabaseUsernameItem">
|
||||
<asp:Label runat="server" AssociatedControlID="DatabaseUsername" ID="DatabaseUsernameLabel">Username:</asp:Label>
|
||||
<span>
|
||||
<asp:TextBox runat="server" CssClass="text" ID="DatabaseUsername" /></span>
|
||||
</div>
|
||||
<div class="row sql" runat="server" id="DatabasePasswordItem">
|
||||
<asp:Label runat="server" AssociatedControlID="DatabasePassword" ID="DatabasePasswordLabel">Password:</asp:Label>
|
||||
<span>
|
||||
<asp:TextBox runat="server" ID="DatabasePassword" CssClass="text" TextMode="Password" /></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- btn box -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- help option -->
|
||||
<div id="database-help" class="database-option">
|
||||
<div class="step">
|
||||
<div class="container">
|
||||
<p>
|
||||
<strong>2. Getting a database setup for umbraco.</strong><br />
|
||||
For first time users, we recommend you select "quick-and-simple embedded database".
|
||||
<!-- embedded option -->
|
||||
<div id="database-embedded" class="database-option">
|
||||
<div class="step">
|
||||
<div class="container">
|
||||
|
||||
<p class="instructionText">
|
||||
<strong>2. Simple file-based database:</strong>
|
||||
</p>
|
||||
<div class="instruction-hold">
|
||||
<div class="row embeddedError" runat="server" id="embeddedFilesMissing" style="display: none;">
|
||||
<p>
|
||||
<strong>Missing files:</strong> SQL CE 4 requires that you manually add the SQL
|
||||
CE 4 runtime to your Umbraco installation.<br />
|
||||
You can either use the following <a href="http://our.umbraco.org/wiki/install-and-setup/using-sql-ce-4-with-umbraco-46"
|
||||
target="_blank">instructions</a> on how to add SQL CE 4 or select another database type from the dropdown above.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="row embedded" style="display: none;">
|
||||
<p>
|
||||
<strong>Nothing to configure:</strong>SQL CE 4 does not require any configuration,
|
||||
simply click the "install" button to continue.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- advanced option -->
|
||||
<div id="database-advanced" class="database-option">
|
||||
<div class="step">
|
||||
<div class="container">
|
||||
<p>
|
||||
<strong>2. Connection details:</strong> Please fill out the connection information for your database.</strong>
|
||||
</p>
|
||||
|
||||
<div class="instruction-hold">
|
||||
|
||||
<div class="row custom" runat="server" id="DatabaseConnectionString">
|
||||
<asp:Label runat="server" AssociatedControlID="ConnectionString" ID="ConnectionStringLabel">Connection string:</asp:Label>
|
||||
<span class="textarea">
|
||||
<asp:TextBox runat="server" TextMode="MultiLine" CssClass="text textarea" ID="ConnectionString" /></span>
|
||||
</div>
|
||||
<div class="row custom check-hold">
|
||||
<p>
|
||||
Example: <tt>datalayer=MySQL;server=192.168.2.8;user id=user;password=***;database=umbraco</tt>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- help option -->
|
||||
<div id="database-help" class="database-option">
|
||||
<div class="step">
|
||||
<div class="container">
|
||||
<p>
|
||||
<strong>2. Getting a database setup for umbraco.</strong><br />
|
||||
For first time users, we recommend you select "quick-and-simple embedded database".
|
||||
This will install an easy to use database, that does
|
||||
not require any additional software to use.<br />
|
||||
Alternatively, you can install Microsoft SQL Server, which will require a bit more
|
||||
Alternatively, you can install Microsoft SQL Server, which will require a bit more
|
||||
work to get up and running.<br />
|
||||
We have provided a step-by-step guide in the video instructions below.
|
||||
</p>
|
||||
<span class="btn-link"><a href="http://umbraco.org/getting-started" target="_blank">Open video instructions</a></span>
|
||||
We have provided a step-by-step guide in the video instructions below.
|
||||
</p>
|
||||
<span class="btn-link"><a href="http://umbraco.org/getting-started" target="_blank">Open video instructions</a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="btn-box installbtn">
|
||||
<div class="t"> </div>
|
||||
<asp:LinkButton runat="server" class="single-tab submit btn-install" OnClick="saveDBConfig"><span>install</span> </asp:LinkButton>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="btn-box installbtn">
|
||||
<div class="t"> </div>
|
||||
<asp:LinkButton runat="server" class="single-tab submit btn-install" onclick="saveDBConfig"><span>install</span> </asp:LinkButton>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var hasEmbeddedDlls = <%= HasEmbeddedDatabaseFiles.ToString().ToLower() %>;
|
||||
var currentVersion = '<%=umbraco.GlobalSettings.CurrentVersion%>';
|
||||
var configured = <%= IsConfigured.ToString().ToLower() %>;
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var hasEmbeddedDlls = <%= HasEmbeddedDatabaseFiles.ToString().ToLower() %>;
|
||||
var currentVersion = '<%=umbraco.GlobalSettings.CurrentVersion%>';
|
||||
var configured = <%= IsConfigured.ToString().ToLower() %>;
|
||||
|
||||
jQuery(document).ready(function(){
|
||||
<asp:literal runat="server" id="jsVars" />
|
||||
jQuery(document).ready(function(){
|
||||
<asp:literal runat="server" id="jsVars" />
|
||||
|
||||
|
||||
|
||||
$("input[name='database']").change(function()
|
||||
$("input[name='database']").change(function()
|
||||
{
|
||||
|
||||
switch($(this).val())
|
||||
{
|
||||
|
||||
switch($(this).val())
|
||||
{
|
||||
case "blank":
|
||||
|
||||
$(".database-option").hide();
|
||||
$("#database-blank").show();
|
||||
$(".database-option").hide();
|
||||
$("#database-blank").show();
|
||||
$(".installbtn").show();
|
||||
|
||||
break;
|
||||
break;
|
||||
case "embedded":
|
||||
$(".database-option").hide();
|
||||
$("#database-embedded").show();
|
||||
$(".database-option").hide();
|
||||
$("#database-embedded").show();
|
||||
|
||||
if (!hasEmbeddedDlls) {
|
||||
if (!hasEmbeddedDlls) {
|
||||
$('.embeddedError').show();
|
||||
$(".installbtn").hide();
|
||||
}
|
||||
else {
|
||||
}
|
||||
else {
|
||||
$('.embedded').show();
|
||||
$(".installbtn").show();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
case "advanced":
|
||||
$(".database-option").hide();
|
||||
$("#database-advanced").show();
|
||||
$(".installbtn").show();
|
||||
break;
|
||||
$(".database-option").hide();
|
||||
$("#database-advanced").show();
|
||||
$(".installbtn").show();
|
||||
break;
|
||||
case "help":
|
||||
$(".database-option").hide();
|
||||
$("#database-help").show();
|
||||
$(".installbtn").hide();
|
||||
break;
|
||||
}
|
||||
$(".database-option").hide();
|
||||
$("#database-help").show();
|
||||
$(".installbtn").hide();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
<asp:Literal id="dbinit" runat="server"></asp:Literal>
|
||||
|
||||
});
|
||||
|
||||
<asp:Literal id="dbinit" runat="server"></asp:Literal>
|
||||
|
||||
});
|
||||
</script>
|
||||
</asp:PlaceHolder>
|
||||
|
||||
<asp:PlaceHolder ID="installing" runat="server" Visible="false">
|
||||
<!-- installing umbraco -->
|
||||
<div class="tab install-tab" id="datebase-tab">
|
||||
<div class="container">
|
||||
<h1>
|
||||
Installing Umbraco</h1>
|
||||
<p>
|
||||
The Umbraco database is being configured. This process populates your chosen database with a blank Umbraco instance.</p>
|
||||
<div class="loader">
|
||||
<div class="hold">
|
||||
<div class="progress-bar">
|
||||
</div>
|
||||
<span class="progress-bar-value">0%</span>
|
||||
</div>
|
||||
<strong></strong>
|
||||
</div>
|
||||
</div>
|
||||
<!-- btn box -->
|
||||
<footer class="btn-box" style="display: none;">
|
||||
<div class="t"> </div>
|
||||
<asp:LinkButton class="btn-step btn btn-continue" runat="server" OnClick="gotoNextStep"><span>Continue</span></asp:LinkButton>
|
||||
<asp:LinkButton class="btn-step btn btn-back" style="display: none;" runat="server" OnClick="gotoSettings"><span>Back</span></asp:LinkButton>
|
||||
</footer>
|
||||
</div>
|
||||
<!-- installing umbraco -->
|
||||
<div class="tab install-tab" id="datebase-tab">
|
||||
<div class="container">
|
||||
<h1>Installing Umbraco</h1>
|
||||
<p>
|
||||
The Umbraco database is being configured. This process populates your chosen database with a blank Umbraco instance.
|
||||
</p>
|
||||
<div class="loader">
|
||||
<div class="hold">
|
||||
<div class="progress-bar">
|
||||
</div>
|
||||
<span class="progress-bar-value">0%</span>
|
||||
</div>
|
||||
<strong></strong>
|
||||
</div>
|
||||
</div>
|
||||
<!-- btn box -->
|
||||
<footer class="btn-box" style="display: none;">
|
||||
<div class="t"> </div>
|
||||
<asp:LinkButton class="btn-step btn btn-continue" runat="server" OnClick="gotoNextStep"><span>Continue</span></asp:LinkButton>
|
||||
<asp:LinkButton class="btn-step btn btn-back" Style="display: none;" runat="server" OnClick="gotoSettings"><span>Back</span></asp:LinkButton>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var intervalId = 0;
|
||||
<script type="text/javascript">
|
||||
var intervalId = 0;
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
intervalId = setInterval("progressBarCallback()", 1000);
|
||||
jQuery(".btn-box").hide();
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
data: '{}',
|
||||
dataType: 'json',
|
||||
url: 'utills/p.aspx/installOrUpgrade'
|
||||
});
|
||||
});
|
||||
jQuery(document).ready(function () {
|
||||
intervalId = setInterval("progressBarCallback()", 1000);
|
||||
jQuery(".btn-box").hide();
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
data: '{}',
|
||||
dataType: 'json',
|
||||
url: 'utills/p.aspx/installOrUpgrade'
|
||||
});
|
||||
});
|
||||
|
||||
function progressBarCallback() {
|
||||
jQuery.getJSON('utills/p.aspx?feed=progress', function (data) {
|
||||
function progressBarCallback() {
|
||||
jQuery.getJSON('utills/p.aspx?feed=progress', function (data) {
|
||||
|
||||
updateProgressBar(data.percentage);
|
||||
updateStatusMessage(data.message);
|
||||
updateProgressBar(data.Percentage);
|
||||
updateStatusMessage(data.Description);
|
||||
|
||||
if (data.error != "") {
|
||||
clearInterval(intervalId);
|
||||
updateStatusMessage(data.error);
|
||||
if (data.Error != "") {
|
||||
clearInterval(intervalId);
|
||||
updateStatusMessage(jQuery(".loader > strong").text(), data.Error);
|
||||
|
||||
jQuery(".loader .hold").hide();
|
||||
jQuery(".btn-continue").hide();
|
||||
jQuery(".btn-back").show();
|
||||
jQuery(".btn-box").show();
|
||||
}
|
||||
|
||||
jQuery(".btn-continue").hide();
|
||||
jQuery(".btn-back").show();
|
||||
jQuery(".btn-box").show();
|
||||
}
|
||||
|
||||
if (data.percentage == 100) {
|
||||
clearInterval(intervalId);
|
||||
jQuery(".btn-box").show();
|
||||
jQuery('.ui-progressbar-value').css("background-image", "url(../umbraco_client/installer/images/pbar.gif)");
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
if (data.Percentage == 100) {
|
||||
clearInterval(intervalId);
|
||||
jQuery(".btn-box").show();
|
||||
jQuery('.ui-progressbar-value').css("background-image", "url(../umbraco_client/installer/images/pbar.gif)");
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:PlaceHolder>
|
||||
|
||||
<asp:Panel ID="confirms" runat="server" Visible="False">
|
||||
<asp:PlaceHolder ID="installConfirm" runat="server" Visible="False">
|
||||
<h1>
|
||||
Database installed</h1>
|
||||
<div class="success">
|
||||
<p>
|
||||
Umbraco
|
||||
<asp:PlaceHolder ID="installConfirm" runat="server" Visible="False">
|
||||
<h1>Database installed</h1>
|
||||
<div class="success">
|
||||
<p>
|
||||
Umbraco
|
||||
<%=umbraco.GlobalSettings.CurrentVersion%>
|
||||
has now been copied to your database. Press <b>Continue</b> to proceed.</p>
|
||||
</div>
|
||||
</asp:PlaceHolder>
|
||||
<asp:PlaceHolder ID="upgradeConfirm" runat="server" Visible="False">
|
||||
<h1>
|
||||
Database upgraded</h1>
|
||||
<div class="success">
|
||||
<p>
|
||||
Your database has been upgraded to version:
|
||||
has now been copied to your database. Press <b>Continue</b> to proceed.
|
||||
</p>
|
||||
</div>
|
||||
</asp:PlaceHolder>
|
||||
<asp:PlaceHolder ID="upgradeConfirm" runat="server" Visible="False">
|
||||
<h1>Database upgraded</h1>
|
||||
<div class="success">
|
||||
<p>
|
||||
Your database has been upgraded to version:
|
||||
<%=umbraco.GlobalSettings.CurrentVersion%>.<br />
|
||||
Press <b>Continue</b> to proceed.
|
||||
</p>
|
||||
</div>
|
||||
</asp:PlaceHolder>
|
||||
<!-- btn box -->
|
||||
<footer class="btn-box" style="display: none;">
|
||||
<div class="t"> </div>
|
||||
<asp:LinkButton class="btn-step btn btn-continue" runat="server" OnClick="gotoNextStep"><span>Continue</span></asp:LinkButton>
|
||||
</footer>
|
||||
Press <b>Continue</b> to proceed.
|
||||
</p>
|
||||
</div>
|
||||
</asp:PlaceHolder>
|
||||
<!-- btn box -->
|
||||
<footer class="btn-box" style="display: none;">
|
||||
<div class="t"> </div>
|
||||
<asp:LinkButton class="btn-step btn btn-continue" runat="server" OnClick="gotoNextStep"><span>Continue</span></asp:LinkButton>
|
||||
</footer>
|
||||
</asp:Panel>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace umbraco.presentation.install {
|
||||
@@ -43,13 +44,28 @@ namespace umbraco.presentation.install {
|
||||
}
|
||||
|
||||
public static string getProgress(){
|
||||
string json = @"{
|
||||
'percentage': '%p',
|
||||
'message': '%m',
|
||||
'error': '%e'
|
||||
}";
|
||||
string retval = json.Replace("%p", Percentage.ToString()).Replace("%m", Description).Replace("%e", Error).Replace("'", "\"");
|
||||
return retval;
|
||||
ProgressResult pr = new ProgressResult(Percentage, Description, Error);
|
||||
JavaScriptSerializer js = new JavaScriptSerializer();
|
||||
return js.Serialize(pr);
|
||||
}
|
||||
}
|
||||
|
||||
public class ProgressResult
|
||||
{
|
||||
public string Error { get; set; }
|
||||
public int Percentage { get; set; }
|
||||
public string Description { get; set; }
|
||||
public ProgressResult()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ProgressResult(int percentage, string description, string error)
|
||||
{
|
||||
Percentage = percentage;
|
||||
Description = description;
|
||||
Error = error;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,7 @@ namespace umbraco.presentation.install.utills
|
||||
|
||||
string XmlResponse = library.GetXmlDocumentByUrl(url).Current.OuterXml;
|
||||
|
||||
if(!XmlResponse.Contains("System.Net.WebException"))
|
||||
if (!XmlResponse.Contains("System.Net.WebException"))
|
||||
{
|
||||
Response.Write(library.GetXmlDocumentByUrl(url).Current.OuterXml);
|
||||
}
|
||||
@@ -63,7 +63,7 @@ namespace umbraco.presentation.install.utills
|
||||
|
||||
// Build the new connection string
|
||||
//DbConnectionStringBuilder connectionStringBuilder = CreateConnectionString();
|
||||
Helper.setProgress( 5, "Connecting...", "");
|
||||
Helper.setProgress(5, "Connecting...", "");
|
||||
|
||||
// Try to connect to the database
|
||||
try
|
||||
@@ -74,12 +74,13 @@ namespace umbraco.presentation.install.utills
|
||||
if (!installer.CanConnect)
|
||||
throw new Exception("The installer cannot connect to the database.");
|
||||
else
|
||||
Helper.setProgress( 20, "Connection opened", "");
|
||||
Helper.setProgress(20, "Connection opened", "");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
var error = new Exception("Database connection initialisation failed.", ex);
|
||||
Helper.setProgress( -5, "Database connection initialisation failed.", error.Message);
|
||||
Helper.setProgress(-5, "Database connection initialisation failed.",
|
||||
string.Format("{0}<br />Connection string: {1}", error.InnerException.Message, GlobalSettings.DbDSN));
|
||||
|
||||
return error.Message;
|
||||
}
|
||||
@@ -87,49 +88,60 @@ namespace umbraco.presentation.install.utills
|
||||
|
||||
if (installer.CanConnect)
|
||||
{
|
||||
if (installer.IsLatestVersion) {
|
||||
if (installer.IsLatestVersion)
|
||||
{
|
||||
|
||||
Helper.setProgress(90, "Refreshing content cache", "");
|
||||
Helper.setProgress(90, "Refreshing content cache", "");
|
||||
|
||||
library.RefreshContent();
|
||||
library.RefreshContent();
|
||||
|
||||
Helper.setProgress(100, "Database is up-to-date", "");
|
||||
|
||||
} else {
|
||||
if (installer.IsEmpty) {
|
||||
Helper.setProgress(35, "Installing tables...", "");
|
||||
//do install
|
||||
installer.Install();
|
||||
Helper.setProgress(100, "Database is up-to-date", "");
|
||||
|
||||
Helper.setProgress(100, "Installation completed!", "");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (installer.IsEmpty)
|
||||
{
|
||||
Helper.setProgress(35, "Installing tables...", "");
|
||||
//do install
|
||||
try
|
||||
{
|
||||
installer.Install();
|
||||
Helper.setProgress(100, "Installation completed!", "");
|
||||
installer = null;
|
||||
|
||||
installer = null;
|
||||
library.RefreshContent();
|
||||
return "installed";
|
||||
}
|
||||
catch (Exception SqlExp)
|
||||
{
|
||||
Helper.setProgress(35, "Error installing tables", SqlExp.InnerException.ToString());
|
||||
return "error";
|
||||
}
|
||||
|
||||
} //else if (m_Installer.CurrentVersion == DatabaseVersion.None || m_Installer.CanUpgrade) {
|
||||
//Helper.setProgress(35, "Updating database tables...", "");
|
||||
//m_Installer.Install();
|
||||
|
||||
library.RefreshContent();
|
||||
return "installed";
|
||||
} //else if (m_Installer.CurrentVersion == DatabaseVersion.None || m_Installer.CanUpgrade) {
|
||||
//Helper.setProgress(35, "Updating database tables...", "");
|
||||
//m_Installer.Install();
|
||||
|
||||
// library.RefreshContent();
|
||||
// return "installed";
|
||||
// }
|
||||
// library.RefreshContent();
|
||||
// return "installed";
|
||||
// }
|
||||
else if (installer.CurrentVersion == DatabaseVersion.None || installer.CanUpgrade)
|
||||
{
|
||||
Helper.setProgress( 35, "Updating database tables...", "");
|
||||
Helper.setProgress(35, "Updating database tables...", "");
|
||||
installer.Install();
|
||||
|
||||
Helper.setProgress(100, "Upgrade completed!", "");
|
||||
Helper.setProgress(100, "Upgrade completed!", "");
|
||||
|
||||
installer = null;
|
||||
installer = null;
|
||||
|
||||
library.RefreshContent();
|
||||
return "upgraded";
|
||||
library.RefreshContent();
|
||||
return "upgraded";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
return "no connection;";
|
||||
|
||||
Reference in New Issue
Block a user