Increased requirejs timeout

set timeout when running in prod regardless of hostname
This commit is contained in:
Mark McDowall 2015-01-24 17:04:44 -08:00
parent 76dd663bae
commit f606b58986
3 changed files with 9 additions and 7 deletions

View File

@ -95,6 +95,7 @@ namespace NzbDrone.Api.Frontend.Mappers
text = text.Replace("APP_BRANCH", _configFileProvider.Branch.ToLower()); text = text.Replace("APP_BRANCH", _configFileProvider.Branch.ToLower());
text = text.Replace("APP_ANALYTICS", _analyticsService.IsEnabled.ToString().ToLowerInvariant()); text = text.Replace("APP_ANALYTICS", _analyticsService.IsEnabled.ToString().ToLowerInvariant());
text = text.Replace("URL_BASE", URL_BASE); text = text.Replace("URL_BASE", URL_BASE);
text = text.Replace("PRODUCTION", RuntimeInfoBase.IsProduction.ToString().ToLowerInvariant());
_generatedContent = text; _generatedContent = text;

View File

@ -76,12 +76,13 @@
<div id="errors"></div> <div id="errors"></div>
<script type="text/javascript"> <script type="text/javascript">
window.NzbDrone = { window.NzbDrone = {
ApiRoot : 'API_ROOT', ApiRoot : 'API_ROOT',
ApiKey : 'API_KEY', ApiKey : 'API_KEY',
Version : 'APP_VERSION', Version : 'APP_VERSION',
Branch : 'APP_BRANCH', Branch : 'APP_BRANCH',
Analytics : APP_ANALYTICS, Analytics : APP_ANALYTICS,
UrlBase : 'URL_BASE' UrlBase : 'URL_BASE',
Production : PRODUCTION
}; };
</script> </script>

View File

@ -2,7 +2,7 @@
urlArgs: 'v=' + window.NzbDrone.Version urlArgs: 'v=' + window.NzbDrone.Version
}); });
if (window.location.hostname.toLowerCase() !== 'localhost') { if (window.NzbDrone.Production) {
require.config({ require.config({
waitSeconds: 30 waitSeconds: 30
}); });