feat: Add main application views and structure
Some checks failed
Build and Publish Docker Image / build-and-push (push) Has been cancelled
Some checks failed
Build and Publish Docker Image / build-and-push (push) Has been cancelled
- Implemented CreateInstanceView for creating new instances. - Added HostsView for managing SSH hosts with CRUD operations. - Created InstancesView for displaying and managing instances. - Developed LogsView for viewing operation logs. - Introduced SecretsView for managing secrets associated with hosts. - Established SettingsView for configuring application settings. - Created MainWindow as the main application window with navigation. - Added app manifest and configuration files for logging and settings.
This commit is contained in:
41
OTSSignsOrchestrator.Core/Models/DTOs/CreateInstanceDto.cs
Normal file
41
OTSSignsOrchestrator.Core/Models/DTOs/CreateInstanceDto.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
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; }
|
||||
|
||||
// ── CIFS / SMB credentials (optional — falls back to global settings) ──
|
||||
|
||||
[MaxLength(200)]
|
||||
public string? CifsServer { get; set; }
|
||||
|
||||
[MaxLength(500)]
|
||||
public string? CifsShareBasePath { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string? CifsUsername { get; set; }
|
||||
|
||||
[MaxLength(500)]
|
||||
public string? CifsPassword { get; set; }
|
||||
|
||||
[MaxLength(500)]
|
||||
public string? CifsExtraOptions { get; set; }
|
||||
}
|
||||
13
OTSSignsOrchestrator.Core/Models/DTOs/DeploymentResultDto.cs
Normal file
13
OTSSignsOrchestrator.Core/Models/DTOs/DeploymentResultDto.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace OTSSignsOrchestrator.Core.Models.DTOs;
|
||||
|
||||
public class DeploymentResultDto
|
||||
{
|
||||
public bool Success { get; set; }
|
||||
public string StackName { get; set; } = string.Empty;
|
||||
public string Message { get; set; } = string.Empty;
|
||||
public string? Output { get; set; }
|
||||
public string? ErrorMessage { get; set; }
|
||||
public int ExitCode { get; set; }
|
||||
public long DurationMs { get; set; }
|
||||
public int ServiceCount { get; set; }
|
||||
}
|
||||
8
OTSSignsOrchestrator.Core/Models/DTOs/TemplateConfig.cs
Normal file
8
OTSSignsOrchestrator.Core/Models/DTOs/TemplateConfig.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace OTSSignsOrchestrator.Core.Models.DTOs;
|
||||
|
||||
public class TemplateConfig
|
||||
{
|
||||
public string Yaml { get; set; } = string.Empty;
|
||||
public List<string> EnvLines { get; set; } = new();
|
||||
public DateTime FetchedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
43
OTSSignsOrchestrator.Core/Models/DTOs/UpdateInstanceDto.cs
Normal file
43
OTSSignsOrchestrator.Core/Models/DTOs/UpdateInstanceDto.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OTSSignsOrchestrator.Core.Models.DTOs;
|
||||
|
||||
public class UpdateInstanceDto
|
||||
{
|
||||
[MaxLength(500)]
|
||||
public string? TemplateRepoUrl { get; set; }
|
||||
|
||||
[MaxLength(500)]
|
||||
public string? TemplateRepoPat { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string? SmtpServer { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string? SmtpUsername { get; set; }
|
||||
|
||||
public List<string>? Constraints { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string? XiboUsername { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string? XiboPassword { get; set; }
|
||||
|
||||
// ── CIFS / SMB credentials (per-instance) ──
|
||||
|
||||
[MaxLength(200)]
|
||||
public string? CifsServer { get; set; }
|
||||
|
||||
[MaxLength(500)]
|
||||
public string? CifsShareBasePath { get; set; }
|
||||
|
||||
[MaxLength(200)]
|
||||
public string? CifsUsername { get; set; }
|
||||
|
||||
[MaxLength(500)]
|
||||
public string? CifsPassword { get; set; }
|
||||
|
||||
[MaxLength(500)]
|
||||
public string? CifsExtraOptions { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user