From 974a07f3bb6ea8333a0f8488bdbd28afb79d283b Mon Sep 17 00:00:00 2001 From: Gary Sharp Date: Fri, 24 Nov 2023 12:58:12 +1100 Subject: [PATCH] show a warning when a device profile OU couuld not be found --- .../ConfigDeviceProfileShowModel.cs | 4 +- .../Controllers/DeviceProfileController.cs | 24 ++ .../Config/Models/DeviceProfile/ShowModel.cs | 1 + .../Config/Views/DeviceProfile/Show.cshtml | 8 + .../Views/DeviceProfile/Show.generated.cs | 212 ++++++++++-------- 5 files changed, 158 insertions(+), 91 deletions(-) diff --git a/Disco.Models/UI/Config/DeviceProfile/ConfigDeviceProfileShowModel.cs b/Disco.Models/UI/Config/DeviceProfile/ConfigDeviceProfileShowModel.cs index 5894dc20..5a338217 100644 --- a/Disco.Models/UI/Config/DeviceProfile/ConfigDeviceProfileShowModel.cs +++ b/Disco.Models/UI/Config/DeviceProfile/ConfigDeviceProfileShowModel.cs @@ -8,9 +8,11 @@ namespace Disco.Models.UI.Config.DeviceProfile { Repository.DeviceProfile DeviceProfile { get; set; } OrganisationAddress DefaultOrganisationAddress { get; set; } - List OrganisationAddresses { get; set; } + string FriendlyOrganisationalUnitName { get; } + bool OrganisationalUnitExists { get; set; } + int DeviceCount { get; set; } int DeviceDecommissionedCount { get; set; } diff --git a/Disco.Web/Areas/Config/Controllers/DeviceProfileController.cs b/Disco.Web/Areas/Config/Controllers/DeviceProfileController.cs index 771bb889..e9a80394 100644 --- a/Disco.Web/Areas/Config/Controllers/DeviceProfileController.cs +++ b/Disco.Web/Areas/Config/Controllers/DeviceProfileController.cs @@ -12,6 +12,7 @@ using Disco.Services.Plugins.Features.WirelessProfileProvider; using Disco.Services.Web; using System; using System.Collections.Generic; +using System.DirectoryServices.ActiveDirectory; using System.Linq; using System.Web.Mvc; @@ -46,6 +47,29 @@ namespace Disco.Web.Areas.Config.Controllers if (DeviceProfileDevicesManagedGroup.TryGetManagedGroup(m.DeviceProfile, out devicesManagedGroup)) m.DevicesLinkedGroup = devicesManagedGroup; + // Ensure Specified OU Exists + if (string.IsNullOrEmpty(m.DeviceProfile.OrganisationalUnit)) + { + m.OrganisationalUnitExists = true; // default container + } + else + { + try + { + var ou = m.DeviceProfile.OrganisationalUnit; + var domain = ActiveDirectory.Context.GetDomainFromDistinguishedName(ou); + var domainController = domain.GetAvailableDomainController(); + using (var deOU = domainController.RetrieveDirectoryEntry(ou, new string[] { "distinguishedName" })) + { + m.OrganisationalUnitExists = true; + } + } + catch (Exception) + { + m.OrganisationalUnitExists = false; + } + } + m.CertificateProviders = Plugins.GetPluginFeatures(typeof(CertificateProviderFeature)); m.CertificateAuthorityProviders = Plugins.GetPluginFeatures(typeof(CertificateAuthorityProviderFeature)); m.WirelessProfileProviders = Plugins.GetPluginFeatures(typeof(WirelessProfileProviderFeature)); diff --git a/Disco.Web/Areas/Config/Models/DeviceProfile/ShowModel.cs b/Disco.Web/Areas/Config/Models/DeviceProfile/ShowModel.cs index e0c6394e..540a4fc1 100644 --- a/Disco.Web/Areas/Config/Models/DeviceProfile/ShowModel.cs +++ b/Disco.Web/Areas/Config/Models/DeviceProfile/ShowModel.cs @@ -34,6 +34,7 @@ namespace Disco.Web.Areas.Config.Models.DeviceProfile } } } + public bool OrganisationalUnitExists { get; set; } public List CertificateProviders { get; set; } public List CertificateAuthorityProviders { get; set; } diff --git a/Disco.Web/Areas/Config/Views/DeviceProfile/Show.cshtml b/Disco.Web/Areas/Config/Views/DeviceProfile/Show.cshtml index 5508711e..e4062aa9 100644 --- a/Disco.Web/Areas/Config/Views/DeviceProfile/Show.cshtml +++ b/Disco.Web/Areas/Config/Views/DeviceProfile/Show.cshtml @@ -690,6 +690,14 @@ } + @if (!Model.OrganisationalUnitExists) + { +
+

+ The Organisational Unit could not be found. +

+
+ }
@if (canConfig) { diff --git a/Disco.Web/Areas/Config/Views/DeviceProfile/Show.generated.cs b/Disco.Web/Areas/Config/Views/DeviceProfile/Show.generated.cs index ccfb7406..cb8dbb56 100644 --- a/Disco.Web/Areas/Config/Views/DeviceProfile/Show.generated.cs +++ b/Disco.Web/Areas/Config/Views/DeviceProfile/Show.generated.cs @@ -1951,6 +1951,38 @@ WriteLiteral("\r\n \r\n
\ } + #line default + #line hidden +WriteLiteral(" "); + + + #line 693 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + if (!Model.OrganisationalUnitExists) + { + + + #line default + #line hidden +WriteLiteral(" \r\n \r\n The Organisational Unit could not be found.\r\n

\r\n " + +" \r\n"); + + + #line 700 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + } + + #line default #line hidden WriteLiteral(" \r\n"); - #line 694 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 702 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 694 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 702 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canConfig) { @@ -1982,7 +2014,7 @@ WriteLiteral(" type=\"checkbox\""); WriteLiteral(" "); - #line 696 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 704 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Model.DeviceProfile.EnforceOrganisationalUnit ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty)); @@ -2002,7 +2034,7 @@ WriteLiteral(@"> '"); - #line 702 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 710 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Url.Action(MVC.API.DeviceProfile.UpdateEnforceOrganisationalUnit(Model.DeviceProfile.Id))); @@ -2013,7 +2045,7 @@ WriteLiteral("\',\r\n \'EnforceOrganisational " \r\n"); - #line 707 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 715 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } else { @@ -2030,7 +2062,7 @@ WriteLiteral(" type=\"checkbox\""); WriteLiteral(" "); - #line 710 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 718 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Model.DeviceProfile.EnforceOrganisationalUnit ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty)); @@ -2039,7 +2071,7 @@ WriteLiteral(" "); WriteLiteral(" disabled=\"disabled\" />\r\n"); - #line 711 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 719 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2055,7 +2087,7 @@ WriteLiteral(">\r\n Enforce Organisational Unit\r\n WriteLiteral(" "); - #line 715 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 723 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxLoader()); @@ -2086,13 +2118,13 @@ WriteLiteral(@">When an Active Directory account is provisioned it will be p "); - #line 729 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 737 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 729 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 737 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canConfig && (Model.CertificateProviders.Count > 0 || Model.CertificateAuthorityProviders.Count > 0)) { @@ -2102,20 +2134,20 @@ WriteLiteral(@">When an Active Directory account is provisioned it will be p WriteLiteral("
\r\n"); - #line 732 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 740 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 732 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 740 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxLoader("DeviceProfile_CertificateProviders")); #line default #line hidden - #line 732 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 740 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2125,7 +2157,7 @@ WriteLiteral("
\r\n"); WriteLiteral(" "); - #line 734 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 742 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canConfig && Model.CertificateProviders.Count > 0) { @@ -2149,7 +2181,7 @@ WriteLiteral(@"> $.getJSON('"); - #line 746 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 754 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Url.Action(MVC.API.DeviceProfile.UpdateCertificateProviders(Model.DeviceProfile.Id))); @@ -2169,7 +2201,7 @@ WriteLiteral(@"', data, function (response, result) { "); - #line 757 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 765 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2178,7 +2210,7 @@ WriteLiteral(@"', data, function (response, result) { WriteLiteral(" "); - #line 758 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 766 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canConfig && Model.CertificateProviders.Count > 0) { @@ -2202,7 +2234,7 @@ WriteLiteral(@"> $.getJSON('"); - #line 770 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 778 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Url.Action(MVC.API.DeviceProfile.UpdateCertificateAuthorityProviders(Model.DeviceProfile.Id))); @@ -2222,7 +2254,7 @@ WriteLiteral(@"', data, function (response, result) { "); - #line 781 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 789 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2232,13 +2264,13 @@ WriteLiteral(" \r\n \r\n

Devic "tes

\r\n"); - #line 785 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 793 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 785 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 793 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canConfig && Model.CertificateProviders.Count > 0) { @@ -2246,14 +2278,14 @@ WriteLiteral(" \r\n \r\n

Devic #line default #line hidden - #line 787 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 795 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(CommonHelpers.CheckBoxList("DeviceProfile_CertificateProviders", "DeviceProfile_CertificateProviders", Model.CertificateProviders.ToSelectListItems(Model.DeviceProfile.GetCertificateProviders()))); #line default #line hidden - #line 787 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 795 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } else @@ -2273,7 +2305,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral("><None Allocated>\r\n"); - #line 796 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 804 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } else { @@ -2284,13 +2316,13 @@ WriteLiteral("><None Allocated>\r\n"); WriteLiteral("
    \r\n"); - #line 800 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 808 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 800 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 808 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" foreach (var certificateProvider in certificateProviders) { @@ -2300,7 +2332,7 @@ WriteLiteral("
      \r\n"); WriteLiteral("
    • "); - #line 802 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 810 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(certificateProvider.Name); @@ -2309,7 +2341,7 @@ WriteLiteral("
    • "); WriteLiteral("
    • \r\n"); - #line 803 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 811 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2318,7 +2350,7 @@ WriteLiteral("\r\n"); WriteLiteral("
    \r\n"); - #line 805 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 813 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } } @@ -2332,13 +2364,13 @@ WriteLiteral(" style=\"margin-top: 4px;\""); WriteLiteral(">Authority Certificates

\r\n"); - #line 808 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 816 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 808 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 816 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canConfig && Model.CertificateAuthorityProviders.Count > 0) { @@ -2346,14 +2378,14 @@ WriteLiteral(">Authority Certificates\r\n"); #line default #line hidden - #line 810 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 818 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(CommonHelpers.CheckBoxList("DeviceProfile_CertificateAuthorityProviders", "DeviceProfile_CertificateAuthorityProviders", Model.CertificateAuthorityProviders.ToSelectListItems(Model.DeviceProfile.GetCertificateAuthorityProviders()))); #line default #line hidden - #line 810 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 818 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } else @@ -2373,7 +2405,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral("><None Allocated>\r\n"); - #line 819 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 827 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } else { @@ -2384,13 +2416,13 @@ WriteLiteral("><None Allocated>\r\n"); WriteLiteral("
    \r\n"); - #line 823 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 831 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 823 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 831 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" foreach (var certificateProvider in certificateProviders) { @@ -2400,7 +2432,7 @@ WriteLiteral("
      \r\n"); WriteLiteral("
    • "); - #line 825 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 833 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(certificateProvider.Name); @@ -2409,7 +2441,7 @@ WriteLiteral("
    • "); WriteLiteral("
    • \r\n"); - #line 826 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 834 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2418,7 +2450,7 @@ WriteLiteral("\r\n"); WriteLiteral("
    \r\n"); - #line 828 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 836 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } } @@ -2428,7 +2460,7 @@ WriteLiteral("
\r\n"); WriteLiteral(" "); - #line 830 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 838 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canViewPlugins) { @@ -2449,21 +2481,21 @@ WriteLiteral(" class=\"fa fa-info-circle\""); WriteLiteral(">View the (Url.Action(MVC.Config.Plugins.Install()) + #line 842 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" +, Tuple.Create(Tuple.Create("", 48060), Tuple.Create(Url.Action(MVC.Config.Plugins.Install()) #line default #line hidden -, 47702), false) +, 48060), false) ); WriteLiteral(">Plugin Catalogue to discover and install certificate provider plugins.\r\n " + "

\r\n \r\n"); - #line 837 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 845 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2473,13 +2505,13 @@ WriteLiteral(" \r\n \r\n \r\n " Provision Wireless Profiles:\r\n"); - #line 843 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 851 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 843 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 851 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canConfig && Model.WirelessProfileProviders.Count > 0) { @@ -2489,20 +2521,20 @@ WriteLiteral(" \r\n \r\n \r\n WriteLiteral("
\r\n"); - #line 846 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 854 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 846 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 854 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(AjaxHelpers.AjaxLoader("DeviceProfile_WirelessProfileProviders")); #line default #line hidden - #line 846 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 854 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" @@ -2525,7 +2557,7 @@ WriteLiteral(@"> $.getJSON('"); - #line 857 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 865 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Url.Action(MVC.API.DeviceProfile.UpdateWirelessProfileProviders(Model.DeviceProfile.Id))); @@ -2545,7 +2577,7 @@ WriteLiteral(@"', data, function (response, result) { "); - #line 868 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 876 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2554,13 +2586,13 @@ WriteLiteral(@"', data, function (response, result) { WriteLiteral(" \r\n \r\n"); - #line 871 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 879 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 871 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 879 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canConfig && Model.WirelessProfileProviders.Count > 0) { @@ -2568,14 +2600,14 @@ WriteLiteral(" \r\n \r\n"); #line default #line hidden - #line 873 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 881 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(CommonHelpers.CheckBoxList("DeviceProfile_WirelessProfileProviders", "DeviceProfile_WirelessProfileProviders", Model.WirelessProfileProviders.ToSelectListItems(Model.DeviceProfile.GetWirelessProfileProviders()))); #line default #line hidden - #line 873 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 881 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } else @@ -2595,7 +2627,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral("><None Allocated>\r\n"); - #line 882 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 890 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } else { @@ -2606,13 +2638,13 @@ WriteLiteral("><None Allocated>\r\n"); WriteLiteral("
    \r\n"); - #line 886 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 894 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 886 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 894 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" foreach (var wirelessProfileProvider in wirelessProfileProviders) { @@ -2622,7 +2654,7 @@ WriteLiteral("
      \r\n"); WriteLiteral("
    • "); - #line 888 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 896 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(wirelessProfileProvider.Name); @@ -2631,7 +2663,7 @@ WriteLiteral("
    • "); WriteLiteral("
    • \r\n"); - #line 889 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 897 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2640,7 +2672,7 @@ WriteLiteral("\r\n"); WriteLiteral("
    \r\n"); - #line 891 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 899 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } } @@ -2650,7 +2682,7 @@ WriteLiteral("
\r\n"); WriteLiteral(" "); - #line 893 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 901 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canViewPlugins) { @@ -2671,21 +2703,21 @@ WriteLiteral(" class=\"fa fa-info-circle\""); WriteLiteral(">View the (Url.Action(MVC.Config.Plugins.Install()) + #line 905 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" +, Tuple.Create(Tuple.Create("", 51314), Tuple.Create(Url.Action(MVC.Config.Plugins.Install()) #line default #line hidden -, 50956), false) +, 51314), false) ); WriteLiteral(">Plugin Catalogue to discover and install wireless profile provider plugins.\r" + "\n

\r\n \r\n"); - #line 900 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 908 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2694,13 +2726,13 @@ WriteLiteral(">Plugin Catalogue to discover and install wireless profile pro WriteLiteral(" \r\n \r\n"); - #line 903 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 911 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 903 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 911 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (hideAdvanced) { @@ -2734,7 +2766,7 @@ WriteLiteral(@">Show Advanced Options "); - #line 919 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 927 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2750,7 +2782,7 @@ WriteLiteral(">\r\n \r\n Linked Groups:\r\n WriteLiteral(" "); - #line 926 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 934 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel() { CanConfigure = canConfig, @@ -2768,7 +2800,7 @@ WriteLiteral("\r\n"); WriteLiteral(" "); - #line 934 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 942 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupInstance, new LinkedGroupModel() { CanConfigure = canConfig, @@ -2784,13 +2816,13 @@ WriteLiteral(" "); WriteLiteral("\r\n"); - #line 942 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 950 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 942 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 950 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canConfig) { @@ -2798,14 +2830,14 @@ WriteLiteral("\r\n"); #line default #line hidden - #line 944 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 952 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.Partial(MVC.Config.Shared.Views.LinkedGroupShared)); #line default #line hidden - #line 944 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 952 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2815,7 +2847,7 @@ WriteLiteral("\r\n"); WriteLiteral(" \r\n \r\n \r\n \r\n\r\n"); - #line 951 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 959 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canDelete) { @@ -2870,14 +2902,14 @@ WriteLiteral(@"> "); - #line 987 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 995 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } #line default #line hidden - #line 988 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 996 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.Partial(MVC.Config.Shared.Views._DeviceGroupDocumentBulkGenerate, Model)); @@ -2890,13 +2922,13 @@ WriteLiteral(" class=\"actionBar\""); WriteLiteral(">\r\n"); - #line 990 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 998 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" #line default #line hidden - #line 990 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 998 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (canDelete) { @@ -2904,14 +2936,14 @@ WriteLiteral(">\r\n"); #line default #line hidden - #line 992 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1000 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.ActionLinkButton("Delete", MVC.API.DeviceProfile.Delete(Model.DeviceProfile.Id, true), "buttonDelete")); #line default #line hidden - #line 992 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1000 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2921,7 +2953,7 @@ WriteLiteral(">\r\n"); WriteLiteral(" "); - #line 994 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1002 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (Authorization.Has(Claims.Device.Actions.Export)) { @@ -2929,14 +2961,14 @@ WriteLiteral(" "); #line default #line hidden - #line 996 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1004 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.Exporting.DeviceExportTypes.Profile, Model.DeviceProfile.Id))); #line default #line hidden - #line 996 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1004 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" } @@ -2946,7 +2978,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 998 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1006 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" if (Authorization.Has(Claims.Device.Search) && Model.DeviceCount > 0) { @@ -2954,14 +2986,14 @@ WriteLiteral(" "); #line default #line hidden - #line 1000 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1008 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" Write(Html.ActionLinkButton(string.Format("View {0} Device{1}", Model.DeviceCount, (Model.DeviceCount != 1 ? "s" : null)), MVC.Search.Query(Model.DeviceProfile.Id.ToString(), "DeviceProfile"))); #line default #line hidden - #line 1000 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" + #line 1008 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml" }