CodeStyle, Compose verbesserungen, Docker Healthcheck
This commit is contained in:
392
Watcher/Migrations/20251116233330_RenameServerPropertiesToPascalCase.Designer.cs
generated
Normal file
392
Watcher/Migrations/20251116233330_RenameServerPropertiesToPascalCase.Designer.cs
generated
Normal file
@@ -0,0 +1,392 @@
|
||||
// <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("20251116233330_RenameServerPropertiesToPascalCase")]
|
||||
partial class RenameServerPropertiesToPascalCase
|
||||
{
|
||||
/// <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<string>("ContainerId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "id");
|
||||
|
||||
b.Property<string>("Image")
|
||||
.HasColumnType("TEXT")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "image");
|
||||
|
||||
b.Property<int?>("ImageId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("IsRunning")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("TEXT")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "name");
|
||||
|
||||
b.Property<int>("ServerId")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "Server_id");
|
||||
|
||||
b.Property<int?>("TagId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ImageId");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.HasIndex("TagId");
|
||||
|
||||
b.ToTable("Containers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Watcher.Models.ContainerMetric", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<double>("CPU_Load")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("CPU_Temp")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<int?>("ContainerId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<double>("RAM_Load")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("RAM_Size")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<DateTime>("Timestamp")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("ContainerMetrics");
|
||||
});
|
||||
|
||||
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<int>("CpuCores")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<double>("CpuLoadCritical")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("CpuLoadWarning")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("CpuTempCritical")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("CpuTempWarning")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<string>("CpuType")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("DiskSpace")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<double>("DiskTempCritical")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("DiskTempWarning")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("DiskUsageCritical")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("DiskUsageWarning")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("GpuLoadCritical")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("GpuLoadWarning")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("GpuTempCritical")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("GpuTempWarning")
|
||||
.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>("RamLoadCritical")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("RamLoadWarning")
|
||||
.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<DateTime>("LastLogin")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Username")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Watcher.Models.Container", b =>
|
||||
{
|
||||
b.HasOne("Watcher.Models.Image", null)
|
||||
.WithMany("Containers")
|
||||
.HasForeignKey("ImageId");
|
||||
|
||||
b.HasOne("Watcher.Models.Server", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Watcher.Models.Tag", null)
|
||||
.WithMany("Containers")
|
||||
.HasForeignKey("TagId");
|
||||
|
||||
b.Navigation("Server");
|
||||
});
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Watcher.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class RenameServerPropertiesToPascalCase : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "RAM_Load_Warning",
|
||||
table: "Servers",
|
||||
newName: "RamLoadWarning");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "RAM_Load_Critical",
|
||||
table: "Servers",
|
||||
newName: "RamLoadCritical");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "GPU_Temp_Warning",
|
||||
table: "Servers",
|
||||
newName: "GpuTempWarning");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "GPU_Temp_Critical",
|
||||
table: "Servers",
|
||||
newName: "GpuTempCritical");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "GPU_Load_Warning",
|
||||
table: "Servers",
|
||||
newName: "GpuLoadWarning");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "GPU_Load_Critical",
|
||||
table: "Servers",
|
||||
newName: "GpuLoadCritical");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Disk_Usage_Warning",
|
||||
table: "Servers",
|
||||
newName: "DiskUsageWarning");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Disk_Usage_Critical",
|
||||
table: "Servers",
|
||||
newName: "DiskUsageCritical");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "DISK_Temp_Warning",
|
||||
table: "Servers",
|
||||
newName: "DiskTempWarning");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "DISK_Temp_Critical",
|
||||
table: "Servers",
|
||||
newName: "DiskTempCritical");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "CPU_Temp_Warning",
|
||||
table: "Servers",
|
||||
newName: "CpuTempWarning");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "CPU_Temp_Critical",
|
||||
table: "Servers",
|
||||
newName: "CpuTempCritical");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "CPU_Load_Warning",
|
||||
table: "Servers",
|
||||
newName: "CpuLoadWarning");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "CPU_Load_Critical",
|
||||
table: "Servers",
|
||||
newName: "CpuLoadCritical");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "RamLoadWarning",
|
||||
table: "Servers",
|
||||
newName: "RAM_Load_Warning");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "RamLoadCritical",
|
||||
table: "Servers",
|
||||
newName: "RAM_Load_Critical");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "GpuTempWarning",
|
||||
table: "Servers",
|
||||
newName: "GPU_Temp_Warning");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "GpuTempCritical",
|
||||
table: "Servers",
|
||||
newName: "GPU_Temp_Critical");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "GpuLoadWarning",
|
||||
table: "Servers",
|
||||
newName: "GPU_Load_Warning");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "GpuLoadCritical",
|
||||
table: "Servers",
|
||||
newName: "GPU_Load_Critical");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "DiskUsageWarning",
|
||||
table: "Servers",
|
||||
newName: "Disk_Usage_Warning");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "DiskUsageCritical",
|
||||
table: "Servers",
|
||||
newName: "Disk_Usage_Critical");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "DiskTempWarning",
|
||||
table: "Servers",
|
||||
newName: "DISK_Temp_Warning");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "DiskTempCritical",
|
||||
table: "Servers",
|
||||
newName: "DISK_Temp_Critical");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "CpuTempWarning",
|
||||
table: "Servers",
|
||||
newName: "CPU_Temp_Warning");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "CpuTempCritical",
|
||||
table: "Servers",
|
||||
newName: "CPU_Temp_Critical");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "CpuLoadWarning",
|
||||
table: "Servers",
|
||||
newName: "CPU_Load_Warning");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "CpuLoadCritical",
|
||||
table: "Servers",
|
||||
newName: "CPU_Load_Critical");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -197,55 +197,55 @@ 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");
|
||||
|
||||
b.Property<double>("CpuLoadCritical")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("CpuLoadWarning")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("CpuTempCritical")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("CpuTempWarning")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
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")
|
||||
b.Property<double>("DiskTempCritical")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("Disk_Usage_Warning")
|
||||
b.Property<double>("DiskTempWarning")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("GPU_Load_Critical")
|
||||
b.Property<double>("DiskUsageCritical")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("GPU_Load_Warning")
|
||||
b.Property<double>("DiskUsageWarning")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("GPU_Temp_Critical")
|
||||
b.Property<double>("GpuLoadCritical")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("GPU_Temp_Warning")
|
||||
b.Property<double>("GpuLoadWarning")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("GpuTempCritical")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("GpuTempWarning")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<string>("GpuType")
|
||||
@@ -268,10 +268,10 @@ namespace Watcher.Migrations
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<double>("RAM_Load_Critical")
|
||||
b.Property<double>("RamLoadCritical")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("RAM_Load_Warning")
|
||||
b.Property<double>("RamLoadWarning")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.Property<double>("RamSize")
|
||||
|
||||
Reference in New Issue
Block a user