From f606b58986ae10a527496f5c98b40ff86ae54208 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 24 Jan 2015 17:04:44 -0800 Subject: [PATCH] Increased requirejs timeout set timeout when running in prod regardless of hostname --- .../Frontend/Mappers/IndexHtmlMapper.cs | 1 + src/UI/index.html | 13 +++++++------ src/UI/main.js | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs b/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs index 06dce86aa..b355fce5c 100644 --- a/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs +++ b/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs @@ -95,6 +95,7 @@ namespace NzbDrone.Api.Frontend.Mappers text = text.Replace("APP_BRANCH", _configFileProvider.Branch.ToLower()); text = text.Replace("APP_ANALYTICS", _analyticsService.IsEnabled.ToString().ToLowerInvariant()); text = text.Replace("URL_BASE", URL_BASE); + text = text.Replace("PRODUCTION", RuntimeInfoBase.IsProduction.ToString().ToLowerInvariant()); _generatedContent = text; diff --git a/src/UI/index.html b/src/UI/index.html index 8c2e48ab8..bb3186557 100644 --- a/src/UI/index.html +++ b/src/UI/index.html @@ -76,12 +76,13 @@
diff --git a/src/UI/main.js b/src/UI/main.js index 4f01acbcd..a07160469 100644 --- a/src/UI/main.js +++ b/src/UI/main.js @@ -2,7 +2,7 @@ urlArgs: 'v=' + window.NzbDrone.Version }); -if (window.location.hostname.toLowerCase() !== 'localhost') { +if (window.NzbDrone.Production) { require.config({ waitSeconds: 30 });