Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CAP
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
CAP
Commits
9acbbe20
Commit
9acbbe20
authored
Sep 29, 2017
by
Savorboard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename reference class.
parent
ffc33990
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
23 deletions
+18
-23
MySqlStorageConnection.cs
src/DotNetCore.CAP.MySql/MySqlStorageConnection.cs
+2
-7
DashboardRoutes.cs
src/DotNetCore.CAP/Dashboard/DashboardRoutes.cs
+12
-10
PublishedPage.cs
src/DotNetCore.CAP/Dashboard/Pages/PublishedPage.cs
+2
-3
ReceivedPage.cs
src/DotNetCore.CAP/Dashboard/Pages/ReceivedPage.cs
+2
-3
No files found.
src/DotNetCore.CAP.MySql/MySqlStorageConnection.cs
View file @
9acbbe20
...
@@ -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
();
}
}
...
...
src/DotNetCore.CAP/Dashboard/DashboardRoutes.cs
View file @
9acbbe20
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
...
@@ -88,23 +88,25 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -88,23 +88,25 @@ namespace DotNetCore.CAP.Dashboard
var
id
=
int
.
Parse
(
x
.
UriMatch
.
Groups
[
"Id"
].
Value
);
var
id
=
int
.
Parse
(
x
.
UriMatch
.
Groups
[
"Id"
].
Value
);
var
message
=
x
.
Storage
.
GetConnection
().
GetReceivedMessageAsync
(
id
).
GetAwaiter
().
GetResult
();
var
message
=
x
.
Storage
.
GetConnection
().
GetReceivedMessageAsync
(
id
).
GetAwaiter
().
GetResult
();
return
message
.
Content
;
return
message
.
Content
;
});
});
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>.+)"
,
x
=>
new
PublishedPage
(
x
.
Groups
[
"StatusName"
].
Value
));
x
=>
new
PublishedPage
(
x
.
Groups
[
"StatusName"
].
Value
));
Routes
.
AddRazorPage
(
Routes
.
AddRazorPage
(
"/received/(?<StatusName>.+)"
,
"/received/(?<StatusName>.+)"
,
x
=>
new
ReceivedPage
(
x
.
Groups
[
"StatusName"
].
Value
));
x
=>
new
ReceivedPage
(
x
.
Groups
[
"StatusName"
].
Value
));
Routes
.
AddRazorPage
(
"/subscribers"
,
x
=>
new
SubscriberPage
());
Routes
.
AddRazorPage
(
"/subscribers"
,
x
=>
new
SubscriberPage
());
Routes
.
AddRazorPage
(
"/nodes"
,
x
=>
new
NodePage
());
Routes
.
AddRazorPage
(
"/nodes"
,
x
=>
new
NodePage
());
...
...
src/DotNetCore.CAP/Dashboard/Pages/PublishedPage.cs
View file @
9acbbe20
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
();
}
}
...
...
src/DotNetCore.CAP/Dashboard/Pages/ReceivedPage.cs
View file @
9acbbe20
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
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment