Update: SignalR 2.0.3 Migration; Noticeboards

Migrate all SignalR 1.x Persistent Connections to SignalR 2.x Hubs.
Abstracts ScheduledTaskStatus with core interface and adds a Mock for
optional status reporting. Noticeboards rewritten (with new theme) to be
more resilient and accurate.
This commit is contained in:
Gary Sharp
2014-06-01 23:27:07 +10:00
parent f6fae26bc7
commit 4cd57f4a90
116 changed files with 9874 additions and 6462 deletions
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34011
// Runtime Version:4.0.30319.34014
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -48,7 +48,7 @@ namespace Disco.Web.Areas.Config.Views.Shared
#line 2 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
Authorization.Require(Claims.Config.Logging.Show);
Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
var uniqueId = Guid.NewGuid().ToString("N");
@@ -58,15 +58,15 @@ namespace Disco.Web.Areas.Config.Views.Shared
#line hidden
WriteLiteral("\r\n<div");
WriteAttribute("id", Tuple.Create(" id=\"", 313), Tuple.Create("\"", 339)
, Tuple.Create(Tuple.Create("", 318), Tuple.Create("LogEvents_", 318), true)
WriteAttribute("id", Tuple.Create(" id=\"", 309), Tuple.Create("\"", 335)
, Tuple.Create(Tuple.Create("", 314), Tuple.Create("LogEvents_", 314), true)
#line 9 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
, Tuple.Create(Tuple.Create("", 328), Tuple.Create<System.Object, System.Int32>(uniqueId
, Tuple.Create(Tuple.Create("", 324), Tuple.Create<System.Object, System.Int32>(uniqueId
#line default
#line hidden
, 328), false)
, 324), false)
);
WriteLiteral(" class=\"logEventsViewport\"");
@@ -96,21 +96,21 @@ WriteLiteral(">Message\r\n </th>\r\n </tr>\r\n
WriteLiteral(" class=\"logEventsViewportContainer\"");
WriteAttribute("style", Tuple.Create(" style=\"", 814), Tuple.Create("\"", 1024)
WriteAttribute("style", Tuple.Create(" style=\"", 810), Tuple.Create("\"", 1020)
#line 24 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
, Tuple.Create(Tuple.Create("", 822), Tuple.Create<System.Object, System.Int32>(Model.ViewPortWidth.HasValue ? string.Format("width:{0}px;", Model.ViewPortWidth.Value) : null
, Tuple.Create(Tuple.Create("", 818), Tuple.Create<System.Object, System.Int32>(Model.ViewPortWidth.HasValue ? string.Format("width:{0}px;", Model.ViewPortWidth.Value) : null
#line default
#line hidden
, 822), false)
, 818), false)
#line 24 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
, Tuple.Create(Tuple.Create("", 919), Tuple.Create<System.Object, System.Int32>(Model.ViewPortHeight.HasValue ? string.Format("height:{0}px;", Model.ViewPortHeight.Value - 18) : null
, Tuple.Create(Tuple.Create("", 915), Tuple.Create<System.Object, System.Int32>(Model.ViewPortHeight.HasValue ? string.Format("height:{0}px;", Model.ViewPortHeight.Value - 18) : null
#line default
#line hidden
, 919), false)
, 915), false)
);
WriteLiteral(">\r\n <div");
@@ -205,7 +205,7 @@ WriteLiteral("\';\r\n var logModuleLiveGroupName = \'");
#line 47 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
Write(Model.ModuleFilter != null ? Model.ModuleFilter.LiveLogGroupName : Disco.BI.Interop.SignalRHandlers.LogNotifications.AllNotifications);
Write(Model.ModuleFilter != null ? Model.ModuleFilter.LiveLogGroupName : Disco.Services.Logging.LogNotificationsHub.AllLoggingNotification);
#line default
@@ -219,7 +219,7 @@ WriteLiteral("\';\r\n var logEventTypeFiltered = ");
#line default
#line hidden
WriteLiteral(";\r\n var logStartFiler = ");
WriteLiteral("; \r\n var logStartFiler = ");
#line 49 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
@@ -246,8 +246,8 @@ WriteLiteral(";\r\n var logTakeFiler = \'");
#line default
#line hidden
WriteLiteral("\';\r\n var liveConnection = null;\r\n var liveEventReceivedFunc" +
"tion = \'");
WriteLiteral("\';\r\n var logHub = null;\r\n var liveEventReceivedFunction = \'" +
"");
#line 53 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
@@ -308,60 +308,33 @@ WriteLiteral(@"');
#line default
#line hidden
WriteLiteral(@"',
dataType: 'json',
type: 'POST',
data: loadData,
success: function (d) {
initLogs(d);
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to retrieve logs: ' + textStatus);
}
});
}
function initLogs(loadedLogs){
logsViewModel = new LogsViewModel(loadedLogs);
ko.applyBindings(logsViewModel, logEventsHost.get(0));
if (useLive){
if (liveEventReceivedFunction){
if (!document.DiscoFunctions) document.DiscoFunctions = {};
if (!document.DiscoFunctions.LogEventsFunctions) document.DiscoFunctions.LogEventsFunctions = {};
if (document.DiscoFunctions.LogEventsFunctions[liveEventReceivedFunction]){
liveEventReceivedFunction = document.DiscoFunctions.LogEventsFunctions[liveEventReceivedFunction];
}else{
liveEventReceivedFunction = null;
}
}
liveConnection = $.connection('");
#line 116 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
Write(Url.Content("~/API/Logging/Notifications"));
#line default
#line hidden
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 logReceived(log){
if (log.UseDisplay) logsViewModel.EventLogs.unshift(log);
if (liveEventReceivedFunction) liveEventReceivedFunction(log);
}
loadInitialData();
});
</script>
</div>
");
WriteLiteral("\',\r\n dataType: \'json\',\r\n type: \'POST\',\r\n " +
" data: loadData,\r\n success: function (d) { \r\n" +
" initLogs(d);\r\n },\r\n " +
" error: function (jqXHR, textStatus, errorThrown) {\r\n al" +
"ert(\'Unable to retrieve logs: \' + textStatus);\r\n }\r\n " +
" });\r\n }\r\n\r\n function initLogs(loadedLogs){\r\n " +
" logsViewModel = new LogsViewModel(loadedLogs);\r\n ko.appl" +
"yBindings(logsViewModel, logEventsHost.get(0));\r\n\r\n if (useLive){" +
"\r\n if (liveEventReceivedFunction){\r\n i" +
"f (!document.DiscoFunctions) document.DiscoFunctions = {};\r\n " +
" if (!document.DiscoFunctions.LogEventsFunctions) document.DiscoFunctions.Log" +
"EventsFunctions = {};\r\n if (document.DiscoFunctions.LogEv" +
"entsFunctions[liveEventReceivedFunction]){\r\n liveEven" +
"tReceivedFunction = document.DiscoFunctions.LogEventsFunctions[liveEventReceived" +
"Function];\r\n }else{\r\n liveEven" +
"tReceivedFunction = null;\r\n }\r\n }\r\n\r\n " +
" logHub = $.connection.logNotifications;\r\n " +
"logHub.client.receiveLog = function(message){\r\n if (messa" +
"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");
}
}