Commit 9acbbe20 authored by Savorboard's avatar Savorboard

rename reference class.

parent ffc33990
...@@ -151,17 +151,12 @@ VALUES(@Name,@Group,@Content,@Retries,@Added,@ExpiresAt,@StatusName);"; ...@@ -151,17 +151,12 @@ VALUES(@Name,@Group,@Content,@Retries,@Added,@ExpiresAt,@StatusName);";
return new MySqlFetchedMessage(fetchedMessage.MessageId, fetchedMessage.MessageType, connection, transaction); return new MySqlFetchedMessage(fetchedMessage.MessageId, fetchedMessage.MessageType, connection, transaction);
} }
public List<string> GetRangeFromSet(string key, int startingFrom, int endingAt) public bool ChangePublishedState(int messageId, string state)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public bool ChangePublishedState(int messageId, IState state) public bool ChangeReceivedState(int messageId, string state)
{
throw new NotImplementedException();
}
public bool ChangeReceivedState(int messageId, IState state)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
......
using System.Reflection; using System.Reflection;
using DotNetCore.CAP.Dashboard.Pages; using DotNetCore.CAP.Dashboard.Pages;
using DotNetCore.CAP.Processor.States; using DotNetCore.CAP.Infrastructure;
namespace DotNetCore.CAP.Dashboard namespace DotNetCore.CAP.Dashboard
{ {
...@@ -32,7 +32,7 @@ namespace DotNetCore.CAP.Dashboard ...@@ -32,7 +32,7 @@ namespace DotNetCore.CAP.Dashboard
Routes = new RouteCollection(); Routes = new RouteCollection();
Routes.AddRazorPage("/", x => new HomePage()); Routes.AddRazorPage("/", x => new HomePage());
Routes.Add("/stats", new JsonStats()); Routes.Add("/stats", new JsonStats());
Routes.Add("/health",new OkStats()); Routes.Add("/health", new OkStats());
#region Embedded static content #region Embedded static content
...@@ -92,10 +92,12 @@ namespace DotNetCore.CAP.Dashboard ...@@ -92,10 +92,12 @@ namespace DotNetCore.CAP.Dashboard
Routes.AddPublishBatchCommand( Routes.AddPublishBatchCommand(
"/published/requeue", "/published/requeue",
(client, messageId) => client.Storage.GetConnection().ChangePublishedState(messageId, new ScheduledState())); (client, messageId) =>
client.Storage.GetConnection().ChangePublishedState(messageId, StatusName.Scheduled));
Routes.AddPublishBatchCommand( Routes.AddPublishBatchCommand(
"/received/requeue", "/received/requeue",
(client, messageId) => client.Storage.GetConnection().ChangeReceivedState(messageId, new ScheduledState())); (client, messageId) =>
client.Storage.GetConnection().ChangeReceivedState(messageId, StatusName.Scheduled));
Routes.AddRazorPage( Routes.AddRazorPage(
"/published/(?<StatusName>.+)", "/published/(?<StatusName>.+)",
......
using System; using System;
using DotNetCore.CAP.Processor.States;
namespace DotNetCore.CAP.Dashboard.Pages namespace DotNetCore.CAP.Dashboard.Pages
{ {
...@@ -14,11 +13,11 @@ namespace DotNetCore.CAP.Dashboard.Pages ...@@ -14,11 +13,11 @@ namespace DotNetCore.CAP.Dashboard.Pages
public int GetTotal(IMonitoringApi api) public int GetTotal(IMonitoringApi api)
{ {
if (string.Equals(StatusName, SucceededState.StateName, StringComparison.CurrentCultureIgnoreCase)) if (string.Equals(StatusName, Infrastructure.StatusName.Succeeded, StringComparison.CurrentCultureIgnoreCase))
{ {
return api.PublishedSucceededCount(); return api.PublishedSucceededCount();
} }
if (string.Equals(StatusName, ProcessingState.StateName, StringComparison.CurrentCultureIgnoreCase)) if (string.Equals(StatusName, Infrastructure.StatusName.Processing, StringComparison.CurrentCultureIgnoreCase))
{ {
return api.PublishedProcessingCount(); return api.PublishedProcessingCount();
} }
......
using System; using System;
using DotNetCore.CAP.Processor.States;
namespace DotNetCore.CAP.Dashboard.Pages namespace DotNetCore.CAP.Dashboard.Pages
{ {
...@@ -14,11 +13,11 @@ namespace DotNetCore.CAP.Dashboard.Pages ...@@ -14,11 +13,11 @@ namespace DotNetCore.CAP.Dashboard.Pages
public int GetTotal(IMonitoringApi api) public int GetTotal(IMonitoringApi api)
{ {
if (string.Equals(StatusName, SucceededState.StateName, StringComparison.CurrentCultureIgnoreCase)) if (string.Equals(StatusName, Infrastructure.StatusName.Succeeded, StringComparison.CurrentCultureIgnoreCase))
{ {
return api.ReceivedSucceededCount(); return api.ReceivedSucceededCount();
} }
if (string.Equals(StatusName, ProcessingState.StateName, StringComparison.CurrentCultureIgnoreCase)) if (string.Equals(StatusName, Infrastructure.StatusName.Processing, StringComparison.CurrentCultureIgnoreCase))
{ {
return api.ReceivedProcessingCount(); return api.ReceivedProcessingCount();
} }
......
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