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:
@@ -76,7 +76,7 @@ namespace Disco.Web
|
||||
DiscoApplication.DocumentDropBoxMonitor.ScheduleCurrentFiles(10);
|
||||
|
||||
// Enable SignalR-based Repository Notifications
|
||||
Disco.BI.Interop.SignalRHandlers.RepositoryMonitorNotifications.Initialize();
|
||||
//Disco.BI.Interop.SignalRHandlers.RepositoryMonitorNotifications.Initialize();
|
||||
}
|
||||
|
||||
public static void InitializeUpdateEnvironment(DiscoDataContext Database, Version PreviousVersion)
|
||||
|
||||
@@ -9,40 +9,40 @@ namespace Disco.Web
|
||||
public static void RegisterBundles()
|
||||
{
|
||||
// Styles - Site Core
|
||||
BundleTable.Add(new Bundle("~/Style/Site", Links.ClientSource.Style.BundleSite_min_css));
|
||||
BundleTable.Add(new FileBundle("~/Style/Site", Links.ClientSource.Style.BundleSite_min_css));
|
||||
|
||||
// Styles - Targeted
|
||||
BundleTable.Add(new Bundle("~/Style/Config", Links.ClientSource.Style.Config_min_css));
|
||||
BundleTable.Add(new Bundle("~/Style/Device", Links.ClientSource.Style.Device_min_css));
|
||||
BundleTable.Add(new Bundle("~/Style/Dialog", Links.ClientSource.Style.Dialog_min_css));
|
||||
BundleTable.Add(new Bundle("~/Style/Job", Links.ClientSource.Style.Job_min_css));
|
||||
BundleTable.Add(new Bundle("~/Style/User", Links.ClientSource.Style.User_min_css));
|
||||
BundleTable.Add(new Bundle("~/Style/Credits", Links.ClientSource.Style.Credits_min_css));
|
||||
BundleTable.Add(new Bundle("~/Style/AppMaintenance", Links.ClientSource.Style.AppMaintenance_min_css));
|
||||
BundleTable.Add(new Bundle("~/Style/jQueryUI/dynatree", Links.ClientSource.Style.jQueryUI.dynatree.ui_dynatree_min_css));
|
||||
BundleTable.Add(new Bundle("~/Style/Fancytree", Links.ClientSource.Style.Fancytree.disco_fancytree_min_css));
|
||||
BundleTable.Add(new Bundle("~/Style/Shadowbox", Links.ClientSource.Style.Shadowbox_min_css));
|
||||
BundleTable.Add(new Bundle("~/Style/Timeline", Links.ClientSource.Style.Timeline_min_css));
|
||||
BundleTable.Add(new FileBundle("~/Style/Config", Links.ClientSource.Style.Config_min_css));
|
||||
BundleTable.Add(new FileBundle("~/Style/Device", Links.ClientSource.Style.Device_min_css));
|
||||
BundleTable.Add(new FileBundle("~/Style/Dialog", Links.ClientSource.Style.Dialog_min_css));
|
||||
BundleTable.Add(new FileBundle("~/Style/Job", Links.ClientSource.Style.Job_min_css));
|
||||
BundleTable.Add(new FileBundle("~/Style/User", Links.ClientSource.Style.User_min_css));
|
||||
BundleTable.Add(new FileBundle("~/Style/Credits", Links.ClientSource.Style.Credits_min_css));
|
||||
BundleTable.Add(new FileBundle("~/Style/AppMaintenance", Links.ClientSource.Style.AppMaintenance_min_css));
|
||||
BundleTable.Add(new FileBundle("~/Style/jQueryUI/dynatree", Links.ClientSource.Style.jQueryUI.dynatree.ui_dynatree_min_css));
|
||||
BundleTable.Add(new FileBundle("~/Style/Fancytree", Links.ClientSource.Style.Fancytree.disco_fancytree_min_css));
|
||||
BundleTable.Add(new FileBundle("~/Style/Shadowbox", Links.ClientSource.Style.Shadowbox_min_css));
|
||||
BundleTable.Add(new FileBundle("~/Style/Timeline", Links.ClientSource.Style.Timeline_min_css));
|
||||
|
||||
// Styles - Public Targeted
|
||||
BundleTable.Add(new Bundle("~/Style/Public/HeldDevices", Links.ClientSource.Style.Public.HeldDevices_min_css));
|
||||
BundleTable.Add(new Bundle("~/Style/Public/HeldDevicesNoticeboard", Links.ClientSource.Style.Public.HeldDevicesNoticeboard_min_css));
|
||||
BundleTable.Add(new FileBundle("~/Style/Public/HeldDevices", Links.ClientSource.Style.Public.HeldDevices_min_css));
|
||||
BundleTable.Add(new FileBundle("~/Style/Public/HeldDevicesNoticeboard", Links.ClientSource.Style.Public.HeldDevicesNoticeboard_min_css));
|
||||
|
||||
|
||||
// Scripts - Core
|
||||
#if DEBUG
|
||||
BundleTable.Add(new Bundle("~/ClientScripts/Core", Links.ClientSource.Scripts.Core_js));
|
||||
BundleTable.Add(new FileBundle("~/ClientScripts/Core", Links.ClientSource.Scripts.Core_js));
|
||||
#else
|
||||
BundleTable.Add(new Bundle("~/ClientScripts/Core", Links.ClientSource.Scripts.Core_min_js));
|
||||
BundleTable.Add(new FileBundle("~/ClientScripts/Core", Links.ClientSource.Scripts.Core_min_js));
|
||||
#endif
|
||||
|
||||
// Scripts - Modules
|
||||
#if DEBUG
|
||||
foreach (FileInfo f in new DirectoryInfo(HttpContext.Current.Server.MapPath("~/ClientSource/Scripts/Modules")).EnumerateFiles("*.js", SearchOption.TopDirectoryOnly))
|
||||
BundleTable.Add(new Bundle(string.Format("~/ClientScripts/Modules/{0}", f.Name.Substring(0, f.Name.Length - 3)), f.FullName));
|
||||
BundleTable.Add(new FileBundle(string.Format("~/ClientScripts/Modules/{0}", f.Name.Substring(0, f.Name.Length - 3)), f.FullName));
|
||||
#else
|
||||
foreach (FileInfo f in new DirectoryInfo(HttpContext.Current.Server.MapPath("~/ClientSource/Scripts/Modules")).EnumerateFiles("*.min.js", SearchOption.TopDirectoryOnly))
|
||||
BundleTable.Add(new Bundle(string.Format("~/ClientScripts/Modules/{0}", f.Name.Substring(0, f.Name.Length - 7)), f.FullName));
|
||||
BundleTable.Add(new FileBundle(string.Format("~/ClientScripts/Modules/{0}", f.Name.Substring(0, f.Name.Length - 7)), f.FullName));
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
using Microsoft.AspNet.SignalR;
|
||||
using Microsoft.Owin;
|
||||
using Owin;
|
||||
|
||||
[assembly: OwinStartup(typeof(Disco.Web.OwinStartupConfig))]
|
||||
|
||||
namespace Disco.Web
|
||||
{
|
||||
public class OwinStartupConfig
|
||||
{
|
||||
public void Configuration(IAppBuilder app)
|
||||
{
|
||||
var hubConfig = new HubConfiguration()
|
||||
{
|
||||
EnableJavaScriptProxies = false
|
||||
};
|
||||
|
||||
app.MapSignalR("/API/Signalling", hubConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,9 @@ using System.Web.Mvc;
|
||||
using System.Web.WebPages;
|
||||
using RazorGenerator.Mvc;
|
||||
|
||||
[assembly: WebActivatorEx.PostApplicationStartMethod(typeof(Disco.Web.App_Start.RazorGeneratorMvcStart), "Start")]
|
||||
[assembly: WebActivatorEx.PostApplicationStartMethod(typeof(Disco.Web.RazorGeneratorMvcStart), "Start")]
|
||||
|
||||
namespace Disco.Web.App_Start {
|
||||
namespace Disco.Web {
|
||||
public static class RazorGeneratorMvcStart {
|
||||
public static void Start() {
|
||||
var engine = new PrecompiledMvcEngine(typeof(RazorGeneratorMvcStart).Assembly) {
|
||||
|
||||
@@ -5,7 +5,6 @@ using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Microsoft.AspNet.SignalR;
|
||||
using Disco.BI.Interop.SignalRHandlers;
|
||||
|
||||
namespace Disco.Web
|
||||
{
|
||||
@@ -74,11 +73,6 @@ namespace Disco.Web
|
||||
|
||||
public static void RegisterUpdateRoutes(RouteCollection routes)
|
||||
{
|
||||
// Task Status SignalR Route
|
||||
routes.MapConnection<ScheduledTasksStatusNotifications>(
|
||||
"API_Logging_TaskStatusNotifications",
|
||||
"API/Logging/TaskStatusNotifications", new ConnectionConfiguration(), SignalRAuthenticationWorkaround.AddMiddleware);
|
||||
|
||||
// Task Status Ajax Route
|
||||
routes.MapRoute(
|
||||
name: "API_Logging_ScheduledTaskStatus", // Route name
|
||||
|
||||
Reference in New Issue
Block a user