Update: Additional UI Extension Hooks
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.DeviceBatch
|
||||||
|
{
|
||||||
|
public interface ConfigDeviceBatchCreateModel : BaseUIModel
|
||||||
|
{
|
||||||
|
Models.Repository.DeviceBatch DeviceBatch { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.DeviceBatch
|
||||||
|
{
|
||||||
|
public interface ConfigDeviceBatchIndexModel : BaseUIModel
|
||||||
|
{
|
||||||
|
List<ConfigDeviceBatchIndexModelItem> DeviceBatches { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.DeviceBatch
|
||||||
|
{
|
||||||
|
public interface ConfigDeviceBatchIndexModelItem
|
||||||
|
{
|
||||||
|
int Id { get; set; }
|
||||||
|
string Name { get; set; }
|
||||||
|
[Required(), DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)]
|
||||||
|
DateTime PurchaseDate { get; set; }
|
||||||
|
int DeviceCount { get; set; }
|
||||||
|
int DeviceDecommissionedCount { get; set; }
|
||||||
|
int? PurchaseUnitQuantity { get; set; }
|
||||||
|
string DefaultDeviceModel { get; set; }
|
||||||
|
DateTime? WarrantyExpires { get; set; }
|
||||||
|
DateTime? InsuredUntil { get; set; }
|
||||||
|
string InsuranceSupplier { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.DeviceBatch
|
||||||
|
{
|
||||||
|
public interface ConfigDeviceBatchShowModel : BaseUIModel
|
||||||
|
{
|
||||||
|
Disco.Models.Repository.DeviceBatch DeviceBatch { get; set; }
|
||||||
|
List<Disco.Models.Repository.DeviceModel> DeviceModels { get; set; }
|
||||||
|
int DeviceCount { get; set; }
|
||||||
|
int DeviceDecommissionedCount { get; set; }
|
||||||
|
bool CanDelete { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.DeviceBatch
|
||||||
|
{
|
||||||
|
public interface ConfigDeviceBatchTimelineModel : BaseUIModel
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.DeviceModel
|
||||||
|
{
|
||||||
|
public interface ConfigDeviceModelIndexModel : BaseUIModel
|
||||||
|
{
|
||||||
|
List<ConfigDeviceModelIndexModelItem> DeviceModels { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.DeviceModel
|
||||||
|
{
|
||||||
|
public interface ConfigDeviceModelIndexModelItem
|
||||||
|
{
|
||||||
|
int Id { get; set; }
|
||||||
|
string Name { get; set; }
|
||||||
|
string Manufacturer { get; set; }
|
||||||
|
string Model { get; set; }
|
||||||
|
string ModelType { get; set; }
|
||||||
|
int DeviceCount { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.DeviceModel
|
||||||
|
{
|
||||||
|
public interface ConfigDeviceModelShowModel : BaseUIModel
|
||||||
|
{
|
||||||
|
Disco.Models.Repository.DeviceModel DeviceModel { get; set; }
|
||||||
|
|
||||||
|
ConfigDeviceModelComponentsModel DeviceComponentsModel { get; set; }
|
||||||
|
|
||||||
|
bool CanDelete { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.DeviceModel
|
||||||
|
{
|
||||||
|
public interface ConfigDeviceModelComponentsModel : BaseUIModel
|
||||||
|
{
|
||||||
|
int? DeviceModelId { get; set; }
|
||||||
|
List<Disco.Models.Repository.DeviceComponent> DeviceComponents { get; set; }
|
||||||
|
|
||||||
|
List<Disco.Models.Repository.JobSubType> JobSubTypes { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.DeviceProfile
|
||||||
|
{
|
||||||
|
public interface ConfigDeviceProfileCreateModel : BaseUIModel
|
||||||
|
{
|
||||||
|
Models.Repository.DeviceProfile DeviceProfile { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.DeviceProfile
|
||||||
|
{
|
||||||
|
public interface ConfigDeviceProfileDefaultsModel : BaseUIModel
|
||||||
|
{
|
||||||
|
List<Disco.Models.Repository.DeviceProfile> DeviceProfiles { get; set; }
|
||||||
|
List<Disco.Models.Repository.DeviceProfile> DeviceProfilesAndNone { get; set; }
|
||||||
|
int Default { get; set; }
|
||||||
|
int DefaultAddDeviceOffline { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.DeviceProfile
|
||||||
|
{
|
||||||
|
public interface ConfigDeviceProfileIndexModel : BaseUIModel
|
||||||
|
{
|
||||||
|
List<ConfigDeviceProfileIndexModelItem> DeviceProfiles { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.DeviceProfile
|
||||||
|
{
|
||||||
|
public interface ConfigDeviceProfileIndexModelItem
|
||||||
|
{
|
||||||
|
int Id { get; set; }
|
||||||
|
string Name { get; set; }
|
||||||
|
string ShortName { get; set; }
|
||||||
|
int? Address { get; set; }
|
||||||
|
string AddressName { get; set; }
|
||||||
|
string Description { get; set; }
|
||||||
|
int DistributionTypeId { get; set; }
|
||||||
|
|
||||||
|
string DistributionType { get; }
|
||||||
|
|
||||||
|
int DeviceCount { get; set; }
|
||||||
|
int DeviceDecommissionedCount { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.DeviceProfile
|
||||||
|
{
|
||||||
|
public interface ConfigDeviceProfileShowModel : BaseUIModel
|
||||||
|
{
|
||||||
|
Disco.Models.Repository.DeviceProfile DeviceProfile { get; set; }
|
||||||
|
List<Disco.Models.BI.Config.OrganisationAddress> OrganisationAddresses { get; set; }
|
||||||
|
|
||||||
|
bool CanDelete { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.DocumentTemplate
|
||||||
|
{
|
||||||
|
public interface ConfigDocumentTemplateCreateModel : BaseUIModel
|
||||||
|
{
|
||||||
|
Disco.Models.Repository.DocumentTemplate DocumentTemplate { get; set; }
|
||||||
|
|
||||||
|
List<string> Types { get; set; }
|
||||||
|
List<string> SubTypes { get; set; }
|
||||||
|
|
||||||
|
List<Disco.Models.Repository.JobType> JobTypes { get; set; }
|
||||||
|
List<Disco.Models.Repository.JobSubType> JobSubTypes { get; set; }
|
||||||
|
|
||||||
|
List<string> Scopes { get; }
|
||||||
|
|
||||||
|
List<Disco.Models.Repository.JobType> GetJobTypes { get; }
|
||||||
|
List<Disco.Models.Repository.JobSubType> GetJobSubTypes { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.DocumentTemplate
|
||||||
|
{
|
||||||
|
public interface ConfigDocumentTemplateExpressionBrowserModel : BaseUIModel
|
||||||
|
{
|
||||||
|
string DeviceType { get; set; }
|
||||||
|
string UserType { get; set; }
|
||||||
|
string JobType { get; set; }
|
||||||
|
|
||||||
|
Dictionary<string, string> Variables { get; set; }
|
||||||
|
Dictionary<string, string> ExtensionLibraries { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.DocumentTemplate
|
||||||
|
{
|
||||||
|
public interface ConfigDocumentTemplateImportStatusModel : BaseUIModel
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.DocumentTemplate
|
||||||
|
{
|
||||||
|
public interface ConfigDocumentTemplateIndexModel : BaseUIModel
|
||||||
|
{
|
||||||
|
List<Disco.Models.Repository.DocumentTemplate> DocumentTemplates { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.DocumentTemplate
|
||||||
|
{
|
||||||
|
public interface ConfigDocumentTemplateShowModel : BaseUIModel
|
||||||
|
{
|
||||||
|
Disco.Models.Repository.DocumentTemplate DocumentTemplate { get; set; }
|
||||||
|
int StoredInstanceCount { get; set; }
|
||||||
|
|
||||||
|
List<string> Types { get; set; }
|
||||||
|
List<string> SubTypes { get; set; }
|
||||||
|
|
||||||
|
List<Disco.Models.Repository.JobType> JobTypes { get; set; }
|
||||||
|
List<Disco.Models.Repository.JobSubType> JobSubTypes { get; set; }
|
||||||
|
|
||||||
|
List<string> Scopes { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.DocumentTemplate
|
||||||
|
{
|
||||||
|
public interface ConfigDocumentTemplateUndetectedPagesModel : BaseUIModel
|
||||||
|
{
|
||||||
|
List<Disco.Models.Repository.DocumentTemplate> DocumentTemplates { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.Enrolment
|
||||||
|
{
|
||||||
|
public interface ConfigEnrolmentIndexModel : BaseUIModel
|
||||||
|
{
|
||||||
|
string MacSshUsername { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.Enrolment
|
||||||
|
{
|
||||||
|
public interface ConfigEnrolmentStatusModel : BaseUIModel
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.Logging
|
||||||
|
{
|
||||||
|
public interface ConfigLoggingIndexModel : BaseUIModel
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.Logging
|
||||||
|
{
|
||||||
|
public interface ConfigLoggingTaskStatusModel : BaseUIModel
|
||||||
|
{
|
||||||
|
string SessionId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Config.Organisation
|
||||||
|
{
|
||||||
|
public interface ConfigOrganisationIndexModel : BaseUIModel
|
||||||
|
{
|
||||||
|
string OrganisationName { get; set; }
|
||||||
|
bool MultiSiteMode { get; set; }
|
||||||
|
List<Models.BI.Config.OrganisationAddress> OrganisationAddresses { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Device
|
||||||
|
{
|
||||||
|
public interface DeviceAddOfflineModel : BaseUIModel
|
||||||
|
{
|
||||||
|
Disco.Models.Repository.Device Device { get; set; }
|
||||||
|
List<Disco.Models.Repository.DeviceProfile> DeviceProfiles { get; set; }
|
||||||
|
List<Disco.Models.Repository.DeviceBatch> DeviceBatches { get; set; }
|
||||||
|
int DefaultDeviceProfileId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Models.UI.Search
|
||||||
|
{
|
||||||
|
public interface SearchQueryModel : BaseUIModel
|
||||||
|
{
|
||||||
|
string FriendlyTerm { get; set; }
|
||||||
|
string Term { get; set; }
|
||||||
|
bool Success { get; set; }
|
||||||
|
string ErrorMessage { get; set; }
|
||||||
|
List<Disco.Models.BI.Search.DeviceSearchResultItem> Devices { get; set; }
|
||||||
|
Disco.Models.BI.Job.JobTableModel Jobs { get; set; }
|
||||||
|
List<Disco.Models.BI.Search.UserSearchResultItem> Users { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,8 @@ using System.Web.Mvc;
|
|||||||
using Disco.BI;
|
using Disco.BI;
|
||||||
using Disco.BI.Extensions;
|
using Disco.BI.Extensions;
|
||||||
using Disco.Web.Extensions;
|
using Disco.Web.Extensions;
|
||||||
|
using Disco.Services.Plugins.Features.UIExtension;
|
||||||
|
using Disco.Models.UI.Config.DeviceBatch;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Controllers
|
namespace Disco.Web.Areas.Config.Controllers
|
||||||
{
|
{
|
||||||
@@ -31,35 +33,50 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
m.DeviceCount = m.DeviceBatch.Devices.Count();
|
m.DeviceCount = m.DeviceBatch.Devices.Count();
|
||||||
m.DeviceDecommissionedCount = m.DeviceBatch.Devices.Count(d => d.DecommissionedDate.HasValue);
|
m.DeviceDecommissionedCount = m.DeviceBatch.Devices.Count(d => d.DecommissionedDate.HasValue);
|
||||||
|
|
||||||
m.DeviceModels = dbContext.DeviceModels.ToSelectListItems();
|
m.DeviceModels = dbContext.DeviceModels.ToList();
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigDeviceBatchShowModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
return View(MVC.Config.DeviceBatch.Views.Show, m);
|
return View(MVC.Config.DeviceBatch.Views.Show, m);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return View(Models.DeviceBatch.IndexModel.Build(dbContext));
|
var m = Models.DeviceBatch.IndexModel.Build(dbContext);
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigDeviceBatchIndexModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
|
return View(m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual ActionResult Create()
|
public virtual ActionResult Create()
|
||||||
{
|
{
|
||||||
// Default Batch
|
// Default Batch
|
||||||
var m = BI.DeviceBI.BatchUtilities.DefaultNewDeviceBatch(dbContext);
|
var m = new Models.DeviceBatch.CreateModel()
|
||||||
|
{
|
||||||
|
DeviceBatch = BI.DeviceBI.BatchUtilities.DefaultNewDeviceBatch(dbContext)
|
||||||
|
};
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigDeviceBatchCreateModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
return View(m);
|
return View(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public virtual ActionResult Create(Disco.Models.Repository.DeviceBatch model)
|
public virtual ActionResult Create(Models.DeviceBatch.CreateModel model)
|
||||||
{
|
{
|
||||||
if (ModelState.IsValid)
|
if (ModelState.IsValid)
|
||||||
{
|
{
|
||||||
// Check for Existing
|
// Check for Existing
|
||||||
var existing = dbContext.DeviceBatches.Where(m => m.Name == model.Name).FirstOrDefault();
|
var existing = dbContext.DeviceBatches.Where(m => m.Name == model.DeviceBatch.Name).FirstOrDefault();
|
||||||
if (existing == null)
|
if (existing == null)
|
||||||
{
|
{
|
||||||
dbContext.DeviceBatches.Add(model);
|
dbContext.DeviceBatches.Add(model.DeviceBatch);
|
||||||
dbContext.SaveChanges();
|
dbContext.SaveChanges();
|
||||||
return RedirectToAction(MVC.Config.DeviceBatch.Index(model.Id));
|
return RedirectToAction(MVC.Config.DeviceBatch.Index(model.DeviceBatch.Id));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -67,11 +84,19 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigDeviceBatchCreateModel>(this.ControllerContext, model);
|
||||||
|
|
||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual ActionResult Timeline()
|
public virtual ActionResult Timeline()
|
||||||
{
|
{
|
||||||
|
var m = new Models.DeviceBatch.TimelineModel();
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigDeviceBatchTimelineModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ using System.Web.Mvc;
|
|||||||
using Disco.Services.Plugins.Features.WarrantyProvider;
|
using Disco.Services.Plugins.Features.WarrantyProvider;
|
||||||
using Disco.Services.Plugins;
|
using Disco.Services.Plugins;
|
||||||
using Disco.BI.Extensions;
|
using Disco.BI.Extensions;
|
||||||
|
using Disco.Services.Plugins.Features.UIExtension;
|
||||||
|
using Disco.Models.UI.Config.DeviceModel;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Controllers
|
namespace Disco.Web.Areas.Config.Controllers
|
||||||
{
|
{
|
||||||
@@ -21,7 +23,7 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
WarrantyProviders = Plugins.GetPluginFeatures(typeof(WarrantyProviderFeature))
|
WarrantyProviders = Plugins.GetPluginFeatures(typeof(WarrantyProviderFeature))
|
||||||
};
|
};
|
||||||
|
|
||||||
m.DeviceComponentsModel = new Models.DeviceModel.DeviceComponentsModel()
|
m.DeviceComponentsModel = new Models.DeviceModel.ComponentsModel()
|
||||||
{
|
{
|
||||||
DeviceModelId = m.DeviceModel.Id,
|
DeviceModelId = m.DeviceModel.Id,
|
||||||
DeviceComponents = m.DeviceModel.DeviceComponents.ToList(),
|
DeviceComponents = m.DeviceModel.DeviceComponents.ToList(),
|
||||||
@@ -35,22 +37,33 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
//m.Devices = dbContext.Devices.Include("DeviceModel").Include("DeviceProfile").Include("AssignedUser")
|
//m.Devices = dbContext.Devices.Include("DeviceModel").Include("DeviceProfile").Include("AssignedUser")
|
||||||
// .Where(d => d.DeviceModelId == m.DeviceModel.Id).ToList();
|
// .Where(d => d.DeviceModelId == m.DeviceModel.Id).ToList();
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigDeviceModelShowModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
return View(MVC.Config.DeviceModel.Views.Show, m);
|
return View(MVC.Config.DeviceModel.Views.Show, m);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return View(Models.DeviceModel.IndexModel.Build(dbContext));
|
var m = Models.DeviceModel.IndexModel.Build(dbContext);
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigDeviceModelIndexModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
|
return View(m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual ActionResult GenericComponents()
|
public virtual ActionResult GenericComponents()
|
||||||
{
|
{
|
||||||
var m = new Models.DeviceModel.DeviceComponentsModel()
|
var m = new Models.DeviceModel.ComponentsModel()
|
||||||
{
|
{
|
||||||
DeviceComponents = dbContext.DeviceComponents.Include("JobSubTypes").Where(dc => !dc.DeviceModelId.HasValue).ToList(),
|
DeviceComponents = dbContext.DeviceComponents.Include("JobSubTypes").Where(dc => !dc.DeviceModelId.HasValue).ToList(),
|
||||||
JobSubTypes = dbContext.JobSubTypes.Where(jst => jst.JobTypeId == Disco.Models.Repository.JobType.JobTypeIds.HNWar).ToList()
|
JobSubTypes = dbContext.JobSubTypes.Where(jst => jst.JobTypeId == Disco.Models.Repository.JobType.JobTypeIds.HNWar).ToList()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigDeviceModelComponentsModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
return View(m);
|
return View(m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ using Disco.BI;
|
|||||||
using Disco.BI.Extensions;
|
using Disco.BI.Extensions;
|
||||||
using Disco.Services.Plugins.Features.CertificateProvider;
|
using Disco.Services.Plugins.Features.CertificateProvider;
|
||||||
using Disco.Services.Plugins;
|
using Disco.Services.Plugins;
|
||||||
|
using Disco.Services.Plugins.Features.UIExtension;
|
||||||
|
using Disco.Models.UI.Config.DeviceProfile;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Controllers
|
namespace Disco.Web.Areas.Config.Controllers
|
||||||
{
|
{
|
||||||
@@ -45,33 +47,46 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
//m.OrganisationalUnit = m.DeviceProfile.OrganisationalUnit;
|
//m.OrganisationalUnit = m.DeviceProfile.OrganisationalUnit;
|
||||||
//m.ComputerNameTemplate = m.DeviceProfile.ComputerNameTemplate;
|
//m.ComputerNameTemplate = m.DeviceProfile.ComputerNameTemplate;
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigDeviceProfileShowModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
return View(MVC.Config.DeviceProfile.Views.Show, m);
|
return View(MVC.Config.DeviceProfile.Views.Show, m);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return View(Models.DeviceProfile.IndexModel.Build(dbContext));
|
var m = Models.DeviceProfile.IndexModel.Build(dbContext);
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigDeviceProfileIndexModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
|
return View(m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual ActionResult Create()
|
public virtual ActionResult Create()
|
||||||
{
|
{
|
||||||
return View();
|
var m = new Models.DeviceProfile.CreateModel();
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigDeviceProfileCreateModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
|
return View(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public virtual ActionResult Create(Disco.Models.Repository.DeviceProfile model)
|
public virtual ActionResult Create(Models.DeviceProfile.CreateModel model)
|
||||||
{
|
{
|
||||||
if (ModelState.IsValid)
|
if (ModelState.IsValid)
|
||||||
{
|
{
|
||||||
// Check for Existing
|
// Check for Existing
|
||||||
var existing = dbContext.DeviceProfiles.Where(m => m.Name == model.Name).FirstOrDefault();
|
var existing = dbContext.DeviceProfiles.Where(m => m.Name == model.DeviceProfile.Name).FirstOrDefault();
|
||||||
if (existing == null)
|
if (existing == null)
|
||||||
{
|
{
|
||||||
model.ProvisionADAccount = true;
|
model.DeviceProfile.ProvisionADAccount = true;
|
||||||
|
|
||||||
dbContext.DeviceProfiles.Add(model);
|
dbContext.DeviceProfiles.Add(model.DeviceProfile);
|
||||||
dbContext.SaveChanges();
|
dbContext.SaveChanges();
|
||||||
return RedirectToAction(MVC.Config.DeviceProfile.Index(model.Id));
|
return RedirectToAction(MVC.Config.DeviceProfile.Index(model.DeviceProfile.Id));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -79,6 +94,9 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigDeviceProfileCreateModel>(this.ControllerContext, model);
|
||||||
|
|
||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,6 +111,9 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
m.DeviceProfilesAndNone = m.DeviceProfiles.ToList();
|
m.DeviceProfilesAndNone = m.DeviceProfiles.ToList();
|
||||||
m.DeviceProfilesAndNone.Insert(0, new Disco.Models.Repository.DeviceProfile() { Id = 0, Name = "<No Default>" });
|
m.DeviceProfilesAndNone.Insert(0, new Disco.Models.Repository.DeviceProfile() { Id = 0, Name = "<No Default>" });
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigDeviceProfileDefaultsModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
return View(m);
|
return View(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ using System.Web;
|
|||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using Disco.BI;
|
using Disco.BI;
|
||||||
using Disco.BI.Extensions;
|
using Disco.BI.Extensions;
|
||||||
|
using Disco.Services.Plugins.Features.UIExtension;
|
||||||
|
using Disco.Models.UI.Config.DocumentTemplate;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Controllers
|
namespace Disco.Web.Areas.Config.Controllers
|
||||||
{
|
{
|
||||||
@@ -16,6 +18,10 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
if (string.IsNullOrEmpty(id))
|
if (string.IsNullOrEmpty(id))
|
||||||
{
|
{
|
||||||
var m = new Models.DocumentTemplate.IndexModel() { DocumentTemplates = dbContext.DocumentTemplates.ToList() };
|
var m = new Models.DocumentTemplate.IndexModel() { DocumentTemplates = dbContext.DocumentTemplates.ToList() };
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigDocumentTemplateIndexModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
return View(m);
|
return View(m);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -26,12 +32,21 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
};
|
};
|
||||||
m.TemplateExpressions = m.DocumentTemplate.ExtractPdfExpressions(dbContext);
|
m.TemplateExpressions = m.DocumentTemplate.ExtractPdfExpressions(dbContext);
|
||||||
m.UpdateModel(dbContext);
|
m.UpdateModel(dbContext);
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigDocumentTemplateShowModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
return View(MVC.Config.DocumentTemplate.Views.Show, m);
|
return View(MVC.Config.DocumentTemplate.Views.Show, m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual ActionResult ImportStatus()
|
public virtual ActionResult ImportStatus()
|
||||||
{
|
{
|
||||||
|
var m = new Models.DocumentTemplate.ImportStatusModel();
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigDocumentTemplateImportStatusModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
public virtual ActionResult UndetectedPages()
|
public virtual ActionResult UndetectedPages()
|
||||||
@@ -41,6 +56,9 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
DocumentTemplates = dbContext.DocumentTemplates.ToList()
|
DocumentTemplates = dbContext.DocumentTemplates.ToList()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigDocumentTemplateUndetectedPagesModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
return View(m);
|
return View(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,6 +67,9 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
var m = new Models.DocumentTemplate.CreateModel();
|
var m = new Models.DocumentTemplate.CreateModel();
|
||||||
m.UpdateModel(dbContext);
|
m.UpdateModel(dbContext);
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigDocumentTemplateCreateModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
return View(m);
|
return View(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,6 +108,10 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
ModelState.AddModelError("Name", "A Document Template with this Name already exists.");
|
ModelState.AddModelError("Name", "A Document Template with this Name already exists.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigDocumentTemplateCreateModel>(this.ControllerContext, model);
|
||||||
|
|
||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,6 +128,9 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
ExtensionLibraries = BI.Expressions.Expression.ExtensionLibraryTypes()
|
ExtensionLibraries = BI.Expressions.Expression.ExtensionLibraryTypes()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigDocumentTemplateExpressionBrowserModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
return View(m);
|
return View(m);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
using System;
|
using Disco.Models.UI.Config.Enrolment;
|
||||||
|
using Disco.Services.Plugins.Features.UIExtension;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
@@ -18,11 +20,19 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
MacSshUsername = dbContext.DiscoConfiguration.Bootstrapper.MacSshUsername
|
MacSshUsername = dbContext.DiscoConfiguration.Bootstrapper.MacSshUsername
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigEnrolmentIndexModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
return View(m);
|
return View(m);
|
||||||
}
|
}
|
||||||
public virtual ActionResult Status()
|
public virtual ActionResult Status()
|
||||||
{
|
{
|
||||||
return View();
|
var m = new Models.Enrolment.StatusModel();
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigEnrolmentStatusModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
|
return View(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ using System.Web;
|
|||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using Disco.Services.Logging;
|
using Disco.Services.Logging;
|
||||||
using Disco.Services.Logging.Models;
|
using Disco.Services.Logging.Models;
|
||||||
|
using Disco.Services.Plugins.Features.UIExtension;
|
||||||
|
using Disco.Models.UI.Config.Logging;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Controllers
|
namespace Disco.Web.Areas.Config.Controllers
|
||||||
{
|
{
|
||||||
@@ -24,6 +26,9 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
m.LogModules.Add(logModule, logModule.EventTypes.Values.Where(et => et.UsePersist).ToList());
|
m.LogModules.Add(logModule, logModule.EventTypes.Values.Where(et => et.UsePersist).ToList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigLoggingIndexModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
return View(m);
|
return View(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,7 +41,12 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
if (taskStatus == null)
|
if (taskStatus == null)
|
||||||
return RedirectToAction(MVC.Config.Logging.Index());
|
return RedirectToAction(MVC.Config.Logging.Index());
|
||||||
|
|
||||||
return View(new Models.Logging.TaskStatusModel() { SessionId = taskStatus.SessionId });
|
var m = new Models.Logging.TaskStatusModel() { SessionId = taskStatus.SessionId };
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigLoggingTaskStatusModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
|
return View(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
using System;
|
using Disco.Models.UI.Config.Organisation;
|
||||||
|
using Disco.Services.Plugins.Features.UIExtension;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
@@ -18,7 +20,10 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
viewModel.OrganisationName = dbContext.DiscoConfiguration.OrganisationName;
|
viewModel.OrganisationName = dbContext.DiscoConfiguration.OrganisationName;
|
||||||
viewModel.MultiSiteMode = dbContext.DiscoConfiguration.MultiSiteMode;
|
viewModel.MultiSiteMode = dbContext.DiscoConfiguration.MultiSiteMode;
|
||||||
viewModel.OrganisationAddresses = dbContext.DiscoConfiguration.OrganisationAddresses.Addresses;
|
viewModel.OrganisationAddresses = dbContext.DiscoConfiguration.OrganisationAddresses.Addresses;
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<ConfigOrganisationIndexModel>(this.ControllerContext, viewModel);
|
||||||
|
|
||||||
return View(viewModel);
|
return View(viewModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using Disco.Data.Repository;
|
using Disco.Data.Repository;
|
||||||
|
using Disco.Models.UI.Config.DeviceBatch;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Models.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)
|
public static IndexModel Build(DiscoDataContext dbContext)
|
||||||
{
|
{
|
||||||
var m = new IndexModel();
|
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,
|
Id = db.Id,
|
||||||
Name = db.Name,
|
Name = db.Name,
|
||||||
PurchaseDate = db.PurchaseDate,
|
PurchaseDate = db.PurchaseDate,
|
||||||
PurchaseUnitQuantity = db.UnitQuantity,
|
PurchaseUnitQuantity = db.UnitQuantity,
|
||||||
DeviceCount = db.Devices.Count,
|
DeviceCount = db.Devices.Count,
|
||||||
DeviceDecommissionedCount = db.Devices.Count(d=> d.DecommissionedDate.HasValue),
|
DeviceDecommissionedCount = db.Devices.Count(d => d.DecommissionedDate.HasValue),
|
||||||
DefaultDeviceModel = db.DefaultDeviceModel.Description,
|
DefaultDeviceModel = db.DefaultDeviceModel.Description,
|
||||||
WarrantyExpires = db.WarrantyValidUntil,
|
WarrantyExpires = db.WarrantyValidUntil,
|
||||||
InsuranceSupplier = db.InsuranceSupplier,
|
InsuranceSupplier = db.InsuranceSupplier,
|
||||||
InsuredUntil = db.InsuredUntil
|
InsuredUntil = db.InsuredUntil
|
||||||
}).ToList();
|
}).Cast<ConfigDeviceBatchIndexModelItem>().ToList();
|
||||||
|
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using Disco.Models.UI.Config.DeviceBatch;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
@@ -6,10 +7,10 @@ using System.Web.Mvc;
|
|||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Models.DeviceBatch
|
namespace Disco.Web.Areas.Config.Models.DeviceBatch
|
||||||
{
|
{
|
||||||
public class ShowModel
|
public class ShowModel : ConfigDeviceBatchShowModel
|
||||||
{
|
{
|
||||||
public Disco.Models.Repository.DeviceBatch DeviceBatch { get; set; }
|
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 DeviceCount { get; set; }
|
||||||
public int DeviceDecommissionedCount { get; set; }
|
public int DeviceDecommissionedCount { get; set; }
|
||||||
public bool CanDelete { 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.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using Disco.Models.UI.Config.DeviceBatch;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Models.DeviceBatch
|
namespace Disco.Web.Areas.Config.Models.DeviceBatch
|
||||||
{
|
{
|
||||||
public class _IndexModelDeviceBatch
|
public class _IndexModelItem : ConfigDeviceBatchIndexModelItem
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
public string Name { 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.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Models.DeviceModel
|
namespace Disco.Web.Areas.Config.Models.DeviceModel
|
||||||
{
|
{
|
||||||
public class DeviceComponentsModel
|
public class ComponentsModel : ConfigDeviceModelComponentsModel
|
||||||
{
|
{
|
||||||
public int? DeviceModelId { get; set; }
|
public int? DeviceModelId { get; set; }
|
||||||
public List<Disco.Models.Repository.DeviceComponent> DeviceComponents { get; set; }
|
public List<Disco.Models.Repository.DeviceComponent> DeviceComponents { get; set; }
|
||||||
@@ -3,17 +3,18 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using Disco.Data.Repository;
|
using Disco.Data.Repository;
|
||||||
|
using Disco.Models.UI.Config.DeviceModel;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Models.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)
|
public static IndexModel Build(DiscoDataContext dbContext)
|
||||||
{
|
{
|
||||||
var m = new IndexModel();
|
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,
|
Id = dm.Id,
|
||||||
Name = dm.Description,
|
Name = dm.Description,
|
||||||
@@ -21,10 +22,9 @@ namespace Disco.Web.Areas.Config.Models.DeviceModel
|
|||||||
Model = dm.Model,
|
Model = dm.Model,
|
||||||
ModelType = dm.ModelType,
|
ModelType = dm.ModelType,
|
||||||
DeviceCount = dm.Devices.Count
|
DeviceCount = dm.Devices.Count
|
||||||
}).ToList();
|
}).Cast<ConfigDeviceModelIndexModelItem>().ToList();
|
||||||
|
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,15 +3,16 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using Disco.Services.Plugins;
|
using Disco.Services.Plugins;
|
||||||
|
using Disco.Models.UI.Config.DeviceModel;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Models.DeviceModel
|
namespace Disco.Web.Areas.Config.Models.DeviceModel
|
||||||
{
|
{
|
||||||
public class ShowModel
|
public class ShowModel : ConfigDeviceModelShowModel
|
||||||
{
|
{
|
||||||
public Disco.Models.Repository.DeviceModel DeviceModel { get; set; }
|
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 List<PluginFeatureManifest> WarrantyProviders { get; set; }
|
||||||
|
|
||||||
public bool CanDelete { get; set; }
|
public bool CanDelete { get; set; }
|
||||||
|
|||||||
+2
-1
@@ -3,10 +3,11 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using Disco.Models.UI.Config.DeviceModel;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Models.DeviceModel
|
namespace Disco.Web.Areas.Config.Models.DeviceModel
|
||||||
{
|
{
|
||||||
public class _IndexModelDeviceModel
|
public class _IndexModelItem : ConfigDeviceModelIndexModelItem
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
public string Name { 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.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
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> DeviceProfiles { get; set; }
|
||||||
public List<Disco.Models.Repository.DeviceProfile> DeviceProfilesAndNone { get; set; }
|
public List<Disco.Models.Repository.DeviceProfile> DeviceProfilesAndNone { get; set; }
|
||||||
|
|||||||
@@ -4,17 +4,18 @@ using System.Linq;
|
|||||||
using System.Web;
|
using System.Web;
|
||||||
using Disco.Data.Repository;
|
using Disco.Data.Repository;
|
||||||
using Disco.BI.Extensions;
|
using Disco.BI.Extensions;
|
||||||
|
using Disco.Models.UI.Config.DeviceProfile;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Models.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)
|
public static IndexModel Build(DiscoDataContext dbContext)
|
||||||
{
|
{
|
||||||
var m = new IndexModel();
|
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,
|
Id = dp.Id,
|
||||||
Name = dp.Name,
|
Name = dp.Name,
|
||||||
@@ -24,7 +25,7 @@ namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
|||||||
DistributionTypeId = dp.DistributionTypeDb,
|
DistributionTypeId = dp.DistributionTypeDb,
|
||||||
DeviceCount = dp.Devices.Count,
|
DeviceCount = dp.Devices.Count,
|
||||||
DeviceDecommissionedCount = dp.Devices.Count(d => d.DecommissionedDate.HasValue)
|
DeviceDecommissionedCount = dp.Devices.Count(d => d.DecommissionedDate.HasValue)
|
||||||
}).ToList();
|
}).Cast<ConfigDeviceProfileIndexModelItem>().ToList();
|
||||||
|
|
||||||
if (DiscoApplication.MultiSiteMode)
|
if (DiscoApplication.MultiSiteMode)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,10 +4,11 @@ using System.Linq;
|
|||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using Disco.Services.Plugins;
|
using Disco.Services.Plugins;
|
||||||
|
using Disco.Models.UI.Config.DeviceProfile;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||||
{
|
{
|
||||||
public class ShowModel
|
public class ShowModel : ConfigDeviceProfileShowModel
|
||||||
{
|
{
|
||||||
public Disco.Models.Repository.DeviceProfile DeviceProfile { get; set; }
|
public Disco.Models.Repository.DeviceProfile DeviceProfile { get; set; }
|
||||||
public List<SelectListItem> DeviceProfileDistributionTypes { get; set; }
|
public List<SelectListItem> DeviceProfileDistributionTypes { get; set; }
|
||||||
|
|||||||
+2
-2
@@ -4,16 +4,16 @@ using System.Linq;
|
|||||||
using System.Web;
|
using System.Web;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using Disco.Web.Extensions;
|
using Disco.Web.Extensions;
|
||||||
|
using Disco.Models.UI.Config.DeviceProfile;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||||
{
|
{
|
||||||
public class _IndexModelDeviceProfile
|
public class _IndexModelItem : ConfigDeviceProfileIndexModelItem
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string ShortName { get; set; }
|
public string ShortName { get; set; }
|
||||||
public int? Address { get; set; }
|
public int? Address { get; set; }
|
||||||
//public string AddressShortName { get; set; }
|
|
||||||
public string AddressName { get; set; }
|
public string AddressName { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
public int DistributionTypeId { get; set; }
|
public int DistributionTypeId { get; set; }
|
||||||
@@ -4,11 +4,12 @@ using System.Linq;
|
|||||||
using System.Web;
|
using System.Web;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using Disco.Data.Repository;
|
using Disco.Data.Repository;
|
||||||
|
using Disco.Models.UI.Config.DocumentTemplate;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
||||||
{
|
{
|
||||||
[CustomValidation(typeof(CreateModelValidation), "ValidateCreateModel")]
|
[CustomValidation(typeof(CreateModelValidation), "ValidateCreateModel")]
|
||||||
public class CreateModel
|
public class CreateModel : ConfigDocumentTemplateCreateModel
|
||||||
{
|
{
|
||||||
public Disco.Models.Repository.DocumentTemplate DocumentTemplate { get; set; }
|
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.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
||||||
{
|
{
|
||||||
public class ExpressionBrowserModel
|
public class ExpressionBrowserModel : ConfigDocumentTemplateExpressionBrowserModel
|
||||||
{
|
{
|
||||||
public string DeviceType { get; set; }
|
public string DeviceType { get; set; }
|
||||||
public string UserType { get; set; }
|
public string UserType { get; set; }
|
||||||
public string JobType { 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> Variables { get; set; }
|
||||||
public Dictionary<string, string> ExtensionLibraries { 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.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
||||||
{
|
{
|
||||||
public class IndexModel
|
public class IndexModel : ConfigDocumentTemplateIndexModel
|
||||||
{
|
{
|
||||||
public List<Disco.Models.Repository.DocumentTemplate> DocumentTemplates { get; set; }
|
public List<Disco.Models.Repository.DocumentTemplate> DocumentTemplates { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,11 @@ using System.Linq;
|
|||||||
using System.Web;
|
using System.Web;
|
||||||
using Disco.Data.Repository;
|
using Disco.Data.Repository;
|
||||||
using Disco.Models.Repository;
|
using Disco.Models.Repository;
|
||||||
|
using Disco.Models.UI.Config.DocumentTemplate;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
||||||
{
|
{
|
||||||
public class ShowModel
|
public class ShowModel : ConfigDocumentTemplateShowModel
|
||||||
{
|
{
|
||||||
public Disco.Models.Repository.DocumentTemplate DocumentTemplate { get; set; }
|
public Disco.Models.Repository.DocumentTemplate DocumentTemplate { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,11 @@ using System.Web.Mvc;
|
|||||||
using Disco.BI;
|
using Disco.BI;
|
||||||
using Disco.BI.Extensions;
|
using Disco.BI.Extensions;
|
||||||
using Disco.Web.Extensions;
|
using Disco.Web.Extensions;
|
||||||
|
using Disco.Models.UI.Config.DocumentTemplate;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
||||||
{
|
{
|
||||||
public class UndetectedPagesModel
|
public class UndetectedPagesModel : ConfigDocumentTemplateUndetectedPagesModel
|
||||||
{
|
{
|
||||||
|
|
||||||
public List<Disco.Models.Repository.DocumentTemplate> DocumentTemplates { get; set; }
|
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.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Models.Enrolment
|
namespace Disco.Web.Areas.Config.Models.Enrolment
|
||||||
{
|
{
|
||||||
public class IndexModel
|
public class IndexModel : ConfigEnrolmentIndexModel
|
||||||
{
|
{
|
||||||
public string MacSshUsername { get; set; }
|
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 System.Web;
|
||||||
using Disco.Services.Logging;
|
using Disco.Services.Logging;
|
||||||
using Disco.Services.Logging.Models;
|
using Disco.Services.Logging.Models;
|
||||||
|
using Disco.Models.UI.Config.Logging;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Models.Logging
|
namespace Disco.Web.Areas.Config.Models.Logging
|
||||||
{
|
{
|
||||||
public class IndexModel
|
public class IndexModel : ConfigLoggingIndexModel
|
||||||
{
|
{
|
||||||
public Dictionary<LogBase, List<LogEventType>> LogModules { get; set; }
|
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.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Models.Logging
|
namespace Disco.Web.Areas.Config.Models.Logging
|
||||||
{
|
{
|
||||||
public class TaskStatusModel
|
public class TaskStatusModel : ConfigLoggingTaskStatusModel
|
||||||
{
|
{
|
||||||
public string SessionId { get; set; }
|
public string SessionId { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,11 @@ using System.Linq;
|
|||||||
using System.Web;
|
using System.Web;
|
||||||
using Disco.Models.BI.Config;
|
using Disco.Models.BI.Config;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using Disco.Models.UI.Config.Organisation;
|
||||||
|
|
||||||
namespace Disco.Web.Areas.Config.Models.Organisation
|
namespace Disco.Web.Areas.Config.Models.Organisation
|
||||||
{
|
{
|
||||||
public class IndexModel
|
public class IndexModel : ConfigOrganisationIndexModel
|
||||||
{
|
{
|
||||||
public string OrganisationName { get; set; }
|
public string OrganisationName { get; set; }
|
||||||
[Display(Name="Enabled")]
|
[Display(Name="Enabled")]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@model Disco.Models.Repository.DeviceBatch
|
@model Disco.Web.Areas.Config.Models.DeviceBatch.CreateModel
|
||||||
@{
|
@{
|
||||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), "Create");
|
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), "Create");
|
||||||
}
|
}
|
||||||
@@ -11,14 +11,14 @@
|
|||||||
Name:
|
Name:
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
@Html.EditorFor(model => model.Name)<br />@Html.ValidationMessageFor(model => model.Name)
|
@Html.EditorFor(model => model.DeviceBatch.Name)<br />@Html.ValidationMessageFor(model => model.DeviceBatch.Name)
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
Purchase Date:
|
Purchase Date:
|
||||||
</th>
|
</th>
|
||||||
<td>@Html.EditorFor(model => model.PurchaseDate)<br />@Html.ValidationMessageFor(model => model.PurchaseDate)
|
<td>@Html.EditorFor(model => model.DeviceBatch.PurchaseDate)<br />@Html.ValidationMessageFor(model => model.DeviceBatch.PurchaseDate)
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:4.0.30319.17929
|
// Runtime Version:4.0.30319.18033
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
@@ -31,9 +31,9 @@ namespace Disco.Web.Areas.Config.Views.DeviceBatch
|
|||||||
using Disco.Web;
|
using Disco.Web;
|
||||||
using Disco.Web.Extensions;
|
using Disco.Web.Extensions;
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.4.0")]
|
||||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceBatch/Create.cshtml")]
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceBatch/Create.cshtml")]
|
||||||
public class Create : System.Web.Mvc.WebViewPage<Disco.Models.Repository.DeviceBatch>
|
public partial class Create : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceBatch.CreateModel>
|
||||||
{
|
{
|
||||||
public Create()
|
public Create()
|
||||||
{
|
{
|
||||||
@@ -71,7 +71,7 @@ WriteLiteral(" ");
|
|||||||
|
|
||||||
|
|
||||||
#line 14 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
#line 14 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
||||||
Write(Html.EditorFor(model => model.Name));
|
Write(Html.EditorFor(model => model.DeviceBatch.Name));
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -80,7 +80,7 @@ WriteLiteral("<br />");
|
|||||||
|
|
||||||
|
|
||||||
#line 14 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
#line 14 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
||||||
Write(Html.ValidationMessageFor(model => model.Name));
|
Write(Html.ValidationMessageFor(model => model.DeviceBatch.Name));
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -91,7 +91,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>
|
|||||||
|
|
||||||
|
|
||||||
#line 21 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
#line 21 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
||||||
Write(Html.EditorFor(model => model.PurchaseDate));
|
Write(Html.EditorFor(model => model.DeviceBatch.PurchaseDate));
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -100,7 +100,7 @@ WriteLiteral("<br />");
|
|||||||
|
|
||||||
|
|
||||||
#line 21 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
#line 21 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
|
||||||
Write(Html.ValidationMessageFor(model => model.PurchaseDate));
|
Write(Html.ValidationMessageFor(model => model.DeviceBatch.PurchaseDate));
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
|
|||||||
@@ -205,7 +205,7 @@
|
|||||||
Default Device Model:
|
Default Device Model:
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
@Html.DropDownListFor(model => model.DeviceBatch.DefaultDeviceModelId, Model.DeviceModels)
|
@Html.DropDownListFor(model => model.DeviceBatch.DefaultDeviceModelId, Model.DeviceModels.ToSelectListItems())
|
||||||
@AjaxHelpers.AjaxSave()
|
@AjaxHelpers.AjaxSave()
|
||||||
@AjaxHelpers.AjaxLoader()
|
@AjaxHelpers.AjaxLoader()
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:4.0.30319.17929
|
// Runtime Version:4.0.30319.18033
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
@@ -31,9 +31,9 @@ namespace Disco.Web.Areas.Config.Views.DeviceBatch
|
|||||||
using Disco.Web;
|
using Disco.Web;
|
||||||
using Disco.Web.Extensions;
|
using Disco.Web.Extensions;
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.4.0")]
|
||||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceBatch/Show.cshtml")]
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceBatch/Show.cshtml")]
|
||||||
public class Show : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceBatch.ShowModel>
|
public partial class Show : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceBatch.ShowModel>
|
||||||
{
|
{
|
||||||
public Show()
|
public Show()
|
||||||
{
|
{
|
||||||
@@ -564,7 +564,7 @@ WriteLiteral(" ");
|
|||||||
|
|
||||||
|
|
||||||
#line 208 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
#line 208 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
||||||
Write(Html.DropDownListFor(model => model.DeviceBatch.DefaultDeviceModelId, Model.DeviceModels));
|
Write(Html.DropDownListFor(model => model.DeviceBatch.DefaultDeviceModelId, Model.DeviceModels.ToSelectListItems()));
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace Disco.Web.Areas.Config.Views.DeviceModel
|
|||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceModel/GenericComponents.cshtml")]
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceModel/GenericComponents.cshtml")]
|
||||||
public class GenericComponents : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceModel.DeviceComponentsModel>
|
public class GenericComponents : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceModel.ComponentsModel>
|
||||||
{
|
{
|
||||||
public GenericComponents()
|
public GenericComponents()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace Disco.Web.Areas.Config.Views.DeviceModel
|
|||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceModel/_DeviceComponentsTable.cshtml")]
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceModel/_DeviceComponentsTable.cshtml")]
|
||||||
public class DeviceComponentsTable : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceModel.DeviceComponentsModel>
|
public class DeviceComponentsTable : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceModel.ComponentsModel>
|
||||||
{
|
{
|
||||||
public DeviceComponentsTable()
|
public DeviceComponentsTable()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@model Disco.Models.Repository.DeviceProfile
|
@model Disco.Web.Areas.Config.Models.DeviceProfile.CreateModel
|
||||||
@{
|
@{
|
||||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Profiles", MVC.Config.DeviceProfile.Index(null), "Create");
|
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Profiles", MVC.Config.DeviceProfile.Index(null), "Create");
|
||||||
}
|
}
|
||||||
@@ -11,21 +11,21 @@
|
|||||||
Name:
|
Name:
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
@Html.TextBoxFor(model => model.Name)<br />@Html.ValidationMessageFor(model => model.Name)
|
@Html.TextBoxFor(model => model.DeviceProfile.Name)<br />@Html.ValidationMessageFor(model => model.DeviceProfile.Name)
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
Short Name:
|
Short Name:
|
||||||
</th>
|
</th>
|
||||||
<td>@Html.TextBoxFor(model => model.ShortName)<br />@Html.ValidationMessageFor(model => model.ShortName)
|
<td>@Html.TextBoxFor(model => model.DeviceProfile.ShortName)<br />@Html.ValidationMessageFor(model => model.DeviceProfile.ShortName)
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
Description:
|
Description:
|
||||||
</th>
|
</th>
|
||||||
<td>@Html.TextBoxFor(model => model.Description)<br />@Html.ValidationMessageFor(model => model.Description)
|
<td>@Html.TextBoxFor(model => model.DeviceProfile.Description)<br />@Html.ValidationMessageFor(model => model.DeviceProfile.Description)
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:4.0.30319.17929
|
// Runtime Version:4.0.30319.18033
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
@@ -31,9 +31,9 @@ namespace Disco.Web.Areas.Config.Views.DeviceProfile
|
|||||||
using Disco.Web;
|
using Disco.Web;
|
||||||
using Disco.Web.Extensions;
|
using Disco.Web.Extensions;
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.4.0")]
|
||||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceProfile/Create.cshtml")]
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceProfile/Create.cshtml")]
|
||||||
public class Create : System.Web.Mvc.WebViewPage<Disco.Models.Repository.DeviceProfile>
|
public partial class Create : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceProfile.CreateModel>
|
||||||
{
|
{
|
||||||
public Create()
|
public Create()
|
||||||
{
|
{
|
||||||
@@ -71,7 +71,7 @@ WriteLiteral(" ");
|
|||||||
|
|
||||||
|
|
||||||
#line 14 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
|
#line 14 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
|
||||||
Write(Html.TextBoxFor(model => model.Name));
|
Write(Html.TextBoxFor(model => model.DeviceProfile.Name));
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -80,7 +80,7 @@ WriteLiteral("<br />");
|
|||||||
|
|
||||||
|
|
||||||
#line 14 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
|
#line 14 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
|
||||||
Write(Html.ValidationMessageFor(model => model.Name));
|
Write(Html.ValidationMessageFor(model => model.DeviceProfile.Name));
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -90,7 +90,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>
|
|||||||
|
|
||||||
|
|
||||||
#line 21 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
|
#line 21 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
|
||||||
Write(Html.TextBoxFor(model => model.ShortName));
|
Write(Html.TextBoxFor(model => model.DeviceProfile.ShortName));
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -99,7 +99,7 @@ WriteLiteral("<br />");
|
|||||||
|
|
||||||
|
|
||||||
#line 21 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
|
#line 21 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
|
||||||
Write(Html.ValidationMessageFor(model => model.ShortName));
|
Write(Html.ValidationMessageFor(model => model.DeviceProfile.ShortName));
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -110,7 +110,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>
|
|||||||
|
|
||||||
|
|
||||||
#line 28 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
|
#line 28 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
|
||||||
Write(Html.TextBoxFor(model => model.Description));
|
Write(Html.TextBoxFor(model => model.DeviceProfile.Description));
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -119,7 +119,7 @@ WriteLiteral("<br />");
|
|||||||
|
|
||||||
|
|
||||||
#line 28 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
|
#line 28 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
|
||||||
Write(Html.ValidationMessageFor(model => model.Description));
|
Write(Html.ValidationMessageFor(model => model.DeviceProfile.Description));
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace Disco.Web.Areas.Config.Views.DeviceProfile
|
|||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceProfile/_TableRender.cshtml")]
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceProfile/_TableRender.cshtml")]
|
||||||
public class TableRender : System.Web.Mvc.WebViewPage<IEnumerable<Disco.Web.Areas.Config.Models.DeviceProfile._IndexModelDeviceProfile>>
|
public class TableRender : System.Web.Mvc.WebViewPage<IEnumerable<Disco.Web.Areas.Config.Models.DeviceProfile._IndexModelItem>>
|
||||||
{
|
{
|
||||||
public TableRender()
|
public TableRender()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -38,5 +38,6 @@
|
|||||||
Disco v@(Disco.Web.DiscoApplication.Version) @@ @(Disco.Web.DiscoApplication.OrganisationName) | @Html.ActionLink("Credits", MVC.Public.Public.Credits()) | @Html.ActionLink("Licence", MVC.Public.Public.Licence())
|
Disco v@(Disco.Web.DiscoApplication.Version) @@ @(Disco.Web.DiscoApplication.OrganisationName) | @Html.ActionLink("Credits", MVC.Public.Public.Credits()) | @Html.ActionLink("Licence", MVC.Public.Public.Licence())
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
@{ Disco.Services.Plugins.Features.UIExtension.UIExtensions.ExecuteExtensionResult(this); }
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:4.0.30319.17929
|
// Runtime Version:4.0.30319.18033
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
@@ -31,9 +31,9 @@ namespace Disco.Web.Areas.Public.Views.Shared
|
|||||||
using Disco.Web;
|
using Disco.Web;
|
||||||
using Disco.Web.Extensions;
|
using Disco.Web.Extensions;
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.4.0")]
|
||||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Public/Views/Shared/_Layout.cshtml")]
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Public/Views/Shared/_Layout.cshtml")]
|
||||||
public class Layout : System.Web.Mvc.WebViewPage<dynamic>
|
public partial class Layout : System.Web.Mvc.WebViewPage<dynamic>
|
||||||
{
|
{
|
||||||
public Layout()
|
public Layout()
|
||||||
{
|
{
|
||||||
@@ -234,7 +234,21 @@ WriteLiteral(" | ");
|
|||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n </footer>\r\n </div>\r\n</body>\r\n</html>\r\n");
|
WriteLiteral("\r\n </footer>\r\n </div>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 41 "..\..\Areas\Public\Views\Shared\_Layout.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 41 "..\..\Areas\Public\Views\Shared\_Layout.cshtml"
|
||||||
|
Disco.Services.Plugins.Features.UIExtension.UIExtensions.ExecuteExtensionResult(this);
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n</body>\r\n</html>\r\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,13 +36,16 @@ namespace Disco.Web.Controllers
|
|||||||
{
|
{
|
||||||
DefaultDeviceProfileId = dbContext.DiscoConfiguration.DeviceProfiles.DefaultAddDeviceOfflineDeviceProfileId
|
DefaultDeviceProfileId = dbContext.DiscoConfiguration.DeviceProfiles.DefaultAddDeviceOfflineDeviceProfileId
|
||||||
};
|
};
|
||||||
m.DeviceBatches = dbContext.DeviceBatches.ToSelectListItems();
|
m.DeviceBatches = dbContext.DeviceBatches.ToList();
|
||||||
m.DeviceProfiles = dbContext.DeviceProfiles.ToList();
|
m.DeviceProfiles = dbContext.DeviceProfiles.ToList();
|
||||||
if (m.DefaultDeviceProfileId == 0)
|
if (m.DefaultDeviceProfileId == 0)
|
||||||
{
|
{
|
||||||
m.DeviceProfiles.Insert(0, new DeviceProfile() { Id = 0, Name = "Select a Device Profile" });
|
m.DeviceProfiles.Insert(0, new DeviceProfile() { Id = 0, Name = "Select a Device Profile" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<DeviceAddOfflineModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
return View(m);
|
return View(m);
|
||||||
}
|
}
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ using System.Web.Mvc;
|
|||||||
using Disco.BI;
|
using Disco.BI;
|
||||||
using Disco.Data.Repository;
|
using Disco.Data.Repository;
|
||||||
using Disco.Models.Repository;
|
using Disco.Models.Repository;
|
||||||
|
using Disco.Services.Plugins.Features.UIExtension;
|
||||||
|
using Disco.Models.UI.Search;
|
||||||
|
|
||||||
namespace Disco.Web.Controllers
|
namespace Disco.Web.Controllers
|
||||||
{
|
{
|
||||||
@@ -141,6 +143,9 @@ namespace Disco.Web.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UI Extensions
|
||||||
|
UIExtensions.ExecuteExtensions<SearchQueryModel>(this.ControllerContext, m);
|
||||||
|
|
||||||
return View(m);
|
return View(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,14 +4,15 @@ using System.Linq;
|
|||||||
using System.Web;
|
using System.Web;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
|
using Disco.Models.UI.Device;
|
||||||
|
|
||||||
namespace Disco.Web.Models.Device
|
namespace Disco.Web.Models.Device
|
||||||
{
|
{
|
||||||
public class AddOfflineModel
|
public class AddOfflineModel : DeviceAddOfflineModel
|
||||||
{
|
{
|
||||||
public Disco.Models.Repository.Device Device { get; set; }
|
public Disco.Models.Repository.Device Device { get; set; }
|
||||||
public List<Disco.Models.Repository.DeviceProfile> DeviceProfiles { get; set; }
|
public List<Disco.Models.Repository.DeviceProfile> DeviceProfiles { get; set; }
|
||||||
public List<SelectListItem> DeviceBatches { get; set; }
|
public List<Disco.Models.Repository.DeviceBatch> DeviceBatches { get; set; }
|
||||||
public int DefaultDeviceProfileId { get; set; }
|
public int DefaultDeviceProfileId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,5 +13,7 @@ namespace Disco.Web.Models.Job
|
|||||||
//public Disco.Models.BI.Job.JobTableModel WaitingForUserActionJobs { get; set; }
|
//public Disco.Models.BI.Job.JobTableModel WaitingForUserActionJobs { get; set; }
|
||||||
//public Disco.Models.BI.Job.JobTableModel ReadyForReturnJobs { get; set; }
|
//public Disco.Models.BI.Job.JobTableModel ReadyForReturnJobs { get; set; }
|
||||||
//public Disco.Models.BI.Job.JobTableModel RecentlyClosedJobs { get; set; }
|
//public Disco.Models.BI.Job.JobTableModel RecentlyClosedJobs { get; set; }
|
||||||
|
|
||||||
|
public List<Disco.Models.BI.Job.Statistics.DailyOpenedClosedItem> DailyOpenedClosedStatistics { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
using System;
|
using Disco.Models.UI.Search;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
|
|
||||||
namespace Disco.Web.Models.Search
|
namespace Disco.Web.Models.Search
|
||||||
{
|
{
|
||||||
public class QueryModel
|
public class QueryModel : SearchQueryModel
|
||||||
{
|
{
|
||||||
public string FriendlyTerm { get; set; }
|
public string FriendlyTerm { get; set; }
|
||||||
public string Term { get; set; }
|
public string Term { get; set; }
|
||||||
|
|||||||
+4
-4
@@ -8414,9 +8414,9 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void CreateOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Models.Repository.DeviceBatch model);
|
partial void CreateOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.DeviceBatch.CreateModel model);
|
||||||
|
|
||||||
public override System.Web.Mvc.ActionResult Create(Disco.Models.Repository.DeviceBatch model)
|
public override System.Web.Mvc.ActionResult Create(Disco.Web.Areas.Config.Models.DeviceBatch.CreateModel model)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Create);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Create);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||||
@@ -8677,9 +8677,9 @@ namespace Disco.Web.Areas.Config.Controllers
|
|||||||
return callInfo;
|
return callInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void CreateOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Models.Repository.DeviceProfile model);
|
partial void CreateOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Web.Areas.Config.Models.DeviceProfile.CreateModel model);
|
||||||
|
|
||||||
public override System.Web.Mvc.ActionResult Create(Disco.Models.Repository.DeviceProfile model)
|
public override System.Web.Mvc.ActionResult Create(Disco.Web.Areas.Config.Models.DeviceProfile.CreateModel model)
|
||||||
{
|
{
|
||||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Create);
|
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Create);
|
||||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "model", model);
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
Device Batch:
|
Device Batch:
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
@Html.DropDownListFor(model => model.Device.DeviceBatchId, Model.DeviceBatches) <br />
|
@Html.DropDownListFor(model => model.Device.DeviceBatchId, Model.DeviceBatches.ToSelectListItems()) <br />
|
||||||
@Html.ValidationMessageFor(model => model.Device.DeviceBatchId)
|
@Html.ValidationMessageFor(model => model.Device.DeviceBatchId)
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:4.0.30319.17929
|
// Runtime Version:4.0.30319.18033
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
@@ -31,9 +31,9 @@ namespace Disco.Web.Views.Device
|
|||||||
using Disco.Web;
|
using Disco.Web;
|
||||||
using Disco.Web.Extensions;
|
using Disco.Web.Extensions;
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.4.0")]
|
||||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/AddOffline.cshtml")]
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/AddOffline.cshtml")]
|
||||||
public class AddOffline : System.Web.Mvc.WebViewPage<Disco.Web.Models.Device.AddOfflineModel>
|
public partial class AddOffline : System.Web.Mvc.WebViewPage<Disco.Web.Models.Device.AddOfflineModel>
|
||||||
{
|
{
|
||||||
public AddOffline()
|
public AddOffline()
|
||||||
{
|
{
|
||||||
@@ -152,7 +152,7 @@ WriteLiteral(" ");
|
|||||||
|
|
||||||
|
|
||||||
#line 40 "..\..\Views\Device\AddOffline.cshtml"
|
#line 40 "..\..\Views\Device\AddOffline.cshtml"
|
||||||
Write(Html.DropDownListFor(model => model.Device.DeviceBatchId, Model.DeviceBatches));
|
Write(Html.DropDownListFor(model => model.Device.DeviceBatchId, Model.DeviceBatches.ToSelectListItems()));
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
|
|||||||
@@ -18,5 +18,6 @@
|
|||||||
<section id="layout_Page">
|
<section id="layout_Page">
|
||||||
@RenderBody()
|
@RenderBody()
|
||||||
</section>
|
</section>
|
||||||
|
@{ Disco.Services.Plugins.Features.UIExtension.UIExtensions.ExecuteExtensionResult(this); }
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:4.0.30319.17929
|
// Runtime Version:4.0.30319.18033
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
@@ -31,9 +31,9 @@ namespace Disco.Web.Views.Shared
|
|||||||
using Disco.Web;
|
using Disco.Web;
|
||||||
using Disco.Web.Extensions;
|
using Disco.Web.Extensions;
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.4.0")]
|
||||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Shared/_DialogLayout.cshtml")]
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Shared/_DialogLayout.cshtml")]
|
||||||
public class DialogLayout : System.Web.Mvc.WebViewPage<dynamic>
|
public partial class DialogLayout : System.Web.Mvc.WebViewPage<dynamic>
|
||||||
{
|
{
|
||||||
public DialogLayout()
|
public DialogLayout()
|
||||||
{
|
{
|
||||||
@@ -124,7 +124,21 @@ WriteLiteral(" ");
|
|||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n </section>\r\n</body>\r\n</html>");
|
WriteLiteral("\r\n </section>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 21 "..\..\Views\Shared\_DialogLayout.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 21 "..\..\Views\Shared\_DialogLayout.cshtml"
|
||||||
|
Disco.Services.Plugins.Features.UIExtension.UIExtensions.ExecuteExtensionResult(this);
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n</body>\r\n</html>\r\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,5 +17,6 @@
|
|||||||
<section id="layout_Page">
|
<section id="layout_Page">
|
||||||
@RenderBody()
|
@RenderBody()
|
||||||
</section>
|
</section>
|
||||||
|
@{ Disco.Services.Plugins.Features.UIExtension.UIExtensions.ExecuteExtensionResult(this); }
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:4.0.30319.17929
|
// Runtime Version:4.0.30319.18033
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
@@ -31,9 +31,9 @@ namespace Disco.Web.Views.Shared
|
|||||||
using Disco.Web;
|
using Disco.Web;
|
||||||
using Disco.Web.Extensions;
|
using Disco.Web.Extensions;
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.4.0")]
|
||||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Shared/_EmptyLayout.cshtml")]
|
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Shared/_EmptyLayout.cshtml")]
|
||||||
public class EmptyLayout : System.Web.Mvc.WebViewPage<dynamic>
|
public partial class EmptyLayout : System.Web.Mvc.WebViewPage<dynamic>
|
||||||
{
|
{
|
||||||
public EmptyLayout()
|
public EmptyLayout()
|
||||||
{
|
{
|
||||||
@@ -123,7 +123,21 @@ WriteLiteral(" ");
|
|||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
WriteLiteral("\r\n </section>\r\n</body>\r\n</html>\r\n");
|
WriteLiteral("\r\n </section>\r\n");
|
||||||
|
|
||||||
|
|
||||||
|
#line 20 "..\..\Views\Shared\_EmptyLayout.cshtml"
|
||||||
|
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
#line 20 "..\..\Views\Shared\_EmptyLayout.cshtml"
|
||||||
|
Disco.Services.Plugins.Features.UIExtension.UIExtensions.ExecuteExtensionResult(this);
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
WriteLiteral("\r\n</body>\r\n</html>\r\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Disco - @CommonHelpers.BreadcrumbsTitle(ViewBag.Title)</title>
|
<title>Disco - @CommonHelpers.BreadcrumbsTitle(ViewBag.Title ?? string.Empty)</title>
|
||||||
<link rel="shortcut icon" href="/favicon.ico" />
|
<link rel="shortcut icon" href="/favicon.ico" />
|
||||||
<meta name="application-name" content="Disco" />
|
<meta name="application-name" content="Disco" />
|
||||||
<meta name="msapplication-starturl" content="/" />
|
<meta name="msapplication-starturl" content="/" />
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
</script>
|
</script>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<div id="layout_PageHeading">@CommonHelpers.Breadcrumbs(ViewBag.Title)</div>
|
<div id="layout_PageHeading">@CommonHelpers.Breadcrumbs(ViewBag.Title ?? string.Empty)</div>
|
||||||
<section id="layout_Page">
|
<section id="layout_Page">
|
||||||
@RenderBody()
|
@RenderBody()
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:4.0.30319.17929
|
// Runtime Version:4.0.30319.18033
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
@@ -53,7 +53,7 @@ WriteLiteral("\r\n<!doctype html>\r\n<html>\r\n<head>\r\n <title>Disco - ");
|
|||||||
|
|
||||||
|
|
||||||
#line 8 "..\..\Views\Shared\_Layout.cshtml"
|
#line 8 "..\..\Views\Shared\_Layout.cshtml"
|
||||||
Write(CommonHelpers.BreadcrumbsTitle(ViewBag.Title));
|
Write(CommonHelpers.BreadcrumbsTitle(ViewBag.Title ?? string.Empty));
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
@@ -122,26 +122,26 @@ WriteLiteral(" id=\"heading\"");
|
|||||||
|
|
||||||
WriteLiteral(">\r\n <a");
|
WriteLiteral(">\r\n <a");
|
||||||
|
|
||||||
WriteAttribute("href", Tuple.Create(" href=\"", 672), Tuple.Create("\"", 707)
|
WriteAttribute("href", Tuple.Create(" href=\"", 688), Tuple.Create("\"", 723)
|
||||||
|
|
||||||
#line 21 "..\..\Views\Shared\_Layout.cshtml"
|
#line 21 "..\..\Views\Shared\_Layout.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 679), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Job.Index())
|
, Tuple.Create(Tuple.Create("", 695), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Job.Index())
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 679), false)
|
, 695), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(">\r\n <img");
|
WriteLiteral(">\r\n <img");
|
||||||
|
|
||||||
WriteAttribute("src", Tuple.Create(" src=\"", 739), Tuple.Create("\"", 789)
|
WriteAttribute("src", Tuple.Create(" src=\"", 755), Tuple.Create("\"", 805)
|
||||||
|
|
||||||
#line 22 "..\..\Views\Shared\_Layout.cshtml"
|
#line 22 "..\..\Views\Shared\_Layout.cshtml"
|
||||||
, Tuple.Create(Tuple.Create("", 745), Tuple.Create<System.Object, System.Int32>(Links.ClientSource.Style.Images.Heading_png
|
, Tuple.Create(Tuple.Create("", 761), Tuple.Create<System.Object, System.Int32>(Links.ClientSource.Style.Images.Heading_png
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
, 745), false)
|
, 761), false)
|
||||||
);
|
);
|
||||||
|
|
||||||
WriteLiteral(" alt=\"DISCO - ICT Asset Management\"");
|
WriteLiteral(" alt=\"DISCO - ICT Asset Management\"");
|
||||||
@@ -419,7 +419,7 @@ WriteLiteral(">");
|
|||||||
|
|
||||||
|
|
||||||
#line 98 "..\..\Views\Shared\_Layout.cshtml"
|
#line 98 "..\..\Views\Shared\_Layout.cshtml"
|
||||||
Write(CommonHelpers.Breadcrumbs(ViewBag.Title));
|
Write(CommonHelpers.Breadcrumbs(ViewBag.Title ?? string.Empty));
|
||||||
|
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
|
|||||||
Reference in New Issue
Block a user