feature: saved exports

initial - not feature complete
This commit is contained in:
Gary Sharp
2025-02-09 17:14:04 +11:00
parent 2fce645066
commit ac24055365
35 changed files with 2244 additions and 156 deletions
+3 -13
View File
@@ -15,12 +15,10 @@ namespace Disco.Services.Logging
public class LogExport : IExport<LogExportOptions, LogLiveEvent>
{
public Guid Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public bool TimestampSuffix { get; set; }
public string Name { get; } = "Log Export";
public LogExportOptions Options { get; set; }
public string SuggestedFilenamePrefix { get; } = "DiscoIctLogs";
public string FilenamePrefix { get; } = "DiscoIctLogs";
public string ExcelWorksheetName { get; } = "Disco ICT Logs";
public string ExcelTableName { get; } = "DiscoIctLogs";
@@ -29,20 +27,12 @@ namespace Disco.Services.Logging
{
}
public LogExport(string name, string description, bool timestampSuffix, LogExportOptions options)
public LogExport(LogExportOptions options)
{
Id = Guid.NewGuid();
Name = name;
Description = description;
TimestampSuffix = timestampSuffix;
Options = options;
}
public LogExport(LogExportOptions options)
: this("Log Export", null, true, options)
{
}
public ExportResult Export(DiscoDataContext database, IScheduledTaskStatus status)
=> Exporter.Export(this, database, status);