')
- .addClass('dialog disconnected-dialog')
- .html('
This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.
')
- .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');
- }
- }
- });
- }
- });
$.connection.hub.start()
.done(function () { isLive = true; });
diff --git a/Disco.Web/Areas/Config/Views/Enrolment/Status.generated.cs b/Disco.Web/Areas/Config/Views/Enrolment/Status.generated.cs
index 73b1b653..db96bdd1 100644
--- a/Disco.Web/Areas/Config/Views/Enrolment/Status.generated.cs
+++ b/Disco.Web/Areas/Config/Views/Enrolment/Status.generated.cs
@@ -823,35 +823,33 @@ WriteLiteral(@"',
#line default
#line hidden
-WriteLiteral("\' };\r\n $.connection.hub.error(function (error) {\r\n cons" +
-"ole.log(\'Server connection error: \' + error);\r\n });\r\n $.co" +
-"nnection.hub.disconnected(function (error) {\r\n // Show Dialog Mes" +
-"sage\r\n if ($(\'.disconnected-dialog\').length == 0) {\r\n " +
-" $(\'
\')\r\n .addClass(\'dialog disconnected-dialo" +
-"g\')\r\n .html(\'
Dis" +
-"connected from the Disco ICT Server
This page is not receiving live upd" +
-"ates. Please ensure you are connected to the server, then refresh this page to e" +
-"nable features.
\')\r\n .dialog({\r\n " +
-" resizable: false,\r\n title: \'Disconnected\',\r\n " +
-" width: 400,\r\n modal: true," +
-"\r\n buttons: {\r\n \'Refre" +
-"sh Now\': function () {\r\n $(this).dialog(\'opti" +
-"on\', \'buttons\', null);\r\n window.location.relo" +
-"ad(true);\r\n },\r\n \'" +
-"Close\': function () {\r\n $(this).dialog(\'destr" +
-"oy\');\r\n }\r\n }\r\n " +
-" });\r\n }\r\n });\r\n\r\n $.connec" +
-"tion.hub.start()\r\n .done(function () { isLive = true; });\r\n\r\n " +
-" }\r\n $(\'#dialogSession\').on(\'click\', \'#formResolveSessionPending butto" +
-"n\', function (e) {\r\n const $button = $(this);\r\n const $for" +
-"m = $button.closest(\'form\');\r\n const body = new FormData($form[0]);\r\n" +
-" body.append(\'approve\', $button.val());\r\n fetch($form.attr" +
-"(\'action\'), {\r\n method: \'POST\',\r\n body: body\r\n " +
-" }).then(function (response) {\r\n if (!response.ok) {\r\n " +
-" alert(\'Failed to resolve pending session: \' + response.statusTex" +
-"t);\r\n }\r\n });\r\n });\r\n init();\r\n });\r\n" +
-"\r\n");
+WriteLiteral(@"' };
+ $.connection.hub.error(function (error) {
+ console.log('Server connection error: ' + error);
+ });
+
+ $.connection.hub.start()
+ .done(function () { isLive = true; });
+
+ }
+ $('#dialogSession').on('click', '#formResolveSessionPending button', function (e) {
+ const $button = $(this);
+ const $form = $button.closest('form');
+ const body = new FormData($form[0]);
+ body.append('approve', $button.val());
+ fetch($form.attr('action'), {
+ method: 'POST',
+ body: body
+ }).then(function (response) {
+ if (!response.ok) {
+ alert('Failed to resolve pending session: ' + response.statusText);
+ }
+ });
+ });
+ init();
+ });
+
+");
}
}
diff --git a/Disco.Web/Areas/Config/Views/Shared/LogEvents.cshtml b/Disco.Web/Areas/Config/Views/Shared/LogEvents.cshtml
index 2e0d2691..2840d160 100644
--- a/Disco.Web/Areas/Config/Views/Shared/LogEvents.cshtml
+++ b/Disco.Web/Areas/Config/Views/Shared/LogEvents.cshtml
@@ -124,29 +124,6 @@
$.connection.hub.error(function (error) {
console.log('Server connection error: ' + error);
});
- $.connection.hub.disconnected(function () {
- // Show Dialog Message
- if ($('.disconnected-dialog').length == 0) {
- $('
')
- .addClass('dialog disconnected-dialog')
- .html('
Disconnected from the Disco ICT Server
This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.
')
- .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');
- }
- }
- });
- }
- })
$.connection.hub.start();
}
diff --git a/Disco.Web/Areas/Config/Views/Shared/LogEvents.generated.cs b/Disco.Web/Areas/Config/Views/Shared/LogEvents.generated.cs
index 5d392cdb..e4f9c930 100644
--- a/Disco.Web/Areas/Config/Views/Shared/LogEvents.generated.cs
+++ b/Disco.Web/Areas/Config/Views/Shared/LogEvents.generated.cs
@@ -331,28 +331,9 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n
" };\r\n\r\n $.connection.hub.qs = {LogModules: logModule" +
"LiveGroupName};\r\n $.connection.hub.error(function (error) {\r\n" +
" console.log(\'Server connection error: \' + error);\r\n " +
-" });\r\n $.connection.hub.disconnected(function (" +
-") {\r\n // Show Dialog Message\r\n if " +
-"($(\'.disconnected-dialog\').length == 0) {\r\n $(\'
\'" +
-")\r\n .addClass(\'dialog disconnected-dialog\')\r\n " +
-" .html(\'
Disc" +
-"onnected from the Disco ICT Server
This page is not receiving live upda" +
-"tes. Please ensure you are connected to the server, then refresh this page to en" +
-"able features.
\')\r\n .dialog({\r\n " +
-" resizable: false,\r\n ti" +
-"tle: \'Disconnected\',\r\n width: 400,\r\n " +
-" modal: true,\r\n but" +
-"tons: {\r\n \'Refresh Now\': function () {\r\n " +
-" $(this).dialog(\'option\', \'buttons\', n" +
-"ull);\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 $.connection.hub.start();\r" +
-"\n }\r\n }\r\n\r\n loadInitialData();\r\n });" +
-"\r\n \r\n
\r\n");
+" });\r\n\r\n $.connection.hub.start();\r\n " +
+" }\r\n }\r\n\r\n loadInitialData();\r\n });\r\n \r\n
\r\n");
}
}
diff --git a/Disco.Web/Areas/Config/Views/Shared/TaskStatus.cshtml b/Disco.Web/Areas/Config/Views/Shared/TaskStatus.cshtml
index 5c06b533..de6a36e8 100644
--- a/Disco.Web/Areas/Config/Views/Shared/TaskStatus.cshtml
+++ b/Disco.Web/Areas/Config/Views/Shared/TaskStatus.cshtml
@@ -249,29 +249,6 @@
$.connection.hub.error(function (error) {
console.log('Server connection error: ' + error);
});
- $.connection.hub.disconnected(function () {
- // Show Dialog Message
- if ($('.disconnected-dialog').length == 0) {
- $('
')
- .addClass('dialog disconnected-dialog')
- .html('
Disconnected from the Disco ICT Server
This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.
')
- .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');
- }
- }
- });
- }
- })
$.connection.hub.start()
.fail(onHubFailed);
diff --git a/Disco.Web/Areas/Config/Views/Shared/TaskStatus.generated.cs b/Disco.Web/Areas/Config/Views/Shared/TaskStatus.generated.cs
index 8558cf3f..f84c8064 100644
--- a/Disco.Web/Areas/Config/Views/Shared/TaskStatus.generated.cs
+++ b/Disco.Web/Areas/Config/Views/Shared/TaskStatus.generated.cs
@@ -281,25 +281,8 @@ WriteLiteral("\';\r\n\r\n var view = $(\'#Logging_Task_Status\');\r\n
"sHub.client.updateTaskStatus = vm.Update;\r\n\r\n $.connection.hub.qs = {" +
" TaskSessionId: sessionId };\r\n $.connection.hub.error(function (error" +
") {\r\n console.log(\'Server connection error: \' + error);\r\n " +
-" });\r\n $.connection.hub.disconnected(function () {\r\n " +
-" // Show Dialog Message\r\n if ($(\'.disconnected-dialog\').length =" +
-"= 0) {\r\n $(\'
\')\r\n .addClass(\'dialo" +
-"g disconnected-dialog\')\r\n .html(\'
Disconnected from the Disco ICT Server
This page is no" +
-"t receiving live updates. Please ensure you are connected to the server, then re" +
-"fresh this page to enable features.
\')\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 " +
-" $.connection.hub.start()\r\n .fail(onHubFailed);\r\n " +
-" }\r\n\r\n });\r\n\r\n");
+" });\r\n\r\n $.connection.hub.start()\r\n .fail(onHubFail" +
+"ed);\r\n }\r\n\r\n });\r\n\r\n");
}
}
diff --git a/Disco.Web/Views/Device/Show.cshtml b/Disco.Web/Views/Device/Show.cshtml
index d558e38e..6d0c4d43 100644
--- a/Disco.Web/Views/Device/Show.cshtml
+++ b/Disco.Web/Views/Device/Show.cshtml
@@ -157,28 +157,6 @@
// Disable UI
$('#AttachmentsContainer').find('span.action.enabled').addClass('disabled');
$('#Comments').find('button').prop('disabled', true);
-
- // Show Dialog Message
- if ($('.disconnected-dialog').length == 0) {
- $('
')
- .addClass('dialog disconnected-dialog')
- .html('
Disconnected from the Disco ICT Server
This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.
')
- .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');
- }
- }
- });
- }
});
$.connection.hub.reconnecting(function () {
diff --git a/Disco.Web/Views/Device/Show.generated.cs b/Disco.Web/Views/Device/Show.generated.cs
index eea311e0..ccb399e7 100644
--- a/Disco.Web/Views/Device/Show.generated.cs
+++ b/Disco.Web/Views/Device/Show.generated.cs
@@ -522,38 +522,21 @@ WriteLiteral(" \r\n");
+"tton\').prop(\'disabled\', true);\r\n });\r\n\r\n $.connect" +
+"ion.hub.reconnecting(function () {\r\n $(\'#AttachmentsContainer" +
+"\').find(\'span.action.enabled\').addClass(\'disabled\');\r\n $(\'#Co" +
+"mments\').find(\'button\').prop(\'disabled\', true);\r\n });\r\n " +
+" $.connection.hub.reconnected(function () {\r\n $(\'#Attach" +
+"mentsContainer\').find(\'span.action.enabled\').removeClass(\'disabled\');\r\n " +
+" $(\'#Comments\').find(\'button\').prop(\'disabled\', false);\r\n " +
+" });\r\n\r\n // Start Connection\r\n $.connection.hub." +
+"start(function () {\r\n $(\'#AttachmentsContainer\').find(\'span.a" +
+"ction.enabled\').removeClass(\'disabled\');\r\n $(\'#Comments\').fin" +
+"d(\'button\').prop(\'disabled\', false);\r\n });\r\n });\r\n " +
+" \r\n");
- #line 200 "..\..\Views\Device\Show.cshtml"
+ #line 178 "..\..\Views\Device\Show.cshtml"
}
diff --git a/Disco.Web/Views/Job/JobParts/Resources.cshtml b/Disco.Web/Views/Job/JobParts/Resources.cshtml
index 31378a07..cec20cd3 100644
--- a/Disco.Web/Views/Job/JobParts/Resources.cshtml
+++ b/Disco.Web/Views/Job/JobParts/Resources.cshtml
@@ -588,28 +588,6 @@
$('#CommentsContainer').find('textarea.commentInput').attr('readonly', 'readonly');
$('#CommentsContainer').find('span.action').addClass('disabled');
$('#AttachmentsContainer').find('span.action.enabled').addClass('disabled');
-
- // Show Dialog Message
- if ($('.disconnected-dialog').length == 0) {
- $('
')
- .addClass('dialog disconnected-dialog')
- .html('
Disconnected from the Disco ICT Server
This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.
')
- .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');
- }
- }
- });
- }
});
// Start Connection
diff --git a/Disco.Web/Views/Job/JobParts/Resources.generated.cs b/Disco.Web/Views/Job/JobParts/Resources.generated.cs
index 8377f5de..99919063 100644
--- a/Disco.Web/Views/Job/JobParts/Resources.generated.cs
+++ b/Disco.Web/Views/Job/JobParts/Resources.generated.cs
@@ -1297,43 +1297,39 @@ WriteLiteral(@"
#line default
#line hidden
-WriteLiteral("\r\n $.connection.hub.qs = { JobId: jobId };\r\n $.connection.h" +
-"ub.reconnecting(function () {\r\n $(\'#CommentsContainer\').find(\'spa" +
-"n.action\').addClass(\'disabled\');\r\n $(\'#AttachmentsContainer\').fin" +
-"d(\'span.action.enabled\').addClass(\'disabled\');\r\n });\r\n $.c" +
-"onnection.hub.reconnected(function () {\r\n $(\'#CommentsContainer\')" +
-".find(\'span.action\').removeClass(\'disabled\');\r\n $(\'#AttachmentsCo" +
-"ntainer\').find(\'span.action.enabled\').removeClass(\'disabled\');\r\n });\r" +
-"\n $.connection.hub.error(function (error) {\r\n console." +
-"log(\'Server connection error: \' + error);\r\n });\r\n $.connec" +
-"tion.hub.disconnected(function () {\r\n // Disable UI\r\n " +
-" $(\'#CommentsContainer\').find(\'textarea.commentInput\').attr(\'readonly\', \'read" +
-"only\');\r\n $(\'#CommentsContainer\').find(\'span.action\').addClass(\'d" +
-"isabled\');\r\n $(\'#AttachmentsContainer\').find(\'span.action.enabled" +
-"\').addClass(\'disabled\');\r\n\r\n // Show Dialog Message\r\n " +
-" if ($(\'.disconnected-dialog\').length == 0) {\r\n $(\'
\')" +
-"\r\n .addClass(\'dialog disconnected-dialog\')\r\n " +
-" .html(\'
Disconnected from the" +
-" Disco ICT Server
This page is not receiving live updates. Please ensur" +
-"e you are connected to the server, then refresh this page to enable features.\')\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\', nu" +
-"ll);\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 // Start Connection\r\n " +
-" $.connection.hub.start(function () {\r\n $(\'#CommentsContain" +
-"er\').find(\'span.action\').removeClass(\'disabled\');\r\n $(\'#Attachmen" +
-"tsContainer\').find(\'span.action.enabled\').removeClass(\'disabled\');\r\n " +
-"});\r\n\r\n //#endregion\r\n });\r\n \r\n");
+WriteLiteral(@"
+ $.connection.hub.qs = { JobId: jobId };
+ $.connection.hub.reconnecting(function () {
+ $('#CommentsContainer').find('span.action').addClass('disabled');
+ $('#AttachmentsContainer').find('span.action.enabled').addClass('disabled');
+ });
+ $.connection.hub.reconnected(function () {
+ $('#CommentsContainer').find('span.action').removeClass('disabled');
+ $('#AttachmentsContainer').find('span.action.enabled').removeClass('disabled');
+ });
+ $.connection.hub.error(function (error) {
+ console.log('Server connection error: ' + error);
+ });
+ $.connection.hub.disconnected(function () {
+ // Disable UI
+ $('#CommentsContainer').find('textarea.commentInput').attr('readonly', 'readonly');
+ $('#CommentsContainer').find('span.action').addClass('disabled');
+ $('#AttachmentsContainer').find('span.action.enabled').addClass('disabled');
+ });
+
+ // Start Connection
+ $.connection.hub.start(function () {
+ $('#CommentsContainer').find('span.action').removeClass('disabled');
+ $('#AttachmentsContainer').find('span.action.enabled').removeClass('disabled');
+ });
+
+ //#endregion
+ });
+
+");
- #line 624 "..\..\Views\Job\JobParts\Resources.cshtml"
+ #line 602 "..\..\Views\Job\JobParts\Resources.cshtml"
}
#line default
diff --git a/Disco.Web/Views/User/Show.cshtml b/Disco.Web/Views/User/Show.cshtml
index e59f673b..f1b7136a 100644
--- a/Disco.Web/Views/User/Show.cshtml
+++ b/Disco.Web/Views/User/Show.cshtml
@@ -147,28 +147,6 @@
// Disable UI
$('#AttachmentsContainer').find('span.action.enabled').addClass('disabled');
$('#Comments').find('button').prop('disabled', true);
-
- // Show Dialog Message
- if ($('.disconnected-dialog').length == 0) {
- $('
')
- .addClass('dialog disconnected-dialog')
- .html('
Disconnected from the Disco ICT Server
This page is not receiving live updates. Please ensure you are connected to the server, then refresh this page to enable features.
')
- .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');
- }
- }
- });
- }
});
$.connection.hub.reconnecting(function () {
diff --git a/Disco.Web/Views/User/Show.generated.cs b/Disco.Web/Views/User/Show.generated.cs
index f7f8d17c..48c3dd8a 100644
--- a/Disco.Web/Views/User/Show.generated.cs
+++ b/Disco.Web/Views/User/Show.generated.cs
@@ -464,38 +464,21 @@ WriteLiteral(" \r\n");
+" $(\'#Comments\').find(\'button\').prop(\'disabled\', true);\r\n });\r" +
+"\n\r\n $.connection.hub.reconnecting(function () {\r\n " +
+" $(\'#AttachmentsContainer\').find(\'span.action.enabled\').addClass(\'disabled\');" +
+"\r\n $(\'#Comments\').find(\'button\').prop(\'disabled\', true);\r\n " +
+" });\r\n $.connection.hub.reconnected(function () {\r\n " +
+" $(\'#AttachmentsContainer\').find(\'span.action.enabled\').removeC" +
+"lass(\'disabled\');\r\n $(\'#Comments\').find(\'button\').prop(\'disab" +
+"led\', false);\r\n });\r\n\r\n // Start Connection\r\n " +
+" $.connection.hub.start(function () {\r\n $(\'#Attachm" +
+"entsContainer\').find(\'span.action.enabled\').removeClass(\'disabled\');\r\n " +
+" $(\'#Comments\').find(\'button\').prop(\'disabled\', false);\r\n " +
+" });\r\n });\r\n \r\n");
- #line 190 "..\..\Views\User\Show.cshtml"
+ #line 168 "..\..\Views\User\Show.cshtml"
}