Merge pull request 'Server Erstellung angepasst' (#57) from enhancement/server-erstellung-#46 into development

Reviewed-on: daniel-hbn/Watcher#57
This commit is contained in:
2025-07-31 13:43:35 +00:00
9 changed files with 802 additions and 19 deletions

View File

@@ -0,0 +1,377 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Watcher.Data;
#nullable disable
namespace Watcher.Migrations
{
[DbContext(typeof(AppDbContext))]
[Migration("20250730172010_MeasurementWarnings")]
partial class MeasurementWarnings
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.6");
modelBuilder.Entity("Watcher.Models.Container", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<int>("ExposedPort")
.HasColumnType("INTEGER");
b.Property<string>("Health")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int?>("HostServerId")
.HasColumnType("INTEGER");
b.Property<string>("Image")
.HasColumnType("TEXT");
b.Property<int?>("ImageId")
.HasColumnType("INTEGER");
b.Property<int>("InternalPort")
.HasColumnType("INTEGER");
b.Property<bool>("IsRunning")
.HasColumnType("INTEGER");
b.Property<string>("Name")
.HasColumnType("TEXT");
b.Property<string>("Status")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int?>("TagId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("HostServerId");
b.HasIndex("ImageId");
b.HasIndex("TagId");
b.ToTable("Containers");
});
modelBuilder.Entity("Watcher.Models.Image", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Name")
.HasColumnType("TEXT");
b.Property<string>("Tag")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Images");
});
modelBuilder.Entity("Watcher.Models.LogEvent", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int?>("ContainerId")
.HasColumnType("INTEGER");
b.Property<string>("Level")
.HasColumnType("TEXT");
b.Property<string>("Message")
.HasColumnType("TEXT");
b.Property<int?>("ServerId")
.HasColumnType("INTEGER");
b.Property<DateTime>("Timestamp")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ContainerId");
b.HasIndex("ServerId");
b.ToTable("LogEvents");
});
modelBuilder.Entity("Watcher.Models.Metric", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<double>("CPU_Load")
.HasColumnType("REAL");
b.Property<double>("CPU_Temp")
.HasColumnType("REAL");
b.Property<double>("DISK_Size")
.HasColumnType("REAL");
b.Property<double>("DISK_Temp")
.HasColumnType("REAL");
b.Property<double>("DISK_Usage")
.HasColumnType("REAL");
b.Property<double>("GPU_Load")
.HasColumnType("REAL");
b.Property<double>("GPU_Temp")
.HasColumnType("REAL");
b.Property<double>("GPU_Vram_Size")
.HasColumnType("REAL");
b.Property<double>("GPU_Vram_Usage")
.HasColumnType("REAL");
b.Property<double>("NET_In")
.HasColumnType("REAL");
b.Property<double>("NET_Out")
.HasColumnType("REAL");
b.Property<double>("RAM_Load")
.HasColumnType("REAL");
b.Property<double>("RAM_Size")
.HasColumnType("REAL");
b.Property<int?>("ServerId")
.HasColumnType("INTEGER");
b.Property<DateTime>("Timestamp")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Metrics");
});
modelBuilder.Entity("Watcher.Models.Server", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<double>("CPU_Load_Critical")
.HasColumnType("REAL");
b.Property<double>("CPU_Load_Warning")
.HasColumnType("REAL");
b.Property<double>("CPU_Temp_Critical")
.HasColumnType("REAL");
b.Property<double>("CPU_Temp_Warning")
.HasColumnType("REAL");
b.Property<int>("CpuCores")
.HasColumnType("INTEGER");
b.Property<string>("CpuType")
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<double>("DISK_Temp_Critical")
.HasColumnType("REAL");
b.Property<double>("DISK_Temp_Warning")
.HasColumnType("REAL");
b.Property<string>("Description")
.HasColumnType("TEXT");
b.Property<string>("DiskSpace")
.HasColumnType("TEXT");
b.Property<double>("Disk_Usage_Critical")
.HasColumnType("REAL");
b.Property<double>("Disk_Usage_Warning")
.HasColumnType("REAL");
b.Property<double>("GPU_Load_Critical")
.HasColumnType("REAL");
b.Property<double>("GPU_Load_Warning")
.HasColumnType("REAL");
b.Property<double>("GPU_Temp_Critical")
.HasColumnType("REAL");
b.Property<double>("GPU_Temp_Warning")
.HasColumnType("REAL");
b.Property<string>("GpuType")
.HasColumnType("TEXT");
b.Property<string>("IPAddress")
.IsRequired()
.HasColumnType("TEXT");
b.Property<bool>("IsOnline")
.HasColumnType("INTEGER");
b.Property<bool>("IsVerified")
.HasColumnType("INTEGER");
b.Property<DateTime>("LastSeen")
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property<double>("RAM_Load_Critical")
.HasColumnType("REAL");
b.Property<double>("RAM_Load_Warning")
.HasColumnType("REAL");
b.Property<double>("RamSize")
.HasColumnType("REAL");
b.Property<int?>("TagId")
.HasColumnType("INTEGER");
b.Property<string>("Type")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("TagId");
b.ToTable("Servers");
});
modelBuilder.Entity("Watcher.Models.Tag", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Name")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Tags");
});
modelBuilder.Entity("Watcher.Models.User", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Email")
.HasColumnType("TEXT");
b.Property<string>("IdentityProvider")
.IsRequired()
.HasColumnType("TEXT");
b.Property<DateTime>("LastLogin")
.HasColumnType("TEXT");
b.Property<string>("OIDC_Id")
.HasColumnType("TEXT");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Username")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Users");
});
modelBuilder.Entity("Watcher.Models.Container", b =>
{
b.HasOne("Watcher.Models.Server", "HostServer")
.WithMany()
.HasForeignKey("HostServerId");
b.HasOne("Watcher.Models.Image", null)
.WithMany("Containers")
.HasForeignKey("ImageId");
b.HasOne("Watcher.Models.Tag", null)
.WithMany("Containers")
.HasForeignKey("TagId");
b.Navigation("HostServer");
});
modelBuilder.Entity("Watcher.Models.LogEvent", b =>
{
b.HasOne("Watcher.Models.Container", "Container")
.WithMany()
.HasForeignKey("ContainerId");
b.HasOne("Watcher.Models.Server", "Server")
.WithMany()
.HasForeignKey("ServerId");
b.Navigation("Container");
b.Navigation("Server");
});
modelBuilder.Entity("Watcher.Models.Server", b =>
{
b.HasOne("Watcher.Models.Tag", null)
.WithMany("Servers")
.HasForeignKey("TagId");
});
modelBuilder.Entity("Watcher.Models.Image", b =>
{
b.Navigation("Containers");
});
modelBuilder.Entity("Watcher.Models.Tag", b =>
{
b.Navigation("Containers");
b.Navigation("Servers");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -0,0 +1,172 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Watcher.Migrations
{
/// <inheritdoc />
public partial class MeasurementWarnings : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<double>(
name: "CPU_Load_Critical",
table: "Servers",
type: "REAL",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<double>(
name: "CPU_Load_Warning",
table: "Servers",
type: "REAL",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<double>(
name: "CPU_Temp_Critical",
table: "Servers",
type: "REAL",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<double>(
name: "CPU_Temp_Warning",
table: "Servers",
type: "REAL",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<double>(
name: "DISK_Temp_Critical",
table: "Servers",
type: "REAL",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<double>(
name: "DISK_Temp_Warning",
table: "Servers",
type: "REAL",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<double>(
name: "Disk_Usage_Critical",
table: "Servers",
type: "REAL",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<double>(
name: "Disk_Usage_Warning",
table: "Servers",
type: "REAL",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<double>(
name: "GPU_Load_Critical",
table: "Servers",
type: "REAL",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<double>(
name: "GPU_Load_Warning",
table: "Servers",
type: "REAL",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<double>(
name: "GPU_Temp_Critical",
table: "Servers",
type: "REAL",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<double>(
name: "GPU_Temp_Warning",
table: "Servers",
type: "REAL",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<double>(
name: "RAM_Load_Critical",
table: "Servers",
type: "REAL",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<double>(
name: "RAM_Load_Warning",
table: "Servers",
type: "REAL",
nullable: false,
defaultValue: 0.0);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "CPU_Load_Critical",
table: "Servers");
migrationBuilder.DropColumn(
name: "CPU_Load_Warning",
table: "Servers");
migrationBuilder.DropColumn(
name: "CPU_Temp_Critical",
table: "Servers");
migrationBuilder.DropColumn(
name: "CPU_Temp_Warning",
table: "Servers");
migrationBuilder.DropColumn(
name: "DISK_Temp_Critical",
table: "Servers");
migrationBuilder.DropColumn(
name: "DISK_Temp_Warning",
table: "Servers");
migrationBuilder.DropColumn(
name: "Disk_Usage_Critical",
table: "Servers");
migrationBuilder.DropColumn(
name: "Disk_Usage_Warning",
table: "Servers");
migrationBuilder.DropColumn(
name: "GPU_Load_Critical",
table: "Servers");
migrationBuilder.DropColumn(
name: "GPU_Load_Warning",
table: "Servers");
migrationBuilder.DropColumn(
name: "GPU_Temp_Critical",
table: "Servers");
migrationBuilder.DropColumn(
name: "GPU_Temp_Warning",
table: "Servers");
migrationBuilder.DropColumn(
name: "RAM_Load_Critical",
table: "Servers");
migrationBuilder.DropColumn(
name: "RAM_Load_Warning",
table: "Servers");
}
}
}

View File

@@ -178,6 +178,18 @@ namespace Watcher.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<double>("CPU_Load_Critical")
.HasColumnType("REAL");
b.Property<double>("CPU_Load_Warning")
.HasColumnType("REAL");
b.Property<double>("CPU_Temp_Critical")
.HasColumnType("REAL");
b.Property<double>("CPU_Temp_Warning")
.HasColumnType("REAL");
b.Property<int>("CpuCores")
.HasColumnType("INTEGER");
@@ -187,12 +199,36 @@ namespace Watcher.Migrations
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<double>("DISK_Temp_Critical")
.HasColumnType("REAL");
b.Property<double>("DISK_Temp_Warning")
.HasColumnType("REAL");
b.Property<string>("Description")
.HasColumnType("TEXT");
b.Property<string>("DiskSpace")
.HasColumnType("TEXT");
b.Property<double>("Disk_Usage_Critical")
.HasColumnType("REAL");
b.Property<double>("Disk_Usage_Warning")
.HasColumnType("REAL");
b.Property<double>("GPU_Load_Critical")
.HasColumnType("REAL");
b.Property<double>("GPU_Load_Warning")
.HasColumnType("REAL");
b.Property<double>("GPU_Temp_Critical")
.HasColumnType("REAL");
b.Property<double>("GPU_Temp_Warning")
.HasColumnType("REAL");
b.Property<string>("GpuType")
.HasColumnType("TEXT");
@@ -213,6 +249,12 @@ namespace Watcher.Migrations
.IsRequired()
.HasColumnType("TEXT");
b.Property<double>("RAM_Load_Critical")
.HasColumnType("REAL");
b.Property<double>("RAM_Load_Warning")
.HasColumnType("REAL");
b.Property<double>("RamSize")
.HasColumnType("REAL");

View File

@@ -27,6 +27,27 @@ public class Server
public double RamSize { get; set; } = 0;
public string? DiskSpace { get; set; } = string.Empty;
// Hardware Measurment Warning/Crit Values
public double CPU_Load_Warning { get; set; } = 75.0;
public double CPU_Load_Critical { get; set; } = 90.0;
public double CPU_Temp_Warning { get; set; } = 80.0;
public double CPU_Temp_Critical { get; set; } = 90.0;
public double RAM_Load_Warning { get; set; } = 85.0;
public double RAM_Load_Critical { get; set; } = 95.0;
public double GPU_Load_Warning { get; set; } = 75.0;
public double GPU_Load_Critical { get; set; } = 90.0;
public double GPU_Temp_Warning { get; set; } = 70.0;
public double GPU_Temp_Critical { get; set; } = 80.0;
public double Disk_Usage_Warning { get; set; } = 75.0;
public double Disk_Usage_Critical { get; set; } = 90.0;
public double DISK_Temp_Warning { get; set; } = 34.0;
public double DISK_Temp_Critical { get; set; } = 36.0;
// Database
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;

View File

@@ -1,6 +1,7 @@
using Watcher.Models;
namespace Watcher.ViewModels;
public class AddContainerViewModel
{
public string Name { get; set; } = string.Empty;
@@ -10,4 +11,7 @@ public class AddContainerViewModel
public string IPAddress { get; set; } = string.Empty;
public string ServerName { get; set; } = string.Empty; // oder ID, je nach Relation
public bool IsRunning { get; set; } = false;
}

View File

@@ -7,13 +7,32 @@ namespace Watcher.ViewModels
public int Id { get; set; }
[Required(ErrorMessage = "Name ist erforderlich")]
public string Name { get; set; }
public string? Name { get; set; }
[Required(ErrorMessage = "IP-Adresse ist erforderlich")]
[RegularExpression(@"^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$", ErrorMessage = "Ungültige IP-Adresse")]
public string IPAddress { get; set; }
public required string IPAddress { get; set; }
[Required(ErrorMessage = "Typ ist erforderlich")]
public string Type { get; set; }
public string? Type { get; set; }
// Hardware Measurment Warning/Crit Values
public double CPU_Load_Warning { get; set; } = 75.0;
public double CPU_Load_Critical { get; set; } = 90.0;
public double CPU_Temp_Warning { get; set; } = 80.0;
public double CPU_Temp_Critical { get; set; } = 90.0;
public double RAM_Load_Warning { get; set; } = 85.0;
public double RAM_Load_Critical { get; set; } = 95.0;
public double GPU_Load_Warning { get; set; } = 75.0;
public double GPU_Load_Critical { get; set; } = 90.0;
public double GPU_Temp_Warning { get; set; } = 70.0;
public double GPU_Temp_Critical { get; set; } = 80.0;
public double Disk_Usage_Warning { get; set; } = 75.0;
public double Disk_Usage_Critical { get; set; } = 90.0;
public double DISK_Temp_Warning { get; set; } = 34.0;
public double DISK_Temp_Critical { get; set; } = 36.0;
}
}

View File

@@ -4,30 +4,178 @@
ViewData["Title"] = "Server bearbeiten";
}
<h2>Server bearbeiten</h2>
<h2 class="mb-4">Server bearbeiten</h2>
<form asp-action="EditServer" asp-controller="Server" method="post">
@Html.AntiForgeryToken()
<input type="hidden" asp-for="Id" />
<div class="mb-3">
<label asp-for="Name"></label>
<input asp-for="Name" class="form-control" />
<span asp-validation-for="Name" class="text-danger"></span>
<div class="card mb-4">
<div class="card-header">
<h4 class="mb-0">Allgemeine Informationen</h4>
</div>
<div class="card-body">
<div class="mb-3">
<label asp-for="Name" class="form-label"></label>
<input asp-for="Name" class="form-control" />
<span asp-validation-for="Name" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="IPAddress" class="form-label"></label>
<input asp-for="IPAddress" class="form-control" />
<span asp-validation-for="IPAddress" class="text-danger"></span>
</div>
<div class="mb-4">
<label asp-for="Type" class="form-label"><i class="bi bi-hdd-network me-1"></i>Typ</label>
<select asp-for="Type" class="form-select">
<option>VPS</option>
<option>VM</option>
<option>Standalone</option>
</select>
</div>
</div>
</div>
<div class="mb-3">
<label asp-for="IPAddress"></label>
<input asp-for="IPAddress" class="form-control" />
<span asp-validation-for="IPAddress" class="text-danger"></span>
<div class="card mb-4">
<div class="card-header">
<h4 class="mb-0">Grenzwerte festlegen</h4>
</div>
<div class="card-body">
<fieldset class="mb-4">
<legend class="h5 mb-3">CPU-Grenzwerte</legend>
<div class="row">
<div class="col-md-6">
<div class="mb-3">
<label asp-for="CPU_Load_Warning" class="form-label"><i class="bi bi-graph-up me-1"></i>Warnung bei Auslastung (%)</label>
<input asp-for="CPU_Load_Warning" class="form-control" placeholder="z.B. 80" />
<span asp-validation-for="CPU_Load_Warning" class="text-danger small"></span>
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<label asp-for="CPU_Load_Critical" class="form-label"><i class="bi bi-graph-up me-1"></i>Kritische Auslastung (%)</label>
<input asp-for="CPU_Load_Critical" class="form-control" placeholder="z.B. 95" />
<span asp-validation-for="CPU_Load_Critical" class="text-danger small"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="mb-3">
<label asp-for="CPU_Temp_Warning" class="form-label"><i class="bi bi-thermometer-half me-1"></i>Warnung bei Temperatur (°C)</label>
<input asp-for="CPU_Temp_Warning" class="form-control" placeholder="z.B. 75" />
<span asp-validation-for="CPU_Temp_Warning" class="text-danger small"></span>
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<label asp-for="CPU_Temp_Critical" class="form-label"><i class="bi bi-thermometer-high me-1"></i>Kritische Temperatur (°C)</label>
<input asp-for="CPU_Temp_Critical" class="form-control" placeholder="z.B. 90" />
<span asp-validation-for="CPU_Temp_Critical" class="text-danger small"></span>
</div>
</div>
</div>
</fieldset>
<fieldset class="mb-4">
<legend class="h5 mb-3">RAM-Grenzwerte</legend>
<div class="row">
<div class="col-md-6">
<div class="mb-3">
<label asp-for="RAM_Load_Warning" class="form-label"><i class="bi bi-graph-up me-1"></i>Warnung bei Auslastung (%)</label>
<input asp-for="RAM_Load_Warning" class="form-control" placeholder="z.B. 85" />
<span asp-validation-for="RAM_Load_Warning" class="text-danger small"></span>
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<label asp-for="RAM_Load_Critical" class="form-label"><i class="bi bi-graph-up me-1"></i>Kritische Auslastung (%)</label>
<input asp-for="RAM_Load_Critical" class="form-control" placeholder="z.B. 98" />
<span asp-validation-for="RAM_Load_Critical" class="text-danger small"></span>
</div>
</div>
</div>
</fieldset>
<fieldset class="mb-4">
<legend class="h5 mb-3">Festplatten-Grenzwerte</legend>
<div class="row">
<div class="col-md-6">
<div class="mb-3">
<label asp-for="Disk_Usage_Warning" class="form-label"><i class="bi bi-disc-fill me-1"></i>Warnung bei Auslastung (%)</label>
<input asp-for="Disk_Usage_Warning" class="form-control" placeholder="z.B. 90" />
<span asp-validation-for="Disk_Usage_Warning" class="text-danger small"></span>
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<label asp-for="Disk_Usage_Critical" class="form-label"><i class="bi bi-disc-fill me-1"></i>Kritische Auslastung (%)</label>
<input asp-for="Disk_Usage_Critical" class="form-control" placeholder="z.B. 98" />
<span asp-validation-for="Disk_Usage_Critical" class="text-danger small"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="mb-3">
<label asp-for="DISK_Temp_Warning" class="form-label"><i class="bi bi-thermometer-half me-1"></i>Warnung bei Temperatur (°C)</label>
<input asp-for="DISK_Temp_Warning" class="form-control" placeholder="z.B. 45" />
<span asp-validation-for="DISK_Temp_Warning" class="text-danger small"></span>
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<label asp-for="DISK_Temp_Critical" class="form-label"><i class="bi bi-thermometer-high me-1"></i>Kritische Temperatur (°C)</label>
<input asp-for="DISK_Temp_Critical" class="form-control" placeholder="z.B. 55" />
<span asp-validation-for="DISK_Temp_Critical" class="text-danger small"></span>
</div>
</div>
</div>
</fieldset>
<fieldset class="mb-4">
<legend class="h5 mb-3">GPU-Grenzwerte</legend>
<div class="row">
<div class="col-md-6">
<div class="mb-3">
<label asp-for="GPU_Load_Warning" class="form-label"><i class="bi bi-graph-up me-1"></i>Warnung bei Auslastung (%)</label>
<input asp-for="GPU_Load_Warning" class="form-control" placeholder="z.B. 80" />
<span asp-validation-for="GPU_Load_Warning" class="text-danger small"></span>
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<label asp-for="GPU_Load_Critical" class="form-label"><i class="bi bi-graph-up me-1"></i>Kritische Auslastung (%)</label>
<input asp-for="GPU_Load_Critical" class="form-control" placeholder="z.B. 95" />
<span asp-validation-for="GPU_Load_Critical" class="text-danger small"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="mb-3">
<label asp-for="GPU_Temp_Warning" class="form-label"><i class="bi bi-thermometer-half me-1"></i>Warnung bei Temperatur (°C)</label>
<input asp-for="GPU_Temp_Warning" class="form-control" placeholder="z.B. 70" />
<span asp-validation-for="GPU_Temp_Warning" class="text-danger small"></span>
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<label asp-for="GPU_Temp_Critical" class="form-label"><i class="bi bi-thermometer-high me-1"></i>Kritische Temperatur (°C)</label>
<input asp-for="GPU_Temp_Critical" class="form-control" placeholder="z.B. 85" />
<span asp-validation-for="GPU_Temp_Critical" class="text-danger small"></span>
</div>
</div>
</div>
</fieldset>
</div>
</div>
<div class="mb-3">
<label asp-for="Type"></label>
<input asp-for="Type" class="form-control" />
<span asp-validation-for="Type" class="text-danger"></span>
<div class="d-flex justify-content-end gap-2">
<button type="submit" class="btn btn-primary"><i class="bi bi-save me-1"></i>Speichern</button>
<a asp-action="Overview" class="btn btn-secondary"><i class="bi bi-x-circle me-1"></i>Abbrechen</a>
</div>
<button type="submit" class="btn btn-primary mt-3">Speichern</button>
<a asp-action="Overview" class="btn btn-secondary mt-3">Abbrechen</a>
</form>

Binary file not shown.

Binary file not shown.