Backend: - SoftwarePackage model (Name, Version, OsType, PackageManager, PackageName, InstallerUrl, Checksum, SilentArgs) - RmmDbContext: SoftwarePackages DbSet + unique index on (Name, Version, OsType) - SoftwarePackagesController: full CRUD with OsType filter - DeployController: POST /api/v1/deploy creates InstallSoftware/UninstallSoftware TaskItem - EF Migration: AddSoftwarePackages (20260319130448) Go Agent: - internal/deployer/deployer.go: Install() and Uninstall() with: - Chocolatey (Windows), apt/dnf (Linux), auto-detect - Direct installer fallback: HTTP download + SHA256 verify + silent install - Supports .msi, .exe (Windows) and .deb, .rpm (Linux) - main.go: COMMAND_TYPE_INSTALL_SOFTWARE and COMMAND_TYPE_UNINSTALL_SOFTWARE routed to deployer Frontend: - SoftwarePage: Katalog tab (CRUD, OS filter, smart package manager select) + Deploy tab - api/types.ts: SoftwarePackage, PackageManager, DeployRequest/Response types - api/client.ts: softwarePackagesApi and deployApi - App.tsx: Software nav item with Package icon Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
27 lines
937 B
C#
27 lines
937 B
C#
namespace NexusRMM.Core.Models;
|
|
|
|
public class SoftwarePackage
|
|
{
|
|
public int Id { get; set; }
|
|
public string Name { get; set; } = string.Empty;
|
|
public string Version { get; set; } = string.Empty;
|
|
public OsType OsType { get; set; }
|
|
|
|
/// <summary>Paketmanager: "choco", "apt", "dnf", "direct"</summary>
|
|
public string PackageManager { get; set; } = "choco";
|
|
|
|
/// <summary>Paketname für den Paketmanager (z.B. "7zip" für choco)</summary>
|
|
public string PackageName { get; set; } = string.Empty;
|
|
|
|
/// <summary>Optionale direkte Download-URL (für Fallback)</summary>
|
|
public string? InstallerUrl { get; set; }
|
|
|
|
/// <summary>SHA256-Prüfsumme der Installer-Datei</summary>
|
|
public string? Checksum { get; set; }
|
|
|
|
/// <summary>Silent-Install-Parameter für direkten Installer</summary>
|
|
public string? SilentArgs { get; set; }
|
|
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
}
|