oqtane.framework/Oqtane.Client/Modules/Admin/ModuleDefinitions/Index.razor
2019-09-07 23:26:19 -04:00

42 lines
1009 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
{
<ActionLink Action="Add" Text="Install Module" />
<table class="table table-borderless">
<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();
}
}