First Nginx push
This commit is contained in:
@ -1,7 +1,34 @@
|
||||
@page "/nginx"
|
||||
@inherits NginxBase
|
||||
@page "/nginx"
|
||||
|
||||
<h3>Nginx</h3>
|
||||
|
||||
@code {
|
||||
<RadzenTabs>
|
||||
<Tabs>
|
||||
<RadzenTabsItem Text="Configuration">
|
||||
|
||||
}
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1-5">
|
||||
<p>Configuration Files</p>
|
||||
<RadzenListBox AllowFiltering="true"
|
||||
FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive"
|
||||
@bind-Value="InputSearch"
|
||||
Data="@ConfigFiles"
|
||||
TextProperty="Name"
|
||||
ValueProperty="Name"
|
||||
Change="@(args => Change(args, "ListBox with filtering"))"
|
||||
Style="margin-bottom: 20px; height:200px;" />
|
||||
</div>
|
||||
|
||||
<div class="pure-u-4-5">
|
||||
<h1>
|
||||
Hello
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</RadzenTabsItem>
|
||||
<RadzenTabsItem Text="Logs">
|
||||
|
||||
</RadzenTabsItem>
|
||||
</Tabs>
|
||||
</RadzenTabs>
|
37
Seenginx/Pages/Nginx.razor.cs
Normal file
37
Seenginx/Pages/Nginx.razor.cs
Normal file
@ -0,0 +1,37 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Radzen;
|
||||
using Radzen.Blazor;
|
||||
using Seenginx.Models;
|
||||
using Seenginx.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Seenginx.Pages
|
||||
{
|
||||
public class NginxBase : ComponentBase
|
||||
{
|
||||
[Inject]
|
||||
public INginxService NginxService { get; set; }
|
||||
|
||||
public string InputSearch { get; set; }
|
||||
|
||||
public List<ConfigFile> ConfigFiles { get; set; } = new List<ConfigFile>();
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
ConfigFiles.AddRange(await NginxService.GetFilesAsync());
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
protected void Change(object value, string name)
|
||||
{
|
||||
var str = value is IEnumerable<object> ? string.Join(", ", (IEnumerable<object>)value) : value;
|
||||
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -13,7 +13,7 @@
|
||||
<link rel="icon" href="~/favicon.png" />
|
||||
<title>Seenginx</title>
|
||||
<base href="~/" />
|
||||
<link rel="stylesheet" href="~/css/side-menu.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="_content/Radzen.Blazor/css/default-base.css">
|
||||
<environment include="Staging,Production">
|
||||
<link rel="stylesheet" href="~/css/open-iconic.min.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/css/pure.min.css" asp-append-version="true" />
|
||||
@ -42,6 +42,7 @@
|
||||
</div>
|
||||
|
||||
<script src="_framework/blazor.server.js"></script>
|
||||
<script src="_content/Radzen.Blazor/Radzen.Blazor.js"></script>
|
||||
<script src="js/modal.js" asp-append-version="true"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user