Update: Additional UI Extension Hooks
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using Disco.Models.UI.Config.DeviceBatch;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceBatch
|
||||
{
|
||||
public class CreateModel : ConfigDeviceBatchCreateModel
|
||||
{
|
||||
public Disco.Models.Repository.DeviceBatch DeviceBatch { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -3,29 +3,30 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Disco.Data.Repository;
|
||||
using Disco.Models.UI.Config.DeviceBatch;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceBatch
|
||||
{
|
||||
public class IndexModel
|
||||
public class IndexModel : ConfigDeviceBatchIndexModel
|
||||
{
|
||||
public List<_IndexModelDeviceBatch> DeviceBatches { get; set; }
|
||||
public List<ConfigDeviceBatchIndexModelItem> DeviceBatches { get; set; }
|
||||
|
||||
public static IndexModel Build(DiscoDataContext dbContext)
|
||||
{
|
||||
var m = new IndexModel();
|
||||
m.DeviceBatches = dbContext.DeviceBatches.OrderBy(db => db.Name).Select(db => new _IndexModelDeviceBatch()
|
||||
m.DeviceBatches = dbContext.DeviceBatches.OrderBy(db => db.Name).Select(db => new _IndexModelItem()
|
||||
{
|
||||
Id = db.Id,
|
||||
Name = db.Name,
|
||||
PurchaseDate = db.PurchaseDate,
|
||||
PurchaseUnitQuantity = db.UnitQuantity,
|
||||
DeviceCount = db.Devices.Count,
|
||||
DeviceDecommissionedCount = db.Devices.Count(d=> d.DecommissionedDate.HasValue),
|
||||
DeviceDecommissionedCount = db.Devices.Count(d => d.DecommissionedDate.HasValue),
|
||||
DefaultDeviceModel = db.DefaultDeviceModel.Description,
|
||||
WarrantyExpires = db.WarrantyValidUntil,
|
||||
InsuranceSupplier = db.InsuranceSupplier,
|
||||
InsuredUntil = db.InsuredUntil
|
||||
}).ToList();
|
||||
}).Cast<ConfigDeviceBatchIndexModelItem>().ToList();
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Disco.Models.UI.Config.DeviceBatch;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
@@ -6,10 +7,10 @@ using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceBatch
|
||||
{
|
||||
public class ShowModel
|
||||
public class ShowModel : ConfigDeviceBatchShowModel
|
||||
{
|
||||
public Disco.Models.Repository.DeviceBatch DeviceBatch { get; set; }
|
||||
public List<SelectListItem> DeviceModels { get; set; }
|
||||
public List<Disco.Models.Repository.DeviceModel> DeviceModels { get; set; }
|
||||
public int DeviceCount { get; set; }
|
||||
public int DeviceDecommissionedCount { get; set; }
|
||||
public bool CanDelete { get; set; }
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
using Disco.Models.UI.Config.DeviceBatch;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceBatch
|
||||
{
|
||||
public class TimelineModel : ConfigDeviceBatchTimelineModel
|
||||
{
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -3,10 +3,11 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Disco.Models.UI.Config.DeviceBatch;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceBatch
|
||||
{
|
||||
public class _IndexModelDeviceBatch
|
||||
public class _IndexModelItem : ConfigDeviceBatchIndexModelItem
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
+3
-2
@@ -1,11 +1,12 @@
|
||||
using System;
|
||||
using Disco.Models.UI.Config.DeviceModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceModel
|
||||
{
|
||||
public class DeviceComponentsModel
|
||||
public class ComponentsModel : ConfigDeviceModelComponentsModel
|
||||
{
|
||||
public int? DeviceModelId { get; set; }
|
||||
public List<Disco.Models.Repository.DeviceComponent> DeviceComponents { get; set; }
|
||||
@@ -3,17 +3,18 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Disco.Data.Repository;
|
||||
using Disco.Models.UI.Config.DeviceModel;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceModel
|
||||
{
|
||||
public class IndexModel
|
||||
public class IndexModel : ConfigDeviceModelIndexModel
|
||||
{
|
||||
public List<_IndexModelDeviceModel> DeviceModels { get; set; }
|
||||
public List<ConfigDeviceModelIndexModelItem> DeviceModels { get; set; }
|
||||
|
||||
public static IndexModel Build(DiscoDataContext dbContext)
|
||||
{
|
||||
var m = new IndexModel();
|
||||
m.DeviceModels = dbContext.DeviceModels.OrderBy(dm => dm.Description).Select(dm => new _IndexModelDeviceModel()
|
||||
m.DeviceModels = dbContext.DeviceModels.OrderBy(dm => dm.Description).Select(dm => new _IndexModelItem()
|
||||
{
|
||||
Id = dm.Id,
|
||||
Name = dm.Description,
|
||||
@@ -21,10 +22,9 @@ namespace Disco.Web.Areas.Config.Models.DeviceModel
|
||||
Model = dm.Model,
|
||||
ModelType = dm.ModelType,
|
||||
DeviceCount = dm.Devices.Count
|
||||
}).ToList();
|
||||
}).Cast<ConfigDeviceModelIndexModelItem>().ToList();
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,15 +3,16 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Disco.Services.Plugins;
|
||||
using Disco.Models.UI.Config.DeviceModel;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceModel
|
||||
{
|
||||
public class ShowModel
|
||||
public class ShowModel : ConfigDeviceModelShowModel
|
||||
{
|
||||
public Disco.Models.Repository.DeviceModel DeviceModel { get; set; }
|
||||
|
||||
public Models.DeviceModel.DeviceComponentsModel DeviceComponentsModel { get; set; }
|
||||
|
||||
public ConfigDeviceModelComponentsModel DeviceComponentsModel { get; set; }
|
||||
|
||||
public List<PluginFeatureManifest> WarrantyProviders { get; set; }
|
||||
|
||||
public bool CanDelete { get; set; }
|
||||
|
||||
+2
-1
@@ -3,10 +3,11 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Disco.Models.UI.Config.DeviceModel;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceModel
|
||||
{
|
||||
public class _IndexModelDeviceModel
|
||||
public class _IndexModelItem : ConfigDeviceModelIndexModelItem
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
@@ -0,0 +1,13 @@
|
||||
using Disco.Models.UI.Config.DeviceProfile;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||
{
|
||||
public class CreateModel : ConfigDeviceProfileCreateModel
|
||||
{
|
||||
public Disco.Models.Repository.DeviceProfile DeviceProfile { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,12 @@
|
||||
using System;
|
||||
using Disco.Models.UI.Config.DeviceProfile;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||
{
|
||||
public class DefaultsModel
|
||||
public class DefaultsModel : ConfigDeviceProfileDefaultsModel
|
||||
{
|
||||
public List<Disco.Models.Repository.DeviceProfile> DeviceProfiles { get; set; }
|
||||
public List<Disco.Models.Repository.DeviceProfile> DeviceProfilesAndNone { get; set; }
|
||||
|
||||
@@ -4,17 +4,18 @@ using System.Linq;
|
||||
using System.Web;
|
||||
using Disco.Data.Repository;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.UI.Config.DeviceProfile;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||
{
|
||||
public class IndexModel
|
||||
public class IndexModel : ConfigDeviceProfileIndexModel
|
||||
{
|
||||
public List<_IndexModelDeviceProfile> DeviceProfiles { get; set; }
|
||||
public List<ConfigDeviceProfileIndexModelItem> DeviceProfiles { get; set; }
|
||||
|
||||
public static IndexModel Build(DiscoDataContext dbContext)
|
||||
{
|
||||
var m = new IndexModel();
|
||||
m.DeviceProfiles = dbContext.DeviceProfiles.OrderBy(dp => dp.Name).Select(dp => new _IndexModelDeviceProfile()
|
||||
m.DeviceProfiles = dbContext.DeviceProfiles.OrderBy(dp => dp.Name).Select(dp => new _IndexModelItem()
|
||||
{
|
||||
Id = dp.Id,
|
||||
Name = dp.Name,
|
||||
@@ -24,7 +25,7 @@ namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||
DistributionTypeId = dp.DistributionTypeDb,
|
||||
DeviceCount = dp.Devices.Count,
|
||||
DeviceDecommissionedCount = dp.Devices.Count(d => d.DecommissionedDate.HasValue)
|
||||
}).ToList();
|
||||
}).Cast<ConfigDeviceProfileIndexModelItem>().ToList();
|
||||
|
||||
if (DiscoApplication.MultiSiteMode)
|
||||
{
|
||||
|
||||
@@ -4,10 +4,11 @@ using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Disco.Services.Plugins;
|
||||
using Disco.Models.UI.Config.DeviceProfile;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||
{
|
||||
public class ShowModel
|
||||
public class ShowModel : ConfigDeviceProfileShowModel
|
||||
{
|
||||
public Disco.Models.Repository.DeviceProfile DeviceProfile { get; set; }
|
||||
public List<SelectListItem> DeviceProfileDistributionTypes { get; set; }
|
||||
|
||||
+2
-2
@@ -4,16 +4,16 @@ using System.Linq;
|
||||
using System.Web;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Disco.Web.Extensions;
|
||||
using Disco.Models.UI.Config.DeviceProfile;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||
{
|
||||
public class _IndexModelDeviceProfile
|
||||
public class _IndexModelItem : ConfigDeviceProfileIndexModelItem
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string ShortName { get; set; }
|
||||
public int? Address { get; set; }
|
||||
//public string AddressShortName { get; set; }
|
||||
public string AddressName { get; set; }
|
||||
public string Description { get; set; }
|
||||
public int DistributionTypeId { get; set; }
|
||||
@@ -4,11 +4,12 @@ using System.Linq;
|
||||
using System.Web;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Disco.Data.Repository;
|
||||
using Disco.Models.UI.Config.DocumentTemplate;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
||||
{
|
||||
[CustomValidation(typeof(CreateModelValidation), "ValidateCreateModel")]
|
||||
public class CreateModel
|
||||
public class CreateModel : ConfigDocumentTemplateCreateModel
|
||||
{
|
||||
public Disco.Models.Repository.DocumentTemplate DocumentTemplate { get; set; }
|
||||
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
using System;
|
||||
using Disco.Models.UI.Config.DocumentTemplate;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
||||
{
|
||||
public class ExpressionBrowserModel
|
||||
public class ExpressionBrowserModel : ConfigDocumentTemplateExpressionBrowserModel
|
||||
{
|
||||
public string DeviceType { get; set; }
|
||||
public string UserType { get; set; }
|
||||
public string JobType { get; set; }
|
||||
|
||||
//public string DataExtType { get; set; }
|
||||
//public string DeviceExtType { get; set; }
|
||||
//public string UserExtType { get; set; }
|
||||
|
||||
public Dictionary<string, string> Variables { get; set; }
|
||||
public Dictionary<string, string> ExtensionLibraries { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
using Disco.Models.UI.Config.DocumentTemplate;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
||||
{
|
||||
public class ImportStatusModel : ConfigDocumentTemplateImportStatusModel
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,12 @@
|
||||
using System;
|
||||
using Disco.Models.UI.Config.DocumentTemplate;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
||||
{
|
||||
public class IndexModel
|
||||
public class IndexModel : ConfigDocumentTemplateIndexModel
|
||||
{
|
||||
public List<Disco.Models.Repository.DocumentTemplate> DocumentTemplates { get; set; }
|
||||
}
|
||||
|
||||
@@ -4,10 +4,11 @@ using System.Linq;
|
||||
using System.Web;
|
||||
using Disco.Data.Repository;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.UI.Config.DocumentTemplate;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
||||
{
|
||||
public class ShowModel
|
||||
public class ShowModel : ConfigDocumentTemplateShowModel
|
||||
{
|
||||
public Disco.Models.Repository.DocumentTemplate DocumentTemplate { get; set; }
|
||||
|
||||
|
||||
@@ -6,10 +6,11 @@ using System.Web.Mvc;
|
||||
using Disco.BI;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Web.Extensions;
|
||||
using Disco.Models.UI.Config.DocumentTemplate;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
||||
{
|
||||
public class UndetectedPagesModel
|
||||
public class UndetectedPagesModel : ConfigDocumentTemplateUndetectedPagesModel
|
||||
{
|
||||
|
||||
public List<Disco.Models.Repository.DocumentTemplate> DocumentTemplates { get; set; }
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using System;
|
||||
using Disco.Models.UI.Config.Enrolment;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.Enrolment
|
||||
{
|
||||
public class IndexModel
|
||||
public class IndexModel : ConfigEnrolmentIndexModel
|
||||
{
|
||||
public string MacSshUsername { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
using Disco.Models.UI.Config.Enrolment;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.Enrolment
|
||||
{
|
||||
public class StatusModel : ConfigEnrolmentStatusModel
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,11 @@ using System.Linq;
|
||||
using System.Web;
|
||||
using Disco.Services.Logging;
|
||||
using Disco.Services.Logging.Models;
|
||||
using Disco.Models.UI.Config.Logging;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.Logging
|
||||
{
|
||||
public class IndexModel
|
||||
public class IndexModel : ConfigLoggingIndexModel
|
||||
{
|
||||
public Dictionary<LogBase, List<LogEventType>> LogModules { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using System;
|
||||
using Disco.Models.UI.Config.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.Logging
|
||||
{
|
||||
public class TaskStatusModel
|
||||
public class TaskStatusModel : ConfigLoggingTaskStatusModel
|
||||
{
|
||||
public string SessionId { get; set; }
|
||||
}
|
||||
|
||||
@@ -4,10 +4,11 @@ using System.Linq;
|
||||
using System.Web;
|
||||
using Disco.Models.BI.Config;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Disco.Models.UI.Config.Organisation;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.Organisation
|
||||
{
|
||||
public class IndexModel
|
||||
public class IndexModel : ConfigOrganisationIndexModel
|
||||
{
|
||||
public string OrganisationName { get; set; }
|
||||
[Display(Name="Enabled")]
|
||||
|
||||
Reference in New Issue
Block a user