receivedFailed = monitor.HourlyFailedJobs(MessageType.Subscribe);
+
+ #line default
+ #line hidden
+WriteLiteral("\r\n\r\n
\r\n
");
}
diff --git a/src/DotNetCore.CAP.Dashboard/Pages/LayoutPage.generated.cs b/src/DotNetCore.CAP.Dashboard/Pages/LayoutPage.generated.cs
index 374062b..1e1fccf 100644
--- a/src/DotNetCore.CAP.Dashboard/Pages/LayoutPage.generated.cs
+++ b/src/DotNetCore.CAP.Dashboard/Pages/LayoutPage.generated.cs
@@ -11,313 +11,306 @@
namespace DotNetCore.CAP.Dashboard.Pages
{
-
-#line 2 "..\..\LayoutPage.cshtml"
+
+ #line 2 "..\..\Pages\LayoutPage.cshtml"
using System;
-
-#line default
-#line hidden
+
+ #line default
+ #line hidden
using System.Collections.Generic;
-
-#line 3 "..\..\LayoutPage.cshtml"
+
+ #line 3 "..\..\Pages\LayoutPage.cshtml"
using System.Globalization;
-
-#line default
-#line hidden
+
+ #line default
+ #line hidden
using System.Linq;
-
-#line 4 "..\..\LayoutPage.cshtml"
+
+ #line 4 "..\..\Pages\LayoutPage.cshtml"
using System.Reflection;
-
-#line default
-#line hidden
+
+ #line default
+ #line hidden
using System.Text;
-
-#line 5 "..\..\LayoutPage.cshtml"
+
+ #line 5 "..\..\Pages\LayoutPage.cshtml"
using DotNetCore.CAP.Dashboard.Pages;
-
-#line default
-#line hidden
-
-#line 6 "..\..\LayoutPage.cshtml"
+
+ #line default
+ #line hidden
+
+ #line 6 "..\..\Pages\LayoutPage.cshtml"
using DotNetCore.CAP.Dashboard.Resources;
-
-#line default
-#line hidden
-
+
+ #line default
+ #line hidden
+
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
public partial class LayoutPage : DotNetCore.CAP.Dashboard.RazorPage
{
#line hidden
- protected override void Execute()
+ public override void Execute()
{
- WriteLiteral("\r\n");
-
-
-
-
-
-
+WriteLiteral("\r\n");
- WriteLiteral("\r\n\r\n\r\n
");
-#line 11 "..\..\LayoutPage.cshtml"
- Write(Title);
+WriteLiteral("\r\n\r\n \r\n \r\n \r\n");
+
+ #line 9 "..\..\Pages\LayoutPage.cshtml"
+ Write(CultureInfo.CurrentUICulture.TwoLetterISOLanguageName);
+
+ #line default
+ #line hidden
+WriteLiteral("\">\r\n\r\n ");
-#line 15 "..\..\LayoutPage.cshtml"
- var version = GetType().GetTypeInfo().Assembly.GetName().Version;
+
+ #line 11 "..\..\Pages\LayoutPage.cshtml"
+ Write(Title);
+
+ #line default
+ #line hidden
+WriteLiteral(" - CAP\r\n \r\n \r\n \r\n");
-#line default
-#line hidden
- WriteLiteral("
+
+ #line default
+ #line hidden
+WriteLiteral(@""">
-
-
-
-
-
-
-
\r\n
\r\n\r\n \r\n
\r\n ");
-#line default
-#line hidden
- WriteLiteral("\r\n \r\n \r\n
");
+
+ #line 53 "..\..\Pages\LayoutPage.cshtml"
+ Write(RenderBody());
+
+ #line default
+ #line hidden
+WriteLiteral("\r\n \r\n
\r\n\r\n\r\n\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n\r\n \r\n\r\n");
+
+ #line default
+ #line hidden
+WriteLiteral("\">\r\n\r\n");
}
diff --git a/src/DotNetCore.CAP.Dashboard/Pages/NodePage.cs b/src/DotNetCore.CAP.Dashboard/Pages/NodePage.cs
index 9f677b8..c95b4df 100644
--- a/src/DotNetCore.CAP.Dashboard/Pages/NodePage.cs
+++ b/src/DotNetCore.CAP.Dashboard/Pages/NodePage.cs
@@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
using System.Collections.Generic;
-using DotNetCore.CAP.NodeDiscovery;
+using DotNetCore.CAP.Dashboard.NodeDiscovery;
using Microsoft.Extensions.DependencyInjection;
namespace DotNetCore.CAP.Dashboard.Pages
diff --git a/src/DotNetCore.CAP.Dashboard/Pages/NodePage.generated.cs b/src/DotNetCore.CAP.Dashboard/Pages/NodePage.generated.cs
index 9b205b1..e7a049d 100644
--- a/src/DotNetCore.CAP.Dashboard/Pages/NodePage.generated.cs
+++ b/src/DotNetCore.CAP.Dashboard/Pages/NodePage.generated.cs
@@ -15,243 +15,242 @@ namespace DotNetCore.CAP.Dashboard.Pages
using System.Collections.Generic;
using System.Linq;
using System.Text;
-
-#line 2 "..\..\NodePage.cshtml"
+
+ #line 2 "..\..\Pages\NodePage.cshtml"
using DotNetCore.CAP.Dashboard.Pages;
-
-#line default
-#line hidden
-
-#line 3 "..\..\NodePage.cshtml"
+
+ #line default
+ #line hidden
+
+ #line 3 "..\..\Pages\NodePage.cshtml"
using DotNetCore.CAP.Dashboard.Resources;
-
-#line default
-#line hidden
-
+
+ #line default
+ #line hidden
+
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
internal partial class NodePage : DotNetCore.CAP.Dashboard.RazorPage
{
#line hidden
- protected override void Execute()
+ public override void Execute()
{
- WriteLiteral("\r\n");
-
-
-
-
-
-
-#line 5 "..\..\NodePage.cshtml"
-
- Layout = new LayoutPage(Strings.NodePage_Title);
-
-
-
-#line default
-#line hidden
- WriteLiteral("
\r\n
\r\n \r\n\r\n");
-
-
-
-#line 12 "..\..\NodePage.cshtml"
- if (Nodes == null || Nodes.Count == 0)
- {
-
-
-#line default
-#line hidden
- WriteLiteral("
\r\n ");
-
-
-
-#line 15 "..\..\NodePage.cshtml"
- Write(Strings.NodePage_NoNodes);
-
-
-#line default
-#line hidden
- WriteLiteral("\r\n
\r\n");
-
-
-
-#line 17 "..\..\NodePage.cshtml"
- }
- else
- {
-
-
-#line default
-#line hidden
- WriteLiteral("
\r\n
" +
- "\r\n \r\n \r\n " +
- " ");
-
-
-
-#line 24 "..\..\NodePage.cshtml"
- Write(Strings.Common_Id);
-
-
-#line default
-#line hidden
- WriteLiteral(" | \r\n ");
-
-
-
-#line 25 "..\..\NodePage.cshtml"
- Write(Strings.NodePage_Table_NodeName);
-
-
-#line default
-#line hidden
- WriteLiteral(" | \r\n ");
-
+WriteLiteral("\r\n");
-#line 26 "..\..\NodePage.cshtml"
- Write(Strings.NodePage_Table_IP);
-#line default
-#line hidden
- WriteLiteral(" | \r\n ");
+
+ #line 5 "..\..\Pages\NodePage.cshtml"
+
+ Layout = new LayoutPage(Strings.NodePage_Title);
-#line 27 "..\..\NodePage.cshtml"
- Write(Strings.NodePage_Table_Port);
+
+ #line default
+ #line hidden
+WriteLiteral(" | \r\n Tags | \r\n ");
+
+ #line 10 "..\..\Pages\NodePage.cshtml"
+ Write(Strings.NodePage_Title);
+
+ #line default
+ #line hidden
+WriteLiteral("\r\n\r\n");
-#line 29 "..\..\NodePage.cshtml"
- Write(Strings.NodePage_Switch);
+
+ #line 12 "..\..\Pages\NodePage.cshtml"
+ if (Nodes == null || Nodes.Count == 0)
+ {
+
+ #line default
+ #line hidden
+WriteLiteral(" \r\n ");
-#line default
-#line hidden
- WriteLiteral(" | \r\n
\r\n \r\n " +
- " \r\n");
+
+ #line 15 "..\..\Pages\NodePage.cshtml"
+ Write(Strings.NodePage_NoNodes);
+
+ #line default
+ #line hidden
+WriteLiteral("\r\n \r\n");
-#line 33 "..\..\NodePage.cshtml"
- foreach (var node in Nodes)
- {
+
+ #line 17 "..\..\Pages\NodePage.cshtml"
+ }
+ else
+ {
-#line default
-#line hidden
- WriteLiteral(" \r\n " +
+"\r\n \r\n \r\n " +
+" ");
+
+ #line 24 "..\..\Pages\NodePage.cshtml"
+ Write(Strings.Common_Id);
-#line 35 "..\..\NodePage.cshtml"
- Write(CurrentNodeId == node.Id ? "active" : null);
+
+ #line default
+ #line hidden
+WriteLiteral(" | \r\n ");
-#line default
-#line hidden
- WriteLiteral("\">\r\n | ");
+
+ #line 25 "..\..\Pages\NodePage.cshtml"
+ Write(Strings.NodePage_Table_NodeName);
+
+ #line default
+ #line hidden
+WriteLiteral("\r\n | ");
-#line 36 "..\..\NodePage.cshtml"
- Write(node.Id);
+
+ #line 26 "..\..\Pages\NodePage.cshtml"
+ Write(Strings.NodePage_Table_IP);
+
+ #line default
+ #line hidden
+WriteLiteral(" | \r\n ");
-#line default
-#line hidden
- WriteLiteral("\r\n | ");
+
+ #line 27 "..\..\Pages\NodePage.cshtml"
+ Write(Strings.NodePage_Table_Port);
+
+ #line default
+ #line hidden
+WriteLiteral("\r\n | Tags | \r\n ");
-#line 37 "..\..\NodePage.cshtml"
- Write(node.Name);
+
+ #line 29 "..\..\Pages\NodePage.cshtml"
+ Write(Strings.NodePage_Switch);
-#line default
-#line hidden
- WriteLiteral("\r\n | ");
+
+ #line default
+ #line hidden
+WriteLiteral("\r\n |
\r\n \r\n " +
+" \r\n");
+
+ #line 33 "..\..\Pages\NodePage.cshtml"
+ foreach (var node in Nodes)
+ {
-#line 38 "..\..\NodePage.cshtml"
- Write(node.Address);
+
+ #line default
+ #line hidden
+WriteLiteral(" \r\n ");
+
+ #line 35 "..\..\Pages\NodePage.cshtml"
+ Write(CurrentNodeId == node.Id ? "active" : null);
+
+ #line default
+ #line hidden
+WriteLiteral("\">\r\n | ");
-#line 39 "..\..\NodePage.cshtml"
- Write(node.Port);
+
+ #line 36 "..\..\Pages\NodePage.cshtml"
+ Write(node.Id);
+
+ #line default
+ #line hidden
+WriteLiteral(" | \r\n ");
-#line default
-#line hidden
- WriteLiteral(" | \r\n ");
+
+ #line 37 "..\..\Pages\NodePage.cshtml"
+ Write(node.Name);
+
+ #line default
+ #line hidden
+WriteLiteral(" | \r\n ");
-#line 40 "..\..\NodePage.cshtml"
- Write(node.Tags);
+
+ #line 38 "..\..\Pages\NodePage.cshtml"
+ Write(node.Address);
-#line default
-#line hidden
- WriteLiteral(" | \r\n \r\n " +
- "");
+
+ #line default
+ #line hidden
+WriteLiteral(" | \r\n ");
+
+ #line 39 "..\..\Pages\NodePage.cshtml"
+ Write(node.Port);
-#line 42 "..\..\NodePage.cshtml"
- Write(Html.NodeSwitchLink(node.Id));
+
+ #line default
+ #line hidden
+WriteLiteral(" | \r\n ");
-#line default
-#line hidden
- WriteLiteral("\r\n | \r\n
\r\n");
+
+ #line 40 "..\..\Pages\NodePage.cshtml"
+ Write(node.Tags);
+
+ #line default
+ #line hidden
+WriteLiteral("\r\n \r\n ");
-#line 45 "..\..\NodePage.cshtml"
- }
+
+ #line 42 "..\..\Pages\NodePage.cshtml"
+ Write(Html.NodeSwitchLink(node.Id));
+
+ #line default
+ #line hidden
+WriteLiteral("\r\n | \r\n \r\n");
-#line default
-#line hidden
- WriteLiteral(" \r\n
\r\n \r\n");
+
+ #line 45 "..\..\Pages\NodePage.cshtml"
+ }
+
+ #line default
+ #line hidden
+WriteLiteral("
\r\n
\r\n
\r\n");
-#line 49 "..\..\NodePage.cshtml"
- }
+
+ #line 49 "..\..\Pages\NodePage.cshtml"
+ }
-#line default
-#line hidden
- WriteLiteral("
\r\n
");
+
+ #line default
+ #line hidden
+WriteLiteral("
\r\n ");
}
diff --git a/src/DotNetCore.CAP.Dashboard/Pages/PublishedPage.cs b/src/DotNetCore.CAP.Dashboard/Pages/PublishedPage.cs
index 2ccece2..d652c17 100644
--- a/src/DotNetCore.CAP.Dashboard/Pages/PublishedPage.cs
+++ b/src/DotNetCore.CAP.Dashboard/Pages/PublishedPage.cs
@@ -2,21 +2,22 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
+using DotNetCore.CAP.Monitoring;
namespace DotNetCore.CAP.Dashboard.Pages
{
- internal partial class PublishedPage
+ internal partial class PublishedPage : DotNetCore.CAP.Dashboard.RazorPage
{
public PublishedPage(string statusName)
{
- StatusName = statusName;
+ Name = statusName;
}
- public string StatusName { get; set; }
+ public string Name { get; set; }
public int GetTotal(IMonitoringApi api)
{
- if (string.Equals(StatusName, Infrastructure.StatusName.Succeeded,
+ if (string.Equals(Name, nameof(Internal.StatusName.Succeeded),
StringComparison.CurrentCultureIgnoreCase))
{
return api.PublishedSucceededCount();
diff --git a/src/DotNetCore.CAP.Dashboard/Pages/PublishedPage.cshtml b/src/DotNetCore.CAP.Dashboard/Pages/PublishedPage.cshtml
index d4313db..dba410f 100644
--- a/src/DotNetCore.CAP.Dashboard/Pages/PublishedPage.cshtml
+++ b/src/DotNetCore.CAP.Dashboard/Pages/PublishedPage.cshtml
@@ -1,10 +1,10 @@
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@using System
@using DotNetCore.CAP.Dashboard
-@using DotNetCore.CAP.Dashboard.Monitoring
@using DotNetCore.CAP.Dashboard.Pages
@using DotNetCore.CAP.Dashboard.Resources
@using DotNetCore.CAP.Messages
+@using DotNetCore.CAP.Monitoring
@inherits DotNetCore.CAP.Dashboard.RazorPage
@{
Layout = new LayoutPage(Strings.PublishedMessagesPage_Title);
@@ -23,7 +23,7 @@
MessageType = MessageType.Publish,
Name = name,
Content = content,
- StatusName = StatusName,
+ StatusName = Name,
CurrentPage = pager.CurrentPage - 1,
PageSize = pager.RecordsPerPage
};
@@ -84,7 +84,7 @@
@Strings.Common_Version |
@Strings.MessagesPage_Table_Name |
@Strings.MessagesPage_Table_Retries |
- @if (string.Equals(StatusName, "Processing", StringComparison.CurrentCultureIgnoreCase))
+ @if (string.Equals(Name, "Processing", StringComparison.CurrentCultureIgnoreCase))
{
@Strings.MessagesPage_Table_State |
}
@@ -110,7 +110,7 @@
@message.Retries
|
- @if (string.Equals(StatusName, "Processing", StringComparison.CurrentCultureIgnoreCase))
+ @if (string.Equals(Name, "Processing", StringComparison.CurrentCultureIgnoreCase))
{
@message.StatusName
diff --git a/src/DotNetCore.CAP.Dashboard/Pages/PublishedPage.generated.cs b/src/DotNetCore.CAP.Dashboard/Pages/PublishedPage.generated.cs
index 250c6c8..8d2bee3 100644
--- a/src/DotNetCore.CAP.Dashboard/Pages/PublishedPage.generated.cs
+++ b/src/DotNetCore.CAP.Dashboard/Pages/PublishedPage.generated.cs
@@ -1,6 +1,4 @@
-using DotNetCore.CAP.Messages;
-
-#pragma warning disable 1591
+#pragma warning disable 1591
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
@@ -13,567 +11,581 @@
namespace DotNetCore.CAP.Dashboard.Pages
{
-
-#line 2 "..\..\PublishedPage.cshtml"
+
+ #line 2 "..\..\Pages\PublishedPage.cshtml"
using System;
-
-#line default
-#line hidden
+
+ #line default
+ #line hidden
using System.Collections.Generic;
using System.Linq;
using System.Text;
-
-#line 4 "..\..\PublishedPage.cshtml"
+
+ #line 3 "..\..\Pages\PublishedPage.cshtml"
using DotNetCore.CAP.Dashboard;
-
-#line default
-#line hidden
-
-#line 6 "..\..\PublishedPage.cshtml"
- using DotNetCore.CAP.Dashboard.Monitoring;
-
-#line default
-#line hidden
-
-#line 5 "..\..\PublishedPage.cshtml"
+
+ #line default
+ #line hidden
+
+ #line 4 "..\..\Pages\PublishedPage.cshtml"
using DotNetCore.CAP.Dashboard.Pages;
-
-#line default
-#line hidden
-
-#line 7 "..\..\PublishedPage.cshtml"
+
+ #line default
+ #line hidden
+
+ #line 5 "..\..\Pages\PublishedPage.cshtml"
using DotNetCore.CAP.Dashboard.Resources;
-
-#line default
-#line hidden
-
-#line 3 "..\..\PublishedPage.cshtml"
-
-#line default
-#line hidden
-
+
+ #line default
+ #line hidden
+
+ #line 6 "..\..\Pages\PublishedPage.cshtml"
+ using DotNetCore.CAP.Messages;
+
+ #line default
+ #line hidden
+
+ #line 7 "..\..\Pages\PublishedPage.cshtml"
+ using DotNetCore.CAP.Monitoring;
+
+ #line default
+ #line hidden
+
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
- internal partial class PublishedPage : RazorPage
+ internal partial class PublishedPage : DotNetCore.CAP.Dashboard.RazorPage
{
#line hidden
- protected override void Execute()
+ public override void Execute()
{
- WriteLiteral("\r\n");
-
-
-
-
-
-
-
-
-
-
-#line 9 "..\..\PublishedPage.cshtml"
-
- Layout = new LayoutPage(Strings.PublishedMessagesPage_Title);
-
- int from, perPage;
-
- int.TryParse(Query("from"), out from);
- int.TryParse(Query("count"), out perPage);
- string name = Query("name");
- string content = Query("content");
-
- var monitor = Storage.GetMonitoringApi();
- var pager = new Pager(from, perPage, GetTotal(monitor));
- var queryDto = new MessageQueryDto
- {
- MessageType = MessageType.Publish,
- Name = name,
- Content = content,
- StatusName = StatusName,
- CurrentPage = pager.CurrentPage - 1,
- PageSize = pager.RecordsPerPage
- };
- var succeededMessages = monitor.Messages(queryDto);
-
-
-
-#line default
-#line hidden
- WriteLiteral("\r\n\r\n \r\n ");
-
-
-
-#line 35 "..\..\PublishedPage.cshtml"
- Write(Html.MessagesSidebar(MessageType.Publish));
-
-
-#line default
-#line hidden
- WriteLiteral("\r\n \r\n \r\n \r\n\r\n");
-#line 40 "..\..\PublishedPage.cshtml"
- if (succeededMessages.Count == 0)
- {
-#line default
-#line hidden
- WriteLiteral(" \r\n ");
+
+ #line 9 "..\..\Pages\PublishedPage.cshtml"
+
+ Layout = new LayoutPage(Strings.PublishedMessagesPage_Title);
+ int from, perPage;
+ int.TryParse(Query("from"), out from);
+ int.TryParse(Query("count"), out perPage);
+ var name = Query("name");
+ var content = Query("content");
-#line 43 "..\..\PublishedPage.cshtml"
- Write(Strings.MessagesPage_NoMessages);
+ var monitor = Storage.GetMonitoringApi();
+ var pager = new Pager(from, perPage, GetTotal(monitor));
+ var queryDto = new MessageQueryDto
+ {
+ MessageType = MessageType.Publish,
+ Name = name,
+ Content = content,
+ StatusName = Name,
+ CurrentPage = pager.CurrentPage - 1,
+ PageSize = pager.RecordsPerPage
+ };
+ var succeededMessages = monitor.Messages(queryDto);
-#line default
-#line hidden
- WriteLiteral("\r\n \r\n");
+
+ #line default
+ #line hidden
+WriteLiteral("\r\n \r\n \r\n ");
+
+ #line 35 "..\..\Pages\PublishedPage.cshtml"
+ Write(Html.MessagesSidebar(MessageType.Publish));
-#line 45 "..\..\PublishedPage.cshtml"
- }
- else
- {
+
+ #line default
+ #line hidden
+WriteLiteral("\r\n \r\n \r\n \r\n ");
}
diff --git a/src/DotNetCore.CAP.Dashboard/Pages/ReceivedPage.cs b/src/DotNetCore.CAP.Dashboard/Pages/ReceivedPage.cs
index 9090876..f8d4249 100644
--- a/src/DotNetCore.CAP.Dashboard/Pages/ReceivedPage.cs
+++ b/src/DotNetCore.CAP.Dashboard/Pages/ReceivedPage.cs
@@ -2,6 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
+using DotNetCore.CAP.Monitoring;
namespace DotNetCore.CAP.Dashboard.Pages
{
@@ -16,7 +17,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
public int GetTotal(IMonitoringApi api)
{
- if (string.Equals(StatusName, Infrastructure.StatusName.Succeeded,
+ if (string.Equals(StatusName, nameof(Internal.StatusName.Succeeded),
StringComparison.CurrentCultureIgnoreCase))
{
return api.ReceivedSucceededCount();
diff --git a/src/DotNetCore.CAP.Dashboard/Pages/ReceivedPage.cshtml b/src/DotNetCore.CAP.Dashboard/Pages/ReceivedPage.cshtml
index fb179cf..64affa5 100644
--- a/src/DotNetCore.CAP.Dashboard/Pages/ReceivedPage.cshtml
+++ b/src/DotNetCore.CAP.Dashboard/Pages/ReceivedPage.cshtml
@@ -1,10 +1,10 @@
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@using System
@using DotNetCore.CAP.Dashboard
-@using DotNetCore.CAP.Dashboard.Monitoring
@using DotNetCore.CAP.Dashboard.Pages
@using DotNetCore.CAP.Dashboard.Resources
@using DotNetCore.CAP.Messages
+@using DotNetCore.CAP.Monitoring
@inherits DotNetCore.CAP.Dashboard.RazorPage
@{
Layout = new LayoutPage(Strings.ReceivedMessagesPage_Title);
diff --git a/src/DotNetCore.CAP.Dashboard/Pages/ReceivedPage.generated.cs b/src/DotNetCore.CAP.Dashboard/Pages/ReceivedPage.generated.cs
index 17365c7..7683be2 100644
--- a/src/DotNetCore.CAP.Dashboard/Pages/ReceivedPage.generated.cs
+++ b/src/DotNetCore.CAP.Dashboard/Pages/ReceivedPage.generated.cs
@@ -1,4 +1,4 @@
-using DotNetCore.CAP.Messages;
+using DotNetCore.CAP.Monitoring;
#pragma warning disable 1591
//------------------------------------------------------------------------------
@@ -13,58 +13,54 @@
namespace DotNetCore.CAP.Dashboard.Pages
{
-
-#line 2 "..\..\ReceivedPage.cshtml"
+
+ #line 2 "..\..\Pages\ReceivedPage.cshtml"
using System;
-
-#line default
-#line hidden
+
+ #line default
+ #line hidden
using System.Collections.Generic;
using System.Linq;
using System.Text;
-
-#line 4 "..\..\ReceivedPage.cshtml"
+
+ #line 3 "..\..\Pages\ReceivedPage.cshtml"
using DotNetCore.CAP.Dashboard;
-
-#line default
-#line hidden
-
-#line 6 "..\..\ReceivedPage.cshtml"
- using DotNetCore.CAP.Dashboard.Monitoring;
-
-#line default
-#line hidden
-
-#line 5 "..\..\ReceivedPage.cshtml"
+
+ #line default
+ #line hidden
+
+ #line 4 "..\..\Pages\ReceivedPage.cshtml"
+#line default
+ #line hidden
+
+ #line 5 "..\..\Pages\ReceivedPage.cshtml"
using DotNetCore.CAP.Dashboard.Pages;
-
-#line default
-#line hidden
-
-#line 7 "..\..\ReceivedPage.cshtml"
+
+ #line default
+ #line hidden
+
+ #line 6 "..\..\Pages\ReceivedPage.cshtml"
using DotNetCore.CAP.Dashboard.Resources;
-
-#line default
-#line hidden
-
-#line 3 "..\..\ReceivedPage.cshtml"
-
-#line default
-#line hidden
-
+
+ #line default
+ #line hidden
+
+ #line 7 "..\..\Pages\ReceivedPage.cshtml"
+ using DotNetCore.CAP.Messages;
+
+ #line default
+ #line hidden
+
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
- internal partial class ReceivedPage : RazorPage
+ internal partial class ReceivedPage : DotNetCore.CAP.Dashboard.RazorPage
{
#line hidden
- protected override void Execute()
+ public override void Execute()
{
- WriteLiteral("\r\n");
-
-
-
+WriteLiteral("\r\n");
@@ -72,169 +68,172 @@ namespace DotNetCore.CAP.Dashboard.Pages
-#line 9 "..\..\ReceivedPage.cshtml"
- Layout = new LayoutPage(Strings.ReceivedMessagesPage_Title);
- int from, perPage;
+
+ #line 9 "..\..\Pages\ReceivedPage.cshtml"
+
+ Layout = new LayoutPage(Strings.ReceivedMessagesPage_Title);
- int.TryParse(Query("from"), out from);
- int.TryParse(Query("count"), out perPage);
- string group = Query("group");
- string name = Query("name");
- string content = Query("content");
+ int from, perPage;
- var monitor = Storage.GetMonitoringApi();
- var pager = new Pager(from, perPage, GetTotal(monitor));
- var queryDto = new MessageQueryDto
- {
- MessageType = MessageType.Subscribe,
- Group = group,
- Name = name,
- Content = content,
- StatusName = StatusName,
- CurrentPage = pager.CurrentPage - 1,
- PageSize = pager.RecordsPerPage
- };
- var succeededMessages = monitor.Messages(queryDto);
+ int.TryParse(Query("from"), out from);
+ int.TryParse(Query("count"), out perPage);
+ var group = Query("group");
+ var name = Query("name");
+ var content = Query("content");
+ var monitor = Storage.GetMonitoringApi();
+ var pager = new Pager(from, perPage, GetTotal(monitor));
+ var queryDto = new MessageQueryDto
+ {
+ MessageType = MessageType.Subscribe,
+ Group = group,
+ Name = name,
+ Content = content,
+ StatusName = StatusName,
+ CurrentPage = pager.CurrentPage - 1,
+ PageSize = pager.RecordsPerPage
+ };
+ var succeededMessages = monitor.Messages(queryDto);
-#line default
-#line hidden
- WriteLiteral("\r\n \r\n \r\n ");
-
-
-
-#line 37 "..\..\ReceivedPage.cshtml"
- Write(Html.MessagesSidebar(MessageType.Subscribe));
-
-
-#line default
-#line hidden
- WriteLiteral("\r\n \r\n \r\n \r\n\r\n");
+
+ #line default
+ #line hidden
+WriteLiteral("\r\n \r\n \r\n ");
+
+ #line 37 "..\..\Pages\ReceivedPage.cshtml"
+ Write(Html.MessagesSidebar(MessageType.Subscribe));
-#line 42 "..\..\ReceivedPage.cshtml"
- if (succeededMessages.Count == 0)
- {
+
+ #line default
+ #line hidden
+WriteLiteral("\r\n \r\n \r\n \r\n");
-
-
-
-#line 159 "..\..\ReceivedPage.cshtml"
- }
-
+
+ #line 165 "..\..\Pages\ReceivedPage.cshtml"
+ }
-#line default
-#line hidden
- WriteLiteral(" \r\n ");
+
+ #line default
+ #line hidden
+WriteLiteral(" \r\n ");
}
diff --git a/src/DotNetCore.CAP.Dashboard/Pages/SubscriberPage.generated.cs b/src/DotNetCore.CAP.Dashboard/Pages/SubscriberPage.generated.cs
index ebec86b..a16d03a 100644
--- a/src/DotNetCore.CAP.Dashboard/Pages/SubscriberPage.generated.cs
+++ b/src/DotNetCore.CAP.Dashboard/Pages/SubscriberPage.generated.cs
@@ -16,36 +16,30 @@ namespace DotNetCore.CAP.Dashboard.Pages
using System.Linq;
using System.Text;
- #line 3 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
- using DotNetCore.CAP.Dashboard;
-
- #line default
- #line hidden
-
- #line 4 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
+ #line 2 "..\..\Pages\SubscriberPage.cshtml"
using DotNetCore.CAP.Dashboard.Pages;
#line default
#line hidden
- #line 5 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
+ #line 3 "..\..\Pages\SubscriberPage.cshtml"
using DotNetCore.CAP.Dashboard.Resources;
#line default
#line hidden
- #line 2 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
+ #line 4 "..\..\Pages\SubscriberPage.cshtml"
using DotNetCore.CAP.Internal;
#line default
#line hidden
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
- internal partial class SubscriberPage : RazorPage
+ internal partial class SubscriberPage : DotNetCore.CAP.Dashboard.RazorPage
{
#line hidden
- protected override void Execute()
+ public override void Execute()
{
@@ -56,9 +50,8 @@ WriteLiteral("\r\n");
-
- #line 7 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
+ #line 6 "..\..\Pages\SubscriberPage.cshtml"
Layout = new LayoutPage(Strings.SubscribersPage_Title);
@@ -74,7 +67,7 @@ WriteLiteral("\r\n \r\n \r\n
- #line 16 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
+ #line 15 "..\..\Pages\SubscriberPage.cshtml"
Write(Strings.SubscribersPage_Title);
@@ -84,7 +77,7 @@ WriteLiteral("\r\n\r\n");
- #line 18 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
+ #line 17 "..\..\Pages\SubscriberPage.cshtml"
if (subscribers.Count == 0)
{
@@ -95,7 +88,7 @@ WriteLiteral(" \r\n
- #line 21 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
+ #line 20 "..\..\Pages\SubscriberPage.cshtml"
Write(Strings.SubscribersPage_NoSubscribers);
@@ -105,7 +98,7 @@ WriteLiteral("\r\n \r\n");
- #line 23 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
+ #line 22 "..\..\Pages\SubscriberPage.cshtml"
}
else
{
@@ -114,77 +107,70 @@ WriteLiteral("\r\n \r\n");
#line default
#line hidden
WriteLiteral(" \r\n \r\n \r\n \r\n " +
-" ");
+"ubscribe-table\">\r\n \r\n \r\n " +
+" ");
- #line 30 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
- Write(Strings.Common_Group);
+ #line 29 "..\..\Pages\SubscriberPage.cshtml"
+ Write(Strings.Common_Group);
#line default
#line hidden
-WriteLiteral(" | \r\n \r\n " +
-" ");
+WriteLiteral(" | \r\n \r\n ");
- #line 32 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
- Write(Strings.Common_Name);
+ #line 31 "..\..\Pages\SubscriberPage.cshtml"
+ Write(Strings.Common_Name);
#line default
#line hidden
-WriteLiteral("\r\n | \r\n ");
+WriteLiteral("\r\n | \r\n ");
- #line 34 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
- Write(Strings.Common_Method);
+ #line 33 "..\..\Pages\SubscriberPage.cshtml"
+ Write(Strings.Common_Method);
#line default
#line hidden
-WriteLiteral(" | \r\n \r\n \r\n " +
-" | \r\n");
+WriteLiteral("\r\n \r\n \r\n " +
+" \r\n");
- #line 38 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
- foreach (var subscriber in subscribers)
+ #line 37 "..\..\Pages\SubscriberPage.cshtml"
+ foreach (var subscriber in subscribers)
+ {
+ var i = 0;
+ var rowCount = subscriber.Value.Count;
+ foreach (var column in subscriber.Value)
{
- var i = 0;
- var rowCount = subscriber.Value.Count;
-
-
- #line default
- #line hidden
-
- #line 42 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
- foreach (var column in subscriber.Value)
- {
#line default
#line hidden
-WriteLiteral(" \r\n");
+WriteLiteral(" \r\n");
- #line 45 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
- if (i == 0)
- {
+ #line 44 "..\..\Pages\SubscriberPage.cshtml"
+ if (i == 0)
+ {
#line default
#line hidden
-WriteLiteral(" ");
- #line 47 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
- Write(subscriber.Key);
+ #line 46 "..\..\Pages\SubscriberPage.cshtml"
+ Write(subscriber.Key);
#line default
@@ -203,56 +189,55 @@ WriteLiteral(" | \r\n");
- #line 48 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
- }
+ #line 47 "..\..\Pages\SubscriberPage.cshtml"
+ }
#line default
#line hidden
-WriteLiteral(" ");
+WriteLiteral(" | ");
- #line 49 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
- Write(column.Attribute.Name);
+ #line 48 "..\..\Pages\SubscriberPage.cshtml"
+ Write(column.Attribute.Name);
#line default
#line hidden
-WriteLiteral(" | \r\n \r\n " +
-" ");
+WriteLiteral(" | \r\n \r\n " +
+"");
- #line 51 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
- Write(column.ImplTypeInfo.Name);
+ #line 50 "..\..\Pages\SubscriberPage.cshtml"
+ Write(column.ImplTypeInfo.Name);
#line default
#line hidden
-WriteLiteral(":\r\n \r" +
-"\n \r\n " +
-" ");
+WriteLiteral(":\r\n \r\n " +
+" \r\n " +
+" ");
- #line 54 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
- Write(Html.MethodEscaped(column.MethodInfo));
+ #line 53 "..\..\Pages\SubscriberPage.cshtml"
+ Write(Html.MethodEscaped(column.MethodInfo));
#line default
#line hidden
-WriteLiteral(" \r\n \r\n " +
-" \r\n | \r\n " +
-" \r\n");
-
+WriteLiteral("\r\n \r\n " +
+" \r\n \r\n " +
+" \r\n");
- #line 59 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
- i++;
- }
+ #line 58 "..\..\Pages\SubscriberPage.cshtml"
+ i++;
}
+ }
#line default
@@ -261,7 +246,7 @@ WriteLiteral(" \r\n \r\n
- #line 65 "..\..\Dashboard\Pages\SubscriberPage.cshtml"
+ #line 64 "..\..\Pages\SubscriberPage.cshtml"
}
diff --git a/src/DotNetCore.CAP.Dashboard/Pages/_BlockMetric.cshtml b/src/DotNetCore.CAP.Dashboard/Pages/_BlockMetric.cshtml
index eacc619..96e1f2a 100644
--- a/src/DotNetCore.CAP.Dashboard/Pages/_BlockMetric.cshtml
+++ b/src/DotNetCore.CAP.Dashboard/Pages/_BlockMetric.cshtml
@@ -1,17 +1,18 @@
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True TrimLeadingUnderscores : true *@
-@using DotNetCore.CAP.Dashboard
@using DotNetCore.CAP.Dashboard.Resources
-@inherits RazorPage
+
+@inherits DotNetCore.CAP.Dashboard.RazorPage
@{
- var metric = DashboardMetric.Func(this);
+
+ var metric = Metric.Func(this);
var className = metric == null ? "metric-null" : metric.Style.ToClassName();
var highlighted = metric != null && metric.Highlighted ? "highlighted" : null;
}
-
+
@(metric?.Value)
- @(Strings.ResourceManager.GetString(DashboardMetric.Title) ?? DashboardMetric.Title)
+ @(Strings.ResourceManager.GetString(Metric.Title) ?? Metric.Title)
\ No newline at end of file
diff --git a/src/DotNetCore.CAP.Dashboard/Pages/_BlockMetric.generated.cs b/src/DotNetCore.CAP.Dashboard/Pages/_BlockMetric.generated.cs
index e29de0b..d6f3c3f 100644
--- a/src/DotNetCore.CAP.Dashboard/Pages/_BlockMetric.generated.cs
+++ b/src/DotNetCore.CAP.Dashboard/Pages/_BlockMetric.generated.cs
@@ -16,37 +16,33 @@ namespace DotNetCore.CAP.Dashboard.Pages
using System.Linq;
using System.Text;
- #line 2 "..\..\Dashboard\Pages\_BlockMetric.cshtml"
- using DotNetCore.CAP.Dashboard;
-
- #line default
- #line hidden
-
- #line 3 "..\..\Dashboard\Pages\_BlockMetric.cshtml"
+ #line 2 "..\..\Pages\_BlockMetric.cshtml"
using DotNetCore.CAP.Dashboard.Resources;
#line default
#line hidden
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
- internal partial class BlockMetric : RazorPage
+ internal partial class BlockMetric : DotNetCore.CAP.Dashboard.RazorPage
{
#line hidden
- protected override void Execute()
+ public override void Execute()
{
WriteLiteral("\r\n");
+WriteLiteral("\r\n");
- #line 5 "..\..\Dashboard\Pages\_BlockMetric.cshtml"
+ #line 5 "..\..\Pages\_BlockMetric.cshtml"
- var metric = DashboardMetric.Func(this);
+
+ var metric = Metric.Func(this);
var className = metric == null ? "metric-null" : metric.Style.ToClassName();
var highlighted = metric != null && metric.Highlighted ? "highlighted" : null;
@@ -58,7 +54,7 @@ WriteLiteral(" \r\n \r\n ");
- #line 12 "..\..\Dashboard\Pages\_BlockMetric.cshtml"
+ #line 13 "..\..\Pages\_BlockMetric.cshtml"
Write(metric?.Value);
@@ -98,8 +94,8 @@ WriteLiteral("\r\n \r\n \r\n
- #line 15 "..\..\Dashboard\Pages\_BlockMetric.cshtml"
- Write(Strings.ResourceManager.GetString(DashboardMetric.Title) ?? DashboardMetric.Title);
+ #line 16 "..\..\Pages\_BlockMetric.cshtml"
+ Write(Strings.ResourceManager.GetString(Metric.Title) ?? Metric.Title);
#line default
diff --git a/src/DotNetCore.CAP.Dashboard/Pages/_Breadcrumbs.generated.cs b/src/DotNetCore.CAP.Dashboard/Pages/_Breadcrumbs.generated.cs
index ce63c17..cc77018 100644
--- a/src/DotNetCore.CAP.Dashboard/Pages/_Breadcrumbs.generated.cs
+++ b/src/DotNetCore.CAP.Dashboard/Pages/_Breadcrumbs.generated.cs
@@ -16,51 +16,45 @@ namespace DotNetCore.CAP.Dashboard.Pages
using System.Linq;
using System.Text;
- #line 2 "..\..\Dashboard\Pages\_Breadcrumbs.cshtml"
- using DotNetCore.CAP.Dashboard;
-
- #line default
- #line hidden
-
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
- internal partial class Breadcrumbs : RazorPage
+ internal partial class Breadcrumbs : DotNetCore.CAP.Dashboard.RazorPage
{
#line hidden
- protected override void Execute()
+ public override void Execute()
{
WriteLiteral("\r\n");
-
-WriteLiteral("\r\n \r\n - \r\n
- \r\n
\r\n");
+WriteLiteral("\">\r\n \r\n \r\n " +
+" \r\n");
- #line 7 "..\..\Dashboard\Pages\_Breadcrumbs.cshtml"
+ #line 10 "..\..\Pages\_Breadcrumbs.cshtml"
foreach (var item in Items)
{
#line default
#line hidden
-WriteLiteral(" - \r\n ");
- #line 9 "..\..\Dashboard\Pages\_Breadcrumbs.cshtml"
+ #line 13 "..\..\Pages\_Breadcrumbs.cshtml"
Write(item.Key);
#line default
#line hidden
-WriteLiteral("
\r\n");
+WriteLiteral("\r\n \r\n");
- #line 10 "..\..\Dashboard\Pages\_Breadcrumbs.cshtml"
+ #line 15 "..\..\Pages\_Breadcrumbs.cshtml"
}
@@ -90,7 +84,7 @@ WriteLiteral(" - ");
- #line 11 "..\..\Dashboard\Pages\_Breadcrumbs.cshtml"
+ #line 16 "..\..\Pages\_Breadcrumbs.cshtml"
Write(Title);
diff --git a/src/DotNetCore.CAP.Dashboard/Pages/_InlineMetric.generated.cs b/src/DotNetCore.CAP.Dashboard/Pages/_InlineMetric.generated.cs
index 1f9fcd3..74c8c4f 100644
--- a/src/DotNetCore.CAP.Dashboard/Pages/_InlineMetric.generated.cs
+++ b/src/DotNetCore.CAP.Dashboard/Pages/_InlineMetric.generated.cs
@@ -16,7 +16,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
using System.Linq;
using System.Text;
- #line 2 "..\..\Dashboard\Pages\_InlineMetric.cshtml"
+ #line 2 "..\..\Pages\_InlineMetric.cshtml"
using DotNetCore.CAP.Dashboard;
#line default
@@ -27,7 +27,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
{
#line hidden
- protected override void Execute()
+ public override void Execute()
{
@@ -37,7 +37,7 @@ WriteLiteral("\r\n");
- #line 4 "..\..\Dashboard\Pages\_InlineMetric.cshtml"
+ #line 4 "..\..\Pages\_InlineMetric.cshtml"
var metric = DashboardMetric.Func(this);
var className = metric == null ? "metric-null" : metric.Style.ToClassName();
@@ -51,7 +51,7 @@ WriteLiteral("");
- #line 9 "..\..\Dashboard\Pages\_InlineMetric.cshtml"
+ #line 9 "..\..\Pages\_InlineMetric.cshtml"
Write(metric?.Value);
diff --git a/src/DotNetCore.CAP.Dashboard/Pages/_Navigation.generated.cs b/src/DotNetCore.CAP.Dashboard/Pages/_Navigation.generated.cs
index 273d9eb..25b5ed3 100644
--- a/src/DotNetCore.CAP.Dashboard/Pages/_Navigation.generated.cs
+++ b/src/DotNetCore.CAP.Dashboard/Pages/_Navigation.generated.cs
@@ -16,18 +16,18 @@ namespace DotNetCore.CAP.Dashboard.Pages
using System.Linq;
using System.Text;
- #line 2 "..\..\Dashboard\Pages\_Navigation.cshtml"
+ #line 2 "..\..\Pages\_Navigation.cshtml"
using DotNetCore.CAP.Dashboard;
#line default
#line hidden
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
- internal partial class Navigation : RazorPage
+ internal partial class Navigation : DotNetCore.CAP.Dashboard.RazorPage
{
#line hidden
- protected override void Execute()
+ public override void Execute()
{
@@ -37,7 +37,7 @@ WriteLiteral("\r\n");
- #line 4 "..\..\Dashboard\Pages\_Navigation.cshtml"
+ #line 4 "..\..\Pages\_Navigation.cshtml"
if (NavigationMenu.Items.Count > 0)
{
@@ -48,12 +48,15 @@ WriteLiteral("
\r\n");
- #line 7 "..\..\Dashboard\Pages\_Navigation.cshtml"
+ #line 7 "..\..\Pages\_Navigation.cshtml"
foreach (var item in NavigationMenu.Items)
{
var itemValue = item(this);
- if (itemValue == null) { continue; }
+ if (itemValue == null)
+ {
+ continue;
+ }
@@ -63,7 +66,7 @@ WriteLiteral(" - \r\n \r\n ");
- #line 15 "..\..\Dashboard\Pages\_Navigation.cshtml"
+ #line 18 "..\..\Pages\_Navigation.cshtml"
Write(itemValue.Text);
@@ -93,7 +96,7 @@ WriteLiteral("\r\n\r\n");
- #line 17 "..\..\Dashboard\Pages\_Navigation.cshtml"
+ #line 20 "..\..\Pages\_Navigation.cshtml"
foreach (var metric in itemValue.GetAllMetrics())
{
@@ -101,14 +104,14 @@ WriteLiteral("\r\n\r\n");
#line default
#line hidden
- #line 19 "..\..\Dashboard\Pages\_Navigation.cshtml"
+ #line 22 "..\..\Pages\_Navigation.cshtml"
Write(Html.InlineMetric(metric));
#line default
#line hidden
- #line 19 "..\..\Dashboard\Pages\_Navigation.cshtml"
+ #line 22 "..\..\Pages\_Navigation.cshtml"
}
@@ -119,7 +122,7 @@ WriteLiteral(" \r\n
\r\n");
- #line 23 "..\..\Dashboard\Pages\_Navigation.cshtml"
+ #line 26 "..\..\Pages\_Navigation.cshtml"
}
@@ -129,7 +132,7 @@ WriteLiteral(" \r\n");
- #line 25 "..\..\Dashboard\Pages\_Navigation.cshtml"
+ #line 28 "..\..\Pages\_Navigation.cshtml"
}
#line default
diff --git a/src/DotNetCore.CAP.Dashboard/Pages/_Paginator.generated.cs b/src/DotNetCore.CAP.Dashboard/Pages/_Paginator.generated.cs
index 21fdf9c..c7d9e79 100644
--- a/src/DotNetCore.CAP.Dashboard/Pages/_Paginator.generated.cs
+++ b/src/DotNetCore.CAP.Dashboard/Pages/_Paginator.generated.cs
@@ -16,24 +16,24 @@ namespace DotNetCore.CAP.Dashboard.Pages
using System.Linq;
using System.Text;
- #line 2 "..\..\Dashboard\Pages\_Paginator.cshtml"
+ #line 2 "..\..\Pages\_Paginator.cshtml"
using DotNetCore.CAP.Dashboard;
#line default
#line hidden
- #line 3 "..\..\Dashboard\Pages\_Paginator.cshtml"
+ #line 3 "..\..\Pages\_Paginator.cshtml"
using DotNetCore.CAP.Dashboard.Resources;
#line default
#line hidden
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
- internal partial class Paginator : RazorPage
+ internal partial class Paginator : DotNetCore.CAP.Dashboard.RazorPage
{
#line hidden
- protected override void Execute()
+ public override void Execute()
{
@@ -41,14 +41,12 @@ WriteLiteral("\r\n");
-WriteLiteral("\r\n");
-
WriteLiteral("\r\n");
+WriteLiteral("\r\n \r\n ");
}
diff --git a/src/DotNetCore.CAP.Dashboard/Pages/_PerPageSelector.generated.cs b/src/DotNetCore.CAP.Dashboard/Pages/_PerPageSelector.generated.cs
index 931ab0d..ed07c62 100644
--- a/src/DotNetCore.CAP.Dashboard/Pages/_PerPageSelector.generated.cs
+++ b/src/DotNetCore.CAP.Dashboard/Pages/_PerPageSelector.generated.cs
@@ -16,7 +16,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
using System.Linq;
using System.Text;
- #line 2 "..\..\Dashboard\Pages\_PerPageSelector.cshtml"
+ #line 2 "..\..\Pages\_PerPageSelector.cshtml"
using DotNetCore.CAP.Dashboard.Resources;
#line default
@@ -27,7 +27,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
{
#line hidden
- protected override void Execute()
+ public override void Execute()
{
@@ -35,69 +35,69 @@ WriteLiteral("\r\n");
-WriteLiteral("\r\n \r\n");
+WriteLiteral("\r\n \r\n \r\n \r\n ");
+WriteLiteral(" \r\n \r\n \r\n ");
- #line 14 "..\..\Dashboard\Pages\_PerPageSelector.cshtml"
- Write(Strings.PerPageSelector_ItemsPerPage);
+ #line 15 "..\..\Pages\_PerPageSelector.cshtml"
+Write(Strings.PerPageSelector_ItemsPerPage);
#line default
#line hidden
-WriteLiteral(":\r\n \r\n");
+WriteLiteral(":\r\n ");
}
diff --git a/src/DotNetCore.CAP.Dashboard/Pages/_SidebarMenu.generated.cs b/src/DotNetCore.CAP.Dashboard/Pages/_SidebarMenu.generated.cs
index ca8e4ce..52577bd 100644
--- a/src/DotNetCore.CAP.Dashboard/Pages/_SidebarMenu.generated.cs
+++ b/src/DotNetCore.CAP.Dashboard/Pages/_SidebarMenu.generated.cs
@@ -16,18 +16,12 @@ namespace DotNetCore.CAP.Dashboard.Pages
using System.Linq;
using System.Text;
- #line 2 "..\..\Dashboard\Pages\_SidebarMenu.cshtml"
- using DotNetCore.CAP.Dashboard;
-
- #line default
- #line hidden
-
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
- internal partial class SidebarMenu : RazorPage
+ internal partial class SidebarMenu : DotNetCore.CAP.Dashboard.RazorPage
{
#line hidden
- protected override void Execute()
+ public override void Execute()
{
@@ -35,9 +29,8 @@ WriteLiteral("\r\n");
-
- #line 4 "..\..\Dashboard\Pages\_SidebarMenu.cshtml"
+ #line 3 "..\..\Pages\_SidebarMenu.cshtml"
if (Items.Any())
{
@@ -48,7 +41,7 @@ WriteLiteral(" \r\n");
- #line 7 "..\..\Dashboard\Pages\_SidebarMenu.cshtml"
+ #line 6 "..\..\Pages\_SidebarMenu.cshtml"
foreach (var item in Items)
{
var itemValue = item(this);
@@ -60,7 +53,7 @@ WriteLiteral(" \r\n ");
- #line 11 "..\..\Dashboard\Pages\_SidebarMenu.cshtml"
+ #line 10 "..\..\Pages\_SidebarMenu.cshtml"
Write(itemValue.Text);
@@ -90,7 +83,7 @@ WriteLiteral("\r\n \r\n");
- #line 13 "..\..\Dashboard\Pages\_SidebarMenu.cshtml"
+ #line 12 "..\..\Pages\_SidebarMenu.cshtml"
foreach (var metric in itemValue.GetAllMetrics())
{
@@ -98,14 +91,14 @@ WriteLiteral("\r\n \r\n");
#line default
#line hidden
- #line 15 "..\..\Dashboard\Pages\_SidebarMenu.cshtml"
+ #line 14 "..\..\Pages\_SidebarMenu.cshtml"
Write(Html.InlineMetric(metric));
#line default
#line hidden
- #line 15 "..\..\Dashboard\Pages\_SidebarMenu.cshtml"
+ #line 14 "..\..\Pages\_SidebarMenu.cshtml"
}
@@ -116,7 +109,7 @@ WriteLiteral(" \r\n \r\n");
- #line 19 "..\..\Dashboard\Pages\_SidebarMenu.cshtml"
+ #line 18 "..\..\Pages\_SidebarMenu.cshtml"
}
@@ -126,9 +119,8 @@ WriteLiteral(" \r\n");
- #line 21 "..\..\Dashboard\Pages\_SidebarMenu.cshtml"
+ #line 20 "..\..\Pages\_SidebarMenu.cshtml"
}
-
#line default
#line hidden
diff --git a/src/DotNetCore.CAP.Dashboard/RazorPage.cs b/src/DotNetCore.CAP.Dashboard/RazorPage.cs
index 616441d..acdf72a 100644
--- a/src/DotNetCore.CAP.Dashboard/RazorPage.cs
+++ b/src/DotNetCore.CAP.Dashboard/RazorPage.cs
@@ -5,9 +5,10 @@ using System;
using System.Diagnostics;
using System.Net;
using System.Text;
-using DotNetCore.CAP.Dashboard.Monitoring;
+using DotNetCore.CAP.Dashboard.NodeDiscovery;
using DotNetCore.CAP.Internal;
-using DotNetCore.CAP.NodeDiscovery;
+using DotNetCore.CAP.Monitoring;
+using DotNetCore.CAP.Persistence;
using Microsoft.Extensions.DependencyInjection;
namespace DotNetCore.CAP.Dashboard
@@ -28,7 +29,7 @@ namespace DotNetCore.CAP.Dashboard
protected HtmlHelper Html { get; }
public UrlHelper Url { get; private set; }
- protected IStorage Storage { get; set; }
+ protected IDataStorage Storage { get; set; }
protected string AppPath { get; set; }
protected string NodeName { get; set; }
@@ -55,7 +56,7 @@ namespace DotNetCore.CAP.Dashboard
public string RequestPath => Request.Path;
///
- protected abstract void Execute();
+ public abstract void Execute();
protected string Query(string key)
{
@@ -95,8 +96,7 @@ namespace DotNetCore.CAP.Dashboard
_statisticsLazy = new Lazy (() =>
{
- var monitoring = Storage.GetMonitoringApi();
- var dto = monitoring.GetStatistics();
+ var dto = Storage.GetMonitoringApi().GetStatistics();
SetServersCount(dto);
diff --git a/src/DotNetCore.CAP.MySql/MySqlDataStorage.cs b/src/DotNetCore.CAP.MySql/MySqlDataStorage.cs
index f629203..e3b119d 100644
--- a/src/DotNetCore.CAP.MySql/MySqlDataStorage.cs
+++ b/src/DotNetCore.CAP.MySql/MySqlDataStorage.cs
@@ -6,6 +6,7 @@ using System.Threading.Tasks;
using Dapper;
using DotNetCore.CAP.Internal;
using DotNetCore.CAP.Messages;
+using DotNetCore.CAP.Monitoring;
using DotNetCore.CAP.Persistence;
using DotNetCore.CAP.Serialization;
using Microsoft.EntityFrameworkCore.Storage;
@@ -65,6 +66,7 @@ namespace DotNetCore.CAP.MySql
{
DbId = content.GetId(),
Origin = content,
+ Content = StringSerializer.Serialize(content),
Added = DateTime.Now,
ExpiresAt = null,
Retries = 0
@@ -74,7 +76,7 @@ namespace DotNetCore.CAP.MySql
{
Id = message.DbId,
Name = name,
- Content = StringSerializer.Serialize(message.Origin),
+ message.Content,
message.Retries,
message.Added,
message.ExpiresAt,
@@ -138,7 +140,7 @@ namespace DotNetCore.CAP.MySql
var content = StringSerializer.Serialize(mdMessage.Origin);
using (var connection = new MySqlConnection(_options.Value.ConnectionString))
{
-
+
connection.Execute(sql, new
{
Id = mdMessage.DbId,
@@ -212,24 +214,9 @@ namespace DotNetCore.CAP.MySql
return result;
}
- //public Task GetPublishedMessageAsync(long id)
- //{
- // var sql = $@"SELECT * FROM `{_prefix}.published` WHERE `Id`={id};";
-
- // using (var connection = new MySqlConnection(Options.ConnectionString))
- // {
- // return await connection.QueryFirstOrDefaultAsync(sql);
- // }
- //}
-
- //public Task GetReceivedMessageAsync(long id)
- //{
- // var sql =
- // $@"SELECT * FROM `{_prefix}.received` WHERE Id={id};";
- // using (var connection = new MySqlConnection(Options.ConnectionString))
- // {
- // return await connection.QueryFirstOrDefaultAsync(sql);
- // }
- //}
+ public IMonitoringApi GetMonitoringApi()
+ {
+ return new MySqlMonitoringApi(_options);
+ }
}
}
diff --git a/src/DotNetCore.CAP/Internal/Helper.cs b/src/DotNetCore.CAP/Internal/Helper.cs
index a1084e2..078c740 100644
--- a/src/DotNetCore.CAP/Internal/Helper.cs
+++ b/src/DotNetCore.CAP/Internal/Helper.cs
@@ -9,6 +9,14 @@ namespace DotNetCore.CAP.Internal
{
public static class Helper
{
+ private static readonly DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Local);
+
+ public static long ToTimestamp(DateTime value)
+ {
+ var elapsedTime = value - Epoch;
+ return (long)elapsedTime.TotalSeconds;
+ }
+
public static bool IsController(TypeInfo typeInfo)
{
if (!typeInfo.IsClass)
diff --git a/src/DotNetCore.CAP/Internal/MethodMatcherCache.cs b/src/DotNetCore.CAP/Internal/MethodMatcherCache.cs
index f1ca395..ee12b00 100644
--- a/src/DotNetCore.CAP/Internal/MethodMatcherCache.cs
+++ b/src/DotNetCore.CAP/Internal/MethodMatcherCache.cs
@@ -8,7 +8,7 @@ using System.Linq;
namespace DotNetCore.CAP.Internal
{
- internal class MethodMatcherCache
+ public class MethodMatcherCache
{
private readonly IConsumerServiceSelector _selector;
diff --git a/src/DotNetCore.CAP/Persistence/IDataStorage.cs b/src/DotNetCore.CAP/Persistence/IDataStorage.cs
index 9bdec2a..f7b9e42 100644
--- a/src/DotNetCore.CAP/Persistence/IDataStorage.cs
+++ b/src/DotNetCore.CAP/Persistence/IDataStorage.cs
@@ -4,6 +4,7 @@ using System.Threading;
using System.Threading.Tasks;
using DotNetCore.CAP.Internal;
using DotNetCore.CAP.Messages;
+using DotNetCore.CAP.Monitoring;
namespace DotNetCore.CAP.Persistence
{
@@ -13,16 +14,21 @@ namespace DotNetCore.CAP.Persistence
Task ChangeReceiveStateAsync(MediumMessage message, StatusName state);
- Task StoreMessageAsync(string name, Message content, object dbTransaction = null, CancellationToken cancellationToken = default);
+ Task StoreMessageAsync(string name, Message content, object dbTransaction = null,
+ CancellationToken cancellationToken = default);
Task StoreReceivedExceptionMessageAsync(string name, string group, string content);
Task StoreReceivedMessageAsync(string name, string group, Message content);
- Task DeleteExpiresAsync(string table, DateTime timeout, int batchCount = 1000, CancellationToken token = default);
+ Task DeleteExpiresAsync(string table, DateTime timeout, int batchCount = 1000,
+ CancellationToken token = default);
Task> GetPublishedMessagesOfNeedRetry();
Task> GetReceivedMessagesOfNeedRetry();
+
+ //dashboard api
+ IMonitoringApi GetMonitoringApi();
}
-}
+}
\ No newline at end of file
diff --git a/src/DotNetCore.CAP/Persistence/MediumMessage.cs b/src/DotNetCore.CAP/Persistence/MediumMessage.cs
index 638f27d..f5ff86f 100644
--- a/src/DotNetCore.CAP/Persistence/MediumMessage.cs
+++ b/src/DotNetCore.CAP/Persistence/MediumMessage.cs
@@ -9,6 +9,8 @@ namespace DotNetCore.CAP.Persistence
public Message Origin { get; set; }
+ public string Content { get; set; }
+
public DateTime Added { get; set; }
public DateTime? ExpiresAt { get; set; }
|