security: use more antiforgery tokens

This commit is contained in:
Gary Sharp
2025-07-25 12:32:44 +10:00
parent fd43d85778
commit 7deead494b
222 changed files with 12919 additions and 11728 deletions
@@ -6,11 +6,13 @@
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");
}
<div class="form" style="width: 530px;">
<table>
<tr>
<th>
<th width="130">
Pending Timeout:
</th>
<td>
@@ -21,50 +23,14 @@
@AjaxHelpers.AjaxLoader()
<span> minutes <span class="smallText">(default: 30)</span></span>
<script type="text/javascript">
$(function () {
var $DOM = $('#PendingTimeoutMinutes');
var $DOMAjaxSave = $DOM.next('.ajaxSave');
$DOM
.watermark('Minutes')
.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 = { PendingTimeoutMinutes: parseInt($DOM.val()) };
if (data.PendingTimeoutMinutes <= 0) {
alert('Pending Timeout must be greater than zero');
$ajaxLoading.hide();
return;
} else {
$.ajax({
url: '@Url.Action(MVC.API.Enrolment.PendingTimeoutMinutes())',
dataType: 'json',
method: 'POST',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to update pending timeout: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update pending timeout: ' + textStatus);
$ajaxLoading.hide();
}
$(function () {
document.DiscoFunctions.PropertyChangeHelper(
$('#PendingTimeoutMinutes'),
'Pending Timeout',
'@(Url.Action(MVC.API.Enrolment.PendingTimeoutMinutes()))',
'PendingTimeoutMinutes'
);
});
}
});
});
</script>
}
else
@@ -87,7 +53,7 @@
<h2>Apple Mac Secure Enroll</h2>
<table>
<tr>
<th>
<th width="130">
Username:
</th>
<td>
@@ -97,43 +63,14 @@
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(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: '@Url.Action(MVC.API.Bootstrapper.MacSshUsername())',
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();
}
$(function () {
document.DiscoFunctions.PropertyChangeHelper(
$('#MacSshUsername'),
'Username',
'@(Url.Action(MVC.API.Enrolment.MacSshUsername()))',
'MacSshUsername'
);
});
});
});
</script>
}
else
@@ -151,7 +88,7 @@
</tr>
<tr>
<th>
<th width="130">
Password:
</th>
<td>
@@ -161,43 +98,14 @@
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
<script type="text/javascript">
$(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: '@Url.Action(MVC.API.Bootstrapper.MacSshPassword())',
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();
}
$(function () {
document.DiscoFunctions.PropertyChangeHelper(
$('#MacSshPassword'),
'Password',
'@(Url.Action(MVC.API.Enrolment.MacSshPassword()))',
'MacSshPassword'
);
});
});
});
</script>
}
else
@@ -53,6 +53,8 @@ namespace Disco.Web.Areas.Config.Views.Enrolment
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Enrolment");
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
#line default
#line hidden
@@ -62,17 +64,20 @@ WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 530px;\"");
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n Pending Timeout:\r" +
"\n </th>\r\n <td>\r\n");
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 17 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 19 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line default
#line hidden
#line 17 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 19 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
if (canConfig)
{
@@ -80,42 +85,42 @@ WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n
#line default
#line hidden
#line 19 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 21 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Html.TextBoxFor(model => model.PendingTimeoutMinutes, new { type = "number", min = "1" }));
#line default
#line hidden
#line 19 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 21 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line default
#line hidden
#line 20 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 22 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
#line 20 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 22 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line default
#line hidden
#line 21 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 23 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
#line 21 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 23 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
@@ -132,64 +137,24 @@ WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(@">
$(function () {
var $DOM = $('#PendingTimeoutMinutes');
var $DOMAjaxSave = $DOM.next('.ajaxSave');
$DOM
.watermark('Minutes')
.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 = { PendingTimeoutMinutes: parseInt($DOM.val()) };
if (data.PendingTimeoutMinutes <= 0) {
alert('Pending Timeout must be greater than zero');
$ajaxLoading.hide();
return;
} else {
$.ajax({
url: '");
$(function () {
document.DiscoFunctions.PropertyChangeHelper(
$('#PendingTimeoutMinutes'),
'Pending Timeout',
'");
#line 48 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 30 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Url.Action(MVC.API.Enrolment.PendingTimeoutMinutes()));
#line default
#line hidden
WriteLiteral(@"',
dataType: 'json',
method: 'POST',
data: data,
success: function (d) {
if (d == 'OK') {
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
} else {
$ajaxLoading.hide();
alert('Unable to update pending timeout: ' + d);
}
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to update pending timeout: ' + textStatus);
$ajaxLoading.hide();
}
});
}
});
});
</script>
");
WriteLiteral("\',\r\n \'PendingTimeoutMinutes\'\r\n " +
" );\r\n });\r\n </script>\r\n");
#line 69 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 35 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
}
else
{
@@ -198,14 +163,14 @@ WriteLiteral(@"',
#line default
#line hidden
#line 72 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 38 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(TimeSpan.FromMinutes(Model.PendingTimeoutMinutes));
#line default
#line hidden
#line 72 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 38 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
}
@@ -235,16 +200,20 @@ 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>\r\n Username:\r\n </th>\r\n <td>\r\n");
"th");
WriteLiteral(" width=\"130\"");
WriteLiteral(">\r\n Username:\r\n </th>\r\n <td>\r\n");
#line 94 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 60 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line default
#line hidden
#line 94 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 60 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
if (canConfig)
{
@@ -252,42 +221,42 @@ WriteLiteral(">\r\n <h2>Apple Mac Secure Enroll</h2>\r\n <table>\r\n
#line default
#line hidden
#line 96 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 62 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Html.TextBoxFor(model => model.MacSshUsername));
#line default
#line hidden
#line 96 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 62 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line default
#line hidden
#line 97 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 63 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
#line 97 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 63 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line default
#line hidden
#line 98 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 64 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
#line 98 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 64 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
@@ -297,58 +266,23 @@ WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
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: '");
WriteLiteral(">\r\n $(function () {\r\n document." +
"DiscoFunctions.PropertyChangeHelper(\r\n $(\'#MacSsh" +
"Username\'),\r\n \'Username\',\r\n " +
" \'");
#line 119 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Url.Action(MVC.API.Bootstrapper.MacSshUsername()));
#line 70 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Url.Action(MVC.API.Enrolment.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();
}
});
});
});
</script>
");
WriteLiteral("\',\r\n \'MacSshUsername\'\r\n " +
" );\r\n });\r\n </script>\r\n");
#line 138 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 75 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
}
else
{
@@ -365,7 +299,7 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">&lt;None Specified&gt;</span>\r\n");
#line 144 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 81 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
}
else
{
@@ -374,14 +308,14 @@ WriteLiteral(">&lt;None Specified&gt;</span>\r\n");
#line default
#line hidden
#line 147 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 84 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Model.MacSshUsername);
#line default
#line hidden
#line 147 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 84 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
}
}
@@ -389,17 +323,20 @@ WriteLiteral(">&lt;None Specified&gt;</span>\r\n");
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n\r\n <tr>\r\n <th>\r\n " +
" Password:\r\n </th>\r\n <td>\r\n");
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 158 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 95 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line default
#line hidden
#line 158 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 95 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
if (canConfig)
{
@@ -415,34 +352,34 @@ WriteLiteral(" type=\"password\"");
WriteLiteral(" />\r\n");
#line 161 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 98 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line default
#line hidden
#line 161 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 98 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
#line 161 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 98 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line default
#line hidden
#line 162 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 99 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
#line 162 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 99 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
@@ -452,58 +389,23 @@ WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
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: '");
WriteLiteral(">\r\n $(function () {\r\n document." +
"DiscoFunctions.PropertyChangeHelper(\r\n $(\'#MacSsh" +
"Password\'),\r\n \'Password\',\r\n " +
" \'");
#line 183 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Url.Action(MVC.API.Bootstrapper.MacSshPassword()));
#line 105 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Url.Action(MVC.API.Enrolment.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();
}
});
});
});
</script>
");
WriteLiteral("\',\r\n \'MacSshPassword\'\r\n " +
" );\r\n });\r\n </script>\r\n");
#line 202 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 110 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
}
else
{
@@ -518,7 +420,7 @@ WriteLiteral("********");
WriteLiteral("\r\n");
#line 206 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 114 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
}
@@ -587,7 +489,7 @@ WriteLiteral(">&lt;script&gt;</span>\r\n tag embedded on the
"\r\n</div>\r\n");
#line 228 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 136 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
if (canShowStatus && Authorization.Has(Claims.Config.Logging.Show))
{
@@ -597,13 +499,13 @@ WriteLiteral(">&lt;script&gt;</span>\r\n tag embedded on the
WriteLiteral(" <h2>Live Enrolment Logging</h2>\r\n");
#line 231 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 139 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line default
#line hidden
#line 231 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 139 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Html.Partial(MVC.Config.Shared.Views.LogEvents, new Disco.Web.Areas.Config.Models.Shared.LogEventsModel()
{
IsLive = true,
@@ -617,7 +519,7 @@ Write(Html.Partial(MVC.Config.Shared.Views.LogEvents, new Disco.Web.Areas.Config
#line default
#line hidden
#line 238 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 146 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
}
@@ -631,13 +533,13 @@ WriteLiteral(" class=\"actionBar\"");
WriteLiteral(">\r\n");
#line 241 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 149 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line default
#line hidden
#line 241 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 149 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
if (Authorization.Has(Claims.Config.Enrolment.DownloadBootstrapper))
{
@@ -645,14 +547,14 @@ WriteLiteral(">\r\n");
#line default
#line hidden
#line 243 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 151 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Html.ActionLinkButton("Download Bootstrapper", MVC.Services.Client.Bootstrapper()));
#line default
#line hidden
#line 243 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 151 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
}
@@ -662,7 +564,7 @@ WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 245 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 153 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
if (canShowStatus)
{
@@ -670,14 +572,14 @@ WriteLiteral(" ");
#line default
#line hidden
#line 247 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 155 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
Write(Html.ActionLinkButton("Enrolment Status", MVC.Config.Enrolment.Status()));
#line default
#line hidden
#line 247 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
#line 155 "..\..\Areas\Config\Views\Enrolment\Index.cshtml"
}
@@ -8,7 +8,6 @@
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-Isotope");
}
<div id="enrolStatus" data-defaultdeviceprofileid="@Model.DefaultDeviceProfileId">
@Html.AntiForgeryToken()
<div id="noSessions" data-bind="visible: noSessions">
<h2>No enrolment sessions today</h2>
</div>
@@ -31,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.Enrolment.ResolveSessionPending(), FormMethod.Post))
@using (Html.BeginForm(MVC.API.Enrolment.ResolveSessionPending()))
{
<code data-bind="text: pendingIdentifier"></code>
@Html.AntiForgeryToken();
@@ -352,6 +351,9 @@
url: '@(Url.Action(MVC.API.DeviceModel.Index()))',
dataType: 'json',
type: 'POST',
data: {
'__RequestVerificationToken': document.body.dataset.antiforgery
},
success: init_loadedDeviceModels,
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to retrieve device models: ' + errorThrown);
@@ -373,7 +375,7 @@
End: null,
ModuleId: 50,
Take: 2000,
'__RequestVerificationToken': host.find('input[name="__RequestVerificationToken"]').val()
'__RequestVerificationToken': document.body.dataset.antiforgery
};
$.ajax({
url: '@(Url.Action(MVC.API.Logging.RetrieveEvents()))',
@@ -71,18 +71,7 @@ WriteLiteral(" data-defaultdeviceprofileid=\"");
#line hidden
WriteLiteral("\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 11 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Html.AntiForgeryToken());
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(">\r\n <div");
WriteLiteral(" id=\"noSessions\"");
@@ -182,14 +171,14 @@ WriteLiteral(" data-bind=\"visible: isPending\"");
WriteLiteral(">\r\n");
#line 34 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 33 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line default
#line hidden
#line 34 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
using (Html.BeginForm(MVC.API.Enrolment.ResolveSessionPending(), FormMethod.Post))
#line 33 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
using (Html.BeginForm(MVC.API.Enrolment.ResolveSessionPending()))
{
@@ -202,20 +191,20 @@ WriteLiteral(" data-bind=\"text: pendingIdentifier\"");
WriteLiteral("></code>\r\n");
#line 37 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 36 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line default
#line hidden
#line 37 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 36 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Html.AntiForgeryToken());
#line default
#line hidden
#line 37 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 36 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
;
@@ -245,13 +234,13 @@ WriteLiteral(" data-bind=\"value: deviceProfileId\"");
WriteLiteral(">\r\n");
#line 43 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 42 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line default
#line hidden
#line 43 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 42 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
foreach (var deviceProfile in Model.DeviceProfiles)
{
@@ -260,20 +249,20 @@ WriteLiteral(">\r\n");
#line hidden
WriteLiteral(" <option");
WriteAttribute("value", Tuple.Create(" value=\"", 2814), Tuple.Create("\"", 2839)
WriteAttribute("value", Tuple.Create(" value=\"", 2767), Tuple.Create("\"", 2792)
#line 45 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
, Tuple.Create(Tuple.Create("", 2822), Tuple.Create<System.Object, System.Int32>(deviceProfile.Id
#line 44 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
, Tuple.Create(Tuple.Create("", 2775), Tuple.Create<System.Object, System.Int32>(deviceProfile.Id
#line default
#line hidden
, 2822), false)
, 2775), false)
);
WriteLiteral(">");
#line 45 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 44 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(deviceProfile.Name);
@@ -282,7 +271,7 @@ WriteLiteral(">");
WriteLiteral(" (");
#line 45 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 44 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(deviceProfile.Id);
@@ -291,7 +280,7 @@ WriteLiteral(" (");
WriteLiteral(")</option>\r\n");
#line 46 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 45 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
}
@@ -301,7 +290,7 @@ WriteLiteral(" </select>\r\n <
" </div>\r\n");
#line 50 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 49 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
if (Model.DeviceBatches.Count != 0)
{
@@ -326,13 +315,13 @@ WriteLiteral(" value=\"\"");
WriteLiteral(" selected>&lt;None&gt;</option>\r\n");
#line 57 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 56 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line default
#line hidden
#line 57 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 56 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
foreach (var deviceBatch in Model.DeviceBatches)
{
@@ -341,20 +330,20 @@ WriteLiteral(" selected>&lt;None&gt;</option>\r\n");
#line hidden
WriteLiteral(" <option");
WriteAttribute("value", Tuple.Create(" value=\"", 3596), Tuple.Create("\"", 3619)
WriteAttribute("value", Tuple.Create(" value=\"", 3549), Tuple.Create("\"", 3572)
#line 59 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
, Tuple.Create(Tuple.Create("", 3604), Tuple.Create<System.Object, System.Int32>(deviceBatch.Id
#line 58 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
, Tuple.Create(Tuple.Create("", 3557), Tuple.Create<System.Object, System.Int32>(deviceBatch.Id
#line default
#line hidden
, 3604), false)
, 3557), false)
);
WriteLiteral(">");
#line 59 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 58 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(deviceBatch.Name);
@@ -363,7 +352,7 @@ WriteLiteral(">");
WriteLiteral(" (");
#line 59 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 58 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(deviceBatch.Id);
@@ -372,7 +361,7 @@ WriteLiteral(" (");
WriteLiteral(")</option>\r\n");
#line 60 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 59 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
}
@@ -382,7 +371,7 @@ WriteLiteral(" </select>\r\n
" </div>\r\n");
#line 64 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 63 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
}
@@ -417,7 +406,7 @@ WriteLiteral(" class=\"button\"");
WriteLiteral(">Reject</button>\r\n </div>\r\n");
#line 70 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 69 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
}
@@ -596,7 +585,7 @@ WriteLiteral(@">
var deviceBaseUrl = '");
#line 149 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 148 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Url.Action(MVC.Device.Show()));
@@ -605,7 +594,7 @@ WriteLiteral(@">
WriteLiteral("/\'\r\n var deviceModelImageUrl = \'");
#line 150 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 149 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Url.Action(MVC.API.DeviceModel.Image()));
@@ -614,7 +603,7 @@ WriteLiteral("/\'\r\n var deviceModelImageUrl = \'");
WriteLiteral("/\'\r\n var iconWarningUrl = \'url(");
#line 151 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 150 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Links.ClientSource.Style.Images.Status.warning32_png);
@@ -623,7 +612,7 @@ WriteLiteral("/\'\r\n var iconWarningUrl = \'url(");
WriteLiteral(")\';\r\n var iconErrorUrl = \'url(");
#line 152 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 151 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Links.ClientSource.Style.Images.Status.fail32_png);
@@ -750,7 +739,7 @@ WriteLiteral(")\';\r\n\r\n function pageViewModel() {\r\n var
"= new pageViewModel();\r\n $.ajax({\r\n url: \'");
#line 352 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 351 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Url.Action(MVC.API.DeviceModel.Index()));
@@ -759,6 +748,9 @@ WriteLiteral(")\';\r\n\r\n function pageViewModel() {\r\n var
WriteLiteral(@"',
dataType: 'json',
type: 'POST',
data: {
'__RequestVerificationToken': document.body.dataset.antiforgery
},
success: init_loadedDeviceModels,
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to retrieve device models: ' + errorThrown);
@@ -780,13 +772,13 @@ WriteLiteral(@"',
End: null,
ModuleId: 50,
Take: 2000,
'__RequestVerificationToken': host.find('input[name=""__RequestVerificationToken""]').val()
'__RequestVerificationToken': document.body.dataset.antiforgery
};
$.ajax({
url: '");
#line 379 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 381 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Url.Action(MVC.API.Logging.RetrieveEvents()));
@@ -825,7 +817,7 @@ WriteLiteral(@"',
$.connection.hub.qs = { LogModules: '");
#line 409 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 411 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Disco.Services.Devices.Enrolment.EnrolmentLog.Current.LiveLogGroupName);