Unified SignalR disconnected/error dialogs

Dialogs (with a refresh option) appear whenever the SignalR client
disconnects or encounters an error. Nonsensical error messages replaced.
Page refresh technique changed to allow for urls containing fragment
hashes.
This commit is contained in:
Gary Sharp
2014-09-11 17:21:39 +10:00
parent 4283b62803
commit b1575fa321
20 changed files with 427 additions and 351 deletions
@@ -38,7 +38,7 @@
<a target="_blank" href="#" data-bind="attr: { href: manuallyAssignUrl }, visible: $parent.sessionEnded">Manually Assign Page</a>
</div>
<div data-bind="visible: detected">
Document: <a target="_blank" href="#" data-bind="text: documentTemplate, attr: { href: documentTemplateUrl }"></a>
Document: <a target="_blank" href="#" data-bind="text: documentTemplate, attr: { href: documentTemplateUrl }"></a>
<br />
Target: <a target="_blank" href="#" data-bind="text: assignedData, attr: { href: assignedDataUrl }"></a>
</div>
@@ -307,15 +307,35 @@
logHub.client.receiveLog = parseLog
$.connection.hub.qs = { LogModules: '@(Disco.BI.DocumentTemplateBI.DocumentsLog.Current.LiveLogGroupName)' };
$.connection.hub.error(function (error) {
alert('Live-Log Error: ' + error);
});
$.connection.hub.error(onHubFailed);
$.connection.hub.start()
.done(function () { isLive = true; })
.fail(function (error) {
alert('Live-Log Connection Error: ' + error);
});
.fail(onHubFailed);
function onHubFailed(error) {
// Show Dialog Message
if ($('.disconnected-dialog').length == 0) {
$('<div>')
.addClass('dialog disconnected-dialog')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.dialog({
resizable: false,
title: 'Disconnected',
width: 400,
modal: true,
buttons: {
'Refresh Now': function () {
$(this).dialog('option', 'buttons', null);
window.location.reload(true);
},
'Close': function () {
$(this).dialog('destroy');
}
}
});
}
}
}
init();
});
@@ -157,7 +157,7 @@ WriteLiteral(">\r\n Document: <a");
WriteLiteral(" target=\"_blank\"");
WriteLiteral(" href=\"#\"");
WriteLiteral(" href=\"#\"");
WriteLiteral(" data-bind=\"text: documentTemplate, attr: { href: documentTemplateUrl }\"");
@@ -471,21 +471,26 @@ WriteLiteral(@"',
#line default
#line hidden
WriteLiteral(@"' };
$.connection.hub.error(function (error) {
alert('Live-Log Error: ' + error);
});
$.connection.hub.start()
.done(function () { isLive = true; })
.fail(function (error) {
alert('Live-Log Connection Error: ' + error);
});
}
init();
});
</script>
");
WriteLiteral("\' };\r\n $.connection.hub.error(onHubFailed);\r\n\r\n $.connectio" +
"n.hub.start()\r\n .done(function () { isLive = true; })\r\n " +
" .fail(onHubFailed);\r\n\r\n function onHubFailed(error) {\r\n " +
" // Show Dialog Message\r\n if ($(\'.disconnected-dialog\').le" +
"ngth == 0) {\r\n $(\'<div>\')\r\n .addClass(" +
"\'dialog disconnected-dialog\')\r\n .html(\'<h3><span class=\"f" +
"a-stack fa-lg\"><i class=\"fa fa-wifi fa-stack-1x\"></i><i class=\"fa fa-ban fa-stac" +
"k-2x error\"></i></span>Disconnected from the Disco ICT Server</h3><div>This page" +
" is not receiving live updates. Please ensure you are connected to the server, t" +
"hen refresh this page to enable features.</div>\')\r\n .dial" +
"og({\r\n resizable: false,\r\n " +
" title: \'Disconnected\',\r\n width: 400,\r\n " +
" modal: true,\r\n buttons: {\r\n " +
" \'Refresh Now\': function () {\r\n " +
" $(this).dialog(\'option\', \'buttons\', null);\r\n " +
" window.location.reload(true);\r\n },\r\n " +
" \'Close\': function () {\r\n " +
" $(this).dialog(\'destroy\');\r\n }\r\n " +
" }\r\n });\r\n }\r\n }" +
"\r\n }\r\n init();\r\n });\r\n</script>\r\n");
}
}
@@ -286,7 +286,7 @@
dialog.dialog("option", "buttons", null);
// Refresh Page
window.location.href = window.location.href;
window.location.reload(true);
}
function saveChanges() {
@@ -1012,21 +1012,21 @@ WriteLiteral(" <script>\r\n
"el() {\r\n dialog.dialog(\"disable\")" +
";\r\n dialog.dialog(\"option\", \"butt" +
"ons\", null);\r\n\r\n // Refresh Page\r" +
"\n window.location.href = window.l" +
"ocation.href;\r\n }\r\n\r\n " +
" function saveChanges() {\r\n " +
" var form = dialog.find(\'form\');\r\n\r\n " +
" $(\'input.jobType:unchecked\').each(function () {\r\n " +
" $(\'#SubTypes_\' + $(this).val()).fi" +
"nd(\'input\').prop(\'checked\', false);\r\n " +
" });\r\n\r\n form.submit();\r\n\r\n " +
" dialog.dialog(\"disable\");\r\n " +
" dialog.dialog(\"option\", \"buttons\", null" +
");\r\n }\r\n\r\n " +
" $(function () {\r\n " +
" $(\'#Config_DocumentTemplates_JobSubTypes_Update\').click(showDialog);\r\n " +
" });\r\n\r\n " +
" })();\r\n </script>\r\n");
"\n window.location.reload(true);\r\n" +
" }\r\n\r\n " +
" function saveChanges() {\r\n " +
" var form = dialog.find(\'form\');\r\n\r\n " +
" $(\'input.jobType:unchecked\').each(function () {\r\n " +
" $(\'#SubTypes_\' + $(this).val()).find(\'input\').pro" +
"p(\'checked\', false);\r\n });\r\n\r\n " +
" form.submit();\r\n\r\n " +
" dialog.dialog(\"disable\");\r\n " +
" dialog.dialog(\"option\", \"buttons\", null);\r\n " +
" }\r\n\r\n " +
" $(function () {\r\n $(\'#Config_Do" +
"cumentTemplates_JobSubTypes_Update\').click(showDialog);\r\n " +
" });\r\n\r\n })();\r\n " +
" </script>\r\n");
#line 311 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
@@ -1959,16 +1959,16 @@ WriteLiteral(" id=\"dialogBulkGenerate\"");
WriteLiteral(" class=\"hiddenDialog\"");
WriteAttribute("title", Tuple.Create(" title=\"", 38168), Tuple.Create("\"", 38219)
, Tuple.Create(Tuple.Create("", 38176), Tuple.Create("Bulk", 38176), true)
, Tuple.Create(Tuple.Create(" ", 38180), Tuple.Create("Generate:", 38181), true)
WriteAttribute("title", Tuple.Create(" title=\"", 38153), Tuple.Create("\"", 38204)
, Tuple.Create(Tuple.Create("", 38161), Tuple.Create("Bulk", 38161), true)
, Tuple.Create(Tuple.Create(" ", 38165), Tuple.Create("Generate:", 38166), true)
#line 683 "..\..\Areas\Config\Views\DocumentTemplate\Show.cshtml"
, Tuple.Create(Tuple.Create(" ", 38190), Tuple.Create<System.Object, System.Int32>(Model.DocumentTemplate.Id
, Tuple.Create(Tuple.Create(" ", 38175), Tuple.Create<System.Object, System.Int32>(Model.DocumentTemplate.Id
#line default
#line hidden
, 38191), false)
, 38176), false)
);
WriteLiteral(">\r\n <div");
@@ -1,6 +1,6 @@
@{
Authorization.Require(Claims.Config.Enrolment.ShowStatus);
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Enrolment", MVC.Config.Enrolment.Index(), "Status");
Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
@@ -8,101 +8,68 @@
}
<div id="enrolStatus">
<div id="noSessions" data-bind="visible: noSessions">
<h2>
No enrolment 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">
<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">
<h3>
<span data-bind="text: title"></span><span class="details" data-bind="text: '(' + deviceModelDescription() + ')'">
</span>
<span data-bind="text: title"></span>
<span class="details" data-bind="text: '(' + deviceModelDescription() + ')'"></span>
</h3>
<p class="sessionStart" data-bind="text: startTime">
</p>
<p class="sessionStatus" data-bind="text: progressStatus">
</p>
<div data-bind="visible: !sessionEnded(), progressValue: progressValue" class="sessionProgress">
</div>
<p class="sessionStart" data-bind="text: startTime"></p>
<p class="sessionStatus" data-bind="text: progressStatus"></p>
<div data-bind="visible: !sessionEnded(), progressValue: progressValue" class="sessionProgress"></div>
</div>
</div>
<div id="dialogSession" data-bind="with: currentSession">
<div class="sessionHeader clearfix" data-bind="style: {backgroundImage: deviceModelImageUrl}">
<h2>
<a href="" target="_blank" data-bind="text: title, attr: {href: deviceUrl}"></a>
</h2>
<h3 data-bind="text: deviceModelDescription">
</h3>
<div class="sessionHeader clearfix" data-bind="style: { backgroundImage: deviceModelImageUrl }">
<h2><a href="" target="_blank" data-bind="text: title, attr: { href: deviceUrl }"></a></h2>
<h3 data-bind="text: deviceModelDescription"></h3>
<table data-bind="if: sessionDeviceInfo">
<tr>
<th style="width: 128px">
Computer Name:
</th>
<td data-bind="text: sessionDeviceInfo().Arguments[3]">
</td>
<th style="width: 128px">Computer Name:</th>
<td data-bind="text: sessionDeviceInfo().Arguments[3]"></td>
</tr>
<tr>
<th style="width: 128px">
UUID:
</th>
<td data-bind="text: sessionDeviceInfo().Arguments[2]">
</td>
<th style="width: 128px">UUID:</th>
<td data-bind="text: sessionDeviceInfo().Arguments[2]"></td>
</tr>
<tr>
<th style="width: 128px">
LAN Mac Address:
</th>
<td data-bind="text: sessionDeviceInfo().Arguments[4]">
</td>
<th style="width: 128px">LAN Mac Address:</th>
<td data-bind="text: sessionDeviceInfo().Arguments[4]"></td>
</tr>
<tr>
<th style="width: 128px">
WLAN Mac Address:
</th>
<td data-bind="text: sessionDeviceInfo().Arguments[5]">
</td>
<th style="width: 128px">WLAN Mac Address:</th>
<td data-bind="text: sessionDeviceInfo().Arguments[5]"></td>
</tr>
<tr>
<th style="width: 128px">
Manufacturer/Model:
</th>
<td data-bind="text: sessionDeviceInfo().Arguments[6] + ' ' + sessionDeviceInfo().Arguments[7]">
</td>
<th style="width: 128px">Manufacturer/Model:</th>
<td data-bind="text: sessionDeviceInfo().Arguments[6] + ' ' + sessionDeviceInfo().Arguments[7]"></td>
</tr>
</table>
</div>
<div class="sessionProgress clearfix">
<p class="sessionStart" data-bind="text: startTime">
</p>
<p class="sessionStatus" data-bind="text: progressStatus">
</p>
<div data-bind="visible: !sessionEnded(), progressValue: progressValue">
</div>
<p class="sessionStart" data-bind="text: startTime"></p>
<p class="sessionStatus" data-bind="text: progressStatus"></p>
<div data-bind="visible: !sessionEnded(), progressValue: progressValue"></div>
</div>
<div class="sessionInfoContainer clearfix">
<div class="sessionInfoMessages">
<table class="logEventsViewport">
<thead>
<tr>
<th class="icon">
&nbsp;
</th>
<th class="message">
Message
</th>
<th class="icon">&nbsp;</th>
<th class="message">Message</th>
</tr>
</thead>
</table>
<div class="logEventsViewportContainer">
<div class="logEventsViewportNoLogs" data-bind="visible: messages().length == 0"
style="display: none">
No logs
</div>
<div class="logEventsViewportNoLogs" data-bind="visible: messages().length == 0" style="display: none">No logs</div>
<table class="logEventsViewport" data-bind="visible: messages().length > 0" style="display: none">
<tbody data-bind="foreach: messages">
<tr>
<td class="icon"><i class="fa" data-bind="css: { 'fa-info-circle': EventTypeSeverity == 0, 'fa-exclamation-triangle': EventTypeSeverity == 1, 'fa-exclamation-circle': EventTypeSeverity == 2 }"></i></td>
<td class="message" data-bind="text: FormattedMessage, attr: {title: EventTypeName}"></td>
<td class="message" data-bind="text: FormattedMessage, attr: { title: EventTypeName }"></td>
</tr>
</tbody>
</table>
@@ -360,15 +327,35 @@
logHub.client.receiveLog = parseLog
$.connection.hub.qs = { LogModules: '@(Disco.BI.DeviceBI.EnrolmentLog.Current.LiveLogGroupName)' };
$.connection.hub.error(function (error) {
alert('Live-Log Error: ' + error);
});
$.connection.hub.error(onHubFailed);
$.connection.hub.start()
.done(function () { isLive = true; })
.fail(function (error) {
alert('Live-Log Connection Error: ' + error);
});
.fail(onHubFailed);
function onHubFailed(error) {
// Show Dialog Message
if ($('.disconnected-dialog').length == 0) {
$('<div>')
.addClass('dialog disconnected-dialog')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.dialog({
resizable: false,
title: 'Disconnected',
width: 400,
modal: true,
buttons: {
'Refresh Now': function () {
$(this).dialog('option', 'buttons', null);
window.location.reload(true);
},
'Close': function () {
$(this).dialog('destroy');
}
}
});
}
}
}
init();
});
@@ -48,7 +48,7 @@ namespace Disco.Web.Areas.Config.Views.Enrolment
#line 1 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Authorization.Require(Claims.Config.Enrolment.ShowStatus);
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Enrolment", MVC.Config.Enrolment.Index(), "Status");
Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
@@ -67,51 +67,50 @@ WriteLiteral(" id=\"noSessions\"");
WriteLiteral(" data-bind=\"visible: noSessions\"");
WriteLiteral(">\r\n <h2>\r\n No enrolment sessions today</h2>\r\n </div>\r\n <d" +
"iv");
WriteLiteral(">\r\n <h2>No enrolment sessions today</h2>\r\n </div>\r\n <div");
WriteLiteral(" id=\"sessions\"");
WriteLiteral(" data-bind=\"visible: !noSessions(), foreach: {data: sessions, afterRender: sessio" +
"nRendered, afterAdd: sessionAdded}\"");
WriteLiteral(" data-bind=\"visible: !noSessions(), foreach: { data: sessions, afterRender: sessi" +
"onRendered, afterAdd: sessionAdded }\"");
WriteLiteral("\r\n style=\"display: none\"");
WriteLiteral(" style=\"display: none\"");
WriteLiteral(">\r\n <div");
WriteLiteral(" class=\"session\"");
WriteLiteral(" data-bind=\"style: {backgroundImage: deviceModelImageUrl}, click: select\"");
WriteLiteral(" data-bind=\"style: { backgroundImage: deviceModelImageUrl }, click: select\"");
WriteLiteral(">\r\n <h3>\r\n <span");
WriteLiteral(" data-bind=\"text: title\"");
WriteLiteral("></span><span");
WriteLiteral("></span>\r\n <span");
WriteLiteral(" class=\"details\"");
WriteLiteral(" data-bind=\"text: \'(\' + deviceModelDescription() + \')\'\"");
WriteLiteral(">\r\n </span>\r\n </h3>\r\n <p");
WriteLiteral("></span>\r\n </h3>\r\n <p");
WriteLiteral(" class=\"sessionStart\"");
WriteLiteral(" data-bind=\"text: startTime\"");
WriteLiteral(">\r\n </p>\r\n <p");
WriteLiteral("></p>\r\n <p");
WriteLiteral(" class=\"sessionStatus\"");
WriteLiteral(" data-bind=\"text: progressStatus\"");
WriteLiteral(">\r\n </p>\r\n <div");
WriteLiteral("></p>\r\n <div");
WriteLiteral(" data-bind=\"visible: !sessionEnded(), progressValue: progressValue\"");
WriteLiteral(" class=\"sessionProgress\"");
WriteLiteral(">\r\n </div>\r\n </div>\r\n </div>\r\n <div");
WriteLiteral("></div>\r\n </div>\r\n </div>\r\n <div");
WriteLiteral(" id=\"dialogSession\"");
@@ -121,21 +120,21 @@ WriteLiteral(">\r\n <div");
WriteLiteral(" class=\"sessionHeader clearfix\"");
WriteLiteral(" data-bind=\"style: {backgroundImage: deviceModelImageUrl}\"");
WriteLiteral(" data-bind=\"style: { backgroundImage: deviceModelImageUrl }\"");
WriteLiteral(">\r\n <h2>\r\n <a");
WriteLiteral(">\r\n <h2><a");
WriteLiteral(" href=\"\"");
WriteLiteral(" target=\"_blank\"");
WriteLiteral(" data-bind=\"text: title, attr: {href: deviceUrl}\"");
WriteLiteral(" data-bind=\"text: title, attr: { href: deviceUrl }\"");
WriteLiteral("></a>\r\n </h2>\r\n <h3");
WriteLiteral("></a></h2>\r\n <h3");
WriteLiteral(" data-bind=\"text: deviceModelDescription\"");
WriteLiteral(">\r\n </h3>\r\n <table");
WriteLiteral("></h3>\r\n <table");
WriteLiteral(" data-bind=\"if: sessionDeviceInfo\"");
@@ -143,54 +142,45 @@ WriteLiteral(">\r\n <tr>\r\n <th");
WriteLiteral(" style=\"width: 128px\"");
WriteLiteral(">\r\n Computer Name:\r\n </th>\r\n " +
" <td");
WriteLiteral(">Computer Name:</th>\r\n <td");
WriteLiteral(" data-bind=\"text: sessionDeviceInfo().Arguments[3]\"");
WriteLiteral(">\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
" <th");
WriteLiteral("></td>\r\n </tr>\r\n <tr>\r\n <th");
WriteLiteral(" style=\"width: 128px\"");
WriteLiteral(">\r\n UUID:\r\n </th>\r\n " +
"<td");
WriteLiteral(">UUID:</th>\r\n <td");
WriteLiteral(" data-bind=\"text: sessionDeviceInfo().Arguments[2]\"");
WriteLiteral(">\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
" <th");
WriteLiteral("></td>\r\n </tr>\r\n <tr>\r\n <th");
WriteLiteral(" style=\"width: 128px\"");
WriteLiteral(">\r\n LAN Mac Address:\r\n </th>\r\n " +
" <td");
WriteLiteral(">LAN Mac Address:</th>\r\n <td");
WriteLiteral(" data-bind=\"text: sessionDeviceInfo().Arguments[4]\"");
WriteLiteral(">\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
" <th");
WriteLiteral("></td>\r\n </tr>\r\n <tr>\r\n <th");
WriteLiteral(" style=\"width: 128px\"");
WriteLiteral(">\r\n WLAN Mac Address:\r\n </th>\r\n " +
" <td");
WriteLiteral(">WLAN Mac Address:</th>\r\n <td");
WriteLiteral(" data-bind=\"text: sessionDeviceInfo().Arguments[5]\"");
WriteLiteral(">\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
" <th");
WriteLiteral("></td>\r\n </tr>\r\n <tr>\r\n <th");
WriteLiteral(" style=\"width: 128px\"");
WriteLiteral(">\r\n Manufacturer/Model:\r\n </th>\r\n " +
" <td");
WriteLiteral(">Manufacturer/Model:</th>\r\n <td");
WriteLiteral(" data-bind=\"text: sessionDeviceInfo().Arguments[6] + \' \' + sessionDeviceInfo().Ar" +
"guments[7]\"");
WriteLiteral(">\r\n </td>\r\n </tr>\r\n </table>\r\n " +
" </div>\r\n <div");
WriteLiteral("></td>\r\n </tr>\r\n </table>\r\n </div>\r\n <div" +
"");
WriteLiteral(" class=\"sessionProgress clearfix\"");
@@ -200,17 +190,17 @@ WriteLiteral(" class=\"sessionStart\"");
WriteLiteral(" data-bind=\"text: startTime\"");
WriteLiteral(">\r\n </p>\r\n <p");
WriteLiteral("></p>\r\n <p");
WriteLiteral(" class=\"sessionStatus\"");
WriteLiteral(" data-bind=\"text: progressStatus\"");
WriteLiteral(">\r\n </p>\r\n <div");
WriteLiteral("></p>\r\n <div");
WriteLiteral(" data-bind=\"visible: !sessionEnded(), progressValue: progressValue\"");
WriteLiteral(">\r\n </div>\r\n </div>\r\n <div");
WriteLiteral("></div>\r\n </div>\r\n <div");
WriteLiteral(" class=\"sessionInfoContainer clearfix\"");
@@ -227,14 +217,12 @@ WriteLiteral(">\r\n <thead>\r\n <tr>\r
WriteLiteral(" class=\"icon\"");
WriteLiteral(">\r\n &nbsp;\r\n </th>\r\n " +
" <th");
WriteLiteral(">&nbsp;</th>\r\n <th");
WriteLiteral(" class=\"message\"");
WriteLiteral(">\r\n Message\r\n </th>\r\n " +
" </tr>\r\n </thead>\r\n </tab" +
"le>\r\n <div");
WriteLiteral(">Message</th>\r\n </tr>\r\n </thead>\r\n " +
" </table>\r\n <div");
WriteLiteral(" class=\"logEventsViewportContainer\"");
@@ -244,10 +232,9 @@ WriteLiteral(" class=\"logEventsViewportNoLogs\"");
WriteLiteral(" data-bind=\"visible: messages().length == 0\"");
WriteLiteral("\r\n style=\"display: none\"");
WriteLiteral(" style=\"display: none\"");
WriteLiteral(">\r\n No logs\r\n </div>\r\n " +
" <table");
WriteLiteral(">No logs</div>\r\n <table");
WriteLiteral(" class=\"logEventsViewport\"");
@@ -275,7 +262,7 @@ WriteLiteral("></i></td>\r\n <td");
WriteLiteral(" class=\"message\"");
WriteLiteral(" data-bind=\"text: FormattedMessage, attr: {title: EventTypeName}\"");
WriteLiteral(" data-bind=\"text: FormattedMessage, attr: { title: EventTypeName }\"");
WriteLiteral("></td>\r\n </tr>\r\n </tbody>\r\n " +
" </table>\r\n </div>\r\n </div>\r\n " +
@@ -323,7 +310,7 @@ WriteLiteral(@">
var deviceBaseUrl = '");
#line 140 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 107 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Url.Action(MVC.Device.Show()));
@@ -332,7 +319,7 @@ WriteLiteral(@">
WriteLiteral("/\'\r\n var deviceModelImageUrl = \'");
#line 141 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 108 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Url.Action(MVC.API.DeviceModel.Image()));
@@ -341,7 +328,7 @@ WriteLiteral("/\'\r\n var deviceModelImageUrl = \'");
WriteLiteral("/\'\r\n var iconWarningUrl = \'url(");
#line 142 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 109 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Links.ClientSource.Style.Images.Status.warning32_png);
@@ -350,7 +337,7 @@ WriteLiteral("/\'\r\n var iconWarningUrl = \'url(");
WriteLiteral(")\';\r\n var iconErrorUrl = \'url(");
#line 143 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 110 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Links.ClientSource.Style.Images.Status.fail32_png);
@@ -453,7 +440,7 @@ WriteLiteral(")\';\r\n\r\n function pageViewModel() {\r\n var
" vm = new pageViewModel();\r\n $.ajax({\r\n url: \'");
#line 307 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 274 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Url.Action(MVC.API.DeviceModel.Index()));
@@ -487,7 +474,7 @@ WriteLiteral(@"',
url: '");
#line 332 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 299 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Url.Action(MVC.API.Logging.RetrieveEvents()));
@@ -526,27 +513,32 @@ WriteLiteral(@"',
$.connection.hub.qs = { LogModules: '");
#line 362 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
#line 329 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Disco.BI.DeviceBI.EnrolmentLog.Current.LiveLogGroupName);
#line default
#line hidden
WriteLiteral(@"' };
$.connection.hub.error(function (error) {
alert('Live-Log Error: ' + error);
});
$.connection.hub.start()
.done(function () { isLive = true; })
.fail(function (error) {
alert('Live-Log Connection Error: ' + error);
});
}
init();
});
</script>
");
WriteLiteral("\' };\r\n $.connection.hub.error(onHubFailed);\r\n\r\n $.connectio" +
"n.hub.start()\r\n .done(function () { isLive = true; })\r\n " +
" .fail(onHubFailed);\r\n\r\n function onHubFailed(error) {\r\n " +
" // Show Dialog Message\r\n if ($(\'.disconnected-dialog\').le" +
"ngth == 0) {\r\n $(\'<div>\')\r\n .addClass(" +
"\'dialog disconnected-dialog\')\r\n .html(\'<h3><span class=\"f" +
"a-stack fa-lg\"><i class=\"fa fa-wifi fa-stack-1x\"></i><i class=\"fa fa-ban fa-stac" +
"k-2x error\"></i></span>Disconnected from the Disco ICT Server</h3><div>This page" +
" is not receiving live updates. Please ensure you are connected to the server, t" +
"hen refresh this page to enable features.</div>\')\r\n .dial" +
"og({\r\n resizable: false,\r\n " +
" title: \'Disconnected\',\r\n width: 400,\r\n " +
" modal: true,\r\n buttons: {\r\n " +
" \'Refresh Now\': function () {\r\n " +
" $(this).dialog(\'option\', \'buttons\', null);\r\n " +
" window.location.reload(true);\r\n },\r\n " +
" \'Close\': function () {\r\n " +
" $(this).dialog(\'destroy\');\r\n }\r\n " +
" }\r\n });\r\n }\r\n }" +
"\r\n }\r\n init();\r\n });\r\n</script>\r\n");
}
}
@@ -120,13 +120,33 @@
};
$.connection.hub.qs = {LogModules: logModuleLiveGroupName};
$.connection.hub.error(function(error){
alert('Live-Log Error: '+error);
});
$.connection.hub.error(onHubFailed);
$.connection.hub.start().fail(function(error){
alert('Live-Log Connection Error: '+error);
});
$.connection.hub.start().fail(onHubFailed);
function onHubFailed(error) {
// Show Dialog Message
if ($('.disconnected-dialog').length == 0) {
$('<div>')
.addClass('dialog disconnected-dialog')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.dialog({
resizable: false,
title: 'Disconnected',
width: 400,
modal: true,
buttons: {
'Refresh Now': function () {
$(this).dialog('option', 'buttons', null);
window.location.reload(true);
},
'Close': function () {
$(this).dialog('destroy');
}
}
});
}
}
}
}
@@ -329,12 +329,29 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n
"ge.UseDisplay) logsViewModel.EventLogs.unshift(message);\r\n " +
" if (liveEventReceivedFunction) liveEventReceivedFunction(message);\r\n " +
" };\r\n\r\n $.connection.hub.qs = {LogModules: logModule" +
"LiveGroupName};\r\n $.connection.hub.error(function(error){\r\n " +
" alert(\'Live-Log Error: \'+error);\r\n });\r" +
"\n\r\n $.connection.hub.start().fail(function(error){\r\n " +
" alert(\'Live-Log Connection Error: \'+error);\r\n " +
"});\r\n }\r\n }\r\n\r\n loadInitialData();\r\n " +
" });\r\n </script>\r\n</div>\r\n");
"LiveGroupName};\r\n $.connection.hub.error(onHubFailed);\r\n\r\n " +
" $.connection.hub.start().fail(onHubFailed);\r\n\r\n " +
" function onHubFailed(error) {\r\n // Show Dialog Messag" +
"e\r\n if ($(\'.disconnected-dialog\').length == 0) {\r\n " +
" $(\'<div>\')\r\n .addClass(\'dial" +
"og disconnected-dialog\')\r\n .html(\'<h3><span class" +
"=\"fa-stack fa-lg\"><i class=\"fa fa-wifi fa-stack-1x\"></i><i class=\"fa fa-ban fa-s" +
"tack-2x error\"></i></span>Disconnected from the Disco ICT Server</h3><div>This p" +
"age is not receiving live updates. Please ensure you are connected to the server" +
", then refresh this page to enable features.</div>\')\r\n " +
" .dialog({\r\n resizable: false,\r\n " +
" title: \'Disconnected\',\r\n " +
" width: 400,\r\n modal: true,\r\n " +
" buttons: {\r\n \'" +
"Refresh Now\': function () {\r\n $(this)" +
".dialog(\'option\', \'buttons\', null);\r\n " +
" window.location.reload(true);\r\n },\r\n " +
" \'Close\': function () {\r\n " +
" $(this).dialog(\'destroy\');\r\n " +
" }\r\n }\r\n " +
" });\r\n }\r\n }\r\n }\r\n" +
" }\r\n\r\n loadInitialData();\r\n });\r\n </script>\r\n</d" +
"iv>\r\n");
}
}
@@ -247,14 +247,34 @@
notificationsHub.client.updateTaskStatus = vm.Update;
$.connection.hub.qs = { TaskSessionId: sessionId };
$.connection.hub.error(function (error) {
alert('Live-Status Error: ' + error);
});
$.connection.hub.error(onHubFailed);
$.connection.hub.start()
.fail(function (error) {
alert('Live-Status Connection Error: ' + error);
});
.fail(onHubFailed);
}
function onHubFailed(error) {
// Show Dialog Message
if ($('.disconnected-dialog').length == 0) {
$('<div>')
.addClass('dialog disconnected-dialog')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.dialog({
resizable: false,
title: 'Disconnected',
width: 400,
modal: true,
buttons: {
'Refresh Now': function () {
$(this).dialog('option', 'buttons', null);
window.location.reload(true);
},
'Close': function () {
$(this).dialog('destroy');
}
}
});
}
}
});
@@ -281,11 +281,24 @@ WriteLiteral("\';\r\n\r\n var view = $(\'#Logging_Task_Status\');\r\n
"n.scheduledTaskNotifications;\r\n notificationsHub.client.initializeTas" +
"kStatus = vm.Initialize;\r\n notificationsHub.client.updateTaskStatus =" +
" vm.Update;\r\n\r\n $.connection.hub.qs = { TaskSessionId: sessionId };\r\n" +
" $.connection.hub.error(function (error) {\r\n alert(\'Li" +
"ve-Status Error: \' + error);\r\n });\r\n\r\n $.connection.hub.st" +
"art()\r\n .fail(function (error) {\r\n alert(\'Live" +
"-Status Connection Error: \' + error);\r\n });\r\n }\r\n\r\n });" +
"\r\n</script>\r\n");
" $.connection.hub.error(onHubFailed);\r\n\r\n $.connection.hub" +
".start()\r\n .fail(onHubFailed);\r\n }\r\n\r\n function onH" +
"ubFailed(error) {\r\n // Show Dialog Message\r\n if ($(\'.disco" +
"nnected-dialog\').length == 0) {\r\n $(\'<div>\')\r\n " +
" .addClass(\'dialog disconnected-dialog\')\r\n .html(\'<h3><span c" +
"lass=\"fa-stack fa-lg\"><i class=\"fa fa-wifi fa-stack-1x\"></i><i class=\"fa fa-ban " +
"fa-stack-2x error\"></i></span>Disconnected from the Disco ICT Server</h3><div>Th" +
"is page is not receiving live updates. Please ensure you are connected to the se" +
"rver, then refresh this page to enable features.</div>\')\r\n .d" +
"ialog({\r\n resizable: false,\r\n titl" +
"e: \'Disconnected\',\r\n width: 400,\r\n " +
" modal: true,\r\n buttons: {\r\n \'" +
"Refresh Now\': function () {\r\n $(this).dialog(\'opt" +
"ion\', \'buttons\', null);\r\n window.location.reload(" +
"true);\r\n },\r\n \'Close\': fun" +
"ction () {\r\n $(this).dialog(\'destroy\');\r\n " +
" }\r\n }\r\n });\r\n " +
" }\r\n }\r\n\r\n });\r\n</script>\r\n");
}
}
@@ -351,7 +351,7 @@
}
window.setTimeout(function () {
window.location.href = window.location.href;
window.location.reload(true);
}, 10000);
}
@@ -394,52 +394,51 @@ WriteLiteral("\', null, function (data) {\r\n\r\n var inProce
"\r\n $(\'body\').addClass(\'status-error\');\r\n $" +
".connection.hub.stop();\r\n } catch (e) {\r\n // I" +
"gnore\r\n }\r\n\r\n window.setTimeout(function () {\r\n " +
" window.location.href = window.location.href;\r\n }" +
", 10000);\r\n }\r\n\r\n // Helpers\r\n function rotateA" +
"rray(koArray, element) {\r\n var items = koArray();\r\n\r\n " +
" if (items.length <= 1)\r\n return 0;\r\n\r\n if " +
"(element.height() < (element.parent().height() - 30)) {\r\n\r\n i" +
"f (findUnsortedArrayTopIndex(items) !== 0)\r\n koArray.sort" +
"(sortFunction);\r\n\r\n // Don\'t rotate if small & sorted correct" +
"ly\r\n return;\r\n }\r\n\r\n // Move La" +
"st Item to Top\r\n var item = koArray.pop();\r\n koArr" +
"ay.unshift(item);\r\n }\r\n function removeItemFromArray(koArr" +
"ay, deviceSerialNumber) {\r\n var items = koArray();\r\n " +
" for (var i = 0; i < items.length; i++) {\r\n if (items[i].De" +
"viceSerialNumber == deviceSerialNumber) {\r\n koArray.splic" +
"e(i, 1);\r\n items = koArray();\r\n i-" +
"-;\r\n }\r\n }\r\n }\r\n functio" +
"n findUnsortedArrayTopIndex(items) {\r\n // Only one Item\r\n " +
" if (items.length <= 1)\r\n return 0;\r\n\r\n " +
" for (var i = 1; i < items.length; i++) {\r\n var s = sortFunct" +
"ion(items[i - 1], items[i]);\r\n if (s > 0)\r\n " +
" return i;\r\n }\r\n\r\n return 0;\r\n }\r\n" +
" function findSortedInsertIndex(koArray, heldDeviceItem) {\r\n " +
" var items = koArray();\r\n var startIndex = findUnsortedArra" +
"yTopIndex(items);\r\n for (var i = startIndex; i < items.length; i+" +
"+) {\r\n var s = sortFunction(heldDeviceItem, items[i]);\r\n " +
" if (s <= 0)\r\n return i;\r\n }" +
"\r\n if (startIndex !== 0) {\r\n for (var i = 0; i" +
" < startIndex; i++) {\r\n var s = sortFunction(heldDeviceIt" +
"em, items[i]);\r\n if (s <= 0)\r\n " +
" return i;\r\n }\r\n return startIndex;\r\n " +
" } else {\r\n return -1;\r\n }\r\n " +
" }\r\n function sortFunction(l, r) {\r\n return l.Devic" +
"eDescription.toLowerCase() == r.DeviceDescription.toLowerCase() ? 0 : (l.DeviceD" +
"escription.toLowerCase() < r.DeviceDescription.toLowerCase() ? -1 : 1)\r\n " +
" }\r\n function isInProcess(i) {\r\n return !i.ReadyFor" +
"Return && !i.WaitingForUserAction;\r\n }\r\n function isReadyF" +
"orReturn(i) {\r\n return i.ReadyForReturn && !i.WaitingForUserActio" +
"n;\r\n }\r\n function isWaitingForUserAction(i) {\r\n " +
" return i.WaitingForUserAction;\r\n }\r\n function getQuer" +
"yStringParameters() {\r\n\r\n if (window.location.search.length === 0" +
")\r\n return null;\r\n\r\n var params = {};\r\n " +
" window.location.search.substr(1).split(\"&\").forEach(function (pair) {\r\n" +
" if (pair === \"\") return;\r\n var parts = pa" +
"ir.split(\"=\");\r\n params[parts[0]] = parts[1] && decodeURIComp" +
"onent(parts[1].replace(/\\+/g, \" \"));\r\n });\r\n retur" +
"n params;\r\n }\r\n\r\n init();\r\n });\r\n </script>\r\n</b" +
"ody>\r\n</html>");
" window.location.reload(true);\r\n }, 10000);\r\n " +
" }\r\n\r\n // Helpers\r\n function rotateArray(koArray, e" +
"lement) {\r\n var items = koArray();\r\n\r\n if (items.l" +
"ength <= 1)\r\n return 0;\r\n\r\n if (element.height" +
"() < (element.parent().height() - 30)) {\r\n\r\n if (findUnsorted" +
"ArrayTopIndex(items) !== 0)\r\n koArray.sort(sortFunction);" +
"\r\n\r\n // Don\'t rotate if small & sorted correctly\r\n " +
" return;\r\n }\r\n\r\n // Move Last Item to Top\r" +
"\n var item = koArray.pop();\r\n koArray.unshift(item" +
");\r\n }\r\n function removeItemFromArray(koArray, deviceSeria" +
"lNumber) {\r\n var items = koArray();\r\n for (var i =" +
" 0; i < items.length; i++) {\r\n if (items[i].DeviceSerialNumbe" +
"r == deviceSerialNumber) {\r\n koArray.splice(i, 1);\r\n " +
" items = koArray();\r\n i--;\r\n " +
" }\r\n }\r\n }\r\n function findUnsortedA" +
"rrayTopIndex(items) {\r\n // Only one Item\r\n if (ite" +
"ms.length <= 1)\r\n return 0;\r\n\r\n for (var i = 1" +
"; i < items.length; i++) {\r\n var s = sortFunction(items[i - 1" +
"], items[i]);\r\n if (s > 0)\r\n return i;" +
"\r\n }\r\n\r\n return 0;\r\n }\r\n fun" +
"ction findSortedInsertIndex(koArray, heldDeviceItem) {\r\n var item" +
"s = koArray();\r\n var startIndex = findUnsortedArrayTopIndex(items" +
");\r\n for (var i = startIndex; i < items.length; i++) {\r\n " +
" var s = sortFunction(heldDeviceItem, items[i]);\r\n " +
"if (s <= 0)\r\n return i;\r\n }\r\n " +
" if (startIndex !== 0) {\r\n for (var i = 0; i < startIndex; " +
"i++) {\r\n var s = sortFunction(heldDeviceItem, items[i]);\r" +
"\n if (s <= 0)\r\n return i;\r\n " +
" }\r\n return startIndex;\r\n } el" +
"se {\r\n return -1;\r\n }\r\n }\r\n " +
" function sortFunction(l, r) {\r\n return l.DeviceDescription.to" +
"LowerCase() == r.DeviceDescription.toLowerCase() ? 0 : (l.DeviceDescription.toLo" +
"werCase() < r.DeviceDescription.toLowerCase() ? -1 : 1)\r\n }\r\n " +
" function isInProcess(i) {\r\n return !i.ReadyForReturn && !i.Wa" +
"itingForUserAction;\r\n }\r\n function isReadyForReturn(i) {\r\n" +
" return i.ReadyForReturn && !i.WaitingForUserAction;\r\n " +
" }\r\n function isWaitingForUserAction(i) {\r\n return i.W" +
"aitingForUserAction;\r\n }\r\n function getQueryStringParamete" +
"rs() {\r\n\r\n if (window.location.search.length === 0)\r\n " +
" return null;\r\n\r\n var params = {};\r\n window" +
".location.search.substr(1).split(\"&\").forEach(function (pair) {\r\n " +
" if (pair === \"\") return;\r\n var parts = pair.split(\"=\");\r" +
"\n params[parts[0]] = parts[1] && decodeURIComponent(parts[1]." +
"replace(/\\+/g, \" \"));\r\n });\r\n return params;\r\n " +
" }\r\n\r\n init();\r\n });\r\n </script>\r\n</body>\r\n</html>");
}
}
@@ -351,7 +351,7 @@
}
window.setTimeout(function () {
window.location.href = window.location.href;
window.location.reload(true);
}, 10000);
}
@@ -394,51 +394,51 @@ WriteLiteral("\', null, function (data) {\r\n\r\n var inProce
" try {\r\n $(\'body\').addClass(\'status-error\');\r\n " +
" $.connection.hub.stop();\r\n } catch (e) {\r\n " +
" // Ignore\r\n }\r\n\r\n window.setTimeout(function (" +
") {\r\n window.location.href = window.location.href;\r\n " +
" }, 10000);\r\n }\r\n\r\n // Helpers\r\n function" +
" rotateArray(koArray, element) {\r\n var items = koArray();\r\n\r\n " +
" if (items.length <= 1)\r\n return 0;\r\n\r\n " +
" if (element.height() < (element.parent().height() - 30)) {\r\n\r\n " +
" if (findUnsortedArrayTopIndex(items) !== 0)\r\n koAr" +
"ray.sort(sortFunction);\r\n\r\n // Don\'t rotate if small & sorted" +
" correctly\r\n return;\r\n }\r\n\r\n //" +
" Move Last Item to Top\r\n var item = koArray.pop();\r\n " +
" koArray.unshift(item);\r\n }\r\n function removeItemFromArr" +
"ay(koArray, UserId) {\r\n var items = koArray();\r\n f" +
"or (var i = 0; i < items.length; i++) {\r\n if (items[i].UserId" +
" == UserId) {\r\n koArray.splice(i, 1);\r\n " +
" items = koArray();\r\n i--;\r\n }\r\n " +
" }\r\n }\r\n function findUnsortedArrayTopIndex(" +
"items) {\r\n // Only one Item\r\n if (items.length <= " +
"1)\r\n return 0;\r\n\r\n for (var i = 1; i < items.l" +
"ength; i++) {\r\n var s = sortFunction(items[i - 1], items[i]);" +
"\r\n if (s > 0)\r\n return i;\r\n " +
" }\r\n\r\n return 0;\r\n }\r\n function findSor" +
"tedInsertIndex(koArray, heldDeviceItem) {\r\n var items = koArray()" +
";\r\n var startIndex = findUnsortedArrayTopIndex(items);\r\n " +
" for (var i = startIndex; i < items.length; i++) {\r\n va" +
"r s = sortFunction(heldDeviceItem, items[i]);\r\n if (s <= 0)\r\n" +
" return i;\r\n }\r\n if (startI" +
"ndex !== 0) {\r\n for (var i = 0; i < startIndex; i++) {\r\n " +
" var s = sortFunction(heldDeviceItem, items[i]);\r\n " +
" if (s <= 0)\r\n return i;\r\n " +
" }\r\n return startIndex;\r\n } else {\r\n " +
" return -1;\r\n }\r\n }\r\n function " +
"sortFunction(l, r) {\r\n return l.UserIdFriendly.toLowerCase() == r" +
".UserIdFriendly.toLowerCase() ? 0 : (l.UserIdFriendly.toLowerCase() < r.UserIdFr" +
"iendly.toLowerCase() ? -1 : 1)\r\n }\r\n function isInProcess(" +
"i) {\r\n return !i.ReadyForReturn && !i.WaitingForUserAction;\r\n " +
" }\r\n function isReadyForReturn(i) {\r\n return i." +
"ReadyForReturn && !i.WaitingForUserAction;\r\n }\r\n function " +
"isWaitingForUserAction(i) {\r\n return i.WaitingForUserAction;\r\n " +
" }\r\n function getQueryStringParameters() {\r\n\r\n " +
" if (window.location.search.length === 0)\r\n return null;\r\n\r\n " +
" var params = {};\r\n window.location.search.substr(1" +
").split(\"&\").forEach(function (pair) {\r\n if (pair === \"\") ret" +
"urn;\r\n var parts = pair.split(\"=\");\r\n para" +
"ms[parts[0]] = parts[1] && decodeURIComponent(parts[1].replace(/\\+/g, \" \"));\r\n " +
" });\r\n return params;\r\n }\r\n\r\n " +
"init();\r\n });\r\n </script>\r\n</body>\r\n</html>\r\n");
") {\r\n window.location.reload(true);\r\n }, 10000" +
");\r\n }\r\n\r\n // Helpers\r\n function rotateArray(ko" +
"Array, element) {\r\n var items = koArray();\r\n\r\n if " +
"(items.length <= 1)\r\n return 0;\r\n\r\n if (elemen" +
"t.height() < (element.parent().height() - 30)) {\r\n\r\n if (find" +
"UnsortedArrayTopIndex(items) !== 0)\r\n koArray.sort(sortFu" +
"nction);\r\n\r\n // Don\'t rotate if small & sorted correctly\r\n " +
" return;\r\n }\r\n\r\n // Move Last Item" +
" to Top\r\n var item = koArray.pop();\r\n koArray.unsh" +
"ift(item);\r\n }\r\n function removeItemFromArray(koArray, Use" +
"rId) {\r\n var items = koArray();\r\n for (var i = 0; " +
"i < items.length; i++) {\r\n if (items[i].UserId == UserId) {\r\n" +
" koArray.splice(i, 1);\r\n items = k" +
"oArray();\r\n i--;\r\n }\r\n " +
"}\r\n }\r\n function findUnsortedArrayTopIndex(items) {\r\n " +
" // Only one Item\r\n if (items.length <= 1)\r\n " +
" return 0;\r\n\r\n for (var i = 1; i < items.length; i++) {\r\n" +
" var s = sortFunction(items[i - 1], items[i]);\r\n " +
" if (s > 0)\r\n return i;\r\n }\r\n\r\n " +
" return 0;\r\n }\r\n function findSortedInsertIndex(" +
"koArray, heldDeviceItem) {\r\n var items = koArray();\r\n " +
" var startIndex = findUnsortedArrayTopIndex(items);\r\n for (var" +
" i = startIndex; i < items.length; i++) {\r\n var s = sortFunct" +
"ion(heldDeviceItem, items[i]);\r\n if (s <= 0)\r\n " +
" return i;\r\n }\r\n if (startIndex !== 0) {\r\n" +
" for (var i = 0; i < startIndex; i++) {\r\n " +
" var s = sortFunction(heldDeviceItem, items[i]);\r\n if " +
"(s <= 0)\r\n return i;\r\n }\r\n " +
" return startIndex;\r\n } else {\r\n re" +
"turn -1;\r\n }\r\n }\r\n function sortFunction(l," +
" r) {\r\n return l.UserIdFriendly.toLowerCase() == r.UserIdFriendly" +
".toLowerCase() ? 0 : (l.UserIdFriendly.toLowerCase() < r.UserIdFriendly.toLowerC" +
"ase() ? -1 : 1)\r\n }\r\n function isInProcess(i) {\r\n " +
" return !i.ReadyForReturn && !i.WaitingForUserAction;\r\n }\r\n " +
" function isReadyForReturn(i) {\r\n return i.ReadyForReturn " +
"&& !i.WaitingForUserAction;\r\n }\r\n function isWaitingForUse" +
"rAction(i) {\r\n return i.WaitingForUserAction;\r\n }\r\n " +
" function getQueryStringParameters() {\r\n\r\n if (window.loc" +
"ation.search.length === 0)\r\n return null;\r\n\r\n " +
"var params = {};\r\n window.location.search.substr(1).split(\"&\").fo" +
"rEach(function (pair) {\r\n if (pair === \"\") return;\r\n " +
" var parts = pair.split(\"=\");\r\n params[parts[0]] = " +
"parts[1] && decodeURIComponent(parts[1].replace(/\\+/g, \" \"));\r\n }" +
");\r\n return params;\r\n }\r\n\r\n init();\r\n " +
" });\r\n </script>\r\n</body>\r\n</html>\r\n");
}
}
@@ -92,7 +92,7 @@
if ($('.disconnected-dialog').length == 0) {
$('<div>')
.addClass('dialog disconnected-dialog')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.dialog({
resizable: false,
title: 'Disconnected',
@@ -101,7 +101,7 @@
buttons: {
'Refresh Now': function () {
$(this).dialog('option', 'buttons', null);
window.location.href = window.location.href;
window.location.reload(true);
},
'Close': function () {
$(this).dialog('destroy');
@@ -415,23 +415,24 @@ WriteLiteral("\' };\r\n $.connection.hub.error(onHubF
"(\'dialog disconnected-dialog\')\r\n .html(\'<" +
"h3><span class=\"fa-stack fa-lg\"><i class=\"fa fa-wifi fa-stack-1x\"></i><i class=\"" +
"fa fa-ban fa-stack-2x error\"></i></span>Disconnected from the Disco ICT Server</" +
"h3><div>Please ensure you are connected to the server, then refresh this page to" +
" enable features.</div>\')\r\n .dialog({\r\n " +
" resizable: false,\r\n " +
" title: \'Disconnected\',\r\n " +
" width: 400,\r\n modal: tru" +
"e,\r\n buttons: {\r\n " +
" \'Refresh Now\': function () {\r\n " +
" $(this).dialog(\'option\', \'buttons\', null);\r\n " +
" window.location.href = window.loca" +
"tion.href;\r\n },\r\n " +
" \'Close\': function () {\r\n " +
" $(this).dialog(\'destroy\');\r\n " +
" }\r\n }\r\n " +
" });\r\n }\r\n " +
" }\r\n\r\n function onAddAttachment(" +
"id, quick) {\r\n var data = { id: id };\r\n " +
" $.ajax({\r\n url: \'");
"h3><div>This page is not receiving live updates. Please ensure you are connected" +
" to the server, then refresh this page to enable features.</div>\')\r\n " +
" .dialog({\r\n " +
" resizable: false,\r\n title: \'Discon" +
"nected\',\r\n width: 400,\r\n " +
" modal: true,\r\n " +
" buttons: {\r\n \'Refresh No" +
"w\': function () {\r\n $(this).d" +
"ialog(\'option\', \'buttons\', null);\r\n " +
" window.location.reload(true);\r\n " +
" },\r\n \'Close\': function () {" +
"\r\n $(this).dialog(\'destroy\');" +
"\r\n }\r\n " +
" }\r\n });\r\n " +
" }\r\n }\r\n\r\n " +
" function onAddAttachment(id, quick) {\r\n var data" +
" = { id: id };\r\n $.ajax({\r\n " +
" url: \'");
#line 117 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
@@ -600,7 +600,7 @@
if ($('.disconnected-dialog').length == 0) {
$('<div>')
.addClass('dialog disconnected-dialog')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.dialog({
resizable: false,
title: 'Disconnected',
@@ -609,7 +609,7 @@
buttons: {
'Refresh Now': function () {
$(this).dialog('option', 'buttons', null);
window.location.href = window.location.href;
window.location.reload(true);
},
'Close': function () {
$(this).dialog('destroy');
@@ -1412,18 +1412,19 @@ WriteLiteral("\r\n $.connection.hub.qs = { JobId: jobId };\r\n
" .addClass(\'dialog disconnected-dialog\')\r\n " +
".html(\'<h3><span class=\"fa-stack fa-lg\"><i class=\"fa fa-wifi fa-stack-1x\"></i><i" +
" class=\"fa fa-ban fa-stack-2x error\"></i></span>Disconnected from the Disco ICT " +
"Server</h3><div>Please ensure you are connected to the server, then refresh this" +
" page to enable features.</div>\')\r\n .dialog({\r\n " +
" resizable: false,\r\n title: \'Disconn" +
"ected\',\r\n width: 400,\r\n mo" +
"dal: true,\r\n buttons: {\r\n " +
" \'Refresh Now\': function () {\r\n $(this).di" +
"alog(\'option\', \'buttons\', null);\r\n window.loc" +
"ation.href = window.location.href;\r\n },\r\n " +
" \'Close\': function () {\r\n " +
" $(this).dialog(\'destroy\');\r\n }\r\n " +
" }\r\n });\r\n }\r\n }\r" +
"\n\r\n //#endregion\r\n });\r\n </script>\r\n");
"Server</h3><div>This page is not receiving live updates. Please ensure you are c" +
"onnected to the server, then refresh this page to enable features.</div>\')\r\n " +
" .dialog({\r\n resizable: false,\r\n " +
" title: \'Disconnected\',\r\n wi" +
"dth: 400,\r\n modal: true,\r\n " +
" buttons: {\r\n \'Refresh Now\': function () {\r\n " +
" $(this).dialog(\'option\', \'buttons\', null);\r\n " +
" window.location.reload(true);\r\n " +
" },\r\n \'Close\': function () {\r\n " +
" $(this).dialog(\'destroy\');\r\n " +
" }\r\n }\r\n });\r\n " +
" }\r\n }\r\n\r\n //#endregion\r\n });\r\n </script" +
">\r\n");
#line 625 "..\..\Views\Job\JobParts\Resources.cshtml"
@@ -90,7 +90,7 @@
if ($('.disconnected-dialog').length == 0) {
$('<div>')
.addClass('dialog disconnected-dialog')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.html('<h3><span class="fa-stack fa-lg"><i class="fa fa-wifi fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x error"></i></span>Disconnected from the Disco ICT Server</h3><div>This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.</div>')
.dialog({
resizable: false,
title: 'Disconnected',
@@ -99,7 +99,7 @@
buttons: {
'Refresh Now': function () {
$(this).dialog('option', 'buttons', null);
window.location.href = window.location.href;
window.location.reload(true);
},
'Close': function () {
$(this).dialog('destroy');
@@ -413,23 +413,24 @@ WriteLiteral("\' };\r\n $.connection.hub.error(onHubF
"(\'dialog disconnected-dialog\')\r\n .html(\'<" +
"h3><span class=\"fa-stack fa-lg\"><i class=\"fa fa-wifi fa-stack-1x\"></i><i class=\"" +
"fa fa-ban fa-stack-2x error\"></i></span>Disconnected from the Disco ICT Server</" +
"h3><div>Please ensure you are connected to the server, then refresh this page to" +
" enable features.</div>\')\r\n .dialog({\r\n " +
" resizable: false,\r\n " +
" title: \'Disconnected\',\r\n " +
" width: 400,\r\n modal: tru" +
"e,\r\n buttons: {\r\n " +
" \'Refresh Now\': function () {\r\n " +
" $(this).dialog(\'option\', \'buttons\', null);\r\n " +
" window.location.href = window.loca" +
"tion.href;\r\n },\r\n " +
" \'Close\': function () {\r\n " +
" $(this).dialog(\'destroy\');\r\n " +
" }\r\n }\r\n " +
" });\r\n }\r\n " +
" }\r\n\r\n function onAddAttachment(" +
"id, quick) {\r\n var data = { id: id };\r\n " +
" $.ajax({\r\n url: \'");
"h3><div>This page is not receiving live updates. Please ensure you are connected" +
" to the server, then refresh this page to enable features.</div>\')\r\n " +
" .dialog({\r\n " +
" resizable: false,\r\n title: \'Discon" +
"nected\',\r\n width: 400,\r\n " +
" modal: true,\r\n " +
" buttons: {\r\n \'Refresh No" +
"w\': function () {\r\n $(this).d" +
"ialog(\'option\', \'buttons\', null);\r\n " +
" window.location.reload(true);\r\n " +
" },\r\n \'Close\': function () {" +
"\r\n $(this).dialog(\'destroy\');" +
"\r\n }\r\n " +
" }\r\n });\r\n " +
" }\r\n }\r\n\r\n " +
" function onAddAttachment(id, quick) {\r\n var data" +
" = { id: id };\r\n $.ajax({\r\n " +
" url: \'");
#line 115 "..\..\Views\User\UserParts\_Resources.cshtml"