mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Disable machine url stuff, broke a ton of things, and I need to get some better tests in place.
This commit is contained in:
parent
a5c937a59f
commit
e53bed7bac
@ -43,7 +43,6 @@ namespace Wabbajack.CacheServer
|
||||
var summaries = ModLists.Values.Select(m => new ModlistSummary
|
||||
{
|
||||
Name = m.Name,
|
||||
MachineName = m.MachineName,
|
||||
Checked = m.Checked,
|
||||
Failed = m.Archives.Count(a => a.Item2),
|
||||
Passed = m.Archives.Count(a => !a.Item2),
|
||||
@ -193,13 +192,11 @@ namespace Wabbajack.CacheServer
|
||||
var status = new ModListStatus
|
||||
{
|
||||
Name = list.Title,
|
||||
MachineName = list.Links.MachineURL,
|
||||
Archives = validated.OrderBy(v => v.archive.Name).ToList(),
|
||||
DownloadMetaData = list.DownloadMetadata,
|
||||
HasFailures = validated.Any(v => v.is_failed)
|
||||
};
|
||||
|
||||
statuses.Add(status.MachineName, status);
|
||||
statuses.Add(status.Name, status);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
@ -7,6 +8,8 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Nancy;
|
||||
using Nancy.Bootstrapper;
|
||||
using Nancy.Configuration;
|
||||
using Nancy.Diagnostics;
|
||||
using Nancy.Hosting.Self;
|
||||
using Nancy.TinyIoc;
|
||||
|
||||
@ -21,7 +24,6 @@ namespace Wabbajack.CacheServer
|
||||
{
|
||||
Address = address;
|
||||
_config = new HostConfiguration {MaximumConnectionCount = 24, RewriteLocalhost = true};
|
||||
|
||||
//_config.UrlReservations.CreateAutomatically = true;
|
||||
_server = new NancyHost(_config, new Uri(address));
|
||||
|
||||
@ -52,5 +54,12 @@ namespace Wabbajack.CacheServer
|
||||
.WithHeader("Access-Control-Allow-Headers", "Accept, Origin, Content-type");
|
||||
});
|
||||
}
|
||||
|
||||
public override void Configure(INancyEnvironment environment)
|
||||
{
|
||||
environment.Tracing(
|
||||
enabled: true,
|
||||
displayErrorTraces: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -110,12 +110,11 @@ namespace Wabbajack.Lib.ModListRegistry
|
||||
public class ModlistSummary
|
||||
{
|
||||
public string Name;
|
||||
public string MachineName;
|
||||
public DateTime Checked;
|
||||
public int Failed;
|
||||
public int Passed;
|
||||
public string Link => $"/lists/status/{MachineName}.json";
|
||||
public string Report => $"/lists/status/{MachineName}.html";
|
||||
public string Link => $"/lists/status/{Name}.json";
|
||||
public string Report => $"/lists/status/{Name}.html";
|
||||
public bool HasFailures => Failed > 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user