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:
@@ -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">
|
||||
|
||||
</th>
|
||||
<th class="message">
|
||||
Message
|
||||
</th>
|
||||
<th class="icon"> </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 \r\n </th>\r\n " +
|
||||
" <th");
|
||||
WriteLiteral("> </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");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user