Initial commit
This commit is contained in:
commit
77d35ff965
51 changed files with 5591 additions and 0 deletions
27
Pages/Azure/Index.cshtml.cs
Normal file
27
Pages/Azure/Index.cshtml.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue