PlanTempusAdmin/Pages/Azure/Index.cshtml.cs
Janus C. H. Knudsen 77d35ff965 Initial commit
2026-02-03 00:17:08 +01:00

27 lines
708 B
C#

using Microsoft.AspNetCore.Mvc.RazorPages;
using PlanTempusAdmin.Models;
using PlanTempusAdmin.Services;
namespace PlanTempusAdmin.Pages.Azure;
public class IndexModel : PageModel
{
private readonly AzureStorageService _azureService;
public bool IsConnected { get; set; }
public AzureStorageDashboard Dashboard { get; set; } = new();
public IndexModel(AzureStorageService azureService)
{
_azureService = azureService;
}
public async Task OnGetAsync()
{
IsConnected = await _azureService.TestConnectionAsync();
if (IsConnected)
{
Dashboard = await _azureService.GetDashboardAsync();
}
}
}