Container-Übersicht
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
@model Watcher.ViewModels.AddContainerViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Neuen Container hinzufügen";
|
||||
}
|
||||
|
||||
<h1 class="text-2xl font-bold mb-4">Neuen Container hinzufügen</h1>
|
||||
|
||||
<form asp-action="Add" method="post" class="space-y-4 max-w-xl">
|
||||
<div>
|
||||
<label asp-for="Name" class="block font-medium">Name</label>
|
||||
<input asp-for="Name" class="w-full border rounded px-3 py-2" />
|
||||
</div>
|
||||
<div>
|
||||
<label asp-for="Image" class="block font-medium">Image</label>
|
||||
<input asp-for="Image" class="w-full border rounded px-3 py-2" />
|
||||
</div>
|
||||
<div>
|
||||
<label asp-for="ServerName" class="block font-medium">Server</label>
|
||||
<input asp-for="ServerName" class="w-full border rounded px-3 py-2" />
|
||||
</div>
|
||||
<button type="submit" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">Speichern</button>
|
||||
</form>
|
||||
@@ -3,33 +3,14 @@
|
||||
ViewData["Title"] = "Containerübersicht";
|
||||
}
|
||||
|
||||
<div class="flex items-center justify-between mb-6">
|
||||
<h1 class="text-3xl font-bold">Containerübersicht</h1>
|
||||
<a asp-action="AddContainer" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">
|
||||
+ Container hinzufügen
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
@foreach (var container in Model.Containers)
|
||||
{
|
||||
<div class="bg-white shadow-md rounded-xl p-5 border border-gray-200 hover:shadow-lg transition duration-200">
|
||||
<h2 class="text-xl font-semibold mb-1">@container.Name</h2>
|
||||
<p class="text-sm text-gray-600 mb-2"><strong>Image:</strong> @container.Image</p>
|
||||
<p class="text-sm text-gray-600"><strong>Hostname:</strong> @container.Hostname</p>
|
||||
<p class="text-sm text-gray-600"><strong>Status:</strong> @container.Status</p>
|
||||
<p class="text-sm text-gray-600 mb-3">
|
||||
<strong>Läuft:</strong>
|
||||
<span class="@(container.IsRunning ? "text-green-600" : "text-red-600")">
|
||||
@(container.IsRunning ? "Ja" : "Nein")
|
||||
</span>
|
||||
</p>
|
||||
<div class="flex justify-end gap-2">
|
||||
<a asp-action="Edit" asp-route-id="@container.Id"
|
||||
class="text-blue-600 hover:underline text-sm">Bearbeiten</a>
|
||||
<a asp-action="Delete" asp-route-id="@container.Id"
|
||||
class="text-red-600 hover:underline text-sm">Löschen</a>
|
||||
</div>
|
||||
|
||||
<p class="text-sm text-gray-600"><strong>Status:</strong> @(container.IsRunning ? "online" : "offline")</p>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user