Update: SignalR AddToGroups at Query String
Use OnConnection query string to add group membership rather than making an additional call after connection.
This commit is contained in:
@@ -3,15 +3,13 @@
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
|
||||
}
|
||||
<h2>
|
||||
Documents Imported Today
|
||||
<h2>Documents Imported Today
|
||||
</h2>
|
||||
<div id="importStatus">
|
||||
<div id="noSessions" data-bind="visible: noSessions">
|
||||
<h3>
|
||||
No imported documents today</h3>
|
||||
<h3>No imported documents today</h3>
|
||||
</div>
|
||||
<div id="sessions" data-bind="visible: !noSessions(), foreach: {data: sessions, afterRender: sessionRendered}"
|
||||
<div id="sessions" data-bind="visible: !noSessions(), foreach: { data: sessions, afterRender: sessionRendered }"
|
||||
style="display: none">
|
||||
<div class="session">
|
||||
<div class="clearfix">
|
||||
@@ -29,21 +27,18 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sessionPages clearfix" data-bind="foreach: {data: sessionPages}">
|
||||
<div class="sessionPage" data-bind="style: {backgroundImage: thumbnailUrl}">
|
||||
<div class="sessionPages clearfix" data-bind="foreach: { data: sessionPages }">
|
||||
<div class="sessionPage" data-bind="style: { backgroundImage: thumbnailUrl }">
|
||||
<div class="sessionPageDetails">
|
||||
<h3 data-bind="text: title">
|
||||
</h3>
|
||||
<h3 data-bind="text: title"></h3>
|
||||
<div data-bind="visible: undetected">
|
||||
Disco QR-Code not found<br />
|
||||
<a target="_blank" data-bind="attr: {href: manuallyAssignUrl}, visible: $parent.sessionEnded">Manually Assign Page</a>
|
||||
<a target="_blank" data-bind="attr: { href: manuallyAssignUrl }, visible: $parent.sessionEnded">Manually Assign Page</a>
|
||||
</div>
|
||||
<div data-bind="visible: detected">
|
||||
Document: <a target="_blank" data-bind="text: documentTemplate, attr: {href: documentTemplateUrl}">
|
||||
</a>
|
||||
Document: <a target="_blank" data-bind="text: documentTemplate, attr: { href: documentTemplateUrl }"></a>
|
||||
<br />
|
||||
Target: <a target="_blank" data-bind="text: assignedData, attr: {href: assignedDataUrl}">
|
||||
</a>
|
||||
Target: <a target="_blank" data-bind="text: assignedData, attr: { href: assignedDataUrl }"></a>
|
||||
</div>
|
||||
<div data-bind="visible: !(detected() || undetected())">
|
||||
<p class="sessionStatus" data-bind="text: progressStatus">
|
||||
@@ -58,11 +53,9 @@
|
||||
<table class="logEventsViewport">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="icon">
|
||||
|
||||
<th class="icon">
|
||||
</th>
|
||||
<th class="message">
|
||||
Message
|
||||
<th class="message">Message
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -75,11 +68,9 @@
|
||||
<table class="logEventsViewport" data-bind="visible: messages().length > 0" style="display: none">
|
||||
<tbody data-bind="foreach: messages">
|
||||
<tr>
|
||||
<td class="icon" data-bind="attr: {title: FormattedTimestamp}, css: {information: EventTypeSeverity == 0, warning: EventTypeSeverity == 1, error: EventTypeSeverity == 2}">
|
||||
|
||||
</td>
|
||||
<td class="message" data-bind="text: FormattedMessage, attr: {title: EventTypeName}">
|
||||
<td class="icon" data-bind="attr: { title: FormattedTimestamp }, css: { information: EventTypeSeverity == 0, warning: EventTypeSeverity == 1, error: EventTypeSeverity == 2 }">
|
||||
</td>
|
||||
<td class="message" data-bind="text: FormattedMessage, attr: { title: EventTypeName }"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -309,13 +300,11 @@
|
||||
ko.applyBindings(vm);
|
||||
|
||||
// Init Persistent Connection
|
||||
liveConnection = $.connection('@(Url.Content("~/API/Logging/Notifications"))');
|
||||
liveConnection = $.connection('@(Url.Content("~/API/Logging/Notifications"))', { addToGroups: '@(Disco.BI.DocumentTemplateBI.Importer.DocumentImporterLog.Current.LiveLogGroupName)' });
|
||||
liveConnection.received(parseLog);
|
||||
liveConnection.error(function (e) { if (e.status != 200) alert('Live-Log Error: ' + e.statusText + ': ' + e.responseText); });
|
||||
isLive = true;
|
||||
liveConnection.start(function () {
|
||||
liveConnection.send('/addToGroups:@(Disco.BI.DocumentTemplateBI.Importer.DocumentImporterLog.Current.LiveLogGroupName)');
|
||||
});
|
||||
liveConnection.start();
|
||||
}
|
||||
init();
|
||||
});
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace Disco.Web.Areas.Config.Views.DocumentTemplate
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<h2>\r\n Documents Imported Today\r\n</h2>\r\n<div");
|
||||
WriteLiteral("\r\n<h2>Documents Imported Today\r\n</h2>\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"importStatus\"");
|
||||
|
||||
@@ -60,13 +60,12 @@ WriteLiteral(" id=\"noSessions\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"visible: noSessions\"");
|
||||
|
||||
WriteLiteral(">\r\n <h3>\r\n No imported documents today</h3>\r\n </div>\r\n <d" +
|
||||
"iv");
|
||||
WriteLiteral(">\r\n <h3>No imported documents today</h3>\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"sessions\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"visible: !noSessions(), foreach: {data: sessions, afterRender: sessio" +
|
||||
"nRendered}\"");
|
||||
WriteLiteral(" data-bind=\"visible: !noSessions(), foreach: { data: sessions, afterRender: sessi" +
|
||||
"onRendered }\"");
|
||||
|
||||
WriteLiteral("\r\n style=\"display: none\"");
|
||||
|
||||
@@ -114,13 +113,13 @@ WriteLiteral(">\r\n </div>\r\n </div>\r\n
|
||||
|
||||
WriteLiteral(" class=\"sessionPages clearfix\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"foreach: {data: sessionPages}\"");
|
||||
WriteLiteral(" data-bind=\"foreach: { data: sessionPages }\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"sessionPage\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"style: {backgroundImage: thumbnailUrl}\"");
|
||||
WriteLiteral(" data-bind=\"style: { backgroundImage: thumbnailUrl }\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
@@ -130,7 +129,7 @@ WriteLiteral(">\r\n <h3");
|
||||
|
||||
WriteLiteral(" data-bind=\"text: title\"");
|
||||
|
||||
WriteLiteral(">\r\n </h3>\r\n <div");
|
||||
WriteLiteral("></h3>\r\n <div");
|
||||
|
||||
WriteLiteral(" data-bind=\"visible: undetected\"");
|
||||
|
||||
@@ -139,7 +138,7 @@ WriteLiteral(">\r\n Disco QR-Code not found<br />\r\n
|
||||
|
||||
WriteLiteral(" target=\"_blank\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"attr: {href: manuallyAssignUrl}, visible: $parent.sessionEnded\"");
|
||||
WriteLiteral(" data-bind=\"attr: { href: manuallyAssignUrl }, visible: $parent.sessionEnded\"");
|
||||
|
||||
WriteLiteral(">Manually Assign Page</a>\r\n </div>\r\n " +
|
||||
" <div");
|
||||
@@ -150,17 +149,16 @@ WriteLiteral(">\r\n Document: <a");
|
||||
|
||||
WriteLiteral(" target=\"_blank\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"text: documentTemplate, attr: {href: documentTemplateUrl}\"");
|
||||
WriteLiteral(" data-bind=\"text: documentTemplate, attr: { href: documentTemplateUrl }\"");
|
||||
|
||||
WriteLiteral(">\r\n </a>\r\n <br />\r\n " +
|
||||
" Target: <a");
|
||||
WriteLiteral("></a>\r\n <br />\r\n Target: <a" +
|
||||
"");
|
||||
|
||||
WriteLiteral(" target=\"_blank\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"text: assignedData, attr: {href: assignedDataUrl}\"");
|
||||
WriteLiteral(" data-bind=\"text: assignedData, attr: { href: assignedDataUrl }\"");
|
||||
|
||||
WriteLiteral(">\r\n </a>\r\n </div>\r\n " +
|
||||
" <div");
|
||||
WriteLiteral("></a>\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" data-bind=\"visible: !(detected() || undetected())\"");
|
||||
|
||||
@@ -190,14 +188,12 @@ WriteLiteral(">\r\n <thead>\r\n <tr>\r
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteLiteral(">\r\n \r\n </th>\r\n " +
|
||||
" <th");
|
||||
WriteLiteral("> \r\n </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\r\n </th>\r\n </tr>\r\n " +
|
||||
" </thead>\r\n </table>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"logEventsViewportContainer\"");
|
||||
|
||||
@@ -226,19 +222,19 @@ WriteLiteral(">\r\n <tr>\r\n
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"attr: {title: FormattedTimestamp}, css: {information: EventTypeSeveri" +
|
||||
"ty == 0, warning: EventTypeSeverity == 1, error: EventTypeSeverity == 2}\"");
|
||||
WriteLiteral(" data-bind=\"attr: { title: FormattedTimestamp }, css: { information: EventTypeSev" +
|
||||
"erity == 0, warning: EventTypeSeverity == 1, error: EventTypeSeverity == 2 }\"");
|
||||
|
||||
WriteLiteral(">\r\n \r\n </" +
|
||||
"td>\r\n <td");
|
||||
WriteLiteral("> \r\n </td>\r\n <" +
|
||||
"td");
|
||||
|
||||
WriteLiteral(" class=\"message\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"text: FormattedMessage, attr: {title: EventTypeName}\"");
|
||||
WriteLiteral(" data-bind=\"text: FormattedMessage, attr: { title: EventTypeName }\"");
|
||||
|
||||
WriteLiteral(">\r\n </td>\r\n </tr>\r\n " +
|
||||
" </tbody>\r\n </table>\r\n </di" +
|
||||
"v>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n<script");
|
||||
WriteLiteral("></td>\r\n </tr>\r\n </tbody>\r\n " +
|
||||
" </table>\r\n </div>\r\n </div>\r\n </" +
|
||||
"div>\r\n </div>\r\n</div>\r\n<script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
@@ -265,7 +261,7 @@ WriteLiteral(">\r\n $(function () {\r\n var vm;\r\n var host =
|
||||
" var urlDeviceShow = \'");
|
||||
|
||||
|
||||
#line 111 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
#line 102 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
Write(Url.Action(MVC.Device.Show()));
|
||||
|
||||
|
||||
@@ -274,7 +270,7 @@ WriteLiteral(">\r\n $(function () {\r\n var vm;\r\n var host =
|
||||
WriteLiteral("/\'\r\n var urlJobShow = \'");
|
||||
|
||||
|
||||
#line 112 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
#line 103 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
Write(Url.Action(MVC.Job.Show()));
|
||||
|
||||
|
||||
@@ -283,7 +279,7 @@ WriteLiteral("/\'\r\n var urlJobShow = \'");
|
||||
WriteLiteral("/\'\r\n var urlUserShow = \'");
|
||||
|
||||
|
||||
#line 113 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
#line 104 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
Write(Url.Action(MVC.User.Show()));
|
||||
|
||||
|
||||
@@ -292,7 +288,7 @@ WriteLiteral("/\'\r\n var urlUserShow = \'");
|
||||
WriteLiteral("/\'\r\n var urlPageThumbnail = \'");
|
||||
|
||||
|
||||
#line 114 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
#line 105 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
Write(Url.Action(MVC.API.DocumentTemplate.ImporterThumbnail()));
|
||||
|
||||
|
||||
@@ -301,7 +297,7 @@ WriteLiteral("/\'\r\n var urlPageThumbnail = \'");
|
||||
WriteLiteral("/\'\r\n var urlDocumentTemplate = \'");
|
||||
|
||||
|
||||
#line 115 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
#line 106 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
Write(Url.Action(MVC.Config.DocumentTemplate.Index()));
|
||||
|
||||
|
||||
@@ -310,7 +306,7 @@ WriteLiteral("/\'\r\n var urlDocumentTemplate = \'");
|
||||
WriteLiteral("/\';\r\n var urlManuallyAssign = \'");
|
||||
|
||||
|
||||
#line 116 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
#line 107 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
Write(Url.Action(MVC.Config.DocumentTemplate.UndetectedPages()));
|
||||
|
||||
|
||||
@@ -319,7 +315,7 @@ WriteLiteral("/\';\r\n var urlManuallyAssign = \'");
|
||||
WriteLiteral("\';\r\n var iconErrorUrl = \'url(");
|
||||
|
||||
|
||||
#line 117 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
#line 108 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
Write(Links.ClientSource.Style.Images.Status.fail32_png);
|
||||
|
||||
|
||||
@@ -427,7 +423,7 @@ WriteLiteral(")\';\r\n var isLive = false;\r\n\r\n function pageVi
|
||||
" url: \'");
|
||||
|
||||
|
||||
#line 292 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
#line 283 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
Write(Url.Action(MVC.API.Logging.RetrieveEvents()));
|
||||
|
||||
|
||||
@@ -456,27 +452,31 @@ WriteLiteral(@"',
|
||||
liveConnection = $.connection('");
|
||||
|
||||
|
||||
#line 312 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
#line 303 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
Write(Url.Content("~/API/Logging/Notifications"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"');
|
||||
liveConnection.received(parseLog);
|
||||
liveConnection.error(function (e) { if (e.status != 200) alert('Live-Log Error: ' + e.statusText + ': ' + e.responseText); });
|
||||
isLive = true;
|
||||
liveConnection.start(function () {
|
||||
liveConnection.send('/addToGroups:");
|
||||
WriteLiteral("\', { addToGroups: \'");
|
||||
|
||||
|
||||
#line 317 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
Write(Disco.BI.DocumentTemplateBI.Importer.DocumentImporterLog.Current.LiveLogGroupName);
|
||||
#line 303 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
Write(Disco.BI.DocumentTemplateBI.Importer.DocumentImporterLog.Current.LiveLogGroupName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\');\r\n });\r\n }\r\n init();\r\n });\r\n</script>\r\n");
|
||||
WriteLiteral(@"' });
|
||||
liveConnection.received(parseLog);
|
||||
liveConnection.error(function (e) { if (e.status != 200) alert('Live-Log Error: ' + e.statusText + ': ' + e.responseText); });
|
||||
isLive = true;
|
||||
liveConnection.start();
|
||||
}
|
||||
init();
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -357,12 +357,10 @@
|
||||
vm.isotopeInited = true;
|
||||
|
||||
// Init Persistent Connection
|
||||
liveConnection = $.connection('@(Url.Content("~/API/Logging/Notifications"))');
|
||||
liveConnection = $.connection('@(Url.Content("~/API/Logging/Notifications"))', { addToGroups: '@(Disco.BI.DeviceBI.EnrolmentLog.Current.LiveLogGroupName)' });
|
||||
liveConnection.received(parseLog);
|
||||
liveConnection.error(function (e) { if (e.status != 200) alert('Live-Log Error: ' + e.statusText + ': ' + e.responseText); });
|
||||
liveConnection.start(function () {
|
||||
liveConnection.send('/addToGroups:@(Disco.BI.DeviceBI.EnrolmentLog.Current.LiveLogGroupName)');
|
||||
});
|
||||
liveConnection.start();
|
||||
}
|
||||
init();
|
||||
});
|
||||
|
||||
@@ -519,20 +519,24 @@ WriteLiteral(@"',
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"');
|
||||
liveConnection.received(parseLog);
|
||||
liveConnection.error(function (e) { if (e.status != 200) alert('Live-Log Error: ' + e.statusText + ': ' + e.responseText); });
|
||||
liveConnection.start(function () {
|
||||
liveConnection.send('/addToGroups:");
|
||||
WriteLiteral("\', { addToGroups: \'");
|
||||
|
||||
|
||||
#line 364 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
|
||||
Write(Disco.BI.DeviceBI.EnrolmentLog.Current.LiveLogGroupName);
|
||||
#line 360 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
|
||||
Write(Disco.BI.DeviceBI.EnrolmentLog.Current.LiveLogGroupName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\');\r\n });\r\n }\r\n init();\r\n });\r\n</script>\r\n");
|
||||
WriteLiteral(@"' });
|
||||
liveConnection.received(parseLog);
|
||||
liveConnection.error(function (e) { if (e.status != 200) alert('Live-Log Error: ' + e.statusText + ': ' + e.responseText); });
|
||||
liveConnection.start();
|
||||
}
|
||||
init();
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr data-bind="visible: FinishedTimestamp() && !TaskExceptionMessage()">
|
||||
<td class="finishedMessage" data-bind="css: {finishedRedirect: FinishedUrl}">
|
||||
<td class="finishedMessage" data-bind="css: { finishedRedirect: FinishedUrl }">
|
||||
<span data-bind="text: FinishedMessage"></span>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -240,11 +240,10 @@
|
||||
});
|
||||
}
|
||||
function updateWithLive() {
|
||||
liveConnection = $.connection('@(Url.Content("~/API/Logging/TaskStatusNotifications"))');
|
||||
liveConnection = $.connection('@(Url.Content("~/API/Logging/TaskStatusNotifications"))', { addToGroups: sessionId });
|
||||
liveConnection.received(update_Received);
|
||||
liveConnection.error(function (e) { if (e.status != 200) alert('Live-Status Error: ' + e.statusText + ': ' + e.responseText); });
|
||||
liveConnection.start(function () {
|
||||
liveConnection.send('/addToGroups:' + sessionId);
|
||||
updateWithAjax();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ WriteLiteral(">\r\n <td");
|
||||
|
||||
WriteLiteral(" class=\"finishedMessage\"");
|
||||
|
||||
WriteLiteral(" data-bind=\"css: {finishedRedirect: FinishedUrl}\"");
|
||||
WriteLiteral(" data-bind=\"css: { finishedRedirect: FinishedUrl }\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
@@ -292,11 +292,10 @@ WriteLiteral("\';\r\n\r\n var view = $(\'#scheduledTaskStatus\');\r\n
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"');
|
||||
WriteLiteral(@"', { addToGroups: sessionId });
|
||||
liveConnection.received(update_Received);
|
||||
liveConnection.error(function (e) { if (e.status != 200) alert('Live-Status Error: ' + e.statusText + ': ' + e.responseText); });
|
||||
liveConnection.start(function () {
|
||||
liveConnection.send('/addToGroups:' + sessionId);
|
||||
updateWithAjax();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -112,14 +112,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
liveConnection = $.connection('@(Url.Content("~/API/Logging/Notifications"))');
|
||||
liveConnection = $.connection('@(Url.Content("~/API/Logging/Notifications"))', {addToGroups: logModuleLiveGroupName});
|
||||
liveConnection.received(logReceived);
|
||||
liveConnection.error(function(e){if (e.status != 200) alert('Live-Log Error: '+e.statusText +': '+e.responseText);});
|
||||
liveConnection.start(function(){
|
||||
if (logModuleLiveGroupName){
|
||||
liveConnection.send('/addToGroups:' + logModuleLiveGroupName);
|
||||
}
|
||||
});
|
||||
liveConnection.start();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -335,14 +335,10 @@ WriteLiteral(@"',
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"');
|
||||
WriteLiteral(@"', {addToGroups: logModuleLiveGroupName});
|
||||
liveConnection.received(logReceived);
|
||||
liveConnection.error(function(e){if (e.status != 200) alert('Live-Log Error: '+e.statusText +': '+e.responseText);});
|
||||
liveConnection.start(function(){
|
||||
if (logModuleLiveGroupName){
|
||||
liveConnection.send('/addToGroups:' + logModuleLiveGroupName);
|
||||
}
|
||||
});
|
||||
liveConnection.start();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -408,15 +408,13 @@
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
var liveMessagesConnection = $.connection('@(Url.Content("~/API/Repository/Notifications"))')
|
||||
var liveMessagesConnection = $.connection('@(Url.Content("~/API/Repository/Notifications"))', { addToGroups: 'JobLog,JobAttachment' })
|
||||
liveMessagesConnection.received(liveMessageRecieved);
|
||||
liveMessagesConnection.error(function (e) {
|
||||
if (e)
|
||||
alert('Error: ' + JSON.stringify(e));
|
||||
});
|
||||
liveMessagesConnection.start(function () {
|
||||
liveMessagesConnection.send('/addToGroups:JobLog,JobAttachment');
|
||||
});
|
||||
liveMessagesConnection.start();
|
||||
//#endregion
|
||||
|
||||
});
|
||||
|
||||
@@ -789,15 +789,13 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"')
|
||||
WriteLiteral(@"', { addToGroups: 'JobLog,JobAttachment' })
|
||||
liveMessagesConnection.received(liveMessageRecieved);
|
||||
liveMessagesConnection.error(function (e) {
|
||||
if (e)
|
||||
alert('Error: ' + JSON.stringify(e));
|
||||
});
|
||||
liveMessagesConnection.start(function () {
|
||||
liveMessagesConnection.send('/addToGroups:JobLog,JobAttachment');
|
||||
});
|
||||
liveMessagesConnection.start();
|
||||
//#endregion
|
||||
|
||||
});
|
||||
|
||||
@@ -246,10 +246,9 @@
|
||||
});
|
||||
}
|
||||
function updateWithLive() {
|
||||
liveConnection = $.connection('@(Url.Content("~/API/Logging/TaskStatusNotifications"))');
|
||||
liveConnection = $.connection('@(Url.Content("~/API/Logging/TaskStatusNotifications"))', {addToGroups: sessionId});
|
||||
liveConnection.received(update_Received);
|
||||
liveConnection.start(function () {
|
||||
liveConnection.send('/addToGroups:' + sessionId);
|
||||
updateWithAjax();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -296,10 +296,9 @@ WriteLiteral("\';\r\n\r\n // Clear Menu\r\n $(\'#menu\').empty();\
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"');
|
||||
WriteLiteral(@"', {addToGroups: sessionId});
|
||||
liveConnection.received(update_Received);
|
||||
liveConnection.start(function () {
|
||||
liveConnection.send('/addToGroups:' + sessionId);
|
||||
updateWithAjax();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user