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
View File
@@ -57,6 +57,8 @@
<Compile Include="Repository\Device\Flag\DeviceFlagAssignment.cs" />
<Compile Include="Services\Devices\DeviceFlags\DeviceFlagExportOptions.cs" />
<Compile Include="Services\Devices\DeviceFlags\DeviceFlagExportRecord.cs" />
<Compile Include="Services\Exporting\SavedExport.cs" />
<Compile Include="Services\Exporting\SavedExportSchedule.cs" />
<Compile Include="Services\Expressions\Extensions\ImageExpressionFormat.cs" />
<Compile Include="ClientServices\EnrolmentInformation\BaseBoard.cs" />
<Compile Include="ClientServices\EnrolmentInformation\Battery.cs" />
@@ -193,6 +195,7 @@
<Compile Include="UI\Config\DocumentTemplate\ConfigDocumentTemplateBulkGenerate.cs" />
<Compile Include="UI\Config\DocumentTemplate\ConfigDocumentTemplateCreatePackageModel.cs" />
<Compile Include="UI\Config\DocumentTemplate\ConfigDocumentTemplateCreateModel.cs" />
<Compile Include="UI\Config\Export\ConfigEnrolmentIndexModel.cs" />
<Compile Include="UI\Config\Expressions\ConfigExpressionsBrowserModel.cs" />
<Compile Include="UI\Config\DocumentTemplate\ConfigDocumentTemplateImportStatusModel.cs" />
<Compile Include="UI\Config\DocumentTemplate\ConfigDocumentTemplateIndexModel.cs" />
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Disco.Models.Services.Exporting
{
public class SavedExport
{
public int Version { get; set; } = 1;
public Guid Id { get; set; }
public DateTime CreatedOn { get; set; }
public string CreatedBy { get; set; }
public string Type { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public SavedExportSchedule Schedule { get; set; }
public bool TimestampSuffix { get; set; }
public string FilePath { get; set; }
public string Config { get; set; }
public List<string> OnDemandPrincipals { get; set; }
public bool Enabled { get; set; }
public DateTime? LastRunOn { get; set; }
}
}
@@ -0,0 +1,12 @@
using System;
namespace Disco.Models.Services.Exporting
{
public class SavedExportSchedule
{
public int Version { get; set; } = 1;
public byte WeekDays { get; set; }
public byte StartHour { get; set; }
public byte? EndHour { get; set; }
}
}
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
namespace Disco.Models.UI.Config.Export
{
public interface ConfigExportCreateModel : BaseUIModel
{
string ExportTypeName { get; set; }
Guid Id { get; set; }
string Name { get; set; }
string Description { get; set; }
string FilePath { get; set; }
bool TimestampSuffix { get; set; }
bool ScheduleEnabled { get; set; }
bool ScheduleMonday { get; set; }
bool ScheduleTuesday { get; set; }
bool ScheduleWednesday { get; set; }
bool ScheduleThursday { get; set; }
bool ScheduleFriday { get; set; }
bool ScheduleSaturday { get; set; }
bool ScheduleSunday { get; set; }
byte ScheduleStartHour { get; set; }
byte? ScheduleEndHour { get; set; }
List<string> OnDemandPrincipals { get; set; }
}
}