27 lines
708 B
C#
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();
|
|
}
|
|
}
|
|
}
|