-
Notifications
You must be signed in to change notification settings - Fork 808
/
Copy pathOptions.cs
34 lines (28 loc) · 1.12 KB
/
Options.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
namespace HealthChecks.UI.Configuration;
public class Options
{
internal ICollection<string> CustomStylesheets { get; } = new List<string>();
public string UIPath { get; set; } = "/healthchecks-ui";
public string ApiPath { get; set; } = "/healthchecks-api";
public bool UseRelativeApiPath = true;
public string WebhookPath { get; set; } = "/healthchecks-webhooks";
public bool UseRelativeWebhookPath = true;
public string ResourcesPath { get; set; } = "/ui/resources";
public bool UseRelativeResourcesPath = true;
public bool AsideMenuOpened { get; set; } = true;
public string PageTitle { get; set; } = "Health Checks UI";
public Options AddCustomStylesheet(string path)
{
string stylesheetPath = path;
if (!Path.IsPathFullyQualified(stylesheetPath))
{
stylesheetPath = Path.Combine(Environment.CurrentDirectory, path);
}
if (!File.Exists(stylesheetPath))
{
throw new Exception($"Could not find style sheet at path {stylesheetPath}");
}
CustomStylesheets.Add(stylesheetPath);
return this;
}
}