ViewUpdates
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Diagnostics;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using watcher_monitoring.Models;
|
||||
|
||||
using watcher_monitoring.Data;
|
||||
using watcher_monitoring.ViewModels;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace watcher_monitoring.Controllers;
|
||||
|
||||
@@ -28,7 +32,12 @@ public class MonitoringController : Controller
|
||||
[HttpGet("server")]
|
||||
public async Task <IActionResult> ServerIndex()
|
||||
{
|
||||
return View();
|
||||
var ServerIndexViewModel = new ServerIndexViewModel
|
||||
{
|
||||
servers = await _context.Servers.ToListAsync()
|
||||
};
|
||||
|
||||
return View(ServerIndexViewModel);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user