#pragma warning disable 1591 //------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.34014 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ 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; using Disco.BI.Extensions; using Disco.Models.Repository; using Disco.Services; using Disco.Services.Authorization; using Disco.Services.Web; using Disco.Web; using Disco.Web.Extensions; [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")] [System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/Enrolment/Index.cshtml")] public partial class Index : Disco.Services.Web.WebViewPage { public Index() { } public override void Execute() { #line 2 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" Authorization.Require(Claims.Config.Enrolment.Show); var canConfig = Authorization.Has(Claims.Config.Enrolment.Configure); var canShowStatus = Authorization.Has(Claims.Config.Enrolment.ShowStatus); ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Enrolment"); #line default #line hidden WriteLiteral("\r\n\r\n

Apple Mac Secure Enrol

\r\n \r\n \r\n Username:\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Instructions: The above credentials must be\r\n " + " able to connect to the requesting Apple Mac client via SSH. Enter/Script the following command:\r\n \r\n curl http://disco:9292/Services/Client/Unauthenticated/MacSecureEnrol\r\n " + " \r\n This url will return a JSON response containing basic information about the enrolment.
" + "\r\n This command makes use of cURL (bundled with OSX). Other methods can also trigger a Mac Secure Enrol,\r" + "\n such as an anchor (<a>) or <script>\r\n tag embedded on the organisation\'s in" + "tranet.\r\n \r\n
\r\n
"); #line 16 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" if (canConfig) { #line default #line hidden #line 18 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" Write(Html.TextBoxFor(model => model.MacSshUsername)); #line default #line hidden #line 18 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" #line default #line hidden #line 19 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" Write(AjaxHelpers.AjaxSave()); #line default #line hidden #line 19 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" #line default #line hidden #line 20 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden #line 20 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" #line default #line hidden 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 41 "..\..\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(); } }); }); }); "); #line 60 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" } else { if (string.IsNullOrEmpty(Model.MacSshUsername)) { #line default #line hidden WriteLiteral(" <None Specified>\r\n"); #line 66 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" } else { #line default #line hidden #line 69 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" Write(Model.MacSshUsername); #line default #line hidden #line 69 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" } } #line default #line hidden WriteLiteral("
Password:\r\n " + " "); #line 78 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" if (canConfig) { #line default #line hidden WriteLiteral(" \r\n"); #line 81 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" #line default #line hidden #line 81 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" Write(AjaxHelpers.AjaxSave()); #line default #line hidden #line 81 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" #line default #line hidden #line 82 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden #line 82 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" #line default #line hidden 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 103 "..\..\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(); } }); }); }); "); #line 122 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" } else { #line default #line hidden WriteLiteral(" "); WriteLiteral("********"); WriteLiteral("\r\n"); #line 126 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" } #line default #line hidden WriteLiteral("
\r\n\r\n"); #line 144 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" if (canShowStatus && Authorization.Has(Claims.Config.Logging.Show)) { #line default #line hidden WriteLiteral("

Live Enrolment Logging

\r\n"); #line 147 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" #line default #line hidden #line 147 "..\..\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 #line 154 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" } #line default #line hidden WriteLiteral("\r\n"); #line 157 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" #line default #line hidden #line 157 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" if (Authorization.Has(Claims.Config.Enrolment.DownloadBootstrapper)) { #line default #line hidden #line 159 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" Write(Html.ActionLinkButton("Download Bootstrapper", MVC.Services.Client.Bootstrapper())); #line default #line hidden #line 159 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" } #line default #line hidden WriteLiteral(" "); #line 161 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" if (canShowStatus) { #line default #line hidden #line 163 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" Write(Html.ActionLinkButton("Enrolment Status", MVC.Config.Enrolment.Status())); #line default #line hidden #line 163 "..\..\Areas\Config\Views\Enrolment\Index.cshtml" } #line default #line hidden WriteLiteral("\r\n"); } } } #pragma warning restore 1591