Files
OTSSignsOrchestrator/OTSSignsOrchestrator.Core/Models/DTOs/CreateInstanceDto.cs
Matt Batchelder 90eb649940 feat: Implement container logs functionality in InstancesViewModel
- Added properties for managing container logs, including log entries, service filters, and auto-refresh options.
- Introduced commands for refreshing logs, toggling auto-refresh, and closing the logs panel.
- Implemented log fetching logic with error handling and status messages.
- Integrated log display in the InstancesView with a dedicated logs panel.

feat: Enhance navigation to Instances page with auto-selection

- Added method to navigate to the Instances page and auto-select an instance based on abbreviation.

feat: Update SettingsViewModel to load and save Bitwarden configuration

- Integrated Bitwarden configuration loading from IOptions and saving to appsettings.json.
- Added properties for Bitwarden instance project ID and connection status.
- Updated UI to reflect Bitwarden settings and connection status.

feat: Add advanced options for instance creation

- Introduced a new expander in CreateInstanceView for advanced options, including purging stale volumes.

feat: Improve InstanceDetailsWindow with pending setup banner

- Added a banner to indicate pending setup for Xibo OAuth credentials, with editable fields for client ID and secret.

fix: Update appsettings.json to include Bitwarden configuration structure

- Added Bitwarden section to appsettings.json for storing configuration values.

chore: Update Docker Compose template with health checks

- Added health check configuration for web service in template.yml to ensure service availability.

refactor: Drop AppSettings table from database

- Removed AppSettings table and related migration files as part of database cleanup.

feat: Create ServiceLogEntry DTO for log management

- Added ServiceLogEntry class to represent individual log entries from Docker services.
2026-02-25 17:39:17 -05:00

48 lines
1.8 KiB
C#

using System.ComponentModel.DataAnnotations;
namespace OTSSignsOrchestrator.Core.Models.DTOs;
public class CreateInstanceDto
{
[Required, MaxLength(100)]
public string CustomerName { get; set; } = string.Empty;
/// <summary>Exactly 3 lowercase letters used to derive all resource names.</summary>
[Required, MaxLength(3), MinLength(3), RegularExpression("^[a-z]{3}$", ErrorMessage = "Abbreviation must be exactly 3 lowercase letters.")]
public string CustomerAbbrev { get; set; } = string.Empty;
/// <summary>SSH host to deploy to.</summary>
public Guid? SshHostId { get; set; }
/// <summary>Pangolin Newt ID (optional — tunnel service excluded if not provided).</summary>
[MaxLength(500)]
public string? NewtId { get; set; }
/// <summary>Pangolin Newt Secret (optional — tunnel service excluded if not provided).</summary>
[MaxLength(500)]
public string? NewtSecret { get; set; }
// ── NFS volume settings (optional — falls back to global settings) ──
[MaxLength(200)]
public string? NfsServer { get; set; }
/// <summary>NFS export path on the server (e.g. "/srv/nfs").</summary>
[MaxLength(500)]
public string? NfsExport { get; set; }
/// <summary>Optional subfolder within the export (e.g. "ots_cms"). Omit to use the export root.</summary>
[MaxLength(500)]
public string? NfsExportFolder { get; set; }
[MaxLength(500)]
public string? NfsExtraOptions { get; set; }
/// <summary>
/// When true, any existing Docker volumes with the same stack prefix are removed before
/// deploying, so fresh volumes are created from the current compose driver_opts.
/// Defaults to false to avoid accidental data loss on re-deploys.
/// </summary>
public bool PurgeStaleVolumes { get; set; } = false;
}