@@ -12,7 +12,7 @@ | |||||
<PackageReference Include="Dapper" Version="1.50.2" /> | <PackageReference Include="Dapper" Version="1.50.2" /> | ||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.0.0" /> | <PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.0.0" /> | ||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.0.0" /> | <PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.0.0" /> | ||||
<PackageReference Include="MySqlConnector" Version="0.25.1" /> | |||||
<PackageReference Include="MySqlConnector" Version="0.26.5" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -26,7 +26,7 @@ namespace DotNetCore.CAP | |||||
services.AddSingleton<IHttpClientCache, MemoryHttpClientCache>(); | services.AddSingleton<IHttpClientCache, MemoryHttpClientCache>(); | ||||
services.AddSingleton<IRequestMapper, RequestMapper>(); | services.AddSingleton<IRequestMapper, RequestMapper>(); | ||||
//services.AddScoped<IRequestScopedDataRepository, ScopedDataRepository>(); | //services.AddScoped<IRequestScopedDataRepository, ScopedDataRepository>(); | ||||
services.AddScoped<IRequestScopedDataRepository, HttpDataRepository>(); | |||||
//services.AddScoped<IRequestScopedDataRepository, HttpDataRepository>(); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -25,8 +25,6 @@ namespace DotNetCore.CAP.Dashboard | |||||
public DashboardResponse Response { get; protected set; } | public DashboardResponse Response { get; protected set; } | ||||
public ISession Session { get; protected set; } | |||||
public IServiceProvider RequestServices { get; protected set; } | public IServiceProvider RequestServices { get; protected set; } | ||||
} | } | ||||
@@ -44,7 +42,6 @@ namespace DotNetCore.CAP.Dashboard | |||||
Request = new CapDashboardRequest(httpContext); | Request = new CapDashboardRequest(httpContext); | ||||
Response = new CapDashboardResponse(httpContext); | Response = new CapDashboardResponse(httpContext); | ||||
RequestServices = httpContext.RequestServices; | RequestServices = httpContext.RequestServices; | ||||
Session = httpContext.Session; | |||||
} | } | ||||
public HttpContext HttpContext { get; } | public HttpContext HttpContext { get; } | ||||
@@ -192,7 +192,7 @@ namespace DotNetCore.CAP.Dashboard | |||||
public NonEscapedString NodeSwitchLink(string id) | public NonEscapedString NodeSwitchLink(string id) | ||||
{ | { | ||||
return Raw($"<a class=\"job-method\" href=\"{_page.Url.NodeSwitch(id)}\">{Strings.NodePage_Switch}</a>"); | |||||
return Raw($"<a class=\"job-method\" onclick=\"nodeSwitch({id});\" href=\"javascript:;\">{Strings.NodePage_Switch}</a>"); | |||||
} | } | ||||
#region MethodEscaped | #region MethodEscaped | ||||
@@ -1,4 +1,5 @@ | |||||
using System; | using System; | ||||
using System.Net; | |||||
namespace DotNetCore.CAP.Dashboard | namespace DotNetCore.CAP.Dashboard | ||||
{ | { | ||||
@@ -31,7 +32,7 @@ namespace DotNetCore.CAP.Dashboard | |||||
public string NodeSwitch(string id) | public string NodeSwitch(string id) | ||||
{ | { | ||||
return To("/nodes/node/" + id); | |||||
return To("/nodes/node/" + WebUtility.UrlEncode(id)); | |||||
} | } | ||||
public string LinkToPublished() | public string LinkToPublished() | ||||