ich kotz gleich
This commit is contained in:
@@ -23,7 +23,7 @@ RUN mkdir -p /app/persistence /app/wwwroot/downloads/sqlite /app/logs
|
|||||||
# Volumes
|
# Volumes
|
||||||
VOLUME ["/app/persistence", "/app/wwwroot/downloads/sqlite", "/app/logs"]
|
VOLUME ["/app/persistence", "/app/wwwroot/downloads/sqlite", "/app/logs"]
|
||||||
|
|
||||||
# Expose Port 80 und 443 (HTTP + HTTPS)
|
# Expose Port 5000
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
ENV ASPNETCORE_URLS=http://*:5000
|
ENV ASPNETCORE_URLS=http://*:5000
|
||||||
ENV ASPNETCORE_ENVIRONMENT=Development
|
ENV ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
@@ -6,7 +6,7 @@ using Watcher.Models;
|
|||||||
using Watcher.ViewModels;
|
using Watcher.ViewModels;
|
||||||
|
|
||||||
[Authorize]
|
[Authorize]
|
||||||
[Route("Server")]
|
[Route("[controller]")]
|
||||||
public class ServerController : Controller
|
public class ServerController : Controller
|
||||||
{
|
{
|
||||||
private readonly AppDbContext _context;
|
private readonly AppDbContext _context;
|
||||||
@@ -79,7 +79,7 @@ public class ServerController : Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET: Server/Edit/5
|
// GET: Server/Edit/5
|
||||||
|
[HttpGet("EditServer/[id]")]
|
||||||
public async Task<IActionResult> EditServer(int id)
|
public async Task<IActionResult> EditServer(int id)
|
||||||
{
|
{
|
||||||
var server = await _context.Servers.FindAsync(id);
|
var server = await _context.Servers.FindAsync(id);
|
||||||
@@ -96,7 +96,7 @@ public class ServerController : Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
// POST: Server/Edit/5
|
// POST: Server/Edit/5
|
||||||
[HttpPost]
|
[HttpPost("EditServer/{id}")]
|
||||||
[ValidateAntiForgeryToken]
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> EditServer(int id, EditServerViewModel vm)
|
public async Task<IActionResult> EditServer(int id, EditServerViewModel vm)
|
||||||
{
|
{
|
||||||
@@ -130,7 +130,7 @@ public class ServerController : Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET: Server/Details/5
|
// GET: Server/Details/5
|
||||||
[HttpGet("Details")]
|
[HttpGet("Details/{id}")]
|
||||||
public async Task<IActionResult> Details(int id)
|
public async Task<IActionResult> Details(int id)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<form asp-action="AddServer" asp-controller="Server" method="post">
|
<form asp-action="AddServer" asp-controller="Server" method="post">
|
||||||
|
@Html.AntiForgeryToken()
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label asp-for="Name" class="form-label"><i class="bi bi-terminal me-1"></i>Servername</label>
|
<label asp-for="Name" class="form-label"><i class="bi bi-terminal me-1"></i>Servername</label>
|
||||||
<input asp-for="Name" class="form-control" placeholder="z.B. Webserver-01" />
|
<input asp-for="Name" class="form-control" placeholder="z.B. Webserver-01" />
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
@{
|
@{
|
||||||
Layout = "_Layout";
|
Layout = "_Layout";
|
||||||
}
|
}
|
||||||
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
Reference in New Issue
Block a user