From addc6c51e26ca70146ca20233c7dd63b94948889 Mon Sep 17 00:00:00 2001 From: yangxiaodong Date: Sun, 27 Aug 2017 18:31:25 +0800 Subject: [PATCH] add options. --- src/DotNetCore.CAP/DashboardOptions.cs | 29 +++++++++++++++ src/DotNetCore.CAP/DotNetCore.CAP.csproj | 46 ++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 src/DotNetCore.CAP/DashboardOptions.cs diff --git a/src/DotNetCore.CAP/DashboardOptions.cs b/src/DotNetCore.CAP/DashboardOptions.cs new file mode 100644 index 0000000..1b23ecd --- /dev/null +++ b/src/DotNetCore.CAP/DashboardOptions.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Text; +using DotNetCore.CAP.Dashboard; + +namespace DotNetCore.CAP +{ + public class DashboardOptions + { + public DashboardOptions() + { + AppPath = "/"; + Authorization = new[] { new LocalRequestsOnlyAuthorizationFilter() }; + StatsPollingInterval = 2000; + } + + /// + /// The path for the Back To Site link. Set to in order to hide the Back To Site link. + /// + public string AppPath { get; set; } + + public IEnumerable Authorization { get; set; } + + /// + /// The interval the /stats endpoint should be polled with. + /// + public int StatsPollingInterval { get; set; } + } +} diff --git a/src/DotNetCore.CAP/DotNetCore.CAP.csproj b/src/DotNetCore.CAP/DotNetCore.CAP.csproj index e0e473f..4f96bf4 100644 --- a/src/DotNetCore.CAP/DotNetCore.CAP.csproj +++ b/src/DotNetCore.CAP/DotNetCore.CAP.csproj @@ -7,6 +7,44 @@ DotNetCore.CAP $(PackageTags); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -18,6 +56,14 @@ + + + + + + + +