fix: enrollment > enrolment

This commit is contained in:
Gary Sharp
2025-02-16 17:13:55 +11:00
parent 786d4809b5
commit 162ca20046
21 changed files with 160 additions and 160 deletions
+4 -4
View File
@@ -119,7 +119,7 @@ namespace Disco.Client
EnrolResponse response = null;
// Build Request
Presentation.UpdateStatus("Enrolling Device", "Building enrollment request and preparing to send data to the server.", true, -1);
Presentation.UpdateStatus("Enrolling Device", "Building enrolment request and preparing to send data to the server.", true, -1);
request = new Enrol();
request.Build();
@@ -127,11 +127,11 @@ namespace Disco.Client
do
{
// Send Request
Presentation.UpdateStatus("Enrolling Device", "Sending the enrollment request to the server.", true, -1);
Presentation.UpdateStatus("Enrolling Device", "Sending the enrolment request to the server.", true, -1);
response = request.Post(Program.IsAuthenticated);
// Process Response
Presentation.UpdateStatus("Enrolling Device", "Processing the enrollment response from the server.", true, -1);
Presentation.UpdateStatus("Enrolling Device", "Processing the enrolment response from the server.", true, -1);
response.Process();
if (response.IsPending)
@@ -144,7 +144,7 @@ namespace Disco.Client
var secondsConsumed = (DateTimeOffset.Now - startTime).TotalSeconds;
var progress = (int)((secondsConsumed / totalSeconds) * 100);
Presentation.UpdateStatus($"Pending Device Enrollment Approval: {response.PendingIdentifier}", $"Waiting for enrollment session '{response.PendingIdentifier}' to be approved.{Environment.NewLine}Reason: {response.PendingReason}", true, progress);
Presentation.UpdateStatus($"Pending Device Enrolment Approval: {response.PendingIdentifier}", $"Waiting for enrolment session '{response.PendingIdentifier}' to be approved.{Environment.NewLine}Reason: {response.PendingReason}", true, progress);
System.Threading.Thread.Sleep(TimeSpan.FromSeconds(10));
}
else
+1 -1
View File
@@ -8,6 +8,6 @@ namespace Disco.Models.UI.Job
{
JobTableModel MyJobs { get; set; }
JobTableModel StaleJobs { get; set; }
List<EnrolResponse> PendingEnrollments { get; set; }
List<EnrolResponse> PendingEnrolments { get; set; }
}
}
@@ -47,7 +47,7 @@ namespace Disco.Services.Devices.Enrolment
{
get
{
return "Device Enrollment";
return "Device Enrolment";
}
}
public override int ModuleId
@@ -340,7 +340,7 @@ namespace Disco.Services.Devices.Enrolment
Id = (int)EventTypeIds.SessionStarting,
ModuleId = _ModuleId,
Name = "Session Starting",
Format = "Starting '{2}' Enrollment for {1} (Session# {0})",
Format = "Starting '{2}' Enrolment for {1} (Session# {0})",
Severity = 0,
UseLive = true,
UsePersist = true,
@@ -384,7 +384,7 @@ namespace Disco.Services.Devices.Enrolment
Id = (int)EventTypeIds.SessionPending,
ModuleId = _ModuleId,
Name = "Session Pending",
Format = "Pending '{2}' Enrollment for {1} (Session# {0}; Reason: {3}; Identifier: {4})",
Format = "Pending '{2}' Enrolment for {1} (Session# {0}; Reason: {3}; Identifier: {4})",
Severity = 0,
UseLive = true,
UsePersist = true,
@@ -395,7 +395,7 @@ namespace Disco.Services.Devices.Enrolment
Id = (int)EventTypeIds.SessionPendingApproved,
ModuleId = _ModuleId,
Name = "Session Pending Approved",
Format = "Pending enrollment approved by {1} (Session# {0}; Reason: {2})",
Format = "Pending enrolment approved by {1} (Session# {0}; Reason: {2})",
Severity = 0,
UseLive = true,
UsePersist = true,
@@ -406,7 +406,7 @@ namespace Disco.Services.Devices.Enrolment
Id = (int)EventTypeIds.SessionPendingRejected,
ModuleId = _ModuleId,
Name = "Session Pending Rejected",
Format = "Pending enrollment rejected by {1} (Session# {0}; Reason: {2})",
Format = "Pending enrolment rejected by {1} (Session# {0}; Reason: {2})",
Severity = 0,
UseLive = true,
UsePersist = true,
@@ -417,7 +417,7 @@ namespace Disco.Services.Devices.Enrolment
Id = (int)EventTypeIds.SessionContinuing,
ModuleId = _ModuleId,
Name = "Session Continuing",
Format = "Continuing '{2}' Enrollment for {1} (Session# {0})",
Format = "Continuing '{2}' Enrolment for {1} (Session# {0})",
Severity = 0,
UseLive = true,
UsePersist = true,
@@ -59,7 +59,7 @@ namespace Disco.Services.Devices.Enrolment
.ToList();
}
public static void ResolvePendingEnrollment(string sessionId, bool approve, string username, string reason)
public static void ResolvePendingEnrolment(string sessionId, bool approve, string username, string reason)
{
if (!pendingEnrolments.TryGetValue(sessionId, out var enrolResponse))
throw new InvalidOperationException("The pending session is invalid or has expired");
@@ -79,7 +79,7 @@ namespace Disco.Services.Devices.Enrolment
}
else
{
enrolResponse.ErrorMessage = $"Enrollment rejected";
enrolResponse.ErrorMessage = $"Enrolment rejected";
EnrolmentLog.LogSessionPendingRejected(sessionId, username, reason);
}
}
@@ -6,14 +6,14 @@ using System.Web.Mvc;
namespace Disco.Web.Areas.API.Controllers
{
public partial class EnrollmentController : AuthorizedDatabaseController
public partial class EnrolmentController : AuthorizedDatabaseController
{
[HttpPost]
[ValidateAntiForgeryToken]
[DiscoAuthorize(Claims.Device.Actions.EnrolDevices)]
public virtual ActionResult ResolveSessionPending(string sessionId, bool approve, string reason)
{
WindowsDeviceEnrolment.ResolvePendingEnrollment(sessionId, approve, CurrentUser.UserId, reason);
WindowsDeviceEnrolment.ResolvePendingEnrolment(sessionId, approve, CurrentUser.UserId, reason);
return new HttpStatusCodeResult(200);
}
@@ -84,9 +84,9 @@
}
@if (Authorization.Has(Claims.Config.Enrolment.Show))
{
<i class="fa fa-cog"></i>@Html.ActionLinkClass("Enrollment", MVC.Config.Enrolment.Index(), "config")
<i class="fa fa-cog"></i>@Html.ActionLinkClass("Enrolment", MVC.Config.Enrolment.Index(), "config")
<div class="pageMenuBlurb">
Configure Enrollment settings including secure credentials.
Configure Enrolment settings including secure credentials.
</div>
}
</div>
@@ -592,7 +592,7 @@ WriteLiteral("></i>");
#line hidden
#line 87 "..\..\Areas\Config\Views\Config\Index.cshtml"
Write(Html.ActionLinkClass("Enrollment", MVC.Config.Enrolment.Index(), "config"));
Write(Html.ActionLinkClass("Enrolment", MVC.Config.Enrolment.Index(), "config"));
#line default
@@ -608,8 +608,8 @@ WriteLiteral(" <div");
WriteLiteral(" class=\"pageMenuBlurb\"");
WriteLiteral(">\r\n Configure Enrollment settings including secure cre" +
"dentials.\r\n </div>\r\n");
WriteLiteral(">\r\n Configure Enrolment settings including secure cred" +
"entials.\r\n </div>\r\n");
#line 91 "..\..\Areas\Config\Views\Config\Index.cshtml"
@@ -1011,14 +1011,14 @@ WriteLiteral(" class=\"fa fa-cloud-download info\"");
WriteLiteral("></i>\r\n <div>An updated version of Disco is available</div>\r\n <a");
WriteAttribute("href", Tuple.Create(" href=\"", 8682), Tuple.Create("\"", 8718)
WriteAttribute("href", Tuple.Create(" href=\"", 8680), Tuple.Create("\"", 8716)
#line 162 "..\..\Areas\Config\Views\Config\Index.cshtml"
, Tuple.Create(Tuple.Create("", 8689), Tuple.Create<System.Object, System.Int32>(Model.UpdateResponse.UrlLink
, Tuple.Create(Tuple.Create("", 8687), Tuple.Create<System.Object, System.Int32>(Model.UpdateResponse.UrlLink
#line default
#line hidden
, 8689), false)
, 8687), false)
);
WriteLiteral(" class=\"button small alert\"");
@@ -5,7 +5,7 @@
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(), "Enrollment");
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Enrolment");
}
<div class="form" style="width: 530px;">
<table>
@@ -45,7 +45,7 @@
return;
} else {
$.ajax({
url: '@Url.Action(MVC.API.Enrollment.PendingTimeoutMinutes())',
url: '@Url.Action(MVC.API.Enrolment.PendingTimeoutMinutes())',
dataType: 'json',
method: 'POST',
data: data,
@@ -76,8 +76,8 @@
<tr>
<td colspan="2">
<span class="smallText">
If a device enrollment is not automatically approved it will remain pending until the timeout is reached.
Pending enrollments can be approved manually from the Enrollment Status page.
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>
@@ -215,7 +215,7 @@
<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 enrollment.</span><br />
<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 Enroll,
such as an anchor (<span class="code">&lt;a&gt;</span>) or <span class="code">&lt;script&gt;</span>
@@ -227,7 +227,7 @@
</div>
@if (canShowStatus && Authorization.Has(Claims.Config.Logging.Show))
{
<h2>Live Enrollment Logging</h2>
<h2>Live Enrolment Logging</h2>
@Html.Partial(MVC.Config.Shared.Views.LogEvents, new Disco.Web.Areas.Config.Models.Shared.LogEventsModel()
{
IsLive = true,
@@ -244,6 +244,6 @@
}
@if (canShowStatus)
{
@Html.ActionLinkButton("Enrollment Status", MVC.Config.Enrolment.Status())
@Html.ActionLinkButton("Enrolment Status", MVC.Config.Enrolment.Status())
}
</div>
@@ -51,7 +51,7 @@ namespace Disco.Web.Areas.Config.Views.Enrolment
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(), "Enrollment");
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Enrolment");
#line default
@@ -160,7 +160,7 @@ WriteLiteral(@">
#line 48 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Url.Action(MVC.API.Enrollment.PendingTimeoutMinutes()));
Write(Url.Action(MVC.API.Enrolment.PendingTimeoutMinutes()));
#line default
@@ -221,8 +221,8 @@ WriteLiteral(">\r\n <span");
WriteLiteral(" class=\"smallText\"");
WriteLiteral(@">
If a device enrollment is not automatically approved it will remain pending until the timeout is reached.
Pending enrollments can be approved manually from the Enrollment Status page.
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>
@@ -562,8 +562,8 @@ WriteLiteral(" target=\"_blank\"");
WriteLiteral(" href=\"http://json.org/\"");
WriteLiteral(">JSON</a> response containing basic information about the enrollment.</span><br /" +
">\r\n <span");
WriteLiteral(">JSON</a> response containing basic information about the enrolment.</span><br />" +
"\r\n <span");
WriteLiteral(" class=\"smallMessage\"");
@@ -594,7 +594,7 @@ WriteLiteral(">&lt;script&gt;</span>\r\n tag embedded on the
#line default
#line hidden
WriteLiteral(" <h2>Live Enrollment Logging</h2>\r\n");
WriteLiteral(" <h2>Live Enrolment Logging</h2>\r\n");
#line 231 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
@@ -671,7 +671,7 @@ WriteLiteral(" ");
#line hidden
#line 247 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Html.ActionLinkButton("Enrollment Status", MVC.Config.Enrolment.Status()));
Write(Html.ActionLinkButton("Enrolment Status", MVC.Config.Enrolment.Status()));
#line default
@@ -1,15 +1,15 @@
@{
Authorization.Require(Claims.Config.Enrolment.ShowStatus);
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Enrollment", MVC.Config.Enrolment.Index(), "Status");
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Enrolment", MVC.Config.Enrolment.Index(), "Status");
Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-Isotope");
}
<div id="enrolStatus">
@Html.AntiForgeryToken();
@Html.AntiForgeryToken()
<div id="noSessions" data-bind="visible: noSessions">
<h2>No enrollment sessions today</h2>
<h2>No enrolment sessions today</h2>
</div>
<div id="sessions" data-bind="visible: !noSessions(), foreach: { data: sessions, afterRender: sessionRendered, afterAdd: sessionAdded }" style="display: none">
<div class="session" data-bind="style: { backgroundImage: deviceModelImageUrl }, click: select">
@@ -30,7 +30,7 @@
<p class="sessionStatus" data-bind="text: progressStatus"></p>
<div data-bind="visible: !sessionEnded() && progressValue >= 0, progressValue: progressValue"></div>
<div id="formResolveSessionPending" data-bind="visible: isPending">
@using (Html.BeginForm(MVC.API.Enrollment.ResolveSessionPending(), FormMethod.Post))
@using (Html.BeginForm(MVC.API.Enrolment.ResolveSessionPending(), FormMethod.Post))
{
<code data-bind="text: pendingIdentifier"></code>
@Html.AntiForgeryToken();
@@ -208,7 +208,7 @@
self.select = function (e, d) {
vm.currentSession(self);
hostDialogSessions.dialog('open');
hostDialogSessions.dialog('option', 'title', 'Device Enrollment: ' + self.title());
hostDialogSessions.dialog('option', 'title', 'Device Enrolment: ' + self.title());
}
}
@@ -254,19 +254,19 @@
session.pendingIdentifier(log.Arguments[4]);
session.messages.unshift(log);
session.progressValue(-1);
session.progressStatus('Pending enrollment approval');
session.progressStatus('Pending enrolment approval');
break;
case 15: // SessionPendingApproved
session.isPending(false);
session.messages.unshift(log);
session.progressValue(-1);
session.progressStatus('Enrollment approval, waiting for client');
session.progressStatus('Enrolment approval, waiting for client');
break;
case 16: // SessionPendingRejected
session.isPending(false);
session.messages.unshift(log);
session.progressValue(-1);
session.progressStatus('Enrollment rejected, waiting for client');
session.progressStatus('Enrolment rejected, waiting for client');
break;
case 17: // SessionContinuing
session.isPending(false);
@@ -276,12 +276,12 @@
session.sessionEnded(true);
session.isPending(false);
if (session.hasError())
session.progressStatus('Enrollment Finished with an Error');
session.progressStatus('Enrolment Finished with an Error');
else
if (session.hasWarning())
session.progressStatus('Enrollment Finished with a Warning');
session.progressStatus('Enrolment Finished with a Warning');
else
session.progressStatus('Enrollment Finished Successfully');
session.progressStatus('Enrolment Finished Successfully');
session.messages.unshift(log);
break;
case 21: // SessionDiagnosticInformation
@@ -48,7 +48,7 @@ namespace Disco.Web.Areas.Config.Views.Enrolment
Authorization.Require(Claims.Config.Enrolment.ShowStatus);
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Enrollment", MVC.Config.Enrolment.Index(), "Status");
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Enrolment", MVC.Config.Enrolment.Index(), "Status");
Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-Isotope");
@@ -71,13 +71,13 @@ Write(Html.AntiForgeryToken());
#line default
#line hidden
WriteLiteral(";\r\n <div");
WriteLiteral("\r\n <div");
WriteLiteral(" id=\"noSessions\"");
WriteLiteral(" data-bind=\"visible: noSessions\"");
WriteLiteral(">\r\n <h2>No enrollment sessions today</h2>\r\n </div>\r\n <div");
WriteLiteral(">\r\n <h2>No enrolment sessions today</h2>\r\n </div>\r\n <div");
WriteLiteral(" id=\"sessions\"");
@@ -178,7 +178,7 @@ WriteLiteral(">\r\n");
#line hidden
#line 33 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
using (Html.BeginForm(MVC.API.Enrollment.ResolveSessionPending(), FormMethod.Post))
using (Html.BeginForm(MVC.API.Enrolment.ResolveSessionPending(), FormMethod.Post))
{
@@ -514,77 +514,77 @@ WriteLiteral(")\';\r\n\r\n function pageViewModel() {\r\n var
"urn \'none, \' + deviceModelImage;\r\n });\r\n self.select = fun" +
"ction (e, d) {\r\n vm.currentSession(self);\r\n hostDi" +
"alogSessions.dialog(\'open\');\r\n hostDialogSessions.dialog(\'option\'" +
", \'title\', \'Device Enrollment: \' + self.title());\r\n }\r\n }\r\n\r\n " +
" function parseLog(log) {\r\n if (log.ModuleId === 50 && log.Argu" +
"ments && log.Arguments.length > 0) {\r\n // find session\r\n " +
" var sessionId = log.Arguments[0];\r\n var session = vm.sessi" +
"onIndex[sessionId];\r\n if (!session && log.EventTypeId === 10) { /" +
"/ Starting Session (Ignore \'partial\' sessions)\r\n session = ne" +
"w sessionViewModel(sessionId);\r\n vm.sessionIndex[sessionId] =" +
" session;\r\n vm.sessions.unshift(session);\r\n " +
" vm.noSessions(false);\r\n }\r\n if (session) {\r\n " +
" switch (log.EventTypeId) {\r\n case 10: // " +
"SessionStarting\r\n session.title(log.Arguments[1]);\r\n " +
" session.startTime(log.FormattedTimestamp.substring(lo" +
"g.FormattedTimestamp.indexOf(\' \') + 1));\r\n session.me" +
"ssages.unshift(log);\r\n break;\r\n " +
" case 11: // SessionProgress\r\n //session.progressbar" +
".progressbar(\'option\', \'value\', log.Arguments[1]);\r\n " +
"session.progressValue(log.Arguments[1]);\r\n session.pr" +
"ogressStatus(log.Arguments[2]);\r\n break;\r\n " +
" case 12: // SessionDevice\r\n session.titl" +
"e(log.Arguments[1]);\r\n session.serialNumber(log.Argum" +
"ents[1]);\r\n if (log.Arguments.length >= 3 && log.Argu" +
"ments[2])\r\n session.deviceModelId(log.Arguments[2" +
"]);\r\n break;\r\n break;\r\n " +
" case 13: // SessionDeviceInfo\r\n " +
"session.title(log.Arguments[1]);\r\n session.serialNumb" +
"er(log.Arguments[1]);\r\n session.sessionDeviceInfo(log" +
");\r\n if (log.Arguments.length >= 10 && log.Arguments[" +
"9])\r\n session.deviceModelId(log.Arguments[9]);\r\n " +
" break;\r\n case 14: // SessionPe" +
"nding\r\n session.isPending(true);\r\n " +
" session.pendingIdentifier(log.Arguments[4]);\r\n " +
" session.messages.unshift(log);\r\n session.progressV" +
"alue(-1);\r\n session.progressStatus(\'Pending enrollmen" +
"t approval\');\r\n break;\r\n case " +
"15: // SessionPendingApproved\r\n session.isPending(fal" +
"se);\r\n session.messages.unshift(log);\r\n " +
" session.progressValue(-1);\r\n session.pr" +
"ogressStatus(\'Enrollment approval, waiting for client\');\r\n " +
" break;\r\n case 16: // SessionPendingRejected\r\n " +
" session.isPending(false);\r\n ses" +
"sion.messages.unshift(log);\r\n session.progressValue(-" +
"1);\r\n session.progressStatus(\'Enrollment rejected, wa" +
"iting for client\');\r\n break;\r\n " +
" case 17: // SessionContinuing\r\n session.isPending(fa" +
"lse);\r\n session.messages.unshift(log);\r\n " +
" break;\r\n case 20: // SessionFinished\r\n " +
" session.sessionEnded(true);\r\n " +
" session.isPending(false);\r\n if (session.hasError())\r" +
"\n session.progressStatus(\'Enrollment Finished wit" +
"h an Error\');\r\n else\r\n " +
" if (session.hasWarning())\r\n session.progress" +
"Status(\'Enrollment Finished with a Warning\');\r\n e" +
"lse\r\n session.progressStatus(\'Enrollment Fini" +
"shed Successfully\');\r\n session.messages.unshift(log);" +
"\r\n break;\r\n case 21: // Sessio" +
"nDiagnosticInformation\r\n session.console.push(log);\r\n" +
" break;\r\n case 22: // SessionW" +
"arning\r\n session.hasWarning(true);\r\n " +
" session.messages.unshift(log);\r\n break;\r\n " +
" case 23: // SessionError\r\n case 24" +
": // SessionErrorWithInner\r\n case 25: // SessionClientErr" +
"or\r\n session.hasError(true);\r\n " +
" session.messages.unshift(log);\r\n break;\r\n " +
" default:\r\n session.messages.unshift(" +
"log);\r\n }\r\n }\r\n }\r\n }\r\n " +
" function init() {\r\n hostDialogSessions.dialog({\r\n m" +
"odal: true,\r\n height: 574,\r\n width: 900,\r\n " +
" resizable: false,\r\n autoOpen: false\r\n });\r\n " +
" //hostDialogSessionsProgress.progressbar();\r\n\r\n // Create Vi" +
"ew Model\r\n vm = new pageViewModel();\r\n $.ajax({\r\n " +
" url: \'");
", \'title\', \'Device Enrolment: \' + self.title());\r\n }\r\n }\r\n\r\n " +
" function parseLog(log) {\r\n if (log.ModuleId === 50 && log.Argum" +
"ents && log.Arguments.length > 0) {\r\n // find session\r\n " +
" var sessionId = log.Arguments[0];\r\n var session = vm.sessio" +
"nIndex[sessionId];\r\n if (!session && log.EventTypeId === 10) { //" +
" Starting Session (Ignore \'partial\' sessions)\r\n session = new" +
" sessionViewModel(sessionId);\r\n vm.sessionIndex[sessionId] = " +
"session;\r\n vm.sessions.unshift(session);\r\n " +
" vm.noSessions(false);\r\n }\r\n if (session) {\r\n " +
" switch (log.EventTypeId) {\r\n case 10: // S" +
"essionStarting\r\n session.title(log.Arguments[1]);\r\n " +
" session.startTime(log.FormattedTimestamp.substring(log" +
".FormattedTimestamp.indexOf(\' \') + 1));\r\n session.mes" +
"sages.unshift(log);\r\n break;\r\n " +
" case 11: // SessionProgress\r\n //session.progressbar." +
"progressbar(\'option\', \'value\', log.Arguments[1]);\r\n s" +
"ession.progressValue(log.Arguments[1]);\r\n session.pro" +
"gressStatus(log.Arguments[2]);\r\n break;\r\n " +
" case 12: // SessionDevice\r\n session.title" +
"(log.Arguments[1]);\r\n session.serialNumber(log.Argume" +
"nts[1]);\r\n if (log.Arguments.length >= 3 && log.Argum" +
"ents[2])\r\n session.deviceModelId(log.Arguments[2]" +
");\r\n break;\r\n break;\r\n " +
" case 13: // SessionDeviceInfo\r\n s" +
"ession.title(log.Arguments[1]);\r\n session.serialNumbe" +
"r(log.Arguments[1]);\r\n session.sessionDeviceInfo(log)" +
";\r\n if (log.Arguments.length >= 10 && log.Arguments[9" +
"])\r\n session.deviceModelId(log.Arguments[9]);\r\n " +
" break;\r\n case 14: // SessionPen" +
"ding\r\n session.isPending(true);\r\n " +
" session.pendingIdentifier(log.Arguments[4]);\r\n " +
" session.messages.unshift(log);\r\n session.progressVa" +
"lue(-1);\r\n session.progressStatus(\'Pending enrolment " +
"approval\');\r\n break;\r\n case 15" +
": // SessionPendingApproved\r\n session.isPending(false" +
");\r\n session.messages.unshift(log);\r\n " +
" session.progressValue(-1);\r\n session.prog" +
"ressStatus(\'Enrolment approval, waiting for client\');\r\n " +
" break;\r\n case 16: // SessionPendingRejected\r\n " +
" session.isPending(false);\r\n sessio" +
"n.messages.unshift(log);\r\n session.progressValue(-1);" +
"\r\n session.progressStatus(\'Enrolment rejected, waitin" +
"g for client\');\r\n break;\r\n cas" +
"e 17: // SessionContinuing\r\n session.isPending(false)" +
";\r\n session.messages.unshift(log);\r\n " +
" break;\r\n case 20: // SessionFinished\r\n " +
" session.sessionEnded(true);\r\n ses" +
"sion.isPending(false);\r\n if (session.hasError())\r\n " +
" session.progressStatus(\'Enrolment Finished with an " +
"Error\');\r\n else\r\n if (" +
"session.hasWarning())\r\n session.progressStatu" +
"s(\'Enrolment Finished with a Warning\');\r\n else\r\n " +
" session.progressStatus(\'Enrolment Finished Su" +
"ccessfully\');\r\n session.messages.unshift(log);\r\n " +
" break;\r\n case 21: // SessionDiagno" +
"sticInformation\r\n session.console.push(log);\r\n " +
" break;\r\n case 22: // SessionWarning\r" +
"\n session.hasWarning(true);\r\n " +
" session.messages.unshift(log);\r\n break;\r\n " +
" case 23: // SessionError\r\n case 24: // Se" +
"ssionErrorWithInner\r\n case 25: // SessionClientError\r\n " +
" session.hasError(true);\r\n se" +
"ssion.messages.unshift(log);\r\n break;\r\n " +
" default:\r\n session.messages.unshift(log);\r\n" +
" }\r\n }\r\n }\r\n }\r\n func" +
"tion init() {\r\n hostDialogSessions.dialog({\r\n modal: t" +
"rue,\r\n height: 574,\r\n width: 900,\r\n " +
" resizable: false,\r\n autoOpen: false\r\n });\r\n " +
" //hostDialogSessionsProgress.progressbar();\r\n\r\n // Create View Mode" +
"l\r\n vm = new pageViewModel();\r\n $.ajax({\r\n " +
"url: \'");
#line 319 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
+3 -3
View File
@@ -97,7 +97,7 @@
height: 50px;
font-size: 0.6em;
}
#layout_PageHeading #pendingEnrollments {
#layout_PageHeading #pendingEnrolments {
position: relative;
float: right;
border: 1px dashed #ddd;
@@ -108,7 +108,7 @@
text-align: right;
height: 50px;
}
#layout_PageHeading #pendingEnrollments i {
#layout_PageHeading #pendingEnrolments i {
position: absolute;
display: block;
height: 64px;
@@ -119,7 +119,7 @@
font-size: 50px;
color: #e51400;
}
#layout_PageHeading #pendingEnrollments a.button {
#layout_PageHeading #pendingEnrolments a.button {
font-size: 12px;
margin-top: 8px;
}
+1 -1
View File
@@ -26,7 +26,7 @@
font-size: 0.6em;
}
#pendingEnrollments {
#pendingEnrolments {
position: relative;
float: right;
border: 1px dashed #ddd;
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -50,7 +50,7 @@ namespace Disco.Web.Controllers
m.DailyOpenedClosedStatistics = DailyOpenedClosed.Data(Database, true);
if (Authorization.Has(Claims.Device.Actions.EnrolDevices))
m.PendingEnrollments = WindowsDeviceEnrolment.GetPendingEnrolments();
m.PendingEnrolments = WindowsDeviceEnrolment.GetPendingEnrolments();
// UI Extensions
UIExtensions.ExecuteExtensions<JobIndexModel>(this.ControllerContext, m);
+2 -2
View File
@@ -212,7 +212,7 @@
<Compile Include="Areas\API\Controllers\AuthorizationRoleController.cs" />
<Compile Include="Areas\API\Controllers\DocumentTemplatePackageController.cs" />
<Compile Include="Areas\API\Controllers\DeviceFlagAssignmentController.cs" />
<Compile Include="Areas\API\Controllers\EnrollmentController.cs" />
<Compile Include="Areas\API\Controllers\EnrolmentController.cs" />
<Compile Include="Areas\API\Controllers\ExportController.cs" />
<Compile Include="Areas\API\Controllers\UserFlagAssignmentController.cs" />
<Compile Include="Areas\API\Controllers\DeviceFlagController.cs" />
@@ -739,7 +739,7 @@
<Compile Include="Extensions\T4MVC\API.DocumentTemplatePackageController.generated.cs">
<DependentUpon>T4MVC.tt</DependentUpon>
</Compile>
<Compile Include="Extensions\T4MVC\API.EnrollmentController.generated.cs">
<Compile Include="Extensions\T4MVC\API.EnrolmentController.generated.cs">
<DependentUpon>T4MVC.tt</DependentUpon>
</Compile>
<Compile Include="Extensions\T4MVC\API.ExportController.generated.cs">
@@ -25,13 +25,13 @@ using System.Web.Routing;
using T4MVC;
namespace Disco.Web.Areas.API.Controllers
{
public partial class EnrollmentController
public partial class EnrolmentController
{
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public EnrollmentController() { }
public EnrolmentController() { }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
protected EnrollmentController(Dummy d) { }
protected EnrolmentController(Dummy d) { }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
protected RedirectToRouteResult RedirectToAction(ActionResult result)
@@ -73,13 +73,13 @@ namespace Disco.Web.Areas.API.Controllers
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public EnrollmentController Actions { get { return MVC.API.Enrollment; } }
public EnrolmentController Actions { get { return MVC.API.Enrolment; } }
[GeneratedCode("T4MVC", "2.0")]
public readonly string Area = "API";
[GeneratedCode("T4MVC", "2.0")]
public readonly string Name = "Enrollment";
public readonly string Name = "Enrolment";
[GeneratedCode("T4MVC", "2.0")]
public const string NameConst = "Enrollment";
public const string NameConst = "Enrolment";
[GeneratedCode("T4MVC", "2.0")]
static readonly ActionNamesClass s_actions = new ActionNamesClass();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
@@ -132,9 +132,9 @@ namespace Disco.Web.Areas.API.Controllers
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public partial class T4MVC_EnrollmentController : Disco.Web.Areas.API.Controllers.EnrollmentController
public partial class T4MVC_EnrolmentController : Disco.Web.Areas.API.Controllers.EnrolmentController
{
public T4MVC_EnrollmentController() : base(Dummy.Instance) { }
public T4MVC_EnrolmentController() : base(Dummy.Instance) { }
[NonAction]
partial void ResolveSessionPendingOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string sessionId, bool approve, string reason);
+1 -1
View File
@@ -63,7 +63,7 @@ namespace T4MVC
public Disco.Web.Areas.API.Controllers.DeviceProfileController DeviceProfile = new Disco.Web.Areas.API.Controllers.T4MVC_DeviceProfileController();
public Disco.Web.Areas.API.Controllers.DocumentTemplateController DocumentTemplate = new Disco.Web.Areas.API.Controllers.T4MVC_DocumentTemplateController();
public Disco.Web.Areas.API.Controllers.DocumentTemplatePackageController DocumentTemplatePackage = new Disco.Web.Areas.API.Controllers.T4MVC_DocumentTemplatePackageController();
public Disco.Web.Areas.API.Controllers.EnrollmentController Enrollment = new Disco.Web.Areas.API.Controllers.T4MVC_EnrollmentController();
public Disco.Web.Areas.API.Controllers.EnrolmentController Enrolment = new Disco.Web.Areas.API.Controllers.T4MVC_EnrolmentController();
public Disco.Web.Areas.API.Controllers.ExportController Export = new Disco.Web.Areas.API.Controllers.T4MVC_ExportController();
public Disco.Web.Areas.API.Controllers.ExpressionsController Expressions = new Disco.Web.Areas.API.Controllers.T4MVC_ExpressionsController();
public Disco.Web.Areas.API.Controllers.JobController Job = new Disco.Web.Areas.API.Controllers.T4MVC_JobController();
+1 -1
View File
@@ -10,7 +10,7 @@ namespace Disco.Web.Models.Job
{
public JobTableModel MyJobs { get; set; }
public JobTableModel StaleJobs { get; set; }
public List<EnrolResponse> PendingEnrollments { get; set; }
public List<EnrolResponse> PendingEnrolments { get; set; }
public List<DailyOpenedClosedItem> DailyOpenedClosedStatistics { get; set; }
}
+5 -5
View File
@@ -151,17 +151,17 @@
@Html.ActionLinkButton("Export Jobs", MVC.Job.Export())
</div>
}
@if (Model.PendingEnrollments != null && Model.PendingEnrollments.Count > 0 && Authorization.Has(Claims.Device.Actions.EnrolDevices))
@if (Model.PendingEnrolments != null && Model.PendingEnrolments.Count > 0 && Authorization.Has(Claims.Device.Actions.EnrolDevices))
{
<div id="pendingEnrollments">
<div id="pendingEnrolments">
<i class="fa fa-exclamation-circle info"></i>
<div>There are device enrollments pending approval.</div>
<a href="@Url.Action(MVC.Config.Enrolment.Status())" class="button small alert" target="_blank">View Enrollments</a>
<div>There are device enrolments pending approval.</div>
<a href="@Url.Action(MVC.Config.Enrolment.Status())" class="button small alert" target="_blank">View Enrolments</a>
</div>
<script>
$(function () {
var layout_PageHeading = $('#layout_PageHeading').height(80);
$('#pendingEnrollments')
$('#pendingEnrolments')
.detach()
.appendTo(layout_PageHeading);
});
+11 -11
View File
@@ -338,7 +338,7 @@ WriteLiteral("\r\n </div>\r\n");
#line hidden
#line 154 "..\..\Views\Job\Index.cshtml"
if (Model.PendingEnrollments != null && Model.PendingEnrollments.Count > 0 && Authorization.Has(Claims.Device.Actions.EnrolDevices))
if (Model.PendingEnrolments != null && Model.PendingEnrolments.Count > 0 && Authorization.Has(Claims.Device.Actions.EnrolDevices))
{
@@ -346,35 +346,35 @@ WriteLiteral("\r\n </div>\r\n");
#line hidden
WriteLiteral(" <div");
WriteLiteral(" id=\"pendingEnrollments\"");
WriteLiteral(" id=\"pendingEnrolments\"");
WriteLiteral(">\r\n <i");
WriteLiteral(" class=\"fa fa-exclamation-circle info\"");
WriteLiteral("></i>\r\n <div>There are device enrollments pending approval.</div>\r\n " +
" <a");
WriteLiteral("></i>\r\n <div>There are device enrolments pending approval.</div>\r\n " +
"<a");
WriteAttribute("href", Tuple.Create(" href=\"", 6930), Tuple.Create("\"", 6979)
WriteAttribute("href", Tuple.Create(" href=\"", 6926), Tuple.Create("\"", 6975)
#line 159 "..\..\Views\Job\Index.cshtml"
, Tuple.Create(Tuple.Create("", 6937), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.Enrolment.Status())
, Tuple.Create(Tuple.Create("", 6933), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.Enrolment.Status())
#line default
#line hidden
, 6937), false)
, 6933), false)
);
WriteLiteral(" class=\"button small alert\"");
WriteLiteral(" target=\"_blank\"");
WriteLiteral(">View Enrollments</a>\r\n </div>\r\n");
WriteLiteral(">View Enrolments</a>\r\n </div>\r\n");
WriteLiteral(" <script>\r\n $(function () {\r\n var layout_PageHeading = $(\'#l" +
"ayout_PageHeading\').height(80);\r\n $(\'#pendingEnrollments\')\r\n " +
" .detach()\r\n .appendTo(layout_PageHeading);\r\n });\r\n " +
" </script>\r\n");
"ayout_PageHeading\').height(80);\r\n $(\'#pendingEnrolments\')\r\n " +
" .detach()\r\n .appendTo(layout_PageHeading);\r\n });\r\n " +
" </script>\r\n");
#line 169 "..\..\Views\Job\Index.cshtml"