35 lines
990 B
Plaintext
35 lines
990 B
Plaintext
@page "/spills"
|
|
@using MongoDB.Driver
|
|
@using Overflow.SouthernWater
|
|
@rendermode RenderMode.InteractiveServer
|
|
|
|
<PageTitle>Southern Water Spills</PageTitle>
|
|
|
|
<h1>Spills</h1>
|
|
|
|
<p>This shows the data that you can see on the Southern Water Beachbuoy system</p>
|
|
|
|
<RadzenCard class="my-4">
|
|
<RadzenStack Orientation="Orientation.Vertical" AlignItems="AlignItems.Start" Wrap="FlexWrap.Wrap">
|
|
@if (job is not null)
|
|
{
|
|
<RadzenText TextStyle="TextStyle.Body1">Last updated at <b>@job.EndTime</b></RadzenText>
|
|
}
|
|
</RadzenStack>
|
|
</RadzenCard>
|
|
|
|
<SpillsTable Job=@job />
|
|
|
|
@code {
|
|
private SouthernWaterApiJob? job;
|
|
[Inject] private IMongoDatabase database { get; set; }
|
|
// private bool showIds;
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
job = database.GetCollection<SouthernWaterApiJob>(Static.CollectionName)
|
|
.AsQueryable()
|
|
.OrderByDescending(j => j.EndTime)
|
|
.FirstOrDefault();
|
|
}
|
|
} |