removed configuration page.

pull/997/head
Alper Ebicoglu 7 years ago
parent 90dc7fe28a
commit d75c98dcb8

@ -1,6 +0,0 @@
@page
@model VoloDocs.Pages.ConfigureModel
@{
}
CONFIGURE

@ -1,16 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace VoloDocs.Pages
{
public class ConfigureModel : PageModel
{
public void OnGet()
{
}
}
}

@ -16,24 +16,21 @@
</abp-style-bundle>
}
<h3>Welcome to the VoloDocs!</h3>
<p>1- CHECK APPSETTINGS.JSON IS CONFIGURED </p>
<p>2- CHECK DATABASE EXIST </p>
<p>2- CHECK ANY PROJECT </p>
<div class="p-5">
<h2 class="text-center mb-5">
Welcome to the VoloDocs!
</h2>
@if (!Model.Projects.Any())
{
<div class="alert alert-secondary col-md-6 text-center" role="alert">
<h4 class="alert-heading">No project!</h4>
<p>Welcome to VoloDocs! There`s no defined project yet.</p>
<hr />
<a href="@Model.CreateProjectLink">Click here to start your first project <i class="fa fa-arrow-circle-right"></i></a>
<div class="d-flex justify-content-center">
<div class="alert alert-secondary col-md-6 text-center" role="alert">
<h4 class="alert-heading">No project!</h4>
<p>There`s no defined project yet!</p>
<hr />
<a href="@Model.CreateProjectLink">Click here to start your first project <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
}
else if (Model.Projects.Count > 1)

@ -1,11 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Options;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Data;
using Volo.Abp.Users;
using Volo.Docs;
@ -16,14 +13,11 @@ namespace VoloDocs.Pages
public class IndexModel : PageModel
{
public IReadOnlyList<ProjectDto> Projects { get; set; }
public string ConnectionString { get; set; }
public string CreateProjectLink { get; set; }
private readonly IProjectAppService _projectAppService;
private readonly DbConnectionOptions _dbConnectionOptions;
private readonly ICurrentUser _currentUser;
private readonly ICurrentUser _currentUser;
public IndexModel(IProjectAppService projectAppService,
IOptionsSnapshot<DbConnectionOptions> dbConnectionOptions, ICurrentUser currentUser)
@ -35,20 +29,15 @@ namespace VoloDocs.Pages
public async Task<IActionResult> OnGet()
{
ConnectionString = _dbConnectionOptions.ConnectionStrings.Default;
if (string.IsNullOrWhiteSpace(ConnectionString))
{
return RedirectToPage("./Configure");
}
CreateProjectLink = _currentUser.Id.HasValue
? "/Docs/Admin/Projects"
: "/Account/Login?returnUrl=/Docs/Admin/Projects";
Projects = (await _projectAppService.GetListAsync()).Items;
if (Projects.Count == 1)
{
return RedirectToPage("./Project/Index", new
return RedirectToPage("./Documents/Project/Index", new
{
projectName = Projects[0].ShortName,
version = DocsAppConsts.Latest,
@ -56,21 +45,6 @@ namespace VoloDocs.Pages
});
}
//if (!Projects.Any())
//{
// if (_currentUser.Id.HasValue)
// {
// return Redirect("./Docs/Admin/Projects");
// }
// return Redirect("./account/login?returnUrl=/Docs/Admin/Projects");
//}
return Page();
}
}

@ -1,5 +1,5 @@
{
"ConnectionString": "Server=localhost;Database=VoloDocs;Trusted_Connection=True;MultipleActiveResultSets=true",
"ConnectionString": "Server=localhost;Database=VoloDocsNew;Trusted_Connection=True;MultipleActiveResultSets=true",
"Title": "Volo Documents",
"LogoUrl": "/Assets/Images/Logo.png"
}
Loading…
Cancel
Save