Introduction of the template FilesWithEditor
This commit is contained in:
@ -2,33 +2,17 @@
|
||||
@page "/nginx"
|
||||
|
||||
|
||||
<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-g">
|
||||
<div class="pure-u-1-5">
|
||||
<p>Configuration Files</p>
|
||||
heh
|
||||
</div>
|
||||
|
||||
<div class="pure-u-4-5">
|
||||
<h1>
|
||||
Hello
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pure-u-4-5">
|
||||
<h1>
|
||||
Hello
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</RadzenTabsItem>
|
||||
<RadzenTabsItem Text="Logs">
|
||||
|
||||
</RadzenTabsItem>
|
||||
</Tabs>
|
||||
</RadzenTabs>
|
18
Seenginx/Pages/NginxLogs.razor
Normal file
18
Seenginx/Pages/NginxLogs.razor
Normal file
@ -0,0 +1,18 @@
|
||||
@inherits NginxLogsBase
|
||||
@page "/nginx/logs"
|
||||
|
||||
|
||||
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1-5">
|
||||
<p>Configuration Files</p>
|
||||
heh
|
||||
</div>
|
||||
|
||||
<div class="pure-u-4-5">
|
||||
<h1>
|
||||
Hello
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
37
Seenginx/Pages/NginxLogs.razor.cs
Normal file
37
Seenginx/Pages/NginxLogs.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 NginxLogsBase : 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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user