1122 lines
36 KiB
C#
1122 lines
36 KiB
C#
#pragma warning disable 1591
|
|
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
// Runtime Version:4.0.30319.42000
|
|
//
|
|
// 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;
|
|
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<Disco.Web.Areas.Config.Models.Enrolment.IndexModel>
|
|
{
|
|
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(), "Device Enrolment");
|
|
|
|
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
|
|
|
|
|
#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(" width=\"130\"");
|
|
|
|
WriteLiteral(">\r\n Pending Timeout:\r\n </th>\r\n <td>\r\n");
|
|
|
|
|
|
#line 19 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 19 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 21 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Html.TextBoxFor(model => model.PendingTimeoutMinutes, new { type = "number", min = "1" }));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 21 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 22 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 22 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 23 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 23 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span> minutes <span");
|
|
|
|
WriteLiteral(" class=\"smallText\"");
|
|
|
|
WriteLiteral(">(default: 30)</span></span>\r\n");
|
|
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#PendingTimeoutMinutes'),
|
|
'Pending Timeout',
|
|
'");
|
|
|
|
|
|
#line 30 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Url.Action(MVC.API.Enrolment.PendingTimeoutMinutes()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'PendingTimeoutMinutes\'\r\n " +
|
|
" );\r\n });\r\n </script>\r\n");
|
|
|
|
|
|
#line 35 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 38 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(TimeSpan.FromMinutes(Model.PendingTimeoutMinutes));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 38 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <td");
|
|
|
|
WriteLiteral(" colspan=\"2\"");
|
|
|
|
WriteLiteral(">\r\n <span");
|
|
|
|
WriteLiteral(" class=\"smallText\"");
|
|
|
|
WriteLiteral(@">
|
|
If a device enrolment is not automatically approved it will remain pending until the timeout is reached.
|
|
Pending enrolments can be approved manually from the Enrolment Status page.
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div");
|
|
|
|
WriteLiteral(" class=\"form\"");
|
|
|
|
WriteLiteral(" style=\"width: 530px; margin-top: 15px\"");
|
|
|
|
WriteLiteral(">\r\n <h2>Apple Mac Secure Enroll</h2>\r\n <table>\r\n <tr>\r\n <" +
|
|
"th");
|
|
|
|
WriteLiteral(" width=\"130\"");
|
|
|
|
WriteLiteral(">\r\n Username:\r\n </th>\r\n <td>\r\n");
|
|
|
|
|
|
#line 60 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 60 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 62 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Html.TextBoxFor(model => model.MacSshUsername));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 62 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 63 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 63 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 64 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 64 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n document." +
|
|
"DiscoFunctions.PropertyChangeHelper(\r\n $(\'#MacSsh" +
|
|
"Username\'),\r\n \'Username\',\r\n " +
|
|
" \'");
|
|
|
|
|
|
#line 70 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Url.Action(MVC.API.Enrolment.MacSshUsername()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'MacSshUsername\'\r\n " +
|
|
" );\r\n });\r\n </script>\r\n");
|
|
|
|
|
|
#line 75 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (string.IsNullOrEmpty(Model.MacSshUsername))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span");
|
|
|
|
WriteLiteral(" class=\"smallMessage\"");
|
|
|
|
WriteLiteral("><None Specified></span>\r\n");
|
|
|
|
|
|
#line 81 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 84 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Model.MacSshUsername);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 84 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n\r\n <tr>\r\n <th");
|
|
|
|
WriteLiteral(" width=\"130\"");
|
|
|
|
WriteLiteral(">\r\n Password:\r\n </th>\r\n <td>\r\n");
|
|
|
|
|
|
#line 95 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 95 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"MacSshPassword\"");
|
|
|
|
WriteLiteral(" type=\"password\"");
|
|
|
|
WriteLiteral(" />\r\n");
|
|
|
|
|
|
#line 98 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 98 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(AjaxHelpers.AjaxSave());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 98 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 99 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 99 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(">\r\n $(function () {\r\n document." +
|
|
"DiscoFunctions.PropertyChangeHelper(\r\n $(\'#MacSsh" +
|
|
"Password\'),\r\n \'Password\',\r\n " +
|
|
" \'");
|
|
|
|
|
|
#line 105 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Url.Action(MVC.API.Enrolment.MacSshPassword()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'MacSshPassword\'\r\n " +
|
|
" );\r\n });\r\n </script>\r\n");
|
|
|
|
|
|
#line 110 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
WriteLiteral("********");
|
|
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 114 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <td");
|
|
|
|
WriteLiteral(" colspan=\"2\"");
|
|
|
|
WriteLiteral(">\r\n <span");
|
|
|
|
WriteLiteral(" class=\"smallText\"");
|
|
|
|
WriteLiteral(">\r\n <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:\r\n </span>\r\n " +
|
|
" <div");
|
|
|
|
WriteLiteral(" class=\"code\"");
|
|
|
|
WriteLiteral(">\r\n curl <a");
|
|
|
|
WriteLiteral(" target=\"_blank\"");
|
|
|
|
WriteAttribute("href", Tuple.Create(" href=\"", 4881), Tuple.Create("\"", 4906)
|
|
|
|
#line 124 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
, Tuple.Create(Tuple.Create("", 4888), Tuple.Create<System.Object, System.Int32>(Model.MacEnrolUrl
|
|
|
|
#line default
|
|
#line hidden
|
|
, 4888), false)
|
|
);
|
|
|
|
WriteLiteral(">");
|
|
|
|
|
|
#line 124 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Model.MacEnrolUrl);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</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(">\r\n 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 Enroll," +
|
|
"\r\n such as an anchor (<span");
|
|
|
|
WriteLiteral(" class=\"code\"");
|
|
|
|
WriteLiteral("><a></span>) or <span");
|
|
|
|
WriteLiteral(" class=\"code\"");
|
|
|
|
WriteLiteral("><script></span>\r\n tag embedded on the organisation\'s in" +
|
|
"tranet.\r\n </span>\r\n </td>\r\n </tr>\r\n </table>" +
|
|
"\r\n</div>\r\n<div");
|
|
|
|
WriteLiteral(" class=\"form\"");
|
|
|
|
WriteLiteral(" style=\"width: 530px; margin-top: 15px\"");
|
|
|
|
WriteLiteral(">\r\n <h2>Bootstrapper Server Discovery</h2>\r\n <table>\r\n <tr>\r\n " +
|
|
" <td>\r\n <div>\r\n The Disco ICT\r\n");
|
|
|
|
|
|
#line 143 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 143 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
if (Authorization.Has(Claims.Config.Enrolment.DownloadBootstrapper))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 145 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Html.ActionLink("Bootstrapper", MVC.Services.Client.Bootstrapper()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 145 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
WriteLiteral("Bootstrapper");
|
|
|
|
WriteLiteral("\r\n");
|
|
|
|
|
|
#line 150 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" is used to enrol devices. It is strongly recommended that HTT" +
|
|
"PS be used for all communication.\r\n the\r\n " +
|
|
"The ");
|
|
|
|
|
|
#line 153 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Html.ActionLink("Hosting", Model.HostingPluginInstalled ? MVC.Config.Plugins.Configure("Hosting") : MVC.Config.Plugins.Install()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"
|
|
plugin can be used to automate deployment of HTTPS certificates.
|
|
</div>
|
|
<div>
|
|
The Bootstrapper discovers the server using the first successful method (in order):
|
|
</div>
|
|
<ol>
|
|
<li>
|
|
<h5>Manually Specified</h5>
|
|
<div>
|
|
The server url can be specified at the command line. The url must use HTTPS. For example:
|
|
</div>
|
|
<div");
|
|
|
|
WriteLiteral(" class=\"code\"");
|
|
|
|
WriteLiteral(">Disco.ClientBootstrapper.exe https://");
|
|
|
|
|
|
#line 165 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Request.Url.Authority);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n </li>\r\n <li>\r\n " +
|
|
" <h5>DNS Service Location (SRV) Record</h5>\r\n Expected" +
|
|
" Record Name: <strong><code>");
|
|
|
|
|
|
#line 169 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Model.DnsSrvRecordName);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</code></strong>\r\n");
|
|
|
|
|
|
#line 170 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 170 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
if (Model.IsServicesEducationVicGovAuDomain)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"smallText\"");
|
|
|
|
WriteLiteral(">\r\n This mechanism is not supported in the shared " +
|
|
"education.vic.gov.au domain and can be ignored.\r\n </d" +
|
|
"iv>\r\n");
|
|
|
|
|
|
#line 175 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
}
|
|
else
|
|
{
|
|
if (Model.DnsSrvRecordValue == null)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"info-box\"");
|
|
|
|
WriteLiteral(">\r\n <span");
|
|
|
|
WriteLiteral(" class=\"error\"");
|
|
|
|
WriteLiteral(">\r\n No Service Location (SRV) record found" +
|
|
".\r\n </span>\r\n");
|
|
|
|
|
|
#line 184 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 184 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
if (Request.IsSecureConnection)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <span>\r\n " +
|
|
" Please create a DNS Service Location (SRV) record:\r\n " +
|
|
" </span>\r\n");
|
|
|
|
WriteLiteral(" <table");
|
|
|
|
WriteLiteral(" class=\"none\"");
|
|
|
|
WriteLiteral(@">
|
|
<tr>
|
|
<th>Service:</th>
|
|
<td><code>_discoict</code></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Protocol:</th>
|
|
<td><code>_tcp</code></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Priority:</th>
|
|
<td><code>0</code></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Weight:</th>
|
|
<td><code>0</code></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Port:</th>
|
|
<td><code>");
|
|
|
|
|
|
#line 208 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Request.Url.Port);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@"</code></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Host offering this service:</th>
|
|
<td><code>");
|
|
|
|
|
|
#line 212 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Request.Url.Host);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</code></td>\r\n </tr>\r\n " +
|
|
" </table>\r\n");
|
|
|
|
|
|
#line 215 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@" <div>
|
|
Please configure and connect with HTTPS.
|
|
<span>
|
|
You can enable HTTPS automation using the
|
|
");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 222 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Html.ActionLink("Hosting", Model.HostingPluginInstalled ? MVC.Config.Plugins.Configure("Hosting") : MVC.Config.Plugins.Install()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n plugin.\r\n " +
|
|
" </span>\r\n </div>\r\n");
|
|
|
|
|
|
#line 226 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n");
|
|
|
|
|
|
#line 228 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div>\r\n Value:" +
|
|
" <strong><code>https://");
|
|
|
|
|
|
#line 232 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Model.DnsSrvRecordValue);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</code></strong>\r\n");
|
|
|
|
|
|
#line 233 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 233 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
if (Request.IsSecureConnection && !string.Equals(Model.DnsSrvRecordValue, Request.Url.Authority, StringComparison.OrdinalIgnoreCase))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"info-box error\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-exclamation\"");
|
|
|
|
WriteLiteral("></i> The Service Location (SRV) record does not match the way you are currently " +
|
|
"accessing the server: <code>");
|
|
|
|
|
|
#line 236 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Request.Url.Authority);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</code>.\r\n </div>\r\n");
|
|
|
|
|
|
#line 238 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </div>\r\n");
|
|
|
|
|
|
#line 240 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
}
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" </li>\r\n");
|
|
|
|
|
|
#line 243 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 243 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
if (Model.IsVicSmartDeployment)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@" <li>
|
|
<h5>Victorian Government Schools VicSmart Discovery</h5>
|
|
If the Bootstrapper detects it is running inside the VicSmart network, it will query Online Services for the Disco ICT server address based on the subnets assigned to each school.
|
|
This is configured in the ");
|
|
|
|
|
|
#line 248 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Html.ActionLink("Hosting", Model.HostingPluginInstalled ? MVC.Config.Plugins.Configure("Hosting") : MVC.Config.Plugins.Install()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n plugin.\r\n </li>\r\n");
|
|
|
|
|
|
#line 251 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@" <li>
|
|
<h5>Legacy Discovery</h5>
|
|
<div>
|
|
The Bootstrapper will attempt to send an ICMP ping to "<code>disco</code>". If the ping is successful, it will attempt to connect to <code>http://disco:9292/</code>.
|
|
</div>
|
|
<div>
|
|
");
|
|
|
|
|
|
#line 258 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 258 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
if (canConfig)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"Enrolment_LegacyDiscovery\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 260 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Model.LegacyDiscoveryEnabled ? "checked" : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" />\r\n");
|
|
|
|
WriteLiteral(" <script");
|
|
|
|
WriteLiteral(" type=\"text/javascript\"");
|
|
|
|
WriteLiteral(@">
|
|
$(function () {
|
|
document.DiscoFunctions.PropertyChangeHelper(
|
|
$('#Enrolment_LegacyDiscovery'),
|
|
null,
|
|
'");
|
|
|
|
|
|
#line 266 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Url.Action(MVC.API.Enrolment.LegacyDiscovery()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\',\r\n \'enabled\'\r\n " +
|
|
" );\r\n });\r\n " +
|
|
" </script>\r\n");
|
|
|
|
|
|
#line 271 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <input");
|
|
|
|
WriteLiteral(" id=\"Enrolment_LegacyDiscovery\"");
|
|
|
|
WriteLiteral(" type=\"checkbox\"");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 274 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Model.LegacyDiscoveryEnabled ? "checked" : null);
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" disabled=\"disabled\" />\r\n");
|
|
|
|
|
|
#line 275 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <label");
|
|
|
|
WriteLiteral(" for=\"Enrolment_LegacyDiscovery\"");
|
|
|
|
WriteLiteral(">\r\n Legacy Discovery Enabled\r\n " +
|
|
" </label>\r\n");
|
|
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 279 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(AjaxHelpers.AjaxLoader());
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("\r\n </div>\r\n");
|
|
|
|
|
|
#line 281 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 281 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
if ((Model.IsServicesEducationVicGovAuDomain || Model.DnsSrvRecordValue != null) && Model.LegacyDiscoveryEnabled)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <div");
|
|
|
|
WriteLiteral(" class=\"info-box error\"");
|
|
|
|
WriteLiteral(">\r\n <i");
|
|
|
|
WriteLiteral(" class=\"fa fa-exclamation-triangle\"");
|
|
|
|
WriteLiteral("></i>\r\n It is not recommended to have Legacy Disco" +
|
|
"very enabled. Please use the latest Bootstrapper and disable this option.\r\n " +
|
|
" </div>\r\n");
|
|
|
|
|
|
#line 287 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(@" <div>
|
|
This method is not secure and is only provided for backwards compatibility. In time this method will be removed.
|
|
</div>
|
|
</li>
|
|
</ol>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
");
|
|
|
|
|
|
#line 297 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
if (canShowStatus && Authorization.Has(Claims.Config.Logging.Show))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" <h2>Live Enrolment Logging</h2>\r\n");
|
|
|
|
|
|
#line 300 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 300 "..\..\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.Services.Devices.Enrolment.EnrolmentLog.Current,
|
|
ViewPortHeight = 250
|
|
}));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 307 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("<div");
|
|
|
|
WriteLiteral(" class=\"actionBar\"");
|
|
|
|
WriteLiteral(">\r\n");
|
|
|
|
|
|
#line 310 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 310 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
if (Authorization.Has(Claims.Config.Enrolment.DownloadBootstrapper))
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 312 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Html.ActionLinkButton("Download Bootstrapper", MVC.Services.Client.Bootstrapper()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 312 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral(" ");
|
|
|
|
|
|
#line 314 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
if (canShowStatus)
|
|
{
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 316 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
Write(Html.ActionLinkButton("Enrolment Status", MVC.Config.Enrolment.Status()));
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
|
|
#line 316 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
|
|
|
|
}
|
|
|
|
|
|
#line default
|
|
#line hidden
|
|
WriteLiteral("</div>\r\n");
|
|
|
|
}
|
|
}
|
|
}
|
|
#pragma warning restore 1591
|