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.
This commit is contained in:
@@ -37,4 +37,11 @@ public class CreateInstanceDto
|
||||
|
||||
[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;
|
||||
}
|
||||
|
||||
@@ -10,4 +10,10 @@ public class DeploymentResultDto
|
||||
public int ExitCode { get; set; }
|
||||
public long DurationMs { get; set; }
|
||||
public int ServiceCount { get; set; }
|
||||
|
||||
/// <summary>The instance URL including the abbreviation sub-path (e.g. https://ots.ots-signs.com/ots).</summary>
|
||||
public string? InstanceUrl { get; set; }
|
||||
|
||||
/// <summary>The 3-letter abbreviation for this instance.</summary>
|
||||
public string? Abbrev { get; set; }
|
||||
}
|
||||
|
||||
24
OTSSignsOrchestrator.Core/Models/DTOs/ServiceLogEntry.cs
Normal file
24
OTSSignsOrchestrator.Core/Models/DTOs/ServiceLogEntry.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
namespace OTSSignsOrchestrator.Core.Models.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a single log line from a Docker service.
|
||||
/// Parsed from <c>docker service logs --timestamps</c> output.
|
||||
/// </summary>
|
||||
public class ServiceLogEntry
|
||||
{
|
||||
/// <summary>UTC timestamp of the log entry (from Docker).</summary>
|
||||
public DateTimeOffset Timestamp { get; set; }
|
||||
|
||||
/// <summary>Service/replica identifier (e.g. "acm-cms-stack_acm-web.1.abc123").</summary>
|
||||
public string Source { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>The log message text.</summary>
|
||||
public string Message { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Short service name without the stack prefix (e.g. "acm-web").</summary>
|
||||
public string ServiceName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Formatted display string for binding: "[timestamp] source | message".</summary>
|
||||
public string DisplayLine =>
|
||||
$"[{Timestamp:HH:mm:ss}] {Source} | {Message}";
|
||||
}
|
||||
Reference in New Issue
Block a user