refactor: make exporting consistent
This commit is contained in:
@@ -83,8 +83,8 @@
|
||||
<Compile Include="Services\Interop\DiscoServices\Activation\CallbackModel.cs" />
|
||||
<Compile Include="Services\Interop\DiscoServices\Activation\ChallengeModel.cs" />
|
||||
<Compile Include="Services\Interop\DiscoServices\IConnectNotification.cs" />
|
||||
<Compile Include="Services\Jobs\Exporting\JobExportOptions.cs" />
|
||||
<Compile Include="Services\Jobs\Exporting\JobExportRecord.cs" />
|
||||
<Compile Include="Services\Jobs\JobExportOptions.cs" />
|
||||
<Compile Include="Services\Jobs\JobExportRecord.cs" />
|
||||
<Compile Include="Services\Jobs\LocationModes.cs" />
|
||||
<Compile Include="ClientServices\EnrolmentInformation\Certificate.cs" />
|
||||
<Compile Include="ClientServices\Register.cs" />
|
||||
@@ -137,10 +137,10 @@
|
||||
<Compile Include="Repository\User\UserAttachment.cs" />
|
||||
<Compile Include="Repository\User\UserDetail.cs" />
|
||||
<Compile Include="Repository\User\AuthorizationRole.cs" />
|
||||
<Compile Include="Services\Devices\Exporting\DeviceExportRecord.cs" />
|
||||
<Compile Include="Services\Devices\DeviceExportRecord.cs" />
|
||||
<Compile Include="Exporting\ExportResult.cs" />
|
||||
<Compile Include="Services\Devices\Exporting\DeviceExportTypes.cs" />
|
||||
<Compile Include="Services\Devices\Exporting\DeviceExportOptions.cs" />
|
||||
<Compile Include="Services\Devices\DeviceExportTypes.cs" />
|
||||
<Compile Include="Services\Devices\DeviceExportOptions.cs" />
|
||||
<Compile Include="Services\Devices\Importing\DeviceImportFieldTypes.cs" />
|
||||
<Compile Include="Services\Devices\Importing\IDeviceImportRecord.cs" />
|
||||
<Compile Include="Services\Devices\Importing\IDeviceImportContext.cs" />
|
||||
@@ -159,6 +159,7 @@
|
||||
<Compile Include="Services\Jobs\JobLists\JobTableStatusQueueItemModel.cs" />
|
||||
<Compile Include="Services\Jobs\JobQueues\IJobQueueToken.cs" />
|
||||
<Compile Include="Services\Jobs\Noticeboards\IHeldDeviceItem.cs" />
|
||||
<Compile Include="Services\Logging\LogExportOptions.cs" />
|
||||
<Compile Include="Services\Messaging\Email.cs" />
|
||||
<Compile Include="Services\Messaging\EmailAttachment.cs" />
|
||||
<Compile Include="Services\Users\Contact\UserContact.cs" />
|
||||
|
||||
@@ -4,9 +4,7 @@ namespace Disco.Models.Services.Exporting
|
||||
{
|
||||
public interface IExportOptions
|
||||
{
|
||||
ExportFormat Format { get; }
|
||||
string FilenamePrefix { get; }
|
||||
string ExcelWorksheetName { get; }
|
||||
string ExcelTableName { get; }
|
||||
int Version { get; set; }
|
||||
ExportFormat Format { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
+4
-6
@@ -2,17 +2,15 @@
|
||||
using Disco.Models.Services.Exporting;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Disco.Models.Services.Devices.Exporting
|
||||
namespace Disco.Models.Services.Devices
|
||||
{
|
||||
public class DeviceExportOptions : IExportOptions
|
||||
{
|
||||
public int Version { get; set; } = 1;
|
||||
public ExportFormat Format { get; set; }
|
||||
|
||||
public DeviceExportTypes ExportType { get; set; }
|
||||
public int? ExportTypeTargetId { get; set; }
|
||||
|
||||
public ExportFormat Format { get; set; }
|
||||
public string FilenamePrefix { get; } = "DiscoDeviceExport";
|
||||
public string ExcelWorksheetName { get; } = "DeviceExport";
|
||||
public string ExcelTableName { get; } = "Devices";
|
||||
|
||||
// Device
|
||||
[Display(ShortName = "Device", Name = "Serial Number", Description = "The device serial number")]
|
||||
+1
-1
@@ -4,7 +4,7 @@ using Disco.Models.Repository;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Models.Services.Devices.Exporting
|
||||
namespace Disco.Models.Services.Devices
|
||||
{
|
||||
public class DeviceExportRecord : IExportRecord
|
||||
{
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
namespace Disco.Models.Services.Devices.Exporting
|
||||
namespace Disco.Models.Services.Devices
|
||||
{
|
||||
public enum DeviceExportTypes
|
||||
{
|
||||
@@ -7,10 +7,8 @@ namespace Disco.Models.Services.Devices.DeviceFlag
|
||||
{
|
||||
public class DeviceFlagExportOptions : IExportOptions
|
||||
{
|
||||
public int Version { get; set; } = 1;
|
||||
public ExportFormat Format { get; set; }
|
||||
public string FilenamePrefix { get; } = "DiscoDeviceFlagExport";
|
||||
public string ExcelWorksheetName { get; } = "DeviceFlagExport";
|
||||
public string ExcelTableName { get; } = "DeviceFlags";
|
||||
|
||||
[Required]
|
||||
public List<int> DeviceFlagIds { get; set; } = new List<int>();
|
||||
|
||||
+4
-6
@@ -4,10 +4,13 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Disco.Models.Services.Jobs.Exporting
|
||||
namespace Disco.Models.Services.Jobs
|
||||
{
|
||||
public class JobExportOptions : IExportOptions
|
||||
{
|
||||
public int Version { get; set; } = 1;
|
||||
public ExportFormat Format { get; set; }
|
||||
|
||||
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, HtmlEncode = false)]
|
||||
public DateTime FilterStartDate { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, HtmlEncode = false)]
|
||||
@@ -17,11 +20,6 @@ namespace Disco.Models.Services.Jobs.Exporting
|
||||
public List<string> FilterJobSubTypeIds { get; set; }
|
||||
public int? FilterJobQueueId { get; set; }
|
||||
|
||||
public ExportFormat Format { get; set; }
|
||||
public string FilenamePrefix { get; } = "DiscoJobExport";
|
||||
public string ExcelWorksheetName { get; } = "JobExport";
|
||||
public string ExcelTableName { get; } = "Jobs";
|
||||
|
||||
// Job
|
||||
[Display(ShortName = "Job", Name = "Identifier", Description = "The identifier of the job")]
|
||||
public bool JobId { get; set; }
|
||||
+1
-1
@@ -3,7 +3,7 @@ using Disco.Models.Repository;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Models.Services.Jobs.Exporting
|
||||
namespace Disco.Models.Services.Jobs
|
||||
{
|
||||
public class JobExportRecord : IExportRecord
|
||||
{
|
||||
@@ -0,0 +1,19 @@
|
||||
using Disco.Models.Exporting;
|
||||
using Disco.Models.Services.Exporting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Models.Services.Logging
|
||||
{
|
||||
public class LogExportOptions : IExportOptions
|
||||
{
|
||||
public int Version { get; set; } = 1;
|
||||
public ExportFormat Format { get; set; }
|
||||
|
||||
public DateTime? StartDate { get; set; }
|
||||
public DateTime? EndDate { get; set; }
|
||||
public int? ModuleId { get; set; }
|
||||
public List<int> EventTypeIds { get; set; }
|
||||
public int? Take { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -7,10 +7,8 @@ namespace Disco.Models.Services.Users.UserFlags
|
||||
{
|
||||
public class UserFlagExportOptions : IExportOptions
|
||||
{
|
||||
public int Version { get; set; } = 1;
|
||||
public ExportFormat Format { get; set; }
|
||||
public string FilenamePrefix { get; } = "DiscoUserFlagExport";
|
||||
public string ExcelWorksheetName { get; } = "UserFlagExport";
|
||||
public string ExcelTableName { get; } = "UserFlags";
|
||||
|
||||
[Required]
|
||||
public List<int> UserFlagIds { get; set; } = new List<int>();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Disco.Models.Services.Devices.DeviceFlag;
|
||||
using Disco.Models.Services.Exporting;
|
||||
using Disco.Models.UI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Models.Areas.Config.UI.DeviceFlag
|
||||
@@ -9,8 +10,8 @@ namespace Disco.Models.Areas.Config.UI.DeviceFlag
|
||||
{
|
||||
DeviceFlagExportOptions Options { get; set; }
|
||||
|
||||
string ExportSessionId { get; set; }
|
||||
ExportResult ExportSessionResult { get; set; }
|
||||
Guid? ExportId { get; set; }
|
||||
ExportResult ExportResult { get; set; }
|
||||
|
||||
List<Repository.DeviceFlag> DeviceFlags { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Disco.Models.Services.Exporting;
|
||||
using Disco.Models.Services.Users.UserFlags;
|
||||
using Disco.Models.UI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Models.Areas.Config.UI.UserFlag
|
||||
@@ -9,8 +10,8 @@ namespace Disco.Models.Areas.Config.UI.UserFlag
|
||||
{
|
||||
UserFlagExportOptions Options { get; set; }
|
||||
|
||||
string ExportSessionId { get; set; }
|
||||
ExportResult ExportSessionResult { get; set; }
|
||||
Guid? ExportId { get; set; }
|
||||
ExportResult ExportResult { get; set; }
|
||||
|
||||
List<Repository.UserFlag> UserFlags { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Disco.Models.Services.Devices.Exporting;
|
||||
using Disco.Models.Services.Devices;
|
||||
using Disco.Models.Services.Exporting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Models.UI.Device
|
||||
@@ -8,8 +9,8 @@ namespace Disco.Models.UI.Device
|
||||
{
|
||||
DeviceExportOptions Options { get; set; }
|
||||
|
||||
string ExportSessionId { get; set; }
|
||||
ExportResult ExportSessionResult { get; set; }
|
||||
Guid? ExportId { get; set; }
|
||||
ExportResult ExportResult { get; set; }
|
||||
|
||||
IEnumerable<KeyValuePair<int, string>> DeviceBatches { get; set; }
|
||||
IEnumerable<KeyValuePair<int, string>> DeviceModels { get; set; }
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.Services.Exporting;
|
||||
using Disco.Models.Services.Jobs.Exporting;
|
||||
using Disco.Models.Services.Jobs;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Models.UI.Job
|
||||
@@ -9,8 +10,8 @@ namespace Disco.Models.UI.Job
|
||||
{
|
||||
JobExportOptions Options { get; set; }
|
||||
|
||||
string ExportSessionId { get; set; }
|
||||
ExportResult ExportSessionResult { get; set; }
|
||||
Guid? ExportId { get; set; }
|
||||
ExportResult ExportResult { get; set; }
|
||||
|
||||
List<JobQueue> JobQueues { get; set; }
|
||||
List<KeyValuePair<string, string>> JobStatuses { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user