Ryan Sweet 1edf5cfe9c
working on scaffolding a new dotnet intro sample for #531 (#536)
* interim stash

* interim stash

* interim checkpoint

* broken stash

* whoops

* merge sln files

* fix a bunch of refactoring errors

* moving more to core vs samples

* interim

* fixup the devteam sample

* fix ci

* fixup soln file

* trying to fix ci

* trying to fix ci

* adding back

* still trying

* recreate

* next step

* adding it back

* trying to fix

* Rename Autogen -> AutoGen (#567)

* Add transparency faqs (#566)

* remove Autogen

* add AutoGen back

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

---------

Co-authored-by: Xiaoyun Zhang <xiaoyuz@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-09-19 01:41:44 +00:00

48 lines
1008 B
Plaintext

@page "/agents"
@attribute [StreamRendering(true)]
@attribute [OutputCache(Duration = 5)]
@inject AgentAPIClient AgentApi
<PageTitle>Agents</PageTitle>
<h1>Agents</h1>
<p>This component demonstrates showing data loaded from a backend API service.</p>
@if (results == null)
{
<p><em>Loading...</em></p>
}
else
{
<table class="table">
<thead>
<tr>
<th>Date</th>
<th>Temp. (F)</th>
<th>Summary</th>
</tr>
</thead>
<tbody>
@foreach (var result in results)
{
<tr>
<td>@result.Date.ToShortDateString()</td>
<td>@result.Summary</td>
<td>@result.Content</td>
</tr>
}
</tbody>
</table>
}
@code {
private AgentOutputRecord[]? results;
protected override async Task OnInitializedAsync()
{
results = await AgentApi.GetAgentResultAsync();
}
}