Initial commit

This commit is contained in:
Janus C. H. Knudsen 2026-02-03 00:17:08 +01:00
commit 77d35ff965
51 changed files with 5591 additions and 0 deletions

View file

@ -0,0 +1,29 @@
using Microsoft.AspNetCore.Mvc.RazorPages;
using PlanTempusAdmin.Models;
using PlanTempusAdmin.Services;
namespace PlanTempusAdmin.Pages.Forgejo;
public class ActionsModel : PageModel
{
private readonly ForgejoService _forgejoService;
public bool IsConnected { get; set; }
public List<ForgejoActionRun> Runs { get; set; } = new();
public List<ForgejoActionStats> Stats { get; set; } = new();
public ActionsModel(ForgejoService forgejoService)
{
_forgejoService = forgejoService;
}
public async Task OnGetAsync()
{
IsConnected = await _forgejoService.TestConnectionAsync();
if (IsConnected)
{
Runs = await _forgejoService.GetAllActionRunsAsync(100);
Stats = await _forgejoService.GetActionStatsAsync();
}
}
}