Certificate/wireless plugins; major refactoring
Migrate much of BI to Services. Added Wireless Profile Provider plugin feature. Added Certificate Authority Provider plugin feature. Modified Certificate Provider plugin feature. Database migration v17, for Device Profiles. Enrolment Client Updated to support CA Certificates, Wireless Profiles and Hardware Info. New Client Enrolment Protocol to support new features. Plugin Manifest Generator added to main solution. Improved AD search performance.
This commit is contained in:
@@ -66,11 +66,19 @@
|
||||
|
||||
@helper RadioButtonList(string id, List<System.Web.Mvc.SelectListItem> items, int columns = 1)
|
||||
{
|
||||
@ItemList("radio", id, items, columns)
|
||||
@ItemList(null, "radio", id, items, columns)
|
||||
}
|
||||
@helper RadioButtonList(string containerName, string id, List<System.Web.Mvc.SelectListItem> items, int columns = 1)
|
||||
{
|
||||
@ItemList(containerName, "radio", id, items, columns)
|
||||
}
|
||||
@helper CheckBoxList(string id, List<System.Web.Mvc.SelectListItem> items, int columns = 1, bool alignEven = true, int? forceUniqueIds = null, bool htmlEncodeText = true)
|
||||
{
|
||||
@ItemList("checkbox", id, items, columns, alignEven, forceUniqueIds, htmlEncodeText)
|
||||
@ItemList(null, "checkbox", id, items, columns, alignEven, forceUniqueIds, htmlEncodeText)
|
||||
}
|
||||
@helper CheckBoxList(string containerName, string id, List<System.Web.Mvc.SelectListItem> items, int columns = 1, bool alignEven = true, int? forceUniqueIds = null, bool htmlEncodeText = true)
|
||||
{
|
||||
@ItemList(containerName, "checkbox", id, items, columns, alignEven, forceUniqueIds, htmlEncodeText)
|
||||
}
|
||||
@helper CheckboxBulkSelect(string BulkSelectContainerId, string ParentJQuerySelector = null)
|
||||
{Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-jQueryExtensions");
|
||||
@@ -85,12 +93,12 @@
|
||||
}
|
||||
</span>
|
||||
}
|
||||
@helper ItemList(string inputType, string id, List<System.Web.Mvc.SelectListItem> items, int columns = 1, bool alignEven = true, int? forceUniqueIds = null, bool htmlEncodeText = true)
|
||||
@helper ItemList(string containerId, string inputType, string id, List<System.Web.Mvc.SelectListItem> items, int columns = 1, bool alignEven = true, int? forceUniqueIds = null, bool htmlEncodeText = true)
|
||||
{
|
||||
int itemsPerColumn = items.Count / columns;
|
||||
int columnWidth = (100 / columns);
|
||||
var itemNextId = 0;
|
||||
<table class="none">
|
||||
<table id="@containerId" class="none">
|
||||
<tr>
|
||||
@for (int i = 0; i < columns; i++)
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -77,7 +77,7 @@ namespace Disco.Web
|
||||
|
||||
// Initialize Satellite Managed Groups (which don't belong to any other component)
|
||||
Disco.Services.Devices.ManagedGroups.DeviceManagedGroups.Initialize(Database);
|
||||
Disco.BI.DocumentTemplateBI.ManagedGroups.DocumentTemplateManagedGroups.Initialize(Database);
|
||||
Disco.Services.Documents.ManagedGroups.DocumentTemplateManagedGroups.Initialize(Database);
|
||||
|
||||
// Initialize Plugins
|
||||
Disco.Services.Plugins.Plugins.InitalizePlugins(Database);
|
||||
@@ -105,11 +105,15 @@ namespace Disco.Web
|
||||
InitalizeCoreEnvironment(Database);
|
||||
|
||||
// Initialize Scheduled Tasks
|
||||
Disco.Services.Tasks.ScheduledTasks.InitalizeScheduledTasks(Database, DiscoApplication.SchedulerFactory, true);
|
||||
Disco.Services.Tasks.ScheduledTasks.InitalizeScheduledTasks(Database, DiscoApplication.SchedulerFactory, false);
|
||||
|
||||
// Import MAC Address Migration
|
||||
if (PreviousVersion != null && PreviousVersion < new Version(1, 2, 910, 0))
|
||||
Disco.BI.DeviceBI.Migration.LogMacAddressImporting.SetRequired(Database);
|
||||
Services.Devices.Enrolment.LogMacAddressImportingTask.SetRequired(Database);
|
||||
|
||||
// Attachment PDF Thumbnail Update
|
||||
if (PreviousVersion != null && PreviousVersion < new Version(2, 2, 0, 0))
|
||||
Services.Documents.AttachmentImport.ThumbnailUpdateTask.SetRequired(Database);
|
||||
}
|
||||
|
||||
public static void DisposeEnvironment()
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Microsoft.AspNet.SignalR;
|
||||
|
||||
namespace Disco.Web
|
||||
{
|
||||
@@ -84,8 +79,8 @@ namespace Disco.Web
|
||||
// Update Route
|
||||
routes.MapRoute(
|
||||
name: "Update", // Route name
|
||||
url: "{controller}/{action}/{id}", // URL with parameters
|
||||
defaults: new { controller = "Update", action = "Index", id = UrlParameter.Optional }, // Parameter defaults
|
||||
url: "{action}", // URL with parameters
|
||||
defaults: new { controller = "Update", action = "Index" }, // Parameter defaults
|
||||
namespaces: new string[] { "Disco.Web.Controllers" } // Controllers Namespace Only
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Authorization.Roles;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Disco.Services.Users;
|
||||
using Disco.Services.Web;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Devices.ManagedGroups;
|
||||
|
||||
@@ -703,7 +703,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
[DiscoAuthorize(Claims.DiscoAdminAccount)]
|
||||
public virtual ActionResult MigrateDeviceMacAddressesFromLog()
|
||||
{
|
||||
var taskStatus = Disco.BI.DeviceBI.Migration.LogMacAddressImporting.ScheduleImmediately();
|
||||
var taskStatus = Disco.Services.Devices.Enrolment.LogMacAddressImportingTask.ScheduleImmediately();
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(taskStatus.SessionId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Plugins;
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Devices.ManagedGroups;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Disco.Services.Plugins;
|
||||
using Disco.Services.Plugins.Features.CertificateAuthorityProvider;
|
||||
using Disco.Services.Plugins.Features.CertificateProvider;
|
||||
using Disco.Services.Plugins.Features.WirelessProfileProvider;
|
||||
using Disco.Services.Tasks;
|
||||
using Disco.Services.Web;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Areas.API.Controllers
|
||||
@@ -16,7 +22,9 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
const string pName = "name";
|
||||
const string pShortName = "shortname";
|
||||
const string pDistributionType = "distributiontype";
|
||||
const string pCertificateProviderId = "certificateproviderid";
|
||||
const string pCertificateProviders = "certificateproviders";
|
||||
const string pCertificateAuthorityProviders = "certificateauthorityproviders";
|
||||
const string pWirelessProfileProviders = "wirelessprofileproviders";
|
||||
const string pOrganisationalUnit = "organisationalunit";
|
||||
const string pDefaultOrganisationAddress = "defaultorganisationaddress";
|
||||
const string pComputerNameTemplate = "computernametemplate";
|
||||
@@ -56,8 +64,14 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
case pDistributionType:
|
||||
UpdateDistributionType(deviceProfile, value);
|
||||
break;
|
||||
case pCertificateProviderId:
|
||||
UpdateCertificateProviderId(deviceProfile, value);
|
||||
case pCertificateProviders:
|
||||
UpdateCertificateProviders(deviceProfile, value);
|
||||
break;
|
||||
case pCertificateAuthorityProviders:
|
||||
UpdateCertificateAuthorityProviders(deviceProfile, value);
|
||||
break;
|
||||
case pWirelessProfileProviders:
|
||||
UpdateWirelessProfileProviders(deviceProfile, value);
|
||||
break;
|
||||
case pOrganisationalUnit:
|
||||
UpdateOrganisationalUnit(deviceProfile, value);
|
||||
@@ -139,9 +153,21 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.DeviceProfile.Configure)]
|
||||
public virtual ActionResult UpdateCertificateProviderId(int id, string CertificateProviderId = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateCertificateProviders(int id, string CertificateProviders = null, Nullable<bool> redirect = null)
|
||||
{
|
||||
return Update(id, pCertificateProviderId, CertificateProviderId, redirect);
|
||||
return Update(id, pCertificateProviders, CertificateProviders, redirect);
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.DeviceProfile.Configure)]
|
||||
public virtual ActionResult UpdateCertificateAuthorityProviders(int id, string CertificateAuthorityProviders = null, Nullable<bool> redirect = null)
|
||||
{
|
||||
return Update(id, pCertificateAuthorityProviders, CertificateAuthorityProviders, redirect);
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.DeviceProfile.Configure)]
|
||||
public virtual ActionResult UpdateWirelessProfileProviders(int id, string WirelessProfileProviders = null, Nullable<bool> redirect = null)
|
||||
{
|
||||
return Update(id, pWirelessProfileProviders, WirelessProfileProviders, redirect);
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.DeviceProfile.Configure)]
|
||||
@@ -298,21 +324,111 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
throw new Exception("Invalid Distribution Type Number");
|
||||
}
|
||||
|
||||
private void UpdateCertificateProviderId(Disco.Models.Repository.DeviceProfile deviceProfile, string CertificateProviderId)
|
||||
private void UpdateCertificateProviders(DeviceProfile deviceProfile, string CertificateProviderIds)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(CertificateProviderId))
|
||||
if (string.IsNullOrWhiteSpace(CertificateProviderIds))
|
||||
{
|
||||
deviceProfile.CertificateProviderId = null;
|
||||
deviceProfile.CertificateProviders = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Validate
|
||||
var featureManifest = Disco.Services.Plugins.Plugins.GetPluginFeature(CertificateProviderId, typeof(Disco.Services.Plugins.Features.CertificateProvider.CertificateProviderFeature));
|
||||
if (featureManifest == null)
|
||||
throw new Exception(string.Format("Invalid Certificate Provider Plugin Id: [{0}]", CertificateProviderId));
|
||||
var validatedProviders = new List<PluginFeatureManifest>();
|
||||
foreach (var certificateProviderId in CertificateProviderIds.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
|
||||
{
|
||||
var featureManifest = Plugins.GetPluginFeature(certificateProviderId, typeof(CertificateProviderFeature));
|
||||
if (featureManifest == null)
|
||||
{
|
||||
throw new Exception(string.Format("Invalid Certificate Provider Plugin Id: [{0}]", certificateProviderId));
|
||||
}
|
||||
else
|
||||
{
|
||||
validatedProviders.Add(featureManifest);
|
||||
}
|
||||
}
|
||||
|
||||
if (validatedProviders.Count > 0)
|
||||
{
|
||||
deviceProfile.CertificateProviders = string.Join(",", validatedProviders.Select(p => p.Id));
|
||||
}
|
||||
else
|
||||
deviceProfile.CertificateProviderId = featureManifest.Id;
|
||||
{
|
||||
deviceProfile.CertificateProviders = null;
|
||||
}
|
||||
}
|
||||
|
||||
Database.SaveChanges();
|
||||
}
|
||||
|
||||
private void UpdateCertificateAuthorityProviders(DeviceProfile deviceProfile, string CertificateAuthorityProviderIds)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(CertificateAuthorityProviderIds))
|
||||
{
|
||||
deviceProfile.CertificateAuthorityProviders = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Validate
|
||||
var validatedProviders = new List<PluginFeatureManifest>();
|
||||
foreach (var certificateAuthorityProviderId in CertificateAuthorityProviderIds.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
|
||||
{
|
||||
var featureManifest = Plugins.GetPluginFeature(certificateAuthorityProviderId, typeof(CertificateAuthorityProviderFeature));
|
||||
if (featureManifest == null)
|
||||
{
|
||||
throw new Exception(string.Format("Invalid Certificate Authority Provider Plugin Id: [{0}]", certificateAuthorityProviderId));
|
||||
}
|
||||
else
|
||||
{
|
||||
validatedProviders.Add(featureManifest);
|
||||
}
|
||||
}
|
||||
|
||||
if (validatedProviders.Count > 0)
|
||||
{
|
||||
deviceProfile.CertificateAuthorityProviders = string.Join(",", validatedProviders.Select(p => p.Id));
|
||||
}
|
||||
else
|
||||
{
|
||||
deviceProfile.CertificateAuthorityProviders = null;
|
||||
}
|
||||
}
|
||||
|
||||
Database.SaveChanges();
|
||||
}
|
||||
|
||||
private void UpdateWirelessProfileProviders(DeviceProfile deviceProfile, string WirelessProfileProviderIds)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(WirelessProfileProviderIds))
|
||||
{
|
||||
deviceProfile.WirelessProfileProviders = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Validate
|
||||
var validatedProviders = new List<PluginFeatureManifest>();
|
||||
foreach (var wirelessProfileProviderId in WirelessProfileProviderIds.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
|
||||
{
|
||||
var featureManifest = Plugins.GetPluginFeature(wirelessProfileProviderId, typeof(WirelessProfileProviderFeature));
|
||||
if (featureManifest == null)
|
||||
{
|
||||
throw new Exception(string.Format("Invalid Wireless Profile Provider Plugin Id: [{0}]", wirelessProfileProviderId));
|
||||
}
|
||||
else
|
||||
{
|
||||
validatedProviders.Add(featureManifest);
|
||||
}
|
||||
}
|
||||
|
||||
if (validatedProviders.Count > 0)
|
||||
{
|
||||
deviceProfile.WirelessProfileProviders = string.Join(",", validatedProviders.Select(p => p.Id));
|
||||
}
|
||||
else
|
||||
{
|
||||
deviceProfile.WirelessProfileProviders = null;
|
||||
}
|
||||
}
|
||||
|
||||
Database.SaveChanges();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
using Disco.BI;
|
||||
using Disco.BI.DocumentTemplateBI.ManagedGroups;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Documents;
|
||||
using Disco.Services.Documents.ManagedGroups;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Disco.Services.Tasks;
|
||||
using Disco.Services.Users;
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.Services.Documents;
|
||||
using Disco.Models.Services.Job;
|
||||
using Disco.Models.Services.Jobs.JobLists;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Interop;
|
||||
using Disco.Services.Jobs.JobLists;
|
||||
using Disco.Services.Jobs.Statistics;
|
||||
using Disco.Services.Users;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web.Extensions;
|
||||
@@ -528,7 +530,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
private void UpdateDeviceHeldLocation(Job job, string DeviceHeldLocation)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(DeviceHeldLocation) &&
|
||||
Database.DiscoConfiguration.JobPreferences.LocationMode == Disco.Models.BI.Job.LocationModes.RestrictedList)
|
||||
Database.DiscoConfiguration.JobPreferences.LocationMode == LocationModes.RestrictedList)
|
||||
{
|
||||
// Enforce Restricted List Mode
|
||||
var value = DeviceHeldLocation.Trim();
|
||||
@@ -2076,7 +2078,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
[DiscoAuthorize(Claims.Job.Show)]
|
||||
public virtual ActionResult StatisticsDailyOpenedClosed()
|
||||
{
|
||||
var result = BI.JobBI.Statistics.DailyOpenedClosed.Data(Database, true);
|
||||
var result = DailyOpenedClosed.Data(Database, true);
|
||||
|
||||
return Json(result, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
@@ -2123,12 +2125,12 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
switch (Database.DiscoConfiguration.JobPreferences.LocationMode)
|
||||
{
|
||||
case Disco.Models.BI.Job.LocationModes.Unrestricted:
|
||||
case LocationModes.Unrestricted:
|
||||
var jobDateThreshold = DateTime.Now.AddYears(-1);
|
||||
locations = Database.Jobs.Where(j => (j.OpenedDate > jobDateThreshold || !j.ClosedDate.HasValue) && j.DeviceHeldLocation != null).Select(j => j.DeviceHeldLocation).Distinct().OrderBy(l => l).ToList().Where(l => !string.IsNullOrWhiteSpace(l)).Select(l => l.Trim()).Distinct(StringComparer.OrdinalIgnoreCase).OrderBy(l => l).ToList();
|
||||
break;
|
||||
case Disco.Models.BI.Job.LocationModes.OptionalList:
|
||||
case Disco.Models.BI.Job.LocationModes.RestrictedList:
|
||||
case LocationModes.OptionalList:
|
||||
case LocationModes.RestrictedList:
|
||||
locations = Database.DiscoConfiguration.JobPreferences.LocationList;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
using Disco.Models.BI.Job;
|
||||
using Disco.Models.Services.Job;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Web;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Disco.Services.Jobs.JobQueues;
|
||||
using Disco.Services.Web;
|
||||
using Disco.BI.Extensions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
|
||||
namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Jobs.JobQueues;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Services.Web;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Data.Configuration;
|
||||
using Disco.Data.Configuration;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
@@ -29,40 +28,9 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
[DiscoAuthorize(Claims.DiscoAdminAccount)]
|
||||
public virtual ActionResult UpdateAttachmentThumbnails()
|
||||
{
|
||||
// Device Attachments
|
||||
var das = Database.DeviceAttachments.Where(da => da.MimeType == "application/pdf");
|
||||
foreach (var da in das)
|
||||
{
|
||||
var fileName = da.RepositoryThumbnailFilename(Database);
|
||||
if (!System.IO.File.Exists(fileName))
|
||||
{
|
||||
da.GenerateThumbnail(Database);
|
||||
}
|
||||
}
|
||||
|
||||
// User Attachments
|
||||
var uas = Database.UserAttachments.Where(ua => ua.MimeType == "application/pdf");
|
||||
foreach (var ua in uas)
|
||||
{
|
||||
var fileName = ua.RepositoryThumbnailFilename(Database);
|
||||
if (!System.IO.File.Exists(fileName))
|
||||
{
|
||||
ua.GenerateThumbnail(Database);
|
||||
}
|
||||
}
|
||||
|
||||
// Job Attachments
|
||||
var jas = Database.JobAttachments.Where(ja => ja.MimeType == "application/pdf");
|
||||
foreach (var ja in jas)
|
||||
{
|
||||
var fileName = ja.RepositoryThumbnailFilename(Database);
|
||||
if (!System.IO.File.Exists(fileName))
|
||||
{
|
||||
ja.GenerateThumbnail(Database);
|
||||
}
|
||||
}
|
||||
|
||||
return Content("Done", "text/text");
|
||||
var ts = Disco.Services.Documents.AttachmentImport.ThumbnailUpdateTask.ScheduleImmediately();
|
||||
ts.SetFinishedUrl(Url.Action(MVC.Config.SystemConfig.Index()));
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(ts.SessionId));
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.System.Show)]
|
||||
@@ -243,7 +211,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
try
|
||||
{
|
||||
var result = ActiveDirectory.Context.UpdateSearchAllForestServers(Database, SearchAllForestServers);
|
||||
|
||||
|
||||
Database.SaveChanges();
|
||||
|
||||
if (!result)
|
||||
@@ -269,11 +237,24 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.System.ConfigureActiveDirectory)]
|
||||
public virtual ActionResult UpdateActiveDirectorySearchWildcardSuffixOnly(bool SearchWildcardSuffixOnly, bool redirect = false)
|
||||
{
|
||||
ActiveDirectory.Context.UpdateWildcardSearchSuffixOnly(Database, SearchWildcardSuffixOnly);
|
||||
|
||||
Database.SaveChanges();
|
||||
|
||||
if (redirect)
|
||||
return RedirectToAction(MVC.Config.SystemConfig.Index());
|
||||
else
|
||||
return Json("OK", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
[DiscoAuthorizeAny(Claims.Config.System.ConfigureActiveDirectory, Claims.Config.DeviceProfile.Configure)]
|
||||
public virtual ActionResult DomainOrganisationalUnits()
|
||||
{
|
||||
var domainOUs = ActiveDirectory.RetrieveADOrganisationalUnitStructure()
|
||||
.Select(d => new Models.System.DomainOrganisationalUnitsModel() { Domain = d.Item1, OrganisationalUnits = d.Item2})
|
||||
.Select(d => new Models.System.DomainOrganisationalUnitsModel() { Domain = d.Item1, OrganisationalUnits = d.Item2 })
|
||||
.Select(ous => ous.ToFancyTreeNode()).ToList();
|
||||
|
||||
return new JsonResult()
|
||||
@@ -322,12 +303,12 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public virtual ActionResult SyncActiveDirectoryManagedGroup(string id, string redirectUrl = null)
|
||||
{
|
||||
ADManagedGroup managedGroup;
|
||||
|
||||
|
||||
if (!ActiveDirectory.Context.ManagedGroups.TryGetValue(id, out managedGroup))
|
||||
throw new ArgumentException("Unknown Managed Group Key");
|
||||
|
||||
var taskStatus = ADManagedGroupsSyncTask.ScheduleSync(managedGroup);
|
||||
|
||||
|
||||
if (redirectUrl != null)
|
||||
taskStatus.SetFinishedUrl(redirectUrl);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Users.UserFlags;
|
||||
using Disco.Services.Web;
|
||||
@@ -13,7 +13,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
const string pComments = "comments";
|
||||
|
||||
public virtual ActionResult Update(int id, string key, string value = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult Update(int id, string key, string value = null, bool? redirect = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -53,7 +53,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
#region Update Shortcut Methods
|
||||
[DiscoAuthorizeAny(Claims.User.Actions.EditFlags)]
|
||||
public virtual ActionResult UpdateComments(int id, string Comments = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateComments(int id, string Comments = null, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pComments, Comments, redirect);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.UI.Config.DeviceBatch;
|
||||
using Disco.Models.UI.Config.DeviceBatch;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Devices;
|
||||
using Disco.Services.Devices.ManagedGroups;
|
||||
using Disco.Services.Plugins.Features.UIExtension;
|
||||
using Disco.Services.Web;
|
||||
@@ -79,7 +80,7 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
// Default Batch
|
||||
var m = new Models.DeviceBatch.CreateModel()
|
||||
{
|
||||
DeviceBatch = BI.DeviceBI.BatchUtilities.DefaultNewDeviceBatch(Database)
|
||||
DeviceBatch = DeviceBatches.DefaultNewDeviceBatch(Database)
|
||||
};
|
||||
|
||||
// UI Extensions
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.UI.Config.DeviceModel;
|
||||
using Disco.Models.UI.Config.DeviceModel;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Plugins;
|
||||
using Disco.Services.Plugins.Features.RepairProvider;
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.UI.Config.DeviceProfile;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Devices.ManagedGroups;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Disco.Services.Plugins;
|
||||
using Disco.Services.Plugins.Features.CertificateAuthorityProvider;
|
||||
using Disco.Services.Plugins.Features.CertificateProvider;
|
||||
using Disco.Services.Plugins.Features.UIExtension;
|
||||
using Disco.Services.Plugins.Features.WirelessProfileProvider;
|
||||
using Disco.Services.Web;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -45,6 +47,8 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
m.DevicesLinkedGroup = devicesManagedGroup;
|
||||
|
||||
m.CertificateProviders = Plugins.GetPluginFeatures(typeof(CertificateProviderFeature));
|
||||
m.CertificateAuthorityProviders = Plugins.GetPluginFeatures(typeof(CertificateAuthorityProviderFeature));
|
||||
m.WirelessProfileProviders = Plugins.GetPluginFeatures(typeof(WirelessProfileProviderFeature));
|
||||
|
||||
var DistributionValues = Enum.GetValues(typeof(Disco.Models.Repository.DeviceProfile.DistributionTypes));
|
||||
m.DeviceProfileDistributionTypes = new List<SelectListItem>();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using Disco.BI.DocumentTemplateBI.ManagedGroups;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.UI.Config.DocumentTemplate;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Documents.ManagedGroups;
|
||||
using Disco.Services.Expressions;
|
||||
using Disco.Services.Plugins.Features.UIExtension;
|
||||
using Disco.Services.Web;
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using Disco.Data.Repository;
|
||||
using Disco.Models.UI.Config.DeviceProfile;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Disco.Data.Repository;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.UI.Config.DeviceProfile;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||
{
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||
}
|
||||
|
||||
public List<PluginFeatureManifest> CertificateProviders { get; set; }
|
||||
public List<PluginFeatureManifest> CertificateAuthorityProviders { get; set; }
|
||||
public List<PluginFeatureManifest> WirelessProfileProviders { get; set; }
|
||||
|
||||
public int DeviceCount { get; set; }
|
||||
public int DeviceDecommissionedCount { get; set; }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Disco.BI.DocumentTemplateBI.ManagedGroups;
|
||||
using Disco.Data.Repository;
|
||||
using Disco.Data.Repository;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.UI.Config.DocumentTemplate;
|
||||
using Disco.Services.Documents.ManagedGroups;
|
||||
using Disco.Services.Expressions;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Disco.BI;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.UI.Config.DocumentTemplate;
|
||||
using Disco.Web.Extensions;
|
||||
using Disco.Models.UI.Config.DocumentTemplate;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Disco.Data.Repository;
|
||||
using Disco.Models.BI.Job;
|
||||
using Disco.Models.Services.Job;
|
||||
using Disco.Models.UI.Config.JobPreferences;
|
||||
using Disco.Services.Extensions;
|
||||
using System;
|
||||
|
||||
@@ -84,6 +84,8 @@ namespace Disco.Web.Areas.Config.Models.SystemConfig
|
||||
public ADSite ADSite { get; set; }
|
||||
public List<ADDomainController> ADServers { get; set; }
|
||||
public List<Tuple<string, ADDomain, string>> ADSearchContainers { get; set; }
|
||||
[Display(Name = "Search With Suffix Wildcard Only")]
|
||||
public bool ADSearchWildcardSuffixOnly { get; set; }
|
||||
public List<string> ADForestServers { get; set; }
|
||||
|
||||
#endregion
|
||||
@@ -126,6 +128,7 @@ namespace Disco.Web.Areas.Config.Models.SystemConfig
|
||||
m.ADPrimaryDomain = ActiveDirectory.Context.PrimaryDomain;
|
||||
m.ADSite = ActiveDirectory.Context.Site;
|
||||
m.ADServers = ActiveDirectory.Context.Domains.SelectMany(d => d.DomainControllers).ToList();
|
||||
m.ADSearchWildcardSuffixOnly = config.ActiveDirectory.SearchWildcardSuffixOnly;
|
||||
var configSearchContainers = config.ActiveDirectory.SearchContainers;
|
||||
m.ADSearchContainers = configSearchContainers == null ? null : configSearchContainers.SelectMany(d => d.Value, (k, c) =>
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
@model Disco.Web.Areas.Config.Models.DocumentTemplate.ShowModel
|
||||
@using Disco.BI.DocumentTemplateBI.ManagedGroups;
|
||||
@using Disco.Services.Documents.ManagedGroups;
|
||||
@using Disco.Services.Interop.ActiveDirectory;
|
||||
@using Disco.Web.Areas.Config.Models.Shared;
|
||||
@{
|
||||
|
||||
@@ -27,17 +27,16 @@ namespace Disco.Web.Areas.Config.Views.DocumentTemplate
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
using Disco.BI.DocumentTemplateBI.ManagedGroups;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
using Disco.Services.Documents.ManagedGroups;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 3 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
|
||||
@@ -112,14 +111,14 @@ WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"Config_DocumentTemplates_Show\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2027), Tuple.Create("\"", 2081)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2024), Tuple.Create("\"", 2078)
|
||||
|
||||
#line 46 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2035), Tuple.Create<System.Object, System.Int32>(hideAdvanced ? "Config_HideAdvanced" : null
|
||||
, Tuple.Create(Tuple.Create("", 2032), Tuple.Create<System.Object, System.Int32>(hideAdvanced ? "Config_HideAdvanced" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2035), false)
|
||||
, 2032), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
@@ -461,23 +460,23 @@ WriteLiteral("></i>This template is generated from ");
|
||||
#line hidden
|
||||
WriteLiteral("s. Any expressions within the Template PDF will be evaluated within the <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 7002), Tuple.Create("\"", 7108)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 6999), Tuple.Create("\"", 7105)
|
||||
|
||||
#line 143 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 7009), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser())
|
||||
, Tuple.Create(Tuple.Create("", 7006), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser())
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 7009), false)
|
||||
, Tuple.Create(Tuple.Create("", 7071), Tuple.Create("#", 7071), true)
|
||||
, 7006), false)
|
||||
, Tuple.Create(Tuple.Create("", 7068), Tuple.Create("#", 7068), true)
|
||||
|
||||
#line 143 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 7072), Tuple.Create<System.Object, System.Int32>(Model.DocumentTemplate.Scope
|
||||
, Tuple.Create(Tuple.Create("", 7069), Tuple.Create<System.Object, System.Int32>(Model.DocumentTemplate.Scope
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 7072), false)
|
||||
, Tuple.Create(Tuple.Create("", 7103), Tuple.Create("Scope", 7103), true)
|
||||
, 7069), false)
|
||||
, Tuple.Create(Tuple.Create("", 7100), Tuple.Create("Scope", 7100), true)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -568,24 +567,24 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <option");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 8220), Tuple.Create("\"", 8234)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 8217), Tuple.Create("\"", 8231)
|
||||
|
||||
#line 159 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 8228), Tuple.Create<System.Object, System.Int32>(scope
|
||||
, Tuple.Create(Tuple.Create("", 8225), Tuple.Create<System.Object, System.Int32>(scope
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 8228), false)
|
||||
, 8225), false)
|
||||
);
|
||||
|
||||
WriteAttribute("selected", Tuple.Create(" selected=\"", 8235), Tuple.Create("\"", 8306)
|
||||
WriteAttribute("selected", Tuple.Create(" selected=\"", 8232), Tuple.Create("\"", 8303)
|
||||
|
||||
#line 159 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 8246), Tuple.Create<System.Object, System.Int32>(scope == Model.DocumentTemplate.Scope ? "selected" : null
|
||||
, Tuple.Create(Tuple.Create("", 8243), Tuple.Create<System.Object, System.Int32>(scope == Model.DocumentTemplate.Scope ? "selected" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 8246), false)
|
||||
, 8243), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -923,29 +922,29 @@ WriteLiteral(" class=\"jobTypes\"");
|
||||
WriteLiteral(">\r\n <h4>\r\n " +
|
||||
" <input");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 14951), Tuple.Create("\"", 14970)
|
||||
, Tuple.Create(Tuple.Create("", 14956), Tuple.Create("Types_", 14956), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 14948), Tuple.Create("\"", 14967)
|
||||
, Tuple.Create(Tuple.Create("", 14953), Tuple.Create("Types_", 14953), true)
|
||||
|
||||
#line 257 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 14962), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
, Tuple.Create(Tuple.Create("", 14959), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 14962), false)
|
||||
, 14959), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"jobType\"");
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 15003), Tuple.Create("\"", 15019)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 15000), Tuple.Create("\"", 15016)
|
||||
|
||||
#line 257 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 15011), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
, Tuple.Create(Tuple.Create("", 15008), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 15011), false)
|
||||
, 15008), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
@@ -959,15 +958,15 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 15090), Tuple.Create("\"", 15110)
|
||||
, Tuple.Create(Tuple.Create("", 15096), Tuple.Create("Types_", 15096), true)
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 15087), Tuple.Create("\"", 15107)
|
||||
, Tuple.Create(Tuple.Create("", 15093), Tuple.Create("Types_", 15093), true)
|
||||
|
||||
#line 257 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 15102), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
, Tuple.Create(Tuple.Create("", 15099), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 15102), false)
|
||||
, 15099), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -982,15 +981,15 @@ WriteLiteral(">");
|
||||
WriteLiteral("</label>\r\n </h4>\r\n " +
|
||||
" <div");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 15252), Tuple.Create("\"", 15274)
|
||||
, Tuple.Create(Tuple.Create("", 15257), Tuple.Create("SubTypes_", 15257), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 15249), Tuple.Create("\"", 15271)
|
||||
, Tuple.Create(Tuple.Create("", 15254), Tuple.Create("SubTypes_", 15254), true)
|
||||
|
||||
#line 259 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 15266), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
, Tuple.Create(Tuple.Create("", 15263), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 15266), false)
|
||||
, 15263), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"jobSubTypes\"");
|
||||
@@ -1111,14 +1110,14 @@ WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" style=\"margin: 8px 5px;\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 20216), Tuple.Create("\"", 20302)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 20213), Tuple.Create("\"", 20299)
|
||||
|
||||
#line 345 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 20222), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DocumentTemplate.TemplatePreview(Model.DocumentTemplate.Id))
|
||||
, Tuple.Create(Tuple.Create("", 20219), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DocumentTemplate.TemplatePreview(Model.DocumentTemplate.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 20222), false)
|
||||
, 20219), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </div>\r\n </td>\r\n <" +
|
||||
@@ -2081,16 +2080,16 @@ WriteLiteral(" id=\"dialogBulkGenerate\"");
|
||||
|
||||
WriteLiteral(" class=\"hiddenDialog\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 40430), Tuple.Create("\"", 40481)
|
||||
, Tuple.Create(Tuple.Create("", 40438), Tuple.Create("Bulk", 40438), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 40442), Tuple.Create("Generate:", 40443), true)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 40427), Tuple.Create("\"", 40478)
|
||||
, Tuple.Create(Tuple.Create("", 40435), Tuple.Create("Bulk", 40435), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 40439), Tuple.Create("Generate:", 40440), true)
|
||||
|
||||
#line 722 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 40452), Tuple.Create<System.Object, System.Int32>(Model.DocumentTemplate.Id
|
||||
, Tuple.Create(Tuple.Create(" ", 40449), Tuple.Create<System.Object, System.Int32>(Model.DocumentTemplate.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 40453), false)
|
||||
, 40450), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
IsLive = true,
|
||||
TakeFilter = 100,
|
||||
StartFilter = DateTime.Today.AddDays(-1),
|
||||
ModuleFilter = Disco.BI.DeviceBI.EnrolmentLog.Current,
|
||||
ModuleFilter = Disco.Services.Devices.Enrolment.EnrolmentLog.Current,
|
||||
ViewPortHeight = 250
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34014
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -27,7 +27,6 @@ namespace Disco.Web.Areas.Config.Views.Enrolment
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
@@ -423,7 +422,7 @@ Write(Html.Partial(MVC.Config.Shared.Views.LogEvents, new Disco.Web.Areas.Config
|
||||
IsLive = true,
|
||||
TakeFilter = 100,
|
||||
StartFilter = DateTime.Today.AddDays(-1),
|
||||
ModuleFilter = Disco.BI.DeviceBI.EnrolmentLog.Current,
|
||||
ModuleFilter = Disco.Services.Devices.Enrolment.EnrolmentLog.Current,
|
||||
ViewPortHeight = 250
|
||||
}));
|
||||
|
||||
|
||||
@@ -326,7 +326,7 @@
|
||||
logHub = $.connection.logNotifications;
|
||||
logHub.client.receiveLog = parseLog
|
||||
|
||||
$.connection.hub.qs = { LogModules: '@(Disco.BI.DeviceBI.EnrolmentLog.Current.LiveLogGroupName)' };
|
||||
$.connection.hub.qs = { LogModules: '@(Disco.Services.Devices.Enrolment.EnrolmentLog.Current.LiveLogGroupName)' };
|
||||
$.connection.hub.error(onHubFailed);
|
||||
|
||||
$.connection.hub.start()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34014
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -27,7 +27,6 @@ namespace Disco.Web.Areas.Config.Views.Enrolment
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
@@ -514,7 +513,7 @@ WriteLiteral(@"',
|
||||
|
||||
|
||||
#line 329 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
|
||||
Write(Disco.BI.DeviceBI.EnrolmentLog.Current.LiveLogGroupName);
|
||||
Write(Disco.Services.Devices.Enrolment.EnrolmentLog.Current.LiveLogGroupName);
|
||||
|
||||
|
||||
#line default
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
<div class="form" style="width: 450px">
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width: 135px">Disco Version:
|
||||
<th style="width: 135px">
|
||||
Disco Version:
|
||||
</th>
|
||||
<td>
|
||||
<div>
|
||||
@@ -29,7 +30,8 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">Database Connection:
|
||||
<th style="width: 135px">
|
||||
Database Connection:
|
||||
</th>
|
||||
<td>
|
||||
<table class="sub">
|
||||
@@ -46,18 +48,19 @@
|
||||
<td>@Model.DatabaseAuthentication</td>
|
||||
</tr>
|
||||
@{if (Model.DatabaseSqlAuthUsername != null)
|
||||
{
|
||||
<tr>
|
||||
<th>SQL User:</th>
|
||||
<td><span class="code">@Model.DatabaseSqlAuthUsername</span></td>
|
||||
</tr>
|
||||
}
|
||||
{
|
||||
<tr>
|
||||
<th>SQL User:</th>
|
||||
<td><span class="code">@Model.DatabaseSqlAuthUsername</span></td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">Data Store Location:
|
||||
<th style="width: 135px">
|
||||
Data Store Location:
|
||||
</th>
|
||||
<td>
|
||||
<span class="code">@Model.DataStoreLocation</span>
|
||||
@@ -71,49 +74,53 @@
|
||||
@{
|
||||
if (Model.UpdateLatestResponse == null)
|
||||
{
|
||||
<tr>
|
||||
<th style="width: 135px">Last Check:
|
||||
</th>
|
||||
<td>
|
||||
<div class="error"><i class="fa fa-exclamation-circle fa-lg"></i> Never</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">
|
||||
Last Check:
|
||||
</th>
|
||||
<td>
|
||||
<div class="error"><i class="fa fa-exclamation-circle fa-lg"></i> Never</div>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
else
|
||||
{
|
||||
<tr>
|
||||
<th style="width: 135px">Last Run:
|
||||
</th>
|
||||
<td>
|
||||
<span>@CommonHelpers.FriendlyDate(Model.UpdateLatestResponse.UpdateResponseDate.ToLocalTime())</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">
|
||||
Last Run:
|
||||
</th>
|
||||
<td>
|
||||
<span>@CommonHelpers.FriendlyDate(Model.UpdateLatestResponse.UpdateResponseDate.ToLocalTime())</span>
|
||||
</td>
|
||||
</tr>
|
||||
if (Model.UpdateAvailable)
|
||||
{
|
||||
<tr>
|
||||
<th style="width: 135px">Update Available:
|
||||
</th>
|
||||
<td>
|
||||
<div>
|
||||
<i class="fa fa-info-circle fa-lg information"></i> Version @(Model.UpdateLatestResponse.LatestVersion) is available
|
||||
</div>
|
||||
<div class="smallMessage">
|
||||
[Released @(CommonHelpers.FriendlyDate(Model.UpdateLatestResponse.ReleasedDate))]
|
||||
</div>
|
||||
<div class="smallMessage">@(new HtmlString(Model.UpdateLatestResponse.Description))</div>
|
||||
<a href="@(Model.UpdateLatestResponse.UrlLink)" target="_blank">Download Now</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">
|
||||
Update Available:
|
||||
</th>
|
||||
<td>
|
||||
<div>
|
||||
<i class="fa fa-info-circle fa-lg information"></i> Version @(Model.UpdateLatestResponse.LatestVersion) is available
|
||||
</div>
|
||||
<div class="smallMessage">
|
||||
[Released @(CommonHelpers.FriendlyDate(Model.UpdateLatestResponse.ReleasedDate))]
|
||||
</div>
|
||||
<div class="smallMessage">@(new HtmlString(Model.UpdateLatestResponse.Description))</div>
|
||||
<a href="@(Model.UpdateLatestResponse.UrlLink)" target="_blank">Download Now</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
else
|
||||
{
|
||||
<tr>
|
||||
<th style="width: 135px">Status:
|
||||
</th>
|
||||
<td>
|
||||
<i class="fa fa-check-square fa-lg success"></i> <span>The latest version is installed</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">
|
||||
Status:
|
||||
</th>
|
||||
<td>
|
||||
<i class="fa fa-check-square fa-lg success"></i> <span>The latest version is installed</span>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -123,13 +130,13 @@
|
||||
@{
|
||||
if (Model.UpdateRunningStatus == null)
|
||||
{
|
||||
<span>@Html.ActionLinkSmallButton("Check Now", MVC.API.System.UpdateCheck())</span>
|
||||
<span class="smallMessage">[Will run automatically <strong>@CommonHelpers.FriendlyDate(Model.UpdateNextScheduled, "Unknown")</strong>]</span>
|
||||
<span>@Html.ActionLinkSmallButton("Check Now", MVC.API.System.UpdateCheck())</span>
|
||||
<span class="smallMessage">[Will run automatically <strong>@CommonHelpers.FriendlyDate(Model.UpdateNextScheduled, "Unknown")</strong>]</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>@Html.ActionLink("View Status", MVC.Config.Logging.TaskStatus(Model.UpdateRunningStatus.SessionId))</span>
|
||||
<span class="smallMessage">[Running Now]</span>
|
||||
<span>@Html.ActionLink("View Status", MVC.Config.Logging.TaskStatus(Model.UpdateRunningStatus.SessionId))</span>
|
||||
<span class="smallMessage">[Running Now]</span>
|
||||
}
|
||||
}
|
||||
@if (Model.UpdateBetaDeployment)
|
||||
@@ -145,14 +152,16 @@
|
||||
<h2>Active Directory</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width: 135px">Primary Domain:
|
||||
<th style="width: 135px">
|
||||
Primary Domain:
|
||||
</th>
|
||||
<td>
|
||||
<code><strong>@Model.ADPrimaryDomain.Name</strong> <span>[@Model.ADPrimaryDomain.NetBiosName]</span></code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">Additional Domains:
|
||||
<th style="width: 135px">
|
||||
Additional Domains:
|
||||
</th>
|
||||
<td>
|
||||
@if (Model.ADDomains.Count > 1)
|
||||
@@ -162,10 +171,10 @@
|
||||
<code>@adDomainFirst.Name <span>[@adDomainFirst.NetBiosName]</span></code>
|
||||
foreach (var adDomain in adAdditionalDomains.Skip(1))
|
||||
{
|
||||
<hr />
|
||||
<div>
|
||||
<code>@adDomain.Name <span>[@adDomain.NetBiosName]</span></code>
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<code>@adDomain.Name <span>[@adDomain.NetBiosName]</span></code>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -175,14 +184,16 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">Site:
|
||||
<th style="width: 135px">
|
||||
Site:
|
||||
</th>
|
||||
<td>
|
||||
<code><strong>@Model.ADSite.Name</strong></code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">Servers:
|
||||
<th style="width: 135px">
|
||||
Servers:
|
||||
</th>
|
||||
<td>
|
||||
<div>
|
||||
@@ -229,7 +240,8 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">Forest:
|
||||
<th style="width: 135px">
|
||||
Forest:
|
||||
</th>
|
||||
<td>
|
||||
@if (Model.ADForestServers == null)
|
||||
@@ -249,60 +261,66 @@
|
||||
if (canConfigAD)
|
||||
{
|
||||
var canSearchEntireForest = (Model.ADForestServers.Count <= Disco.Services.Interop.ActiveDirectory.ActiveDirectory.MaxForestServerSearch);
|
||||
<div>
|
||||
@if (!canSearchEntireForest)
|
||||
{
|
||||
@Html.CheckBoxFor(m => m.ADSearchAllForestServers, new { disabled = "disabled" }) @Html.LabelFor(m => m.ADSearchAllForestServers)
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-exclamation-circle warning"></i>Disco will not search entire forests which consist of more than @(Disco.Services.Interop.ActiveDirectory.ActiveDirectory.MaxForestServerSearch) servers. Only servers within this site will be searched.
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.CheckBoxFor(m => m.ADSearchAllForestServers) @Html.LabelFor(m => m.ADSearchAllForestServers) @AjaxHelpers.AjaxLoader()
|
||||
<div class="smallMessage">
|
||||
If this setting is enabled, Disco will query all servers within the forest rather than only servers within this site.
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper($('#ADSearchAllForestServers'), null, '@(Url.Action(MVC.API.System.UpdateActiveDirectorySearchAllForestServers()))', 'SearchAllForestServers');
|
||||
});
|
||||
</script>
|
||||
}
|
||||
</div>
|
||||
<div>
|
||||
@if (!canSearchEntireForest)
|
||||
{
|
||||
@Html.CheckBoxFor(m => m.ADSearchAllForestServers, new { disabled = "disabled" }) @Html.LabelFor(m => m.ADSearchAllForestServers)
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-exclamation-circle warning"></i>Disco will not search entire forests which consist of more than @(Disco.Services.Interop.ActiveDirectory.ActiveDirectory.MaxForestServerSearch) servers. Only servers within this site will be searched.
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.CheckBoxFor(m => m.ADSearchAllForestServers) @Html.LabelFor(m => m.ADSearchAllForestServers) @AjaxHelpers.AjaxLoader()
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-info-circle"></i>If this setting is enabled, Disco will query all servers within the forest rather than only servers within this site.
|
||||
</p>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper($('#ADSearchAllForestServers'), null, '@(Url.Action(MVC.API.System.UpdateActiveDirectorySearchAllForestServers()))', 'SearchAllForestServers');
|
||||
});
|
||||
</script>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div>
|
||||
@Html.CheckBoxFor(m => m.ADSearchAllForestServers, new { disabled = "disabled" }) @Html.LabelFor(m => m.ADSearchAllForestServers)
|
||||
<div class="smallMessage">
|
||||
If this setting is enabled, Disco will search all servers within the forest rather than only servers within this site.
|
||||
<div>
|
||||
@Html.CheckBoxFor(m => m.ADSearchAllForestServers, new { disabled = "disabled" }) @Html.LabelFor(m => m.ADSearchAllForestServers)
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-info-circle"></i>If this setting is enabled, Disco will query all servers within the forest rather than only servers within this site.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div>
|
||||
<hr />
|
||||
<span>All Servers:</span>
|
||||
<ul id="Config_System_AD_ForestServers" class="none">
|
||||
@{
|
||||
var domainIndex = Model.ADDomains.ToDictionary(d => d.Name, StringComparer.OrdinalIgnoreCase);
|
||||
foreach (var server in Model.ADForestServers.OrderBy(s => s))
|
||||
{
|
||||
var isSiteServer = Model.ADServers.Any(s => s.IsSiteServer && s.Name.Equals(server, StringComparison.OrdinalIgnoreCase));
|
||||
var serverDescription = server;
|
||||
if (server.Contains('.'))
|
||||
{
|
||||
Disco.Services.Interop.ActiveDirectory.ADDomain serverDomain;
|
||||
if (domainIndex.TryGetValue(server.Substring(server.IndexOf('.') + 1), out serverDomain))
|
||||
{
|
||||
serverDescription = string.Format("{0} [{1}]", server.Substring(0, server.IndexOf('.')), serverDomain.NetBiosName);
|
||||
}
|
||||
}
|
||||
<li><code>@serverDescription</code>@if (isSiteServer)
|
||||
{ <i class="fa fa-building-o information fa-fw" title="Site Server"></i> }</li>
|
||||
}
|
||||
var domainIndex = Model.ADDomains.ToDictionary(d => d.Name, StringComparer.OrdinalIgnoreCase);
|
||||
foreach (var server in Model.ADForestServers.OrderBy(s => s))
|
||||
{
|
||||
var isSiteServer = Model.ADServers.Any(s => s.IsSiteServer && s.Name.Equals(server, StringComparison.OrdinalIgnoreCase));
|
||||
var serverDescription = server;
|
||||
if (server.Contains('.'))
|
||||
{
|
||||
Disco.Services.Interop.ActiveDirectory.ADDomain serverDomain;
|
||||
if (domainIndex.TryGetValue(server.Substring(server.IndexOf('.') + 1), out serverDomain))
|
||||
{
|
||||
serverDescription = string.Format("{0} [{1}]", server.Substring(0, server.IndexOf('.')), serverDomain.NetBiosName);
|
||||
}
|
||||
}
|
||||
<li>
|
||||
<code>@serverDescription</code>@if (isSiteServer)
|
||||
{ <i class="fa fa-building-o information fa-fw" title="Site Server"></i> }
|
||||
</li>
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
<script>
|
||||
@@ -328,11 +346,45 @@
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">
|
||||
Searching:
|
||||
</th>
|
||||
<td>
|
||||
@{
|
||||
object ADSearchWildcardSuffixOnlyAttributes = null;
|
||||
if (!canConfigAD)
|
||||
{
|
||||
ADSearchWildcardSuffixOnlyAttributes = new
|
||||
{
|
||||
disabled = "disabled"
|
||||
};
|
||||
}
|
||||
}
|
||||
@Html.CheckBoxFor(m => m.ADSearchWildcardSuffixOnly, ADSearchWildcardSuffixOnlyAttributes) @Html.LabelFor(m => m.ADSearchWildcardSuffixOnly) @AjaxHelpers.AjaxLoader()
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-info-circle"></i>If this setting is enabled, Disco will utilize Active Directory indexes to greatly improve search performance.
|
||||
If disabled, more results may be returned however performance will be reduced especially in large Active Directory domains.
|
||||
</p>
|
||||
</div>
|
||||
@if (canConfigAD)
|
||||
{
|
||||
<script>
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper($('#ADSearchWildcardSuffixOnly'), null, '@(Url.Action(MVC.API.System.UpdateActiveDirectorySearchWildcardSuffixOnly()))', 'SearchWildcardSuffixOnly');
|
||||
});
|
||||
</script>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">Search Scope:
|
||||
<th style="width: 135px">
|
||||
Search Scope:
|
||||
</th>
|
||||
<td>
|
||||
@if (Model.ADSearchContainers != null && Model.ADSearchContainers.Count > 0)
|
||||
@@ -347,8 +399,12 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<div>No restrictions are in effect.</div>
|
||||
<div class="smallMessage">When searching, the entire domain will be queried. This is suitable for most single-domain deployments.</div>
|
||||
<div>No Organisational Unit restrictions are in effect.</div>
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-info-circle"></i>When searching, the entire domain will be queried. This is suitable for most single-domain deployments.
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
@if (canConfigAD)
|
||||
{
|
||||
@@ -475,88 +531,96 @@
|
||||
</script>
|
||||
}
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@if (canConfigProxy)
|
||||
{
|
||||
using (Html.BeginForm(MVC.API.System.UpdateProxySettings()))
|
||||
{
|
||||
<div class="form" style="width: 450px; margin-top: 15px;">
|
||||
<h2>Proxy Settings</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width: 135px">Address:
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.ProxyAddress)<br />
|
||||
@Html.ValidationMessageFor(m => m.ProxyAddress)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">Port:
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.ProxyPort)<br />
|
||||
@Html.ValidationMessageFor(m => m.ProxyPort)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">Username:
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.ProxyUsername)<br />
|
||||
@Html.ValidationMessageFor(m => m.ProxyUsername)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">Password:
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.ProxyPassword)<br />
|
||||
@Html.ValidationMessageFor(m => m.ProxyPassword)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">
|
||||
</th>
|
||||
<td>
|
||||
<button id="Config_System_Proxy_Save" type="button" class="button small">Save Proxy Settings</button>@AjaxHelpers.AjaxLoader()
|
||||
<script>
|
||||
$(function () {
|
||||
var button = $('#Config_System_Proxy_Save');
|
||||
{
|
||||
<div class="form" style="width: 450px; margin-top: 15px;">
|
||||
<h2>Proxy Settings</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width: 135px">
|
||||
Address:
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.ProxyAddress)<br />
|
||||
@Html.ValidationMessageFor(m => m.ProxyAddress)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">
|
||||
Port:
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.ProxyPort)<br />
|
||||
@Html.ValidationMessageFor(m => m.ProxyPort)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">
|
||||
Username:
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.ProxyUsername)<br />
|
||||
@Html.ValidationMessageFor(m => m.ProxyUsername)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">
|
||||
Password:
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.ProxyPassword)<br />
|
||||
@Html.ValidationMessageFor(m => m.ProxyPassword)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">
|
||||
|
||||
</th>
|
||||
<td>
|
||||
<button id="Config_System_Proxy_Save" type="button" class="button small">Save Proxy Settings</button>@AjaxHelpers.AjaxLoader()
|
||||
<script>
|
||||
$(function () {
|
||||
var button = $('#Config_System_Proxy_Save');
|
||||
|
||||
button.click(function () {
|
||||
var url = '@(Url.Action(MVC.API.System.UpdateProxySettings()))';
|
||||
var data = {
|
||||
ProxyAddress: $('#ProxyAddress').val(),
|
||||
ProxyPort: $('#ProxyPort').val(),
|
||||
ProxyUsername: $('#ProxyUsername').val(),
|
||||
ProxyPassword: $('#ProxyPassword').val()
|
||||
}
|
||||
var ajaxLoading = button.next('.ajaxLoading').first().show();
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
url: url,
|
||||
data: data,
|
||||
success: function (response, result) {
|
||||
if (result != 'success' || response != 'OK') {
|
||||
alert('Unable to change property "' + UpdatePropertyName + '":\n' + response);
|
||||
ajaxLoading.hide();
|
||||
} else {
|
||||
ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
}
|
||||
button.click(function () {
|
||||
var url = '@(Url.Action(MVC.API.System.UpdateProxySettings()))';
|
||||
var data = {
|
||||
ProxyAddress: $('#ProxyAddress').val(),
|
||||
ProxyPort: $('#ProxyPort').val(),
|
||||
ProxyUsername: $('#ProxyUsername').val(),
|
||||
ProxyPassword: $('#ProxyPassword').val()
|
||||
}
|
||||
var ajaxLoading = button.next('.ajaxLoading').first().show();
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
url: url,
|
||||
data: data,
|
||||
success: function (response, result) {
|
||||
if (result != 'success' || response != 'OK') {
|
||||
alert('Unable to change property "' + UpdatePropertyName + '":\n' + response);
|
||||
ajaxLoading.hide();
|
||||
} else {
|
||||
ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -565,30 +629,35 @@ else
|
||||
<h2>Proxy Settings</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width: 135px">Address:
|
||||
<th style="width: 135px">
|
||||
Address:
|
||||
</th>
|
||||
<td>
|
||||
@Html.DisplayFor(m => m.ProxyAddress)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">Port:
|
||||
<th style="width: 135px">
|
||||
Port:
|
||||
</th>
|
||||
<td>
|
||||
@Html.DisplayFor(m => m.ProxyPort)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">Username:
|
||||
<th style="width: 135px">
|
||||
Username:
|
||||
</th>
|
||||
<td>
|
||||
@Html.DisplayFor(m => m.ProxyUsername)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 135px">Password:
|
||||
<th style="width: 135px">
|
||||
Password:
|
||||
</th>
|
||||
<td>********
|
||||
<td>
|
||||
********
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,6 @@
|
||||
<pages pageBaseType="Disco.Services.Web.WebViewPage">
|
||||
<namespaces>
|
||||
<add namespace="Disco" />
|
||||
<add namespace="Disco.BI.Extensions" />
|
||||
<add namespace="Disco.Models.Repository" />
|
||||
<add namespace="Disco.Services" />
|
||||
<add namespace="Disco.Services.Authorization" />
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Disco.BI;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Data.Repository;
|
||||
using Disco.Data.Repository;
|
||||
using System;
|
||||
|
||||
namespace Disco.Web.Areas.Public.Models.UserHeldDevices
|
||||
{
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<pages pageBaseType="Disco.Services.Web.WebViewPage">
|
||||
<namespaces>
|
||||
<add namespace="Disco.BI.Extensions" />
|
||||
<add namespace="Disco.Models.Repository" />
|
||||
<add namespace="Disco.Services" />
|
||||
<add namespace="Disco.Services.Authorization" />
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Data.Repository;
|
||||
using Disco.Data.Repository;
|
||||
using Disco.Models.ClientServices;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Devices.Enrolment;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Web;
|
||||
using System.IO;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Script.Serialization;
|
||||
|
||||
namespace Disco.Web.Areas.Services.Controllers
|
||||
{
|
||||
@@ -34,8 +34,31 @@ namespace Disco.Web.Areas.Services.Controllers
|
||||
{
|
||||
case "enrol":
|
||||
{
|
||||
JavaScriptSerializer serializer = new JavaScriptSerializer();
|
||||
Enrol enrolRequest = serializer.Deserialize<Enrol>(base.Request.InputStream.StreamToString());
|
||||
// Ensure supported version
|
||||
if (Request.UserAgent.StartsWith(@"Disco-Client/", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
Version clientVersion;
|
||||
if (Version.TryParse(Request.UserAgent.Substring(13), out clientVersion))
|
||||
{
|
||||
if (clientVersion < new Version(2, 2))
|
||||
{
|
||||
return new HttpStatusCodeResult(400, "Disco Client not compatible");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var serializer = new JsonSerializer();
|
||||
Enrol enrolRequest;
|
||||
|
||||
Request.InputStream.Position = 0;
|
||||
using (var streamReader = new StreamReader(Request.InputStream))
|
||||
{
|
||||
using (var jsonReader = new JsonTextReader(streamReader))
|
||||
{
|
||||
enrolRequest = serializer.Deserialize<Enrol>(jsonReader);
|
||||
}
|
||||
}
|
||||
|
||||
EnrolResponse enrolResponse = enrolRequest.BuildResponse();
|
||||
return Json(enrolResponse);
|
||||
}
|
||||
@@ -58,18 +81,11 @@ namespace Disco.Web.Areas.Services.Controllers
|
||||
using (var database = new DiscoDataContext())
|
||||
{
|
||||
var host = HttpContext.Request.UserHostAddress;
|
||||
MacSecureEnrolResponse enrolResponse = BI.DeviceBI.DeviceEnrol.MacSecureEnrol(database, host);
|
||||
MacSecureEnrolResponse enrolResponse = DeviceEnrolment.MacSecureEnrol(database, host);
|
||||
database.SaveChanges();
|
||||
return Json(enrolResponse, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
case "register":
|
||||
{
|
||||
Register registerRequest = new Register();
|
||||
this.UpdateModel(registerRequest);
|
||||
RegisterResponse registerResponse = registerRequest.BuildResponse();
|
||||
return Json(registerResponse);
|
||||
}
|
||||
}
|
||||
throw new MissingMethodException(string.Format("Unknown Feature: {0}", feature));
|
||||
}
|
||||
@@ -91,18 +107,34 @@ namespace Disco.Web.Areas.Services.Controllers
|
||||
}
|
||||
case "enrol":
|
||||
{
|
||||
JavaScriptSerializer serializer = new JavaScriptSerializer();
|
||||
Enrol enrolRequest = serializer.Deserialize<Enrol>(base.Request.InputStream.StreamToString());
|
||||
// Ensure supported version
|
||||
if (Request.UserAgent.StartsWith(@"Disco-Client/", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
Version clientVersion;
|
||||
if (Version.TryParse(Request.UserAgent.Substring(13), out clientVersion))
|
||||
{
|
||||
if (clientVersion < new Version(2, 2))
|
||||
{
|
||||
return new HttpStatusCodeResult(400, "Disco Client not compatible");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var serializer = new JsonSerializer();
|
||||
Enrol enrolRequest;
|
||||
|
||||
Request.InputStream.Position = 0;
|
||||
using (var streamReader = new StreamReader(Request.InputStream))
|
||||
{
|
||||
using (var jsonReader = new JsonTextReader(streamReader))
|
||||
{
|
||||
enrolRequest = serializer.Deserialize<Enrol>(jsonReader);
|
||||
}
|
||||
}
|
||||
|
||||
EnrolResponse enrolResponse = enrolRequest.BuildResponse();
|
||||
return Json(enrolResponse);
|
||||
}
|
||||
case "register":
|
||||
{
|
||||
Register registerRequest = new Register();
|
||||
this.UpdateModel(registerRequest);
|
||||
RegisterResponse registerResponse = registerRequest.BuildResponse();
|
||||
return Json(registerResponse);
|
||||
}
|
||||
}
|
||||
throw new MissingMethodException(string.Format("Unknown Feature: {0}", feature));
|
||||
}
|
||||
@@ -133,9 +165,9 @@ namespace Disco.Web.Areas.Services.Controllers
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(SessionId))
|
||||
Disco.BI.DeviceBI.EnrolmentLog.LogClientError(clientIP, DeviceIdentifier, clientVersion, errorMessage, JsonException);
|
||||
EnrolmentLog.LogClientError(clientIP, DeviceIdentifier, clientVersion, errorMessage, JsonException);
|
||||
else
|
||||
Disco.BI.DeviceBI.EnrolmentLog.LogSessionClientError(SessionId, clientIP, DeviceIdentifier, clientVersion, errorMessage, JsonException);
|
||||
EnrolmentLog.LogSessionClientError(SessionId, clientIP, DeviceIdentifier, clientVersion, errorMessage, JsonException);
|
||||
|
||||
return Content("Error Message Logged");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.Services.Devices.Exporting;
|
||||
using Disco.Models.Services.Jobs.JobLists;
|
||||
using Disco.Models.UI.Device;
|
||||
@@ -247,9 +246,14 @@ namespace Disco.Web.Controllers
|
||||
|
||||
m.DeviceProfileDefaultOrganisationAddress = m.Device.DeviceProfile.DefaultOrganisationAddressDetails(Database);
|
||||
|
||||
PluginFeatureManifest deviceProfileCertificateProvider;
|
||||
if (Disco.Services.Plugins.Plugins.TryGetPluginFeature(m.Device.DeviceProfile.CertificateProviderId, out deviceProfileCertificateProvider))
|
||||
m.DeviceProfileCertificateProvider = deviceProfileCertificateProvider;
|
||||
if (m.Device.DeviceProfile.CertificateProviders != null)
|
||||
{
|
||||
m.DeviceProfileCertificateProviders = m.Device.DeviceProfile.GetCertificateProviders().ToList();
|
||||
}
|
||||
if (m.Device.DeviceProfile.WirelessProfileProviders != null)
|
||||
{
|
||||
m.DeviceProfileWirelessProfileProviders = m.Device.DeviceProfile.GetWirelessProfileProviders().ToList();
|
||||
}
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<DeviceShowModel>(this.ControllerContext, m);
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.BI.Job;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.Services.Job;
|
||||
using Disco.Models.Services.Jobs.JobLists;
|
||||
using Disco.Models.UI.Job;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Jobs;
|
||||
using Disco.Services.Jobs.JobLists;
|
||||
using Disco.Services.Jobs.JobQueues;
|
||||
using Disco.Services.Jobs.Statistics;
|
||||
using Disco.Services.Plugins.Features.RepairProvider;
|
||||
using Disco.Services.Plugins.Features.UIExtension;
|
||||
using Disco.Services.Plugins.Features.WarrantyProvider;
|
||||
@@ -41,7 +42,7 @@ namespace Disco.Web.Controllers
|
||||
m.StaleJobs.ShowDates = false;
|
||||
}
|
||||
if (Authorization.Has(Claims.Job.ShowDailyChart))
|
||||
m.DailyOpenedClosedStatistics = Disco.BI.JobBI.Statistics.DailyOpenedClosed.Data(Database, true);
|
||||
m.DailyOpenedClosedStatistics = DailyOpenedClosed.Data(Database, true);
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<JobIndexModel>(this.ControllerContext, m);
|
||||
@@ -404,7 +405,7 @@ namespace Disco.Web.Controllers
|
||||
&& m.QuickLog.HasValue && m.QuickLog.Value
|
||||
&& m.QuickLogTaskTimeMinutes.HasValue && m.QuickLogTaskTimeMinutes.Value > 0);
|
||||
|
||||
var j = BI.JobBI.Utilities.Create(Database, m.Device, m.User, m.GetJobType, m.GetJobSubTypes, currentUser, addAutoQueues);
|
||||
var j = Jobs.Create(Database, m.Device, m.User, m.GetJobType, m.GetJobSubTypes, currentUser, addAutoQueues);
|
||||
|
||||
if (m.DeviceHeld.Value)
|
||||
{
|
||||
|
||||
@@ -1,16 +1,5 @@
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using System.Threading;
|
||||
using Disco.Services.Plugins;
|
||||
using System.Web.Mvc;
|
||||
using Disco.Web.Models.InitialConfig;
|
||||
using Disco.Data.Repository;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.IO.Compression;
|
||||
using System.Management;
|
||||
using System.Web;
|
||||
using Disco.Services.Plugins;
|
||||
|
||||
namespace Disco.Web.Controllers
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Services.Jobs.JobLists;
|
||||
using Disco.Models.Services.Jobs.JobLists;
|
||||
using Disco.Models.UI.User;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
<RestorePackages>true</RestorePackages>
|
||||
<AssemblyVersion>2.2.16272.1003</AssemblyVersion>
|
||||
<UseGlobalApplicationHostFile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
||||
@@ -89,9 +89,21 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult UpdateCertificateProviderId()
|
||||
public virtual System.Web.Mvc.ActionResult UpdateCertificateProviders()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateCertificateProviderId);
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateCertificateProviders);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult UpdateCertificateAuthorityProviders()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateCertificateAuthorityProviders);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult UpdateWirelessProfileProviders()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateWirelessProfileProviders);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
@@ -192,7 +204,9 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public readonly string UpdateName = "UpdateName";
|
||||
public readonly string UpdateShortName = "UpdateShortName";
|
||||
public readonly string UpdateDistributionType = "UpdateDistributionType";
|
||||
public readonly string UpdateCertificateProviderId = "UpdateCertificateProviderId";
|
||||
public readonly string UpdateCertificateProviders = "UpdateCertificateProviders";
|
||||
public readonly string UpdateCertificateAuthorityProviders = "UpdateCertificateAuthorityProviders";
|
||||
public readonly string UpdateWirelessProfileProviders = "UpdateWirelessProfileProviders";
|
||||
public readonly string UpdateOrganisationalUnit = "UpdateOrganisationalUnit";
|
||||
public readonly string UpdateDefaultOrganisationAddress = "UpdateDefaultOrganisationAddress";
|
||||
public readonly string UpdateComputerNameTemplate = "UpdateComputerNameTemplate";
|
||||
@@ -216,7 +230,9 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public const string UpdateName = "UpdateName";
|
||||
public const string UpdateShortName = "UpdateShortName";
|
||||
public const string UpdateDistributionType = "UpdateDistributionType";
|
||||
public const string UpdateCertificateProviderId = "UpdateCertificateProviderId";
|
||||
public const string UpdateCertificateProviders = "UpdateCertificateProviders";
|
||||
public const string UpdateCertificateAuthorityProviders = "UpdateCertificateAuthorityProviders";
|
||||
public const string UpdateWirelessProfileProviders = "UpdateWirelessProfileProviders";
|
||||
public const string UpdateOrganisationalUnit = "UpdateOrganisationalUnit";
|
||||
public const string UpdateDefaultOrganisationAddress = "UpdateDefaultOrganisationAddress";
|
||||
public const string UpdateComputerNameTemplate = "UpdateComputerNameTemplate";
|
||||
@@ -284,14 +300,34 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public readonly string DistributionType = "DistributionType";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_UpdateCertificateProviderId s_params_UpdateCertificateProviderId = new ActionParamsClass_UpdateCertificateProviderId();
|
||||
static readonly ActionParamsClass_UpdateCertificateProviders s_params_UpdateCertificateProviders = new ActionParamsClass_UpdateCertificateProviders();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_UpdateCertificateProviderId UpdateCertificateProviderIdParams { get { return s_params_UpdateCertificateProviderId; } }
|
||||
public ActionParamsClass_UpdateCertificateProviders UpdateCertificateProvidersParams { get { return s_params_UpdateCertificateProviders; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_UpdateCertificateProviderId
|
||||
public class ActionParamsClass_UpdateCertificateProviders
|
||||
{
|
||||
public readonly string id = "id";
|
||||
public readonly string CertificateProviderId = "CertificateProviderId";
|
||||
public readonly string CertificateProviders = "CertificateProviders";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_UpdateCertificateAuthorityProviders s_params_UpdateCertificateAuthorityProviders = new ActionParamsClass_UpdateCertificateAuthorityProviders();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_UpdateCertificateAuthorityProviders UpdateCertificateAuthorityProvidersParams { get { return s_params_UpdateCertificateAuthorityProviders; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_UpdateCertificateAuthorityProviders
|
||||
{
|
||||
public readonly string id = "id";
|
||||
public readonly string CertificateAuthorityProviders = "CertificateAuthorityProviders";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_UpdateWirelessProfileProviders s_params_UpdateWirelessProfileProviders = new ActionParamsClass_UpdateWirelessProfileProviders();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_UpdateWirelessProfileProviders UpdateWirelessProfileProvidersParams { get { return s_params_UpdateWirelessProfileProviders; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_UpdateWirelessProfileProviders
|
||||
{
|
||||
public readonly string id = "id";
|
||||
public readonly string WirelessProfileProviders = "WirelessProfileProviders";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_UpdateOrganisationalUnit s_params_UpdateOrganisationalUnit = new ActionParamsClass_UpdateOrganisationalUnit();
|
||||
@@ -512,16 +548,44 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void UpdateCertificateProviderIdOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string CertificateProviderId, bool? redirect);
|
||||
partial void UpdateCertificateProvidersOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string CertificateProviders, bool? redirect);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult UpdateCertificateProviderId(int id, string CertificateProviderId, bool? redirect)
|
||||
public override System.Web.Mvc.ActionResult UpdateCertificateProviders(int id, string CertificateProviders, bool? redirect)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateCertificateProviderId);
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateCertificateProviders);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "CertificateProviderId", CertificateProviderId);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "CertificateProviders", CertificateProviders);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||
UpdateCertificateProviderIdOverride(callInfo, id, CertificateProviderId, redirect);
|
||||
UpdateCertificateProvidersOverride(callInfo, id, CertificateProviders, redirect);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void UpdateCertificateAuthorityProvidersOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string CertificateAuthorityProviders, bool? redirect);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult UpdateCertificateAuthorityProviders(int id, string CertificateAuthorityProviders, bool? redirect)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateCertificateAuthorityProviders);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "CertificateAuthorityProviders", CertificateAuthorityProviders);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||
UpdateCertificateAuthorityProvidersOverride(callInfo, id, CertificateAuthorityProviders, redirect);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void UpdateWirelessProfileProvidersOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, int id, string WirelessProfileProviders, bool? redirect);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult UpdateWirelessProfileProviders(int id, string WirelessProfileProviders, bool? redirect)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateWirelessProfileProviders);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "WirelessProfileProviders", WirelessProfileProviders);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||
UpdateWirelessProfileProvidersOverride(callInfo, id, WirelessProfileProviders, redirect);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -244,10 +244,10 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void UpdateLocationModeOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Models.BI.Job.LocationModes LocationMode, bool redirect);
|
||||
partial void UpdateLocationModeOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, Disco.Models.Services.Job.LocationModes LocationMode, bool redirect);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult UpdateLocationMode(Disco.Models.BI.Job.LocationModes LocationMode, bool redirect)
|
||||
public override System.Web.Mvc.ActionResult UpdateLocationMode(Disco.Models.Services.Job.LocationModes LocationMode, bool redirect)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateLocationMode);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "LocationMode", LocationMode);
|
||||
|
||||
@@ -95,6 +95,12 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult UpdateActiveDirectorySearchWildcardSuffixOnly()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateActiveDirectorySearchWildcardSuffixOnly);
|
||||
}
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult SearchSubjects()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.SearchSubjects);
|
||||
@@ -149,6 +155,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public readonly string UpdateMultiSiteMode = "UpdateMultiSiteMode";
|
||||
public readonly string UpdateActiveDirectorySearchScope = "UpdateActiveDirectorySearchScope";
|
||||
public readonly string UpdateActiveDirectorySearchAllForestServers = "UpdateActiveDirectorySearchAllForestServers";
|
||||
public readonly string UpdateActiveDirectorySearchWildcardSuffixOnly = "UpdateActiveDirectorySearchWildcardSuffixOnly";
|
||||
public readonly string DomainOrganisationalUnits = "DomainOrganisationalUnits";
|
||||
public readonly string SearchSubjects = "SearchSubjects";
|
||||
public readonly string SearchGroupSubjects = "SearchGroupSubjects";
|
||||
@@ -170,6 +177,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public const string UpdateMultiSiteMode = "UpdateMultiSiteMode";
|
||||
public const string UpdateActiveDirectorySearchScope = "UpdateActiveDirectorySearchScope";
|
||||
public const string UpdateActiveDirectorySearchAllForestServers = "UpdateActiveDirectorySearchAllForestServers";
|
||||
public const string UpdateActiveDirectorySearchWildcardSuffixOnly = "UpdateActiveDirectorySearchWildcardSuffixOnly";
|
||||
public const string DomainOrganisationalUnits = "DomainOrganisationalUnits";
|
||||
public const string SearchSubjects = "SearchSubjects";
|
||||
public const string SearchGroupSubjects = "SearchGroupSubjects";
|
||||
@@ -246,6 +254,15 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public readonly string SearchAllForestServers = "SearchAllForestServers";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_UpdateActiveDirectorySearchWildcardSuffixOnly s_params_UpdateActiveDirectorySearchWildcardSuffixOnly = new ActionParamsClass_UpdateActiveDirectorySearchWildcardSuffixOnly();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_UpdateActiveDirectorySearchWildcardSuffixOnly UpdateActiveDirectorySearchWildcardSuffixOnlyParams { get { return s_params_UpdateActiveDirectorySearchWildcardSuffixOnly; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_UpdateActiveDirectorySearchWildcardSuffixOnly
|
||||
{
|
||||
public readonly string SearchWildcardSuffixOnly = "SearchWildcardSuffixOnly";
|
||||
public readonly string redirect = "redirect";
|
||||
}
|
||||
static readonly ActionParamsClass_SearchSubjects s_params_SearchSubjects = new ActionParamsClass_SearchSubjects();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_SearchSubjects SearchSubjectsParams { get { return s_params_SearchSubjects; } }
|
||||
@@ -449,6 +466,19 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void UpdateActiveDirectorySearchWildcardSuffixOnlyOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, bool SearchWildcardSuffixOnly, bool redirect);
|
||||
|
||||
[NonAction]
|
||||
public override System.Web.Mvc.ActionResult UpdateActiveDirectorySearchWildcardSuffixOnly(bool SearchWildcardSuffixOnly, bool redirect)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateActiveDirectorySearchWildcardSuffixOnly);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "SearchWildcardSuffixOnly", SearchWildcardSuffixOnly);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
|
||||
UpdateActiveDirectorySearchWildcardSuffixOnlyOverride(callInfo, SearchWildcardSuffixOnly, redirect);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
partial void DomainOrganisationalUnitsOverride(T4MVC_System_Web_Mvc_ActionResult callInfo);
|
||||
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Disco.BI;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Services.Jobs.JobLists;
|
||||
using Disco.Models.UI.Device;
|
||||
using Disco.Web.Extensions;
|
||||
using Disco.Services.Plugins;
|
||||
using Disco.Models.Services.Jobs.JobLists;
|
||||
using Disco.Web.Extensions;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Models.Device
|
||||
{
|
||||
@@ -18,7 +13,8 @@ namespace Disco.Web.Models.Device
|
||||
|
||||
public List<Disco.Models.Repository.DeviceProfile> DeviceProfiles { get; set; }
|
||||
public Disco.Models.BI.Config.OrganisationAddress DeviceProfileDefaultOrganisationAddress { get; set; }
|
||||
public PluginFeatureManifest DeviceProfileCertificateProvider { get; set; }
|
||||
public List<PluginFeatureManifest> DeviceProfileCertificateProviders { get; set; }
|
||||
public List<PluginFeatureManifest> DeviceProfileWirelessProfileProviders { get; set; }
|
||||
|
||||
public List<Disco.Models.Repository.DeviceBatch> DeviceBatches { get; set; }
|
||||
public JobTableModel Jobs { get; set; }
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Data.Repository;
|
||||
using Disco.Data.Repository;
|
||||
using Disco.Models.UI.Job;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Disco.Web.Models.Job
|
||||
{
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Disco.Models.UI.Job;
|
||||
using Disco.Models.Services.Job.Statistics;
|
||||
using Disco.Models.Services.Jobs.JobLists;
|
||||
using Disco.Models.UI.Job;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Web.Models.Job
|
||||
{
|
||||
@@ -12,6 +10,6 @@ namespace Disco.Web.Models.Job
|
||||
public JobTableModel MyJobs { get; set; }
|
||||
public JobTableModel StaleJobs { get; set; }
|
||||
|
||||
public List<Disco.Models.BI.Job.Statistics.DailyOpenedClosedItem> DailyOpenedClosedStatistics { get; set; }
|
||||
public List<DailyOpenedClosedItem> DailyOpenedClosedStatistics { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using Disco.Models.BI.Job;
|
||||
using Disco.Models.Services.Job;
|
||||
using Disco.Models.Services.Jobs.JobLists;
|
||||
using Disco.Models.UI.Job;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("2.1.0.0")]
|
||||
[assembly: AssemblyFileVersion("2.1.0.0")]
|
||||
[assembly: AssemblyVersion("2.2.16272.1003")]
|
||||
[assembly: AssemblyFileVersion("2.2.16272.1003")]
|
||||
@@ -12,28 +12,32 @@
|
||||
<div id="Device_Show_Details_Asset">
|
||||
<table class="none verticalHeadings">
|
||||
<tr>
|
||||
<td><span title="Computer Name">Name:</span>
|
||||
<td>
|
||||
<span title="Computer Name">Name:</span>
|
||||
</td>
|
||||
<td>@if (string.IsNullOrWhiteSpace(Model.Device.ComputerName))
|
||||
<td>
|
||||
@if (string.IsNullOrWhiteSpace(Model.Device.ComputerName))
|
||||
{
|
||||
<span id="Device_Show_Details_Asset_NameUnknown" title="Computer Name" class="smallMessage"><Unknown/None></span>
|
||||
<span id="Device_Show_Details_Asset_NameUnknown" title="Computer Name" class="smallMessage"><Unknown/None></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h4 id="Device_Show_Details_Asset_Name" title="Computer Name">@Model.Device.ComputerName</h4>
|
||||
<h4 id="Device_Show_Details_Asset_Name" title="Computer Name">@Model.Device.ComputerName</h4>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span title="Domain Name">Domain:</span>
|
||||
<td>
|
||||
<span title="Domain Name">Domain:</span>
|
||||
</td>
|
||||
<td>@if (string.IsNullOrWhiteSpace(Model.Device.ComputerDomainName))
|
||||
<td>
|
||||
@if (string.IsNullOrWhiteSpace(Model.Device.ComputerDomainName))
|
||||
{
|
||||
<span id="Device_Show_Details_Asset_DomainUnknown" title="Computer Domain" class="smallMessage"><None></span>
|
||||
<span id="Device_Show_Details_Asset_DomainUnknown" title="Computer Domain" class="smallMessage"><None></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h4 id="Device_Show_Details_Asset_Domain" title="Computer Domain">@Model.Device.ComputerDomainName</h4>
|
||||
<h4 id="Device_Show_Details_Asset_Domain" title="Computer Domain">@Model.Device.ComputerDomainName</h4>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -65,7 +69,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
@if (Authorization.HasAny(Claims.Device.Properties.AssetNumber, Claims.Device.Properties.Location))
|
||||
{
|
||||
{
|
||||
<script>
|
||||
$(function () {
|
||||
@if (Authorization.Has(Claims.Device.Properties.AssetNumber))
|
||||
@@ -79,21 +83,24 @@
|
||||
<div id="Device_Show_Details_Dates" class="status">
|
||||
<table class="none verticalHeadings">
|
||||
<tr>
|
||||
<td>Created:
|
||||
<td>
|
||||
Created:
|
||||
</td>
|
||||
<td><span id="Device_Show_Details_Dates_Created">@CommonHelpers.FriendlyDate(Model.Device.CreatedDate)</span></td>
|
||||
</tr>
|
||||
@if (Model.Device.DecommissionedDate.HasValue)
|
||||
{
|
||||
<tr>
|
||||
<td>Decommissioned:
|
||||
<td>
|
||||
Decommissioned:
|
||||
</td>
|
||||
<td><span id="Device_Show_Details_Dates_Decommissioned">@CommonHelpers.FriendlyDate(Model.Device.DecommissionedDate)</span></td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
<tr>
|
||||
<td>Enrolled:
|
||||
<td>
|
||||
Enrolled:
|
||||
</td>
|
||||
<td>
|
||||
@if (Model.Device.EnrolledDate.HasValue)
|
||||
@@ -101,7 +108,7 @@
|
||||
<text>First: </text><span id="Device_Show_Details_Asset_Enrolled_First">@CommonHelpers.FriendlyDate(Model.Device.EnrolledDate)</span>
|
||||
if (Model.Device.LastEnrolDate.HasValue && Model.Device.EnrolledDate.Value != Model.Device.LastEnrolDate.Value)
|
||||
{
|
||||
<br /><text>Last: </text><span id="Device_Show_Details_Asset_Enrolled_Last">@CommonHelpers.FriendlyDate(Model.Device.LastEnrolDate)</span>
|
||||
<br /><text>Last: </text><span id="Device_Show_Details_Asset_Enrolled_Last">@CommonHelpers.FriendlyDate(Model.Device.LastEnrolDate)</span>
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -120,26 +127,29 @@
|
||||
<div id="Device_Show_Details_Status" class="status">
|
||||
<table class="none verticalHeadings">
|
||||
<tr>
|
||||
<td><span title="Last Network Logon Date">Last Seen:</span>
|
||||
<td>
|
||||
<span title="Last Network Logon Date">Last Seen:</span>
|
||||
</td>
|
||||
<td>@{
|
||||
string lastSeenClass = null;
|
||||
if (Model.Device.LastNetworkLogonDate.HasValue)
|
||||
{
|
||||
if (Model.Device.LastNetworkLogonDate.Value < DateTime.Now.AddDays(-30))
|
||||
<td>
|
||||
@{
|
||||
string lastSeenClass = null;
|
||||
if (Model.Device.LastNetworkLogonDate.HasValue)
|
||||
{
|
||||
lastSeenClass = "error";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Model.Device.LastNetworkLogonDate.Value < DateTime.Now.AddDays(-7))
|
||||
if (Model.Device.LastNetworkLogonDate.Value < DateTime.Now.AddDays(-30))
|
||||
{
|
||||
lastSeenClass = "alert";
|
||||
lastSeenClass = "error";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Model.Device.LastNetworkLogonDate.Value < DateTime.Now.AddDays(-7))
|
||||
{
|
||||
lastSeenClass = "alert";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
<span id="Device_Show_Details_Status_LastSeen" class="@lastSeenClass">@CommonHelpers.FriendlyDate(Model.Device.LastNetworkLogonDate)</span></td>
|
||||
<span id="Device_Show_Details_Status_LastSeen" class="@lastSeenClass">@CommonHelpers.FriendlyDate(Model.Device.LastNetworkLogonDate)</span>
|
||||
</td>
|
||||
@if (!string.IsNullOrEmpty(Model.Device.ComputerName))
|
||||
{
|
||||
<script type="text/javascript">
|
||||
@@ -183,7 +193,8 @@
|
||||
}
|
||||
<table class="none verticalHeadings">
|
||||
<tr>
|
||||
<td>Assignment:
|
||||
<td>
|
||||
Assignment:
|
||||
</td>
|
||||
<td>
|
||||
@if (assignedUser != null)
|
||||
@@ -204,11 +215,11 @@
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(assignedUser.PhoneNumber))
|
||||
{
|
||||
<div id="Device_Show_User_PhoneNumber" title="Phone Number">@assignedUser.PhoneNumber</div>
|
||||
<div id="Device_Show_User_PhoneNumber" title="Phone Number">@assignedUser.PhoneNumber</div>
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(assignedUser.EmailAddress))
|
||||
{
|
||||
<div id="Device_Show_User_EmailAddress" title="Email Address"><a href="mailto:@(Model.Device.AssignedUser.EmailAddress)">@assignedUser.EmailAddress</a></div>
|
||||
<div id="Device_Show_User_EmailAddress" title="Email Address"><a href="mailto:@(Model.Device.AssignedUser.EmailAddress)">@assignedUser.EmailAddress</a></div>
|
||||
}
|
||||
}
|
||||
@if (Authorization.Has(Claims.User.ShowFlagAssignments))
|
||||
@@ -216,8 +227,12 @@
|
||||
<div id="Device_Show_User_Flags">
|
||||
@foreach (var flag in assignedUser.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
|
||||
{
|
||||
<i class="flag fa fa-@(flag.Item2.Icon) fa-fw d-@(flag.Item2.IconColour)"><span class="details"><span class="name">@flag.Item2.Name</span>@if (flag.Item1.Comments != null)
|
||||
{<span class="comments">@flag.Item1.Comments.ToHtmlComment()</span>}<span class="added">@CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId)</span></span></i>
|
||||
<i class="flag fa fa-@(flag.Item2.Icon) fa-fw d-@(flag.Item2.IconColour)">
|
||||
<span class="details">
|
||||
<span class="name">@flag.Item2.Name</span>@if (flag.Item1.Comments != null)
|
||||
{<span class="comments">@flag.Item1.Comments.ToHtmlComment()</span>}<span class="added">@CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId)</span>
|
||||
</span>
|
||||
</i>
|
||||
}
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
@@ -305,46 +320,63 @@
|
||||
<td id="Device_Show_Policies" rowspan="2">
|
||||
<div>
|
||||
<div id="Device_Show_Policies_Profile">
|
||||
<h2 title="Device Profile">@if (Authorization.Has(Claims.Config.DeviceProfile.Show))
|
||||
{
|
||||
@Html.ActionLink(Model.Device.DeviceProfile.Name, MVC.Config.DeviceProfile.Index(Model.Device.DeviceProfileId))
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Device.DeviceProfile.Name
|
||||
}</h2>
|
||||
<h2 title="Device Profile">
|
||||
@if (Authorization.Has(Claims.Config.DeviceProfile.Show))
|
||||
{
|
||||
@Html.ActionLink(Model.Device.DeviceProfile.Name, MVC.Config.DeviceProfile.Index(Model.Device.DeviceProfileId))
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Device.DeviceProfile.Name
|
||||
}
|
||||
</h2>
|
||||
<table class="none verticalHeadings">
|
||||
<tr>
|
||||
<td><span title="Distribution Type">Distribution:</span>
|
||||
<td>
|
||||
<span title="Distribution Type">Distribution:</span>
|
||||
</td>
|
||||
<td>@Model.Device.DeviceProfile.DistributionType.ToString()
|
||||
<td>
|
||||
@Model.Device.DeviceProfile.DistributionType.ToString()
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span title="Address">Address:</span>
|
||||
<td>
|
||||
<span title="Address">Address:</span>
|
||||
</td>
|
||||
<td>@{
|
||||
if (Model.DeviceProfileDefaultOrganisationAddress != null)
|
||||
{
|
||||
<span id="Device_Show_Policies_Profile_Address">@Model.DeviceProfileDefaultOrganisationAddress.Name</span>
|
||||
<td>
|
||||
@{
|
||||
if (Model.DeviceProfileDefaultOrganisationAddress != null)
|
||||
{
|
||||
<span id="Device_Show_Policies_Profile_Address">@Model.DeviceProfileDefaultOrganisationAddress.Name</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span id="Device_Show_Policies_Profile_Address_None" class="smallMessage">None</span>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<span id="Device_Show_Policies_Profile_Address_None" class="smallMessage">None</span>
|
||||
}
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span title="Provision Active Directory Account">Provision Account:</span>
|
||||
<td>
|
||||
<span title="Provision Active Directory Account">Provision Account:</span>
|
||||
</td>
|
||||
<td>@(Model.Device.DeviceProfile.ProvisionADAccount ? "Active Directory" : "No")
|
||||
<td>
|
||||
@(Model.Device.DeviceProfile.ProvisionADAccount ? "Active Directory" : "No")
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span title="Allocate Certificates">Allocate Certificate:</span>
|
||||
<td>
|
||||
<span title="Provisioned Personal Certificates">Certificates:</span>
|
||||
</td>
|
||||
<td>@(Model.DeviceProfileCertificateProvider != null ? Model.DeviceProfileCertificateProvider.Name : "No")
|
||||
<td>
|
||||
@(Model.DeviceProfileCertificateProviders != null ? string.Join(", ", Model.DeviceProfileCertificateProviders.Select(c => c.Name)) : "None Provisioned")
|
||||
</td>
|
||||
<tr>
|
||||
<td>
|
||||
<span title="Provisioned Wireless Profiles">Wireless Profiles:</span>
|
||||
</td>
|
||||
<td>
|
||||
@(Model.DeviceProfileWirelessProfileProviders != null ? string.Join(", ", Model.DeviceProfileWirelessProfileProviders.Select(c => c.Name)) : "None Provisioned")
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -356,9 +388,10 @@
|
||||
<div>
|
||||
<ul class="none">
|
||||
@foreach (var dp in Model.DeviceProfiles.OrderBy(i => i.Name))
|
||||
{
|
||||
{
|
||||
<li>
|
||||
<input type="radio" data-deviceprofileid="@dp.Id" name="DeviceProfile" id="DeviceProfile_@(dp.Id)" /><label for="DeviceProfile_@(dp.Id)" title="Distribution: @(dp.DistributionType)">@dp.Name</label></li>
|
||||
<input type="radio" data-deviceprofileid="@dp.Id" name="DeviceProfile" id="DeviceProfile_@(dp.Id)" /><label for="DeviceProfile_@(dp.Id)" title="Distribution: @(dp.DistributionType)">@dp.Name</label>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
@@ -420,43 +453,55 @@
|
||||
<div id="Device_Show_Policies_Batch" class="status">
|
||||
@if (Model.Device.DeviceBatchId.HasValue)
|
||||
{
|
||||
<h2 title="Device Batch">@if (Authorization.Has(Claims.Config.DeviceBatch.Show))
|
||||
{
|
||||
@Html.ActionLink(Model.Device.DeviceBatch.Name, MVC.Config.DeviceBatch.Index(Model.Device.DeviceBatchId.Value))
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Device.DeviceBatch.Name
|
||||
}</h2>
|
||||
<h2 title="Device Batch">
|
||||
@if (Authorization.Has(Claims.Config.DeviceBatch.Show))
|
||||
{
|
||||
@Html.ActionLink(Model.Device.DeviceBatch.Name, MVC.Config.DeviceBatch.Index(Model.Device.DeviceBatchId.Value))
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Device.DeviceBatch.Name
|
||||
}
|
||||
</h2>
|
||||
<table class="none verticalHeadings">
|
||||
<tr>
|
||||
<td><span title="Purchased Date">Purchased:</span>
|
||||
<td>
|
||||
<span title="Purchased Date">Purchased:</span>
|
||||
</td>
|
||||
<td>@CommonHelpers.FriendlyDate(Model.Device.DeviceBatch.PurchaseDate)
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(Model.Device.DeviceBatch.PurchaseDate)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span title="Supplier">Supplier:</span>
|
||||
<td>
|
||||
<span title="Supplier">Supplier:</span>
|
||||
</td>
|
||||
<td>@(Model.Device.DeviceBatch.Supplier ?? "Unknown")
|
||||
<td>
|
||||
@(Model.Device.DeviceBatch.Supplier ?? "Unknown")
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span title="Warranty Valid Until">Warranty Until:</span>
|
||||
<td>
|
||||
<span title="Warranty Valid Until">Warranty Until:</span>
|
||||
</td>
|
||||
<td class="@(Model.Device.DeviceBatch.WarrantyValidUntil.HasValue && Model.Device.DeviceBatch.WarrantyValidUntil.Value < DateTime.Now ? "alert" : null)">@CommonHelpers.FriendlyDate(Model.Device.DeviceBatch.WarrantyValidUntil, "Unknown", null)
|
||||
<td class="@(Model.Device.DeviceBatch.WarrantyValidUntil.HasValue && Model.Device.DeviceBatch.WarrantyValidUntil.Value < DateTime.Now ? "alert" : null)">
|
||||
@CommonHelpers.FriendlyDate(Model.Device.DeviceBatch.WarrantyValidUntil, "Unknown", null)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span title="Insurance Supplier">Insurance Supplier:</span>
|
||||
<td>
|
||||
<span title="Insurance Supplier">Insurance Supplier:</span>
|
||||
</td>
|
||||
<td>@(Model.Device.DeviceBatch.InsuranceSupplier ?? "Unknown")
|
||||
<td>
|
||||
@(Model.Device.DeviceBatch.InsuranceSupplier ?? "Unknown")
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span title="Insured Until">Insured Until:</span>
|
||||
<td>
|
||||
<span title="Insured Until">Insured Until:</span>
|
||||
</td>
|
||||
<td class="@(Model.Device.DeviceBatch.InsuredUntil.HasValue && Model.Device.DeviceBatch.InsuredUntil.Value < DateTime.Now ? "alert" : null)">@CommonHelpers.FriendlyDate(Model.Device.DeviceBatch.InsuredUntil, "Unknown", null)
|
||||
<td class="@(Model.Device.DeviceBatch.InsuredUntil.HasValue && Model.Device.DeviceBatch.InsuredUntil.Value < DateTime.Now ? "alert" : null)">
|
||||
@CommonHelpers.FriendlyDate(Model.Device.DeviceBatch.InsuredUntil, "Unknown", null)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -475,7 +520,8 @@
|
||||
@foreach (var db in Model.DeviceBatches.OrderBy(i => i.Name))
|
||||
{
|
||||
<li>
|
||||
<input type="radio" data-devicebatchid="@db.Id" name="DeviceBatch" id="DeviceBatch_@(db.Id)" /><label for="DeviceBatch_@(db.Id)" title="Purchased: @(db.PurchaseDate.ToLongDateString())">@db.Name</label></li>
|
||||
<input type="radio" data-devicebatchid="@db.Id" name="DeviceBatch" id="DeviceBatch_@(db.Id)" /><label for="DeviceBatch_@(db.Id)" title="Purchased: @(db.PurchaseDate.ToLongDateString())">@db.Name</label>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
@@ -541,14 +587,16 @@
|
||||
<td id="Device_Show_Aspects" rowspan="2">
|
||||
<div>
|
||||
<div id="Device_Show_Aspects_Model" class="clearfix">
|
||||
<h2 id="Device_Show_Aspects_Model_Description" title="Model Description">@if (Authorization.Has(Claims.Config.DeviceModel.Show))
|
||||
{
|
||||
@Html.ActionLink(Model.Device.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(Model.Device.DeviceModelId))
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Device.DeviceModel.ToString()
|
||||
}</h2>
|
||||
<h2 id="Device_Show_Aspects_Model_Description" title="Model Description">
|
||||
@if (Authorization.Has(Claims.Config.DeviceModel.Show))
|
||||
{
|
||||
@Html.ActionLink(Model.Device.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(Model.Device.DeviceModelId))
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Device.DeviceModel.ToString()
|
||||
}
|
||||
</h2>
|
||||
<img id="Device_Show_Aspects_Model_Image" alt="Model Image" src="@Url.Action(MVC.API.DeviceModel.Image(Model.Device.DeviceModelId, Model.Device.DeviceModel.ImageHash()))" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -579,7 +627,7 @@
|
||||
var inputUserId = null;
|
||||
|
||||
var dialogButtons = {
|
||||
@{
|
||||
@{
|
||||
if (assignedUser != null)
|
||||
{
|
||||
<text>
|
||||
@@ -591,7 +639,7 @@
|
||||
inputUserId.val('');
|
||||
inputUserId.closest('form').submit()
|
||||
},
|
||||
</text>
|
||||
</text>
|
||||
}
|
||||
}
|
||||
"Assign": function () {
|
||||
@@ -644,7 +692,7 @@
|
||||
|
||||
});
|
||||
</script>
|
||||
}
|
||||
}
|
||||
@if (Model.Device.CanUpdateTrustEnrol())
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Trust Enrol", MVC.API.Device.UpdateAllowUnauthenticatedEnrol(Model.Device.SerialNumber, true.ToString(), true), "Device_Show_Device_Actions_TrustEnrol_Button")
|
||||
@@ -742,7 +790,7 @@
|
||||
</script>
|
||||
}
|
||||
@if (Model.Device.CanDecommission())
|
||||
{
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Decommission", MVC.API.Device.Decommission(), "Device_Show_Device_Actions_Decommission_Button")
|
||||
<div id="Device_Show_Device_Actions_Decommission_Dialog" class="dialog" title="Device Decommissioning">
|
||||
<div class="clearfix" style="margin-bottom: 10px;">
|
||||
@@ -754,7 +802,7 @@
|
||||
{
|
||||
<li>
|
||||
<input type="radio" id="Device_Show_Device_Actions_Decommission_Reason_@((int)decommissionReason)"
|
||||
name="Device_Show_Device_Actions_Decommission_Reason" value="@((int)decommissionReason)" @((decommissionReason == DecommissionReasons.EndOfLife) ? "checked=\"checked\"" : string.Empty)/>
|
||||
name="Device_Show_Device_Actions_Decommission_Reason" value="@((int)decommissionReason)" @((decommissionReason == DecommissionReasons.EndOfLife) ? "checked=\"checked\"" : string.Empty) />
|
||||
<label for="Device_Show_Device_Actions_Decommission_Reason_@((int)decommissionReason)">@(decommissionReason.ReasonMessage())</label>
|
||||
</li>
|
||||
}
|
||||
@@ -803,7 +851,7 @@
|
||||
</script>
|
||||
}
|
||||
@if (Model.Device.CanRecommission())
|
||||
{
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Recommission", MVC.API.Device.Recommission(Model.Device.SerialNumber, true), "Device_Show_Device_Actions_Recommission_Button")
|
||||
<div id="Device_Show_Device_Actions_Recommission_Dialog" title="Recommission this Device?">
|
||||
<p>
|
||||
@@ -841,7 +889,7 @@
|
||||
</script>
|
||||
}
|
||||
@if (Model.Device.CanDelete())
|
||||
{
|
||||
{
|
||||
@Html.ActionLinkSmallButton("Delete Device", MVC.API.Device.Delete(Model.Device.SerialNumber, true), "Device_Show_Device_Actions_Delete_Button")
|
||||
<div id="Device_Show_Device_Actions_Delete_Dialog" title="Delete this Device?">
|
||||
<p>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,5 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
@using Disco.Models.Services.Job;
|
||||
@using Disco.Services.Users.UserFlags;
|
||||
@{
|
||||
Authorization.Require(Claims.Job.Show);
|
||||
@@ -293,11 +294,11 @@
|
||||
{
|
||||
switch (Model.LocationMode)
|
||||
{
|
||||
case Disco.Models.BI.Job.LocationModes.Unrestricted:
|
||||
case Disco.Models.BI.Job.LocationModes.OptionalList:
|
||||
case LocationModes.Unrestricted:
|
||||
case LocationModes.OptionalList:
|
||||
@Html.TextBoxFor(m => m.Job.DeviceHeldLocation, new { @class = "small discreet" })
|
||||
break;
|
||||
case Disco.Models.BI.Job.LocationModes.RestrictedList:
|
||||
case LocationModes.RestrictedList:
|
||||
List<SelectListItem> listOptions = new List<SelectListItem>() { new SelectListItem() { Value = "", Text = "<Unknown>" } };
|
||||
if (!string.IsNullOrWhiteSpace(Model.Job.DeviceHeldLocation) && !Model.LocationOptions.Any(l => l.Location.Equals(Model.Job.DeviceHeldLocation)))
|
||||
{
|
||||
@@ -345,8 +346,8 @@
|
||||
$(function () {
|
||||
@switch (Model.LocationMode)
|
||||
{
|
||||
case Disco.Models.BI.Job.LocationModes.Unrestricted:
|
||||
case Disco.Models.BI.Job.LocationModes.OptionalList:
|
||||
case LocationModes.Unrestricted:
|
||||
case LocationModes.OptionalList:
|
||||
<text>
|
||||
var $deviceHeldLocation = $('#Job_DeviceHeldLocation');
|
||||
var $ajaxSave = $deviceHeldLocation.next('.ajaxSave');
|
||||
@@ -430,7 +431,7 @@
|
||||
});
|
||||
</text>
|
||||
break;
|
||||
case Disco.Models.BI.Job.LocationModes.RestrictedList:
|
||||
case LocationModes.RestrictedList:
|
||||
<text>
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_DeviceHeldLocation'),
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -138,7 +138,7 @@
|
||||
@RenderBody()
|
||||
</section>
|
||||
<footer>
|
||||
Disco v@(Disco.Web.DiscoApplication.Version) @@ @(Disco.Web.DiscoApplication.OrganisationName) | <a
|
||||
Disco ICT v@(Disco.Web.DiscoApplication.Version) @@ @(Disco.Web.DiscoApplication.OrganisationName) | <a
|
||||
href="https://discoict.com.au/" target="_blank">discoict.com.au</a> | @Html.ActionLink("Credits", MVC.Public.Public.Credits()) | @Html.ActionLink("Licence", MVC.Public.Public.Licence())
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
@@ -27,7 +27,6 @@ namespace Disco.Web.Views.Shared
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
@@ -956,11 +955,11 @@ WriteLiteral(" ");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </section>\r\n <footer>\r\n Disco v");
|
||||
WriteLiteral("\r\n </section>\r\n <footer>\r\n Disco ICT v");
|
||||
|
||||
|
||||
#line 141 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Disco.Web.DiscoApplication.Version);
|
||||
Write(Disco.Web.DiscoApplication.Version);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -971,7 +970,7 @@ WriteLiteral("@ ");
|
||||
|
||||
|
||||
#line 141 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Disco.Web.DiscoApplication.OrganisationName);
|
||||
Write(Disco.Web.DiscoApplication.OrganisationName);
|
||||
|
||||
|
||||
#line default
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
@RenderBody()
|
||||
</section>
|
||||
<footer>
|
||||
Disco v@(Disco.Web.DiscoApplication.Version) @if (!isMaintenanceMode)
|
||||
Disco ICT v@(Disco.Web.DiscoApplication.Version) @if (!isMaintenanceMode)
|
||||
{<text>@@ @(Disco.Web.DiscoApplication.OrganisationName) | @Html.ActionLink("Credits", MVC.Public.Public.Credits()) | @Html.ActionLink("Licence", MVC.Public.Public.Licence())</text>}
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34014
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -27,7 +27,6 @@ namespace Disco.Web.Views.Shared
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
@@ -37,9 +36,9 @@ namespace Disco.Web.Views.Shared
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Shared/_PublicLayout.cshtml")]
|
||||
public partial class PublicLayout : Disco.Services.Web.WebViewPage<dynamic>
|
||||
public partial class _PublicLayout : Disco.Services.Web.WebViewPage<dynamic>
|
||||
{
|
||||
public PublicLayout()
|
||||
public _PublicLayout()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
@@ -256,11 +255,11 @@ WriteLiteral(" ");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </section>\r\n <footer>\r\n Disco v");
|
||||
WriteLiteral("\r\n </section>\r\n <footer>\r\n Disco ICT v");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
Write(Disco.Web.DiscoApplication.Version);
|
||||
Write(Disco.Web.DiscoApplication.Version);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -269,7 +268,7 @@ WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\Shared\_PublicLayout.cshtml"
|
||||
if (!isMaintenanceMode)
|
||||
if (!isMaintenanceMode)
|
||||
{
|
||||
|
||||
#line default
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
<pages pageBaseType="Disco.Services.Web.WebViewPage">
|
||||
<namespaces>
|
||||
<add namespace="Disco" />
|
||||
<add namespace="Disco.BI.Extensions" />
|
||||
<add namespace="Disco.Models.Repository" />
|
||||
<add namespace="Disco.Services" />
|
||||
<add namespace="Disco.Services.Authorization" />
|
||||
|
||||
Reference in New Issue
Block a user