Browse Source

refactor

master
Savorboard 7 years ago
parent
commit
aa3615830d
5 changed files with 5 additions and 7 deletions
  1. +1
    -1
      src/DotNetCore.CAP.MySql/DotNetCore.CAP.MySql.csproj
  2. +1
    -1
      src/DotNetCore.CAP/Dashboard/CAP.DashboardOptionsExtensions.cs
  3. +0
    -3
      src/DotNetCore.CAP/Dashboard/DashboardContext.cs
  4. +1
    -1
      src/DotNetCore.CAP/Dashboard/HtmlHelper.cs
  5. +2
    -1
      src/DotNetCore.CAP/Dashboard/UrlHelper.cs

+ 1
- 1
src/DotNetCore.CAP.MySql/DotNetCore.CAP.MySql.csproj View File

@@ -12,7 +12,7 @@
<PackageReference Include="Dapper" Version="1.50.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore" 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>


+ 1
- 1
src/DotNetCore.CAP/Dashboard/CAP.DashboardOptionsExtensions.cs View File

@@ -26,7 +26,7 @@ namespace DotNetCore.CAP
services.AddSingleton<IHttpClientCache, MemoryHttpClientCache>();
services.AddSingleton<IRequestMapper, RequestMapper>();
//services.AddScoped<IRequestScopedDataRepository, ScopedDataRepository>();
services.AddScoped<IRequestScopedDataRepository, HttpDataRepository>();
//services.AddScoped<IRequestScopedDataRepository, HttpDataRepository>();
}
}
}


+ 0
- 3
src/DotNetCore.CAP/Dashboard/DashboardContext.cs View File

@@ -25,8 +25,6 @@ namespace DotNetCore.CAP.Dashboard

public DashboardResponse Response { get; protected set; }

public ISession Session { get; protected set; }

public IServiceProvider RequestServices { get; protected set; }
}

@@ -44,7 +42,6 @@ namespace DotNetCore.CAP.Dashboard
Request = new CapDashboardRequest(httpContext);
Response = new CapDashboardResponse(httpContext);
RequestServices = httpContext.RequestServices;
Session = httpContext.Session;
}

public HttpContext HttpContext { get; }


+ 1
- 1
src/DotNetCore.CAP/Dashboard/HtmlHelper.cs View File

@@ -192,7 +192,7 @@ namespace DotNetCore.CAP.Dashboard

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


+ 2
- 1
src/DotNetCore.CAP/Dashboard/UrlHelper.cs View File

@@ -1,4 +1,5 @@
using System;
using System.Net;

namespace DotNetCore.CAP.Dashboard
{
@@ -31,7 +32,7 @@ namespace DotNetCore.CAP.Dashboard

public string NodeSwitch(string id)
{
return To("/nodes/node/" + id);
return To("/nodes/node/" + WebUtility.UrlEncode(id));
}

public string LinkToPublished()


Loading…
Cancel
Save