oqtane.framework/Oqtane.Client/Modules/Admin/ModuleDefinitions/Index.razor
2019-08-14 13:28:49 -04:00

41 lines
938 B
Plaintext

@using Oqtane.Services
@using Oqtane.Models
@using Oqtane.Modules
@using Oqtane.Client.Modules.Controls
@inherits ModuleBase
@inject IModuleDefinitionService ModuleDefinitionService
@if (moduledefinitions == null)
{
<p><em>Loading...</em></p>
}
else
{
<table class="table">
<thead>
<tr>
<th>Name</th>
</tr>
</thead>
<tbody>
@foreach (var moduledefinition in moduledefinitions)
{
<tr>
<td>@moduledefinition.Name</td>
</tr>
}
</tbody>
</table>
}
@code {
public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Host; } }
List<ModuleDefinition> moduledefinitions;
protected override async Task OnInitializedAsync()
{
moduledefinitions = await ModuleDefinitionService.GetModuleDefinitionsAsync();
}
}