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,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; }
}
}