feature: bulk generate documents for device batches, models and profiles
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
using Disco.Models.UI.Config.DeviceBatch;
|
||||
using Disco.Services.Devices.ManagedGroups;
|
||||
using Disco.Web.Areas.Config.Models.Shared;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceBatch
|
||||
{
|
||||
public class ShowModel : ConfigDeviceBatchShowModel
|
||||
public class ShowModel : DeviceGroupDocumentTemplateBulkGenerateModel, ConfigDeviceBatchShowModel
|
||||
{
|
||||
public Disco.Models.Repository.DeviceBatch DeviceBatch { get; set; }
|
||||
|
||||
@@ -19,5 +20,7 @@ namespace Disco.Web.Areas.Config.Models.DeviceBatch
|
||||
public int DeviceCount { get; set; }
|
||||
public int DeviceDecommissionedCount { get; set; }
|
||||
public bool CanDelete { get; set; }
|
||||
|
||||
public override int DeviceGroupId => DeviceBatch.Id;
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Disco.Models.UI.Config.DeviceModel;
|
||||
using Disco.Services.Plugins;
|
||||
using Disco.Models.UI.Config.DeviceModel;
|
||||
using Disco.Web.Areas.Config.Models.Shared;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceModel
|
||||
{
|
||||
public class ShowModel : ConfigDeviceModelShowModel
|
||||
public class ShowModel : DeviceGroupDocumentTemplateBulkGenerateModel, ConfigDeviceModelShowModel
|
||||
{
|
||||
public Disco.Models.Repository.DeviceModel DeviceModel { get; set; }
|
||||
|
||||
@@ -20,5 +18,7 @@ namespace Disco.Web.Areas.Config.Models.DeviceModel
|
||||
public int DeviceDecommissionedCount { get; set; }
|
||||
|
||||
public bool CanDelete { get; set; }
|
||||
|
||||
public override int DeviceGroupId => DeviceModel.Id;
|
||||
}
|
||||
}
|
||||
@@ -2,12 +2,13 @@
|
||||
using Disco.Services.Devices.ManagedGroups;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Disco.Services.Plugins;
|
||||
using Disco.Web.Areas.Config.Models.Shared;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||
{
|
||||
public class ShowModel : ConfigDeviceProfileShowModel
|
||||
public class ShowModel : DeviceGroupDocumentTemplateBulkGenerateModel, ConfigDeviceProfileShowModel
|
||||
{
|
||||
public Disco.Models.Repository.DeviceProfile DeviceProfile { get; set; }
|
||||
public List<SelectListItem> DeviceProfileDistributionTypes { get; set; }
|
||||
@@ -42,5 +43,7 @@ namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||
public int DeviceDecommissionedCount { get; set; }
|
||||
|
||||
public bool CanDelete { get; set; }
|
||||
|
||||
public override int DeviceGroupId => DeviceProfile.Id;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using Disco.Models.UI.Config.Shared;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.Shared
|
||||
{
|
||||
public abstract class DeviceGroupDocumentTemplateBulkGenerateModel : ConfigSharedDeviceGroupDocumentTemplateBulkGenerate
|
||||
{
|
||||
public List<Disco.Models.Repository.DocumentTemplate> BulkGenerateDocumentTemplates { get; set; }
|
||||
|
||||
public abstract int DeviceGroupId { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user