Merge pull request #56 from sbwalker/master
Installer improvements for client-side Blazor
This commit is contained in:
commit
b1ca83a2cb
|
@ -4,9 +4,10 @@
|
||||||
@inject IInstallationService InstallationService
|
@inject IInstallationService InstallationService
|
||||||
|
|
||||||
@if (Initialized)
|
@if (Initialized)
|
||||||
|
{
|
||||||
@if (!Installed)
|
@if (!Installed)
|
||||||
{
|
{
|
||||||
<Installer Installed="@Installed" />
|
<Installer />
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -23,14 +24,10 @@
|
||||||
private bool Installed = false;
|
private bool Installed = false;
|
||||||
private PageState PageState { get; set; }
|
private PageState PageState { get; set; }
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnParametersSetAsync()
|
||||||
{
|
{
|
||||||
var response = await InstallationService.IsInstalled();
|
var response = await InstallationService.IsInstalled();
|
||||||
Installed = response.Success;
|
Installed = response.Success;
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnAfterRender()
|
|
||||||
{
|
|
||||||
Initialized = true;
|
Initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,118 +4,112 @@
|
||||||
@inject IInstallationService InstallationService
|
@inject IInstallationService InstallationService
|
||||||
@inject IUserService UserService
|
@inject IUserService UserService
|
||||||
|
|
||||||
@if (!Installed)
|
<div class="container">
|
||||||
{
|
<div class="row">
|
||||||
<div class="container">
|
<div class="mx-auto text-center">
|
||||||
<div class="row">
|
<img src="oqtane.png" />
|
||||||
<div class="mx-auto text-center">
|
|
||||||
<img src="oqtane.png" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr style="width: 100%; color: gray; height: 1px; background-color:gray;" />
|
|
||||||
<h2 class="text-center">Database Configuration</h2>
|
|
||||||
<div class="row">
|
|
||||||
<div class="mx-auto text-center">
|
|
||||||
<table class="form-group" cellpadding="4" cellspacing="4">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="Title" class="control-label" style="font-weight: bold">Database Type: </label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select class="custom-select" @bind="@DatabaseType">
|
|
||||||
<option value="LocalDB">Local Database</option>
|
|
||||||
<option value="SQLServer">SQL Server</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="Title" class="control-label" style="font-weight: bold">Server: </label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="text" id="ServerName" class="form-control" @bind="@ServerName" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="Title" class="control-label" style="font-weight: bold">Database: </label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="text" id="DatabaseName" class="form-control" @bind="@DatabaseName" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="Title" class="control-label" style="font-weight: bold">Integrated Security: </label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select class="custom-select" @onchange="@SetIntegratedSecurity">
|
|
||||||
<option value="true" selected>True</option>
|
|
||||||
<option value="false">False</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr style="@IntegratedSecurityDisplay">
|
|
||||||
<td>
|
|
||||||
<label for="Title" class="control-label" style="font-weight: bold">Username: </label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="text" id="Username" class="form-control" @bind="@Username" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr style="@IntegratedSecurityDisplay">
|
|
||||||
<td>
|
|
||||||
<label for="Title" class="control-label" style="font-weight: bold">Password: </label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="password" id="Password" class="form-control" @bind="@Password" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr style="width: 100%; color: gray; height: 1px; background-color:gray;" />
|
|
||||||
<h2 class="text-center">Application Administrator</h2>
|
|
||||||
<div class="row">
|
|
||||||
<div class="mx-auto text-center">
|
|
||||||
<table class="form-group" cellpadding="4" cellspacing="4">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="Title" class="control-label" style="font-weight: bold">Username: </label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="text" id="Email" class="form-control" @bind="@HostUsername" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="Title" class="control-label" style="font-weight: bold">Password: </label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="password" id="Email" class="form-control" @bind="@HostPassword" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="mx-auto text-center">
|
|
||||||
<button type="button" class="btn btn-success" @onclick="@Install">Install Now</button><br /><br />
|
|
||||||
@((MarkupString)@Message)
|
|
||||||
</div>
|
|
||||||
<div class="loading" style="@LoadingDisplay"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
<hr style="width: 100%; color: gray; height: 1px; background-color:gray;" />
|
||||||
|
<h2 class="text-center">Database Configuration</h2>
|
||||||
|
<div class="row">
|
||||||
|
<div class="mx-auto text-center">
|
||||||
|
<table class="form-group" cellpadding="4" cellspacing="4">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label for="Title" class="control-label" style="font-weight: bold">Database Type: </label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<select class="custom-select" @bind="@DatabaseType">
|
||||||
|
<option value="LocalDB">Local Database</option>
|
||||||
|
<option value="SQLServer">SQL Server</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label for="Title" class="control-label" style="font-weight: bold">Server: </label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" id="ServerName" class="form-control" @bind="@ServerName" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label for="Title" class="control-label" style="font-weight: bold">Database: </label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" id="DatabaseName" class="form-control" @bind="@DatabaseName" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label for="Title" class="control-label" style="font-weight: bold">Integrated Security: </label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<select class="custom-select" @onchange="@SetIntegratedSecurity">
|
||||||
|
<option value="true" selected>True</option>
|
||||||
|
<option value="false">False</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr style="@IntegratedSecurityDisplay">
|
||||||
|
<td>
|
||||||
|
<label for="Title" class="control-label" style="font-weight: bold">Username: </label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" id="Username" class="form-control" @bind="@Username" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr style="@IntegratedSecurityDisplay">
|
||||||
|
<td>
|
||||||
|
<label for="Title" class="control-label" style="font-weight: bold">Password: </label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="password" id="Password" class="form-control" @bind="@Password" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr style="width: 100%; color: gray; height: 1px; background-color:gray;" />
|
||||||
|
<h2 class="text-center">Application Administrator</h2>
|
||||||
|
<div class="row">
|
||||||
|
<div class="mx-auto text-center">
|
||||||
|
<table class="form-group" cellpadding="4" cellspacing="4">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label for="Title" class="control-label" style="font-weight: bold">Username: </label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" id="Email" class="form-control" @bind="@HostUsername" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label for="Title" class="control-label" style="font-weight: bold">Password: </label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="password" id="Email" class="form-control" @bind="@HostPassword" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="mx-auto text-center">
|
||||||
|
<button type="button" class="btn btn-success" @onclick="@Install">Install Now</button><br /><br />
|
||||||
|
@((MarkupString)@Message)
|
||||||
|
</div>
|
||||||
|
<div class="loading" style="@LoadingDisplay"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
[Parameter]
|
|
||||||
public bool Installed { get; set; }
|
|
||||||
|
|
||||||
private string DatabaseType = "LocalDB";
|
private string DatabaseType = "LocalDB";
|
||||||
private string ServerName = "(LocalDb)\\MSSQLLocalDB";
|
private string ServerName = "(LocalDb)\\MSSQLLocalDB";
|
||||||
private string DatabaseName = "Oqtane-" + DateTime.Now.ToString("yyyyMMddHHmm");
|
private string DatabaseName = "Oqtane-" + DateTime.Now.ToString("yyyyMMddHHmm");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user