GIT: perform LF normalization

This commit is contained in:
Gary Sharp
2013-02-28 17:15:46 +11:00
parent 989f08a24d
commit 7d9be5620d
729 changed files with 300734 additions and 300712 deletions
@@ -1,26 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Disco.Web.Areas.Config.Controllers
{
public partial class ConfigController : dbAdminController
{
//
// GET: /Config/Config/
public virtual ActionResult Index()
{
var m = new Models.Config.IndexModel()
{
UpdateResponse = dbContext.DiscoConfiguration.UpdateLastCheck
};
return View(m);
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Disco.Web.Areas.Config.Controllers
{
public partial class ConfigController : dbAdminController
{
//
// GET: /Config/Config/
public virtual ActionResult Index()
{
var m = new Models.Config.IndexModel()
{
UpdateResponse = dbContext.DiscoConfiguration.UpdateLastCheck
};
return View(m);
}
}
}
@@ -1,79 +1,79 @@
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.Web.Extensions;
namespace Disco.Web.Areas.Config.Controllers
{
public partial class DeviceBatchController : dbAdminController
{
public virtual ActionResult Index(int? id)
{
dbContext.Configuration.LazyLoadingEnabled = true;
if (id.HasValue)
{
var m = new Models.DeviceBatch.ShowModel()
{
DeviceBatch = dbContext.DeviceBatches.Find(id)
};
if (m.DeviceBatch == null)
{
return RedirectToAction(MVC.Config.DeviceBatch.Index(null));
}
m.CanDelete = m.DeviceBatch.CanDelete(dbContext);
m.DeviceCount = m.DeviceBatch.Devices.Count();
m.DeviceDecommissionedCount = m.DeviceBatch.Devices.Count(d => d.DecommissionedDate.HasValue);
m.DeviceModels = dbContext.DeviceModels.ToSelectListItems();
return View(MVC.Config.DeviceBatch.Views.Show, m);
}
else
{
return View(Models.DeviceBatch.IndexModel.Build(dbContext));
}
}
public virtual ActionResult Create()
{
// Default Batch
var m = BI.DeviceBI.BatchUtilities.DefaultNewDeviceBatch(dbContext);
return View(m);
}
[HttpPost]
public virtual ActionResult Create(Disco.Models.Repository.DeviceBatch model)
{
if (ModelState.IsValid)
{
// Check for Existing
var existing = dbContext.DeviceBatches.Where(m => m.Name == model.Name).FirstOrDefault();
if (existing == null)
{
dbContext.DeviceBatches.Add(model);
dbContext.SaveChanges();
return RedirectToAction(MVC.Config.DeviceBatch.Index(model.Id));
}
else
{
ModelState.AddModelError("Name", "A Device Batch with this name already exists.");
}
}
return View(model);
}
public virtual ActionResult Timeline()
{
return View();
}
}
}
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.Web.Extensions;
namespace Disco.Web.Areas.Config.Controllers
{
public partial class DeviceBatchController : dbAdminController
{
public virtual ActionResult Index(int? id)
{
dbContext.Configuration.LazyLoadingEnabled = true;
if (id.HasValue)
{
var m = new Models.DeviceBatch.ShowModel()
{
DeviceBatch = dbContext.DeviceBatches.Find(id)
};
if (m.DeviceBatch == null)
{
return RedirectToAction(MVC.Config.DeviceBatch.Index(null));
}
m.CanDelete = m.DeviceBatch.CanDelete(dbContext);
m.DeviceCount = m.DeviceBatch.Devices.Count();
m.DeviceDecommissionedCount = m.DeviceBatch.Devices.Count(d => d.DecommissionedDate.HasValue);
m.DeviceModels = dbContext.DeviceModels.ToSelectListItems();
return View(MVC.Config.DeviceBatch.Views.Show, m);
}
else
{
return View(Models.DeviceBatch.IndexModel.Build(dbContext));
}
}
public virtual ActionResult Create()
{
// Default Batch
var m = BI.DeviceBI.BatchUtilities.DefaultNewDeviceBatch(dbContext);
return View(m);
}
[HttpPost]
public virtual ActionResult Create(Disco.Models.Repository.DeviceBatch model)
{
if (ModelState.IsValid)
{
// Check for Existing
var existing = dbContext.DeviceBatches.Where(m => m.Name == model.Name).FirstOrDefault();
if (existing == null)
{
dbContext.DeviceBatches.Add(model);
dbContext.SaveChanges();
return RedirectToAction(MVC.Config.DeviceBatch.Index(model.Id));
}
else
{
ModelState.AddModelError("Name", "A Device Batch with this name already exists.");
}
}
return View(model);
}
public virtual ActionResult Timeline()
{
return View();
}
}
}
@@ -1,57 +1,57 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Disco.Services.Plugins.Features.WarrantyProvider;
using Disco.Services.Plugins;
using Disco.BI.Extensions;
namespace Disco.Web.Areas.Config.Controllers
{
public partial class DeviceModelController : dbAdminController
{
public virtual ActionResult Index(int? id)
{
if (id.HasValue)
{
var m = new Models.DeviceModel.ShowModel()
{
DeviceModel = dbContext.DeviceModels.Include("DeviceComponents.JobSubTypes").Where(dm => dm.Id == id.Value).FirstOrDefault(),
WarrantyProviders = Plugins.GetPluginFeatures(typeof(WarrantyProviderFeature))
};
m.DeviceComponentsModel = new Models.DeviceModel.DeviceComponentsModel()
{
DeviceModelId = m.DeviceModel.Id,
DeviceComponents = m.DeviceModel.DeviceComponents.ToList(),
JobSubTypes = dbContext.JobSubTypes.Where(jst => jst.JobTypeId == Disco.Models.Repository.JobType.JobTypeIds.HNWar).ToList()
};
m.CanDelete = m.DeviceModel.CanDelete(dbContext);
//m.Devices = BI.DeviceBI.SelectDeviceSearchResultItem(dbContext.Devices.Where(d => d.DeviceModelId == m.DeviceModel.Id));
//m.Devices = dbContext.Devices.Include("DeviceModel").Include("DeviceProfile").Include("AssignedUser")
// .Where(d => d.DeviceModelId == m.DeviceModel.Id).ToList();
return View(MVC.Config.DeviceModel.Views.Show, m);
}
else
{
return View(Models.DeviceModel.IndexModel.Build(dbContext));
}
}
public virtual ActionResult GenericComponents()
{
var m = new Models.DeviceModel.DeviceComponentsModel()
{
DeviceComponents = dbContext.DeviceComponents.Include("JobSubTypes").Where(dc => !dc.DeviceModelId.HasValue).ToList(),
JobSubTypes = dbContext.JobSubTypes.Where(jst => jst.JobTypeId == Disco.Models.Repository.JobType.JobTypeIds.HNWar).ToList()
};
return View(m);
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Disco.Services.Plugins.Features.WarrantyProvider;
using Disco.Services.Plugins;
using Disco.BI.Extensions;
namespace Disco.Web.Areas.Config.Controllers
{
public partial class DeviceModelController : dbAdminController
{
public virtual ActionResult Index(int? id)
{
if (id.HasValue)
{
var m = new Models.DeviceModel.ShowModel()
{
DeviceModel = dbContext.DeviceModels.Include("DeviceComponents.JobSubTypes").Where(dm => dm.Id == id.Value).FirstOrDefault(),
WarrantyProviders = Plugins.GetPluginFeatures(typeof(WarrantyProviderFeature))
};
m.DeviceComponentsModel = new Models.DeviceModel.DeviceComponentsModel()
{
DeviceModelId = m.DeviceModel.Id,
DeviceComponents = m.DeviceModel.DeviceComponents.ToList(),
JobSubTypes = dbContext.JobSubTypes.Where(jst => jst.JobTypeId == Disco.Models.Repository.JobType.JobTypeIds.HNWar).ToList()
};
m.CanDelete = m.DeviceModel.CanDelete(dbContext);
//m.Devices = BI.DeviceBI.SelectDeviceSearchResultItem(dbContext.Devices.Where(d => d.DeviceModelId == m.DeviceModel.Id));
//m.Devices = dbContext.Devices.Include("DeviceModel").Include("DeviceProfile").Include("AssignedUser")
// .Where(d => d.DeviceModelId == m.DeviceModel.Id).ToList();
return View(MVC.Config.DeviceModel.Views.Show, m);
}
else
{
return View(Models.DeviceModel.IndexModel.Build(dbContext));
}
}
public virtual ActionResult GenericComponents()
{
var m = new Models.DeviceModel.DeviceComponentsModel()
{
DeviceComponents = dbContext.DeviceComponents.Include("JobSubTypes").Where(dc => !dc.DeviceModelId.HasValue).ToList(),
JobSubTypes = dbContext.JobSubTypes.Where(jst => jst.JobTypeId == Disco.Models.Repository.JobType.JobTypeIds.HNWar).ToList()
};
return View(m);
}
}
}
@@ -1,100 +1,100 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Disco.Data.Configuration;
using Disco.BI;
using Disco.BI.Extensions;
using Disco.Services.Plugins.Features.CertificateProvider;
using Disco.Services.Plugins;
namespace Disco.Web.Areas.Config.Controllers
{
public partial class DeviceProfileController : dbAdminController
{
public virtual ActionResult Index(int? id)
{
if (id.HasValue)
{
var m = new Models.DeviceProfile.ShowModel()
{
DeviceProfile = dbContext.DeviceProfiles.Find(id.Value),
OrganisationAddresses = dbContext.DiscoConfiguration.OrganisationAddresses.Addresses,
CertificateProviders = Plugins.GetPluginFeatures(typeof(CertificateProviderFeature))
};
//m.Devices = BI.DeviceBI.SelectDeviceSearchResultItem(dbContext.Devices.Where(d => d.DeviceProfileId == m.DeviceProfile.Id));
var DistributionValues = Enum.GetValues(typeof(Disco.Models.Repository.DeviceProfile.DistributionTypes));
m.DeviceProfileDistributionTypes = new List<SelectListItem>();
foreach (int value in DistributionValues)
{
m.DeviceProfileDistributionTypes.Add(new SelectListItem()
{
Value = value.ToString(),
Text = Enum.GetName(typeof(Disco.Models.Repository.DeviceProfile.DistributionTypes), value),
Selected = ((int)m.DeviceProfile.DistributionType == value)
});
}
m.CanDelete = m.DeviceProfile.CanDelete(dbContext);
// Removed 2012-06-14 G# - Properties moved to DeviceProfile model & DB Migrated in DBv3.
//var config = m.DeviceProfile.Configuration(dbContext);
//m.AllocateWirelessCertificate = m.DeviceProfile.AllocateWirelessCertificate;
//m.OrganisationalUnit = m.DeviceProfile.OrganisationalUnit;
//m.ComputerNameTemplate = m.DeviceProfile.ComputerNameTemplate;
return View(MVC.Config.DeviceProfile.Views.Show, m);
}
else
{
return View(Models.DeviceProfile.IndexModel.Build(dbContext));
}
}
public virtual ActionResult Create()
{
return View();
}
[HttpPost]
public virtual ActionResult Create(Disco.Models.Repository.DeviceProfile model)
{
if (ModelState.IsValid)
{
// Check for Existing
var existing = dbContext.DeviceProfiles.Where(m => m.Name == model.Name).FirstOrDefault();
if (existing == null)
{
model.ProvisionADAccount = true;
dbContext.DeviceProfiles.Add(model);
dbContext.SaveChanges();
return RedirectToAction(MVC.Config.DeviceProfile.Index(model.Id));
}
else
{
ModelState.AddModelError("Name", "A Device Profile with this name already exists.");
}
}
return View(model);
}
public virtual ActionResult Defaults()
{
var m = new Models.DeviceProfile.DefaultsModel()
{
DeviceProfiles = dbContext.DeviceProfiles.ToList(),
Default = dbContext.DiscoConfiguration.DeviceProfiles.DefaultDeviceProfileId,
DefaultAddDeviceOffline = dbContext.DiscoConfiguration.DeviceProfiles.DefaultAddDeviceOfflineDeviceProfileId
};
m.DeviceProfilesAndNone = m.DeviceProfiles.ToList();
m.DeviceProfilesAndNone.Insert(0, new Disco.Models.Repository.DeviceProfile() { Id = 0, Name = "<No Default>" });
return View(m);
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Disco.Data.Configuration;
using Disco.BI;
using Disco.BI.Extensions;
using Disco.Services.Plugins.Features.CertificateProvider;
using Disco.Services.Plugins;
namespace Disco.Web.Areas.Config.Controllers
{
public partial class DeviceProfileController : dbAdminController
{
public virtual ActionResult Index(int? id)
{
if (id.HasValue)
{
var m = new Models.DeviceProfile.ShowModel()
{
DeviceProfile = dbContext.DeviceProfiles.Find(id.Value),
OrganisationAddresses = dbContext.DiscoConfiguration.OrganisationAddresses.Addresses,
CertificateProviders = Plugins.GetPluginFeatures(typeof(CertificateProviderFeature))
};
//m.Devices = BI.DeviceBI.SelectDeviceSearchResultItem(dbContext.Devices.Where(d => d.DeviceProfileId == m.DeviceProfile.Id));
var DistributionValues = Enum.GetValues(typeof(Disco.Models.Repository.DeviceProfile.DistributionTypes));
m.DeviceProfileDistributionTypes = new List<SelectListItem>();
foreach (int value in DistributionValues)
{
m.DeviceProfileDistributionTypes.Add(new SelectListItem()
{
Value = value.ToString(),
Text = Enum.GetName(typeof(Disco.Models.Repository.DeviceProfile.DistributionTypes), value),
Selected = ((int)m.DeviceProfile.DistributionType == value)
});
}
m.CanDelete = m.DeviceProfile.CanDelete(dbContext);
// Removed 2012-06-14 G# - Properties moved to DeviceProfile model & DB Migrated in DBv3.
//var config = m.DeviceProfile.Configuration(dbContext);
//m.AllocateWirelessCertificate = m.DeviceProfile.AllocateWirelessCertificate;
//m.OrganisationalUnit = m.DeviceProfile.OrganisationalUnit;
//m.ComputerNameTemplate = m.DeviceProfile.ComputerNameTemplate;
return View(MVC.Config.DeviceProfile.Views.Show, m);
}
else
{
return View(Models.DeviceProfile.IndexModel.Build(dbContext));
}
}
public virtual ActionResult Create()
{
return View();
}
[HttpPost]
public virtual ActionResult Create(Disco.Models.Repository.DeviceProfile model)
{
if (ModelState.IsValid)
{
// Check for Existing
var existing = dbContext.DeviceProfiles.Where(m => m.Name == model.Name).FirstOrDefault();
if (existing == null)
{
model.ProvisionADAccount = true;
dbContext.DeviceProfiles.Add(model);
dbContext.SaveChanges();
return RedirectToAction(MVC.Config.DeviceProfile.Index(model.Id));
}
else
{
ModelState.AddModelError("Name", "A Device Profile with this name already exists.");
}
}
return View(model);
}
public virtual ActionResult Defaults()
{
var m = new Models.DeviceProfile.DefaultsModel()
{
DeviceProfiles = dbContext.DeviceProfiles.ToList(),
Default = dbContext.DiscoConfiguration.DeviceProfiles.DefaultDeviceProfileId,
DefaultAddDeviceOffline = dbContext.DiscoConfiguration.DeviceProfiles.DefaultAddDeviceOfflineDeviceProfileId
};
m.DeviceProfilesAndNone = m.DeviceProfiles.ToList();
m.DeviceProfilesAndNone.Insert(0, new Disco.Models.Repository.DeviceProfile() { Id = 0, Name = "<No Default>" });
return View(m);
}
}
}
@@ -1,123 +1,123 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Disco.BI;
using Disco.BI.Extensions;
namespace Disco.Web.Areas.Config.Controllers
{
public partial class DocumentTemplateController : dbAdminController
{
public virtual ActionResult Index(string id)
{
if (string.IsNullOrEmpty(id))
{
var m = new Models.DocumentTemplate.IndexModel() { DocumentTemplates = dbContext.DocumentTemplates.ToList() };
return View(m);
}
else
{
var m = new Models.DocumentTemplate.ShowModel()
{
DocumentTemplate = dbContext.DocumentTemplates.Include("JobSubTypes").Where(at => at.Id == id).FirstOrDefault()
};
m.TemplateExpressions = m.DocumentTemplate.ExtractPdfExpressions(dbContext);
m.UpdateModel(dbContext);
return View(MVC.Config.DocumentTemplate.Views.Show, m);
}
}
public virtual ActionResult ImportStatus()
{
return View();
}
public virtual ActionResult UndetectedPages()
{
var m = new Models.DocumentTemplate.UndetectedPagesModel()
{
DocumentTemplates = dbContext.DocumentTemplates.ToList()
};
return View(m);
}
public virtual ActionResult Create()
{
var m = new Models.DocumentTemplate.CreateModel();
m.UpdateModel(dbContext);
return View(m);
}
[HttpPost]
public virtual ActionResult Create(Models.DocumentTemplate.CreateModel model)
{
model.UpdateModel(dbContext);
if (ModelState.IsValid)
{
// Check for Existing
var existing = dbContext.DocumentTemplates.Where(m => m.Id == model.DocumentTemplate.Id).FirstOrDefault();
if (existing == null)
{
dbContext.DocumentTemplates.Add(model.DocumentTemplate);
if (model.DocumentTemplate.Scope == Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.Job)
{
var jobSubTypes = new List<Disco.Models.Repository.JobSubType>();
jobSubTypes.AddRange(model.GetJobSubTypes);
model.DocumentTemplate.JobSubTypes = jobSubTypes;
//foreach (var jobSubType in model.GetJobSubTypes)
// model.AttachmentType.JobSubTypes.Add(jobSubType);
}
dbContext.SaveChanges();
// Save Template
model.DocumentTemplate.SavePdfTemplate(dbContext, model.Template.InputStream);
return RedirectToAction(MVC.Config.DocumentTemplate.Index(model.DocumentTemplate.Id));
}
else
{
ModelState.AddModelError("Name", "A Document Template with this Name already exists.");
}
}
return View(model);
}
public virtual ActionResult ExpressionBrowser(string type, bool StaticDeclaredMembersOnly = false)
{
if (string.IsNullOrWhiteSpace(type))
{
var m = new Models.DocumentTemplate.ExpressionBrowserModel()
{
DeviceType = typeof(Disco.Models.Repository.Device).AssemblyQualifiedName,
JobType = typeof(Disco.Models.Repository.Job).AssemblyQualifiedName,
UserType = typeof(Disco.Models.Repository.User).AssemblyQualifiedName,
Variables = BI.Expressions.Expression.StandardVariableTypes(),
ExtensionLibraries = BI.Expressions.Expression.ExtensionLibraryTypes()
};
return View(m);
}
else
{
var t = Type.GetType(type);
if (t != null)
{
return Json(BI.Expressions.ExpressionTypeDescriptor.Build(t, StaticDeclaredMembersOnly), JsonRequestBehavior.AllowGet);
}
else
{
return Json("Invalid Type Specified", JsonRequestBehavior.AllowGet);
}
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Disco.BI;
using Disco.BI.Extensions;
namespace Disco.Web.Areas.Config.Controllers
{
public partial class DocumentTemplateController : dbAdminController
{
public virtual ActionResult Index(string id)
{
if (string.IsNullOrEmpty(id))
{
var m = new Models.DocumentTemplate.IndexModel() { DocumentTemplates = dbContext.DocumentTemplates.ToList() };
return View(m);
}
else
{
var m = new Models.DocumentTemplate.ShowModel()
{
DocumentTemplate = dbContext.DocumentTemplates.Include("JobSubTypes").Where(at => at.Id == id).FirstOrDefault()
};
m.TemplateExpressions = m.DocumentTemplate.ExtractPdfExpressions(dbContext);
m.UpdateModel(dbContext);
return View(MVC.Config.DocumentTemplate.Views.Show, m);
}
}
public virtual ActionResult ImportStatus()
{
return View();
}
public virtual ActionResult UndetectedPages()
{
var m = new Models.DocumentTemplate.UndetectedPagesModel()
{
DocumentTemplates = dbContext.DocumentTemplates.ToList()
};
return View(m);
}
public virtual ActionResult Create()
{
var m = new Models.DocumentTemplate.CreateModel();
m.UpdateModel(dbContext);
return View(m);
}
[HttpPost]
public virtual ActionResult Create(Models.DocumentTemplate.CreateModel model)
{
model.UpdateModel(dbContext);
if (ModelState.IsValid)
{
// Check for Existing
var existing = dbContext.DocumentTemplates.Where(m => m.Id == model.DocumentTemplate.Id).FirstOrDefault();
if (existing == null)
{
dbContext.DocumentTemplates.Add(model.DocumentTemplate);
if (model.DocumentTemplate.Scope == Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.Job)
{
var jobSubTypes = new List<Disco.Models.Repository.JobSubType>();
jobSubTypes.AddRange(model.GetJobSubTypes);
model.DocumentTemplate.JobSubTypes = jobSubTypes;
//foreach (var jobSubType in model.GetJobSubTypes)
// model.AttachmentType.JobSubTypes.Add(jobSubType);
}
dbContext.SaveChanges();
// Save Template
model.DocumentTemplate.SavePdfTemplate(dbContext, model.Template.InputStream);
return RedirectToAction(MVC.Config.DocumentTemplate.Index(model.DocumentTemplate.Id));
}
else
{
ModelState.AddModelError("Name", "A Document Template with this Name already exists.");
}
}
return View(model);
}
public virtual ActionResult ExpressionBrowser(string type, bool StaticDeclaredMembersOnly = false)
{
if (string.IsNullOrWhiteSpace(type))
{
var m = new Models.DocumentTemplate.ExpressionBrowserModel()
{
DeviceType = typeof(Disco.Models.Repository.Device).AssemblyQualifiedName,
JobType = typeof(Disco.Models.Repository.Job).AssemblyQualifiedName,
UserType = typeof(Disco.Models.Repository.User).AssemblyQualifiedName,
Variables = BI.Expressions.Expression.StandardVariableTypes(),
ExtensionLibraries = BI.Expressions.Expression.ExtensionLibraryTypes()
};
return View(m);
}
else
{
var t = Type.GetType(type);
if (t != null)
{
return Json(BI.Expressions.ExpressionTypeDescriptor.Build(t, StaticDeclaredMembersOnly), JsonRequestBehavior.AllowGet);
}
else
{
return Json("Invalid Type Specified", JsonRequestBehavior.AllowGet);
}
}
}
}
}
@@ -1,29 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Disco.Web.Areas.Config.Controllers
{
public partial class EnrolmentController : dbAdminController
{
//
// GET: /Config/Bootstrapper/
public virtual ActionResult Index()
{
var m = new Models.Enrolment.IndexModel()
{
MacSshUsername = dbContext.DiscoConfiguration.Bootstrapper.MacSshUsername
};
return View(m);
}
public virtual ActionResult Status()
{
return View();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Disco.Web.Areas.Config.Controllers
{
public partial class EnrolmentController : dbAdminController
{
//
// GET: /Config/Bootstrapper/
public virtual ActionResult Index()
{
var m = new Models.Enrolment.IndexModel()
{
MacSshUsername = dbContext.DiscoConfiguration.Bootstrapper.MacSshUsername
};
return View(m);
}
public virtual ActionResult Status()
{
return View();
}
}
}
@@ -1,23 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Disco.Web.Areas.Config.Controllers
{
public partial class ExpressionsController : Controller
{
//
// GET: /Config/Expressions/
public virtual ActionResult Index()
{
return View(Views.Editor, new Models.Expressions.EditorModel()
{
Expression = @"JobComponentsTotalCost() < 100 ? JobComponentsTotalCost().ToString('c') : '$100.00'"
});
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Disco.Web.Areas.Config.Controllers
{
public partial class ExpressionsController : Controller
{
//
// GET: /Config/Expressions/
public virtual ActionResult Index()
{
return View(Views.Editor, new Models.Expressions.EditorModel()
{
Expression = @"JobComponentsTotalCost() < 100 ? JobComponentsTotalCost().ToString('c') : '$100.00'"
});
}
}
}
@@ -1,26 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Disco.Web.Areas.Config.Controllers
{
public partial class OrganisationController : dbAdminController
{
//
// GET: /Config/Organisation/
public virtual ActionResult Index()
{
var viewModel = new Models.Organisation.IndexModel();
viewModel.OrganisationName = dbContext.DiscoConfiguration.OrganisationName;
viewModel.MultiSiteMode = dbContext.DiscoConfiguration.MultiSiteMode;
viewModel.OrganisationAddresses = dbContext.DiscoConfiguration.OrganisationAddresses.Addresses;
return View(viewModel);
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Disco.Web.Areas.Config.Controllers
{
public partial class OrganisationController : dbAdminController
{
//
// GET: /Config/Organisation/
public virtual ActionResult Index()
{
var viewModel = new Models.Organisation.IndexModel();
viewModel.OrganisationName = dbContext.DiscoConfiguration.OrganisationName;
viewModel.MultiSiteMode = dbContext.DiscoConfiguration.MultiSiteMode;
viewModel.OrganisationAddresses = dbContext.DiscoConfiguration.OrganisationAddresses.Addresses;
return View(viewModel);
}
}
}
@@ -1,32 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Disco.Web.Areas.Config.Controllers
{
public partial class SystemConfigController : dbAdminController
{
[HttpGet]
public virtual ActionResult Index()
{
var m = Models.SystemConfig.IndexModel.FromConfiguration(dbContext.DiscoConfiguration);
return View(m);
}
[HttpPost]
public virtual ActionResult Index(Models.SystemConfig.IndexModel config)
{
if (ModelState.IsValid)
{
config.ToConfiguration(dbContext);
return RedirectToAction(MVC.Config.Config.Index());
}
else
{
return View();
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Disco.Web.Areas.Config.Controllers
{
public partial class SystemConfigController : dbAdminController
{
[HttpGet]
public virtual ActionResult Index()
{
var m = Models.SystemConfig.IndexModel.FromConfiguration(dbContext.DiscoConfiguration);
return View(m);
}
[HttpPost]
public virtual ActionResult Index(Models.SystemConfig.IndexModel config)
{
if (ModelState.IsValid)
{
config.ToConfiguration(dbContext);
return RedirectToAction(MVC.Config.Config.Index());
}
else
{
return View();
}
}
}
}
@@ -1,26 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.Models.BI.Interop.Community;
namespace Disco.Web.Areas.Config.Models.Config
{
public class IndexModel
{
public bool UpdateAvailable
{
get
{
if (UpdateResponse != null)
{
var updateVersion = Version.Parse(UpdateResponse.Version);
return (updateVersion > typeof(DiscoApplication).Assembly.GetName().Version);
}
return false;
}
}
public UpdateResponse UpdateResponse { get; set; }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.Models.BI.Interop.Community;
namespace Disco.Web.Areas.Config.Models.Config
{
public class IndexModel
{
public bool UpdateAvailable
{
get
{
if (UpdateResponse != null)
{
var updateVersion = Version.Parse(UpdateResponse.Version);
return (updateVersion > typeof(DiscoApplication).Assembly.GetName().Version);
}
return false;
}
}
public UpdateResponse UpdateResponse { get; set; }
}
}
@@ -1,34 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.Data.Repository;
namespace Disco.Web.Areas.Config.Models.DeviceBatch
{
public class IndexModel
{
public List<_IndexModelDeviceBatch> DeviceBatches { get; set; }
public static IndexModel Build(DiscoDataContext dbContext)
{
var m = new IndexModel();
m.DeviceBatches = dbContext.DeviceBatches.OrderBy(db => db.Name).Select(db => new _IndexModelDeviceBatch()
{
Id = db.Id,
Name = db.Name,
PurchaseDate = db.PurchaseDate,
PurchaseUnitQuantity = db.UnitQuantity,
DeviceCount = db.Devices.Count,
DeviceDecommissionedCount = db.Devices.Count(d=> d.DecommissionedDate.HasValue),
DefaultDeviceModel = db.DefaultDeviceModel.Description,
WarrantyExpires = db.WarrantyValidUntil,
InsuranceSupplier = db.InsuranceSupplier,
InsuredUntil = db.InsuredUntil
}).ToList();
return m;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.Data.Repository;
namespace Disco.Web.Areas.Config.Models.DeviceBatch
{
public class IndexModel
{
public List<_IndexModelDeviceBatch> DeviceBatches { get; set; }
public static IndexModel Build(DiscoDataContext dbContext)
{
var m = new IndexModel();
m.DeviceBatches = dbContext.DeviceBatches.OrderBy(db => db.Name).Select(db => new _IndexModelDeviceBatch()
{
Id = db.Id,
Name = db.Name,
PurchaseDate = db.PurchaseDate,
PurchaseUnitQuantity = db.UnitQuantity,
DeviceCount = db.Devices.Count,
DeviceDecommissionedCount = db.Devices.Count(d=> d.DecommissionedDate.HasValue),
DefaultDeviceModel = db.DefaultDeviceModel.Description,
WarrantyExpires = db.WarrantyValidUntil,
InsuranceSupplier = db.InsuranceSupplier,
InsuredUntil = db.InsuredUntil
}).ToList();
return m;
}
}
}
@@ -1,17 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Disco.Web.Areas.Config.Models.DeviceBatch
{
public class ShowModel
{
public Disco.Models.Repository.DeviceBatch DeviceBatch { get; set; }
public List<SelectListItem> DeviceModels { get; set; }
public int DeviceCount { get; set; }
public int DeviceDecommissionedCount { get; set; }
public bool CanDelete { get; set; }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Disco.Web.Areas.Config.Models.DeviceBatch
{
public class ShowModel
{
public Disco.Models.Repository.DeviceBatch DeviceBatch { get; set; }
public List<SelectListItem> DeviceModels { get; set; }
public int DeviceCount { get; set; }
public int DeviceDecommissionedCount { get; set; }
public bool CanDelete { get; set; }
}
}
@@ -1,23 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
namespace Disco.Web.Areas.Config.Models.DeviceBatch
{
public class _IndexModelDeviceBatch
{
public int Id { get; set; }
public string Name { get; set; }
[Required(), DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)]
public DateTime PurchaseDate { get; set; }
public int DeviceCount { get; set; }
public int DeviceDecommissionedCount { get; set; }
public int? PurchaseUnitQuantity { get; set; }
public string DefaultDeviceModel { get; set; }
public DateTime? WarrantyExpires { get; set; }
public DateTime? InsuredUntil { get; set; }
public string InsuranceSupplier { get; set; }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
namespace Disco.Web.Areas.Config.Models.DeviceBatch
{
public class _IndexModelDeviceBatch
{
public int Id { get; set; }
public string Name { get; set; }
[Required(), DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)]
public DateTime PurchaseDate { get; set; }
public int DeviceCount { get; set; }
public int DeviceDecommissionedCount { get; set; }
public int? PurchaseUnitQuantity { get; set; }
public string DefaultDeviceModel { get; set; }
public DateTime? WarrantyExpires { get; set; }
public DateTime? InsuredUntil { get; set; }
public string InsuranceSupplier { get; set; }
}
}
@@ -1,15 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Disco.Web.Areas.Config.Models.DeviceModel
{
public class DeviceComponentsModel
{
public int? DeviceModelId { get; set; }
public List<Disco.Models.Repository.DeviceComponent> DeviceComponents { get; set; }
public List<Disco.Models.Repository.JobSubType> JobSubTypes { get; set; }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Disco.Web.Areas.Config.Models.DeviceModel
{
public class DeviceComponentsModel
{
public int? DeviceModelId { get; set; }
public List<Disco.Models.Repository.DeviceComponent> DeviceComponents { get; set; }
public List<Disco.Models.Repository.JobSubType> JobSubTypes { get; set; }
}
}
@@ -1,30 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.Data.Repository;
namespace Disco.Web.Areas.Config.Models.DeviceModel
{
public class IndexModel
{
public List<_IndexModelDeviceModel> DeviceModels { get; set; }
public static IndexModel Build(DiscoDataContext dbContext)
{
var m = new IndexModel();
m.DeviceModels = dbContext.DeviceModels.OrderBy(dm => dm.Description).Select(dm => new _IndexModelDeviceModel()
{
Id = dm.Id,
Name = dm.Description,
Manufacturer = dm.Manufacturer,
Model = dm.Model,
ModelType = dm.ModelType,
DeviceCount = dm.Devices.Count
}).ToList();
return m;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.Data.Repository;
namespace Disco.Web.Areas.Config.Models.DeviceModel
{
public class IndexModel
{
public List<_IndexModelDeviceModel> DeviceModels { get; set; }
public static IndexModel Build(DiscoDataContext dbContext)
{
var m = new IndexModel();
m.DeviceModels = dbContext.DeviceModels.OrderBy(dm => dm.Description).Select(dm => new _IndexModelDeviceModel()
{
Id = dm.Id,
Name = dm.Description,
Manufacturer = dm.Manufacturer,
Model = dm.Model,
ModelType = dm.ModelType,
DeviceCount = dm.Devices.Count
}).ToList();
return m;
}
}
}
@@ -1,19 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.Services.Plugins;
namespace Disco.Web.Areas.Config.Models.DeviceModel
{
public class ShowModel
{
public Disco.Models.Repository.DeviceModel DeviceModel { get; set; }
public Models.DeviceModel.DeviceComponentsModel DeviceComponentsModel { get; set; }
public List<PluginFeatureManifest> WarrantyProviders { get; set; }
public bool CanDelete { get; set; }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.Services.Plugins;
namespace Disco.Web.Areas.Config.Models.DeviceModel
{
public class ShowModel
{
public Disco.Models.Repository.DeviceModel DeviceModel { get; set; }
public Models.DeviceModel.DeviceComponentsModel DeviceComponentsModel { get; set; }
public List<PluginFeatureManifest> WarrantyProviders { get; set; }
public bool CanDelete { get; set; }
}
}
@@ -1,26 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
namespace Disco.Web.Areas.Config.Models.DeviceModel
{
public class _IndexModelDeviceModel
{
public int Id { get; set; }
public string Name { get; set; }
public string Manufacturer { get; set; }
public string Model { get; set; }
public string ModelType { get; set; }
public int DeviceCount { get; set; }
public override string ToString()
{
if (string.IsNullOrEmpty(Name))
return string.Format("{0} {1}", Manufacturer, Model);
else
return Name;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
namespace Disco.Web.Areas.Config.Models.DeviceModel
{
public class _IndexModelDeviceModel
{
public int Id { get; set; }
public string Name { get; set; }
public string Manufacturer { get; set; }
public string Model { get; set; }
public string ModelType { get; set; }
public int DeviceCount { get; set; }
public override string ToString()
{
if (string.IsNullOrEmpty(Name))
return string.Format("{0} {1}", Manufacturer, Model);
else
return Name;
}
}
}
@@ -1,15 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Disco.Web.Areas.Config.Models.DeviceProfile
{
public class DefaultsModel
{
public List<Disco.Models.Repository.DeviceProfile> DeviceProfiles { get; set; }
public List<Disco.Models.Repository.DeviceProfile> DeviceProfilesAndNone { get; set; }
public int Default { get; set; }
public int DefaultAddDeviceOffline { get; set; }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Disco.Web.Areas.Config.Models.DeviceProfile
{
public class DefaultsModel
{
public List<Disco.Models.Repository.DeviceProfile> DeviceProfiles { get; set; }
public List<Disco.Models.Repository.DeviceProfile> DeviceProfilesAndNone { get; set; }
public int Default { get; set; }
public int DefaultAddDeviceOffline { get; set; }
}
}
@@ -1,40 +1,40 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.Data.Repository;
using Disco.BI.Extensions;
namespace Disco.Web.Areas.Config.Models.DeviceProfile
{
public class IndexModel
{
public List<_IndexModelDeviceProfile> DeviceProfiles { get; set; }
public static IndexModel Build(DiscoDataContext dbContext)
{
var m = new IndexModel();
m.DeviceProfiles = dbContext.DeviceProfiles.OrderBy(dp => dp.Name).Select(dp => new _IndexModelDeviceProfile()
{
Id = dp.Id,
Name = dp.Name,
ShortName = dp.ShortName,
Address = dp.DefaultOrganisationAddress,
Description = dp.Description,
DistributionTypeId = dp.DistributionTypeDb,
DeviceCount = dp.Devices.Count,
DeviceDecommissionedCount = dp.Devices.Count(d => d.DecommissionedDate.HasValue)
}).ToList();
if (DiscoApplication.MultiSiteMode)
{
foreach (var dp in m.DeviceProfiles)
if (dp.Address.HasValue)
dp.AddressName = dbContext.DiscoConfiguration.OrganisationAddresses.GetAddress(dp.Address.Value).Name;
}
return m;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.Data.Repository;
using Disco.BI.Extensions;
namespace Disco.Web.Areas.Config.Models.DeviceProfile
{
public class IndexModel
{
public List<_IndexModelDeviceProfile> DeviceProfiles { get; set; }
public static IndexModel Build(DiscoDataContext dbContext)
{
var m = new IndexModel();
m.DeviceProfiles = dbContext.DeviceProfiles.OrderBy(dp => dp.Name).Select(dp => new _IndexModelDeviceProfile()
{
Id = dp.Id,
Name = dp.Name,
ShortName = dp.ShortName,
Address = dp.DefaultOrganisationAddress,
Description = dp.Description,
DistributionTypeId = dp.DistributionTypeDb,
DeviceCount = dp.Devices.Count,
DeviceDecommissionedCount = dp.Devices.Count(d => d.DecommissionedDate.HasValue)
}).ToList();
if (DiscoApplication.MultiSiteMode)
{
foreach (var dp in m.DeviceProfiles)
if (dp.Address.HasValue)
dp.AddressName = dbContext.DiscoConfiguration.OrganisationAddresses.GetAddress(dp.Address.Value).Name;
}
return m;
}
}
}
@@ -1,20 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Disco.Services.Plugins;
namespace Disco.Web.Areas.Config.Models.DeviceProfile
{
public class ShowModel
{
public Disco.Models.Repository.DeviceProfile DeviceProfile { get; set; }
public List<SelectListItem> DeviceProfileDistributionTypes { get; set; }
public List<Disco.Models.BI.Config.OrganisationAddress> OrganisationAddresses { get; set; }
public List<PluginFeatureManifest> CertificateProviders { get; set; }
public bool CanDelete { get; set; }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Disco.Services.Plugins;
namespace Disco.Web.Areas.Config.Models.DeviceProfile
{
public class ShowModel
{
public Disco.Models.Repository.DeviceProfile DeviceProfile { get; set; }
public List<SelectListItem> DeviceProfileDistributionTypes { get; set; }
public List<Disco.Models.BI.Config.OrganisationAddress> OrganisationAddresses { get; set; }
public List<PluginFeatureManifest> CertificateProviders { get; set; }
public bool CanDelete { get; set; }
}
}
@@ -1,32 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using Disco.Web.Extensions;
namespace Disco.Web.Areas.Config.Models.DeviceProfile
{
public class _IndexModelDeviceProfile
{
public int Id { get; set; }
public string Name { get; set; }
public string ShortName { get; set; }
public int? Address { get; set; }
//public string AddressShortName { get; set; }
public string AddressName { get; set; }
public string Description { get; set; }
public int DistributionTypeId { get; set; }
public string DistributionType
{
get
{
return Enum.GetName(typeof(Disco.Models.Repository.DeviceProfile.DistributionTypes), this.DistributionTypeId);
}
}
public int DeviceCount { get; set; }
public int DeviceDecommissionedCount { get; set; }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using Disco.Web.Extensions;
namespace Disco.Web.Areas.Config.Models.DeviceProfile
{
public class _IndexModelDeviceProfile
{
public int Id { get; set; }
public string Name { get; set; }
public string ShortName { get; set; }
public int? Address { get; set; }
//public string AddressShortName { get; set; }
public string AddressName { get; set; }
public string Description { get; set; }
public int DistributionTypeId { get; set; }
public string DistributionType
{
get
{
return Enum.GetName(typeof(Disco.Models.Repository.DeviceProfile.DistributionTypes), this.DistributionTypeId);
}
}
public int DeviceCount { get; set; }
public int DeviceDecommissionedCount { get; set; }
}
}
@@ -1,87 +1,87 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using Disco.Data.Repository;
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
{
[CustomValidation(typeof(CreateModelValidation), "ValidateCreateModel")]
public class CreateModel
{
public Disco.Models.Repository.DocumentTemplate DocumentTemplate { get; set; }
[Required]
public HttpPostedFileBase Template { get; set; }
public List<string> Types { get; set; }
public List<string> SubTypes { get; set; }
public List<Disco.Models.Repository.JobType> JobTypes { get; set; }
public List<Disco.Models.Repository.JobSubType> JobSubTypes { get; set; }
public List<string> Scopes
{
get
{
return Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.ToList();
}
}
public List<Disco.Models.Repository.JobType> GetJobTypes
{
get
{
if (Types != null)
{
var types = this.Types;
return this.JobTypes.Where(m => types.Contains(m.Id)).ToList();
}
return null;
}
}
public List<Disco.Models.Repository.JobSubType> GetJobSubTypes
{
get
{
if (SubTypes != null)
{
var subTypes = this.SubTypes;
return this.JobSubTypes.Where(m => subTypes.Contains(String.Format("{0}_{1}", m.JobTypeId, m.Id))).ToList();
}
return null;
}
}
public void UpdateModel(DiscoDataContext dbContext)
{
if (this.JobTypes == null)
JobTypes = dbContext.JobTypes.ToList();
if (this.JobSubTypes == null)
JobSubTypes = dbContext.JobSubTypes.ToList();
}
}
public class CreateModelValidation
{
public static ValidationResult ValidateCreateModel(CreateModel model)
{
if (model.DocumentTemplate != null && model.DocumentTemplate.Scope == Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.Job)
{
if (model.Types != null && model.SubTypes != null)
{
var typeId = string.Format("{0}_", model.Types);
model.SubTypes = model.SubTypes.Where(m => model.Types.Contains(m.Substring(0, m.IndexOf("_")))).ToList();
}
}
return ValidationResult.Success;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using Disco.Data.Repository;
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
{
[CustomValidation(typeof(CreateModelValidation), "ValidateCreateModel")]
public class CreateModel
{
public Disco.Models.Repository.DocumentTemplate DocumentTemplate { get; set; }
[Required]
public HttpPostedFileBase Template { get; set; }
public List<string> Types { get; set; }
public List<string> SubTypes { get; set; }
public List<Disco.Models.Repository.JobType> JobTypes { get; set; }
public List<Disco.Models.Repository.JobSubType> JobSubTypes { get; set; }
public List<string> Scopes
{
get
{
return Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.ToList();
}
}
public List<Disco.Models.Repository.JobType> GetJobTypes
{
get
{
if (Types != null)
{
var types = this.Types;
return this.JobTypes.Where(m => types.Contains(m.Id)).ToList();
}
return null;
}
}
public List<Disco.Models.Repository.JobSubType> GetJobSubTypes
{
get
{
if (SubTypes != null)
{
var subTypes = this.SubTypes;
return this.JobSubTypes.Where(m => subTypes.Contains(String.Format("{0}_{1}", m.JobTypeId, m.Id))).ToList();
}
return null;
}
}
public void UpdateModel(DiscoDataContext dbContext)
{
if (this.JobTypes == null)
JobTypes = dbContext.JobTypes.ToList();
if (this.JobSubTypes == null)
JobSubTypes = dbContext.JobSubTypes.ToList();
}
}
public class CreateModelValidation
{
public static ValidationResult ValidateCreateModel(CreateModel model)
{
if (model.DocumentTemplate != null && model.DocumentTemplate.Scope == Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.Job)
{
if (model.Types != null && model.SubTypes != null)
{
var typeId = string.Format("{0}_", model.Types);
model.SubTypes = model.SubTypes.Where(m => model.Types.Contains(m.Substring(0, m.IndexOf("_")))).ToList();
}
}
return ValidationResult.Success;
}
}
}
@@ -1,21 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
{
public class ExpressionBrowserModel
{
public string DeviceType { get; set; }
public string UserType { get; set; }
public string JobType { get; set; }
//public string DataExtType { get; set; }
//public string DeviceExtType { get; set; }
//public string UserExtType { get; set; }
public Dictionary<string, string> Variables { get; set; }
public Dictionary<string, string> ExtensionLibraries { get; set; }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
{
public class ExpressionBrowserModel
{
public string DeviceType { get; set; }
public string UserType { get; set; }
public string JobType { get; set; }
//public string DataExtType { get; set; }
//public string DeviceExtType { get; set; }
//public string UserExtType { get; set; }
public Dictionary<string, string> Variables { get; set; }
public Dictionary<string, string> ExtensionLibraries { get; set; }
}
}
@@ -1,12 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
{
public class IndexModel
{
public List<Disco.Models.Repository.DocumentTemplate> DocumentTemplates { get; set; }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
{
public class IndexModel
{
public List<Disco.Models.Repository.DocumentTemplate> DocumentTemplates { get; set; }
}
}
@@ -1,74 +1,74 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.Data.Repository;
using Disco.Models.Repository;
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
{
public class ShowModel
{
public Disco.Models.Repository.DocumentTemplate DocumentTemplate { get; set; }
public int StoredInstanceCount { get; set; }
public List<Disco.BI.Expressions.Expression> TemplateExpressions { get; set; }
public List<string> Types { get; set; }
public List<string> SubTypes { get; set; }
public List<Disco.Models.Repository.JobType> JobTypes { get; set; }
public List<Disco.Models.Repository.JobSubType> JobSubTypes { get; set; }
public ShowModel()
{
this.Types = new List<string>();
this.SubTypes = new List<string>();
}
public List<string> Scopes
{
get
{
return Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.ToList();
}
}
public void UpdateModel(DiscoDataContext dbContext)
{
switch (this.DocumentTemplate.Scope)
{
case Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.Device:
this.StoredInstanceCount = dbContext.DeviceAttachments.Count(a => a.DocumentTemplateId == this.DocumentTemplate.Id);
break;
case Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.Job:
this.StoredInstanceCount = dbContext.JobAttachments.Count(a => a.DocumentTemplateId == this.DocumentTemplate.Id);
break;
case Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.User:
this.StoredInstanceCount = dbContext.UserAttachments.Count(a => a.DocumentTemplateId == this.DocumentTemplate.Id);
break;
}
if (this.JobTypes == null)
JobTypes = dbContext.JobTypes.ToList();
if (this.JobSubTypes == null)
JobSubTypes = dbContext.JobSubTypes.ToList();
if (DocumentTemplate != null)
{
if (DocumentTemplate.JobSubTypes != null)
{
foreach (var jst in DocumentTemplate.JobSubTypes)
{
if (!Types.Contains(jst.JobTypeId))
Types.Add(jst.JobTypeId);
SubTypes.Add(string.Format("{0}_{1}", jst.JobTypeId, jst.Id));
}
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.Data.Repository;
using Disco.Models.Repository;
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
{
public class ShowModel
{
public Disco.Models.Repository.DocumentTemplate DocumentTemplate { get; set; }
public int StoredInstanceCount { get; set; }
public List<Disco.BI.Expressions.Expression> TemplateExpressions { get; set; }
public List<string> Types { get; set; }
public List<string> SubTypes { get; set; }
public List<Disco.Models.Repository.JobType> JobTypes { get; set; }
public List<Disco.Models.Repository.JobSubType> JobSubTypes { get; set; }
public ShowModel()
{
this.Types = new List<string>();
this.SubTypes = new List<string>();
}
public List<string> Scopes
{
get
{
return Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.ToList();
}
}
public void UpdateModel(DiscoDataContext dbContext)
{
switch (this.DocumentTemplate.Scope)
{
case Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.Device:
this.StoredInstanceCount = dbContext.DeviceAttachments.Count(a => a.DocumentTemplateId == this.DocumentTemplate.Id);
break;
case Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.Job:
this.StoredInstanceCount = dbContext.JobAttachments.Count(a => a.DocumentTemplateId == this.DocumentTemplate.Id);
break;
case Disco.Models.Repository.DocumentTemplate.DocumentTemplateScopes.User:
this.StoredInstanceCount = dbContext.UserAttachments.Count(a => a.DocumentTemplateId == this.DocumentTemplate.Id);
break;
}
if (this.JobTypes == null)
JobTypes = dbContext.JobTypes.ToList();
if (this.JobSubTypes == null)
JobSubTypes = dbContext.JobSubTypes.ToList();
if (DocumentTemplate != null)
{
if (DocumentTemplate.JobSubTypes != null)
{
foreach (var jst in DocumentTemplate.JobSubTypes)
{
if (!Types.Contains(jst.JobTypeId))
Types.Add(jst.JobTypeId);
SubTypes.Add(string.Format("{0}_{1}", jst.JobTypeId, jst.Id));
}
}
}
}
}
}
@@ -1,30 +1,30 @@
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.Web.Extensions;
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
{
public class UndetectedPagesModel
{
public List<Disco.Models.Repository.DocumentTemplate> DocumentTemplates { get; set; }
public List<SelectListItem> DocumentTemplatesSelectListItems
{
get
{
var list = new List<SelectListItem>();
list.Add(new SelectListItem() { Selected = false, Value = "--DEVICE", Text = "<Generic Device Document>" });
list.Add(new SelectListItem() { Selected = true, Value = "--JOB", Text = "<Generic Job Document>" });
list.Add(new SelectListItem() { Selected = false, Value = "--USER", Text = "<Generic User Document>" });
list.AddRange(this.DocumentTemplates.ToSelectListItems());
return list;
}
}
}
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.Web.Extensions;
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
{
public class UndetectedPagesModel
{
public List<Disco.Models.Repository.DocumentTemplate> DocumentTemplates { get; set; }
public List<SelectListItem> DocumentTemplatesSelectListItems
{
get
{
var list = new List<SelectListItem>();
list.Add(new SelectListItem() { Selected = false, Value = "--DEVICE", Text = "<Generic Device Document>" });
list.Add(new SelectListItem() { Selected = true, Value = "--JOB", Text = "<Generic Job Document>" });
list.Add(new SelectListItem() { Selected = false, Value = "--USER", Text = "<Generic User Document>" });
list.AddRange(this.DocumentTemplates.ToSelectListItems());
return list;
}
}
}
}
@@ -1,12 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Disco.Web.Areas.Config.Models.Enrolment
{
public class IndexModel
{
public string MacSshUsername { get; set; }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Disco.Web.Areas.Config.Models.Enrolment
{
public class IndexModel
{
public string MacSshUsername { get; set; }
}
}
@@ -1,16 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Disco.Web.Areas.Config.Models.Expressions
{
public class EditorModel
{
public string Expression { get; set; }
public Disco.Web.Areas.API.Models.Expressions.ValidateExpressionModel ExpressionException { get; set; }
public string TestScope { get; set; }
public string TestScopeDataType { get; set; }
public string TestScopeDataId { get; set; }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Disco.Web.Areas.Config.Models.Expressions
{
public class EditorModel
{
public string Expression { get; set; }
public Disco.Web.Areas.API.Models.Expressions.ValidateExpressionModel ExpressionException { get; set; }
public string TestScope { get; set; }
public string TestScopeDataType { get; set; }
public string TestScopeDataId { get; set; }
}
}
@@ -1,14 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.Services.Logging;
using Disco.Services.Logging.Models;
namespace Disco.Web.Areas.Config.Models.Logging
{
public class IndexModel
{
public Dictionary<LogBase, List<LogEventType>> LogModules { get; set; }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.Services.Logging;
using Disco.Services.Logging.Models;
namespace Disco.Web.Areas.Config.Models.Logging
{
public class IndexModel
{
public Dictionary<LogBase, List<LogEventType>> LogModules { get; set; }
}
}
@@ -1,12 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Disco.Web.Areas.Config.Models.Logging
{
public class TaskStatusModel
{
public string SessionId { get; set; }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Disco.Web.Areas.Config.Models.Logging
{
public class TaskStatusModel
{
public string SessionId { get; set; }
}
}
@@ -1,17 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.Models.BI.Config;
using System.ComponentModel.DataAnnotations;
namespace Disco.Web.Areas.Config.Models.Organisation
{
public class IndexModel
{
public string OrganisationName { get; set; }
[Display(Name="Enabled")]
public bool MultiSiteMode { get; set; }
public List<OrganisationAddress> OrganisationAddresses { get; set; }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.Models.BI.Config;
using System.ComponentModel.DataAnnotations;
namespace Disco.Web.Areas.Config.Models.Organisation
{
public class IndexModel
{
public string OrganisationName { get; set; }
[Display(Name="Enabled")]
public bool MultiSiteMode { get; set; }
public List<OrganisationAddress> OrganisationAddresses { get; set; }
}
}
@@ -1,20 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Disco.Web.Areas.Config.Models.Shared
{
public class LogEventsModel
{
public bool IsLive { get; set; }
public Disco.Services.Logging.LogBase ModuleFilter { get; set; }
public IEnumerable<Disco.Services.Logging.Models.LogEventType> EventTypesFilter { get; set; }
public int? TakeFilter { get; set; }
public DateTime? StartFilter { get; set; }
public DateTime? EndFilter { get; set; }
public int? ViewPortHeight { get; set; }
public int? ViewPortWidth { get; set; }
public string JavascriptLiveEventFunctionName { get; set; }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Disco.Web.Areas.Config.Models.Shared
{
public class LogEventsModel
{
public bool IsLive { get; set; }
public Disco.Services.Logging.LogBase ModuleFilter { get; set; }
public IEnumerable<Disco.Services.Logging.Models.LogEventType> EventTypesFilter { get; set; }
public int? TakeFilter { get; set; }
public DateTime? StartFilter { get; set; }
public DateTime? EndFilter { get; set; }
public int? ViewPortHeight { get; set; }
public int? ViewPortWidth { get; set; }
public string JavascriptLiveEventFunctionName { get; set; }
}
}
@@ -1,126 +1,126 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.Data.Configuration;
using System.ComponentModel.DataAnnotations;
using System.Data.SqlClient;
using Disco.Data.Repository;
using Disco.Models.BI.Interop.Community;
using Disco.Services.Tasks;
namespace Disco.Web.Areas.Config.Models.SystemConfig
{
public class IndexModel
{
public Version DiscoVersion { get; set; }
public DateTime? DiscoVersionBuilt
{
get
{
var v = DiscoVersion;
if (v != null)
{
try
{
return new DateTime(v.Minor + 2011, v.Build / 100, v.Build % 100, v.Revision / 100, v.Revision % 100, 0);
}
catch (Exception)
{
return null;
}
}
else
return null;
}
}
public string DataStoreLocation { get; set; }
#region Database Connection
private Lazy<SqlConnectionStringBuilder> DatabaseConnectionString = new Lazy<SqlConnectionStringBuilder>(() =>
{
return new SqlConnectionStringBuilder(Disco.Data.Repository.DiscoDatabaseConnectionFactory.DiscoDataContextConnectionString);
});
public string DatabaseServer
{
get
{
return this.DatabaseConnectionString.Value.DataSource;
}
}
public string DatabaseName
{
get
{
return this.DatabaseConnectionString.Value.InitialCatalog;
}
}
public string DatabaseAuthentication
{
get
{
return this.DatabaseConnectionString.Value.IntegratedSecurity ? "Integrated Authentication" : "SQL Authentication";
}
}
public string DatabaseSqlAuthUsername
{
get
{
return this.DatabaseConnectionString.Value.IntegratedSecurity ? null : this.DatabaseConnectionString.Value.UserID;
}
}
#endregion
#region Proxy
public string ProxyAddress { get; set; }
public int ProxyPort { get; set; }
public string ProxyUsername { get; set; }
[DataType(DataType.Password)]
public string ProxyPassword { get; set; }
#endregion
public ScheduledTaskStatus UpdateRunningStatus { get; set; }
public DateTime? UpdateNextScheduled { get; set; }
public UpdateResponse UpdateLatestResponse { get; set; }
public bool UpdateBetaDeployment { get; set; }
public static IndexModel FromConfiguration(ConfigurationContext config)
{
return new IndexModel()
{
DiscoVersion = typeof(DiscoApplication).Assembly.GetName().Version,
DataStoreLocation = config.DataStoreLocation,
ProxyAddress = config.ProxyAddress,
ProxyPort = config.ProxyPort,
ProxyUsername = config.ProxyUsername,
ProxyPassword = config.ProxyPassword,
UpdateLatestResponse = config.UpdateLastCheck,
UpdateRunningStatus = Disco.BI.Interop.Community.UpdateCheckTask.RunningStatus,
UpdateNextScheduled = Disco.BI.Interop.Community.UpdateCheckTask.NextScheduled,
UpdateBetaDeployment = config.UpdateBetaDeployment
};
}
public void ToConfiguration(DiscoDataContext db)
{
ConfigurationContext config = db.DiscoConfiguration;
//config.DataStoreLocation = DataStoreLocation;
config.ProxyAddress = ProxyAddress;
config.ProxyPort = ProxyPort;
config.ProxyUsername = ProxyUsername;
config.ProxyPassword = ProxyPassword;
DiscoApplication.SetGlobalProxy(ProxyAddress, ProxyPort, ProxyUsername, ProxyPassword);
db.SaveChanges();
// Try and check for updates if needed - After Proxy Changed
if (db.DiscoConfiguration.UpdateLastCheck == null
|| db.DiscoConfiguration.UpdateLastCheck.ResponseTimestamp < DateTime.Now.AddDays(-1))
{
Disco.BI.Interop.Community.UpdateCheckTask.ScheduleNow();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.Data.Configuration;
using System.ComponentModel.DataAnnotations;
using System.Data.SqlClient;
using Disco.Data.Repository;
using Disco.Models.BI.Interop.Community;
using Disco.Services.Tasks;
namespace Disco.Web.Areas.Config.Models.SystemConfig
{
public class IndexModel
{
public Version DiscoVersion { get; set; }
public DateTime? DiscoVersionBuilt
{
get
{
var v = DiscoVersion;
if (v != null)
{
try
{
return new DateTime(v.Minor + 2011, v.Build / 100, v.Build % 100, v.Revision / 100, v.Revision % 100, 0);
}
catch (Exception)
{
return null;
}
}
else
return null;
}
}
public string DataStoreLocation { get; set; }
#region Database Connection
private Lazy<SqlConnectionStringBuilder> DatabaseConnectionString = new Lazy<SqlConnectionStringBuilder>(() =>
{
return new SqlConnectionStringBuilder(Disco.Data.Repository.DiscoDatabaseConnectionFactory.DiscoDataContextConnectionString);
});
public string DatabaseServer
{
get
{
return this.DatabaseConnectionString.Value.DataSource;
}
}
public string DatabaseName
{
get
{
return this.DatabaseConnectionString.Value.InitialCatalog;
}
}
public string DatabaseAuthentication
{
get
{
return this.DatabaseConnectionString.Value.IntegratedSecurity ? "Integrated Authentication" : "SQL Authentication";
}
}
public string DatabaseSqlAuthUsername
{
get
{
return this.DatabaseConnectionString.Value.IntegratedSecurity ? null : this.DatabaseConnectionString.Value.UserID;
}
}
#endregion
#region Proxy
public string ProxyAddress { get; set; }
public int ProxyPort { get; set; }
public string ProxyUsername { get; set; }
[DataType(DataType.Password)]
public string ProxyPassword { get; set; }
#endregion
public ScheduledTaskStatus UpdateRunningStatus { get; set; }
public DateTime? UpdateNextScheduled { get; set; }
public UpdateResponse UpdateLatestResponse { get; set; }
public bool UpdateBetaDeployment { get; set; }
public static IndexModel FromConfiguration(ConfigurationContext config)
{
return new IndexModel()
{
DiscoVersion = typeof(DiscoApplication).Assembly.GetName().Version,
DataStoreLocation = config.DataStoreLocation,
ProxyAddress = config.ProxyAddress,
ProxyPort = config.ProxyPort,
ProxyUsername = config.ProxyUsername,
ProxyPassword = config.ProxyPassword,
UpdateLatestResponse = config.UpdateLastCheck,
UpdateRunningStatus = Disco.BI.Interop.Community.UpdateCheckTask.RunningStatus,
UpdateNextScheduled = Disco.BI.Interop.Community.UpdateCheckTask.NextScheduled,
UpdateBetaDeployment = config.UpdateBetaDeployment
};
}
public void ToConfiguration(DiscoDataContext db)
{
ConfigurationContext config = db.DiscoConfiguration;
//config.DataStoreLocation = DataStoreLocation;
config.ProxyAddress = ProxyAddress;
config.ProxyPort = ProxyPort;
config.ProxyUsername = ProxyUsername;
config.ProxyPassword = ProxyPassword;
DiscoApplication.SetGlobalProxy(ProxyAddress, ProxyPort, ProxyUsername, ProxyPassword);
db.SaveChanges();
// Try and check for updates if needed - After Proxy Changed
if (db.DiscoConfiguration.UpdateLastCheck == null
|| db.DiscoConfiguration.UpdateLastCheck.ResponseTimestamp < DateTime.Now.AddDays(-1))
{
Disco.BI.Interop.Community.UpdateCheckTask.ScheduleNow();
}
}
}
}
@@ -1,21 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Disco.Web.Areas.Config.Models.WirelessCertificate
{
public class IndexModel
{
public int Total { get; set; }
public int Unallocated { get; set; }
public int Allocated { get; set; }
public string Provider { get; set; }
public int AutoBufferMax { get; set; }
public int AutoBufferLow { get; set; }
public bool Processing { get; set; }
public string eduSTAR_SchoolId { get; set; }
public string eduSTAR_Username { get; set; }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Disco.Web.Areas.Config.Models.WirelessCertificate
{
public class IndexModel
{
public int Total { get; set; }
public int Unallocated { get; set; }
public int Allocated { get; set; }
public string Provider { get; set; }
public int AutoBufferMax { get; set; }
public int AutoBufferLow { get; set; }
public bool Processing { get; set; }
public string eduSTAR_SchoolId { get; set; }
public string eduSTAR_Username { get; set; }
}
}
@@ -1,87 +1,87 @@
@model Disco.Web.Areas.Config.Models.Config.IndexModel
@{
ViewBag.Title = "Configuration";
}
<table id="pageMenu">
<tr>
<td>
<div class="pageMenuArea">
<h2>Hosting</h2>
@Html.ActionLinkClass("System", MVC.Config.SystemConfig.Index(), "config")
<div class="pageMenuBlurb">
Update system configuration, such as the Data Storage Location and Proxy settings.
</div>
@Html.ActionLinkClass("Organisation Details", MVC.Config.Organisation.Index(), "config")
<div class="pageMenuBlurb">
Update the Organisation Name, Logo and Addresses associated with this organisation.
</div>
@Html.ActionLinkClass("Logging", MVC.Config.Logging.Index(), "config")
<div class="pageMenuBlurb">
Export Log files from various Disco Modules and view Live Logging.
</div>
</div>
</td>
<td>
<div class="pageMenuArea">
<h2>Devices</h2>
@Html.ActionLinkClass("Models", MVC.Config.DeviceModel.Index(), "config")
<div class="pageMenuBlurb">
Configure Components, Product Images and default settings for Device Models.
</div>
@Html.ActionLinkClass("Batches", MVC.Config.DeviceBatch.Index(), "config")
<div class="pageMenuBlurb">
Create and Configure Device Batches.
</div>
@Html.ActionLinkClass("Profiles", MVC.Config.DeviceProfile.Index(), "config")
<div class="pageMenuBlurb">
Configure Device Profiles including computer name generation, distribution and Active
Directory OU layout.
</div>
@Html.ActionLinkClass("Enrolment", MVC.Config.Enrolment.Index(), "config")
<div class="pageMenuBlurb">
Configure Enrolment settings including secure credentials.
</div>
</div>
</td>
<td>
<div class="pageMenuArea">
<h2>Features</h2>
@Html.ActionLinkClass("Document Templates", MVC.Config.DocumentTemplate.Index(), "config")
<div class="pageMenuBlurb">
Create, Update and Bulk Generate documents based on PDF Templates for Jobs, Devices
and Users.
</div>
@Html.ActionLinkClass("Plugins", MVC.Config.Plugins.Index(), "config")
<div class="pageMenuBlurb">
Manage extensions to the Disco platform.
</div>
</div>
</td>
</tr>
</table>
@{
if (Model.UpdateAvailable)
{
<div id="updateAvailableContainer">
<div>An updated version of Disco is available</div>
<a href="@Model.UpdateResponse.UrlLink" target="_blank">Download Disco v@(Model.UpdateResponse.Version)</a>
</div>
<script>
(function () {
$(function () {
var layout_PageHeading = $('#layout_PageHeading').height(80);
var updateAvailableContainer = $('#updateAvailableContainer');
updateAvailableContainer.appendTo(layout_PageHeading);
@{
if (Model.UpdateResponse.VersionReleasedTimestamp < DateTime.Now.AddDays(-7))
{
<text>
updateAvailableContainer.effect("shake", { times: 3 }, 100);
</text>
}
}
});
})();
</script>
}
@model Disco.Web.Areas.Config.Models.Config.IndexModel
@{
ViewBag.Title = "Configuration";
}
<table id="pageMenu">
<tr>
<td>
<div class="pageMenuArea">
<h2>Hosting</h2>
@Html.ActionLinkClass("System", MVC.Config.SystemConfig.Index(), "config")
<div class="pageMenuBlurb">
Update system configuration, such as the Data Storage Location and Proxy settings.
</div>
@Html.ActionLinkClass("Organisation Details", MVC.Config.Organisation.Index(), "config")
<div class="pageMenuBlurb">
Update the Organisation Name, Logo and Addresses associated with this organisation.
</div>
@Html.ActionLinkClass("Logging", MVC.Config.Logging.Index(), "config")
<div class="pageMenuBlurb">
Export Log files from various Disco Modules and view Live Logging.
</div>
</div>
</td>
<td>
<div class="pageMenuArea">
<h2>Devices</h2>
@Html.ActionLinkClass("Models", MVC.Config.DeviceModel.Index(), "config")
<div class="pageMenuBlurb">
Configure Components, Product Images and default settings for Device Models.
</div>
@Html.ActionLinkClass("Batches", MVC.Config.DeviceBatch.Index(), "config")
<div class="pageMenuBlurb">
Create and Configure Device Batches.
</div>
@Html.ActionLinkClass("Profiles", MVC.Config.DeviceProfile.Index(), "config")
<div class="pageMenuBlurb">
Configure Device Profiles including computer name generation, distribution and Active
Directory OU layout.
</div>
@Html.ActionLinkClass("Enrolment", MVC.Config.Enrolment.Index(), "config")
<div class="pageMenuBlurb">
Configure Enrolment settings including secure credentials.
</div>
</div>
</td>
<td>
<div class="pageMenuArea">
<h2>Features</h2>
@Html.ActionLinkClass("Document Templates", MVC.Config.DocumentTemplate.Index(), "config")
<div class="pageMenuBlurb">
Create, Update and Bulk Generate documents based on PDF Templates for Jobs, Devices
and Users.
</div>
@Html.ActionLinkClass("Plugins", MVC.Config.Plugins.Index(), "config")
<div class="pageMenuBlurb">
Manage extensions to the Disco platform.
</div>
</div>
</td>
</tr>
</table>
@{
if (Model.UpdateAvailable)
{
<div id="updateAvailableContainer">
<div>An updated version of Disco is available</div>
<a href="@Model.UpdateResponse.UrlLink" target="_blank">Download Disco v@(Model.UpdateResponse.Version)</a>
</div>
<script>
(function () {
$(function () {
var layout_PageHeading = $('#layout_PageHeading').height(80);
var updateAvailableContainer = $('#updateAvailableContainer');
updateAvailableContainer.appendTo(layout_PageHeading);
@{
if (Model.UpdateResponse.VersionReleasedTimestamp < DateTime.Now.AddDays(-7))
{
<text>
updateAvailableContainer.effect("shake", { times: 3 }, 100);
</text>
}
}
});
})();
</script>
}
}
@@ -1,304 +1,304 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.Config
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/Config/Index.cshtml")]
public class Index : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.Config.IndexModel>
{
public Index()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\Config\Index.cshtml"
ViewBag.Title = "Configuration";
#line default
#line hidden
WriteLiteral("\r\n<table");
WriteLiteral(" id=\"pageMenu\"");
WriteLiteral(">\r\n <tr>\r\n <td>\r\n <div");
WriteLiteral(" class=\"pageMenuArea\"");
WriteLiteral(">\r\n <h2>Hosting</h2>\r\n");
WriteLiteral(" ");
#line 10 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Html.ActionLinkClass("System", MVC.Config.SystemConfig.Index(), "config"));
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"pageMenuBlurb\"");
WriteLiteral(">\r\n Update system configuration, such as the Data Storage Loca" +
"tion and Proxy settings.\r\n </div>\r\n");
WriteLiteral(" ");
#line 14 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Html.ActionLinkClass("Organisation Details", MVC.Config.Organisation.Index(), "config"));
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"pageMenuBlurb\"");
WriteLiteral(">\r\n Update the Organisation Name, Logo and Addresses associate" +
"d with this organisation.\r\n </div>\r\n");
WriteLiteral(" ");
#line 18 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Html.ActionLinkClass("Logging", MVC.Config.Logging.Index(), "config"));
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"pageMenuBlurb\"");
WriteLiteral(">\r\n Export Log files from various Disco Modules and view Live " +
"Logging.\r\n </div>\r\n </div>\r\n </td>\r\n <td" +
">\r\n <div");
WriteLiteral(" class=\"pageMenuArea\"");
WriteLiteral(">\r\n <h2>Devices</h2>\r\n");
WriteLiteral(" ");
#line 27 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Html.ActionLinkClass("Models", MVC.Config.DeviceModel.Index(), "config"));
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"pageMenuBlurb\"");
WriteLiteral(">\r\n Configure Components, Product Images and default settings " +
"for Device Models.\r\n </div>\r\n");
WriteLiteral(" ");
#line 31 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Html.ActionLinkClass("Batches", MVC.Config.DeviceBatch.Index(), "config"));
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"pageMenuBlurb\"");
WriteLiteral(">\r\n Create and Configure Device Batches.\r\n </di" +
"v>\r\n");
WriteLiteral(" ");
#line 35 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Html.ActionLinkClass("Profiles", MVC.Config.DeviceProfile.Index(), "config"));
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"pageMenuBlurb\"");
WriteLiteral(">\r\n Configure Device Profiles including computer name generati" +
"on, distribution and Active\r\n Directory OU layout.\r\n " +
" </div>\r\n");
WriteLiteral(" ");
#line 40 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Html.ActionLinkClass("Enrolment", MVC.Config.Enrolment.Index(), "config"));
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"pageMenuBlurb\"");
WriteLiteral(">\r\n Configure Enrolment settings including secure credentials." +
"\r\n </div>\r\n </div>\r\n </td>\r\n <td>\r\n " +
" <div");
WriteLiteral(" class=\"pageMenuArea\"");
WriteLiteral(">\r\n <h2>Features</h2>\r\n");
WriteLiteral(" ");
#line 49 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Html.ActionLinkClass("Document Templates", MVC.Config.DocumentTemplate.Index(), "config"));
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"pageMenuBlurb\"");
WriteLiteral(">\r\n Create, Update and Bulk Generate documents based on PDF Te" +
"mplates for Jobs, Devices\r\n and Users.\r\n </div" +
">\r\n");
WriteLiteral(" ");
#line 54 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Html.ActionLinkClass("Plugins", MVC.Config.Plugins.Index(), "config"));
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"pageMenuBlurb\"");
WriteLiteral(">\r\n Manage extensions to the Disco platform.\r\n " +
"</div>\r\n </div>\r\n </td>\r\n </tr>\r\n</table>\r\n");
#line 62 "..\..\Areas\Config\Views\Config\Index.cshtml"
if (Model.UpdateAvailable)
{
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" id=\"updateAvailableContainer\"");
WriteLiteral(">\r\n <div>An updated version of Disco is available</div>\r\n <a");
WriteAttribute("href", Tuple.Create(" href=\"", 3034), Tuple.Create("\"", 3070)
#line 67 "..\..\Areas\Config\Views\Config\Index.cshtml"
, Tuple.Create(Tuple.Create("", 3041), Tuple.Create<System.Object, System.Int32>(Model.UpdateResponse.UrlLink
#line default
#line hidden
, 3041), false)
);
WriteLiteral(" target=\"_blank\"");
WriteLiteral(">Download Disco v");
#line 67 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Model.UpdateResponse.Version);
#line default
#line hidden
WriteLiteral("</a>\r\n </div>\r\n");
WriteLiteral(@" <script>
(function () {
$(function () {
var layout_PageHeading = $('#layout_PageHeading').height(80);
var updateAvailableContainer = $('#updateAvailableContainer');
updateAvailableContainer.appendTo(layout_PageHeading);
");
#line 75 "..\..\Areas\Config\Views\Config\Index.cshtml"
#line default
#line hidden
#line 75 "..\..\Areas\Config\Views\Config\Index.cshtml"
if (Model.UpdateResponse.VersionReleasedTimestamp < DateTime.Now.AddDays(-7))
{
#line default
#line hidden
WriteLiteral(" ");
WriteLiteral("\r\n updateAvailableContainer.effect(\"shake\", { times: 3 }, 100);\r\n " +
" ");
WriteLiteral("\r\n");
#line 81 "..\..\Areas\Config\Views\Config\Index.cshtml"
}
#line default
#line hidden
WriteLiteral("\r\n });\r\n })();\r\n </script>\r\n");
#line 86 "..\..\Areas\Config\Views\Config\Index.cshtml"
}
#line default
#line hidden
}
}
}
#pragma warning restore 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.Config
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/Config/Index.cshtml")]
public class Index : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.Config.IndexModel>
{
public Index()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\Config\Index.cshtml"
ViewBag.Title = "Configuration";
#line default
#line hidden
WriteLiteral("\r\n<table");
WriteLiteral(" id=\"pageMenu\"");
WriteLiteral(">\r\n <tr>\r\n <td>\r\n <div");
WriteLiteral(" class=\"pageMenuArea\"");
WriteLiteral(">\r\n <h2>Hosting</h2>\r\n");
WriteLiteral(" ");
#line 10 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Html.ActionLinkClass("System", MVC.Config.SystemConfig.Index(), "config"));
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"pageMenuBlurb\"");
WriteLiteral(">\r\n Update system configuration, such as the Data Storage Loca" +
"tion and Proxy settings.\r\n </div>\r\n");
WriteLiteral(" ");
#line 14 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Html.ActionLinkClass("Organisation Details", MVC.Config.Organisation.Index(), "config"));
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"pageMenuBlurb\"");
WriteLiteral(">\r\n Update the Organisation Name, Logo and Addresses associate" +
"d with this organisation.\r\n </div>\r\n");
WriteLiteral(" ");
#line 18 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Html.ActionLinkClass("Logging", MVC.Config.Logging.Index(), "config"));
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"pageMenuBlurb\"");
WriteLiteral(">\r\n Export Log files from various Disco Modules and view Live " +
"Logging.\r\n </div>\r\n </div>\r\n </td>\r\n <td" +
">\r\n <div");
WriteLiteral(" class=\"pageMenuArea\"");
WriteLiteral(">\r\n <h2>Devices</h2>\r\n");
WriteLiteral(" ");
#line 27 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Html.ActionLinkClass("Models", MVC.Config.DeviceModel.Index(), "config"));
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"pageMenuBlurb\"");
WriteLiteral(">\r\n Configure Components, Product Images and default settings " +
"for Device Models.\r\n </div>\r\n");
WriteLiteral(" ");
#line 31 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Html.ActionLinkClass("Batches", MVC.Config.DeviceBatch.Index(), "config"));
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"pageMenuBlurb\"");
WriteLiteral(">\r\n Create and Configure Device Batches.\r\n </di" +
"v>\r\n");
WriteLiteral(" ");
#line 35 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Html.ActionLinkClass("Profiles", MVC.Config.DeviceProfile.Index(), "config"));
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"pageMenuBlurb\"");
WriteLiteral(">\r\n Configure Device Profiles including computer name generati" +
"on, distribution and Active\r\n Directory OU layout.\r\n " +
" </div>\r\n");
WriteLiteral(" ");
#line 40 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Html.ActionLinkClass("Enrolment", MVC.Config.Enrolment.Index(), "config"));
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"pageMenuBlurb\"");
WriteLiteral(">\r\n Configure Enrolment settings including secure credentials." +
"\r\n </div>\r\n </div>\r\n </td>\r\n <td>\r\n " +
" <div");
WriteLiteral(" class=\"pageMenuArea\"");
WriteLiteral(">\r\n <h2>Features</h2>\r\n");
WriteLiteral(" ");
#line 49 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Html.ActionLinkClass("Document Templates", MVC.Config.DocumentTemplate.Index(), "config"));
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"pageMenuBlurb\"");
WriteLiteral(">\r\n Create, Update and Bulk Generate documents based on PDF Te" +
"mplates for Jobs, Devices\r\n and Users.\r\n </div" +
">\r\n");
WriteLiteral(" ");
#line 54 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Html.ActionLinkClass("Plugins", MVC.Config.Plugins.Index(), "config"));
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"pageMenuBlurb\"");
WriteLiteral(">\r\n Manage extensions to the Disco platform.\r\n " +
"</div>\r\n </div>\r\n </td>\r\n </tr>\r\n</table>\r\n");
#line 62 "..\..\Areas\Config\Views\Config\Index.cshtml"
if (Model.UpdateAvailable)
{
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" id=\"updateAvailableContainer\"");
WriteLiteral(">\r\n <div>An updated version of Disco is available</div>\r\n <a");
WriteAttribute("href", Tuple.Create(" href=\"", 3034), Tuple.Create("\"", 3070)
#line 67 "..\..\Areas\Config\Views\Config\Index.cshtml"
, Tuple.Create(Tuple.Create("", 3041), Tuple.Create<System.Object, System.Int32>(Model.UpdateResponse.UrlLink
#line default
#line hidden
, 3041), false)
);
WriteLiteral(" target=\"_blank\"");
WriteLiteral(">Download Disco v");
#line 67 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Model.UpdateResponse.Version);
#line default
#line hidden
WriteLiteral("</a>\r\n </div>\r\n");
WriteLiteral(@" <script>
(function () {
$(function () {
var layout_PageHeading = $('#layout_PageHeading').height(80);
var updateAvailableContainer = $('#updateAvailableContainer');
updateAvailableContainer.appendTo(layout_PageHeading);
");
#line 75 "..\..\Areas\Config\Views\Config\Index.cshtml"
#line default
#line hidden
#line 75 "..\..\Areas\Config\Views\Config\Index.cshtml"
if (Model.UpdateResponse.VersionReleasedTimestamp < DateTime.Now.AddDays(-7))
{
#line default
#line hidden
WriteLiteral(" ");
WriteLiteral("\r\n updateAvailableContainer.effect(\"shake\", { times: 3 }, 100);\r\n " +
" ");
WriteLiteral("\r\n");
#line 81 "..\..\Areas\Config\Views\Config\Index.cshtml"
}
#line default
#line hidden
WriteLiteral("\r\n });\r\n })();\r\n </script>\r\n");
#line 86 "..\..\Areas\Config\Views\Config\Index.cshtml"
}
#line default
#line hidden
}
}
}
#pragma warning restore 1591
@@ -1,39 +1,39 @@
@model Disco.Models.Repository.DeviceBatch
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), "Create");
}
@using (Html.BeginForm())
{
<div class="form" style="width: 450px">
<table>
<tr>
<th>
Name:
</th>
<td>
@Html.EditorFor(model => model.Name)<br />@Html.ValidationMessageFor(model => model.Name)
</td>
</tr>
<tr>
<th>
Purchase Date:
</th>
<td>@Html.EditorFor(model => model.PurchaseDate)<br />@Html.ValidationMessageFor(model => model.PurchaseDate)
</td>
</tr>
</table>
<p class="actions">
<input type="submit" class="button" value="Create" />
</p>
</div>
<script type="text/javascript">
$(function () {
$('#Name').focus().select();
$('#PurchaseDate').datepicker({
changeYear: true,
changeMonth: true,
dateFormat: 'yy/mm/dd'
})
});
</script>
}
@model Disco.Models.Repository.DeviceBatch
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), "Create");
}
@using (Html.BeginForm())
{
<div class="form" style="width: 450px">
<table>
<tr>
<th>
Name:
</th>
<td>
@Html.EditorFor(model => model.Name)<br />@Html.ValidationMessageFor(model => model.Name)
</td>
</tr>
<tr>
<th>
Purchase Date:
</th>
<td>@Html.EditorFor(model => model.PurchaseDate)<br />@Html.ValidationMessageFor(model => model.PurchaseDate)
</td>
</tr>
</table>
<p class="actions">
<input type="submit" class="button" value="Create" />
</p>
</div>
<script type="text/javascript">
$(function () {
$('#Name').focus().select();
$('#PurchaseDate').datepicker({
changeYear: true,
changeMonth: true,
dateFormat: 'yy/mm/dd'
})
});
</script>
}
@@ -1,148 +1,148 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceBatch
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceBatch/Create.cshtml")]
public class Create : System.Web.Mvc.WebViewPage<Disco.Models.Repository.DeviceBatch>
{
public Create()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), "Create");
#line default
#line hidden
WriteLiteral("\r\n");
#line 5 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
using (Html.BeginForm())
{
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 450px\"");
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n N" +
"ame:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 14 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
Write(Html.EditorFor(model => model.Name));
#line default
#line hidden
WriteLiteral("<br />");
#line 14 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
Write(Html.ValidationMessageFor(model => model.Name));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
">\r\n Purchase Date:\r\n </th>\r\n <t" +
"d>");
#line 21 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
Write(Html.EditorFor(model => model.PurchaseDate));
#line default
#line hidden
WriteLiteral("<br />");
#line 21 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
Write(Html.ValidationMessageFor(model => model.PurchaseDate));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n <p");
WriteLiteral(" class=\"actions\"");
WriteLiteral(">\r\n <input");
WriteLiteral(" type=\"submit\"");
WriteLiteral(" class=\"button\"");
WriteLiteral(" value=\"Create\"");
WriteLiteral(" />\r\n </p>\r\n </div>\r\n");
WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
$('#Name').focus().select();
$('#PurchaseDate').datepicker({
changeYear: true,
changeMonth: true,
dateFormat: 'yy/mm/dd'
})
});
</script>
");
#line 39 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
}
#line default
#line hidden
}
}
}
#pragma warning restore 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceBatch
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceBatch/Create.cshtml")]
public class Create : System.Web.Mvc.WebViewPage<Disco.Models.Repository.DeviceBatch>
{
public Create()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), "Create");
#line default
#line hidden
WriteLiteral("\r\n");
#line 5 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
using (Html.BeginForm())
{
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 450px\"");
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n N" +
"ame:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 14 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
Write(Html.EditorFor(model => model.Name));
#line default
#line hidden
WriteLiteral("<br />");
#line 14 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
Write(Html.ValidationMessageFor(model => model.Name));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
">\r\n Purchase Date:\r\n </th>\r\n <t" +
"d>");
#line 21 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
Write(Html.EditorFor(model => model.PurchaseDate));
#line default
#line hidden
WriteLiteral("<br />");
#line 21 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
Write(Html.ValidationMessageFor(model => model.PurchaseDate));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n <p");
WriteLiteral(" class=\"actions\"");
WriteLiteral(">\r\n <input");
WriteLiteral(" type=\"submit\"");
WriteLiteral(" class=\"button\"");
WriteLiteral(" value=\"Create\"");
WriteLiteral(" />\r\n </p>\r\n </div>\r\n");
WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
$('#Name').focus().select();
$('#PurchaseDate').datepicker({
changeYear: true,
changeMonth: true,
dateFormat: 'yy/mm/dd'
})
});
</script>
");
#line 39 "..\..\Areas\Config\Views\DeviceBatch\Create.cshtml"
}
#line default
#line hidden
}
}
}
#pragma warning restore 1591
@@ -1,69 +1,69 @@
@model Disco.Web.Areas.Config.Models.DeviceBatch.IndexModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches");
}
<table class="tableData">
<tr>
<th>
Name
</th>
<th>
Default Model
</th>
<th>
Purchase Date
</th>
<th>
Warranty Expires
</th>
<th>
Insurance Expires
</th>
<th>
Device Count
</th>
</tr>
@foreach (var item in Model.DeviceBatches)
{
<tr>
<td>
@Html.ActionLink(item.Name, MVC.Config.DeviceBatch.Index(item.Id))
</td>
<td>
@item.DefaultDeviceModel
</td>
<td>
@CommonHelpers.FriendlyDate(item.PurchaseDate)
</td>
<td>
@CommonHelpers.FriendlyDate(item.WarrantyExpires, "Unknown")
</td>
<td>
@CommonHelpers.FriendlyDate(item.InsuredUntil, item.InsuranceSupplier == null ? "N/A" : "Unknown")
@(item.InsuranceSupplier == null ? string.Empty : string.Format("[{0}]", item.InsuranceSupplier))
</td>
<td>
@if (item.PurchaseUnitQuantity.HasValue)
{
<span>@item.DeviceCount.ToString("n0")/@(item.PurchaseUnitQuantity.Value.ToString("n0"))</span>
}
else
{
@item.DeviceCount.ToString("n0")
}
@if (item.DeviceDecommissionedCount > 0)
{
<span class="smallMessage" title="@(item.DeviceDecommissionedCount) Decommissioned">
(@(item.DeviceDecommissionedCount))</span>
}
</td>
</tr>
}
</table>
<div class="actionBar">
@if (Model.DeviceBatches.Count > 0)
{
@Html.ActionLinkButton("Timeline", MVC.Config.DeviceBatch.Timeline())
}
@Html.ActionLinkButton("Create Device Batch", MVC.Config.DeviceBatch.Create())
</div>
@model Disco.Web.Areas.Config.Models.DeviceBatch.IndexModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches");
}
<table class="tableData">
<tr>
<th>
Name
</th>
<th>
Default Model
</th>
<th>
Purchase Date
</th>
<th>
Warranty Expires
</th>
<th>
Insurance Expires
</th>
<th>
Device Count
</th>
</tr>
@foreach (var item in Model.DeviceBatches)
{
<tr>
<td>
@Html.ActionLink(item.Name, MVC.Config.DeviceBatch.Index(item.Id))
</td>
<td>
@item.DefaultDeviceModel
</td>
<td>
@CommonHelpers.FriendlyDate(item.PurchaseDate)
</td>
<td>
@CommonHelpers.FriendlyDate(item.WarrantyExpires, "Unknown")
</td>
<td>
@CommonHelpers.FriendlyDate(item.InsuredUntil, item.InsuranceSupplier == null ? "N/A" : "Unknown")
@(item.InsuranceSupplier == null ? string.Empty : string.Format("[{0}]", item.InsuranceSupplier))
</td>
<td>
@if (item.PurchaseUnitQuantity.HasValue)
{
<span>@item.DeviceCount.ToString("n0")/@(item.PurchaseUnitQuantity.Value.ToString("n0"))</span>
}
else
{
@item.DeviceCount.ToString("n0")
}
@if (item.DeviceDecommissionedCount > 0)
{
<span class="smallMessage" title="@(item.DeviceDecommissionedCount) Decommissioned">
(@(item.DeviceDecommissionedCount))</span>
}
</td>
</tr>
}
</table>
<div class="actionBar">
@if (Model.DeviceBatches.Count > 0)
{
@Html.ActionLinkButton("Timeline", MVC.Config.DeviceBatch.Timeline())
}
@Html.ActionLinkButton("Create Device Batch", MVC.Config.DeviceBatch.Create())
</div>
@@ -1,319 +1,319 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceBatch
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceBatch/Index.cshtml")]
public class Index : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceBatch.IndexModel>
{
public Index()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches");
#line default
#line hidden
WriteLiteral("\r\n<table");
WriteLiteral(" class=\"tableData\"");
WriteLiteral(@">
<tr>
<th>
Name
</th>
<th>
Default Model
</th>
<th>
Purchase Date
</th>
<th>
Warranty Expires
</th>
<th>
Insurance Expires
</th>
<th>
Device Count
</th>
</tr>
");
#line 26 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
#line default
#line hidden
#line 26 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
foreach (var item in Model.DeviceBatches)
{
#line default
#line hidden
WriteLiteral(" <tr>\r\n <td>\r\n");
WriteLiteral(" ");
#line 30 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(Html.ActionLink(item.Name, MVC.Config.DeviceBatch.Index(item.Id)));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 33 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(item.DefaultDeviceModel);
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 36 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(CommonHelpers.FriendlyDate(item.PurchaseDate));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 39 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(CommonHelpers.FriendlyDate(item.WarrantyExpires, "Unknown"));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 42 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(CommonHelpers.FriendlyDate(item.InsuredUntil, item.InsuranceSupplier == null ? "N/A" : "Unknown"));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 43 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(item.InsuranceSupplier == null ? string.Empty : string.Format("[{0}]", item.InsuranceSupplier));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
#line 46 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
#line default
#line hidden
#line 46 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
if (item.PurchaseUnitQuantity.HasValue)
{
#line default
#line hidden
WriteLiteral(" <span>");
#line 48 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(item.DeviceCount.ToString("n0"));
#line default
#line hidden
WriteLiteral("/");
#line 48 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(item.PurchaseUnitQuantity.Value.ToString("n0"));
#line default
#line hidden
WriteLiteral("</span>\r\n");
#line 49 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
}
else
{
#line default
#line hidden
#line 52 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(item.DeviceCount.ToString("n0"));
#line default
#line hidden
#line 52 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
}
#line default
#line hidden
WriteLiteral(" ");
#line 54 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
if (item.DeviceDecommissionedCount > 0)
{
#line default
#line hidden
WriteLiteral(" <span");
WriteLiteral(" class=\"smallMessage\"");
WriteAttribute("title", Tuple.Create(" title=\"", 1775), Tuple.Create("\"", 1831)
#line 56 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
, Tuple.Create(Tuple.Create("", 1783), Tuple.Create<System.Object, System.Int32>(item.DeviceDecommissionedCount
#line default
#line hidden
, 1783), false)
, Tuple.Create(Tuple.Create(" ", 1816), Tuple.Create("Decommissioned", 1817), true)
);
WriteLiteral(">\r\n (");
#line 57 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(item.DeviceDecommissionedCount);
#line default
#line hidden
WriteLiteral(")</span>\r\n");
#line 58 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n");
#line 61 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
}
#line default
#line hidden
WriteLiteral("</table>\r\n<div");
WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n");
#line 64 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
#line default
#line hidden
#line 64 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
if (Model.DeviceBatches.Count > 0)
{
#line default
#line hidden
#line 66 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(Html.ActionLinkButton("Timeline", MVC.Config.DeviceBatch.Timeline()));
#line default
#line hidden
#line 66 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
}
#line default
#line hidden
WriteLiteral(" ");
#line 68 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(Html.ActionLinkButton("Create Device Batch", MVC.Config.DeviceBatch.Create()));
#line default
#line hidden
WriteLiteral("\r\n</div>\r\n");
}
}
}
#pragma warning restore 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceBatch
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceBatch/Index.cshtml")]
public class Index : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceBatch.IndexModel>
{
public Index()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches");
#line default
#line hidden
WriteLiteral("\r\n<table");
WriteLiteral(" class=\"tableData\"");
WriteLiteral(@">
<tr>
<th>
Name
</th>
<th>
Default Model
</th>
<th>
Purchase Date
</th>
<th>
Warranty Expires
</th>
<th>
Insurance Expires
</th>
<th>
Device Count
</th>
</tr>
");
#line 26 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
#line default
#line hidden
#line 26 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
foreach (var item in Model.DeviceBatches)
{
#line default
#line hidden
WriteLiteral(" <tr>\r\n <td>\r\n");
WriteLiteral(" ");
#line 30 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(Html.ActionLink(item.Name, MVC.Config.DeviceBatch.Index(item.Id)));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 33 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(item.DefaultDeviceModel);
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 36 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(CommonHelpers.FriendlyDate(item.PurchaseDate));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 39 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(CommonHelpers.FriendlyDate(item.WarrantyExpires, "Unknown"));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 42 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(CommonHelpers.FriendlyDate(item.InsuredUntil, item.InsuranceSupplier == null ? "N/A" : "Unknown"));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 43 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(item.InsuranceSupplier == null ? string.Empty : string.Format("[{0}]", item.InsuranceSupplier));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
#line 46 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
#line default
#line hidden
#line 46 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
if (item.PurchaseUnitQuantity.HasValue)
{
#line default
#line hidden
WriteLiteral(" <span>");
#line 48 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(item.DeviceCount.ToString("n0"));
#line default
#line hidden
WriteLiteral("/");
#line 48 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(item.PurchaseUnitQuantity.Value.ToString("n0"));
#line default
#line hidden
WriteLiteral("</span>\r\n");
#line 49 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
}
else
{
#line default
#line hidden
#line 52 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(item.DeviceCount.ToString("n0"));
#line default
#line hidden
#line 52 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
}
#line default
#line hidden
WriteLiteral(" ");
#line 54 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
if (item.DeviceDecommissionedCount > 0)
{
#line default
#line hidden
WriteLiteral(" <span");
WriteLiteral(" class=\"smallMessage\"");
WriteAttribute("title", Tuple.Create(" title=\"", 1775), Tuple.Create("\"", 1831)
#line 56 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
, Tuple.Create(Tuple.Create("", 1783), Tuple.Create<System.Object, System.Int32>(item.DeviceDecommissionedCount
#line default
#line hidden
, 1783), false)
, Tuple.Create(Tuple.Create(" ", 1816), Tuple.Create("Decommissioned", 1817), true)
);
WriteLiteral(">\r\n (");
#line 57 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(item.DeviceDecommissionedCount);
#line default
#line hidden
WriteLiteral(")</span>\r\n");
#line 58 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n");
#line 61 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
}
#line default
#line hidden
WriteLiteral("</table>\r\n<div");
WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n");
#line 64 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
#line default
#line hidden
#line 64 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
if (Model.DeviceBatches.Count > 0)
{
#line default
#line hidden
#line 66 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(Html.ActionLinkButton("Timeline", MVC.Config.DeviceBatch.Timeline()));
#line default
#line hidden
#line 66 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
}
#line default
#line hidden
WriteLiteral(" ");
#line 68 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
Write(Html.ActionLinkButton("Create Device Batch", MVC.Config.DeviceBatch.Create()));
#line default
#line hidden
WriteLiteral("\r\n</div>\r\n");
}
}
}
#pragma warning restore 1591
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,122 +1,122 @@
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), "Timeline");
Html.BundleDeferred("~/Style/Timeline");
Html.BundleDeferred("~/ClientScripts/Modules/Timeline");
}
<div id="deviceBatchesTimeline" style="height: 550px;">
</div>
<script type="text/javascript">
(function () {
var dataUrl = '@(Url.Action(MVC.API.DeviceBatch.Timeline()))';
var tl;
$(function () {
var eventSource = new Timeline.DefaultEventSource();
var currentDate = new Date();
currentDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDay(), 10, 0, 0);
var tomorrowDate = new Date();
tomorrowDate.setDate(currentDate.getDate() + 1);
var sixMonthsDate = new Date();
sixMonthsDate.setDate(currentDate.getDate());
sixMonthsDate.setMonth(currentDate.getMonth() + 6);
var hotZoneStart1 = new Date(currentDate.getFullYear(), 0, 1, 10, 0, 0);
var hotZoneEnd1 = new Date(currentDate.getFullYear(), 11, 31, 10, 0, 0);
var hotZoneStart2 = new Date(currentDate.getFullYear() + 1, 0, 1, 10, 0, 0);
var hotZoneEnd2 = new Date(currentDate.getFullYear() + 1, 11, 31, 10, 0, 0);
//hotZoneEnd.setDate(hotZoneEnd.getDate() - 1);
//hotZoneStart = hotZoneStart.toLocaleDateString();
//hotZoneEnd = hotZoneEnd.toLocaleDateString();
var bandInfos = [
Timeline.createHotZoneBandInfo({
zones: [
{
start: hotZoneStart1,
end: hotZoneEnd1,
magnify: 4,
unit: Timeline.DateTime.MONTH
},
{
start: hotZoneStart2,
end: hotZoneEnd2,
magnify: 4,
unit: Timeline.DateTime.MONTH
}
],
eventSource: eventSource,
width: "85%",
intervalUnit: Timeline.DateTime.YEAR,
intervalPixels: 150,
timeZone: 10,
date: sixMonthsDate
}),
Timeline.createBandInfo({
eventSource: eventSource,
width: "15%",
intervalUnit: Timeline.DateTime.YEAR,
intervalPixels: 150,
overview: true,
timeZone: 10,
date: sixMonthsDate
})
];
bandInfos[1].syncWith = 0;
bandInfos[1].highlight = true;
for (var i = 0; i < bandInfos.length; i++) {
bandInfos[i].decorators = [
new Timeline.SpanHighlightDecorator({
startDate: currentDate,
endDate: tomorrowDate,
color: "#CC2222",
opacity: 50
}),
new Timeline.SpanHighlightDecorator({
startDate: hotZoneStart1,
endDate: hotZoneEnd1,
color: "#CEA5A5",
opacity: 50
}),
new Timeline.SpanHighlightDecorator({
startDate: hotZoneStart2,
endDate: hotZoneEnd2,
color: "#CCB7B7",
opacity: 50
})
];
}
tl = Timeline.create($('#deviceBatchesTimeline')[0], bandInfos);
var tlResizeLayoutHandle = null;
$(window).resize(function () {
if (tlResizeLayoutHandle)
window.clearTimeout(tlResizeLayoutHandle);
tlResizeLayoutHandle = window.setTimeout(function () {
tlResizeLayoutHandle = null;
tl.layout();
}, 500);
});
// Load Events
$.ajax({
url: dataUrl,
dataType: 'json',
type: 'POST',
success: function (data) {
eventSource.loadJSON(data, dataUrl);
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to load Timeline Data: ' + errorThrown);
}
});
});
})();
</script>
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), "Timeline");
Html.BundleDeferred("~/Style/Timeline");
Html.BundleDeferred("~/ClientScripts/Modules/Timeline");
}
<div id="deviceBatchesTimeline" style="height: 550px;">
</div>
<script type="text/javascript">
(function () {
var dataUrl = '@(Url.Action(MVC.API.DeviceBatch.Timeline()))';
var tl;
$(function () {
var eventSource = new Timeline.DefaultEventSource();
var currentDate = new Date();
currentDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDay(), 10, 0, 0);
var tomorrowDate = new Date();
tomorrowDate.setDate(currentDate.getDate() + 1);
var sixMonthsDate = new Date();
sixMonthsDate.setDate(currentDate.getDate());
sixMonthsDate.setMonth(currentDate.getMonth() + 6);
var hotZoneStart1 = new Date(currentDate.getFullYear(), 0, 1, 10, 0, 0);
var hotZoneEnd1 = new Date(currentDate.getFullYear(), 11, 31, 10, 0, 0);
var hotZoneStart2 = new Date(currentDate.getFullYear() + 1, 0, 1, 10, 0, 0);
var hotZoneEnd2 = new Date(currentDate.getFullYear() + 1, 11, 31, 10, 0, 0);
//hotZoneEnd.setDate(hotZoneEnd.getDate() - 1);
//hotZoneStart = hotZoneStart.toLocaleDateString();
//hotZoneEnd = hotZoneEnd.toLocaleDateString();
var bandInfos = [
Timeline.createHotZoneBandInfo({
zones: [
{
start: hotZoneStart1,
end: hotZoneEnd1,
magnify: 4,
unit: Timeline.DateTime.MONTH
},
{
start: hotZoneStart2,
end: hotZoneEnd2,
magnify: 4,
unit: Timeline.DateTime.MONTH
}
],
eventSource: eventSource,
width: "85%",
intervalUnit: Timeline.DateTime.YEAR,
intervalPixels: 150,
timeZone: 10,
date: sixMonthsDate
}),
Timeline.createBandInfo({
eventSource: eventSource,
width: "15%",
intervalUnit: Timeline.DateTime.YEAR,
intervalPixels: 150,
overview: true,
timeZone: 10,
date: sixMonthsDate
})
];
bandInfos[1].syncWith = 0;
bandInfos[1].highlight = true;
for (var i = 0; i < bandInfos.length; i++) {
bandInfos[i].decorators = [
new Timeline.SpanHighlightDecorator({
startDate: currentDate,
endDate: tomorrowDate,
color: "#CC2222",
opacity: 50
}),
new Timeline.SpanHighlightDecorator({
startDate: hotZoneStart1,
endDate: hotZoneEnd1,
color: "#CEA5A5",
opacity: 50
}),
new Timeline.SpanHighlightDecorator({
startDate: hotZoneStart2,
endDate: hotZoneEnd2,
color: "#CCB7B7",
opacity: 50
})
];
}
tl = Timeline.create($('#deviceBatchesTimeline')[0], bandInfos);
var tlResizeLayoutHandle = null;
$(window).resize(function () {
if (tlResizeLayoutHandle)
window.clearTimeout(tlResizeLayoutHandle);
tlResizeLayoutHandle = window.setTimeout(function () {
tlResizeLayoutHandle = null;
tl.layout();
}, 500);
});
// Load Events
$.ajax({
url: dataUrl,
dataType: 'json',
type: 'POST',
success: function (data) {
eventSource.loadJSON(data, dataUrl);
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to load Timeline Data: ' + errorThrown);
}
});
});
})();
</script>
@@ -1,131 +1,131 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceBatch
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceBatch/Timeline.cshtml")]
public class Timeline : System.Web.Mvc.WebViewPage<dynamic>
{
public Timeline()
{
}
public override void Execute()
{
#line 1 "..\..\Areas\Config\Views\DeviceBatch\Timeline.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), "Timeline");
Html.BundleDeferred("~/Style/Timeline");
Html.BundleDeferred("~/ClientScripts/Modules/Timeline");
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" id=\"deviceBatchesTimeline\"");
WriteLiteral(" style=\"height: 550px;\"");
WriteLiteral(">\r\n</div>\r\n<script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n (function () {\r\n var dataUrl = \'");
#line 10 "..\..\Areas\Config\Views\DeviceBatch\Timeline.cshtml"
Write(Url.Action(MVC.API.DeviceBatch.Timeline()));
#line default
#line hidden
WriteLiteral("\';\r\n var tl;\r\n\r\n $(function () {\r\n\r\n var eventSource = n" +
"ew Timeline.DefaultEventSource();\r\n\r\n var currentDate = new Date();\r\n" +
" currentDate = new Date(currentDate.getFullYear(), currentDate.getMon" +
"th(), currentDate.getDay(), 10, 0, 0);\r\n var tomorrowDate = new Date(" +
");\r\n tomorrowDate.setDate(currentDate.getDate() + 1);\r\n va" +
"r sixMonthsDate = new Date();\r\n sixMonthsDate.setDate(currentDate.get" +
"Date());\r\n sixMonthsDate.setMonth(currentDate.getMonth() + 6);\r\n " +
" \r\n var hotZoneStart1 = new Date(currentDate.getFullYear(), 0, " +
"1, 10, 0, 0);\r\n var hotZoneEnd1 = new Date(currentDate.getFullYear()," +
" 11, 31, 10, 0, 0);\r\n var hotZoneStart2 = new Date(currentDate.getFul" +
"lYear() + 1, 0, 1, 10, 0, 0);\r\n var hotZoneEnd2 = new Date(currentDat" +
"e.getFullYear() + 1, 11, 31, 10, 0, 0);\r\n //hotZoneEnd.setDate(hotZon" +
"eEnd.getDate() - 1);\r\n\r\n //hotZoneStart = hotZoneStart.toLocaleDateSt" +
"ring();\r\n //hotZoneEnd = hotZoneEnd.toLocaleDateString();\r\n\r\n\r\n " +
" var bandInfos = [\r\n Timeline.createHotZoneBandInfo({\r\n " +
" zones: [\r\n {\r\n start: h" +
"otZoneStart1,\r\n end: hotZoneEnd1,\r\n " +
" magnify: 4,\r\n unit: Timeline.DateTime.MONTH\r\n " +
" },\r\n {\r\n start: hotZoneStart" +
"2,\r\n end: hotZoneEnd2,\r\n magnify: " +
"4,\r\n unit: Timeline.DateTime.MONTH\r\n }" +
"\r\n ],\r\n eventSource: eventSource,\r\n " +
" width: \"85%\",\r\n intervalUnit: Timeline.DateTime." +
"YEAR,\r\n intervalPixels: 150,\r\n timeZone: 1" +
"0,\r\n date: sixMonthsDate\r\n }),\r\n " +
" Timeline.createBandInfo({\r\n eventSource: eventSource,\r\n " +
" width: \"15%\",\r\n intervalUnit: Timeline.DateTi" +
"me.YEAR,\r\n intervalPixels: 150,\r\n overview" +
": true,\r\n timeZone: 10,\r\n date: sixMonthsD" +
"ate\r\n })\r\n ];\r\n bandInfos[1].syncWith = 0;\r" +
"\n bandInfos[1].highlight = true;\r\n\r\n for (var i = 0; i < b" +
"andInfos.length; i++) {\r\n bandInfos[i].decorators = [\r\n " +
" new Timeline.SpanHighlightDecorator({\r\n startDa" +
"te: currentDate,\r\n endDate: tomorrowDate,\r\n " +
" color: \"#CC2222\",\r\n opacity: 50\r\n " +
" }),\r\n new Timeline.SpanHighlightDecorator({\r\n " +
" startDate: hotZoneStart1,\r\n endDate: hotZon" +
"eEnd1,\r\n color: \"#CEA5A5\",\r\n opaci" +
"ty: 50\r\n }),\r\n new Timeline.SpanHighlightD" +
"ecorator({\r\n startDate: hotZoneStart2,\r\n " +
" endDate: hotZoneEnd2,\r\n color: \"#CCB7B7\",\r\n " +
" opacity: 50\r\n })\r\n ];\r\n " +
" }\r\n\r\n tl = Timeline.create($(\'#deviceBatchesTimeline\')[0], band" +
"Infos);\r\n\r\n var tlResizeLayoutHandle = null;\r\n $(window).r" +
"esize(function () {\r\n if (tlResizeLayoutHandle)\r\n " +
" window.clearTimeout(tlResizeLayoutHandle);\r\n tlResizeLayoutHa" +
"ndle = window.setTimeout(function () {\r\n tlResizeLayoutHandle" +
" = null;\r\n tl.layout();\r\n }, 500);\r\n " +
" });\r\n\r\n // Load Events\r\n $.ajax({\r\n url: " +
"dataUrl,\r\n dataType: \'json\',\r\n type: \'POST\',\r\n " +
" success: function (data) {\r\n eventSource.loadJSON" +
"(data, dataUrl);\r\n },\r\n error: function (jqXHR, te" +
"xtStatus, errorThrown) {\r\n alert(\'Unable to load Timeline Dat" +
"a: \' + errorThrown);\r\n }\r\n });\r\n });\r\n\r\n })(" +
");\r\n\r\n</script>\r\n");
}
}
}
#pragma warning restore 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceBatch
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceBatch/Timeline.cshtml")]
public class Timeline : System.Web.Mvc.WebViewPage<dynamic>
{
public Timeline()
{
}
public override void Execute()
{
#line 1 "..\..\Areas\Config\Views\DeviceBatch\Timeline.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), "Timeline");
Html.BundleDeferred("~/Style/Timeline");
Html.BundleDeferred("~/ClientScripts/Modules/Timeline");
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" id=\"deviceBatchesTimeline\"");
WriteLiteral(" style=\"height: 550px;\"");
WriteLiteral(">\r\n</div>\r\n<script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n (function () {\r\n var dataUrl = \'");
#line 10 "..\..\Areas\Config\Views\DeviceBatch\Timeline.cshtml"
Write(Url.Action(MVC.API.DeviceBatch.Timeline()));
#line default
#line hidden
WriteLiteral("\';\r\n var tl;\r\n\r\n $(function () {\r\n\r\n var eventSource = n" +
"ew Timeline.DefaultEventSource();\r\n\r\n var currentDate = new Date();\r\n" +
" currentDate = new Date(currentDate.getFullYear(), currentDate.getMon" +
"th(), currentDate.getDay(), 10, 0, 0);\r\n var tomorrowDate = new Date(" +
");\r\n tomorrowDate.setDate(currentDate.getDate() + 1);\r\n va" +
"r sixMonthsDate = new Date();\r\n sixMonthsDate.setDate(currentDate.get" +
"Date());\r\n sixMonthsDate.setMonth(currentDate.getMonth() + 6);\r\n " +
" \r\n var hotZoneStart1 = new Date(currentDate.getFullYear(), 0, " +
"1, 10, 0, 0);\r\n var hotZoneEnd1 = new Date(currentDate.getFullYear()," +
" 11, 31, 10, 0, 0);\r\n var hotZoneStart2 = new Date(currentDate.getFul" +
"lYear() + 1, 0, 1, 10, 0, 0);\r\n var hotZoneEnd2 = new Date(currentDat" +
"e.getFullYear() + 1, 11, 31, 10, 0, 0);\r\n //hotZoneEnd.setDate(hotZon" +
"eEnd.getDate() - 1);\r\n\r\n //hotZoneStart = hotZoneStart.toLocaleDateSt" +
"ring();\r\n //hotZoneEnd = hotZoneEnd.toLocaleDateString();\r\n\r\n\r\n " +
" var bandInfos = [\r\n Timeline.createHotZoneBandInfo({\r\n " +
" zones: [\r\n {\r\n start: h" +
"otZoneStart1,\r\n end: hotZoneEnd1,\r\n " +
" magnify: 4,\r\n unit: Timeline.DateTime.MONTH\r\n " +
" },\r\n {\r\n start: hotZoneStart" +
"2,\r\n end: hotZoneEnd2,\r\n magnify: " +
"4,\r\n unit: Timeline.DateTime.MONTH\r\n }" +
"\r\n ],\r\n eventSource: eventSource,\r\n " +
" width: \"85%\",\r\n intervalUnit: Timeline.DateTime." +
"YEAR,\r\n intervalPixels: 150,\r\n timeZone: 1" +
"0,\r\n date: sixMonthsDate\r\n }),\r\n " +
" Timeline.createBandInfo({\r\n eventSource: eventSource,\r\n " +
" width: \"15%\",\r\n intervalUnit: Timeline.DateTi" +
"me.YEAR,\r\n intervalPixels: 150,\r\n overview" +
": true,\r\n timeZone: 10,\r\n date: sixMonthsD" +
"ate\r\n })\r\n ];\r\n bandInfos[1].syncWith = 0;\r" +
"\n bandInfos[1].highlight = true;\r\n\r\n for (var i = 0; i < b" +
"andInfos.length; i++) {\r\n bandInfos[i].decorators = [\r\n " +
" new Timeline.SpanHighlightDecorator({\r\n startDa" +
"te: currentDate,\r\n endDate: tomorrowDate,\r\n " +
" color: \"#CC2222\",\r\n opacity: 50\r\n " +
" }),\r\n new Timeline.SpanHighlightDecorator({\r\n " +
" startDate: hotZoneStart1,\r\n endDate: hotZon" +
"eEnd1,\r\n color: \"#CEA5A5\",\r\n opaci" +
"ty: 50\r\n }),\r\n new Timeline.SpanHighlightD" +
"ecorator({\r\n startDate: hotZoneStart2,\r\n " +
" endDate: hotZoneEnd2,\r\n color: \"#CCB7B7\",\r\n " +
" opacity: 50\r\n })\r\n ];\r\n " +
" }\r\n\r\n tl = Timeline.create($(\'#deviceBatchesTimeline\')[0], band" +
"Infos);\r\n\r\n var tlResizeLayoutHandle = null;\r\n $(window).r" +
"esize(function () {\r\n if (tlResizeLayoutHandle)\r\n " +
" window.clearTimeout(tlResizeLayoutHandle);\r\n tlResizeLayoutHa" +
"ndle = window.setTimeout(function () {\r\n tlResizeLayoutHandle" +
" = null;\r\n tl.layout();\r\n }, 500);\r\n " +
" });\r\n\r\n // Load Events\r\n $.ajax({\r\n url: " +
"dataUrl,\r\n dataType: \'json\',\r\n type: \'POST\',\r\n " +
" success: function (data) {\r\n eventSource.loadJSON" +
"(data, dataUrl);\r\n },\r\n error: function (jqXHR, te" +
"xtStatus, errorThrown) {\r\n alert(\'Unable to load Timeline Dat" +
"a: \' + errorThrown);\r\n }\r\n });\r\n });\r\n\r\n })(" +
");\r\n\r\n</script>\r\n");
}
}
}
#pragma warning restore 1591
@@ -1,5 +1,5 @@
@model Disco.Web.Areas.Config.Models.DeviceModel.DeviceComponentsModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Models", MVC.Config.DeviceModel.Index(null), "Generic Components");
}
@model Disco.Web.Areas.Config.Models.DeviceModel.DeviceComponentsModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Models", MVC.Config.DeviceModel.Index(null), "Generic Components");
}
@Html.Partial(MVC.Config.DeviceModel.Views._DeviceComponentsTable, Model)
@@ -1,63 +1,63 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceModel
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceModel/GenericComponents.cshtml")]
public class GenericComponents : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceModel.DeviceComponentsModel>
{
public GenericComponents()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceModel\GenericComponents.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Models", MVC.Config.DeviceModel.Index(null), "Generic Components");
#line default
#line hidden
WriteLiteral("\r\n");
#line 5 "..\..\Areas\Config\Views\DeviceModel\GenericComponents.cshtml"
Write(Html.Partial(MVC.Config.DeviceModel.Views._DeviceComponentsTable, Model));
#line default
#line hidden
}
}
}
#pragma warning restore 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceModel
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceModel/GenericComponents.cshtml")]
public class GenericComponents : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceModel.DeviceComponentsModel>
{
public GenericComponents()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceModel\GenericComponents.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Models", MVC.Config.DeviceModel.Index(null), "Generic Components");
#line default
#line hidden
WriteLiteral("\r\n");
#line 5 "..\..\Areas\Config\Views\DeviceModel\GenericComponents.cshtml"
Write(Html.Partial(MVC.Config.DeviceModel.Views._DeviceComponentsTable, Model));
#line default
#line hidden
}
}
}
#pragma warning restore 1591
@@ -1,46 +1,46 @@
@model Disco.Web.Areas.Config.Models.DeviceModel.IndexModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Models");
}
<table class="tableData">
<tr>
<th>
Name/Description
</th>
<th>
Manufacturer
</th>
<th>
Model
</th>
<th>
Type
</th>
<th>
Device Count
</th>
</tr>
@foreach (var item in Model.DeviceModels)
{
<tr>
<td>
@Html.ActionLink(item.ToString(), MVC.Config.DeviceModel.Index(item.Id))
</td>
<td>
@Html.DisplayFor(modelItem => item.Manufacturer)
</td>
<td>
@Html.DisplayFor(modelItem => item.Model)
</td>
<td>
@Html.DisplayFor(modelItem => item.ModelType)
</td>
<td>
@item.DeviceCount.ToString("n0")
</td>
</tr>
}
</table>
<div class="actionBar">
@Html.ActionLinkButton("Generic Components", MVC.Config.DeviceModel.GenericComponents())
@model Disco.Web.Areas.Config.Models.DeviceModel.IndexModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Models");
}
<table class="tableData">
<tr>
<th>
Name/Description
</th>
<th>
Manufacturer
</th>
<th>
Model
</th>
<th>
Type
</th>
<th>
Device Count
</th>
</tr>
@foreach (var item in Model.DeviceModels)
{
<tr>
<td>
@Html.ActionLink(item.ToString(), MVC.Config.DeviceModel.Index(item.Id))
</td>
<td>
@Html.DisplayFor(modelItem => item.Manufacturer)
</td>
<td>
@Html.DisplayFor(modelItem => item.Model)
</td>
<td>
@Html.DisplayFor(modelItem => item.ModelType)
</td>
<td>
@item.DeviceCount.ToString("n0")
</td>
</tr>
}
</table>
<div class="actionBar">
@Html.ActionLinkButton("Generic Components", MVC.Config.DeviceModel.GenericComponents())
</div>
@@ -1,173 +1,173 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceModel
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceModel/Index.cshtml")]
public class Index : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceModel.IndexModel>
{
public Index()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Models");
#line default
#line hidden
WriteLiteral("\r\n<table");
WriteLiteral(" class=\"tableData\"");
WriteLiteral(@">
<tr>
<th>
Name/Description
</th>
<th>
Manufacturer
</th>
<th>
Model
</th>
<th>
Type
</th>
<th>
Device Count
</th>
</tr>
");
#line 23 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
#line default
#line hidden
#line 23 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
foreach (var item in Model.DeviceModels)
{
#line default
#line hidden
WriteLiteral(" <tr>\r\n <td>\r\n");
WriteLiteral(" ");
#line 27 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
Write(Html.ActionLink(item.ToString(), MVC.Config.DeviceModel.Index(item.Id)));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 30 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
Write(Html.DisplayFor(modelItem => item.Manufacturer));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 33 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
Write(Html.DisplayFor(modelItem => item.Model));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 36 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
Write(Html.DisplayFor(modelItem => item.ModelType));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 39 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
Write(item.DeviceCount.ToString("n0"));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
#line 42 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
}
#line default
#line hidden
WriteLiteral("</table>\r\n<div");
WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 45 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
Write(Html.ActionLinkButton("Generic Components", MVC.Config.DeviceModel.GenericComponents()));
#line default
#line hidden
WriteLiteral("\r\n</div>");
}
}
}
#pragma warning restore 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceModel
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceModel/Index.cshtml")]
public class Index : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceModel.IndexModel>
{
public Index()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Models");
#line default
#line hidden
WriteLiteral("\r\n<table");
WriteLiteral(" class=\"tableData\"");
WriteLiteral(@">
<tr>
<th>
Name/Description
</th>
<th>
Manufacturer
</th>
<th>
Model
</th>
<th>
Type
</th>
<th>
Device Count
</th>
</tr>
");
#line 23 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
#line default
#line hidden
#line 23 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
foreach (var item in Model.DeviceModels)
{
#line default
#line hidden
WriteLiteral(" <tr>\r\n <td>\r\n");
WriteLiteral(" ");
#line 27 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
Write(Html.ActionLink(item.ToString(), MVC.Config.DeviceModel.Index(item.Id)));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 30 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
Write(Html.DisplayFor(modelItem => item.Manufacturer));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 33 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
Write(Html.DisplayFor(modelItem => item.Model));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 36 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
Write(Html.DisplayFor(modelItem => item.ModelType));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 39 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
Write(item.DeviceCount.ToString("n0"));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
#line 42 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
}
#line default
#line hidden
WriteLiteral("</table>\r\n<div");
WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 45 "..\..\Areas\Config\Views\DeviceModel\Index.cshtml"
Write(Html.ActionLinkButton("Generic Components", MVC.Config.DeviceModel.GenericComponents()));
#line default
#line hidden
WriteLiteral("\r\n</div>");
}
}
}
#pragma warning restore 1591
@@ -1,205 +1,205 @@
@model Disco.Web.Areas.Config.Models.DeviceModel.ShowModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Models", MVC.Config.DeviceModel.Index(null), Model.DeviceModel.ToString());
}
<div class="form" style="width: 530px">
<table>
<tr>
<th style="width: 150px">
Id:
</th>
<td>
@Html.DisplayFor(model => model.DeviceModel.Id)
</td>
</tr>
<tr>
<th>
Description:
</th>
<td>@Html.EditorFor(model => model.DeviceModel.Description)
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
</td>
</tr>
<tr>
<th>
Manufacturer:
</th>
<td>
@Html.DisplayFor(model => model.DeviceModel.Manufacturer)
</td>
</tr>
<tr>
<th>
Model:
</th>
<td>
@Html.DisplayFor(model => model.DeviceModel.Model)
</td>
</tr>
<tr>
<th>
Default Purchase Date:
</th>
<td>
@Html.EditorFor(model => model.DeviceModel.DefaultPurchaseDate)
@AjaxHelpers.AjaxLoader()
</td>
</tr>
<tr>
<th>
Default Warranty Provider:
</th>
<td>
@Html.DropDownListFor(model => model.DeviceModel.DefaultWarrantyProvider, Model.WarrantyProviders.ToSelectListItems(Model.DeviceModel.DefaultWarrantyProvider, true, "None"))
@AjaxHelpers.AjaxLoader()
</td>
</tr>
<tr>
<th>
Type:
</th>
<td>
@Html.DisplayFor(model => model.DeviceModel.ModelType)
</td>
</tr>
<tr>
<th>
Image:
</th>
<td>
<img alt="Model Image" src="@Url.Action(MVC.API.DeviceModel.Image(Model.DeviceModel.Id, Model.DeviceModel.ImageHash()))" />
</td>
</tr>
<tr>
<th>
<label for="DeviceModel_Image">
Update Image:
</label>
</th>
<td>
@using (Html.BeginForm(MVC.API.DeviceModel.Image(Model.DeviceModel.Id, true, null), FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<input type="file" name="Image" id="Image" style="width: 250px;" />
<input class="button" type="submit" value="Update" />
}
</td>
</tr>
</table>
<script type="text/javascript">
$(function () {
var $Description = $('#DeviceModel_Description');
var $DescriptionAjaxSave = $Description.next('.ajaxSave');
$Description
.watermark('Model Description')
.focus(function () { $Description.select() })
.keydown(function (e) {
$DescriptionAjaxSave.show();
if (e.which == 13) {
$(this).blur();
}
}).blur(function () {
$DescriptionAjaxSave.hide();
})
.change(function () {
$DescriptionAjaxSave.hide();
var $ajaxLoading = $DescriptionAjaxSave.next('.ajaxLoading').show();
var data = { Description: $Description.val() };
$.ajax({
url: '@Url.Action(MVC.API.DeviceModel.UpdateDescription(Model.DeviceModel.Id))',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to update description: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update description: ' + textStatus);
$ajaxLoading.hide();
}
});
});
});
</script>
<script type="text/javascript">
$(function () {
var $dataField = $('#DeviceModel_DefaultPurchaseDate');
var $ajaxLoading = $dataField.next('.ajaxLoading');
var dateFieldValue = $dataField.val();
var dateFieldChangeToken = null;
$dataField
.watermark('None')
.datepicker({
changeYear: true,
changeMonth: true,
dateFormat: 'yy/mm/dd'
})
.change(function () {
var dateText = $dataField.val();
if (dateFieldValue.toLowerCase() != dateText.toLowerCase()) {
dateFieldValue = dateText;
if (dateFieldChangeToken)
window.clearTimeout(dateFieldChangeToken);
dateFieldChangeToken = window.setTimeout(function () {
$ajaxLoading.show();
var data = {};
data['DefaultPurchaseDate'] = dateFieldValue;
$.getJSON('@(Url.Action(MVC.API.DeviceModel.UpdateDefaultPurchaseDate(Model.DeviceModel.Id)))', data, function (response, result) {
if (result != 'success' || response != 'OK') {
alert('Unable to change Date:\n' + response);
$ajaxLoading.hide();
} else {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
}
})
dateFieldChangeToken = null;
}, 500);
}
}).focus(function () {
$(this).select();
});
});
</script>
<script type="text/javascript">
$(function () {
var $DefaultWarrantyProvider = $('#DeviceModel_DefaultWarrantyProvider');
var $ajaxLoading = $DefaultWarrantyProvider.next('.ajaxLoading');
$DefaultWarrantyProvider
.change(function () {
$ajaxLoading.show();
var data = { DefaultWarrantyProvider: $DefaultWarrantyProvider.val() };
$.ajax({
url: '@Url.Action(MVC.API.DeviceModel.UpdateDefaultWarrantyProvider(Model.DeviceModel.Id))',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to default warranty provider: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to default warranty provider: ' + textStatus);
$ajaxLoading.hide();
}
});
});
});
</script>
</div>
<h2>
Components</h2>
@Html.Partial(MVC.Config.DeviceModel.Views._DeviceComponentsTable, Model.DeviceComponentsModel)
<div class="actionBar">
@if (Model.CanDelete)
{
@Html.ActionLinkButton("Delete", MVC.API.DeviceModel.Delete(Model.DeviceModel.Id, true), "buttonDelete")
}
@Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceModel.Id.ToString(), "DeviceModel"))
</div>
@model Disco.Web.Areas.Config.Models.DeviceModel.ShowModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Models", MVC.Config.DeviceModel.Index(null), Model.DeviceModel.ToString());
}
<div class="form" style="width: 530px">
<table>
<tr>
<th style="width: 150px">
Id:
</th>
<td>
@Html.DisplayFor(model => model.DeviceModel.Id)
</td>
</tr>
<tr>
<th>
Description:
</th>
<td>@Html.EditorFor(model => model.DeviceModel.Description)
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
</td>
</tr>
<tr>
<th>
Manufacturer:
</th>
<td>
@Html.DisplayFor(model => model.DeviceModel.Manufacturer)
</td>
</tr>
<tr>
<th>
Model:
</th>
<td>
@Html.DisplayFor(model => model.DeviceModel.Model)
</td>
</tr>
<tr>
<th>
Default Purchase Date:
</th>
<td>
@Html.EditorFor(model => model.DeviceModel.DefaultPurchaseDate)
@AjaxHelpers.AjaxLoader()
</td>
</tr>
<tr>
<th>
Default Warranty Provider:
</th>
<td>
@Html.DropDownListFor(model => model.DeviceModel.DefaultWarrantyProvider, Model.WarrantyProviders.ToSelectListItems(Model.DeviceModel.DefaultWarrantyProvider, true, "None"))
@AjaxHelpers.AjaxLoader()
</td>
</tr>
<tr>
<th>
Type:
</th>
<td>
@Html.DisplayFor(model => model.DeviceModel.ModelType)
</td>
</tr>
<tr>
<th>
Image:
</th>
<td>
<img alt="Model Image" src="@Url.Action(MVC.API.DeviceModel.Image(Model.DeviceModel.Id, Model.DeviceModel.ImageHash()))" />
</td>
</tr>
<tr>
<th>
<label for="DeviceModel_Image">
Update Image:
</label>
</th>
<td>
@using (Html.BeginForm(MVC.API.DeviceModel.Image(Model.DeviceModel.Id, true, null), FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<input type="file" name="Image" id="Image" style="width: 250px;" />
<input class="button" type="submit" value="Update" />
}
</td>
</tr>
</table>
<script type="text/javascript">
$(function () {
var $Description = $('#DeviceModel_Description');
var $DescriptionAjaxSave = $Description.next('.ajaxSave');
$Description
.watermark('Model Description')
.focus(function () { $Description.select() })
.keydown(function (e) {
$DescriptionAjaxSave.show();
if (e.which == 13) {
$(this).blur();
}
}).blur(function () {
$DescriptionAjaxSave.hide();
})
.change(function () {
$DescriptionAjaxSave.hide();
var $ajaxLoading = $DescriptionAjaxSave.next('.ajaxLoading').show();
var data = { Description: $Description.val() };
$.ajax({
url: '@Url.Action(MVC.API.DeviceModel.UpdateDescription(Model.DeviceModel.Id))',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to update description: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update description: ' + textStatus);
$ajaxLoading.hide();
}
});
});
});
</script>
<script type="text/javascript">
$(function () {
var $dataField = $('#DeviceModel_DefaultPurchaseDate');
var $ajaxLoading = $dataField.next('.ajaxLoading');
var dateFieldValue = $dataField.val();
var dateFieldChangeToken = null;
$dataField
.watermark('None')
.datepicker({
changeYear: true,
changeMonth: true,
dateFormat: 'yy/mm/dd'
})
.change(function () {
var dateText = $dataField.val();
if (dateFieldValue.toLowerCase() != dateText.toLowerCase()) {
dateFieldValue = dateText;
if (dateFieldChangeToken)
window.clearTimeout(dateFieldChangeToken);
dateFieldChangeToken = window.setTimeout(function () {
$ajaxLoading.show();
var data = {};
data['DefaultPurchaseDate'] = dateFieldValue;
$.getJSON('@(Url.Action(MVC.API.DeviceModel.UpdateDefaultPurchaseDate(Model.DeviceModel.Id)))', data, function (response, result) {
if (result != 'success' || response != 'OK') {
alert('Unable to change Date:\n' + response);
$ajaxLoading.hide();
} else {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
}
})
dateFieldChangeToken = null;
}, 500);
}
}).focus(function () {
$(this).select();
});
});
</script>
<script type="text/javascript">
$(function () {
var $DefaultWarrantyProvider = $('#DeviceModel_DefaultWarrantyProvider');
var $ajaxLoading = $DefaultWarrantyProvider.next('.ajaxLoading');
$DefaultWarrantyProvider
.change(function () {
$ajaxLoading.show();
var data = { DefaultWarrantyProvider: $DefaultWarrantyProvider.val() };
$.ajax({
url: '@Url.Action(MVC.API.DeviceModel.UpdateDefaultWarrantyProvider(Model.DeviceModel.Id))',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to default warranty provider: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to default warranty provider: ' + textStatus);
$ajaxLoading.hide();
}
});
});
});
</script>
</div>
<h2>
Components</h2>
@Html.Partial(MVC.Config.DeviceModel.Views._DeviceComponentsTable, Model.DeviceComponentsModel)
<div class="actionBar">
@if (Model.CanDelete)
{
@Html.ActionLinkButton("Delete", MVC.API.DeviceModel.Delete(Model.DeviceModel.Id, true), "buttonDelete")
}
@Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceModel.Id.ToString(), "DeviceModel"))
</div>
@@ -1,458 +1,458 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceModel
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceModel/Show.cshtml")]
public class Show : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceModel.ShowModel>
{
public Show()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Models", MVC.Config.DeviceModel.Index(null), Model.DeviceModel.ToString());
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 530px\"");
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th");
WriteLiteral(" style=\"width: 150px\"");
WriteLiteral(">\r\n Id:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 12 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.DisplayFor(model => model.DeviceModel.Id));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Description:\r\n </th>\r\n <td>");
#line 19 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceModel.Description));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 20 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 21 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Manufacturer:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 29 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.DisplayFor(model => model.DeviceModel.Manufacturer));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Model:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 37 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.DisplayFor(model => model.DeviceModel.Model));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Default Purchase Date:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 45 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceModel.DefaultPurchaseDate));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 46 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Default Warranty Provider:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 54 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.DropDownListFor(model => model.DeviceModel.DefaultWarrantyProvider, Model.WarrantyProviders.ToSelectListItems(Model.DeviceModel.DefaultWarrantyProvider, true, "None")));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 55 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Type:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 63 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.DisplayFor(model => model.DeviceModel.ModelType));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Image:\r\n </th>\r\n <td>\r\n <img");
WriteLiteral(" alt=\"Model Image\"");
WriteAttribute("src", Tuple.Create(" src=\"", 2151), Tuple.Create("\"", 2248)
#line 71 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
, Tuple.Create(Tuple.Create("", 2157), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(Model.DeviceModel.Id, Model.DeviceModel.ImageHash()))
#line default
#line hidden
, 2157), false)
);
WriteLiteral(" />\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" <label");
WriteLiteral(" for=\"DeviceModel_Image\"");
WriteLiteral(">\r\n Update Image:\r\n </label>\r\n </th>" +
"\r\n <td>\r\n");
#line 81 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line default
#line hidden
#line 81 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
using (Html.BeginForm(MVC.API.DeviceModel.Image(Model.DeviceModel.Id, true, null), FormMethod.Post, new { enctype = "multipart/form-data" }))
{
#line default
#line hidden
WriteLiteral(" <input");
WriteLiteral(" type=\"file\"");
WriteLiteral(" name=\"Image\"");
WriteLiteral(" id=\"Image\"");
WriteLiteral(" style=\"width: 250px;\"");
WriteLiteral(" />\r\n");
WriteLiteral(" <input");
WriteLiteral(" class=\"button\"");
WriteLiteral(" type=\"submit\"");
WriteLiteral(" value=\"Update\"");
WriteLiteral(" />\r\n");
#line 85 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n </table>\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
var $Description = $('#DeviceModel_Description');
var $DescriptionAjaxSave = $Description.next('.ajaxSave');
$Description
.watermark('Model Description')
.focus(function () { $Description.select() })
.keydown(function (e) {
$DescriptionAjaxSave.show();
if (e.which == 13) {
$(this).blur();
}
}).blur(function () {
$DescriptionAjaxSave.hide();
})
.change(function () {
$DescriptionAjaxSave.hide();
var $ajaxLoading = $DescriptionAjaxSave.next('.ajaxLoading').show();
var data = { Description: $Description.val() };
$.ajax({
url: '");
#line 109 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Url.Action(MVC.API.DeviceModel.UpdateDescription(Model.DeviceModel.Id)));
#line default
#line hidden
WriteLiteral(@"',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to update description: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update description: ' + textStatus);
$ajaxLoading.hide();
}
});
});
});
</script>
<script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
var $dataField = $('#DeviceModel_DefaultPurchaseDate');
var $ajaxLoading = $dataField.next('.ajaxLoading');
var dateFieldValue = $dataField.val();
var dateFieldChangeToken = null;
$dataField
.watermark('None')
.datepicker({
changeYear: true,
changeMonth: true,
dateFormat: 'yy/mm/dd'
})
.change(function () {
var dateText = $dataField.val();
if (dateFieldValue.toLowerCase() != dateText.toLowerCase()) {
dateFieldValue = dateText;
if (dateFieldChangeToken)
window.clearTimeout(dateFieldChangeToken);
dateFieldChangeToken = window.setTimeout(function () {
$ajaxLoading.show();
var data = {};
data['DefaultPurchaseDate'] = dateFieldValue;
$.getJSON('");
#line 151 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Url.Action(MVC.API.DeviceModel.UpdateDefaultPurchaseDate(Model.DeviceModel.Id)));
#line default
#line hidden
WriteLiteral(@"', data, function (response, result) {
if (result != 'success' || response != 'OK') {
alert('Unable to change Date:\n' + response);
$ajaxLoading.hide();
} else {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
}
})
dateFieldChangeToken = null;
}, 500);
}
}).focus(function () {
$(this).select();
});
});
</script>
<script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
var $DefaultWarrantyProvider = $('#DeviceModel_DefaultWarrantyProvider');
var $ajaxLoading = $DefaultWarrantyProvider.next('.ajaxLoading');
$DefaultWarrantyProvider
.change(function () {
$ajaxLoading.show();
var data = { DefaultWarrantyProvider: $DefaultWarrantyProvider.val() };
$.ajax({
url: '");
#line 176 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Url.Action(MVC.API.DeviceModel.UpdateDefaultWarrantyProvider(Model.DeviceModel.Id)));
#line default
#line hidden
WriteLiteral(@"',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to default warranty provider: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to default warranty provider: ' + textStatus);
$ajaxLoading.hide();
}
});
});
});
</script>
</div>
<h2>
Components</h2>
");
#line 198 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.Partial(MVC.Config.DeviceModel.Views._DeviceComponentsTable, Model.DeviceComponentsModel));
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n");
#line 200 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line default
#line hidden
#line 200 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
if (Model.CanDelete)
{
#line default
#line hidden
#line 202 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.ActionLinkButton("Delete", MVC.API.DeviceModel.Delete(Model.DeviceModel.Id, true), "buttonDelete"));
#line default
#line hidden
#line 202 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
}
#line default
#line hidden
WriteLiteral(" ");
#line 204 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceModel.Id.ToString(), "DeviceModel")));
#line default
#line hidden
WriteLiteral("\r\n</div>\r\n");
}
}
}
#pragma warning restore 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceModel
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceModel/Show.cshtml")]
public class Show : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceModel.ShowModel>
{
public Show()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Models", MVC.Config.DeviceModel.Index(null), Model.DeviceModel.ToString());
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 530px\"");
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th");
WriteLiteral(" style=\"width: 150px\"");
WriteLiteral(">\r\n Id:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 12 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.DisplayFor(model => model.DeviceModel.Id));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Description:\r\n </th>\r\n <td>");
#line 19 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceModel.Description));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 20 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 21 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Manufacturer:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 29 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.DisplayFor(model => model.DeviceModel.Manufacturer));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Model:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 37 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.DisplayFor(model => model.DeviceModel.Model));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Default Purchase Date:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 45 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.EditorFor(model => model.DeviceModel.DefaultPurchaseDate));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 46 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Default Warranty Provider:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 54 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.DropDownListFor(model => model.DeviceModel.DefaultWarrantyProvider, Model.WarrantyProviders.ToSelectListItems(Model.DeviceModel.DefaultWarrantyProvider, true, "None")));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 55 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Type:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 63 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.DisplayFor(model => model.DeviceModel.ModelType));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" Image:\r\n </th>\r\n <td>\r\n <img");
WriteLiteral(" alt=\"Model Image\"");
WriteAttribute("src", Tuple.Create(" src=\"", 2151), Tuple.Create("\"", 2248)
#line 71 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
, Tuple.Create(Tuple.Create("", 2157), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(Model.DeviceModel.Id, Model.DeviceModel.ImageHash()))
#line default
#line hidden
, 2157), false)
);
WriteLiteral(" />\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>\r\n " +
" <label");
WriteLiteral(" for=\"DeviceModel_Image\"");
WriteLiteral(">\r\n Update Image:\r\n </label>\r\n </th>" +
"\r\n <td>\r\n");
#line 81 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line default
#line hidden
#line 81 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
using (Html.BeginForm(MVC.API.DeviceModel.Image(Model.DeviceModel.Id, true, null), FormMethod.Post, new { enctype = "multipart/form-data" }))
{
#line default
#line hidden
WriteLiteral(" <input");
WriteLiteral(" type=\"file\"");
WriteLiteral(" name=\"Image\"");
WriteLiteral(" id=\"Image\"");
WriteLiteral(" style=\"width: 250px;\"");
WriteLiteral(" />\r\n");
WriteLiteral(" <input");
WriteLiteral(" class=\"button\"");
WriteLiteral(" type=\"submit\"");
WriteLiteral(" value=\"Update\"");
WriteLiteral(" />\r\n");
#line 85 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n </table>\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
var $Description = $('#DeviceModel_Description');
var $DescriptionAjaxSave = $Description.next('.ajaxSave');
$Description
.watermark('Model Description')
.focus(function () { $Description.select() })
.keydown(function (e) {
$DescriptionAjaxSave.show();
if (e.which == 13) {
$(this).blur();
}
}).blur(function () {
$DescriptionAjaxSave.hide();
})
.change(function () {
$DescriptionAjaxSave.hide();
var $ajaxLoading = $DescriptionAjaxSave.next('.ajaxLoading').show();
var data = { Description: $Description.val() };
$.ajax({
url: '");
#line 109 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Url.Action(MVC.API.DeviceModel.UpdateDescription(Model.DeviceModel.Id)));
#line default
#line hidden
WriteLiteral(@"',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to update description: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update description: ' + textStatus);
$ajaxLoading.hide();
}
});
});
});
</script>
<script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
var $dataField = $('#DeviceModel_DefaultPurchaseDate');
var $ajaxLoading = $dataField.next('.ajaxLoading');
var dateFieldValue = $dataField.val();
var dateFieldChangeToken = null;
$dataField
.watermark('None')
.datepicker({
changeYear: true,
changeMonth: true,
dateFormat: 'yy/mm/dd'
})
.change(function () {
var dateText = $dataField.val();
if (dateFieldValue.toLowerCase() != dateText.toLowerCase()) {
dateFieldValue = dateText;
if (dateFieldChangeToken)
window.clearTimeout(dateFieldChangeToken);
dateFieldChangeToken = window.setTimeout(function () {
$ajaxLoading.show();
var data = {};
data['DefaultPurchaseDate'] = dateFieldValue;
$.getJSON('");
#line 151 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Url.Action(MVC.API.DeviceModel.UpdateDefaultPurchaseDate(Model.DeviceModel.Id)));
#line default
#line hidden
WriteLiteral(@"', data, function (response, result) {
if (result != 'success' || response != 'OK') {
alert('Unable to change Date:\n' + response);
$ajaxLoading.hide();
} else {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
}
})
dateFieldChangeToken = null;
}, 500);
}
}).focus(function () {
$(this).select();
});
});
</script>
<script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
var $DefaultWarrantyProvider = $('#DeviceModel_DefaultWarrantyProvider');
var $ajaxLoading = $DefaultWarrantyProvider.next('.ajaxLoading');
$DefaultWarrantyProvider
.change(function () {
$ajaxLoading.show();
var data = { DefaultWarrantyProvider: $DefaultWarrantyProvider.val() };
$.ajax({
url: '");
#line 176 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Url.Action(MVC.API.DeviceModel.UpdateDefaultWarrantyProvider(Model.DeviceModel.Id)));
#line default
#line hidden
WriteLiteral(@"',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to default warranty provider: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to default warranty provider: ' + textStatus);
$ajaxLoading.hide();
}
});
});
});
</script>
</div>
<h2>
Components</h2>
");
#line 198 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.Partial(MVC.Config.DeviceModel.Views._DeviceComponentsTable, Model.DeviceComponentsModel));
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n");
#line 200 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
#line default
#line hidden
#line 200 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
if (Model.CanDelete)
{
#line default
#line hidden
#line 202 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.ActionLinkButton("Delete", MVC.API.DeviceModel.Delete(Model.DeviceModel.Id, true), "buttonDelete"));
#line default
#line hidden
#line 202 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
}
#line default
#line hidden
WriteLiteral(" ");
#line 204 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
Write(Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceModel.Id.ToString(), "DeviceModel")));
#line default
#line hidden
WriteLiteral("\r\n</div>\r\n");
}
}
}
#pragma warning restore 1591
@@ -1,43 +1,43 @@
@model Disco.Models.Repository.DeviceProfile
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Profiles", MVC.Config.DeviceProfile.Index(null), "Create");
}
@using (Html.BeginForm())
{
<div class="form" style="width: 450px">
<table>
<tr>
<th>
Name:
</th>
<td>
@Html.TextBoxFor(model => model.Name)<br />@Html.ValidationMessageFor(model => model.Name)
</td>
</tr>
<tr>
<th>
Short Name:
</th>
<td>@Html.TextBoxFor(model => model.ShortName)<br />@Html.ValidationMessageFor(model => model.ShortName)
</td>
</tr>
<tr>
<th>
Description:
</th>
<td>@Html.TextBoxFor(model => model.Description)<br />@Html.ValidationMessageFor(model => model.Description)
</td>
</tr>
</table>
<input type="hidden" name="ComputerNameTemplate" value="DeviceProfile.ShortName + '-' + SerialNumber" />
<input type="hidden" name="ProvisionADAccount" value="True" />
<p class="actions">
<input type="submit" class="button" value="Create" />
</p>
</div>
<script type="text/javascript">
$(function () {
$('#Name').focus().select();
});
</script>
}
@model Disco.Models.Repository.DeviceProfile
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Profiles", MVC.Config.DeviceProfile.Index(null), "Create");
}
@using (Html.BeginForm())
{
<div class="form" style="width: 450px">
<table>
<tr>
<th>
Name:
</th>
<td>
@Html.TextBoxFor(model => model.Name)<br />@Html.ValidationMessageFor(model => model.Name)
</td>
</tr>
<tr>
<th>
Short Name:
</th>
<td>@Html.TextBoxFor(model => model.ShortName)<br />@Html.ValidationMessageFor(model => model.ShortName)
</td>
</tr>
<tr>
<th>
Description:
</th>
<td>@Html.TextBoxFor(model => model.Description)<br />@Html.ValidationMessageFor(model => model.Description)
</td>
</tr>
</table>
<input type="hidden" name="ComputerNameTemplate" value="DeviceProfile.ShortName + '-' + SerialNumber" />
<input type="hidden" name="ProvisionADAccount" value="True" />
<p class="actions">
<input type="submit" class="button" value="Create" />
</p>
</div>
<script type="text/javascript">
$(function () {
$('#Name').focus().select();
});
</script>
}
@@ -1,174 +1,174 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceProfile
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceProfile/Create.cshtml")]
public class Create : System.Web.Mvc.WebViewPage<Disco.Models.Repository.DeviceProfile>
{
public Create()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Profiles", MVC.Config.DeviceProfile.Index(null), "Create");
#line default
#line hidden
WriteLiteral("\r\n");
#line 5 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
using (Html.BeginForm())
{
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 450px\"");
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n N" +
"ame:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 14 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
Write(Html.TextBoxFor(model => model.Name));
#line default
#line hidden
WriteLiteral("<br />");
#line 14 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
Write(Html.ValidationMessageFor(model => model.Name));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
">\r\n Short Name:\r\n </th>\r\n <td>");
#line 21 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
Write(Html.TextBoxFor(model => model.ShortName));
#line default
#line hidden
WriteLiteral("<br />");
#line 21 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
Write(Html.ValidationMessageFor(model => model.ShortName));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
">\r\n Description:\r\n </th>\r\n <td>" +
"");
#line 28 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
Write(Html.TextBoxFor(model => model.Description));
#line default
#line hidden
WriteLiteral("<br />");
#line 28 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
Write(Html.ValidationMessageFor(model => model.Description));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n <input");
WriteLiteral(" type=\"hidden\"");
WriteLiteral(" name=\"ComputerNameTemplate\"");
WriteLiteral(" value=\"DeviceProfile.ShortName + \'-\' + SerialNumber\"");
WriteLiteral(" />\r\n <input");
WriteLiteral(" type=\"hidden\"");
WriteLiteral(" name=\"ProvisionADAccount\"");
WriteLiteral(" value=\"True\"");
WriteLiteral(" />\r\n <p");
WriteLiteral(" class=\"actions\"");
WriteLiteral(">\r\n <input");
WriteLiteral(" type=\"submit\"");
WriteLiteral(" class=\"button\"");
WriteLiteral(" value=\"Create\"");
WriteLiteral(" />\r\n </p>\r\n </div>\r\n");
WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n $(function () {\r\n $(\'#Name\').focus().select();\r\n });" +
"\r\n </script>\r\n");
#line 43 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
}
#line default
#line hidden
}
}
}
#pragma warning restore 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceProfile
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceProfile/Create.cshtml")]
public class Create : System.Web.Mvc.WebViewPage<Disco.Models.Repository.DeviceProfile>
{
public Create()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Profiles", MVC.Config.DeviceProfile.Index(null), "Create");
#line default
#line hidden
WriteLiteral("\r\n");
#line 5 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
using (Html.BeginForm())
{
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 450px\"");
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n N" +
"ame:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 14 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
Write(Html.TextBoxFor(model => model.Name));
#line default
#line hidden
WriteLiteral("<br />");
#line 14 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
Write(Html.ValidationMessageFor(model => model.Name));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
">\r\n Short Name:\r\n </th>\r\n <td>");
#line 21 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
Write(Html.TextBoxFor(model => model.ShortName));
#line default
#line hidden
WriteLiteral("<br />");
#line 21 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
Write(Html.ValidationMessageFor(model => model.ShortName));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
">\r\n Description:\r\n </th>\r\n <td>" +
"");
#line 28 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
Write(Html.TextBoxFor(model => model.Description));
#line default
#line hidden
WriteLiteral("<br />");
#line 28 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
Write(Html.ValidationMessageFor(model => model.Description));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n <input");
WriteLiteral(" type=\"hidden\"");
WriteLiteral(" name=\"ComputerNameTemplate\"");
WriteLiteral(" value=\"DeviceProfile.ShortName + \'-\' + SerialNumber\"");
WriteLiteral(" />\r\n <input");
WriteLiteral(" type=\"hidden\"");
WriteLiteral(" name=\"ProvisionADAccount\"");
WriteLiteral(" value=\"True\"");
WriteLiteral(" />\r\n <p");
WriteLiteral(" class=\"actions\"");
WriteLiteral(">\r\n <input");
WriteLiteral(" type=\"submit\"");
WriteLiteral(" class=\"button\"");
WriteLiteral(" value=\"Create\"");
WriteLiteral(" />\r\n </p>\r\n </div>\r\n");
WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n $(function () {\r\n $(\'#Name\').focus().select();\r\n });" +
"\r\n </script>\r\n");
#line 43 "..\..\Areas\Config\Views\DeviceProfile\Create.cshtml"
}
#line default
#line hidden
}
}
}
#pragma warning restore 1591
@@ -1,60 +1,60 @@
@model Disco.Web.Areas.Config.Models.DeviceProfile.DefaultsModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Profiles", MVC.Config.DeviceProfile.Index(null), "Defaults");
}
<div class="form" style="width: 600px">
<table>
<tr>
<th class="name" style="width: 230px">
Default Profile:
</th>
<td class="value">
@Html.DropDownListFor(m => m.Default, Model.DeviceProfiles.ToSelectListItems(Model.Default))
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(function () {
$('#Default').change(function () {
$this = $(this);
$ajaxLoading = $this.next('.ajaxLoading').show();
var data = { id: $this.val() };
$.getJSON('@(Url.Action(MVC.API.DeviceProfile.Default()))', data, function (response, result) {
if (result != 'success' || response != 'OK') {
alert('Unable to change Default Device Profile:\n' + response);
$ajaxLoading.hide();
} else {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
}
});
});
});
</script>
</td>
</tr>
<tr>
<th class="name">
Default Add Device Offline Profile:
</th>
<td class="value">
@Html.DropDownListFor(m => m.DefaultAddDeviceOffline, Model.DeviceProfilesAndNone.ToSelectListItems(Model.DefaultAddDeviceOffline))
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(function () {
$('#DefaultAddDeviceOffline').change(function () {
$this = $(this);
$ajaxLoading = $this.next('.ajaxLoading').show();
var data = { id: $this.val() };
$.getJSON('@(Url.Action(MVC.API.DeviceProfile.DefaultAddDeviceOffline()))', data, function (response, result) {
if (result != 'success' || response != 'OK') {
alert('Unable to change Default Add Device Offline Device Profile:\n' + response);
$ajaxLoading.hide();
} else {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
}
});
});
});
</script>
</td>
</tr>
</table>
</div>
@model Disco.Web.Areas.Config.Models.DeviceProfile.DefaultsModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Profiles", MVC.Config.DeviceProfile.Index(null), "Defaults");
}
<div class="form" style="width: 600px">
<table>
<tr>
<th class="name" style="width: 230px">
Default Profile:
</th>
<td class="value">
@Html.DropDownListFor(m => m.Default, Model.DeviceProfiles.ToSelectListItems(Model.Default))
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(function () {
$('#Default').change(function () {
$this = $(this);
$ajaxLoading = $this.next('.ajaxLoading').show();
var data = { id: $this.val() };
$.getJSON('@(Url.Action(MVC.API.DeviceProfile.Default()))', data, function (response, result) {
if (result != 'success' || response != 'OK') {
alert('Unable to change Default Device Profile:\n' + response);
$ajaxLoading.hide();
} else {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
}
});
});
});
</script>
</td>
</tr>
<tr>
<th class="name">
Default Add Device Offline Profile:
</th>
<td class="value">
@Html.DropDownListFor(m => m.DefaultAddDeviceOffline, Model.DeviceProfilesAndNone.ToSelectListItems(Model.DefaultAddDeviceOffline))
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(function () {
$('#DefaultAddDeviceOffline').change(function () {
$this = $(this);
$ajaxLoading = $this.next('.ajaxLoading').show();
var data = { id: $this.val() };
$.getJSON('@(Url.Action(MVC.API.DeviceProfile.DefaultAddDeviceOffline()))', data, function (response, result) {
if (result != 'success' || response != 'OK') {
alert('Unable to change Default Add Device Offline Device Profile:\n' + response);
$ajaxLoading.hide();
} else {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
}
});
});
});
</script>
</td>
</tr>
</table>
</div>
@@ -1,192 +1,192 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceProfile
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceProfile/Defaults.cshtml")]
public class Defaults : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceProfile.DefaultsModel>
{
public Defaults()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceProfile\Defaults.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Profiles", MVC.Config.DeviceProfile.Index(null), "Defaults");
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 600px\"");
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th");
WriteLiteral(" class=\"name\"");
WriteLiteral(" style=\"width: 230px\"");
WriteLiteral(">\r\n Default Profile:\r\n </th>\r\n <td");
WriteLiteral(" class=\"value\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 12 "..\..\Areas\Config\Views\DeviceProfile\Defaults.cshtml"
Write(Html.DropDownListFor(m => m.Default, Model.DeviceProfiles.ToSelectListItems(Model.Default)));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 13 "..\..\Areas\Config\Views\DeviceProfile\Defaults.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
WriteLiteral("\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
$('#Default').change(function () {
$this = $(this);
$ajaxLoading = $this.next('.ajaxLoading').show();
var data = { id: $this.val() };
$.getJSON('");
#line 20 "..\..\Areas\Config\Views\DeviceProfile\Defaults.cshtml"
Write(Url.Action(MVC.API.DeviceProfile.Default()));
#line default
#line hidden
WriteLiteral(@"', data, function (response, result) {
if (result != 'success' || response != 'OK') {
alert('Unable to change Default Device Profile:\n' + response);
$ajaxLoading.hide();
} else {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
}
});
});
});
</script>
</td>
</tr>
<tr>
<th");
WriteLiteral(" class=\"name\"");
WriteLiteral(">\r\n Default Add Device Offline Profile:\r\n </th>\r\n " +
" <td");
WriteLiteral(" class=\"value\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 38 "..\..\Areas\Config\Views\DeviceProfile\Defaults.cshtml"
Write(Html.DropDownListFor(m => m.DefaultAddDeviceOffline, Model.DeviceProfilesAndNone.ToSelectListItems(Model.DefaultAddDeviceOffline)));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 39 "..\..\Areas\Config\Views\DeviceProfile\Defaults.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
WriteLiteral("\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
$('#DefaultAddDeviceOffline').change(function () {
$this = $(this);
$ajaxLoading = $this.next('.ajaxLoading').show();
var data = { id: $this.val() };
$.getJSON('");
#line 46 "..\..\Areas\Config\Views\DeviceProfile\Defaults.cshtml"
Write(Url.Action(MVC.API.DeviceProfile.DefaultAddDeviceOffline()));
#line default
#line hidden
WriteLiteral(@"', data, function (response, result) {
if (result != 'success' || response != 'OK') {
alert('Unable to change Default Add Device Offline Device Profile:\n' + response);
$ajaxLoading.hide();
} else {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
}
});
});
});
</script>
</td>
</tr>
</table>
</div>
");
}
}
}
#pragma warning restore 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceProfile
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceProfile/Defaults.cshtml")]
public class Defaults : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceProfile.DefaultsModel>
{
public Defaults()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceProfile\Defaults.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Profiles", MVC.Config.DeviceProfile.Index(null), "Defaults");
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 600px\"");
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th");
WriteLiteral(" class=\"name\"");
WriteLiteral(" style=\"width: 230px\"");
WriteLiteral(">\r\n Default Profile:\r\n </th>\r\n <td");
WriteLiteral(" class=\"value\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 12 "..\..\Areas\Config\Views\DeviceProfile\Defaults.cshtml"
Write(Html.DropDownListFor(m => m.Default, Model.DeviceProfiles.ToSelectListItems(Model.Default)));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 13 "..\..\Areas\Config\Views\DeviceProfile\Defaults.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
WriteLiteral("\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
$('#Default').change(function () {
$this = $(this);
$ajaxLoading = $this.next('.ajaxLoading').show();
var data = { id: $this.val() };
$.getJSON('");
#line 20 "..\..\Areas\Config\Views\DeviceProfile\Defaults.cshtml"
Write(Url.Action(MVC.API.DeviceProfile.Default()));
#line default
#line hidden
WriteLiteral(@"', data, function (response, result) {
if (result != 'success' || response != 'OK') {
alert('Unable to change Default Device Profile:\n' + response);
$ajaxLoading.hide();
} else {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
}
});
});
});
</script>
</td>
</tr>
<tr>
<th");
WriteLiteral(" class=\"name\"");
WriteLiteral(">\r\n Default Add Device Offline Profile:\r\n </th>\r\n " +
" <td");
WriteLiteral(" class=\"value\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 38 "..\..\Areas\Config\Views\DeviceProfile\Defaults.cshtml"
Write(Html.DropDownListFor(m => m.DefaultAddDeviceOffline, Model.DeviceProfilesAndNone.ToSelectListItems(Model.DefaultAddDeviceOffline)));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 39 "..\..\Areas\Config\Views\DeviceProfile\Defaults.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
WriteLiteral("\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
$('#DefaultAddDeviceOffline').change(function () {
$this = $(this);
$ajaxLoading = $this.next('.ajaxLoading').show();
var data = { id: $this.val() };
$.getJSON('");
#line 46 "..\..\Areas\Config\Views\DeviceProfile\Defaults.cshtml"
Write(Url.Action(MVC.API.DeviceProfile.DefaultAddDeviceOffline()));
#line default
#line hidden
WriteLiteral(@"', data, function (response, result) {
if (result != 'success' || response != 'OK') {
alert('Unable to change Default Add Device Offline Device Profile:\n' + response);
$ajaxLoading.hide();
} else {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
}
});
});
});
</script>
</td>
</tr>
</table>
</div>
");
}
}
}
#pragma warning restore 1591
@@ -1,9 +1,9 @@
@model Disco.Web.Areas.Config.Models.DeviceProfile.IndexModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Profiles");
}
@Html.Partial(MVC.Config.DeviceProfile.Views._Table, Model, new ViewDataDictionary())
<div class="actionBar">
@Html.ActionLinkButton("Modify Default Profiles", MVC.Config.DeviceProfile.Defaults())
@Html.ActionLinkButton("Create Device Profile", MVC.Config.DeviceProfile.Create())
</div>
@model Disco.Web.Areas.Config.Models.DeviceProfile.IndexModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Profiles");
}
@Html.Partial(MVC.Config.DeviceProfile.Views._Table, Model, new ViewDataDictionary())
<div class="actionBar">
@Html.ActionLinkButton("Modify Default Profiles", MVC.Config.DeviceProfile.Defaults())
@Html.ActionLinkButton("Create Device Profile", MVC.Config.DeviceProfile.Create())
</div>
@@ -1,91 +1,91 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceProfile
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceProfile/Index.cshtml")]
public class Index : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceProfile.IndexModel>
{
public Index()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceProfile\Index.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Profiles");
#line default
#line hidden
WriteLiteral("\r\n");
#line 5 "..\..\Areas\Config\Views\DeviceProfile\Index.cshtml"
Write(Html.Partial(MVC.Config.DeviceProfile.Views._Table, Model, new ViewDataDictionary()));
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 7 "..\..\Areas\Config\Views\DeviceProfile\Index.cshtml"
Write(Html.ActionLinkButton("Modify Default Profiles", MVC.Config.DeviceProfile.Defaults()));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 8 "..\..\Areas\Config\Views\DeviceProfile\Index.cshtml"
Write(Html.ActionLinkButton("Create Device Profile", MVC.Config.DeviceProfile.Create()));
#line default
#line hidden
WriteLiteral("\r\n</div>\r\n");
}
}
}
#pragma warning restore 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceProfile
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceProfile/Index.cshtml")]
public class Index : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceProfile.IndexModel>
{
public Index()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceProfile\Index.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Profiles");
#line default
#line hidden
WriteLiteral("\r\n");
#line 5 "..\..\Areas\Config\Views\DeviceProfile\Index.cshtml"
Write(Html.Partial(MVC.Config.DeviceProfile.Views._Table, Model, new ViewDataDictionary()));
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 7 "..\..\Areas\Config\Views\DeviceProfile\Index.cshtml"
Write(Html.ActionLinkButton("Modify Default Profiles", MVC.Config.DeviceProfile.Defaults()));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 8 "..\..\Areas\Config\Views\DeviceProfile\Index.cshtml"
Write(Html.ActionLinkButton("Create Device Profile", MVC.Config.DeviceProfile.Create()));
#line default
#line hidden
WriteLiteral("\r\n</div>\r\n");
}
}
}
#pragma warning restore 1591
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,15 +1,15 @@
@model Disco.Web.Areas.Config.Models.DeviceProfile.IndexModel
@if (DiscoApplication.MultiSiteMode)
{
var deviceProfilesGrouped = Model.DeviceProfiles.OrderBy(i => i.AddressName).GroupBy(i => i.AddressName);
foreach (var deviceProfilesGroup in deviceProfilesGrouped)
{
if (deviceProfilesGroup.Key != null)
{ <h2>@deviceProfilesGroup.Key</h2> }
@Html.Partial(MVC.Config.DeviceProfile.Views._TableRender, deviceProfilesGroup, new ViewDataDictionary())
}
}
else
{
@Html.Partial(MVC.Config.DeviceProfile.Views._TableRender, Model.DeviceProfiles, new ViewDataDictionary())
}
@model Disco.Web.Areas.Config.Models.DeviceProfile.IndexModel
@if (DiscoApplication.MultiSiteMode)
{
var deviceProfilesGrouped = Model.DeviceProfiles.OrderBy(i => i.AddressName).GroupBy(i => i.AddressName);
foreach (var deviceProfilesGroup in deviceProfilesGrouped)
{
if (deviceProfilesGroup.Key != null)
{ <h2>@deviceProfilesGroup.Key</h2> }
@Html.Partial(MVC.Config.DeviceProfile.Views._TableRender, deviceProfilesGroup, new ViewDataDictionary())
}
}
else
{
@Html.Partial(MVC.Config.DeviceProfile.Views._TableRender, Model.DeviceProfiles, new ViewDataDictionary())
}
@@ -1,109 +1,109 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceProfile
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceProfile/_Table.cshtml")]
public class Table : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceProfile.IndexModel>
{
public Table()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceProfile\_Table.cshtml"
if (DiscoApplication.MultiSiteMode)
{
var deviceProfilesGrouped = Model.DeviceProfiles.OrderBy(i => i.AddressName).GroupBy(i => i.AddressName);
foreach (var deviceProfilesGroup in deviceProfilesGrouped)
{
if (deviceProfilesGroup.Key != null)
{
#line default
#line hidden
WriteLiteral(" <h2>");
#line 8 "..\..\Areas\Config\Views\DeviceProfile\_Table.cshtml"
Write(deviceProfilesGroup.Key);
#line default
#line hidden
WriteLiteral("</h2> ");
#line 8 "..\..\Areas\Config\Views\DeviceProfile\_Table.cshtml"
}
#line default
#line hidden
#line 9 "..\..\Areas\Config\Views\DeviceProfile\_Table.cshtml"
Write(Html.Partial(MVC.Config.DeviceProfile.Views._TableRender, deviceProfilesGroup, new ViewDataDictionary()));
#line default
#line hidden
#line 9 "..\..\Areas\Config\Views\DeviceProfile\_Table.cshtml"
}
}
else
{
#line default
#line hidden
#line 14 "..\..\Areas\Config\Views\DeviceProfile\_Table.cshtml"
Write(Html.Partial(MVC.Config.DeviceProfile.Views._TableRender, Model.DeviceProfiles, new ViewDataDictionary()));
#line default
#line hidden
#line 14 "..\..\Areas\Config\Views\DeviceProfile\_Table.cshtml"
}
#line default
#line hidden
}
}
}
#pragma warning restore 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceProfile
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceProfile/_Table.cshtml")]
public class Table : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DeviceProfile.IndexModel>
{
public Table()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DeviceProfile\_Table.cshtml"
if (DiscoApplication.MultiSiteMode)
{
var deviceProfilesGrouped = Model.DeviceProfiles.OrderBy(i => i.AddressName).GroupBy(i => i.AddressName);
foreach (var deviceProfilesGroup in deviceProfilesGrouped)
{
if (deviceProfilesGroup.Key != null)
{
#line default
#line hidden
WriteLiteral(" <h2>");
#line 8 "..\..\Areas\Config\Views\DeviceProfile\_Table.cshtml"
Write(deviceProfilesGroup.Key);
#line default
#line hidden
WriteLiteral("</h2> ");
#line 8 "..\..\Areas\Config\Views\DeviceProfile\_Table.cshtml"
}
#line default
#line hidden
#line 9 "..\..\Areas\Config\Views\DeviceProfile\_Table.cshtml"
Write(Html.Partial(MVC.Config.DeviceProfile.Views._TableRender, deviceProfilesGroup, new ViewDataDictionary()));
#line default
#line hidden
#line 9 "..\..\Areas\Config\Views\DeviceProfile\_Table.cshtml"
}
}
else
{
#line default
#line hidden
#line 14 "..\..\Areas\Config\Views\DeviceProfile\_Table.cshtml"
Write(Html.Partial(MVC.Config.DeviceProfile.Views._TableRender, Model.DeviceProfiles, new ViewDataDictionary()));
#line default
#line hidden
#line 14 "..\..\Areas\Config\Views\DeviceProfile\_Table.cshtml"
}
#line default
#line hidden
}
}
}
#pragma warning restore 1591
@@ -1,39 +1,39 @@
@model IEnumerable<Disco.Web.Areas.Config.Models.DeviceProfile._IndexModelDeviceProfile>
<table class="tableData deviceProfileTable">
<tr>
<th class="name">
Name
</th>
<th class="description">
Description
</th>
<th class="type">
Type
</th>
<th class="deviceCount">
Device Count
</th>
</tr>
@foreach (var item in Model)
{
<tr>
<td>
@Html.ActionLink(item.Name, MVC.Config.DeviceProfile.Index(item.Id))
</td>
<td>
@Html.DisplayFor(modelItem => item.Description)
</td>
<td>
@Html.DisplayFor(modelItem => item.DistributionType)
</td>
<td>
@item.DeviceCount.ToString("n0")
@if (item.DeviceDecommissionedCount > 0)
{
<span class="smallMessage" title="@(item.DeviceDecommissionedCount) Decommissioned">
(@(item.DeviceDecommissionedCount))</span>
}
</td>
</tr>
}
</table>
@model IEnumerable<Disco.Web.Areas.Config.Models.DeviceProfile._IndexModelDeviceProfile>
<table class="tableData deviceProfileTable">
<tr>
<th class="name">
Name
</th>
<th class="description">
Description
</th>
<th class="type">
Type
</th>
<th class="deviceCount">
Device Count
</th>
</tr>
@foreach (var item in Model)
{
<tr>
<td>
@Html.ActionLink(item.Name, MVC.Config.DeviceProfile.Index(item.Id))
</td>
<td>
@Html.DisplayFor(modelItem => item.Description)
</td>
<td>
@Html.DisplayFor(modelItem => item.DistributionType)
</td>
<td>
@item.DeviceCount.ToString("n0")
@if (item.DeviceDecommissionedCount > 0)
{
<span class="smallMessage" title="@(item.DeviceDecommissionedCount) Decommissioned">
(@(item.DeviceDecommissionedCount))</span>
}
</td>
</tr>
}
</table>
@@ -1,186 +1,186 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceProfile
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceProfile/_TableRender.cshtml")]
public class TableRender : System.Web.Mvc.WebViewPage<IEnumerable<Disco.Web.Areas.Config.Models.DeviceProfile._IndexModelDeviceProfile>>
{
public TableRender()
{
}
public override void Execute()
{
WriteLiteral("<table");
WriteLiteral(" class=\"tableData deviceProfileTable\"");
WriteLiteral(">\r\n <tr>\r\n <th");
WriteLiteral(" class=\"name\"");
WriteLiteral(">\r\n Name\r\n </th>\r\n <th");
WriteLiteral(" class=\"description\"");
WriteLiteral(">\r\n Description\r\n </th>\r\n <th");
WriteLiteral(" class=\"type\"");
WriteLiteral(">\r\n Type\r\n </th>\r\n <th");
WriteLiteral(" class=\"deviceCount\"");
WriteLiteral(">\r\n Device Count\r\n </th>\r\n </tr>\r\n");
#line 17 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
#line default
#line hidden
#line 17 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
foreach (var item in Model)
{
#line default
#line hidden
WriteLiteral(" <tr>\r\n <td>\r\n");
WriteLiteral(" ");
#line 21 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
Write(Html.ActionLink(item.Name, MVC.Config.DeviceProfile.Index(item.Id)));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 24 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
Write(Html.DisplayFor(modelItem => item.Description));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 27 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
Write(Html.DisplayFor(modelItem => item.DistributionType));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 30 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
Write(item.DeviceCount.ToString("n0"));
#line default
#line hidden
WriteLiteral("\r\n");
#line 31 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
#line default
#line hidden
#line 31 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
if (item.DeviceDecommissionedCount > 0)
{
#line default
#line hidden
WriteLiteral(" <span");
WriteLiteral(" class=\"smallMessage\"");
WriteAttribute("title", Tuple.Create(" title=\"", 1005), Tuple.Create("\"", 1061)
#line 33 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
, Tuple.Create(Tuple.Create("", 1013), Tuple.Create<System.Object, System.Int32>(item.DeviceDecommissionedCount
#line default
#line hidden
, 1013), false)
, Tuple.Create(Tuple.Create(" ", 1046), Tuple.Create("Decommissioned", 1047), true)
);
WriteLiteral(">\r\n (");
#line 34 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
Write(item.DeviceDecommissionedCount);
#line default
#line hidden
WriteLiteral(")</span>\r\n");
#line 35 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n");
#line 38 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
}
#line default
#line hidden
WriteLiteral("</table>\r\n");
}
}
}
#pragma warning restore 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DeviceProfile
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceProfile/_TableRender.cshtml")]
public class TableRender : System.Web.Mvc.WebViewPage<IEnumerable<Disco.Web.Areas.Config.Models.DeviceProfile._IndexModelDeviceProfile>>
{
public TableRender()
{
}
public override void Execute()
{
WriteLiteral("<table");
WriteLiteral(" class=\"tableData deviceProfileTable\"");
WriteLiteral(">\r\n <tr>\r\n <th");
WriteLiteral(" class=\"name\"");
WriteLiteral(">\r\n Name\r\n </th>\r\n <th");
WriteLiteral(" class=\"description\"");
WriteLiteral(">\r\n Description\r\n </th>\r\n <th");
WriteLiteral(" class=\"type\"");
WriteLiteral(">\r\n Type\r\n </th>\r\n <th");
WriteLiteral(" class=\"deviceCount\"");
WriteLiteral(">\r\n Device Count\r\n </th>\r\n </tr>\r\n");
#line 17 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
#line default
#line hidden
#line 17 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
foreach (var item in Model)
{
#line default
#line hidden
WriteLiteral(" <tr>\r\n <td>\r\n");
WriteLiteral(" ");
#line 21 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
Write(Html.ActionLink(item.Name, MVC.Config.DeviceProfile.Index(item.Id)));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 24 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
Write(Html.DisplayFor(modelItem => item.Description));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 27 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
Write(Html.DisplayFor(modelItem => item.DistributionType));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 30 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
Write(item.DeviceCount.ToString("n0"));
#line default
#line hidden
WriteLiteral("\r\n");
#line 31 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
#line default
#line hidden
#line 31 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
if (item.DeviceDecommissionedCount > 0)
{
#line default
#line hidden
WriteLiteral(" <span");
WriteLiteral(" class=\"smallMessage\"");
WriteAttribute("title", Tuple.Create(" title=\"", 1005), Tuple.Create("\"", 1061)
#line 33 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
, Tuple.Create(Tuple.Create("", 1013), Tuple.Create<System.Object, System.Int32>(item.DeviceDecommissionedCount
#line default
#line hidden
, 1013), false)
, Tuple.Create(Tuple.Create(" ", 1046), Tuple.Create("Decommissioned", 1047), true)
);
WriteLiteral(">\r\n (");
#line 34 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
Write(item.DeviceDecommissionedCount);
#line default
#line hidden
WriteLiteral(")</span>\r\n");
#line 35 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n");
#line 38 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
}
#line default
#line hidden
WriteLiteral("</table>\r\n");
}
}
}
#pragma warning restore 1591
@@ -1,96 +1,96 @@
@model Disco.Web.Areas.Config.Models.DocumentTemplate.CreateModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(null), "Create");
}
@using (Html.BeginForm(MVC.Config.DocumentTemplate.Create(), FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<div class="form" style="width: 650px">
<table>
<tr>
<th>
Id:
</th>
<td>@Html.TextBoxFor(model => model.DocumentTemplate.Id)<br />@Html.ValidationMessageFor(model => model.DocumentTemplate.Id)
</td>
</tr>
<tr>
<th>
Description:
</th>
<td>@Html.TextBoxFor(model => model.DocumentTemplate.Description)<br />@Html.ValidationMessageFor(model => model.DocumentTemplate.Description)
</td>
</tr>
<tr>
<th>
Scope:
</th>
<td>
@Html.DropDownListFor(model => model.DocumentTemplate.Scope, Model.Scopes.ToSelectListItems(null))
</td>
</tr>
<tr>
<th>
Template PDF
</th>
<td>
<input type="file" name="Template" /><br />@Html.ValidationMessage("Template")
</td>
</tr>
<tr id="trJobTypes">
<th class="name">
Types:
</th>
<td class="value">
@CommonHelpers.CheckBoxList("Types", Model.JobTypes.ToSelectListItems(Model.Types), 2)
</td>
</tr>
@foreach (var jt in Model.JobTypes)
{
<tr id="trJobSubType@(jt.Id)" class="jobSubTypes">
<th class="name">
@jt.Description<br />
Sub Types<br />
@CommonHelpers.CheckboxBulkSelect(string.Format("CheckboxBulkSelect_{0}", jt.Id))
</th>
<td class="value">
@CommonHelpers.CheckBoxList("SubTypes", Model.JobSubTypes.Where(jst => jst.JobTypeId == jt.Id).ToList().ToSelectListItems(Model.SubTypes), 2)
</td>
</tr>
}
</table>
<p class="actions">
<input type="submit" class="button" value="Create" />
</p>
</div>
<script type="text/javascript">
$(function () {
$('#Name').focus().select();
var $scope = $('#DocumentTemplate_Scope');
var $trJobTypes = $('#trJobTypes');
var $jobTypes = $trJobTypes.find('input[type="checkbox"]');
$scope.change(scopeChange);
$jobTypes.change(jobTypesChange);
scopeChange();
function scopeChange() {
if ($scope.val() == 'Job') {
$trJobTypes.show();
jobTypesChange();
} else {
$trJobTypes.hide();
$('.jobSubTypes').hide();
}
}
function jobTypesChange() {
$('.jobSubTypes').hide();
$jobTypes.filter(':checked').each(function () {
$('#trJobSubType' + $(this).val()).show();
});
}
});
</script>
@model Disco.Web.Areas.Config.Models.DocumentTemplate.CreateModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(null), "Create");
}
@using (Html.BeginForm(MVC.Config.DocumentTemplate.Create(), FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<div class="form" style="width: 650px">
<table>
<tr>
<th>
Id:
</th>
<td>@Html.TextBoxFor(model => model.DocumentTemplate.Id)<br />@Html.ValidationMessageFor(model => model.DocumentTemplate.Id)
</td>
</tr>
<tr>
<th>
Description:
</th>
<td>@Html.TextBoxFor(model => model.DocumentTemplate.Description)<br />@Html.ValidationMessageFor(model => model.DocumentTemplate.Description)
</td>
</tr>
<tr>
<th>
Scope:
</th>
<td>
@Html.DropDownListFor(model => model.DocumentTemplate.Scope, Model.Scopes.ToSelectListItems(null))
</td>
</tr>
<tr>
<th>
Template PDF
</th>
<td>
<input type="file" name="Template" /><br />@Html.ValidationMessage("Template")
</td>
</tr>
<tr id="trJobTypes">
<th class="name">
Types:
</th>
<td class="value">
@CommonHelpers.CheckBoxList("Types", Model.JobTypes.ToSelectListItems(Model.Types), 2)
</td>
</tr>
@foreach (var jt in Model.JobTypes)
{
<tr id="trJobSubType@(jt.Id)" class="jobSubTypes">
<th class="name">
@jt.Description<br />
Sub Types<br />
@CommonHelpers.CheckboxBulkSelect(string.Format("CheckboxBulkSelect_{0}", jt.Id))
</th>
<td class="value">
@CommonHelpers.CheckBoxList("SubTypes", Model.JobSubTypes.Where(jst => jst.JobTypeId == jt.Id).ToList().ToSelectListItems(Model.SubTypes), 2)
</td>
</tr>
}
</table>
<p class="actions">
<input type="submit" class="button" value="Create" />
</p>
</div>
<script type="text/javascript">
$(function () {
$('#Name').focus().select();
var $scope = $('#DocumentTemplate_Scope');
var $trJobTypes = $('#trJobTypes');
var $jobTypes = $trJobTypes.find('input[type="checkbox"]');
$scope.change(scopeChange);
$jobTypes.change(jobTypesChange);
scopeChange();
function scopeChange() {
if ($scope.val() == 'Job') {
$trJobTypes.show();
jobTypesChange();
} else {
$trJobTypes.hide();
$('.jobSubTypes').hide();
}
}
function jobTypesChange() {
$('.jobSubTypes').hide();
$jobTypes.filter(':checked').each(function () {
$('#trJobSubType' + $(this).val()).show();
});
}
});
</script>
}
@@ -1,299 +1,299 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DocumentTemplate
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DocumentTemplate/Create.cshtml")]
public class Create : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DocumentTemplate.CreateModel>
{
public Create()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(null), "Create");
#line default
#line hidden
WriteLiteral("\r\n");
#line 5 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
using (Html.BeginForm(MVC.Config.DocumentTemplate.Create(), FormMethod.Post, new { enctype = "multipart/form-data" }))
{
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 650px\"");
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n I" +
"d:\r\n </th>\r\n <td>");
#line 13 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
Write(Html.TextBoxFor(model => model.DocumentTemplate.Id));
#line default
#line hidden
WriteLiteral("<br />");
#line 13 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
Write(Html.ValidationMessageFor(model => model.DocumentTemplate.Id));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
">\r\n Description:\r\n </th>\r\n <td>" +
"");
#line 20 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
Write(Html.TextBoxFor(model => model.DocumentTemplate.Description));
#line default
#line hidden
WriteLiteral("<br />");
#line 20 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
Write(Html.ValidationMessageFor(model => model.DocumentTemplate.Description));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
">\r\n Scope:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 28 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
Write(Html.DropDownListFor(model => model.DocumentTemplate.Scope, Model.Scopes.ToSelectListItems(null)));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
">\r\n Template PDF\r\n </th>\r\n <td>" +
"\r\n <input");
WriteLiteral(" type=\"file\"");
WriteLiteral(" name=\"Template\"");
WriteLiteral(" /><br />");
#line 36 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
Write(Html.ValidationMessage("Template"));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr");
WriteLiteral(" id=\"trJobTypes\"");
WriteLiteral(">\r\n <th");
WriteLiteral(" class=\"name\"");
WriteLiteral(">\r\n Types:\r\n </th>\r\n <td");
WriteLiteral(" class=\"value\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 44 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
Write(CommonHelpers.CheckBoxList("Types", Model.JobTypes.ToSelectListItems(Model.Types), 2));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
#line 47 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
#line default
#line hidden
#line 47 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
foreach (var jt in Model.JobTypes)
{
#line default
#line hidden
WriteLiteral(" <tr");
WriteAttribute("id", Tuple.Create(" id=\"", 1914), Tuple.Create("\"", 1939)
, Tuple.Create(Tuple.Create("", 1919), Tuple.Create("trJobSubType", 1919), true)
#line 49 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
, Tuple.Create(Tuple.Create("", 1931), Tuple.Create<System.Object, System.Int32>(jt.Id
#line default
#line hidden
, 1931), false)
);
WriteLiteral(" class=\"jobSubTypes\"");
WriteLiteral(">\r\n <th");
WriteLiteral(" class=\"name\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 51 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
Write(jt.Description);
#line default
#line hidden
WriteLiteral("<br />\r\n Sub Types<br />\r\n");
WriteLiteral(" ");
#line 53 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
Write(CommonHelpers.CheckboxBulkSelect(string.Format("CheckboxBulkSelect_{0}", jt.Id)));
#line default
#line hidden
WriteLiteral("\r\n </th>\r\n <td");
WriteLiteral(" class=\"value\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 56 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
Write(CommonHelpers.CheckBoxList("SubTypes", Model.JobSubTypes.Where(jst => jst.JobTypeId == jt.Id).ToList().ToSelectListItems(Model.SubTypes), 2));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr> \r\n");
#line 59 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
}
#line default
#line hidden
WriteLiteral(" </table>\r\n <p");
WriteLiteral(" class=\"actions\"");
WriteLiteral(">\r\n <input");
WriteLiteral(" type=\"submit\"");
WriteLiteral(" class=\"button\"");
WriteLiteral(" value=\"Create\"");
WriteLiteral(" />\r\n </p>\r\n </div>\r\n");
WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
$('#Name').focus().select();
var $scope = $('#DocumentTemplate_Scope');
var $trJobTypes = $('#trJobTypes');
var $jobTypes = $trJobTypes.find('input[type=""checkbox""]');
$scope.change(scopeChange);
$jobTypes.change(jobTypesChange);
scopeChange();
function scopeChange() {
if ($scope.val() == 'Job') {
$trJobTypes.show();
jobTypesChange();
} else {
$trJobTypes.hide();
$('.jobSubTypes').hide();
}
}
function jobTypesChange() {
$('.jobSubTypes').hide();
$jobTypes.filter(':checked').each(function () {
$('#trJobSubType' + $(this).val()).show();
});
}
});
</script>
");
#line 96 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
}
#line default
#line hidden
}
}
}
#pragma warning restore 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DocumentTemplate
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DocumentTemplate/Create.cshtml")]
public class Create : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DocumentTemplate.CreateModel>
{
public Create()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(null), "Create");
#line default
#line hidden
WriteLiteral("\r\n");
#line 5 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
using (Html.BeginForm(MVC.Config.DocumentTemplate.Create(), FormMethod.Post, new { enctype = "multipart/form-data" }))
{
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 650px\"");
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n I" +
"d:\r\n </th>\r\n <td>");
#line 13 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
Write(Html.TextBoxFor(model => model.DocumentTemplate.Id));
#line default
#line hidden
WriteLiteral("<br />");
#line 13 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
Write(Html.ValidationMessageFor(model => model.DocumentTemplate.Id));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
">\r\n Description:\r\n </th>\r\n <td>" +
"");
#line 20 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
Write(Html.TextBoxFor(model => model.DocumentTemplate.Description));
#line default
#line hidden
WriteLiteral("<br />");
#line 20 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
Write(Html.ValidationMessageFor(model => model.DocumentTemplate.Description));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
">\r\n Scope:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 28 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
Write(Html.DropDownListFor(model => model.DocumentTemplate.Scope, Model.Scopes.ToSelectListItems(null)));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
">\r\n Template PDF\r\n </th>\r\n <td>" +
"\r\n <input");
WriteLiteral(" type=\"file\"");
WriteLiteral(" name=\"Template\"");
WriteLiteral(" /><br />");
#line 36 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
Write(Html.ValidationMessage("Template"));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr");
WriteLiteral(" id=\"trJobTypes\"");
WriteLiteral(">\r\n <th");
WriteLiteral(" class=\"name\"");
WriteLiteral(">\r\n Types:\r\n </th>\r\n <td");
WriteLiteral(" class=\"value\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 44 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
Write(CommonHelpers.CheckBoxList("Types", Model.JobTypes.ToSelectListItems(Model.Types), 2));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
#line 47 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
#line default
#line hidden
#line 47 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
foreach (var jt in Model.JobTypes)
{
#line default
#line hidden
WriteLiteral(" <tr");
WriteAttribute("id", Tuple.Create(" id=\"", 1914), Tuple.Create("\"", 1939)
, Tuple.Create(Tuple.Create("", 1919), Tuple.Create("trJobSubType", 1919), true)
#line 49 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
, Tuple.Create(Tuple.Create("", 1931), Tuple.Create<System.Object, System.Int32>(jt.Id
#line default
#line hidden
, 1931), false)
);
WriteLiteral(" class=\"jobSubTypes\"");
WriteLiteral(">\r\n <th");
WriteLiteral(" class=\"name\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 51 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
Write(jt.Description);
#line default
#line hidden
WriteLiteral("<br />\r\n Sub Types<br />\r\n");
WriteLiteral(" ");
#line 53 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
Write(CommonHelpers.CheckboxBulkSelect(string.Format("CheckboxBulkSelect_{0}", jt.Id)));
#line default
#line hidden
WriteLiteral("\r\n </th>\r\n <td");
WriteLiteral(" class=\"value\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 56 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
Write(CommonHelpers.CheckBoxList("SubTypes", Model.JobSubTypes.Where(jst => jst.JobTypeId == jt.Id).ToList().ToSelectListItems(Model.SubTypes), 2));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr> \r\n");
#line 59 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
}
#line default
#line hidden
WriteLiteral(" </table>\r\n <p");
WriteLiteral(" class=\"actions\"");
WriteLiteral(">\r\n <input");
WriteLiteral(" type=\"submit\"");
WriteLiteral(" class=\"button\"");
WriteLiteral(" value=\"Create\"");
WriteLiteral(" />\r\n </p>\r\n </div>\r\n");
WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
$('#Name').focus().select();
var $scope = $('#DocumentTemplate_Scope');
var $trJobTypes = $('#trJobTypes');
var $jobTypes = $trJobTypes.find('input[type=""checkbox""]');
$scope.change(scopeChange);
$jobTypes.change(jobTypesChange);
scopeChange();
function scopeChange() {
if ($scope.val() == 'Job') {
$trJobTypes.show();
jobTypesChange();
} else {
$trJobTypes.hide();
$('.jobSubTypes').hide();
}
}
function jobTypesChange() {
$('.jobSubTypes').hide();
$jobTypes.filter(':checked').each(function () {
$('#trJobSubType' + $(this).val()).show();
});
}
});
</script>
");
#line 96 "..\..\Areas\Config\Views\DocumentTemplate\Create.cshtml"
}
#line default
#line hidden
}
}
}
#pragma warning restore 1591
@@ -1,132 +1,132 @@
@model Disco.Web.Areas.Config.Models.DocumentTemplate.ExpressionBrowserModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(null), "Expression Browser");
Html.BundleDeferred("~/Style/jQueryUI/dynatree");
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-DynaTree");
}
<div id="configurationDocumentTemplateExpressionBrowser">
Expressions within Disco are based on the <a href="http://www.springframework.net/"
target="_blank">Spring.NET Framework</a>. Please refer to the <a href="http://www.springframework.net/doc-latest/reference/html/expressions.html"
target="_blank">Expression Evaluation</a> documentation.
<h2>
Device Scope</h2>
<div id="deviceScopeTree" class="expressionTree">
</div>
<h2>
Job Scope</h2>
<div id="jobScopeTree" class="expressionTree">
</div>
<h2>
User Scope</h2>
<div id="userScopeTree" class="expressionTree">
</div>
<h2>
Variables
</h2>
<div id="variableScopeTree" class="expressionTree">
</div>
<h2>
Extension Libraries</h2>
<div id="extScopeTree" class="expressionTree">
</div>
</div>
<script type="text/javascript">
$(function () {
if (!document.DiscoFunctions) {
document.DiscoFunctions = {};
}
var typeLib = {};
var loadTypeUrl = '@(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser()))';
var deviceScopeTree = $('#deviceScopeTree');
var jobScopeTree = $('#jobScopeTree');
var userScopeTree = $('#userScopeTree');
var variableScopeTree = $('#variableScopeTree');
var extScopeTree = $('#extScopeTree');
var lazyLoadNode = function (node) {
if (node.data.expressionType) {
node.setLazyNodeStatus(DTNodeStatus_Loading);
loadType(node, node.data.expressionType, node.data.staticDeclaredMembersOnly);
} else {
if (node.data.memberDescriptor) {
loadMember(node);
} else {
node.setLazyNodeStatus(DTNodeStatus_Ok);
}
}
}
var loadMember = function (memberNode) {
var previousUpdateMode = memberNode.tree.enableUpdate(false);
var memberDescriptor = memberNode.data.memberDescriptor;
// Return Type
memberNode.addChild({ title: 'Returns: ' + memberDescriptor.ReturnType, tooltip: memberDescriptor.ReturnExpressionType, isFolder: true, expressionType: memberDescriptor.ReturnExpressionType, isLazy: true, addClass: 'object' });
// Parameters
var parametersNode = memberNode.addChild({ title: 'Parameters', isFolder: true, addClass: 'parameter' });
for (var i = 0; i < memberDescriptor.Parameters.length; i++) {
var p = memberDescriptor.Parameters[i];
parametersNode.addChild({ title: p.Name + ' [' + p.ReturnType + ']', tooltip: p.ReturnExpressionType, addClass: 'object' });
}
memberNode.setLazyNodeStatus(DTNodeStatus_Ok);
memberNode.tree.enableUpdate(previousUpdateMode);
}
var typeLoaded = function (parentNode, typeDescriptor) {
var previousUpdateMode = parentNode.tree.enableUpdate(false);
for (var i = 0; i < typeDescriptor.Members.length; i++) {
var memberDescriptor = typeDescriptor.Members[i];
parentNode.addChild({ title: memberDescriptor.Name, tooltip: memberDescriptor.ReturnType, isFolder: true, addClass: memberDescriptor.Kind, memberDescriptor: memberDescriptor, isLazy: true });
}
parentNode.setLazyNodeStatus(DTNodeStatus_Ok);
parentNode.tree.enableUpdate(previousUpdateMode);
}
var loadType = function (parentNode, type, staticDeclaredMembersOnly) {
if (typeLib[type]) {
typeLoaded(parentNode, typeLib[type]);
} else {
var requestData = { type: type, StaticDeclaredMembersOnly: staticDeclaredMembersOnly };
$.getJSON(loadTypeUrl, requestData, function (data) {
typeLib[type] = data;
typeLoaded(parentNode, data);
});
}
}
var initVariable = function (name, type) {
variableScopeTree.dynatree('getRoot').addChild({ title: name, tooltip: type, isFolder: true, addClass: 'object', expressionType: type, isLazy: true });
}
var initExpressionLibrary = function (name, type) {
extScopeTree.dynatree('getRoot').addChild({ title: name, tooltip: type, isFolder: true, addClass: 'object', expressionType: type, staticDeclaredMembersOnly: true, isLazy: true });
}
// Init
deviceScopeTree.dynatree({ onLazyRead: lazyLoadNode });
loadType(deviceScopeTree.dynatree('getRoot'), '@(Model.DeviceType)');
jobScopeTree.dynatree({ onLazyRead: lazyLoadNode });
loadType(jobScopeTree.dynatree('getRoot'), '@(Model.JobType)');
userScopeTree.dynatree({ onLazyRead: lazyLoadNode });
loadType(userScopeTree.dynatree('getRoot'), '@(Model.UserType)');
variableScopeTree.dynatree({ onLazyRead: lazyLoadNode });
document.DiscoFunctions.expressionInitVariable = initVariable;
extScopeTree.dynatree({ onLazyRead: lazyLoadNode });
document.DiscoFunctions.expressionInitExpressionLibrary = initExpressionLibrary;
});
</script>
<script type="text/javascript">
$(function () {
@{
foreach (var variable in Model.Variables)
{
<text>document.DiscoFunctions.expressionInitVariable('@(variable.Key)', '@variable.Value');</text>
}
foreach (var variable in Model.ExtensionLibraries)
{
<text>document.DiscoFunctions.expressionInitExpressionLibrary('@(variable.Key)', '@variable.Value');</text>
}
}
});
@model Disco.Web.Areas.Config.Models.DocumentTemplate.ExpressionBrowserModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(null), "Expression Browser");
Html.BundleDeferred("~/Style/jQueryUI/dynatree");
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-DynaTree");
}
<div id="configurationDocumentTemplateExpressionBrowser">
Expressions within Disco are based on the <a href="http://www.springframework.net/"
target="_blank">Spring.NET Framework</a>. Please refer to the <a href="http://www.springframework.net/doc-latest/reference/html/expressions.html"
target="_blank">Expression Evaluation</a> documentation.
<h2>
Device Scope</h2>
<div id="deviceScopeTree" class="expressionTree">
</div>
<h2>
Job Scope</h2>
<div id="jobScopeTree" class="expressionTree">
</div>
<h2>
User Scope</h2>
<div id="userScopeTree" class="expressionTree">
</div>
<h2>
Variables
</h2>
<div id="variableScopeTree" class="expressionTree">
</div>
<h2>
Extension Libraries</h2>
<div id="extScopeTree" class="expressionTree">
</div>
</div>
<script type="text/javascript">
$(function () {
if (!document.DiscoFunctions) {
document.DiscoFunctions = {};
}
var typeLib = {};
var loadTypeUrl = '@(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser()))';
var deviceScopeTree = $('#deviceScopeTree');
var jobScopeTree = $('#jobScopeTree');
var userScopeTree = $('#userScopeTree');
var variableScopeTree = $('#variableScopeTree');
var extScopeTree = $('#extScopeTree');
var lazyLoadNode = function (node) {
if (node.data.expressionType) {
node.setLazyNodeStatus(DTNodeStatus_Loading);
loadType(node, node.data.expressionType, node.data.staticDeclaredMembersOnly);
} else {
if (node.data.memberDescriptor) {
loadMember(node);
} else {
node.setLazyNodeStatus(DTNodeStatus_Ok);
}
}
}
var loadMember = function (memberNode) {
var previousUpdateMode = memberNode.tree.enableUpdate(false);
var memberDescriptor = memberNode.data.memberDescriptor;
// Return Type
memberNode.addChild({ title: 'Returns: ' + memberDescriptor.ReturnType, tooltip: memberDescriptor.ReturnExpressionType, isFolder: true, expressionType: memberDescriptor.ReturnExpressionType, isLazy: true, addClass: 'object' });
// Parameters
var parametersNode = memberNode.addChild({ title: 'Parameters', isFolder: true, addClass: 'parameter' });
for (var i = 0; i < memberDescriptor.Parameters.length; i++) {
var p = memberDescriptor.Parameters[i];
parametersNode.addChild({ title: p.Name + ' [' + p.ReturnType + ']', tooltip: p.ReturnExpressionType, addClass: 'object' });
}
memberNode.setLazyNodeStatus(DTNodeStatus_Ok);
memberNode.tree.enableUpdate(previousUpdateMode);
}
var typeLoaded = function (parentNode, typeDescriptor) {
var previousUpdateMode = parentNode.tree.enableUpdate(false);
for (var i = 0; i < typeDescriptor.Members.length; i++) {
var memberDescriptor = typeDescriptor.Members[i];
parentNode.addChild({ title: memberDescriptor.Name, tooltip: memberDescriptor.ReturnType, isFolder: true, addClass: memberDescriptor.Kind, memberDescriptor: memberDescriptor, isLazy: true });
}
parentNode.setLazyNodeStatus(DTNodeStatus_Ok);
parentNode.tree.enableUpdate(previousUpdateMode);
}
var loadType = function (parentNode, type, staticDeclaredMembersOnly) {
if (typeLib[type]) {
typeLoaded(parentNode, typeLib[type]);
} else {
var requestData = { type: type, StaticDeclaredMembersOnly: staticDeclaredMembersOnly };
$.getJSON(loadTypeUrl, requestData, function (data) {
typeLib[type] = data;
typeLoaded(parentNode, data);
});
}
}
var initVariable = function (name, type) {
variableScopeTree.dynatree('getRoot').addChild({ title: name, tooltip: type, isFolder: true, addClass: 'object', expressionType: type, isLazy: true });
}
var initExpressionLibrary = function (name, type) {
extScopeTree.dynatree('getRoot').addChild({ title: name, tooltip: type, isFolder: true, addClass: 'object', expressionType: type, staticDeclaredMembersOnly: true, isLazy: true });
}
// Init
deviceScopeTree.dynatree({ onLazyRead: lazyLoadNode });
loadType(deviceScopeTree.dynatree('getRoot'), '@(Model.DeviceType)');
jobScopeTree.dynatree({ onLazyRead: lazyLoadNode });
loadType(jobScopeTree.dynatree('getRoot'), '@(Model.JobType)');
userScopeTree.dynatree({ onLazyRead: lazyLoadNode });
loadType(userScopeTree.dynatree('getRoot'), '@(Model.UserType)');
variableScopeTree.dynatree({ onLazyRead: lazyLoadNode });
document.DiscoFunctions.expressionInitVariable = initVariable;
extScopeTree.dynatree({ onLazyRead: lazyLoadNode });
document.DiscoFunctions.expressionInitExpressionLibrary = initExpressionLibrary;
});
</script>
<script type="text/javascript">
$(function () {
@{
foreach (var variable in Model.Variables)
{
<text>document.DiscoFunctions.expressionInitVariable('@(variable.Key)', '@variable.Value');</text>
}
foreach (var variable in Model.ExtensionLibraries)
{
<text>document.DiscoFunctions.expressionInitExpressionLibrary('@(variable.Key)', '@variable.Value');</text>
}
}
});
</script>
@@ -1,282 +1,282 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DocumentTemplate
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DocumentTemplate/ExpressionBrowser.cshtml")]
public class ExpressionBrowser : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DocumentTemplate.ExpressionBrowserModel>
{
public ExpressionBrowser()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(null), "Expression Browser");
Html.BundleDeferred("~/Style/jQueryUI/dynatree");
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-DynaTree");
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" id=\"configurationDocumentTemplateExpressionBrowser\"");
WriteLiteral(">\r\n Expressions within Disco are based on the <a");
WriteLiteral(" href=\"http://www.springframework.net/\"");
WriteLiteral("\r\n target=\"_blank\"");
WriteLiteral(">Spring.NET Framework</a>. Please refer to the <a");
WriteLiteral(" href=\"http://www.springframework.net/doc-latest/reference/html/expressions.html\"" +
"");
WriteLiteral("\r\n target=\"_blank\"");
WriteLiteral(">Expression Evaluation</a> documentation.\r\n <h2>\r\n Device Scope</h2>\r\n " +
" <div");
WriteLiteral(" id=\"deviceScopeTree\"");
WriteLiteral(" class=\"expressionTree\"");
WriteLiteral(">\r\n </div>\r\n <h2>\r\n Job Scope</h2>\r\n <div");
WriteLiteral(" id=\"jobScopeTree\"");
WriteLiteral(" class=\"expressionTree\"");
WriteLiteral(">\r\n </div>\r\n <h2>\r\n User Scope</h2>\r\n <div");
WriteLiteral(" id=\"userScopeTree\"");
WriteLiteral(" class=\"expressionTree\"");
WriteLiteral(">\r\n </div>\r\n <h2>\r\n Variables\r\n </h2>\r\n <div");
WriteLiteral(" id=\"variableScopeTree\"");
WriteLiteral(" class=\"expressionTree\"");
WriteLiteral(">\r\n </div>\r\n <h2>\r\n Extension Libraries</h2>\r\n <div");
WriteLiteral(" id=\"extScopeTree\"");
WriteLiteral(" class=\"expressionTree\"");
WriteLiteral(">\r\n </div>\r\n</div>\r\n<script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n $(function () {\r\n if (!document.DiscoFunctions) {\r\n docu" +
"ment.DiscoFunctions = {};\r\n }\r\n\r\n var typeLib = {};\r\n var l" +
"oadTypeUrl = \'");
#line 40 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
Write(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser()));
#line default
#line hidden
WriteLiteral("\';\r\n var deviceScopeTree = $(\'#deviceScopeTree\');\r\n var jobScopeTre" +
"e = $(\'#jobScopeTree\');\r\n var userScopeTree = $(\'#userScopeTree\');\r\n " +
" var variableScopeTree = $(\'#variableScopeTree\');\r\n var extScopeTree = " +
"$(\'#extScopeTree\');\r\n\r\n var lazyLoadNode = function (node) {\r\n " +
" if (node.data.expressionType) {\r\n node.setLazyNodeStatus(DTNodeS" +
"tatus_Loading);\r\n loadType(node, node.data.expressionType, node.d" +
"ata.staticDeclaredMembersOnly);\r\n } else {\r\n if (node." +
"data.memberDescriptor) {\r\n loadMember(node);\r\n " +
" } else {\r\n node.setLazyNodeStatus(DTNodeStatus_Ok);\r\n " +
" }\r\n }\r\n }\r\n var loadMember = function (memberN" +
"ode) {\r\n var previousUpdateMode = memberNode.tree.enableUpdate(false)" +
";\r\n var memberDescriptor = memberNode.data.memberDescriptor;\r\n " +
" // Return Type\r\n memberNode.addChild({ title: \'Returns: \' + memb" +
"erDescriptor.ReturnType, tooltip: memberDescriptor.ReturnExpressionType, isFolde" +
"r: true, expressionType: memberDescriptor.ReturnExpressionType, isLazy: true, ad" +
"dClass: \'object\' });\r\n // Parameters\r\n var parametersNode " +
"= memberNode.addChild({ title: \'Parameters\', isFolder: true, addClass: \'paramete" +
"r\' });\r\n for (var i = 0; i < memberDescriptor.Parameters.length; i++)" +
" {\r\n var p = memberDescriptor.Parameters[i];\r\n par" +
"ametersNode.addChild({ title: p.Name + \' [\' + p.ReturnType + \']\', tooltip: p.Ret" +
"urnExpressionType, addClass: \'object\' });\r\n }\r\n memberNode" +
".setLazyNodeStatus(DTNodeStatus_Ok);\r\n memberNode.tree.enableUpdate(p" +
"reviousUpdateMode);\r\n }\r\n var typeLoaded = function (parentNode, t" +
"ypeDescriptor) {\r\n var previousUpdateMode = parentNode.tree.enableUpd" +
"ate(false);\r\n for (var i = 0; i < typeDescriptor.Members.length; i++)" +
" {\r\n var memberDescriptor = typeDescriptor.Members[i];\r\n " +
" parentNode.addChild({ title: memberDescriptor.Name, tooltip: memberDescri" +
"ptor.ReturnType, isFolder: true, addClass: memberDescriptor.Kind, memberDescript" +
"or: memberDescriptor, isLazy: true });\r\n }\r\n parentNode.se" +
"tLazyNodeStatus(DTNodeStatus_Ok);\r\n parentNode.tree.enableUpdate(prev" +
"iousUpdateMode);\r\n }\r\n\r\n var loadType = function (parentNode, type" +
", staticDeclaredMembersOnly) {\r\n if (typeLib[type]) {\r\n " +
" typeLoaded(parentNode, typeLib[type]);\r\n } else {\r\n " +
"var requestData = { type: type, StaticDeclaredMembersOnly: staticDeclaredMembers" +
"Only };\r\n $.getJSON(loadTypeUrl, requestData, function (data) {\r\n" +
" typeLib[type] = data;\r\n typeLoaded(parent" +
"Node, data);\r\n });\r\n }\r\n }\r\n\r\n var initV" +
"ariable = function (name, type) {\r\n variableScopeTree.dynatree(\'getRo" +
"ot\').addChild({ title: name, tooltip: type, isFolder: true, addClass: \'object\', " +
"expressionType: type, isLazy: true });\r\n }\r\n var initExpressionLib" +
"rary = function (name, type) {\r\n extScopeTree.dynatree(\'getRoot\').add" +
"Child({ title: name, tooltip: type, isFolder: true, addClass: \'object\', expressi" +
"onType: type, staticDeclaredMembersOnly: true, isLazy: true });\r\n }\r\n\r\n " +
" // Init\r\n deviceScopeTree.dynatree({ onLazyRead: lazyLoadNode });\r\n" +
" loadType(deviceScopeTree.dynatree(\'getRoot\'), \'");
#line 104 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
Write(Model.DeviceType);
#line default
#line hidden
WriteLiteral("\');\r\n\r\n jobScopeTree.dynatree({ onLazyRead: lazyLoadNode });\r\n load" +
"Type(jobScopeTree.dynatree(\'getRoot\'), \'");
#line 107 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
Write(Model.JobType);
#line default
#line hidden
WriteLiteral("\');\r\n\r\n userScopeTree.dynatree({ onLazyRead: lazyLoadNode });\r\n loa" +
"dType(userScopeTree.dynatree(\'getRoot\'), \'");
#line 110 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
Write(Model.UserType);
#line default
#line hidden
WriteLiteral(@"');
variableScopeTree.dynatree({ onLazyRead: lazyLoadNode });
document.DiscoFunctions.expressionInitVariable = initVariable;
extScopeTree.dynatree({ onLazyRead: lazyLoadNode });
document.DiscoFunctions.expressionInitExpressionLibrary = initExpressionLibrary;
});
</script>
<script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n $(function () {\r\n");
#line 121 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
foreach (var variable in Model.Variables)
{
#line default
#line hidden
WriteLiteral(" ");
WriteLiteral("document.DiscoFunctions.expressionInitVariable(\'");
#line 124 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
Write(variable.Key);
#line default
#line hidden
WriteLiteral("\', \'");
#line 124 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
Write(variable.Value);
#line default
#line hidden
WriteLiteral("\');");
WriteLiteral("\r\n");
#line 125 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
}
foreach (var variable in Model.ExtensionLibraries)
{
#line default
#line hidden
WriteLiteral(" ");
WriteLiteral("document.DiscoFunctions.expressionInitExpressionLibrary(\'");
#line 128 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
Write(variable.Key);
#line default
#line hidden
WriteLiteral("\', \'");
#line 128 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
Write(variable.Value);
#line default
#line hidden
WriteLiteral("\');");
WriteLiteral("\r\n");
#line 129 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
}
#line default
#line hidden
WriteLiteral("\r\n });\r\n </script>");
}
}
}
#pragma warning restore 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DocumentTemplate
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DocumentTemplate/ExpressionBrowser.cshtml")]
public class ExpressionBrowser : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DocumentTemplate.ExpressionBrowserModel>
{
public ExpressionBrowser()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(null), "Expression Browser");
Html.BundleDeferred("~/Style/jQueryUI/dynatree");
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-DynaTree");
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" id=\"configurationDocumentTemplateExpressionBrowser\"");
WriteLiteral(">\r\n Expressions within Disco are based on the <a");
WriteLiteral(" href=\"http://www.springframework.net/\"");
WriteLiteral("\r\n target=\"_blank\"");
WriteLiteral(">Spring.NET Framework</a>. Please refer to the <a");
WriteLiteral(" href=\"http://www.springframework.net/doc-latest/reference/html/expressions.html\"" +
"");
WriteLiteral("\r\n target=\"_blank\"");
WriteLiteral(">Expression Evaluation</a> documentation.\r\n <h2>\r\n Device Scope</h2>\r\n " +
" <div");
WriteLiteral(" id=\"deviceScopeTree\"");
WriteLiteral(" class=\"expressionTree\"");
WriteLiteral(">\r\n </div>\r\n <h2>\r\n Job Scope</h2>\r\n <div");
WriteLiteral(" id=\"jobScopeTree\"");
WriteLiteral(" class=\"expressionTree\"");
WriteLiteral(">\r\n </div>\r\n <h2>\r\n User Scope</h2>\r\n <div");
WriteLiteral(" id=\"userScopeTree\"");
WriteLiteral(" class=\"expressionTree\"");
WriteLiteral(">\r\n </div>\r\n <h2>\r\n Variables\r\n </h2>\r\n <div");
WriteLiteral(" id=\"variableScopeTree\"");
WriteLiteral(" class=\"expressionTree\"");
WriteLiteral(">\r\n </div>\r\n <h2>\r\n Extension Libraries</h2>\r\n <div");
WriteLiteral(" id=\"extScopeTree\"");
WriteLiteral(" class=\"expressionTree\"");
WriteLiteral(">\r\n </div>\r\n</div>\r\n<script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n $(function () {\r\n if (!document.DiscoFunctions) {\r\n docu" +
"ment.DiscoFunctions = {};\r\n }\r\n\r\n var typeLib = {};\r\n var l" +
"oadTypeUrl = \'");
#line 40 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
Write(Url.Action(MVC.Config.DocumentTemplate.ExpressionBrowser()));
#line default
#line hidden
WriteLiteral("\';\r\n var deviceScopeTree = $(\'#deviceScopeTree\');\r\n var jobScopeTre" +
"e = $(\'#jobScopeTree\');\r\n var userScopeTree = $(\'#userScopeTree\');\r\n " +
" var variableScopeTree = $(\'#variableScopeTree\');\r\n var extScopeTree = " +
"$(\'#extScopeTree\');\r\n\r\n var lazyLoadNode = function (node) {\r\n " +
" if (node.data.expressionType) {\r\n node.setLazyNodeStatus(DTNodeS" +
"tatus_Loading);\r\n loadType(node, node.data.expressionType, node.d" +
"ata.staticDeclaredMembersOnly);\r\n } else {\r\n if (node." +
"data.memberDescriptor) {\r\n loadMember(node);\r\n " +
" } else {\r\n node.setLazyNodeStatus(DTNodeStatus_Ok);\r\n " +
" }\r\n }\r\n }\r\n var loadMember = function (memberN" +
"ode) {\r\n var previousUpdateMode = memberNode.tree.enableUpdate(false)" +
";\r\n var memberDescriptor = memberNode.data.memberDescriptor;\r\n " +
" // Return Type\r\n memberNode.addChild({ title: \'Returns: \' + memb" +
"erDescriptor.ReturnType, tooltip: memberDescriptor.ReturnExpressionType, isFolde" +
"r: true, expressionType: memberDescriptor.ReturnExpressionType, isLazy: true, ad" +
"dClass: \'object\' });\r\n // Parameters\r\n var parametersNode " +
"= memberNode.addChild({ title: \'Parameters\', isFolder: true, addClass: \'paramete" +
"r\' });\r\n for (var i = 0; i < memberDescriptor.Parameters.length; i++)" +
" {\r\n var p = memberDescriptor.Parameters[i];\r\n par" +
"ametersNode.addChild({ title: p.Name + \' [\' + p.ReturnType + \']\', tooltip: p.Ret" +
"urnExpressionType, addClass: \'object\' });\r\n }\r\n memberNode" +
".setLazyNodeStatus(DTNodeStatus_Ok);\r\n memberNode.tree.enableUpdate(p" +
"reviousUpdateMode);\r\n }\r\n var typeLoaded = function (parentNode, t" +
"ypeDescriptor) {\r\n var previousUpdateMode = parentNode.tree.enableUpd" +
"ate(false);\r\n for (var i = 0; i < typeDescriptor.Members.length; i++)" +
" {\r\n var memberDescriptor = typeDescriptor.Members[i];\r\n " +
" parentNode.addChild({ title: memberDescriptor.Name, tooltip: memberDescri" +
"ptor.ReturnType, isFolder: true, addClass: memberDescriptor.Kind, memberDescript" +
"or: memberDescriptor, isLazy: true });\r\n }\r\n parentNode.se" +
"tLazyNodeStatus(DTNodeStatus_Ok);\r\n parentNode.tree.enableUpdate(prev" +
"iousUpdateMode);\r\n }\r\n\r\n var loadType = function (parentNode, type" +
", staticDeclaredMembersOnly) {\r\n if (typeLib[type]) {\r\n " +
" typeLoaded(parentNode, typeLib[type]);\r\n } else {\r\n " +
"var requestData = { type: type, StaticDeclaredMembersOnly: staticDeclaredMembers" +
"Only };\r\n $.getJSON(loadTypeUrl, requestData, function (data) {\r\n" +
" typeLib[type] = data;\r\n typeLoaded(parent" +
"Node, data);\r\n });\r\n }\r\n }\r\n\r\n var initV" +
"ariable = function (name, type) {\r\n variableScopeTree.dynatree(\'getRo" +
"ot\').addChild({ title: name, tooltip: type, isFolder: true, addClass: \'object\', " +
"expressionType: type, isLazy: true });\r\n }\r\n var initExpressionLib" +
"rary = function (name, type) {\r\n extScopeTree.dynatree(\'getRoot\').add" +
"Child({ title: name, tooltip: type, isFolder: true, addClass: \'object\', expressi" +
"onType: type, staticDeclaredMembersOnly: true, isLazy: true });\r\n }\r\n\r\n " +
" // Init\r\n deviceScopeTree.dynatree({ onLazyRead: lazyLoadNode });\r\n" +
" loadType(deviceScopeTree.dynatree(\'getRoot\'), \'");
#line 104 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
Write(Model.DeviceType);
#line default
#line hidden
WriteLiteral("\');\r\n\r\n jobScopeTree.dynatree({ onLazyRead: lazyLoadNode });\r\n load" +
"Type(jobScopeTree.dynatree(\'getRoot\'), \'");
#line 107 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
Write(Model.JobType);
#line default
#line hidden
WriteLiteral("\');\r\n\r\n userScopeTree.dynatree({ onLazyRead: lazyLoadNode });\r\n loa" +
"dType(userScopeTree.dynatree(\'getRoot\'), \'");
#line 110 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
Write(Model.UserType);
#line default
#line hidden
WriteLiteral(@"');
variableScopeTree.dynatree({ onLazyRead: lazyLoadNode });
document.DiscoFunctions.expressionInitVariable = initVariable;
extScopeTree.dynatree({ onLazyRead: lazyLoadNode });
document.DiscoFunctions.expressionInitExpressionLibrary = initExpressionLibrary;
});
</script>
<script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n $(function () {\r\n");
#line 121 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
foreach (var variable in Model.Variables)
{
#line default
#line hidden
WriteLiteral(" ");
WriteLiteral("document.DiscoFunctions.expressionInitVariable(\'");
#line 124 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
Write(variable.Key);
#line default
#line hidden
WriteLiteral("\', \'");
#line 124 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
Write(variable.Value);
#line default
#line hidden
WriteLiteral("\');");
WriteLiteral("\r\n");
#line 125 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
}
foreach (var variable in Model.ExtensionLibraries)
{
#line default
#line hidden
WriteLiteral(" ");
WriteLiteral("document.DiscoFunctions.expressionInitExpressionLibrary(\'");
#line 128 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
Write(variable.Key);
#line default
#line hidden
WriteLiteral("\', \'");
#line 128 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
Write(variable.Value);
#line default
#line hidden
WriteLiteral("\');");
WriteLiteral("\r\n");
#line 129 "..\..\Areas\Config\Views\DocumentTemplate\ExpressionBrowser.cshtml"
}
#line default
#line hidden
WriteLiteral("\r\n });\r\n </script>");
}
}
}
#pragma warning restore 1591
@@ -1,37 +1,37 @@
@model Disco.Web.Areas.Config.Models.DocumentTemplate.IndexModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates");
}
<table class="tableData">
<tr>
<th>
Id
</th>
<th>
Description
</th>
<th>
Scope
</th>
</tr>
@foreach (var item in Model.DocumentTemplates)
{
<tr>
<td>
@Html.ActionLink(item.Id.ToString(), MVC.Config.DocumentTemplate.Index(item.Id))
</td>
<td>
@Html.DisplayFor(modelItem => item.Description)
</td>
<td>
@Html.DisplayFor(modelItem => item.Scope)
</td>
</tr>
}
</table>
<div class="actionBar">
@Html.ActionLinkButton("Undetected Pages", MVC.Config.DocumentTemplate.UndetectedPages())
@Html.ActionLinkButton("Import Status", MVC.Config.DocumentTemplate.ImportStatus())
@Html.ActionLinkButton("Expression Browser", MVC.Config.DocumentTemplate.ExpressionBrowser())
@Html.ActionLinkButton("Create Document Template", MVC.Config.DocumentTemplate.Create())
@model Disco.Web.Areas.Config.Models.DocumentTemplate.IndexModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates");
}
<table class="tableData">
<tr>
<th>
Id
</th>
<th>
Description
</th>
<th>
Scope
</th>
</tr>
@foreach (var item in Model.DocumentTemplates)
{
<tr>
<td>
@Html.ActionLink(item.Id.ToString(), MVC.Config.DocumentTemplate.Index(item.Id))
</td>
<td>
@Html.DisplayFor(modelItem => item.Description)
</td>
<td>
@Html.DisplayFor(modelItem => item.Scope)
</td>
</tr>
}
</table>
<div class="actionBar">
@Html.ActionLinkButton("Undetected Pages", MVC.Config.DocumentTemplate.UndetectedPages())
@Html.ActionLinkButton("Import Status", MVC.Config.DocumentTemplate.ImportStatus())
@Html.ActionLinkButton("Expression Browser", MVC.Config.DocumentTemplate.ExpressionBrowser())
@Html.ActionLinkButton("Create Document Template", MVC.Config.DocumentTemplate.Create())
</div>
@@ -1,168 +1,168 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DocumentTemplate
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DocumentTemplate/Index.cshtml")]
public class Index : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DocumentTemplate.IndexModel>
{
public Index()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates");
#line default
#line hidden
WriteLiteral("\r\n<table");
WriteLiteral(" class=\"tableData\"");
WriteLiteral(">\r\n <tr>\r\n <th>\r\n Id\r\n </th>\r\n <th>\r\n " +
" Description\r\n </th>\r\n <th>\r\n Scope\r\n </th>\r\n " +
" </tr>\r\n");
#line 17 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
#line default
#line hidden
#line 17 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
foreach (var item in Model.DocumentTemplates)
{
#line default
#line hidden
WriteLiteral(" <tr>\r\n <td>\r\n");
WriteLiteral(" ");
#line 21 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
Write(Html.ActionLink(item.Id.ToString(), MVC.Config.DocumentTemplate.Index(item.Id)));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 24 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
Write(Html.DisplayFor(modelItem => item.Description));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 27 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
Write(Html.DisplayFor(modelItem => item.Scope));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
#line 30 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
}
#line default
#line hidden
WriteLiteral("</table>\r\n<div");
WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 33 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
Write(Html.ActionLinkButton("Undetected Pages", MVC.Config.DocumentTemplate.UndetectedPages()));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 34 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
Write(Html.ActionLinkButton("Import Status", MVC.Config.DocumentTemplate.ImportStatus()));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 35 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
Write(Html.ActionLinkButton("Expression Browser", MVC.Config.DocumentTemplate.ExpressionBrowser()));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 36 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
Write(Html.ActionLinkButton("Create Document Template", MVC.Config.DocumentTemplate.Create()));
#line default
#line hidden
WriteLiteral("\r\n</div>");
}
}
}
#pragma warning restore 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DocumentTemplate
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DocumentTemplate/Index.cshtml")]
public class Index : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DocumentTemplate.IndexModel>
{
public Index()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates");
#line default
#line hidden
WriteLiteral("\r\n<table");
WriteLiteral(" class=\"tableData\"");
WriteLiteral(">\r\n <tr>\r\n <th>\r\n Id\r\n </th>\r\n <th>\r\n " +
" Description\r\n </th>\r\n <th>\r\n Scope\r\n </th>\r\n " +
" </tr>\r\n");
#line 17 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
#line default
#line hidden
#line 17 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
foreach (var item in Model.DocumentTemplates)
{
#line default
#line hidden
WriteLiteral(" <tr>\r\n <td>\r\n");
WriteLiteral(" ");
#line 21 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
Write(Html.ActionLink(item.Id.ToString(), MVC.Config.DocumentTemplate.Index(item.Id)));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 24 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
Write(Html.DisplayFor(modelItem => item.Description));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 27 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
Write(Html.DisplayFor(modelItem => item.Scope));
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
#line 30 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
}
#line default
#line hidden
WriteLiteral("</table>\r\n<div");
WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 33 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
Write(Html.ActionLinkButton("Undetected Pages", MVC.Config.DocumentTemplate.UndetectedPages()));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 34 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
Write(Html.ActionLinkButton("Import Status", MVC.Config.DocumentTemplate.ImportStatus()));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 35 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
Write(Html.ActionLinkButton("Expression Browser", MVC.Config.DocumentTemplate.ExpressionBrowser()));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 36 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
Write(Html.ActionLinkButton("Create Document Template", MVC.Config.DocumentTemplate.Create()));
#line default
#line hidden
WriteLiteral("\r\n</div>");
}
}
}
#pragma warning restore 1591
@@ -1,239 +1,239 @@
@model Disco.Web.Areas.Config.Models.DocumentTemplate.UndetectedPagesModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(), "Undetected Pages");
Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
}
<div id="undetectedPagesContainer">
<div id="noUndetectedPages" data-bind="visible: noUndetectedPages">
<h3>
No Undetected Pages</h3>
</div>
<ul id="undetectedPages" class="clearfix" data-bind="visible: !noUndetectedPages(), foreach: {data: undetectedPages}">
<li class="undetectedPage" data-bind="style: {backgroundImage: thumbnailUrl}, click: select">
<div class="pageDetails" data-bind="text: timestampFuzzy, attr: {title: timestamp}">
</div>
</li>
</ul>
</div>
<div id="undetectedPageDialog" data-bind="with: selectedUndetectedPage">
<div class="pagePreview" data-bind="style: {backgroundImage: previewUrl}">
</div>
<div class="actions">
<a href="#" class="button" target="_blank" data-bind="attr: {href: sourceUrl}">Download</a>
<a href="#" class="button" id="dialogDeleteButton" data-bind="click: deletePage">Delete</a>
</div>
<div class="actions">
Type: @Html.DropDownList("dialogDocumentTemplateId", Model.DocumentTemplatesSelectListItems, new Dictionary<string, object> { { "data-bind", "value: dialogTemplateId" } })
Data:
<input id="dialogDataId" type="text" data-bind="value: dialogDataId, autocomplete: {source: dialogDataIdService, minLength: 3, position: {my: 'left bottom', at: 'left top'}}" />
<a href="#" class="button" id="dialogAssignButton" data-bind="click: assignPage">Assign</a>
</div>
</div>
<div id="dialogRemove" title="Delete this Page?">
<p>
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
Are you sure?</p>
</div>
<script type="text/javascript">
ko.bindingHandlers.autocomplete = {
update: function (element, valueAccessor, allBindingsAccessor, viewModel) {
var autocompleteOptions = ko.utils.unwrapObservable(valueAccessor());
if (autocompleteOptions.source)
autocompleteOptions.source = ko.utils.unwrapObservable(autocompleteOptions.source);
$element = $(element);
if (!$element.is('.ui-autocomplete-input')) {
autocompleteOptions.select = function (e, ui) {
allBindingsAccessor().value(ui.item.value);
return false;
}
$element.autocomplete(autocompleteOptions);
} else {
// Update Source Option Only
if (autocompleteOptions.source)
$element.autocomplete('option', 'source', autocompleteOptions.source);
}
}
};
</script>
<script type="text/javascript">
$(function () {
var vm;
var urlUndetectedPageThumbnail = '@(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, false, true))))';
var urlUndetectedPagePreview = '@(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, false, false))))';
var urlUndetectedPageSource = '@(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, true, false))))';
var urlDataIdLookupService = '@(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedDataIdLookup()))/';
var urlImporterUndetectedAssign = '@(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedAssign()))/';
var urlImporterUndetectedDelete = '@(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedDelete()))/';
var $undetectedPageDialog = $('#undetectedPageDialog').dialog({
modal: true,
height: 820,
width: 800,
resizable: false,
autoOpen: false
});
$dialogRemove = $('#dialogRemove').dialog({
resizable: false,
height: 140,
modal: true,
autoOpen: false
});
function pageViewModel() {
var self = this;
self.selectedUndetectedPage = ko.observable(null);
self.undetectedPages = ko.observableArray();
self.noUndetectedPages = ko.computed(function () { return self.undetectedPages().length == 0 });
self.selectNextPage = function () {
var oldSelected = self.selectedUndetectedPage();
var oldSelectedIndex = vm.undetectedPages.indexOf(oldSelected);
if (vm.undetectedPages().length > 1) {
if (oldSelectedIndex > vm.undetectedPages().length - 1)
vm.selectedUndetectedPage(vm.undetectedPages()[oldSelectedIndex + 1]);
else
vm.selectedUndetectedPage(vm.undetectedPages()[oldSelectedIndex - 1]);
} else {
$undetectedPageDialog.dialog('close');
vm.selectedUndetectedPage(null);
}
}
}
function undetectedPageViewModel(id, timestamp, timestampFuzzy) {
var self = this;
self.id = id;
self.timestamp = timestamp;
self.timestampFuzzy = timestampFuzzy;
self.thumbnailUrl = "url(" + urlUndetectedPageThumbnail + "&id=" + id + ")";
self.previewUrl = "url(" + urlUndetectedPagePreview + "&id=" + id + ")";
self.sourceUrl = urlUndetectedPageSource + "&id=" + id;
self.select = function (e, d) {
vm.selectedUndetectedPage(self);
$undetectedPageDialog.dialog('open');
}
// Dialog Properties
self.dialogTemplateId = ko.observable(null);
self.dialogDataId = ko.observable(null);
self.dialogDataIdService = ko.computed(function () {
return urlDataIdLookupService + self.dialogTemplateId();
});
self.deletePage = function () {
$undetectedPageDialog.dialog('option', 'disabled', true);
$dialogRemove.dialog('option', 'buttons', {
"Remove": function () {
$dialogRemove.dialog("close");
var data = { id: self.id };
$.ajax({
url: urlImporterUndetectedDelete,
dataType: 'json',
data: data,
type: 'POST',
success: function (d) {
if (d == 'OK') {
vm.selectNextPage();
vm.undetectedPages.remove(self);
} else {
alert('Unable to delete page: ' + d);
}
$undetectedPageDialog.dialog('option', 'disabled', false);
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to delete page: ' + errorThrown);
$undetectedPageDialog.dialog('option', 'disabled', false);
}
});
},
"Cancel": function () {
$dialogRemove.dialog("close");
$undetectedPageDialog.dialog('option', 'disabled', false);
}
});
$dialogRemove.dialog('open');
return false;
}
self.assignPage = function () {
var dtId = self.dialogTemplateId();
var dId = self.dialogDataId();
if (!dtId || !dId) {
alert('Please specify a valid Document Type and Data Id');
} else {
$undetectedPageDialog.dialog('option', 'disabled', true);
var data = { id: self.id, DocumentTemplateId: dtId, DataId: dId };
$.ajax({
url: urlImporterUndetectedAssign,
dataType: 'json',
data: data,
type: 'POST',
success: function (d) {
if (d == 'OK') {
vm.selectNextPage();
vm.undetectedPages.remove(self);
} else {
alert('Unable to assign page: ' + d);
}
$undetectedPageDialog.dialog('option', 'disabled', false);
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to assign page: ' + errorThrown);
$undetectedPageDialog.dialog('option', 'disabled', false);
}
});
}
return false;
};
}
function init() {
vm = new pageViewModel();
$.ajax({
url: '@(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFiles()))',
dataType: 'json',
type: 'POST',
success: init_loadedContent,
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to load content: ' + errorThrown);
}
});
}
function init_loadedContent(content) {
if (content.length > 0) {
for (var i = 0; i < content.length; i++) {
var c = content[i];
var up = new undetectedPageViewModel(c.Id, c.Timestamp, c.TimestampFuzzy);
vm.undetectedPages.push(up);
}
}
ko.applyBindings(vm);
init_loadedOpen();
}
function init_loadedOpen() {
var fileId = window.location.hash;
if (fileId) {
fileId = fileId.substr(1);
for (var i = 0; i < vm.undetectedPages().length; i++) {
var up = vm.undetectedPages()[i];
if (up.id == fileId) {
up.select();
return;
}
}
}
}
init();
});
</script>
@model Disco.Web.Areas.Config.Models.DocumentTemplate.UndetectedPagesModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(), "Undetected Pages");
Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
}
<div id="undetectedPagesContainer">
<div id="noUndetectedPages" data-bind="visible: noUndetectedPages">
<h3>
No Undetected Pages</h3>
</div>
<ul id="undetectedPages" class="clearfix" data-bind="visible: !noUndetectedPages(), foreach: {data: undetectedPages}">
<li class="undetectedPage" data-bind="style: {backgroundImage: thumbnailUrl}, click: select">
<div class="pageDetails" data-bind="text: timestampFuzzy, attr: {title: timestamp}">
</div>
</li>
</ul>
</div>
<div id="undetectedPageDialog" data-bind="with: selectedUndetectedPage">
<div class="pagePreview" data-bind="style: {backgroundImage: previewUrl}">
</div>
<div class="actions">
<a href="#" class="button" target="_blank" data-bind="attr: {href: sourceUrl}">Download</a>
<a href="#" class="button" id="dialogDeleteButton" data-bind="click: deletePage">Delete</a>
</div>
<div class="actions">
Type: @Html.DropDownList("dialogDocumentTemplateId", Model.DocumentTemplatesSelectListItems, new Dictionary<string, object> { { "data-bind", "value: dialogTemplateId" } })
Data:
<input id="dialogDataId" type="text" data-bind="value: dialogDataId, autocomplete: {source: dialogDataIdService, minLength: 3, position: {my: 'left bottom', at: 'left top'}}" />
<a href="#" class="button" id="dialogAssignButton" data-bind="click: assignPage">Assign</a>
</div>
</div>
<div id="dialogRemove" title="Delete this Page?">
<p>
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
Are you sure?</p>
</div>
<script type="text/javascript">
ko.bindingHandlers.autocomplete = {
update: function (element, valueAccessor, allBindingsAccessor, viewModel) {
var autocompleteOptions = ko.utils.unwrapObservable(valueAccessor());
if (autocompleteOptions.source)
autocompleteOptions.source = ko.utils.unwrapObservable(autocompleteOptions.source);
$element = $(element);
if (!$element.is('.ui-autocomplete-input')) {
autocompleteOptions.select = function (e, ui) {
allBindingsAccessor().value(ui.item.value);
return false;
}
$element.autocomplete(autocompleteOptions);
} else {
// Update Source Option Only
if (autocompleteOptions.source)
$element.autocomplete('option', 'source', autocompleteOptions.source);
}
}
};
</script>
<script type="text/javascript">
$(function () {
var vm;
var urlUndetectedPageThumbnail = '@(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, false, true))))';
var urlUndetectedPagePreview = '@(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, false, false))))';
var urlUndetectedPageSource = '@(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, true, false))))';
var urlDataIdLookupService = '@(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedDataIdLookup()))/';
var urlImporterUndetectedAssign = '@(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedAssign()))/';
var urlImporterUndetectedDelete = '@(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedDelete()))/';
var $undetectedPageDialog = $('#undetectedPageDialog').dialog({
modal: true,
height: 820,
width: 800,
resizable: false,
autoOpen: false
});
$dialogRemove = $('#dialogRemove').dialog({
resizable: false,
height: 140,
modal: true,
autoOpen: false
});
function pageViewModel() {
var self = this;
self.selectedUndetectedPage = ko.observable(null);
self.undetectedPages = ko.observableArray();
self.noUndetectedPages = ko.computed(function () { return self.undetectedPages().length == 0 });
self.selectNextPage = function () {
var oldSelected = self.selectedUndetectedPage();
var oldSelectedIndex = vm.undetectedPages.indexOf(oldSelected);
if (vm.undetectedPages().length > 1) {
if (oldSelectedIndex > vm.undetectedPages().length - 1)
vm.selectedUndetectedPage(vm.undetectedPages()[oldSelectedIndex + 1]);
else
vm.selectedUndetectedPage(vm.undetectedPages()[oldSelectedIndex - 1]);
} else {
$undetectedPageDialog.dialog('close');
vm.selectedUndetectedPage(null);
}
}
}
function undetectedPageViewModel(id, timestamp, timestampFuzzy) {
var self = this;
self.id = id;
self.timestamp = timestamp;
self.timestampFuzzy = timestampFuzzy;
self.thumbnailUrl = "url(" + urlUndetectedPageThumbnail + "&id=" + id + ")";
self.previewUrl = "url(" + urlUndetectedPagePreview + "&id=" + id + ")";
self.sourceUrl = urlUndetectedPageSource + "&id=" + id;
self.select = function (e, d) {
vm.selectedUndetectedPage(self);
$undetectedPageDialog.dialog('open');
}
// Dialog Properties
self.dialogTemplateId = ko.observable(null);
self.dialogDataId = ko.observable(null);
self.dialogDataIdService = ko.computed(function () {
return urlDataIdLookupService + self.dialogTemplateId();
});
self.deletePage = function () {
$undetectedPageDialog.dialog('option', 'disabled', true);
$dialogRemove.dialog('option', 'buttons', {
"Remove": function () {
$dialogRemove.dialog("close");
var data = { id: self.id };
$.ajax({
url: urlImporterUndetectedDelete,
dataType: 'json',
data: data,
type: 'POST',
success: function (d) {
if (d == 'OK') {
vm.selectNextPage();
vm.undetectedPages.remove(self);
} else {
alert('Unable to delete page: ' + d);
}
$undetectedPageDialog.dialog('option', 'disabled', false);
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to delete page: ' + errorThrown);
$undetectedPageDialog.dialog('option', 'disabled', false);
}
});
},
"Cancel": function () {
$dialogRemove.dialog("close");
$undetectedPageDialog.dialog('option', 'disabled', false);
}
});
$dialogRemove.dialog('open');
return false;
}
self.assignPage = function () {
var dtId = self.dialogTemplateId();
var dId = self.dialogDataId();
if (!dtId || !dId) {
alert('Please specify a valid Document Type and Data Id');
} else {
$undetectedPageDialog.dialog('option', 'disabled', true);
var data = { id: self.id, DocumentTemplateId: dtId, DataId: dId };
$.ajax({
url: urlImporterUndetectedAssign,
dataType: 'json',
data: data,
type: 'POST',
success: function (d) {
if (d == 'OK') {
vm.selectNextPage();
vm.undetectedPages.remove(self);
} else {
alert('Unable to assign page: ' + d);
}
$undetectedPageDialog.dialog('option', 'disabled', false);
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to assign page: ' + errorThrown);
$undetectedPageDialog.dialog('option', 'disabled', false);
}
});
}
return false;
};
}
function init() {
vm = new pageViewModel();
$.ajax({
url: '@(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFiles()))',
dataType: 'json',
type: 'POST',
success: init_loadedContent,
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to load content: ' + errorThrown);
}
});
}
function init_loadedContent(content) {
if (content.length > 0) {
for (var i = 0; i < content.length; i++) {
var c = content[i];
var up = new undetectedPageViewModel(c.Id, c.Timestamp, c.TimestampFuzzy);
vm.undetectedPages.push(up);
}
}
ko.applyBindings(vm);
init_loadedOpen();
}
function init_loadedOpen() {
var fileId = window.location.hash;
if (fileId) {
fileId = fileId.substr(1);
for (var i = 0; i < vm.undetectedPages().length; i++) {
var up = vm.undetectedPages()[i];
if (up.id == fileId) {
up.select();
return;
}
}
}
}
init();
});
</script>
@@ -1,370 +1,370 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DocumentTemplate
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DocumentTemplate/UndetectedPages.cshtml")]
public class UndetectedPages : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DocumentTemplate.UndetectedPagesModel>
{
public UndetectedPages()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(), "Undetected Pages");
Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" id=\"undetectedPagesContainer\"");
WriteLiteral(">\r\n <div");
WriteLiteral(" id=\"noUndetectedPages\"");
WriteLiteral(" data-bind=\"visible: noUndetectedPages\"");
WriteLiteral(">\r\n <h3>\r\n No Undetected Pages</h3>\r\n </div>\r\n <ul");
WriteLiteral(" id=\"undetectedPages\"");
WriteLiteral(" class=\"clearfix\"");
WriteLiteral(" data-bind=\"visible: !noUndetectedPages(), foreach: {data: undetectedPages}\"");
WriteLiteral(">\r\n <li");
WriteLiteral(" class=\"undetectedPage\"");
WriteLiteral(" data-bind=\"style: {backgroundImage: thumbnailUrl}, click: select\"");
WriteLiteral(">\r\n <div");
WriteLiteral(" class=\"pageDetails\"");
WriteLiteral(" data-bind=\"text: timestampFuzzy, attr: {title: timestamp}\"");
WriteLiteral(">\r\n </div>\r\n </li>\r\n </ul>\r\n</div>\r\n<div");
WriteLiteral(" id=\"undetectedPageDialog\"");
WriteLiteral(" data-bind=\"with: selectedUndetectedPage\"");
WriteLiteral(">\r\n <div");
WriteLiteral(" class=\"pagePreview\"");
WriteLiteral(" data-bind=\"style: {backgroundImage: previewUrl}\"");
WriteLiteral(">\r\n </div>\r\n <div");
WriteLiteral(" class=\"actions\"");
WriteLiteral(">\r\n <a");
WriteLiteral(" href=\"#\"");
WriteLiteral(" class=\"button\"");
WriteLiteral(" target=\"_blank\"");
WriteLiteral(" data-bind=\"attr: {href: sourceUrl}\"");
WriteLiteral(">Download</a>\r\n <a");
WriteLiteral(" href=\"#\"");
WriteLiteral(" class=\"button\"");
WriteLiteral(" id=\"dialogDeleteButton\"");
WriteLiteral(" data-bind=\"click: deletePage\"");
WriteLiteral(">Delete</a>\r\n </div>\r\n <div");
WriteLiteral(" class=\"actions\"");
WriteLiteral(">\r\n Type: ");
#line 27 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
Write(Html.DropDownList("dialogDocumentTemplateId", Model.DocumentTemplatesSelectListItems, new Dictionary<string, object> { { "data-bind", "value: dialogTemplateId" } }));
#line default
#line hidden
WriteLiteral("\r\n Data:\r\n <input");
WriteLiteral(" id=\"dialogDataId\"");
WriteLiteral(" type=\"text\"");
WriteLiteral(" data-bind=\"value: dialogDataId, autocomplete: {source: dialogDataIdService, minL" +
"ength: 3, position: {my: \'left bottom\', at: \'left top\'}}\"");
WriteLiteral(" />\r\n <a");
WriteLiteral(" href=\"#\"");
WriteLiteral(" class=\"button\"");
WriteLiteral(" id=\"dialogAssignButton\"");
WriteLiteral(" data-bind=\"click: assignPage\"");
WriteLiteral(">Assign</a>\r\n </div>\r\n</div>\r\n<div");
WriteLiteral(" id=\"dialogRemove\"");
WriteLiteral(" title=\"Delete this Page?\"");
WriteLiteral(">\r\n <p>\r\n <span");
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
WriteLiteral(" style=\"float: left; margin: 0 7px 20px 0;\"");
WriteLiteral("></span>\r\n Are you sure?</p>\r\n</div>\r\n<script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
ko.bindingHandlers.autocomplete = {
update: function (element, valueAccessor, allBindingsAccessor, viewModel) {
var autocompleteOptions = ko.utils.unwrapObservable(valueAccessor());
if (autocompleteOptions.source)
autocompleteOptions.source = ko.utils.unwrapObservable(autocompleteOptions.source);
$element = $(element);
if (!$element.is('.ui-autocomplete-input')) {
autocompleteOptions.select = function (e, ui) {
allBindingsAccessor().value(ui.item.value);
return false;
}
$element.autocomplete(autocompleteOptions);
} else {
// Update Source Option Only
if (autocompleteOptions.source)
$element.autocomplete('option', 'source', autocompleteOptions.source);
}
}
};
</script>
<script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n $(function () {\r\n\r\n var vm;\r\n var urlUndetectedPageThumbnail" +
" = \'");
#line 63 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
Write(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, false, true))));
#line default
#line hidden
WriteLiteral("\';\r\n var urlUndetectedPagePreview = \'");
#line 64 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
Write(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, false, false))));
#line default
#line hidden
WriteLiteral("\';\r\n var urlUndetectedPageSource = \'");
#line 65 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
Write(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, true, false))));
#line default
#line hidden
WriteLiteral("\';\r\n var urlDataIdLookupService = \'");
#line 66 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
Write(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedDataIdLookup()));
#line default
#line hidden
WriteLiteral("/\';\r\n var urlImporterUndetectedAssign = \'");
#line 67 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
Write(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedAssign()));
#line default
#line hidden
WriteLiteral("/\';\r\n var urlImporterUndetectedDelete = \'");
#line 68 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
Write(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedDelete()));
#line default
#line hidden
WriteLiteral("/\';\r\n var $undetectedPageDialog = $(\'#undetectedPageDialog\').dialog({\r\n " +
" modal: true,\r\n height: 820,\r\n width: 800,\r\n " +
" resizable: false,\r\n autoOpen: false\r\n });\r\n\r\n $di" +
"alogRemove = $(\'#dialogRemove\').dialog({\r\n resizable: false,\r\n " +
" height: 140,\r\n modal: true,\r\n autoOpen: false\r\n " +
" });\r\n\r\n function pageViewModel() {\r\n var self = this;\r\n\r\n " +
" self.selectedUndetectedPage = ko.observable(null);\r\n self.un" +
"detectedPages = ko.observableArray();\r\n self.noUndetectedPages = ko.c" +
"omputed(function () { return self.undetectedPages().length == 0 });\r\n " +
" self.selectNextPage = function () {\r\n var oldSelected = self.sel" +
"ectedUndetectedPage();\r\n var oldSelectedIndex = vm.undetectedPage" +
"s.indexOf(oldSelected);\r\n\r\n if (vm.undetectedPages().length > 1) " +
"{\r\n if (oldSelectedIndex > vm.undetectedPages().length - 1)\r\n" +
" vm.selectedUndetectedPage(vm.undetectedPages()[oldSelect" +
"edIndex + 1]);\r\n else\r\n vm.selectedUnd" +
"etectedPage(vm.undetectedPages()[oldSelectedIndex - 1]);\r\n } else" +
" {\r\n $undetectedPageDialog.dialog(\'close\');\r\n " +
" vm.selectedUndetectedPage(null);\r\n }\r\n }\r\n " +
"}\r\n\r\n function undetectedPageViewModel(id, timestamp, timestampFuzzy) {\r\n" +
" var self = this;\r\n\r\n self.id = id;\r\n self.time" +
"stamp = timestamp;\r\n self.timestampFuzzy = timestampFuzzy;\r\n " +
" self.thumbnailUrl = \"url(\" + urlUndetectedPageThumbnail + \"&id=\" + id + \")\";\r" +
"\n self.previewUrl = \"url(\" + urlUndetectedPagePreview + \"&id=\" + id +" +
" \")\";\r\n self.sourceUrl = urlUndetectedPageSource + \"&id=\" + id;\r\n " +
" self.select = function (e, d) {\r\n vm.selectedUndetectedPa" +
"ge(self);\r\n $undetectedPageDialog.dialog(\'open\');\r\n }\r" +
"\n\r\n // Dialog Properties\r\n self.dialogTemplateId = ko.obse" +
"rvable(null);\r\n self.dialogDataId = ko.observable(null);\r\n " +
" self.dialogDataIdService = ko.computed(function () {\r\n return ur" +
"lDataIdLookupService + self.dialogTemplateId();\r\n });\r\n se" +
"lf.deletePage = function () {\r\n $undetectedPageDialog.dialog(\'opt" +
"ion\', \'disabled\', true);\r\n\r\n $dialogRemove.dialog(\'option\', \'butt" +
"ons\', {\r\n \"Remove\": function () {\r\n $d" +
"ialogRemove.dialog(\"close\");\r\n var data = { id: self.id }" +
";\r\n $.ajax({\r\n url: urlImporte" +
"rUndetectedDelete,\r\n dataType: \'json\',\r\n " +
" data: data,\r\n type: \'POST\',\r\n " +
" success: function (d) {\r\n if (" +
"d == \'OK\') {\r\n vm.selectNextPage();\r\n " +
" vm.undetectedPages.remove(self);\r\n " +
" } else {\r\n alert(\'Unable to del" +
"ete page: \' + d);\r\n }\r\n " +
" $undetectedPageDialog.dialog(\'option\', \'disabled\', false);\r\n " +
" },\r\n error: function (jqXHR, textStatus" +
", errorThrown) {\r\n alert(\'Unable to delete page: " +
"\' + errorThrown);\r\n $undetectedPageDialog.dialog(" +
"\'option\', \'disabled\', false);\r\n }\r\n " +
" });\r\n },\r\n \"Cancel\": function () {\r\n" +
" $dialogRemove.dialog(\"close\");\r\n " +
"$undetectedPageDialog.dialog(\'option\', \'disabled\', false);\r\n " +
"}\r\n });\r\n\r\n $dialogRemove.dialog(\'open\');\r\n\r\n " +
" return false;\r\n }\r\n self.assignPage = function " +
"() {\r\n var dtId = self.dialogTemplateId();\r\n var d" +
"Id = self.dialogDataId();\r\n if (!dtId || !dId) {\r\n " +
" alert(\'Please specify a valid Document Type and Data Id\');\r\n " +
" } else {\r\n $undetectedPageDialog.dialog(\'option\', \'disabled\'" +
", true);\r\n\r\n var data = { id: self.id, DocumentTemplateId: dt" +
"Id, DataId: dId };\r\n\r\n $.ajax({\r\n url:" +
" urlImporterUndetectedAssign,\r\n dataType: \'json\',\r\n " +
" data: data,\r\n type: \'POST\',\r\n " +
" success: function (d) {\r\n if (d == \'OK\'" +
") {\r\n vm.selectNextPage();\r\n " +
" vm.undetectedPages.remove(self);\r\n } else " +
"{\r\n alert(\'Unable to assign page: \' + d);\r\n " +
" }\r\n $undetectedPageDialog.dialo" +
"g(\'option\', \'disabled\', false);\r\n },\r\n " +
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
" alert(\'Unable to assign page: \' + errorThrown);\r\n " +
" $undetectedPageDialog.dialog(\'option\', \'disabled\', false);\r\n " +
" }\r\n });\r\n\r\n }\r\n return fa" +
"lse;\r\n };\r\n }\r\n\r\n function init() {\r\n vm = n" +
"ew pageViewModel();\r\n\r\n $.ajax({\r\n url: \'");
#line 202 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
Write(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFiles()));
#line default
#line hidden
WriteLiteral(@"',
dataType: 'json',
type: 'POST',
success: init_loadedContent,
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to load content: ' + errorThrown);
}
});
}
function init_loadedContent(content) {
if (content.length > 0) {
for (var i = 0; i < content.length; i++) {
var c = content[i];
var up = new undetectedPageViewModel(c.Id, c.Timestamp, c.TimestampFuzzy);
vm.undetectedPages.push(up);
}
}
ko.applyBindings(vm);
init_loadedOpen();
}
function init_loadedOpen() {
var fileId = window.location.hash;
if (fileId) {
fileId = fileId.substr(1);
for (var i = 0; i < vm.undetectedPages().length; i++) {
var up = vm.undetectedPages()[i];
if (up.id == fileId) {
up.select();
return;
}
}
}
}
init();
});
</script>
");
}
}
}
#pragma warning restore 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DocumentTemplate
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DocumentTemplate/UndetectedPages.cshtml")]
public class UndetectedPages : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.DocumentTemplate.UndetectedPagesModel>
{
public UndetectedPages()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(), "Undetected Pages");
Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" id=\"undetectedPagesContainer\"");
WriteLiteral(">\r\n <div");
WriteLiteral(" id=\"noUndetectedPages\"");
WriteLiteral(" data-bind=\"visible: noUndetectedPages\"");
WriteLiteral(">\r\n <h3>\r\n No Undetected Pages</h3>\r\n </div>\r\n <ul");
WriteLiteral(" id=\"undetectedPages\"");
WriteLiteral(" class=\"clearfix\"");
WriteLiteral(" data-bind=\"visible: !noUndetectedPages(), foreach: {data: undetectedPages}\"");
WriteLiteral(">\r\n <li");
WriteLiteral(" class=\"undetectedPage\"");
WriteLiteral(" data-bind=\"style: {backgroundImage: thumbnailUrl}, click: select\"");
WriteLiteral(">\r\n <div");
WriteLiteral(" class=\"pageDetails\"");
WriteLiteral(" data-bind=\"text: timestampFuzzy, attr: {title: timestamp}\"");
WriteLiteral(">\r\n </div>\r\n </li>\r\n </ul>\r\n</div>\r\n<div");
WriteLiteral(" id=\"undetectedPageDialog\"");
WriteLiteral(" data-bind=\"with: selectedUndetectedPage\"");
WriteLiteral(">\r\n <div");
WriteLiteral(" class=\"pagePreview\"");
WriteLiteral(" data-bind=\"style: {backgroundImage: previewUrl}\"");
WriteLiteral(">\r\n </div>\r\n <div");
WriteLiteral(" class=\"actions\"");
WriteLiteral(">\r\n <a");
WriteLiteral(" href=\"#\"");
WriteLiteral(" class=\"button\"");
WriteLiteral(" target=\"_blank\"");
WriteLiteral(" data-bind=\"attr: {href: sourceUrl}\"");
WriteLiteral(">Download</a>\r\n <a");
WriteLiteral(" href=\"#\"");
WriteLiteral(" class=\"button\"");
WriteLiteral(" id=\"dialogDeleteButton\"");
WriteLiteral(" data-bind=\"click: deletePage\"");
WriteLiteral(">Delete</a>\r\n </div>\r\n <div");
WriteLiteral(" class=\"actions\"");
WriteLiteral(">\r\n Type: ");
#line 27 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
Write(Html.DropDownList("dialogDocumentTemplateId", Model.DocumentTemplatesSelectListItems, new Dictionary<string, object> { { "data-bind", "value: dialogTemplateId" } }));
#line default
#line hidden
WriteLiteral("\r\n Data:\r\n <input");
WriteLiteral(" id=\"dialogDataId\"");
WriteLiteral(" type=\"text\"");
WriteLiteral(" data-bind=\"value: dialogDataId, autocomplete: {source: dialogDataIdService, minL" +
"ength: 3, position: {my: \'left bottom\', at: \'left top\'}}\"");
WriteLiteral(" />\r\n <a");
WriteLiteral(" href=\"#\"");
WriteLiteral(" class=\"button\"");
WriteLiteral(" id=\"dialogAssignButton\"");
WriteLiteral(" data-bind=\"click: assignPage\"");
WriteLiteral(">Assign</a>\r\n </div>\r\n</div>\r\n<div");
WriteLiteral(" id=\"dialogRemove\"");
WriteLiteral(" title=\"Delete this Page?\"");
WriteLiteral(">\r\n <p>\r\n <span");
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
WriteLiteral(" style=\"float: left; margin: 0 7px 20px 0;\"");
WriteLiteral("></span>\r\n Are you sure?</p>\r\n</div>\r\n<script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
ko.bindingHandlers.autocomplete = {
update: function (element, valueAccessor, allBindingsAccessor, viewModel) {
var autocompleteOptions = ko.utils.unwrapObservable(valueAccessor());
if (autocompleteOptions.source)
autocompleteOptions.source = ko.utils.unwrapObservable(autocompleteOptions.source);
$element = $(element);
if (!$element.is('.ui-autocomplete-input')) {
autocompleteOptions.select = function (e, ui) {
allBindingsAccessor().value(ui.item.value);
return false;
}
$element.autocomplete(autocompleteOptions);
} else {
// Update Source Option Only
if (autocompleteOptions.source)
$element.autocomplete('option', 'source', autocompleteOptions.source);
}
}
};
</script>
<script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n $(function () {\r\n\r\n var vm;\r\n var urlUndetectedPageThumbnail" +
" = \'");
#line 63 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
Write(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, false, true))));
#line default
#line hidden
WriteLiteral("\';\r\n var urlUndetectedPagePreview = \'");
#line 64 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
Write(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, false, false))));
#line default
#line hidden
WriteLiteral("\';\r\n var urlUndetectedPageSource = \'");
#line 65 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
Write(new HtmlString(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFile(null, true, false))));
#line default
#line hidden
WriteLiteral("\';\r\n var urlDataIdLookupService = \'");
#line 66 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
Write(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedDataIdLookup()));
#line default
#line hidden
WriteLiteral("/\';\r\n var urlImporterUndetectedAssign = \'");
#line 67 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
Write(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedAssign()));
#line default
#line hidden
WriteLiteral("/\';\r\n var urlImporterUndetectedDelete = \'");
#line 68 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
Write(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedDelete()));
#line default
#line hidden
WriteLiteral("/\';\r\n var $undetectedPageDialog = $(\'#undetectedPageDialog\').dialog({\r\n " +
" modal: true,\r\n height: 820,\r\n width: 800,\r\n " +
" resizable: false,\r\n autoOpen: false\r\n });\r\n\r\n $di" +
"alogRemove = $(\'#dialogRemove\').dialog({\r\n resizable: false,\r\n " +
" height: 140,\r\n modal: true,\r\n autoOpen: false\r\n " +
" });\r\n\r\n function pageViewModel() {\r\n var self = this;\r\n\r\n " +
" self.selectedUndetectedPage = ko.observable(null);\r\n self.un" +
"detectedPages = ko.observableArray();\r\n self.noUndetectedPages = ko.c" +
"omputed(function () { return self.undetectedPages().length == 0 });\r\n " +
" self.selectNextPage = function () {\r\n var oldSelected = self.sel" +
"ectedUndetectedPage();\r\n var oldSelectedIndex = vm.undetectedPage" +
"s.indexOf(oldSelected);\r\n\r\n if (vm.undetectedPages().length > 1) " +
"{\r\n if (oldSelectedIndex > vm.undetectedPages().length - 1)\r\n" +
" vm.selectedUndetectedPage(vm.undetectedPages()[oldSelect" +
"edIndex + 1]);\r\n else\r\n vm.selectedUnd" +
"etectedPage(vm.undetectedPages()[oldSelectedIndex - 1]);\r\n } else" +
" {\r\n $undetectedPageDialog.dialog(\'close\');\r\n " +
" vm.selectedUndetectedPage(null);\r\n }\r\n }\r\n " +
"}\r\n\r\n function undetectedPageViewModel(id, timestamp, timestampFuzzy) {\r\n" +
" var self = this;\r\n\r\n self.id = id;\r\n self.time" +
"stamp = timestamp;\r\n self.timestampFuzzy = timestampFuzzy;\r\n " +
" self.thumbnailUrl = \"url(\" + urlUndetectedPageThumbnail + \"&id=\" + id + \")\";\r" +
"\n self.previewUrl = \"url(\" + urlUndetectedPagePreview + \"&id=\" + id +" +
" \")\";\r\n self.sourceUrl = urlUndetectedPageSource + \"&id=\" + id;\r\n " +
" self.select = function (e, d) {\r\n vm.selectedUndetectedPa" +
"ge(self);\r\n $undetectedPageDialog.dialog(\'open\');\r\n }\r" +
"\n\r\n // Dialog Properties\r\n self.dialogTemplateId = ko.obse" +
"rvable(null);\r\n self.dialogDataId = ko.observable(null);\r\n " +
" self.dialogDataIdService = ko.computed(function () {\r\n return ur" +
"lDataIdLookupService + self.dialogTemplateId();\r\n });\r\n se" +
"lf.deletePage = function () {\r\n $undetectedPageDialog.dialog(\'opt" +
"ion\', \'disabled\', true);\r\n\r\n $dialogRemove.dialog(\'option\', \'butt" +
"ons\', {\r\n \"Remove\": function () {\r\n $d" +
"ialogRemove.dialog(\"close\");\r\n var data = { id: self.id }" +
";\r\n $.ajax({\r\n url: urlImporte" +
"rUndetectedDelete,\r\n dataType: \'json\',\r\n " +
" data: data,\r\n type: \'POST\',\r\n " +
" success: function (d) {\r\n if (" +
"d == \'OK\') {\r\n vm.selectNextPage();\r\n " +
" vm.undetectedPages.remove(self);\r\n " +
" } else {\r\n alert(\'Unable to del" +
"ete page: \' + d);\r\n }\r\n " +
" $undetectedPageDialog.dialog(\'option\', \'disabled\', false);\r\n " +
" },\r\n error: function (jqXHR, textStatus" +
", errorThrown) {\r\n alert(\'Unable to delete page: " +
"\' + errorThrown);\r\n $undetectedPageDialog.dialog(" +
"\'option\', \'disabled\', false);\r\n }\r\n " +
" });\r\n },\r\n \"Cancel\": function () {\r\n" +
" $dialogRemove.dialog(\"close\");\r\n " +
"$undetectedPageDialog.dialog(\'option\', \'disabled\', false);\r\n " +
"}\r\n });\r\n\r\n $dialogRemove.dialog(\'open\');\r\n\r\n " +
" return false;\r\n }\r\n self.assignPage = function " +
"() {\r\n var dtId = self.dialogTemplateId();\r\n var d" +
"Id = self.dialogDataId();\r\n if (!dtId || !dId) {\r\n " +
" alert(\'Please specify a valid Document Type and Data Id\');\r\n " +
" } else {\r\n $undetectedPageDialog.dialog(\'option\', \'disabled\'" +
", true);\r\n\r\n var data = { id: self.id, DocumentTemplateId: dt" +
"Id, DataId: dId };\r\n\r\n $.ajax({\r\n url:" +
" urlImporterUndetectedAssign,\r\n dataType: \'json\',\r\n " +
" data: data,\r\n type: \'POST\',\r\n " +
" success: function (d) {\r\n if (d == \'OK\'" +
") {\r\n vm.selectNextPage();\r\n " +
" vm.undetectedPages.remove(self);\r\n } else " +
"{\r\n alert(\'Unable to assign page: \' + d);\r\n " +
" }\r\n $undetectedPageDialog.dialo" +
"g(\'option\', \'disabled\', false);\r\n },\r\n " +
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
" alert(\'Unable to assign page: \' + errorThrown);\r\n " +
" $undetectedPageDialog.dialog(\'option\', \'disabled\', false);\r\n " +
" }\r\n });\r\n\r\n }\r\n return fa" +
"lse;\r\n };\r\n }\r\n\r\n function init() {\r\n vm = n" +
"ew pageViewModel();\r\n\r\n $.ajax({\r\n url: \'");
#line 202 "..\..\Areas\Config\Views\DocumentTemplate\UndetectedPages.cshtml"
Write(Url.Action(MVC.API.DocumentTemplate.ImporterUndetectedFiles()));
#line default
#line hidden
WriteLiteral(@"',
dataType: 'json',
type: 'POST',
success: init_loadedContent,
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to load content: ' + errorThrown);
}
});
}
function init_loadedContent(content) {
if (content.length > 0) {
for (var i = 0; i < content.length; i++) {
var c = content[i];
var up = new undetectedPageViewModel(c.Id, c.Timestamp, c.TimestampFuzzy);
vm.undetectedPages.push(up);
}
}
ko.applyBindings(vm);
init_loadedOpen();
}
function init_loadedOpen() {
var fileId = window.location.hash;
if (fileId) {
fileId = fileId.substr(1);
for (var i = 0; i < vm.undetectedPages().length; i++) {
var up = vm.undetectedPages()[i];
if (up.id == fileId) {
up.select();
return;
}
}
}
}
init();
});
</script>
");
}
}
}
#pragma warning restore 1591
@@ -1,75 +1,75 @@
@model IEnumerable<Disco.BI.Expressions.Expression>
<div class="expressionsTable">
@if (Model.Count() > 0)
{
<table class="expressionsTable">
<tr>
<th>
Name
</th>
<th>
Expression
</th>
<th>
Errors Allowed
</th>
</tr>
@foreach (var expression in Model.Where(m => m.IsDynamic))
{
var expressionParts = expression.Where(e => e.IsDynamic).ToArray();
<tr>
<td rowspan="@(expressionParts.Length)">
@expression.Name
</td>
@if (expressionParts[0].ParseError)
{
<td class="parseError">
@expressionParts[0].Source
<div class="code">
<strong>Expression Compilation Error:</strong><br />
@expressionParts[0].ParseErrorMessage
</div>
</td>
}
else
{
<td>
@expressionParts[0].Source
</td>
}
<td>
@(expressionParts[0].ErrorsAllowed ? "Yes" : "No")
</td>
</tr>
for (int expressionIndex = 1; expressionIndex < expressionParts.Length; expressionIndex++)
{
<tr>
@if (expressionParts[expressionIndex].ParseError)
{
<td class="parseError">
@expressionParts[expressionIndex].Source
<div class="code">
<strong>Expression Compilation Error:</strong><br />
@expressionParts[expressionIndex].ParseErrorMessage
</div>
</td>
}
else
{
<td>
@expressionParts[expressionIndex].Source
</td>
}
<td>
@(expressionParts[expressionIndex].ErrorsAllowed ? "Yes" : "No")
</td>
</tr>
}
}
</table>
}
else
{
<span class="smallMessage">No Expressions Found</span>
}
</div>
@model IEnumerable<Disco.BI.Expressions.Expression>
<div class="expressionsTable">
@if (Model.Count() > 0)
{
<table class="expressionsTable">
<tr>
<th>
Name
</th>
<th>
Expression
</th>
<th>
Errors Allowed
</th>
</tr>
@foreach (var expression in Model.Where(m => m.IsDynamic))
{
var expressionParts = expression.Where(e => e.IsDynamic).ToArray();
<tr>
<td rowspan="@(expressionParts.Length)">
@expression.Name
</td>
@if (expressionParts[0].ParseError)
{
<td class="parseError">
@expressionParts[0].Source
<div class="code">
<strong>Expression Compilation Error:</strong><br />
@expressionParts[0].ParseErrorMessage
</div>
</td>
}
else
{
<td>
@expressionParts[0].Source
</td>
}
<td>
@(expressionParts[0].ErrorsAllowed ? "Yes" : "No")
</td>
</tr>
for (int expressionIndex = 1; expressionIndex < expressionParts.Length; expressionIndex++)
{
<tr>
@if (expressionParts[expressionIndex].ParseError)
{
<td class="parseError">
@expressionParts[expressionIndex].Source
<div class="code">
<strong>Expression Compilation Error:</strong><br />
@expressionParts[expressionIndex].ParseErrorMessage
</div>
</td>
}
else
{
<td>
@expressionParts[expressionIndex].Source
</td>
}
<td>
@(expressionParts[expressionIndex].ErrorsAllowed ? "Yes" : "No")
</td>
</tr>
}
}
</table>
}
else
{
<span class="smallMessage">No Expressions Found</span>
}
</div>
@@ -1,346 +1,346 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DocumentTemplate
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DocumentTemplate/_ExpressionsTable.cshtml")]
public class ExpressionsTable : System.Web.Mvc.WebViewPage<IEnumerable<Disco.BI.Expressions.Expression>>
{
public ExpressionsTable()
{
}
public override void Execute()
{
WriteLiteral("<div");
WriteLiteral(" class=\"expressionsTable\"");
WriteLiteral(">\r\n");
#line 3 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
#line default
#line hidden
#line 3 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
if (Model.Count() > 0)
{
#line default
#line hidden
WriteLiteral(" <table");
WriteLiteral(" class=\"expressionsTable\"");
WriteLiteral(@">
<tr>
<th>
Name
</th>
<th>
Expression
</th>
<th>
Errors Allowed
</th>
</tr>
");
#line 17 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
#line default
#line hidden
#line 17 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
foreach (var expression in Model.Where(m => m.IsDynamic))
{
var expressionParts = expression.Where(e => e.IsDynamic).ToArray();
#line default
#line hidden
WriteLiteral(" <tr>\r\n <td");
WriteAttribute("rowspan", Tuple.Create(" rowspan=\"", 647), Tuple.Create("\"", 682)
#line 21 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
, Tuple.Create(Tuple.Create("", 657), Tuple.Create<System.Object, System.Int32>(expressionParts.Length
#line default
#line hidden
, 657), false)
);
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 22 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
Write(expression.Name);
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n");
#line 24 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
#line default
#line hidden
#line 24 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
if (expressionParts[0].ParseError)
{
#line default
#line hidden
WriteLiteral(" <td");
WriteLiteral(" class=\"parseError\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 27 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
Write(expressionParts[0].Source);
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"code\"");
WriteLiteral(">\r\n <strong>Expression Compilation Error:</strong>" +
"<br />\r\n");
WriteLiteral(" ");
#line 30 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
Write(expressionParts[0].ParseErrorMessage);
#line default
#line hidden
WriteLiteral("\r\n </div>\r\n </td>\r\n");
#line 33 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
}
else
{
#line default
#line hidden
WriteLiteral(" <td>\r\n");
WriteLiteral(" ");
#line 37 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
Write(expressionParts[0].Source);
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n");
#line 39 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
}
#line default
#line hidden
WriteLiteral(" <td>\r\n");
WriteLiteral(" ");
#line 41 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
Write(expressionParts[0].ErrorsAllowed ? "Yes" : "No");
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
#line 44 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
for (int expressionIndex = 1; expressionIndex < expressionParts.Length; expressionIndex++)
{
#line default
#line hidden
WriteLiteral(" <tr>\r\n");
#line 47 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
#line default
#line hidden
#line 47 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
if (expressionParts[expressionIndex].ParseError)
{
#line default
#line hidden
WriteLiteral(" <td");
WriteLiteral(" class=\"parseError\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 50 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
Write(expressionParts[expressionIndex].Source);
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"code\"");
WriteLiteral(">\r\n <strong>Expression Compilation Error:</strong>" +
"<br />\r\n");
WriteLiteral(" ");
#line 53 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
Write(expressionParts[expressionIndex].ParseErrorMessage);
#line default
#line hidden
WriteLiteral("\r\n </div>\r\n </td>\r\n");
#line 56 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
}
else
{
#line default
#line hidden
WriteLiteral(" <td>\r\n");
WriteLiteral(" ");
#line 60 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
Write(expressionParts[expressionIndex].Source);
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n");
#line 62 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
}
#line default
#line hidden
WriteLiteral(" <td>\r\n");
WriteLiteral(" ");
#line 64 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
Write(expressionParts[expressionIndex].ErrorsAllowed ? "Yes" : "No");
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
#line 67 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
}
}
#line default
#line hidden
WriteLiteral(" </table>\r\n");
#line 70 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
}
else
{
#line default
#line hidden
WriteLiteral(" <span");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">No Expressions Found</span>\r\n");
#line 74 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
}
#line default
#line hidden
WriteLiteral("</div>\r\n");
}
}
}
#pragma warning restore 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.DocumentTemplate
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DocumentTemplate/_ExpressionsTable.cshtml")]
public class ExpressionsTable : System.Web.Mvc.WebViewPage<IEnumerable<Disco.BI.Expressions.Expression>>
{
public ExpressionsTable()
{
}
public override void Execute()
{
WriteLiteral("<div");
WriteLiteral(" class=\"expressionsTable\"");
WriteLiteral(">\r\n");
#line 3 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
#line default
#line hidden
#line 3 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
if (Model.Count() > 0)
{
#line default
#line hidden
WriteLiteral(" <table");
WriteLiteral(" class=\"expressionsTable\"");
WriteLiteral(@">
<tr>
<th>
Name
</th>
<th>
Expression
</th>
<th>
Errors Allowed
</th>
</tr>
");
#line 17 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
#line default
#line hidden
#line 17 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
foreach (var expression in Model.Where(m => m.IsDynamic))
{
var expressionParts = expression.Where(e => e.IsDynamic).ToArray();
#line default
#line hidden
WriteLiteral(" <tr>\r\n <td");
WriteAttribute("rowspan", Tuple.Create(" rowspan=\"", 647), Tuple.Create("\"", 682)
#line 21 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
, Tuple.Create(Tuple.Create("", 657), Tuple.Create<System.Object, System.Int32>(expressionParts.Length
#line default
#line hidden
, 657), false)
);
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 22 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
Write(expression.Name);
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n");
#line 24 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
#line default
#line hidden
#line 24 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
if (expressionParts[0].ParseError)
{
#line default
#line hidden
WriteLiteral(" <td");
WriteLiteral(" class=\"parseError\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 27 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
Write(expressionParts[0].Source);
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"code\"");
WriteLiteral(">\r\n <strong>Expression Compilation Error:</strong>" +
"<br />\r\n");
WriteLiteral(" ");
#line 30 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
Write(expressionParts[0].ParseErrorMessage);
#line default
#line hidden
WriteLiteral("\r\n </div>\r\n </td>\r\n");
#line 33 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
}
else
{
#line default
#line hidden
WriteLiteral(" <td>\r\n");
WriteLiteral(" ");
#line 37 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
Write(expressionParts[0].Source);
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n");
#line 39 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
}
#line default
#line hidden
WriteLiteral(" <td>\r\n");
WriteLiteral(" ");
#line 41 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
Write(expressionParts[0].ErrorsAllowed ? "Yes" : "No");
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
#line 44 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
for (int expressionIndex = 1; expressionIndex < expressionParts.Length; expressionIndex++)
{
#line default
#line hidden
WriteLiteral(" <tr>\r\n");
#line 47 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
#line default
#line hidden
#line 47 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
if (expressionParts[expressionIndex].ParseError)
{
#line default
#line hidden
WriteLiteral(" <td");
WriteLiteral(" class=\"parseError\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 50 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
Write(expressionParts[expressionIndex].Source);
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" class=\"code\"");
WriteLiteral(">\r\n <strong>Expression Compilation Error:</strong>" +
"<br />\r\n");
WriteLiteral(" ");
#line 53 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
Write(expressionParts[expressionIndex].ParseErrorMessage);
#line default
#line hidden
WriteLiteral("\r\n </div>\r\n </td>\r\n");
#line 56 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
}
else
{
#line default
#line hidden
WriteLiteral(" <td>\r\n");
WriteLiteral(" ");
#line 60 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
Write(expressionParts[expressionIndex].Source);
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n");
#line 62 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
}
#line default
#line hidden
WriteLiteral(" <td>\r\n");
WriteLiteral(" ");
#line 64 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
Write(expressionParts[expressionIndex].ErrorsAllowed ? "Yes" : "No");
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
#line 67 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
}
}
#line default
#line hidden
WriteLiteral(" </table>\r\n");
#line 70 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
}
else
{
#line default
#line hidden
WriteLiteral(" <span");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">No Expressions Found</span>\r\n");
#line 74 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
}
#line default
#line hidden
WriteLiteral("</div>\r\n");
}
}
}
#pragma warning restore 1591
@@ -1,130 +1,130 @@
@model Disco.Web.Areas.Config.Models.Enrolment.IndexModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Enrolment");
}
<div class="form" style="width: 530px;">
<h2>Apple Mac Secure Enrol</h2>
<table>
<tr>
<th>Username:
</th>
<td>@Html.TextBoxFor(model => model.MacSshUsername)
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(function () {
var $DOM = $('#MacSshUsername');
var $DOMAjaxSave = $DOM.next('.ajaxSave');
$DOM
.watermark('Username')
.focus(function () { $DOM.select() })
.keydown(function (e) {
$DOMAjaxSave.show();
if (e.which == 13) {
$(this).blur();
}
}).blur(function () {
$DOMAjaxSave.hide();
})
.change(function () {
$DOMAjaxSave.hide();
var $ajaxLoading = $DOMAjaxSave.next('.ajaxLoading').show();
var data = { MacSshUsername: $DOM.val() };
$.ajax({
url: '@Url.Action(MVC.API.Bootstrapper.MacSshUsername())',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to update Username: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update Username: ' + textStatus);
$ajaxLoading.hide();
}
});
});
});
</script>
</td>
</tr>
<tr>
<th>Password:
</th>
<td>
<input id="MacSshPassword" type="password" />
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(function () {
var $DOM = $('#MacSshPassword');
var $DOMAjaxSave = $DOM.next('.ajaxSave');
$DOM
.watermark('Password')
.focus(function () { $DOM.select() })
.keydown(function (e) {
$DOMAjaxSave.show();
if (e.which == 13) {
$(this).blur();
}
}).blur(function () {
$DOMAjaxSave.hide();
})
.change(function () {
$DOMAjaxSave.hide();
var $ajaxLoading = $DOMAjaxSave.next('.ajaxLoading').show();
var data = { MacSshPassword: $DOM.val() };
$.ajax({
url: '@Url.Action(MVC.API.Bootstrapper.MacSshPassword())',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to update Password: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update Password: ' + textStatus);
$ajaxLoading.hide();
}
});
});
});
</script>
</td>
</tr>
<tr>
<td colspan="2">
<span class="smallText"><strong>Instructions:</strong> The above credentials must be
able to connect to the requesting Apple Mac client via <a target="_blank" href="http://en.wikipedia.org/wiki/Secure_Shell">SSH</a>. Enter/Script the following command:</span>
<div class="code">
curl&nbsp;<a target="_blank" href="http://disco:9292/Services/Client/Unauthenticated/MacSecureEnrol">http://disco:9292/Services/Client/Unauthenticated/MacSecureEnrol</a>
</div>
<span class="smallText">This url will return a <a target="_blank" href="http://json.org/">JSON</a> response containing basic information about the enrolment.</span><br />
<span class="smallMessage">This command makes use of <a target="_blank" href="http://curl.haxx.se/">cURL</a> (bundled with OSX). Other methods can also trigger a Mac Secure Enrol,
such as an anchor (<span class="code">&lt;a&gt;</span>) or <span class="code">&lt;script&gt;</span>
tag embedded on the organisation's intranet.</span>
</td>
</tr>
</table>
</div>
<h2>Live Enrolment Logging</h2>
@Html.Partial(MVC.Config.Shared.Views.LogEvents, new Disco.Web.Areas.Config.Models.Shared.LogEventsModel()
{
IsLive = true,
TakeFilter = 100,
StartFilter = DateTime.Today.AddDays(-1),
ModuleFilter = Disco.BI.DeviceBI.EnrolmentLog.Current,
ViewPortHeight = 250
})
<div class="actionBar">
@Html.ActionLinkButton("Download Bootstrapper", MVC.Services.Client.Bootstrapper())
@Html.ActionLinkButton("Enrolment Status", MVC.Config.Enrolment.Status())
</div>
@model Disco.Web.Areas.Config.Models.Enrolment.IndexModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Enrolment");
}
<div class="form" style="width: 530px;">
<h2>Apple Mac Secure Enrol</h2>
<table>
<tr>
<th>Username:
</th>
<td>@Html.TextBoxFor(model => model.MacSshUsername)
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(function () {
var $DOM = $('#MacSshUsername');
var $DOMAjaxSave = $DOM.next('.ajaxSave');
$DOM
.watermark('Username')
.focus(function () { $DOM.select() })
.keydown(function (e) {
$DOMAjaxSave.show();
if (e.which == 13) {
$(this).blur();
}
}).blur(function () {
$DOMAjaxSave.hide();
})
.change(function () {
$DOMAjaxSave.hide();
var $ajaxLoading = $DOMAjaxSave.next('.ajaxLoading').show();
var data = { MacSshUsername: $DOM.val() };
$.ajax({
url: '@Url.Action(MVC.API.Bootstrapper.MacSshUsername())',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to update Username: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update Username: ' + textStatus);
$ajaxLoading.hide();
}
});
});
});
</script>
</td>
</tr>
<tr>
<th>Password:
</th>
<td>
<input id="MacSshPassword" type="password" />
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(function () {
var $DOM = $('#MacSshPassword');
var $DOMAjaxSave = $DOM.next('.ajaxSave');
$DOM
.watermark('Password')
.focus(function () { $DOM.select() })
.keydown(function (e) {
$DOMAjaxSave.show();
if (e.which == 13) {
$(this).blur();
}
}).blur(function () {
$DOMAjaxSave.hide();
})
.change(function () {
$DOMAjaxSave.hide();
var $ajaxLoading = $DOMAjaxSave.next('.ajaxLoading').show();
var data = { MacSshPassword: $DOM.val() };
$.ajax({
url: '@Url.Action(MVC.API.Bootstrapper.MacSshPassword())',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to update Password: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update Password: ' + textStatus);
$ajaxLoading.hide();
}
});
});
});
</script>
</td>
</tr>
<tr>
<td colspan="2">
<span class="smallText"><strong>Instructions:</strong> The above credentials must be
able to connect to the requesting Apple Mac client via <a target="_blank" href="http://en.wikipedia.org/wiki/Secure_Shell">SSH</a>. Enter/Script the following command:</span>
<div class="code">
curl&nbsp;<a target="_blank" href="http://disco:9292/Services/Client/Unauthenticated/MacSecureEnrol">http://disco:9292/Services/Client/Unauthenticated/MacSecureEnrol</a>
</div>
<span class="smallText">This url will return a <a target="_blank" href="http://json.org/">JSON</a> response containing basic information about the enrolment.</span><br />
<span class="smallMessage">This command makes use of <a target="_blank" href="http://curl.haxx.se/">cURL</a> (bundled with OSX). Other methods can also trigger a Mac Secure Enrol,
such as an anchor (<span class="code">&lt;a&gt;</span>) or <span class="code">&lt;script&gt;</span>
tag embedded on the organisation's intranet.</span>
</td>
</tr>
</table>
</div>
<h2>Live Enrolment Logging</h2>
@Html.Partial(MVC.Config.Shared.Views.LogEvents, new Disco.Web.Areas.Config.Models.Shared.LogEventsModel()
{
IsLive = true,
TakeFilter = 100,
StartFilter = DateTime.Today.AddDays(-1),
ModuleFilter = Disco.BI.DeviceBI.EnrolmentLog.Current,
ViewPortHeight = 250
})
<div class="actionBar">
@Html.ActionLinkButton("Download Bootstrapper", MVC.Services.Client.Bootstrapper())
@Html.ActionLinkButton("Enrolment Status", MVC.Config.Enrolment.Status())
</div>
@@ -1,335 +1,335 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.Enrolment
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/Enrolment/Index.cshtml")]
public class Index : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.Enrolment.IndexModel>
{
public Index()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Enrolment");
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 530px;\"");
WriteLiteral(">\r\n <h2>Apple Mac Secure Enrol</h2>\r\n <table>\r\n <tr>\r\n <t" +
"h>Username:\r\n </th>\r\n <td>");
#line 11 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Html.TextBoxFor(model => model.MacSshUsername));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 12 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 13 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
WriteLiteral("\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
var $DOM = $('#MacSshUsername');
var $DOMAjaxSave = $DOM.next('.ajaxSave');
$DOM
.watermark('Username')
.focus(function () { $DOM.select() })
.keydown(function (e) {
$DOMAjaxSave.show();
if (e.which == 13) {
$(this).blur();
}
}).blur(function () {
$DOMAjaxSave.hide();
})
.change(function () {
$DOMAjaxSave.hide();
var $ajaxLoading = $DOMAjaxSave.next('.ajaxLoading').show();
var data = { MacSshUsername: $DOM.val() };
$.ajax({
url: '");
#line 34 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Url.Action(MVC.API.Bootstrapper.MacSshUsername()));
#line default
#line hidden
WriteLiteral(@"',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to update Username: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update Username: ' + textStatus);
$ajaxLoading.hide();
}
});
});
});
</script>
</td>
</tr>
<tr>
<th>Password:
</th>
<td>
<input");
WriteLiteral(" id=\"MacSshPassword\"");
WriteLiteral(" type=\"password\"");
WriteLiteral(" />\r\n");
WriteLiteral(" ");
#line 60 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 61 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
WriteLiteral("\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
var $DOM = $('#MacSshPassword');
var $DOMAjaxSave = $DOM.next('.ajaxSave');
$DOM
.watermark('Password')
.focus(function () { $DOM.select() })
.keydown(function (e) {
$DOMAjaxSave.show();
if (e.which == 13) {
$(this).blur();
}
}).blur(function () {
$DOMAjaxSave.hide();
})
.change(function () {
$DOMAjaxSave.hide();
var $ajaxLoading = $DOMAjaxSave.next('.ajaxLoading').show();
var data = { MacSshPassword: $DOM.val() };
$.ajax({
url: '");
#line 82 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Url.Action(MVC.API.Bootstrapper.MacSshPassword()));
#line default
#line hidden
WriteLiteral(@"',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to update Password: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update Password: ' + textStatus);
$ajaxLoading.hide();
}
});
});
});
</script>
</td>
</tr>
<tr>
<td");
WriteLiteral(" colspan=\"2\"");
WriteLiteral(">\r\n <span");
WriteLiteral(" class=\"smallText\"");
WriteLiteral("><strong>Instructions:</strong> The above credentials must be\r\n " +
" able to connect to the requesting Apple Mac client via <a");
WriteLiteral(" target=\"_blank\"");
WriteLiteral(" href=\"http://en.wikipedia.org/wiki/Secure_Shell\"");
WriteLiteral(">SSH</a>. Enter/Script the following command:</span>\r\n <div");
WriteLiteral(" class=\"code\"");
WriteLiteral(">\r\n curl&nbsp;<a");
WriteLiteral(" target=\"_blank\"");
WriteLiteral(" href=\"http://disco:9292/Services/Client/Unauthenticated/MacSecureEnrol\"");
WriteLiteral(">http://disco:9292/Services/Client/Unauthenticated/MacSecureEnrol</a>\r\n " +
" </div>\r\n <span");
WriteLiteral(" class=\"smallText\"");
WriteLiteral(">This url will return a <a");
WriteLiteral(" target=\"_blank\"");
WriteLiteral(" href=\"http://json.org/\"");
WriteLiteral(">JSON</a> response containing basic information about the enrolment.</span><br />" +
"\r\n <span");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">This command makes use of <a");
WriteLiteral(" target=\"_blank\"");
WriteLiteral(" href=\"http://curl.haxx.se/\"");
WriteLiteral(">cURL</a> (bundled with OSX). Other methods can also trigger a Mac Secure Enrol,\r" +
"\n such as an anchor (<span");
WriteLiteral(" class=\"code\"");
WriteLiteral(">&lt;a&gt;</span>) or <span");
WriteLiteral(" class=\"code\"");
WriteLiteral(">&lt;script&gt;</span>\r\n tag embedded on the organisation\'s in" +
"tranet.</span>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>\r\n<h2>Live" +
" Enrolment Logging</h2>\r\n");
#line 119 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Html.Partial(MVC.Config.Shared.Views.LogEvents, new Disco.Web.Areas.Config.Models.Shared.LogEventsModel()
{
IsLive = true,
TakeFilter = 100,
StartFilter = DateTime.Today.AddDays(-1),
ModuleFilter = Disco.BI.DeviceBI.EnrolmentLog.Current,
ViewPortHeight = 250
}));
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 128 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Html.ActionLinkButton("Download Bootstrapper", MVC.Services.Client.Bootstrapper()));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 129 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Html.ActionLinkButton("Enrolment Status", MVC.Config.Enrolment.Status()));
#line default
#line hidden
WriteLiteral("\r\n</div>\r\n");
}
}
}
#pragma warning restore 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.Enrolment
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/Enrolment/Index.cshtml")]
public class Index : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.Enrolment.IndexModel>
{
public Index()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Enrolment");
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 530px;\"");
WriteLiteral(">\r\n <h2>Apple Mac Secure Enrol</h2>\r\n <table>\r\n <tr>\r\n <t" +
"h>Username:\r\n </th>\r\n <td>");
#line 11 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Html.TextBoxFor(model => model.MacSshUsername));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 12 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 13 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
WriteLiteral("\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
var $DOM = $('#MacSshUsername');
var $DOMAjaxSave = $DOM.next('.ajaxSave');
$DOM
.watermark('Username')
.focus(function () { $DOM.select() })
.keydown(function (e) {
$DOMAjaxSave.show();
if (e.which == 13) {
$(this).blur();
}
}).blur(function () {
$DOMAjaxSave.hide();
})
.change(function () {
$DOMAjaxSave.hide();
var $ajaxLoading = $DOMAjaxSave.next('.ajaxLoading').show();
var data = { MacSshUsername: $DOM.val() };
$.ajax({
url: '");
#line 34 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Url.Action(MVC.API.Bootstrapper.MacSshUsername()));
#line default
#line hidden
WriteLiteral(@"',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to update Username: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update Username: ' + textStatus);
$ajaxLoading.hide();
}
});
});
});
</script>
</td>
</tr>
<tr>
<th>Password:
</th>
<td>
<input");
WriteLiteral(" id=\"MacSshPassword\"");
WriteLiteral(" type=\"password\"");
WriteLiteral(" />\r\n");
WriteLiteral(" ");
#line 60 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 61 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
WriteLiteral("\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
var $DOM = $('#MacSshPassword');
var $DOMAjaxSave = $DOM.next('.ajaxSave');
$DOM
.watermark('Password')
.focus(function () { $DOM.select() })
.keydown(function (e) {
$DOMAjaxSave.show();
if (e.which == 13) {
$(this).blur();
}
}).blur(function () {
$DOMAjaxSave.hide();
})
.change(function () {
$DOMAjaxSave.hide();
var $ajaxLoading = $DOMAjaxSave.next('.ajaxLoading').show();
var data = { MacSshPassword: $DOM.val() };
$.ajax({
url: '");
#line 82 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Url.Action(MVC.API.Bootstrapper.MacSshPassword()));
#line default
#line hidden
WriteLiteral(@"',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to update Password: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update Password: ' + textStatus);
$ajaxLoading.hide();
}
});
});
});
</script>
</td>
</tr>
<tr>
<td");
WriteLiteral(" colspan=\"2\"");
WriteLiteral(">\r\n <span");
WriteLiteral(" class=\"smallText\"");
WriteLiteral("><strong>Instructions:</strong> The above credentials must be\r\n " +
" able to connect to the requesting Apple Mac client via <a");
WriteLiteral(" target=\"_blank\"");
WriteLiteral(" href=\"http://en.wikipedia.org/wiki/Secure_Shell\"");
WriteLiteral(">SSH</a>. Enter/Script the following command:</span>\r\n <div");
WriteLiteral(" class=\"code\"");
WriteLiteral(">\r\n curl&nbsp;<a");
WriteLiteral(" target=\"_blank\"");
WriteLiteral(" href=\"http://disco:9292/Services/Client/Unauthenticated/MacSecureEnrol\"");
WriteLiteral(">http://disco:9292/Services/Client/Unauthenticated/MacSecureEnrol</a>\r\n " +
" </div>\r\n <span");
WriteLiteral(" class=\"smallText\"");
WriteLiteral(">This url will return a <a");
WriteLiteral(" target=\"_blank\"");
WriteLiteral(" href=\"http://json.org/\"");
WriteLiteral(">JSON</a> response containing basic information about the enrolment.</span><br />" +
"\r\n <span");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">This command makes use of <a");
WriteLiteral(" target=\"_blank\"");
WriteLiteral(" href=\"http://curl.haxx.se/\"");
WriteLiteral(">cURL</a> (bundled with OSX). Other methods can also trigger a Mac Secure Enrol,\r" +
"\n such as an anchor (<span");
WriteLiteral(" class=\"code\"");
WriteLiteral(">&lt;a&gt;</span>) or <span");
WriteLiteral(" class=\"code\"");
WriteLiteral(">&lt;script&gt;</span>\r\n tag embedded on the organisation\'s in" +
"tranet.</span>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>\r\n<h2>Live" +
" Enrolment Logging</h2>\r\n");
#line 119 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Html.Partial(MVC.Config.Shared.Views.LogEvents, new Disco.Web.Areas.Config.Models.Shared.LogEventsModel()
{
IsLive = true,
TakeFilter = 100,
StartFilter = DateTime.Today.AddDays(-1),
ModuleFilter = Disco.BI.DeviceBI.EnrolmentLog.Current,
ViewPortHeight = 250
}));
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 128 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Html.ActionLinkButton("Download Bootstrapper", MVC.Services.Client.Bootstrapper()));
#line default
#line hidden
WriteLiteral("\r\n");
WriteLiteral(" ");
#line 129 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Html.ActionLinkButton("Enrolment Status", MVC.Config.Enrolment.Status()));
#line default
#line hidden
WriteLiteral("\r\n</div>\r\n");
}
}
}
#pragma warning restore 1591
@@ -1,371 +1,371 @@
@model Disco.Web.Areas.Config.Models.Organisation.IndexModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Organisation Details");
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
}
<div class="form" style="width: 700px">
<h2>Details</h2>
<table>
<tr>
<th style="width: 160px">Name:
</th>
<td>
@Html.EditorFor(m => m.OrganisationName)
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(function () {
var field = $('#OrganisationName');
document.DiscoFunctions.PropertyChangeHelper(
field,
'Unknown',
'@(Url.Action(MVC.API.System.UpdateOrganisationName()))',
'OrganisationName'
);
});
</script>
</td>
</tr>
<tr>
<th style="width: 160px">Logo:
<br />
<br />
<a id="buttonUpdateOrganisationLogo" href="#" class="button">Update</a>
</th>
<td>
<div style="text-align: center;">
<img style="height: 256px; width: 256px;" alt="Organisation Logo" src="@(Url.OrganisationLogoUrl())" />
</div>
</td>
</tr>
<tr>
<th style="width: 160px">Multi-Site Mode:
</th>
<td>
@Html.EditorFor(m => m.MultiSiteMode) @Html.LabelFor(m => m.MultiSiteMode)
@AjaxHelpers.AjaxLoader()
<div id="messageMultiSiteMode" style="display: none; padding: 0.7em 0.7em; margin-top: 20px;" class="ui-state-highlight ui-corner-all">
<span style="margin-right: 0.3em; float: left;" class="ui-icon ui-icon-info"></span>
Multi-Site mode is recommended where multiple addresses are configured.
</div>
<script type="text/javascript">
$(function () {
var field = $('#MultiSiteMode');
document.DiscoFunctions.PropertyChangeHelper(
field,
null,
'@(Url.Action(MVC.API.System.UpdateMultiSiteMode()))',
'MultiSiteMode'
);
var $orgAddresses = $('#organisationAddresses');
if ($orgAddresses.length > 0 && $orgAddresses.find('tr').length > 2)
$('#messageMultiSiteMode').show();
});
</script>
</td>
</tr>
<tr>
<th style="width: 160px">Addresses:
<br />
<br />
<a href="#" id="createAddress" class="button">Create</a>
</th>
<td>
@if (Model.OrganisationAddresses.Count > 0)
{
<table id="organisationAddresses">
<tr>
<th>Name
</th>
<th>Address
</th>
<th></th>
</tr>
@foreach (var item in Model.OrganisationAddresses)
{
<tr data-addressid="@item.Id">
<td>
<span class="name">@Html.DisplayFor(modelItem => item.Name)</span> (<span class="shortName">@Html.DisplayFor(modelItem => item.ShortName)</span>)
</td>
<td>
<span class="address">@Html.DisplayFor(modelItem => item.Address)</span><br />
<span class="suburb">@Html.DisplayFor(modelItem => item.Suburb)</span> <span class="postcode">@Html.DisplayFor(modelItem => item.Postcode)</span><br />
<span class="state">@Html.DisplayFor(modelItem => item.State)</span> <span class="country">@Html.DisplayFor(modelItem => item.Country)</span><br />
<span class="smallMessage">Phone:</span> <span class="phoneNumber">@Html.DisplayFor(modelItem => item.PhoneNumber)</span><br />
<span class="smallMessage">Fax:</span> <span class="faxNumber">@Html.DisplayFor(modelItem => item.FaxNumber)</span>
</td>
<td>
<span class="edit" title="Edit Address"></span><span class="delete" title="Delete Address"></span>
</td>
</tr>
}
</table>
}
else
{
<span class="smallMessage">No Addresses Stored</span>
}
</td>
</tr>
</table>
</div>
<div id="dialogUpdateOrganisationLogo" title="Update Organisation Logo">
@using (Html.BeginForm(MVC.API.System.OrganisationLogo(true, null, null), FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<h3>Update Action</h3>
<div style="margin-top: 10px; padding-bottom: 5px;">
<input id="updateOrganisationLogoResetLogo" type="radio" name="ResetLogo" value="true"
checked="checked" /><label for="updateOrganisationLogoResetLogo">Remove Logo</label>
</div>
<div style="margin-top: 5px; border-top: 1px dashed #aaa; padding-top: 5px;">
<input id="updateOrganisationLogoUploadLogo" type="radio" name="ResetLogo" value="false" /><label
for="updateOrganisationLogoUploadLogo">Upload Logo</label>
<div id="updateOrganisationLogoUploadLogoContainer" style="display: none; padding-left: 10px;">
<input id="updateOrganisationLogoUploadLogoImage" type="file" name="Image" />
<span id="updateOrganisationLogoUploadLogoImageRequired" class="field-validation-valid field-validation-error">* Required</span>
</div>
</div>
}
</div>
<script type="text/javascript">
$(function () {
var button = $('#buttonUpdateOrganisationLogo');
var buttonDialog = $('#dialogUpdateOrganisationLogo');
button.click(function () {
buttonDialog.dialog('open');
return false;
});
buttonDialog.find('input[type="radio"]').click(function () {
if ($('#updateOrganisationLogoUploadLogo').is(':checked')) {
$('#updateOrganisationLogoUploadLogoImage').removeAttr('disabled');
$('#updateOrganisationLogoUploadLogoContainer').slideDown();
}
else {
$('#updateOrganisationLogoUploadLogoContainer').slideUp();
$('#updateOrganisationLogoUploadLogoImage').attr('disabled', 'disabled');
}
});
buttonDialog.dialog({
resizable: false,
height: 200,
modal: true,
autoOpen: false,
buttons: {
"Save": function () {
var $this = $(this);
var $image = $('#updateOrganisationLogoUploadLogoImage');
if ($('#updateOrganisationLogoUploadLogo').is(':checked') && $image.val() == '') {
$image.addClass('input-validation-error');
$('#updateOrganisationLogoUploadLogoImageRequired').removeClass('field-validation-valid');
} else {
$image.removeClass('input-validation-error');
$('#updateOrganisationLogoUploadLogoImageRequired').addClass('field-validation-valid');
$this.dialog("disable");
$this.dialog("option", "buttons", null);
$this.find('form').submit();
}
},
Cancel: function () {
$(this).dialog("close");
}
}
});
});
</script>
<div id="dialogConfirmRemove" title="Delete this Component?">
<p>
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
This item will be permanently deleted and cannot be recovered. Are you sure?
</p>
</div>
<div id="dialogEdit" title="Edit/Create Address">
<table>
<tr>
<td>Short&nbsp;Name
</td>
<td>
<input id="editShortName" type="text" />
</td>
</tr>
<tr>
<td>Name
</td>
<td>
<input id="editName" type="text" />
</td>
</tr>
<tr>
<td>Address
</td>
<td>
<input id="editAddress" type="text" />
</td>
</tr>
<tr>
<td>Suburb
</td>
<td>
<input id="editSuburb" type="text" />
</td>
</tr>
<tr>
<td>Postcode
</td>
<td>
<input id="editPostcode" type="text" />
</td>
</tr>
<tr>
<td>State
</td>
<td>
<input id="editState" type="text" />
</td>
</tr>
<tr>
<td>Country
</td>
<td>
<input id="editCountry" type="text" />
</td>
</tr>
<tr>
<td>Phone Number
</td>
<td>
<input id="editPhoneNumber" type="text" />
</td>
</tr>
<tr>
<td>Fax Number
</td>
<td>
<input id="editFaxNumber" type="text" />
</td>
</tr>
</table>
</div>
<script type="text/javascript">
$(function () {
$("#dialogConfirmRemove").dialog({
resizable: false,
modal: true,
autoOpen: false,
buttons: {
"Delete": function () {
return null;
},
Cancel: function () {
$(this).dialog("close");
}
}
});
$('#organisationAddresses').find('span.delete').click(function () {
var componentRow = $(this).closest('tr');
var id = componentRow.attr('data-addressid');
if (id) {
var dialog = $("#dialogConfirmRemove");
var buttons = dialog.dialog("option", "buttons");
buttons['Delete'] = function () { $(this).dialog("disable"); window.location.href = '@(Url.Action(MVC.API.System.DeleteOrganisationAddress()))' + '?redirect=true&id=' + id; };
var buttons = dialog.dialog("option", "buttons", buttons);
dialog.dialog('open');
}
});
var editAddress = function (element) {
var id = '', shortName = '', name = '', address = '', suburb = '', postcode = '', state = '', country = '', phoneNumber = '', faxNumber = '';
var dialog = $('#dialogEdit');
if (element) {
id = element.attr('data-addressid');
shortName = element.find('.shortName').text();
name = element.find('.name').text();
address = element.find('.address').text();
suburb = element.find('.suburb').text();
postcode = element.find('.postcode').text();
state = element.find('.state').text();
country = element.find('.country').text();
phoneNumber = element.find('.phoneNumber').text();
faxNumber = element.find('.faxNumber').text();
dialog.attr('data-addressid', id);
dialog.dialog('option', 'title', 'Edit Address: ' + name);
} else {
dialog.attr('data-addressid', null);
dialog.dialog('option', 'title', 'Create Address');
}
$('#editShortName').val(shortName);
$('#editName').val(name);
$('#editAddress').val(address);
$('#editSuburb').val(suburb);
$('#editPostcode').val(postcode);
$('#editState').val(state);
$('#editCountry').val(country);
$('#editPhoneNumber').val(phoneNumber);
$('#editFaxNumber').val(faxNumber);
dialog.dialog('open');
}
$('#organisationAddresses').find('span.edit').click(function () {
var componentRow = $(this).closest('tr');
editAddress(componentRow);
});
$('#createAddress').click(function () {
editAddress();
return false;
});
var submitAddress = function () {
var dialog = $('#dialogEdit');
var data = {
Id: dialog.attr('data-addressid'),
ShortName: $('#editShortName').val(),
Name: $('#editName').val(),
Address: $('#editAddress').val(),
Suburb: $('#editSuburb').val(),
Postcode: $('#editPostcode').val(),
State: $('#editState').val(),
Country: $('#editCountry').val(),
PhoneNumber: $('#editPhoneNumber').val(),
FaxNumber: $('#editFaxNumber').val()
};
$.ajax({
url: '@(Url.Action(MVC.API.System.UpdateOrganisationAddress()))',
dataType: 'json',
data: data,
type: 'post',
success: function (d) {
if (d == 'OK') {
window.location.href = '@(Url.Action(MVC.Config.Organisation.Index()))';
} else {
alert('Unable to update address:\n' + d);
dialog.dialog('enable');
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update address:\n' + textStatus);
dialog.dialog('enable');
}
});
};
$("#dialogEdit").dialog({
resizable: false,
modal: true,
autoOpen: false,
width: 350,
buttons: {
"Save": function () {
submitAddress();
},
Cancel: function () {
$(this).dialog("close");
}
}
});
});
@model Disco.Web.Areas.Config.Models.Organisation.IndexModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Organisation Details");
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
}
<div class="form" style="width: 700px">
<h2>Details</h2>
<table>
<tr>
<th style="width: 160px">Name:
</th>
<td>
@Html.EditorFor(m => m.OrganisationName)
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(function () {
var field = $('#OrganisationName');
document.DiscoFunctions.PropertyChangeHelper(
field,
'Unknown',
'@(Url.Action(MVC.API.System.UpdateOrganisationName()))',
'OrganisationName'
);
});
</script>
</td>
</tr>
<tr>
<th style="width: 160px">Logo:
<br />
<br />
<a id="buttonUpdateOrganisationLogo" href="#" class="button">Update</a>
</th>
<td>
<div style="text-align: center;">
<img style="height: 256px; width: 256px;" alt="Organisation Logo" src="@(Url.OrganisationLogoUrl())" />
</div>
</td>
</tr>
<tr>
<th style="width: 160px">Multi-Site Mode:
</th>
<td>
@Html.EditorFor(m => m.MultiSiteMode) @Html.LabelFor(m => m.MultiSiteMode)
@AjaxHelpers.AjaxLoader()
<div id="messageMultiSiteMode" style="display: none; padding: 0.7em 0.7em; margin-top: 20px;" class="ui-state-highlight ui-corner-all">
<span style="margin-right: 0.3em; float: left;" class="ui-icon ui-icon-info"></span>
Multi-Site mode is recommended where multiple addresses are configured.
</div>
<script type="text/javascript">
$(function () {
var field = $('#MultiSiteMode');
document.DiscoFunctions.PropertyChangeHelper(
field,
null,
'@(Url.Action(MVC.API.System.UpdateMultiSiteMode()))',
'MultiSiteMode'
);
var $orgAddresses = $('#organisationAddresses');
if ($orgAddresses.length > 0 && $orgAddresses.find('tr').length > 2)
$('#messageMultiSiteMode').show();
});
</script>
</td>
</tr>
<tr>
<th style="width: 160px">Addresses:
<br />
<br />
<a href="#" id="createAddress" class="button">Create</a>
</th>
<td>
@if (Model.OrganisationAddresses.Count > 0)
{
<table id="organisationAddresses">
<tr>
<th>Name
</th>
<th>Address
</th>
<th></th>
</tr>
@foreach (var item in Model.OrganisationAddresses)
{
<tr data-addressid="@item.Id">
<td>
<span class="name">@Html.DisplayFor(modelItem => item.Name)</span> (<span class="shortName">@Html.DisplayFor(modelItem => item.ShortName)</span>)
</td>
<td>
<span class="address">@Html.DisplayFor(modelItem => item.Address)</span><br />
<span class="suburb">@Html.DisplayFor(modelItem => item.Suburb)</span> <span class="postcode">@Html.DisplayFor(modelItem => item.Postcode)</span><br />
<span class="state">@Html.DisplayFor(modelItem => item.State)</span> <span class="country">@Html.DisplayFor(modelItem => item.Country)</span><br />
<span class="smallMessage">Phone:</span> <span class="phoneNumber">@Html.DisplayFor(modelItem => item.PhoneNumber)</span><br />
<span class="smallMessage">Fax:</span> <span class="faxNumber">@Html.DisplayFor(modelItem => item.FaxNumber)</span>
</td>
<td>
<span class="edit" title="Edit Address"></span><span class="delete" title="Delete Address"></span>
</td>
</tr>
}
</table>
}
else
{
<span class="smallMessage">No Addresses Stored</span>
}
</td>
</tr>
</table>
</div>
<div id="dialogUpdateOrganisationLogo" title="Update Organisation Logo">
@using (Html.BeginForm(MVC.API.System.OrganisationLogo(true, null, null), FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<h3>Update Action</h3>
<div style="margin-top: 10px; padding-bottom: 5px;">
<input id="updateOrganisationLogoResetLogo" type="radio" name="ResetLogo" value="true"
checked="checked" /><label for="updateOrganisationLogoResetLogo">Remove Logo</label>
</div>
<div style="margin-top: 5px; border-top: 1px dashed #aaa; padding-top: 5px;">
<input id="updateOrganisationLogoUploadLogo" type="radio" name="ResetLogo" value="false" /><label
for="updateOrganisationLogoUploadLogo">Upload Logo</label>
<div id="updateOrganisationLogoUploadLogoContainer" style="display: none; padding-left: 10px;">
<input id="updateOrganisationLogoUploadLogoImage" type="file" name="Image" />
<span id="updateOrganisationLogoUploadLogoImageRequired" class="field-validation-valid field-validation-error">* Required</span>
</div>
</div>
}
</div>
<script type="text/javascript">
$(function () {
var button = $('#buttonUpdateOrganisationLogo');
var buttonDialog = $('#dialogUpdateOrganisationLogo');
button.click(function () {
buttonDialog.dialog('open');
return false;
});
buttonDialog.find('input[type="radio"]').click(function () {
if ($('#updateOrganisationLogoUploadLogo').is(':checked')) {
$('#updateOrganisationLogoUploadLogoImage').removeAttr('disabled');
$('#updateOrganisationLogoUploadLogoContainer').slideDown();
}
else {
$('#updateOrganisationLogoUploadLogoContainer').slideUp();
$('#updateOrganisationLogoUploadLogoImage').attr('disabled', 'disabled');
}
});
buttonDialog.dialog({
resizable: false,
height: 200,
modal: true,
autoOpen: false,
buttons: {
"Save": function () {
var $this = $(this);
var $image = $('#updateOrganisationLogoUploadLogoImage');
if ($('#updateOrganisationLogoUploadLogo').is(':checked') && $image.val() == '') {
$image.addClass('input-validation-error');
$('#updateOrganisationLogoUploadLogoImageRequired').removeClass('field-validation-valid');
} else {
$image.removeClass('input-validation-error');
$('#updateOrganisationLogoUploadLogoImageRequired').addClass('field-validation-valid');
$this.dialog("disable");
$this.dialog("option", "buttons", null);
$this.find('form').submit();
}
},
Cancel: function () {
$(this).dialog("close");
}
}
});
});
</script>
<div id="dialogConfirmRemove" title="Delete this Component?">
<p>
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
This item will be permanently deleted and cannot be recovered. Are you sure?
</p>
</div>
<div id="dialogEdit" title="Edit/Create Address">
<table>
<tr>
<td>Short&nbsp;Name
</td>
<td>
<input id="editShortName" type="text" />
</td>
</tr>
<tr>
<td>Name
</td>
<td>
<input id="editName" type="text" />
</td>
</tr>
<tr>
<td>Address
</td>
<td>
<input id="editAddress" type="text" />
</td>
</tr>
<tr>
<td>Suburb
</td>
<td>
<input id="editSuburb" type="text" />
</td>
</tr>
<tr>
<td>Postcode
</td>
<td>
<input id="editPostcode" type="text" />
</td>
</tr>
<tr>
<td>State
</td>
<td>
<input id="editState" type="text" />
</td>
</tr>
<tr>
<td>Country
</td>
<td>
<input id="editCountry" type="text" />
</td>
</tr>
<tr>
<td>Phone Number
</td>
<td>
<input id="editPhoneNumber" type="text" />
</td>
</tr>
<tr>
<td>Fax Number
</td>
<td>
<input id="editFaxNumber" type="text" />
</td>
</tr>
</table>
</div>
<script type="text/javascript">
$(function () {
$("#dialogConfirmRemove").dialog({
resizable: false,
modal: true,
autoOpen: false,
buttons: {
"Delete": function () {
return null;
},
Cancel: function () {
$(this).dialog("close");
}
}
});
$('#organisationAddresses').find('span.delete').click(function () {
var componentRow = $(this).closest('tr');
var id = componentRow.attr('data-addressid');
if (id) {
var dialog = $("#dialogConfirmRemove");
var buttons = dialog.dialog("option", "buttons");
buttons['Delete'] = function () { $(this).dialog("disable"); window.location.href = '@(Url.Action(MVC.API.System.DeleteOrganisationAddress()))' + '?redirect=true&id=' + id; };
var buttons = dialog.dialog("option", "buttons", buttons);
dialog.dialog('open');
}
});
var editAddress = function (element) {
var id = '', shortName = '', name = '', address = '', suburb = '', postcode = '', state = '', country = '', phoneNumber = '', faxNumber = '';
var dialog = $('#dialogEdit');
if (element) {
id = element.attr('data-addressid');
shortName = element.find('.shortName').text();
name = element.find('.name').text();
address = element.find('.address').text();
suburb = element.find('.suburb').text();
postcode = element.find('.postcode').text();
state = element.find('.state').text();
country = element.find('.country').text();
phoneNumber = element.find('.phoneNumber').text();
faxNumber = element.find('.faxNumber').text();
dialog.attr('data-addressid', id);
dialog.dialog('option', 'title', 'Edit Address: ' + name);
} else {
dialog.attr('data-addressid', null);
dialog.dialog('option', 'title', 'Create Address');
}
$('#editShortName').val(shortName);
$('#editName').val(name);
$('#editAddress').val(address);
$('#editSuburb').val(suburb);
$('#editPostcode').val(postcode);
$('#editState').val(state);
$('#editCountry').val(country);
$('#editPhoneNumber').val(phoneNumber);
$('#editFaxNumber').val(faxNumber);
dialog.dialog('open');
}
$('#organisationAddresses').find('span.edit').click(function () {
var componentRow = $(this).closest('tr');
editAddress(componentRow);
});
$('#createAddress').click(function () {
editAddress();
return false;
});
var submitAddress = function () {
var dialog = $('#dialogEdit');
var data = {
Id: dialog.attr('data-addressid'),
ShortName: $('#editShortName').val(),
Name: $('#editName').val(),
Address: $('#editAddress').val(),
Suburb: $('#editSuburb').val(),
Postcode: $('#editPostcode').val(),
State: $('#editState').val(),
Country: $('#editCountry').val(),
PhoneNumber: $('#editPhoneNumber').val(),
FaxNumber: $('#editFaxNumber').val()
};
$.ajax({
url: '@(Url.Action(MVC.API.System.UpdateOrganisationAddress()))',
dataType: 'json',
data: data,
type: 'post',
success: function (d) {
if (d == 'OK') {
window.location.href = '@(Url.Action(MVC.Config.Organisation.Index()))';
} else {
alert('Unable to update address:\n' + d);
dialog.dialog('enable');
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update address:\n' + textStatus);
dialog.dialog('enable');
}
});
};
$("#dialogEdit").dialog({
resizable: false,
modal: true,
autoOpen: false,
width: 350,
buttons: {
"Save": function () {
submitAddress();
},
Cancel: function () {
$(this).dialog("close");
}
}
});
});
</script>
File diff suppressed because it is too large Load Diff
@@ -1,14 +1,14 @@
@model Disco.Web.Areas.Config.Models.Plugins.PluginConfigurationViewModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Plugins", MVC.Config.Plugins.Index(), Model.Manifest.Name);
}
@using (Html.BeginForm())
{
@Html.ValidationSummary(false)
<div class="clearfix">
@Html.PartialCompiled(Model.PluginViewType, Model.PluginViewModel)
</div>
<div class="actionBar">
<input type="submit" class="button" value="Save Configuration" />
</div>
@model Disco.Web.Areas.Config.Models.Plugins.PluginConfigurationViewModel
@{
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Plugins", MVC.Config.Plugins.Index(), Model.Manifest.Name);
}
@using (Html.BeginForm())
{
@Html.ValidationSummary(false)
<div class="clearfix">
@Html.PartialCompiled(Model.PluginViewType, Model.PluginViewModel)
</div>
<div class="actionBar">
<input type="submit" class="button" value="Save Configuration" />
</div>
}
@@ -1,115 +1,115 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.Plugins
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/Plugins/Configure.cshtml")]
public class Configure : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.Plugins.PluginConfigurationViewModel>
{
public Configure()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\Plugins\Configure.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Plugins", MVC.Config.Plugins.Index(), Model.Manifest.Name);
#line default
#line hidden
WriteLiteral("\r\n");
#line 5 "..\..\Areas\Config\Views\Plugins\Configure.cshtml"
using (Html.BeginForm())
{
#line default
#line hidden
#line 7 "..\..\Areas\Config\Views\Plugins\Configure.cshtml"
Write(Html.ValidationSummary(false));
#line default
#line hidden
#line 7 "..\..\Areas\Config\Views\Plugins\Configure.cshtml"
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"clearfix\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 9 "..\..\Areas\Config\Views\Plugins\Configure.cshtml"
Write(Html.PartialCompiled(Model.PluginViewType, Model.PluginViewModel));
#line default
#line hidden
WriteLiteral("\r\n </div>\r\n");
WriteLiteral(" <div");
WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n <input");
WriteLiteral(" type=\"submit\"");
WriteLiteral(" class=\"button\"");
WriteLiteral(" value=\"Save Configuration\"");
WriteLiteral(" />\r\n </div>\r\n");
#line 14 "..\..\Areas\Config\Views\Plugins\Configure.cshtml"
}
#line default
#line hidden
}
}
}
#pragma warning restore 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.Plugins
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/Plugins/Configure.cshtml")]
public class Configure : System.Web.Mvc.WebViewPage<Disco.Web.Areas.Config.Models.Plugins.PluginConfigurationViewModel>
{
public Configure()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\Plugins\Configure.cshtml"
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Plugins", MVC.Config.Plugins.Index(), Model.Manifest.Name);
#line default
#line hidden
WriteLiteral("\r\n");
#line 5 "..\..\Areas\Config\Views\Plugins\Configure.cshtml"
using (Html.BeginForm())
{
#line default
#line hidden
#line 7 "..\..\Areas\Config\Views\Plugins\Configure.cshtml"
Write(Html.ValidationSummary(false));
#line default
#line hidden
#line 7 "..\..\Areas\Config\Views\Plugins\Configure.cshtml"
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"clearfix\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 9 "..\..\Areas\Config\Views\Plugins\Configure.cshtml"
Write(Html.PartialCompiled(Model.PluginViewType, Model.PluginViewModel));
#line default
#line hidden
WriteLiteral("\r\n </div>\r\n");
WriteLiteral(" <div");
WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n <input");
WriteLiteral(" type=\"submit\"");
WriteLiteral(" class=\"button\"");
WriteLiteral(" value=\"Save Configuration\"");
WriteLiteral(" />\r\n </div>\r\n");
#line 14 "..\..\Areas\Config\Views\Plugins\Configure.cshtml"
}
#line default
#line hidden
}
}
}
#pragma warning restore 1591
+62 -62
View File
@@ -1,62 +1,62 @@
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="Disco.Models.Repository" />
<add namespace="Disco.BI.Extensions" />
<add namespace="Disco.Web" />
<add namespace="Disco.Web.Extensions" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
</namespaces>
</pages>
</system.web.webPages.razor>
<appSettings>
<add key="webpages:Enabled" value="false" />
</appSettings>
<system.web>
<httpHandlers>
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
</httpHandlers>
<!--
Enabling request validation in view pages would cause validation to occur
after the input has already been processed by the controller. By default
MVC performs request validation before a controller processes the input.
To change this behavior apply the ValidateInputAttribute to a
controller or action.
-->
<pages
validateRequest="false"
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<controls>
<add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
</controls>
</pages>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer>
</configuration>
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="Disco.Models.Repository" />
<add namespace="Disco.BI.Extensions" />
<add namespace="Disco.Web" />
<add namespace="Disco.Web.Extensions" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
</namespaces>
</pages>
</system.web.webPages.razor>
<appSettings>
<add key="webpages:Enabled" value="false" />
</appSettings>
<system.web>
<httpHandlers>
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
</httpHandlers>
<!--
Enabling request validation in view pages would cause validation to occur
after the input has already been processed by the controller. By default
MVC performs request validation before a controller processes the input.
To change this behavior apply the ValidateInputAttribute to a
controller or action.
-->
<pages
validateRequest="false"
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<controls>
<add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
</controls>
</pages>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer>
</configuration>
@@ -1,4 +1,4 @@
@{
Layout = "~/Views/Shared/_Layout.cshtml";
Html.BundleDeferred("~/Style/Config");
@{
Layout = "~/Views/Shared/_Layout.cshtml";
Html.BundleDeferred("~/Style/Config");
}
@@ -1,55 +1,55 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/_ViewStart.cshtml")]
public class ViewStart : System.Web.Mvc.ViewStartPage
{
public ViewStart()
{
}
public override void Execute()
{
#line 1 "..\..\Areas\Config\Views\_ViewStart.cshtml"
Layout = "~/Views/Shared/_Layout.cshtml";
Html.BundleDeferred("~/Style/Config");
#line default
#line hidden
}
}
}
#pragma warning restore 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/_ViewStart.cshtml")]
public class ViewStart : System.Web.Mvc.ViewStartPage
{
public ViewStart()
{
}
public override void Execute()
{
#line 1 "..\..\Areas\Config\Views\_ViewStart.cshtml"
Layout = "~/Views/Shared/_Layout.cshtml";
Html.BundleDeferred("~/Style/Config");
#line default
#line hidden
}
}
}
#pragma warning restore 1591