Commit 695777c8 authored by yangxiaodong's avatar yangxiaodong

add routes.

parent 1b919d60
......@@ -29,7 +29,19 @@ namespace DotNetCore.CAP.Dashboard
routes.Add(pathTemplate, new CommandDispatcher(command));
}
public static void AddBatchCommand(
public static void AddJsonResult(
this RouteCollection routes,
string pathTemplate,
Func<DashboardContext, object> func)
{
if (routes == null) throw new ArgumentNullException(nameof(routes));
if (pathTemplate == null) throw new ArgumentNullException(nameof(pathTemplate));
if (func == null) throw new ArgumentNullException(nameof(func));
routes.Add(pathTemplate, new JsonDispatcher(func));
}
public static void AddPublishBatchCommand(
this RouteCollection routes,
string pathTemplate,
Action<DashboardContext, string> command)
......
......@@ -10,6 +10,7 @@
<ItemGroup>
<None Remove="Dashboard\Content\css\bootstrap.min.css" />
<None Remove="Dashboard\Content\css\jsonview.min.css" />
<None Remove="Dashboard\Content\css\rickshaw.min.css" />
<None Remove="Dashboard\Content\fonts\glyphicons-halflings-regular.eot" />
<None Remove="Dashboard\Content\fonts\glyphicons-halflings-regular.svg" />
......@@ -20,6 +21,7 @@
<None Remove="Dashboard\Content\js\d3.layout.min.js" />
<None Remove="Dashboard\Content\js\d3.min.js" />
<None Remove="Dashboard\Content\js\jquery-2.1.4.min.js" />
<None Remove="Dashboard\Content\js\jsonview.min.js" />
<None Remove="Dashboard\Content\js\moment-with-locales.min.js" />
<None Remove="Dashboard\Content\js\moment.min.js" />
<None Remove="Dashboard\Content\js\rickshaw.min.js" />
......@@ -28,6 +30,7 @@
<ItemGroup>
<EmbeddedResource Include="Dashboard\Content\css\bootstrap.min.css" />
<EmbeddedResource Include="Dashboard\Content\css\cap.css" />
<EmbeddedResource Include="Dashboard\Content\css\jsonview.min.css" />
<EmbeddedResource Include="Dashboard\Content\css\rickshaw.min.css" />
<EmbeddedResource Include="Dashboard\Content\fonts\glyphicons-halflings-regular.eot" />
<EmbeddedResource Include="Dashboard\Content\fonts\glyphicons-halflings-regular.svg" />
......@@ -39,6 +42,7 @@
<EmbeddedResource Include="Dashboard\Content\js\d3.min.js" />
<EmbeddedResource Include="Dashboard\Content\js\cap.js" />
<EmbeddedResource Include="Dashboard\Content\js\jquery-2.1.4.min.js" />
<EmbeddedResource Include="Dashboard\Content\js\jsonview.min.js" />
<EmbeddedResource Include="Dashboard\Content\js\moment-with-locales.min.js" />
<EmbeddedResource Include="Dashboard\Content\js\moment.min.js" />
<EmbeddedResource Include="Dashboard\Content\js\rickshaw.min.js" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment