initial commit

This commit is contained in:
Kamal Tufekcic 2026-07-05 12:14:39 +03:00
commit 2d966b8198
28 changed files with 2901 additions and 0 deletions

21
Pages/Server.cshtml.cs Normal file
View file

@ -0,0 +1,21 @@
using CsWeb.Services;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace CsWeb.Pages;
public class ServerModel(Fleet fleet) : PageModel
{
public Fleet Fleet => fleet;
public string Id { get; private set; } = "";
public Cached<StatusPayload>? Status { get; private set; }
public async Task<IActionResult> OnGetAsync(string id)
{
// The slug space is exactly the socket names — anything else 404s before touching a socket path.
if (!fleet.Instances().Contains(id)) return NotFound();
Id = id;
Status = await fleet.Status(id);
return Page();
}
}