Beispiel #1
0
 protected override void OnWebAppStarted()
 {
     base.OnWebAppStarted();
     if (ConfigManager.Config.SystemType == SystemType.NotConfigured)
     {
         WebApp.AddUserPageLink(@"/dashboard/app/install", "Install Config", "flight_takeoff");
     }
     else
     {
         //WebApp.AddUserPageLink(@"/dashboard/app/xpanel/xpanel?room=1", "XPanel", "touch_app");
     }
     //WebApp.AddUserPageLink(@"/dashboard/app/softwareupdates", "Updates", "cloud_download");
     WebApp.AddRoute(@"/au/manifest", typeof(PanelUpdateManifestHandler));
     WebApp.AddRoute(@"/api/app/update/<method:\w+>", typeof(SoftwareUpdateRequestHandler));
     WebApp.AddRoute(@"/api/app/update", typeof(SoftwareUpdateRequestHandler));
     WebApp.AddRoute(@"/dashboard/app/xpanel/<page:xpanel>", typeof(DashboardXPanelHandler));
     WebApp.AddRoute(@"/dashboard/app/xpanel/<filepath:[\/\w\.\-\[\]\(\)\x20]+>", typeof(XPanelFileHandler));
     WebApp.AddRoute(@"/dashboard/app/<page:\w+>", typeof(AppDashboardHandler));
     WebApp.AddRoute(@"/dashboard/app/content/<page:\w+>", typeof(AppDashboardContentHandler));
     WebApp.AddRoute(@"/xpanel", typeof(XPanelRedirectHandler));
     WebApp.AddRoute(@"/static/xpanel/<filepath:[\/\w\.\-\[\]\(\)\x20]+>", typeof(XPanelFileHandler));
     WebApp.AddRoute(@"/static/app/<filepath:[\/\w\.\-\[\]\(\)\x20]+>", typeof(StaticFileHandler));
     WebApp.DashboardCustomScriptPath = @"/static/app/js/dashboard-app-scripts.js";
 }