add series style fixes.

pull/6/head
kay.one 12 years ago
parent b59a7f4ddf
commit 8dc32f7d3d

@ -1,4 +1,4 @@
<div class="accordion result-list span12 offset4 existing-root-folder-view">
<div class="accordion result-list span12 existing-root-folder-view">
<h1>{{path}}</h1>
<div class="x-existing-folder-container" />
</div>

@ -1,5 +1,5 @@
<div class="row unmapped-folder-view">
<div class="span11">
<div class="span12">
<div class="row folder-header">
<input class="x-txt-search input-xlarge" type="text" value="{{folder.name}}" placeholder="{{folder.name}}"></input>
<select class="span2 x-lst-quality-profile">
@ -13,7 +13,7 @@
</div>
<div class="row">
<div class="x-folder-name-match-results span10 offset1" />
<div class="x-folder-name-match-results span12" />
</div>
</div>
</div>

@ -1,8 +1,8 @@
<div class="tab-pane" id="root-dir">
<div class="input-prepend input-append nz-input-large x-path">
<i class="add-on icon-folder-open"></i>
<input type="text" class="span10" placeholder="Path of the folder to add ...">
<input type="text" class="span11" placeholder="Path of the folder to add ...">
<div class="btn icon-plus btn-success x-add" />
</div>
<div class="span15 offset2 result-list" id="current-dirs" />
<div class="span12 result-list" id="current-dirs" />
</div>

@ -13,7 +13,6 @@
width: 40px;
padding-top: 14px;
padding-left: 10px;
margin-left: 30px;
}
.result-list {

@ -6,7 +6,7 @@
<li><a href="#import-existing" class="x-import-existing-tab">Import Existing Series</a></li>
<li><a href="#root-folders" class ="x-root-folders-tab">TV Folders</a></li>
</ul>
<div class="tab-content nz-center">
<div class="tab-content">
<div class="tab-pane" id="add-new">Add new series.</div>
<div class="tab-pane" id="import-existing">Import existing.</div>
<div class="tab-pane" id="root-folders">Manage root folders</div>

@ -1,7 +1,5 @@
using System;
using System.Diagnostics;
using System.Net;
using System.Runtime.Remoting;
using System.Threading;
using NLog;
using NzbDrone.Common;
@ -12,40 +10,23 @@ namespace NzbDrone.Providers
{
private static readonly Logger logger = LogManager.GetLogger("Host.MonitoringProvider");
private readonly IHostController _hostController;
private readonly ProcessProvider _processProvider;
private readonly HttpProvider _httpProvider;
private readonly ConfigFileProvider _configFileProvider;
private int _pingFailCounter;
private Timer _pingTimer;
private Timer _processPriorityCheckTimer;
public MonitoringProvider(ProcessProvider processProvider, IHostController hostController,
HttpProvider httpProvider, ConfigFileProvider configFileProvider)
public MonitoringProvider(ProcessProvider processProvider)
{
_processProvider = processProvider;
_hostController = hostController;
_httpProvider = httpProvider;
_configFileProvider = configFileProvider;
}
public MonitoringProvider()
{
}
public void Start()
{
AppDomain.CurrentDomain.UnhandledException += ((s, e) => AppDomainException(e.ExceptionObject as Exception));
AppDomain.CurrentDomain.ProcessExit += ProgramExited;
AppDomain.CurrentDomain.DomainUnload += ProgramExited;
_processPriorityCheckTimer = new Timer(EnsurePriority);
_processPriorityCheckTimer.Change(TimeSpan.FromSeconds(15), TimeSpan.FromMinutes(30));
_pingTimer = new Timer(PingServer);
_pingTimer.Change(TimeSpan.FromSeconds(5), TimeSpan.FromMinutes(1));
}
public virtual void EnsurePriority(object sender)
@ -71,50 +52,9 @@ namespace NzbDrone.Providers
}
}
public virtual void PingServer(object sender)
{
if (!_hostController.ServerStarted) return;
try
{
ICredentials identity = CredentialCache.DefaultCredentials;
_httpProvider.DownloadString(_hostController.AppUrl, identity); //This should preload the home page, making the first load faster.
string response = _httpProvider.DownloadString(_hostController.AppUrl + "/health", identity);
if (!response.Contains("OK"))
{
throw new ServerException("Health services responded with an invalid response.");
}
if (_pingFailCounter > 0)
{
logger.Info("Application pool has been successfully recovered.");
}
_pingFailCounter = 0;
}
catch (Exception ex)
{
_pingFailCounter++;
logger.Error("Application pool is not responding. Count: {0} - {1}", _pingFailCounter, ex.Message);
if (_pingFailCounter >= 10)
{
_pingFailCounter = 0;
_hostController.RestartServer();
}
}
}
private void ProgramExited(object sender, EventArgs e)
{
_hostController.StopServer();
}
public static void AppDomainException(Exception excepion)
{
Console.WriteLine("EPIC FAIL: {0}", excepion);
logger.FatalException("EPIC FAIL: " + excepion.Message, excepion);
}
}

Loading…
Cancel
Save