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
c4f4f5f4
Commit
c4f4f5f4
authored
Nov 05, 2019
by
Savorboard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upgrade dashoboard module
parent
200d14a8
Changes
45
Show whitespace changes
Inline
Side-by-side
Showing
45 changed files
with
2481 additions
and
1773 deletions
+2481
-1773
ValuesController.cs
...les/Sample.RabbitMQ.MySql/Controllers/ValuesController.cs
+7
-0
Sample.RabbitMQ.MySql.csproj
samples/Sample.RabbitMQ.MySql/Sample.RabbitMQ.MySql.csproj
+1
-0
Startup.cs
samples/Sample.RabbitMQ.MySql/Startup.cs
+1
-1
AwaitableInfo.cs
src/DotNetCore.CAP.Dashboard/AwaitableInfo.cs
+128
-0
CAP.DashboardMiddleware.cs
src/DotNetCore.CAP.Dashboard/CAP.DashboardMiddleware.cs
+72
-2
CAP.DashboardOptionsExtensions.cs
...otNetCore.CAP.Dashboard/CAP.DashboardOptionsExtensions.cs
+3
-0
CapCache.cs
src/DotNetCore.CAP.Dashboard/CapCache.cs
+378
-0
CoercedAwaitableInfo.cs
src/DotNetCore.CAP.Dashboard/CoercedAwaitableInfo.cs
+44
-0
CombinedResourceDispatcher.cs
src/DotNetCore.CAP.Dashboard/CombinedResourceDispatcher.cs
+6
-5
DashboardContext.cs
src/DotNetCore.CAP.Dashboard/DashboardContext.cs
+4
-3
DashboardRoutes.cs
src/DotNetCore.CAP.Dashboard/DashboardRoutes.cs
+5
-5
DotNetCore.CAP.Dashboard.csproj
src/DotNetCore.CAP.Dashboard/DotNetCore.CAP.Dashboard.csproj
+141
-27
EmbeddedResourceDispatcher.cs
src/DotNetCore.CAP.Dashboard/EmbeddedResourceDispatcher.cs
+6
-9
GatewayProxyMiddleware.cs
...Core.CAP.Dashboard/GatewayProxy/GatewayProxyMiddleware.cs
+1
-1
HtmlHelper.cs
src/DotNetCore.CAP.Dashboard/HtmlHelper.cs
+1
-1
JsonDispatcher.cs
src/DotNetCore.CAP.Dashboard/JsonDispatcher.cs
+1
-1
JsonStats.cs
src/DotNetCore.CAP.Dashboard/JsonStats.cs
+2
-2
LocalRequestsOnlyAuthorizationFilter.cs
...ore.CAP.Dashboard/LocalRequestsOnlyAuthorizationFilter.cs
+1
-1
MessageHistoryRenderer.cs
src/DotNetCore.CAP.Dashboard/MessageHistoryRenderer.cs
+9
-9
BlockMetric.cs
src/DotNetCore.CAP.Dashboard/Pages/BlockMetric.cs
+2
-2
HomePage.generated.cs
src/DotNetCore.CAP.Dashboard/Pages/HomePage.generated.cs
+210
-228
LayoutPage.generated.cs
src/DotNetCore.CAP.Dashboard/Pages/LayoutPage.generated.cs
+206
-213
NodePage.cs
src/DotNetCore.CAP.Dashboard/Pages/NodePage.cs
+1
-1
NodePage.generated.cs
src/DotNetCore.CAP.Dashboard/Pages/NodePage.generated.cs
+162
-163
PublishedPage.cs
src/DotNetCore.CAP.Dashboard/Pages/PublishedPage.cs
+5
-4
PublishedPage.cshtml
src/DotNetCore.CAP.Dashboard/Pages/PublishedPage.cshtml
+4
-4
PublishedPage.generated.cs
...DotNetCore.CAP.Dashboard/Pages/PublishedPage.generated.cs
+441
-429
ReceivedPage.cs
src/DotNetCore.CAP.Dashboard/Pages/ReceivedPage.cs
+2
-1
ReceivedPage.cshtml
src/DotNetCore.CAP.Dashboard/Pages/ReceivedPage.cshtml
+1
-1
ReceivedPage.generated.cs
src/DotNetCore.CAP.Dashboard/Pages/ReceivedPage.generated.cs
+428
-424
SubscriberPage.generated.cs
...otNetCore.CAP.Dashboard/Pages/SubscriberPage.generated.cs
+58
-73
_BlockMetric.cshtml
src/DotNetCore.CAP.Dashboard/Pages/_BlockMetric.cshtml
+6
-5
_BlockMetric.generated.cs
src/DotNetCore.CAP.Dashboard/Pages/_BlockMetric.generated.cs
+14
-18
_Breadcrumbs.generated.cs
src/DotNetCore.CAP.Dashboard/Pages/_Breadcrumbs.generated.cs
+13
-19
_InlineMetric.generated.cs
...DotNetCore.CAP.Dashboard/Pages/_InlineMetric.generated.cs
+7
-7
_Navigation.generated.cs
src/DotNetCore.CAP.Dashboard/Pages/_Navigation.generated.cs
+17
-14
_Paginator.generated.cs
src/DotNetCore.CAP.Dashboard/Pages/_Paginator.generated.cs
+24
-26
_PerPageSelector.generated.cs
...NetCore.CAP.Dashboard/Pages/_PerPageSelector.generated.cs
+23
-23
_SidebarMenu.generated.cs
src/DotNetCore.CAP.Dashboard/Pages/_SidebarMenu.generated.cs
+12
-20
RazorPage.cs
src/DotNetCore.CAP.Dashboard/RazorPage.cs
+6
-6
MySqlDataStorage.cs
src/DotNetCore.CAP.MySql/MySqlDataStorage.cs
+8
-21
Helper.cs
src/DotNetCore.CAP/Internal/Helper.cs
+8
-0
MethodMatcherCache.cs
src/DotNetCore.CAP/Internal/MethodMatcherCache.cs
+1
-1
IDataStorage.cs
src/DotNetCore.CAP/Persistence/IDataStorage.cs
+9
-3
MediumMessage.cs
src/DotNetCore.CAP/Persistence/MediumMessage.cs
+2
-0
No files found.
samples/Sample.RabbitMQ.MySql/Controllers/ValuesController.cs
View file @
c4f4f5f4
...
@@ -75,5 +75,12 @@ namespace Sample.RabbitMQ.MySql.Controllers
...
@@ -75,5 +75,12 @@ namespace Sample.RabbitMQ.MySql.Controllers
{
{
Console
.
WriteLine
(
$@"
{
DateTime
.
Now
}
Subscriber invoked, Info:
{
p
}
"
);
Console
.
WriteLine
(
$@"
{
DateTime
.
Now
}
Subscriber invoked, Info:
{
p
}
"
);
}
}
[
NonAction
]
[
CapSubscribe
(
"sample.rabbitmq.mysql"
,
Group
=
"group.test2"
)]
public
void
Subscriber2
(
DateTime
p
,
[
FromCap
]
CapHeader
header
)
{
Console
.
WriteLine
(
$@"
{
DateTime
.
Now
}
Subscriber invoked, Info:
{
p
}
"
);
}
}
}
}
}
samples/Sample.RabbitMQ.MySql/Sample.RabbitMQ.MySql.csproj
View file @
c4f4f5f4
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.0.0-rc1.final" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.0.0-rc1.final" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\DotNetCore.CAP.Dashboard\DotNetCore.CAP.Dashboard.csproj" />
<ProjectReference Include="..\..\src\DotNetCore.CAP.MySql\DotNetCore.CAP.MySql.csproj" />
<ProjectReference Include="..\..\src\DotNetCore.CAP.MySql\DotNetCore.CAP.MySql.csproj" />
<ProjectReference Include="..\..\src\DotNetCore.CAP.RabbitMQ\DotNetCore.CAP.RabbitMQ.csproj" />
<ProjectReference Include="..\..\src\DotNetCore.CAP.RabbitMQ\DotNetCore.CAP.RabbitMQ.csproj" />
<ProjectReference Include="..\..\src\DotNetCore.CAP\DotNetCore.CAP.csproj" />
<ProjectReference Include="..\..\src\DotNetCore.CAP\DotNetCore.CAP.csproj" />
...
...
samples/Sample.RabbitMQ.MySql/Startup.cs
View file @
c4f4f5f4
...
@@ -15,7 +15,7 @@ namespace Sample.RabbitMQ.MySql
...
@@ -15,7 +15,7 @@ namespace Sample.RabbitMQ.MySql
{
{
x
.
UseEntityFramework
<
AppDbContext
>();
x
.
UseEntityFramework
<
AppDbContext
>();
x
.
UseRabbitMQ
(
"192.168.2.120"
);
x
.
UseRabbitMQ
(
"192.168.2.120"
);
//
x.UseDashboard();
x
.
UseDashboard
();
x
.
FailedRetryCount
=
5
;
x
.
FailedRetryCount
=
5
;
x
.
FailedThresholdCallback
=
(
type
,
msg
)
=>
x
.
FailedThresholdCallback
=
(
type
,
msg
)
=>
{
{
...
...
src/DotNetCore.CAP.Dashboard/AwaitableInfo.cs
0 → 100644
View file @
c4f4f5f4
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System
;
using
System.Linq
;
using
System.Reflection
;
using
System.Runtime.CompilerServices
;
namespace
Microsoft.Extensions.Internal
{
internal
struct
AwaitableInfo
{
public
Type
AwaiterType
{
get
;
}
public
PropertyInfo
AwaiterIsCompletedProperty
{
get
;
}
public
MethodInfo
AwaiterGetResultMethod
{
get
;
}
public
MethodInfo
AwaiterOnCompletedMethod
{
get
;
}
public
MethodInfo
AwaiterUnsafeOnCompletedMethod
{
get
;
}
public
Type
ResultType
{
get
;
}
public
MethodInfo
GetAwaiterMethod
{
get
;
}
public
AwaitableInfo
(
Type
awaiterType
,
PropertyInfo
awaiterIsCompletedProperty
,
MethodInfo
awaiterGetResultMethod
,
MethodInfo
awaiterOnCompletedMethod
,
MethodInfo
awaiterUnsafeOnCompletedMethod
,
Type
resultType
,
MethodInfo
getAwaiterMethod
)
{
AwaiterType
=
awaiterType
;
AwaiterIsCompletedProperty
=
awaiterIsCompletedProperty
;
AwaiterGetResultMethod
=
awaiterGetResultMethod
;
AwaiterOnCompletedMethod
=
awaiterOnCompletedMethod
;
AwaiterUnsafeOnCompletedMethod
=
awaiterUnsafeOnCompletedMethod
;
ResultType
=
resultType
;
GetAwaiterMethod
=
getAwaiterMethod
;
}
public
static
bool
IsTypeAwaitable
(
Type
type
,
out
AwaitableInfo
awaitableInfo
)
{
// Based on Roslyn code: http://source.roslyn.io/#Microsoft.CodeAnalysis.Workspaces/Shared/Extensions/ISymbolExtensions.cs,db4d48ba694b9347
// Awaitable must have method matching "object GetAwaiter()"
var
getAwaiterMethod
=
type
.
GetRuntimeMethods
().
FirstOrDefault
(
m
=>
m
.
Name
.
Equals
(
"GetAwaiter"
,
StringComparison
.
OrdinalIgnoreCase
)
&&
m
.
GetParameters
().
Length
==
0
&&
m
.
ReturnType
!=
null
);
if
(
getAwaiterMethod
==
null
)
{
awaitableInfo
=
default
(
AwaitableInfo
);
return
false
;
}
var
awaiterType
=
getAwaiterMethod
.
ReturnType
;
// Awaiter must have property matching "bool IsCompleted { get; }"
var
isCompletedProperty
=
awaiterType
.
GetRuntimeProperties
().
FirstOrDefault
(
p
=>
p
.
Name
.
Equals
(
"IsCompleted"
,
StringComparison
.
OrdinalIgnoreCase
)
&&
p
.
PropertyType
==
typeof
(
bool
)
&&
p
.
GetMethod
!=
null
);
if
(
isCompletedProperty
==
null
)
{
awaitableInfo
=
default
(
AwaitableInfo
);
return
false
;
}
// Awaiter must implement INotifyCompletion
var
awaiterInterfaces
=
awaiterType
.
GetInterfaces
();
var
implementsINotifyCompletion
=
awaiterInterfaces
.
Any
(
t
=>
t
==
typeof
(
INotifyCompletion
));
if
(!
implementsINotifyCompletion
)
{
awaitableInfo
=
default
(
AwaitableInfo
);
return
false
;
}
// INotifyCompletion supplies a method matching "void OnCompleted(Action action)"
var
iNotifyCompletionMap
=
awaiterType
.
GetTypeInfo
()
.
GetRuntimeInterfaceMap
(
typeof
(
INotifyCompletion
));
var
onCompletedMethod
=
iNotifyCompletionMap
.
InterfaceMethods
.
Single
(
m
=>
m
.
Name
.
Equals
(
"OnCompleted"
,
StringComparison
.
OrdinalIgnoreCase
)
&&
m
.
ReturnType
==
typeof
(
void
)
&&
m
.
GetParameters
().
Length
==
1
&&
m
.
GetParameters
()[
0
].
ParameterType
==
typeof
(
Action
));
// Awaiter optionally implements ICriticalNotifyCompletion
var
implementsICriticalNotifyCompletion
=
awaiterInterfaces
.
Any
(
t
=>
t
==
typeof
(
ICriticalNotifyCompletion
));
MethodInfo
unsafeOnCompletedMethod
;
if
(
implementsICriticalNotifyCompletion
)
{
// ICriticalNotifyCompletion supplies a method matching "void UnsafeOnCompleted(Action action)"
var
iCriticalNotifyCompletionMap
=
awaiterType
.
GetTypeInfo
()
.
GetRuntimeInterfaceMap
(
typeof
(
ICriticalNotifyCompletion
));
unsafeOnCompletedMethod
=
iCriticalNotifyCompletionMap
.
InterfaceMethods
.
Single
(
m
=>
m
.
Name
.
Equals
(
"UnsafeOnCompleted"
,
StringComparison
.
OrdinalIgnoreCase
)
&&
m
.
ReturnType
==
typeof
(
void
)
&&
m
.
GetParameters
().
Length
==
1
&&
m
.
GetParameters
()[
0
].
ParameterType
==
typeof
(
Action
));
}
else
{
unsafeOnCompletedMethod
=
null
;
}
// Awaiter must have method matching "void GetResult" or "T GetResult()"
var
getResultMethod
=
awaiterType
.
GetRuntimeMethods
().
FirstOrDefault
(
m
=>
m
.
Name
.
Equals
(
"GetResult"
)
&&
m
.
GetParameters
().
Length
==
0
);
if
(
getResultMethod
==
null
)
{
awaitableInfo
=
default
(
AwaitableInfo
);
return
false
;
}
awaitableInfo
=
new
AwaitableInfo
(
awaiterType
,
isCompletedProperty
,
getResultMethod
,
onCompletedMethod
,
unsafeOnCompletedMethod
,
getResultMethod
.
ReturnType
,
getAwaiterMethod
);
return
true
;
}
}
}
\ No newline at end of file
src/DotNetCore.CAP.Dashboard/CAP.DashboardMiddleware.cs
View file @
c4f4f5f4
...
@@ -6,19 +6,89 @@ using System.Linq;
...
@@ -6,19 +6,89 @@ using System.Linq;
using
System.Net
;
using
System.Net
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
DotNetCore.CAP.Dashboard
;
using
DotNetCore.CAP.Dashboard
;
using
DotNetCore.CAP.Dashboard.GatewayProxy
;
using
DotNetCore.CAP.Dashboard.NodeDiscovery
;
using
DotNetCore.CAP.Persistence
;
using
Microsoft.AspNetCore.Builder
;
using
Microsoft.AspNetCore.Hosting
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.Extensions.DependencyInjection
;
// ReSharper disable once CheckNamespace
// ReSharper disable once CheckNamespace
namespace
DotNetCore.CAP
namespace
DotNetCore.CAP
{
{
public
static
class
CapBuilderExtension
{
public
static
IApplicationBuilder
UseCapDashboard
(
this
IApplicationBuilder
app
)
{
if
(
app
==
null
)
{
throw
new
ArgumentNullException
(
nameof
(
app
));
}
CheckRequirement
(
app
);
var
provider
=
app
.
ApplicationServices
;
if
(
provider
.
GetService
<
DashboardOptions
>()
!=
null
)
{
if
(
provider
.
GetService
<
DiscoveryOptions
>()
!=
null
)
{
app
.
UseMiddleware
<
GatewayProxyMiddleware
>();
}
app
.
UseMiddleware
<
DashboardMiddleware
>();
}
return
app
;
}
private
static
void
CheckRequirement
(
IApplicationBuilder
app
)
{
var
marker
=
app
.
ApplicationServices
.
GetService
<
CapMarkerService
>();
if
(
marker
==
null
)
{
throw
new
InvalidOperationException
(
"AddCap() must be called on the service collection. eg: services.AddCap(...)"
);
}
var
messageQueueMarker
=
app
.
ApplicationServices
.
GetService
<
CapMessageQueueMakerService
>();
if
(
messageQueueMarker
==
null
)
{
throw
new
InvalidOperationException
(
"You must be config used message queue provider at AddCap() options! eg: services.AddCap(options=>{ options.UseKafka(...) })"
);
}
var
databaseMarker
=
app
.
ApplicationServices
.
GetService
<
CapStorageMarkerService
>();
if
(
databaseMarker
==
null
)
{
throw
new
InvalidOperationException
(
"You must be config used database provider at AddCap() options! eg: services.AddCap(options=>{ options.UseSqlServer(...) })"
);
}
}
}
sealed
class
CapStartupFilter
:
IStartupFilter
{
public
Action
<
IApplicationBuilder
>
Configure
(
Action
<
IApplicationBuilder
>
next
)
{
return
app
=>
{
app
.
UseCapDashboard
();
next
(
app
);
};
}
}
public
class
DashboardMiddleware
public
class
DashboardMiddleware
{
{
private
readonly
RequestDelegate
_next
;
private
readonly
RequestDelegate
_next
;
private
readonly
DashboardOptions
_options
;
private
readonly
DashboardOptions
_options
;
private
readonly
RouteCollection
_routes
;
private
readonly
RouteCollection
_routes
;
private
readonly
IStorage
_storage
;
private
readonly
I
Data
Storage
_storage
;
public
DashboardMiddleware
(
RequestDelegate
next
,
DashboardOptions
options
,
IStorage
storage
,
public
DashboardMiddleware
(
RequestDelegate
next
,
DashboardOptions
options
,
I
Data
Storage
storage
,
RouteCollection
routes
)
RouteCollection
routes
)
{
{
_next
=
next
??
throw
new
ArgumentNullException
(
nameof
(
next
));
_next
=
next
??
throw
new
ArgumentNullException
(
nameof
(
next
));
...
...
src/DotNetCore.CAP.Dashboard/CAP.DashboardOptionsExtensions.cs
View file @
c4f4f5f4
...
@@ -6,6 +6,7 @@ using DotNetCore.CAP;
...
@@ -6,6 +6,7 @@ using DotNetCore.CAP;
using
DotNetCore.CAP.Dashboard
;
using
DotNetCore.CAP.Dashboard
;
using
DotNetCore.CAP.Dashboard.GatewayProxy
;
using
DotNetCore.CAP.Dashboard.GatewayProxy
;
using
DotNetCore.CAP.Dashboard.GatewayProxy.Requester
;
using
DotNetCore.CAP.Dashboard.GatewayProxy.Requester
;
using
Microsoft.AspNetCore.Hosting
;
using
Microsoft.Extensions.DependencyInjection
;
using
Microsoft.Extensions.DependencyInjection
;
namespace
DotNetCore.CAP
namespace
DotNetCore.CAP
...
@@ -23,11 +24,13 @@ namespace DotNetCore.CAP
...
@@ -23,11 +24,13 @@ namespace DotNetCore.CAP
{
{
var
dashboardOptions
=
new
DashboardOptions
();
var
dashboardOptions
=
new
DashboardOptions
();
_options
?.
Invoke
(
dashboardOptions
);
_options
?.
Invoke
(
dashboardOptions
);
services
.
AddTransient
<
IStartupFilter
,
CapStartupFilter
>();
services
.
AddSingleton
(
dashboardOptions
);
services
.
AddSingleton
(
dashboardOptions
);
services
.
AddSingleton
(
DashboardRoutes
.
Routes
);
services
.
AddSingleton
(
DashboardRoutes
.
Routes
);
services
.
AddSingleton
<
IHttpRequester
,
HttpClientHttpRequester
>();
services
.
AddSingleton
<
IHttpRequester
,
HttpClientHttpRequester
>();
services
.
AddSingleton
<
IHttpClientCache
,
MemoryHttpClientCache
>();
services
.
AddSingleton
<
IHttpClientCache
,
MemoryHttpClientCache
>();
services
.
AddSingleton
<
IRequestMapper
,
RequestMapper
>();
services
.
AddSingleton
<
IRequestMapper
,
RequestMapper
>();
}
}
}
}
}
}
...
...
src/DotNetCore.CAP.Dashboard/CapCache.cs
0 → 100644
View file @
c4f4f5f4
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading
;
namespace
DotNetCore.CAP.Dashboard
{
#
region
Cache
<
T
>
class
/// <summary>
/// This is a generic cache subsystem based on key/value pairs, where key is generic, too. Key must be unique.
/// Every cache entry has its own timeout.
/// Cache is thread safe and will delete expired entries on its own using System.Threading.Timers (which run on
/// <see cref="ThreadPool" /> threads).
/// </summary>
// ReSharper disable once InheritdocConsiderUsage
// ReSharper disable once InconsistentNaming
internal
class
Cache
<
K
,
T
>
:
IDisposable
{
#
region
Constructor
and
class
members
private
readonly
Dictionary
<
K
,
T
>
_cache
=
new
Dictionary
<
K
,
T
>();
private
readonly
Dictionary
<
K
,
Timer
>
_timers
=
new
Dictionary
<
K
,
Timer
>();
private
readonly
ReaderWriterLockSlim
_locker
=
new
ReaderWriterLockSlim
();
#
endregion
#
region
IDisposable
implementation
&
Clear
private
bool
disposed
;
/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// </summary>
public
void
Dispose
()
{
Dispose
(
true
);
GC
.
SuppressFinalize
(
this
);
}
/// <summary>
/// Releases unmanaged and - optionally - managed resources.
/// </summary>
/// <param name="disposing">
/// <c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.
/// </param>
protected
virtual
void
Dispose
(
bool
disposing
)
{
if
(!
disposed
)
{
disposed
=
true
;
if
(
disposing
)
{
// Dispose managed resources.
Clear
();
_locker
.
Dispose
();
}
// Dispose unmanaged resources
}
}
/// <summary>
/// Clears the entire cache and disposes all active timers.
/// </summary>
public
void
Clear
()
{
_locker
.
EnterWriteLock
();
try
{
try
{
foreach
(
var
t
in
_timers
.
Values
)
{
t
.
Dispose
();
}
}
catch
{
}
_timers
.
Clear
();
_cache
.
Clear
();
}
finally
{
_locker
.
ExitWriteLock
();
}
}
#
endregion
#
region
CheckTimer
// Checks whether a specific timer already exists and adds a new one, if not
private
void
CheckTimer
(
K
key
,
TimeSpan
?
cacheTimeout
,
bool
restartTimerIfExists
)
{
Timer
timer
;
if
(
_timers
.
TryGetValue
(
key
,
out
timer
))
{
if
(
restartTimerIfExists
)
{
timer
.
Change
(
cacheTimeout
??
Timeout
.
InfiniteTimeSpan
,
Timeout
.
InfiniteTimeSpan
);
}
}
else
{
_timers
.
Add
(
key
,
new
Timer
(
RemoveByTimer
,
key
,
cacheTimeout
??
Timeout
.
InfiniteTimeSpan
,
Timeout
.
InfiniteTimeSpan
));
}
}
private
void
RemoveByTimer
(
object
state
)
{
Remove
((
K
)
state
);
}
#
endregion
#
region
AddOrUpdate
,
Get
,
Remove
,
Exists
,
Clear
/// <summary>
/// Adds or updates the specified cache-key with the specified cacheObject and applies a specified timeout (in seconds)
/// to this key.
/// </summary>
/// <param name="key">The cache-key to add or update.</param>
/// <param name="cacheObject">The cache object to store.</param>
/// <param name="cacheTimeout">
/// The cache timeout (lifespan) of this object. Must be 1 or greater.
/// Specify Timeout.Infinite to keep the entry forever.
/// </param>
/// <param name="restartTimerIfExists">
/// (Optional). If set to <c>true</c>, the timer for this cacheObject will be reset if the object already
/// exists in the cache. (Default = false).
/// </param>
public
void
AddOrUpdate
(
K
key
,
T
cacheObject
,
TimeSpan
?
cacheTimeout
,
bool
restartTimerIfExists
=
false
)
{
if
(
disposed
)
{
return
;
}
_locker
.
EnterWriteLock
();
try
{
CheckTimer
(
key
,
cacheTimeout
,
restartTimerIfExists
);
if
(!
_cache
.
ContainsKey
(
key
))
{
_cache
.
Add
(
key
,
cacheObject
);
}
else
{
_cache
[
key
]
=
cacheObject
;
}
}
finally
{
_locker
.
ExitWriteLock
();
}
}
/// <summary>
/// Adds or updates the specified cache-key with the specified cacheObject and applies <c>Timeout.Infinite</c> to this
/// key.
/// </summary>
/// <param name="key">The cache-key to add or update.</param>
/// <param name="cacheObject">The cache object to store.</param>
public
void
AddOrUpdate
(
K
key
,
T
cacheObject
)
{
AddOrUpdate
(
key
,
cacheObject
,
Timeout
.
InfiniteTimeSpan
);
}
/// <summary>
/// Gets the cache entry with the specified key or returns <c>default(T)</c> if the key is not found.
/// </summary>
/// <param name="key">The cache-key to retrieve.</param>
/// <returns>The object from the cache or <c>default(T)</c>, if not found.</returns>
public
T
this
[
K
key
]
=>
Get
(
key
);
/// <summary>
/// Gets the cache entry with the specified key or return <c>default(T)</c> if the key is not found.
/// </summary>
/// <param name="key">The cache-key to retrieve.</param>
/// <returns>The object from the cache or <c>default(T)</c>, if not found.</returns>
public
T
Get
(
K
key
)
{
if
(
disposed
)
{
return
default
(
T
);
}
_locker
.
EnterReadLock
();
try
{
T
rv
;
return
_cache
.
TryGetValue
(
key
,
out
rv
)
?
rv
:
default
(
T
);
}
finally
{
_locker
.
ExitReadLock
();
}
}
/// <summary>
/// Tries to gets the cache entry with the specified key.
/// </summary>
/// <param name="key">The key.</param>
/// <param name="value">(out) The value, if found, or <c>default(T)</c>, if not.</param>
/// <returns><c>True</c>, if <c>key</c> exists, otherwise <c>false</c>.</returns>
public
bool
TryGet
(
K
key
,
out
T
value
)
{
if
(
disposed
)
{
value
=
default
(
T
);
return
false
;
}
_locker
.
EnterReadLock
();
try
{
return
_cache
.
TryGetValue
(
key
,
out
value
);
}
finally
{
_locker
.
ExitReadLock
();
}
}
/// <summary>
/// Removes a series of cache entries in a single call for all key that match the specified key pattern.
/// </summary>
/// <param name="keyPattern">The key pattern to remove. The Predicate has to return true to get key removed.</param>
public
void
Remove
(
Predicate
<
K
>
keyPattern
)
{
if
(
disposed
)
{
return
;
}
_locker
.
EnterWriteLock
();
try
{
var
removers
=
(
from
k
in
_cache
.
Keys
.
Cast
<
K
>()
where
keyPattern
(
k
)
select
k
).
ToList
();
foreach
(
var
workKey
in
removers
)
{
try
{
_timers
[
workKey
].
Dispose
();
}
catch
{
}
_timers
.
Remove
(
workKey
);
_cache
.
Remove
(
workKey
);
}
}
finally
{
_locker
.
ExitWriteLock
();
}
}
/// <summary>
/// Removes the specified cache entry with the specified key.
/// If the key is not found, no exception is thrown, the statement is just ignored.
/// </summary>
/// <param name="key">The cache-key to remove.</param>
public
void
Remove
(
K
key
)
{
if
(
disposed
)
{
return
;
}
_locker
.
EnterWriteLock
();
try
{
if
(
_cache
.
ContainsKey
(
key
))
{
try
{
_timers
[
key
].
Dispose
();
}
catch
{
}
_timers
.
Remove
(
key
);
_cache
.
Remove
(
key
);
}
}
finally
{
_locker
.
ExitWriteLock
();
}
}
/// <summary>
/// Checks if a specified key exists in the cache.
/// </summary>
/// <param name="key">The cache-key to check.</param>
/// <returns><c>True</c> if the key exists in the cache, otherwise <c>False</c>.</returns>
public
bool
Exists
(
K
key
)
{
if
(
disposed
)
{
return
false
;
}
_locker
.
EnterReadLock
();
try
{
return
_cache
.
ContainsKey
(
key
);
}
finally
{
_locker
.
ExitReadLock
();
}
}
#
endregion
}
#
endregion
#
region
Other
Cache
classes
(
derived
)
/// <summary>
/// This is a generic cache subsystem based on key/value pairs, where key is a string.
/// You can add any item to this cache as long as the key is unique, so treat keys as something like namespaces and
/// build them with a
/// specific system/syntax in your application.
/// Every cache entry has its own timeout.
/// Cache is thread safe and will delete expired entries on its own using System.Threading.Timers (which run on
/// <see cref="ThreadPool" /> threads).
/// </summary>
/// <summary>
/// The non-generic Cache class instanciates a Cache{object} that can be used with any type of (mixed) contents.
/// It also publishes a static <c>.Global</c> member, so a cache can be used even without creating a dedicated
/// instance.
/// The <c>.Global</c> member is lazy instanciated.
/// </summary>
internal
class
CapCache
:
Cache
<
string
,
object
>
{
#
region
Static
Global
Cache
instance
private
static
readonly
Lazy
<
CapCache
>
global
=
new
Lazy
<
CapCache
>();
/// <summary>
/// Gets the global shared cache instance valid for the entire process.
/// </summary>
/// <value>
/// The global shared cache instance.
/// </value>
public
static
CapCache
Global
=>
global
.
Value
;
#
endregion
}
#
endregion
}
\ No newline at end of file
src/DotNetCore.CAP.Dashboard/CoercedAwaitableInfo.cs
0 → 100644
View file @
c4f4f5f4
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System
;
using
System.Linq.Expressions
;
using
Microsoft.Extensions.Internal
;
namespace
DotNetCore.CAP.Dashboard
{
internal
struct
CoercedAwaitableInfo
{
public
AwaitableInfo
AwaitableInfo
{
get
;
}
public
Expression
CoercerExpression
{
get
;
}
public
Type
CoercerResultType
{
get
;
}
public
bool
RequiresCoercion
=>
CoercerExpression
!=
null
;
public
CoercedAwaitableInfo
(
AwaitableInfo
awaitableInfo
)
{
AwaitableInfo
=
awaitableInfo
;
CoercerExpression
=
null
;
CoercerResultType
=
null
;
}
public
CoercedAwaitableInfo
(
Expression
coercerExpression
,
Type
coercerResultType
,
AwaitableInfo
coercedAwaitableInfo
)
{
CoercerExpression
=
coercerExpression
;
CoercerResultType
=
coercerResultType
;
AwaitableInfo
=
coercedAwaitableInfo
;
}
public
static
bool
IsTypeAwaitable
(
Type
type
,
out
CoercedAwaitableInfo
info
)
{
if
(
AwaitableInfo
.
IsTypeAwaitable
(
type
,
out
var
directlyAwaitableInfo
))
{
info
=
new
CoercedAwaitableInfo
(
directlyAwaitableInfo
);
return
true
;
}
info
=
default
(
CoercedAwaitableInfo
);
return
false
;
}
}
}
\ No newline at end of file
src/DotNetCore.CAP.Dashboard/CombinedResourceDispatcher.cs
View file @
c4f4f5f4
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System.Reflection
;
using
System.Reflection
;
using
System.Threading.Tasks
;
namespace
DotNetCore.CAP.Dashboard
namespace
DotNetCore.CAP.Dashboard
{
{
...
@@ -22,11 +23,11 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -22,11 +23,11 @@ namespace DotNetCore.CAP.Dashboard
_resourceNames
=
resourceNames
;
_resourceNames
=
resourceNames
;
}
}
protected
override
void
WriteResponse
(
DashboardResponse
response
)
protected
override
async
Task
WriteResponse
(
DashboardResponse
response
)
{
{
foreach
(
var
resourceName
in
_resourceNames
)
foreach
(
var
resourceName
in
_resourceNames
)
{
{
WriteResource
(
await
WriteResource
(
response
,
response
,
_assembly
,
_assembly
,
$"
{
_baseNamespace
}
.
{
resourceName
}
"
);
$"
{
_baseNamespace
}
.
{
resourceName
}
"
);
...
...
src/DotNetCore.CAP.Dashboard/DashboardContext.cs
View file @
c4f4f5f4
...
@@ -3,13 +3,14 @@
...
@@ -3,13 +3,14 @@
using
System
;
using
System
;
using
System.Text.RegularExpressions
;
using
System.Text.RegularExpressions
;
using
DotNetCore.CAP.Persistence
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Http
;
namespace
DotNetCore.CAP.Dashboard
namespace
DotNetCore.CAP.Dashboard
{
{
public
abstract
class
DashboardContext
public
abstract
class
DashboardContext
{
{
protected
DashboardContext
(
IStorage
storage
,
DashboardOptions
options
)
protected
DashboardContext
(
I
Data
Storage
storage
,
DashboardOptions
options
)
{
{
if
(
storage
==
null
)
if
(
storage
==
null
)
{
{
...
@@ -25,7 +26,7 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -25,7 +26,7 @@ namespace DotNetCore.CAP.Dashboard
Options
=
options
;
Options
=
options
;
}
}
public
IStorage
Storage
{
get
;
}
public
I
Data
Storage
Storage
{
get
;
}
public
DashboardOptions
Options
{
get
;
}
public
DashboardOptions
Options
{
get
;
}
...
@@ -41,7 +42,7 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -41,7 +42,7 @@ namespace DotNetCore.CAP.Dashboard
public
sealed
class
CapDashboardContext
:
DashboardContext
public
sealed
class
CapDashboardContext
:
DashboardContext
{
{
public
CapDashboardContext
(
public
CapDashboardContext
(
IStorage
storage
,
I
Data
Storage
storage
,
DashboardOptions
options
,
DashboardOptions
options
,
HttpContext
httpContext
)
HttpContext
httpContext
)
:
base
(
storage
,
options
)
:
base
(
storage
,
options
)
...
...
src/DotNetCore.CAP.Dashboard/DashboardRoutes.cs
View file @
c4f4f5f4
...
@@ -83,14 +83,14 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -83,14 +83,14 @@ namespace DotNetCore.CAP.Dashboard
Routes
.
AddJsonResult
(
"/published/message/(?<Id>.+)"
,
x
=>
Routes
.
AddJsonResult
(
"/published/message/(?<Id>.+)"
,
x
=>
{
{
var
id
=
long
.
Parse
(
x
.
UriMatch
.
Groups
[
"Id"
].
Value
);
var
id
=
long
.
Parse
(
x
.
UriMatch
.
Groups
[
"Id"
].
Value
);
var
message
=
x
.
Storage
.
Get
Connection
().
GetPublishedMessageAsync
(
id
)
var
message
=
x
.
Storage
.
Get
MonitoringApi
().
GetPublishedMessageAsync
(
id
)
.
GetAwaiter
().
GetResult
();
.
GetAwaiter
().
GetResult
();
return
message
.
Content
;
return
message
.
Content
;
});
});
Routes
.
AddJsonResult
(
"/received/message/(?<Id>.+)"
,
x
=>
Routes
.
AddJsonResult
(
"/received/message/(?<Id>.+)"
,
x
=>
{
{
var
id
=
long
.
Parse
(
x
.
UriMatch
.
Groups
[
"Id"
].
Value
);
var
id
=
long
.
Parse
(
x
.
UriMatch
.
Groups
[
"Id"
].
Value
);
var
message
=
x
.
Storage
.
Get
Connection
().
GetReceivedMessageAsync
(
id
)
var
message
=
x
.
Storage
.
Get
MonitoringApi
().
GetReceivedMessageAsync
(
id
)
.
GetAwaiter
().
GetResult
();
.
GetAwaiter
().
GetResult
();
return
message
.
Content
;
return
message
.
Content
;
});
});
...
@@ -99,7 +99,7 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -99,7 +99,7 @@ namespace DotNetCore.CAP.Dashboard
"/published/requeue"
,
"/published/requeue"
,
(
client
,
messageId
)
=>
(
client
,
messageId
)
=>
{
{
var
msg
=
client
.
Storage
.
Get
Connection
().
GetPublishedMessageAsync
(
messageId
)
var
msg
=
client
.
Storage
.
Get
MonitoringApi
().
GetPublishedMessageAsync
(
messageId
)
.
GetAwaiter
().
GetResult
();
.
GetAwaiter
().
GetResult
();
client
.
RequestServices
.
GetService
<
IDispatcher
>().
EnqueueToPublish
(
msg
);
client
.
RequestServices
.
GetService
<
IDispatcher
>().
EnqueueToPublish
(
msg
);
});
});
...
@@ -107,9 +107,9 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -107,9 +107,9 @@ namespace DotNetCore.CAP.Dashboard
"/received/requeue"
,
"/received/requeue"
,
(
client
,
messageId
)
=>
(
client
,
messageId
)
=>
{
{
var
msg
=
client
.
Storage
.
Get
Connection
().
GetReceivedMessageAsync
(
messageId
)
var
msg
=
client
.
Storage
.
Get
MonitoringApi
().
GetReceivedMessageAsync
(
messageId
)
.
GetAwaiter
().
GetResult
();
.
GetAwaiter
().
GetResult
();
client
.
RequestServices
.
GetService
<
I
Dispatcher
>().
EnqueueToExecute
(
msg
);
client
.
RequestServices
.
GetService
<
I
SubscriberExecutor
>().
ExecuteAsync
(
msg
);
});
});
Routes
.
AddRazorPage
(
Routes
.
AddRazorPage
(
...
...
src/DotNetCore.CAP.Dashboard/DotNetCore.CAP.Dashboard.csproj
View file @
c4f4f5f4
...
@@ -2,8 +2,21 @@
...
@@ -2,8 +2,21 @@
<PropertyGroup>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<NoWarn>1591</NoWarn>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup>
<MSBuildCurrentFullPath>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe</MSBuildCurrentFullPath>
<RazorProjectFile>Razor.build</RazorProjectFile>
<InnerTargets>GenerateRazorClasses;Build</InnerTargets>
</PropertyGroup>
<Target Name="GenerateRazorClasses">
<Exec Command=""$(MSBuildCurrentFullPath)" $(RazorProjectFile) /v:quiet /nologo" Condition="Exists('$(MSBuildCurrentFullPath)')" />
<Warning Text="Classes for Razor files (*.cshtml) weren't re-generated: couldn't find the '$(MSBuildCurrentFullPath)' file" Condition="!Exists('$(MSBuildCurrentFullPath)')" />
</Target>
<ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Content\css\bootstrap.min.css" />
<EmbeddedResource Include="Content\css\bootstrap.min.css" />
<EmbeddedResource Include="Content\css\cap.css" />
<EmbeddedResource Include="Content\css\cap.css" />
...
@@ -25,83 +38,129 @@
...
@@ -25,83 +38,129 @@
<EmbeddedResource Include="Content\js\rickshaw.min.js" />
<EmbeddedResource Include="Content\js\rickshaw.min.js" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Consul" Version="0.7.2.6" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.0.0" />
</ItemGroup>
<ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DotNetCore.CAP\DotNetCore.CAP.csproj" />
<ProjectReference Include="..\DotNetCore.CAP\DotNetCore.CAP.csproj" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile Update="
Dashboard\
Content\resx\Strings.Designer.cs">
<Compile Update="Content\resx\Strings.Designer.cs">
<DesignTime>True</DesignTime>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<AutoGen>True</AutoGen>
<DependentUpon>Strings.resx</DependentUpon>
<DependentUpon>Strings.resx</DependentUpon>
</Compile>
</Compile>
<Compile Update="Dashboard\Pages\_SidebarMenu.generated.cs">
<Compile Update="Pages\_BlockMetric.generated.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>_BlockMetric.cshtml</DependentUpon>
</Compile>
<Compile Update="Pages\_SidebarMenu.generated.cs">
<DependentUpon>_SidebarMenu.cshtml</DependentUpon>
<DependentUpon>_SidebarMenu.cshtml</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile>
</Compile>
<Compile Update="
Dashboard\
Pages\SidebarMenu.cs">
<Compile Update="Pages\SidebarMenu.cs">
<DependentUpon>_SidebarMenu.cshtml</DependentUpon>
<DependentUpon>_SidebarMenu.cshtml</DependentUpon>
</Compile>
</Compile>
<Compile Update="
Dashboard\
Pages\ReceivedPage.generated.cs">
<Compile Update="Pages\ReceivedPage.generated.cs">
<DependentUpon>ReceivedPage.cshtml</DependentUpon>
<DependentUpon>ReceivedPage.cshtml</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile>
</Compile>
<Compile Update="
Dashboard\
Pages\ReceivedPage.cs">
<Compile Update="Pages\ReceivedPage.cs">
<DependentUpon>ReceivedPage.cshtml</DependentUpon>
<DependentUpon>ReceivedPage.cshtml</DependentUpon>
</Compile>
</Compile>
<Compile Update="Dashboard\Pages\_BlockMetric.generated.cs">
<Compile Update="Pages\BlockMetric.cs">
<DependentUpon>_BlockMetric.cshtml</DependentUpon>
</Compile>
<Compile Update="Dashboard\Pages\BlockMetric.cs">
<DependentUpon>_BlockMetric.cshtml</DependentUpon>
<DependentUpon>_BlockMetric.cshtml</DependentUpon>
</Compile>
</Compile>
<Compile Update="
Dashboard\
Pages\Breadcrumbs.cs">
<Compile Update="Pages\Breadcrumbs.cs">
<DependentUpon>_Breadcrumbs.cshtml</DependentUpon>
<DependentUpon>_Breadcrumbs.cshtml</DependentUpon>
</Compile>
</Compile>
<Compile Update="
Dashboard\
Pages\_Breadcrumbs.generated.cs">
<Compile Update="Pages\_Breadcrumbs.generated.cs">
<DependentUpon>_Breadcrumbs.cshtml</DependentUpon>
<DependentUpon>_Breadcrumbs.cshtml</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile>
</Compile>
<Compile Update="
Dashboard\
Pages\_Paginator.generated.cs">
<Compile Update="Pages\_Paginator.generated.cs">
<DependentUpon>_Paginator.cshtml</DependentUpon>
<DependentUpon>_Paginator.cshtml</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile>
</Compile>
<Compile Update="
Dashboard\
Pages\_Paginator.cs">
<Compile Update="Pages\_Paginator.cs">
<DependentUpon>_Paginator.cshtml</DependentUpon>
<DependentUpon>_Paginator.cshtml</DependentUpon>
</Compile>
</Compile>
<Compile Update="
Dashboard\
Pages\_PerPageSelector.cs">
<Compile Update="Pages\_PerPageSelector.cs">
<DependentUpon>_PerPageSelector.cshtml</DependentUpon>
<DependentUpon>_PerPageSelector.cshtml</DependentUpon>
</Compile>
</Compile>
<Compile Update="
Dashboard\
Pages\_PerPageSelector.generated.cs">
<Compile Update="Pages\_PerPageSelector.generated.cs">
<DependentUpon>_PerPageSelector.cshtml</DependentUpon>
<DependentUpon>_PerPageSelector.cshtml</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile>
</Compile>
<Compile Update="
Dashboard\
Pages\PublishedPage.cs">
<Compile Update="Pages\PublishedPage.cs">
<DependentUpon>PublishedPage.cshtml</DependentUpon>
<DependentUpon>PublishedPage.cshtml</DependentUpon>
</Compile>
</Compile>
<Compile Update="
Dashboard\
Pages\PublishedPage*.cs">
<Compile Update="Pages\PublishedPage*.cs">
<DependentUpon>PublishedPage.cshtml</DependentUpon>
<DependentUpon>PublishedPage.cshtml</DependentUpon>
</Compile>
</Compile>
<Compile Update="
Dashboard\
Pages\LayoutPage.*.cs">
<Compile Update="Pages\LayoutPage.*.cs">
<DependentUpon>LayoutPage.cshtml</DependentUpon>
<DependentUpon>LayoutPage.cshtml</DependentUpon>
</Compile>
</Compile>
<Compile Update="
Dashboard\
Pages\LayoutPage.cs">
<Compile Update="Pages\LayoutPage.cs">
<DependentUpon>LayoutPage.cshtml</DependentUpon>
<DependentUpon>LayoutPage.cshtml</DependentUpon>
</Compile>
</Compile>
<Compile Update="
Dashboard\
Pages\InlineMetric.cs">
<Compile Update="Pages\InlineMetric.cs">
<DependentUpon>_InlineMetric.cshtml</DependentUpon>
<DependentUpon>_InlineMetric.cshtml</DependentUpon>
</Compile>
</Compile>
<Compile Update="Dashboard\Pages\_InlineMetric.generated.cs">
<Compile Update="Pages\LayoutPage.generated.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>LayoutPage.cshtml</DependentUpon>
</Compile>
<Compile Update="Pages\PublishedPage.generated.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>PublishedPage.cshtml</DependentUpon>
</Compile>
<Compile Update="Pages\_InlineMetric.generated.cs">
<DependentUpon>_InlineMetric.cshtml</DependentUpon>
<DependentUpon>_InlineMetric.cshtml</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile>
</Compile>
<Compile Update="
Dashboard\
Pages\_Navigation.generated.cs">
<Compile Update="Pages\_Navigation.generated.cs">
<DependentUpon>_Navigation.cshtml</DependentUpon>
<DependentUpon>_Navigation.cshtml</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile>
</Compile>
<Compile Update="
Dashboard\
Pages\HomePage.generated.cs">
<Compile Update="Pages\HomePage.generated.cs">
<DependentUpon>HomePage.cshtml</DependentUpon>
<DependentUpon>HomePage.cshtml</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile>
</Compile>
<Compile Update="
Dashboard\
Pages\HomePage.cs">
<Compile Update="Pages\HomePage.cs">
<DependentUpon>HomePage.cshtml</DependentUpon>
<DependentUpon>HomePage.cshtml</DependentUpon>
</Compile>
</Compile>
<Compile Update="
Dashboard\
Pages\SubscriberPage.generated.cs">
<Compile Update="Pages\SubscriberPage.generated.cs">
<DependentUpon>SubscriberPage.cshtml</DependentUpon>
<DependentUpon>SubscriberPage.cshtml</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile>
<Compile Update="Pages\NodePage*.cs">
<DependentUpon>NodePage.cshtml</DependentUpon>
</Compile>
</Compile>
<Compile Update="Dashboard\Pages\NodePage*.cs">
</ItemGroup>
<ItemGroup>
<Compile Update="Pages\NodePage.generated.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>NodePage.cshtml</DependentUpon>
<DependentUpon>NodePage.cshtml</DependentUpon>
</Compile>
</Compile>
</ItemGroup>
</ItemGroup>
...
@@ -115,11 +174,66 @@
...
@@ -115,11 +174,66 @@
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<EmbeddedResource Update="
Dashboard\
Content\resx\Strings.resx">
<EmbeddedResource Update="Content\resx\Strings.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<Generator>PublicResXFileCodeGenerator</Generator>
<CustomToolNamespace>DotNetCore.CAP.Dashboard.Resources</CustomToolNamespace>
<CustomToolNamespace>DotNetCore.CAP.Dashboard.Resources</CustomToolNamespace>
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
</EmbeddedResource>
</EmbeddedResource>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<None Update="Pages\HomePage.cshtml">
<Generator>RazorGenerator</Generator>
<LastGenOutput>HomePage.generated.cs</LastGenOutput>
</None>
<None Update="Pages\LayoutPage.cshtml">
<Generator>RazorGenerator</Generator>
<LastGenOutput>LayoutPage.generated.cs</LastGenOutput>
</None>
<None Update="Pages\NodePage.cshtml">
<Generator>RazorGenerator</Generator>
<LastGenOutput>NodePage.generated.cs</LastGenOutput>
</None>
<None Update="Pages\PublishedPage.cshtml">
<Generator>RazorGenerator</Generator>
<LastGenOutput>PublishedPage.generated.cs</LastGenOutput>
</None>
<None Update="Pages\ReceivedPage.cshtml">
<Generator>RazorGenerator</Generator>
<LastGenOutput>ReceivedPage.generated.cs</LastGenOutput>
</None>
<None Update="Pages\SubscriberPage.cshtml">
<Generator>RazorGenerator</Generator>
<LastGenOutput>SubscriberPage.generated.cs</LastGenOutput>
</None>
<None Update="Pages\_BlockMetric.cshtml">
<Generator>RazorGenerator</Generator>
<LastGenOutput>_BlockMetric.generated.cs</LastGenOutput>
</None>
<None Update="Pages\_Breadcrumbs.cshtml">
<Generator>RazorGenerator</Generator>
<LastGenOutput>_Breadcrumbs.generated.cs</LastGenOutput>
</None>
<None Update="Pages\_InlineMetric.cshtml">
<Generator>RazorGenerator</Generator>
<LastGenOutput>_InlineMetric.generated.cs</LastGenOutput>
</None>
<None Update="Pages\_Navigation.cshtml">
<Generator>RazorGenerator</Generator>
<LastGenOutput>_Navigation.generated.cs</LastGenOutput>
</None>
<None Update="Pages\_Paginator.cshtml">
<Generator>RazorGenerator</Generator>
<LastGenOutput>_Paginator.generated.cs</LastGenOutput>
</None>
<None Update="Pages\_PerPageSelector.cshtml">
<Generator>RazorGenerator</Generator>
<LastGenOutput>_PerPageSelector.generated.cs</LastGenOutput>
</None>
<None Update="Pages\_SidebarMenu.cshtml">
<Generator>RazorGenerator</Generator>
<LastGenOutput>_SidebarMenu.generated.cs</LastGenOutput>
</None>
</ItemGroup>
</Project>
</Project>
src/DotNetCore.CAP.Dashboard/EmbeddedResourceDispatcher.cs
View file @
c4f4f5f4
...
@@ -30,22 +30,20 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -30,22 +30,20 @@ namespace DotNetCore.CAP.Dashboard
}
}
}
}
public
Task
Dispatch
(
DashboardContext
context
)
public
async
Task
Dispatch
(
DashboardContext
context
)
{
{
context
.
Response
.
ContentType
=
_contentType
;
context
.
Response
.
ContentType
=
_contentType
;
context
.
Response
.
SetExpire
(
DateTimeOffset
.
Now
.
AddYears
(
1
));
context
.
Response
.
SetExpire
(
DateTimeOffset
.
Now
.
AddYears
(
1
));
WriteResponse
(
context
.
Response
);
await
WriteResponse
(
context
.
Response
);
return
Task
.
FromResult
(
true
);
}
}
protected
virtual
void
WriteResponse
(
DashboardResponse
response
)
protected
virtual
Task
WriteResponse
(
DashboardResponse
response
)
{
{
WriteResource
(
response
,
_assembly
,
_resourceName
);
return
WriteResource
(
response
,
_assembly
,
_resourceName
);
}
}
protected
void
WriteResource
(
DashboardResponse
response
,
Assembly
assembly
,
string
resourceName
)
protected
async
Task
WriteResource
(
DashboardResponse
response
,
Assembly
assembly
,
string
resourceName
)
{
{
using
(
var
inputStream
=
assembly
.
GetManifestResourceStream
(
resourceName
))
using
(
var
inputStream
=
assembly
.
GetManifestResourceStream
(
resourceName
))
{
{
...
@@ -54,8 +52,7 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -54,8 +52,7 @@ namespace DotNetCore.CAP.Dashboard
throw
new
ArgumentException
(
throw
new
ArgumentException
(
$@"Resource with name
{
resourceName
}
not found in assembly
{
assembly
}
."
);
$@"Resource with name
{
resourceName
}
not found in assembly
{
assembly
}
."
);
}
}
await
inputStream
.
CopyToAsync
(
response
.
Body
);
inputStream
.
CopyTo
(
response
.
Body
);
}
}
}
}
}
}
...
...
src/DotNetCore.CAP.Dashboard/GatewayProxy/GatewayProxyMiddleware.cs
View file @
c4f4f5f4
...
@@ -9,7 +9,7 @@ using System.Net;
...
@@ -9,7 +9,7 @@ using System.Net;
using
System.Net.Http
;
using
System.Net.Http
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
DotNetCore.CAP.Dashboard.GatewayProxy.Requester
;
using
DotNetCore.CAP.Dashboard.GatewayProxy.Requester
;
using
DotNetCore.CAP.NodeDiscovery
;
using
DotNetCore.CAP.
Dashboard.
NodeDiscovery
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.Extensions.Logging
;
using
Microsoft.Extensions.Logging
;
using
Microsoft.Extensions.Primitives
;
using
Microsoft.Extensions.Primitives
;
...
...
src/DotNetCore.CAP.Dashboard/HtmlHelper.cs
View file @
c4f4f5f4
...
@@ -10,7 +10,7 @@ using System.Text;
...
@@ -10,7 +10,7 @@ using System.Text;
using
System.Text.RegularExpressions
;
using
System.Text.RegularExpressions
;
using
DotNetCore.CAP.Dashboard.Pages
;
using
DotNetCore.CAP.Dashboard.Pages
;
using
DotNetCore.CAP.Dashboard.Resources
;
using
DotNetCore.CAP.Dashboard.Resources
;
using
DotNetCore.CAP.In
frastructure
;
using
DotNetCore.CAP.In
ternal
;
using
DotNetCore.CAP.Messages
;
using
DotNetCore.CAP.Messages
;
using
Microsoft.Extensions.Internal
;
using
Microsoft.Extensions.Internal
;
...
...
src/DotNetCore.CAP.Dashboard/JsonDispatcher.cs
View file @
c4f4f5f4
...
@@ -38,7 +38,7 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -38,7 +38,7 @@ namespace DotNetCore.CAP.Dashboard
{
{
new
StringEnumConverter
new
StringEnumConverter
{
{
NamingStrategy
=
new
CamelCaseNamingStrategy
()
CamelCaseText
=
true
}
}
}
}
};
};
...
...
src/DotNetCore.CAP.Dashboard/JsonStats.cs
View file @
c4f4f5f4
...
@@ -34,7 +34,7 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -34,7 +34,7 @@ namespace DotNetCore.CAP.Dashboard
{
{
new
StringEnumConverter
new
StringEnumConverter
{
{
NamingStrategy
=
new
CamelCaseNamingStrategy
()
CamelCaseText
=
true
}
}
}
}
};
};
...
@@ -46,7 +46,7 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -46,7 +46,7 @@ namespace DotNetCore.CAP.Dashboard
private
class
StubPage
:
RazorPage
private
class
StubPage
:
RazorPage
{
{
p
rotected
override
void
Execute
()
p
ublic
override
void
Execute
()
{
{
}
}
}
}
...
...
src/DotNetCore.CAP.Dashboard/LocalRequestsOnlyAuthorizationFilter.cs
View file @
c4f4f5f4
// Copyright (c) .NET Core Community. All rights reserved.
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
DotNetCore.CAP.In
frastructure
;
using
DotNetCore.CAP.In
ternal
;
namespace
DotNetCore.CAP.Dashboard
namespace
DotNetCore.CAP.Dashboard
{
{
...
...
src/DotNetCore.CAP.Dashboard/MessageHistoryRenderer.cs
View file @
c4f4f5f4
...
@@ -6,7 +6,7 @@ using System.Collections.Generic;
...
@@ -6,7 +6,7 @@ using System.Collections.Generic;
using
System.Diagnostics.CodeAnalysis
;
using
System.Diagnostics.CodeAnalysis
;
using
System.Net
;
using
System.Net
;
using
System.Text
;
using
System.Text
;
using
DotNetCore.CAP.In
frastructure
;
using
DotNetCore.CAP.In
ternal
;
namespace
DotNetCore.CAP.Dashboard
namespace
DotNetCore.CAP.Dashboard
{
{
...
@@ -24,16 +24,16 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -24,16 +24,16 @@ namespace DotNetCore.CAP.Dashboard
[
SuppressMessage
(
"Microsoft.Performance"
,
"CA1810:InitializeReferenceTypeStaticFieldsInline"
)]
[
SuppressMessage
(
"Microsoft.Performance"
,
"CA1810:InitializeReferenceTypeStaticFieldsInline"
)]
static
MessageHistoryRenderer
()
static
MessageHistoryRenderer
()
{
{
Register
(
StatusName
.
Succeeded
,
SucceededRenderer
);
Register
(
nameof
(
StatusName
.
Succeeded
)
,
SucceededRenderer
);
Register
(
StatusName
.
Failed
,
FailedRenderer
);
Register
(
nameof
(
StatusName
.
Failed
)
,
FailedRenderer
);
BackgroundStateColors
.
Add
(
StatusName
.
Succeeded
,
"#EDF7ED"
);
BackgroundStateColors
.
Add
(
nameof
(
StatusName
.
Succeeded
)
,
"#EDF7ED"
);
BackgroundStateColors
.
Add
(
StatusName
.
Failed
,
"#FAEBEA"
);
BackgroundStateColors
.
Add
(
nameof
(
StatusName
.
Failed
)
,
"#FAEBEA"
);
BackgroundStateColors
.
Add
(
StatusName
.
Scheduled
,
"#E0F3F8"
);
BackgroundStateColors
.
Add
(
nameof
(
StatusName
.
Scheduled
)
,
"#E0F3F8"
);
ForegroundStateColors
.
Add
(
StatusName
.
Succeeded
,
"#5cb85c"
);
ForegroundStateColors
.
Add
(
nameof
(
StatusName
.
Succeeded
)
,
"#5cb85c"
);
ForegroundStateColors
.
Add
(
StatusName
.
Failed
,
"#d9534f"
);
ForegroundStateColors
.
Add
(
nameof
(
StatusName
.
Failed
)
,
"#d9534f"
);
ForegroundStateColors
.
Add
(
StatusName
.
Scheduled
,
"#5bc0de"
);
ForegroundStateColors
.
Add
(
nameof
(
StatusName
.
Scheduled
)
,
"#5bc0de"
);
}
}
public
static
void
AddBackgroundStateColor
(
string
stateName
,
string
color
)
public
static
void
AddBackgroundStateColor
(
string
stateName
,
string
color
)
...
...
src/DotNetCore.CAP.Dashboard/Pages/BlockMetric.cs
View file @
c4f4f5f4
...
@@ -7,9 +7,9 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -7,9 +7,9 @@ namespace DotNetCore.CAP.Dashboard.Pages
{
{
public
BlockMetric
(
DashboardMetric
dashboardMetric
)
public
BlockMetric
(
DashboardMetric
dashboardMetric
)
{
{
Dashboard
Metric
=
dashboardMetric
;
Metric
=
dashboardMetric
;
}
}
public
DashboardMetric
Dashboard
Metric
{
get
;
}
public
DashboardMetric
Metric
{
get
;
}
}
}
}
}
\ No newline at end of file
src/DotNetCore.CAP.Dashboard/Pages/HomePage.generated.cs
View file @
c4f4f5f4
using
DotNetCore.CAP.Messages
;
#
pragma
warning
disable
1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
// <auto-generated>
// This code was generated by a tool.
// This code was generated by a tool.
...
@@ -13,61 +11,45 @@
...
@@ -13,61 +11,45 @@
namespace
DotNetCore.CAP.Dashboard.Pages
namespace
DotNetCore.CAP.Dashboard.Pages
{
{
#line 2 "..\..\HomePage.cshtml"
using
System
;
using
System
;
#line default
#line hidden
#line 3 "..\..\HomePage.cshtml"
using
System.Collections.Generic
;
using
System.Collections.Generic
;
#line default
#line hidden
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
#line 5 "..\..\HomePage.cshtml"
#
line
2
"..\..\Pages\HomePage.cshtml"
using
DotNetCore.CAP.Dashboard
;
#line default
#line hidden
#line 6 "..\..\HomePage.cshtml"
using
DotNetCore.CAP.Dashboard.Pages
;
using
DotNetCore.CAP.Dashboard.Pages
;
#line default
#
line
default
#line hidden
#
line
hidden
#line 7 "..\..
\HomePage.cshtml"
#
line
3
"..\..\Pages
\HomePage.cshtml"
using
DotNetCore.CAP.Dashboard.Resources
;
using
DotNetCore.CAP.Dashboard.Resources
;
#line default
#
line
default
#line hidden
#
line
hidden
#line 4 "..\..\HomePage.cshtml"
#
line
4
"..\..\Pages\HomePage.cshtml"
#line default
using
DotNetCore.CAP.Messages
;
#line hidden
#
line
default
#
line
hidden
#line 8 "..\..
\HomePage.cshtml"
#
line
5
"..\..\Pages
\HomePage.cshtml"
using
Newtonsoft.Json
;
using
Newtonsoft.Json
;
#line default
#
line
default
#line hidden
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
HomePage
:
RazorPage
internal
partial
class
HomePage
:
DotNetCore
.
CAP
.
Dashboard
.
RazorPage
{
{
#line hidden
#line hidden
p
rotected
override
void
Execute
()
p
ublic
override
void
Execute
()
{
{
WriteLiteral
(
"\r\n"
);
WriteLiteral
(
"\r\n"
);
...
@@ -76,176 +58,176 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -76,176 +58,176 @@ namespace DotNetCore.CAP.Dashboard.Pages
#
line
7
"..\..\Pages\HomePage.cshtml"
#line 10 "..\..\HomePage.cshtml"
Layout
=
new
LayoutPage
(
Strings
.
HomePage_Title
);
Layout
=
new
LayoutPage
(
Strings
.
HomePage_Title
);
var
monitor
=
Storage
.
GetMonitoringApi
();
var
monitor
=
Storage
.
GetMonitoringApi
();
IDictionary
<
DateTime
,
int
>
publishedSucceeded
=
monitor
.
HourlySucceededJobs
(
MessageType
.
Publish
);
var
publishedSucceeded
=
monitor
.
HourlySucceededJobs
(
MessageType
.
Publish
);
IDictionary
<
DateTime
,
int
>
publishedFailed
=
monitor
.
HourlyFailedJobs
(
MessageType
.
Publish
);
var
publishedFailed
=
monitor
.
HourlyFailedJobs
(
MessageType
.
Publish
);
IDictionary
<
DateTime
,
int
>
receivedSucceeded
=
monitor
.
HourlySucceededJobs
(
MessageType
.
Subscribe
);
var
receivedSucceeded
=
monitor
.
HourlySucceededJobs
(
MessageType
.
Subscribe
);
IDictionary
<
DateTime
,
int
>
receivedFailed
=
monitor
.
HourlyFailedJobs
(
MessageType
.
Subscribe
);
var
receivedFailed
=
monitor
.
HourlyFailedJobs
(
MessageType
.
Subscribe
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n<div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <h1 class=\"page-header\""
+
WriteLiteral
(
"\r\n<div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <h1 class=\"page-header\""
+
">"
);
">"
);
#line 23 "..\..
\HomePage.cshtml"
#
line
20
"..\..\Pages
\HomePage.cshtml"
Write
(
Strings
.
HomePage_Title
);
Write
(
Strings
.
HomePage_Title
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</h1>\r\n"
);
WriteLiteral
(
"</h1>\r\n"
);
#line 24 "..\..
\HomePage.cshtml"
#
line
21
"..\..\Pages
\HomePage.cshtml"
if
(
Metrics
.
Count
>
0
)
if
(
Metrics
.
Count
>
0
)
{
{
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" <div class=\"row\">\r\n"
);
WriteLiteral
(
" <div class=\"row\">\r\n"
);
#line 27 "..\..
\HomePage.cshtml"
#
line
24
"..\..\Pages
\HomePage.cshtml"
foreach
(
var
metric
in
Metrics
)
foreach
(
var
metric
in
Metrics
)
{
{
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" <div class=\"col-md-2\">\r\n "
);
WriteLiteral
(
" <div class=\"col-md-2\">\r\n "
);
#line 30 "..\..
\HomePage.cshtml"
#
line
27
"..\..\Pages
\HomePage.cshtml"
Write
(
Html
.
BlockMetric
(
metric
));
Write
(
Html
.
BlockMetric
(
metric
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
WriteLiteral
(
"\r\n </div>\r\n"
);
#line 32 "..\..
\HomePage.cshtml"
#
line
29
"..\..\Pages
\HomePage.cshtml"
}
}
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" </div>\r\n"
);
WriteLiteral
(
" </div>\r\n"
);
#line 34 "..\..
\HomePage.cshtml"
#
line
31
"..\..\Pages
\HomePage.cshtml"
}
}
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" <h3>"
);
WriteLiteral
(
" <h3>"
);
#line 35 "..\..
\HomePage.cshtml"
#
line
32
"..\..\Pages
\HomePage.cshtml"
Write
(
Strings
.
HomePage_RealtimeGraph
);
Write
(
Strings
.
HomePage_RealtimeGraph
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</h3>\r\n <div id=\"realtimeGraph\"\r\n data-published-succeeded=\""
);
WriteLiteral
(
"</h3>\r\n <div id=\"realtimeGraph\"\r\n data-published-succeeded=\""
);
#line 37 "..\..
\HomePage.cshtml"
#
line
34
"..\..\Pages
\HomePage.cshtml"
Write
(
Statistics
.
PublishedSucceeded
);
Write
(
Statistics
.
PublishedSucceeded
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\"\r\n data-published-failed=\""
);
WriteLiteral
(
"\"\r\n data-published-failed=\""
);
#line 38 "..\..
\HomePage.cshtml"
#
line
35
"..\..\Pages
\HomePage.cshtml"
Write
(
Statistics
.
PublishedFailed
);
Write
(
Statistics
.
PublishedFailed
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\"\r\n data-published-succeeded-string=\""
);
WriteLiteral
(
"\"\r\n data-published-succeeded-string=\""
);
#line 39 "..\..
\HomePage.cshtml"
#
line
36
"..\..\Pages
\HomePage.cshtml"
Write
(
Strings
.
HomePage_GraphHover_PSucceeded
);
Write
(
Strings
.
HomePage_GraphHover_PSucceeded
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\"\r\n data-published-failed-string=\""
);
WriteLiteral
(
"\"\r\n data-published-failed-string=\""
);
#line 40 "..\..
\HomePage.cshtml"
#
line
37
"..\..\Pages
\HomePage.cshtml"
Write
(
Strings
.
HomePage_GraphHover_PFailed
);
Write
(
Strings
.
HomePage_GraphHover_PFailed
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\"\r\n data-received-succeeded=\""
);
WriteLiteral
(
"\"\r\n data-received-succeeded=\""
);
#line 41 "..\..
\HomePage.cshtml"
#
line
38
"..\..\Pages
\HomePage.cshtml"
Write
(
Statistics
.
ReceivedSucceeded
);
Write
(
Statistics
.
ReceivedSucceeded
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\"\r\n data-received-failed=\""
);
WriteLiteral
(
"\"\r\n data-received-failed=\""
);
#line 42 "..\..
\HomePage.cshtml"
#
line
39
"..\..\Pages
\HomePage.cshtml"
Write
(
Statistics
.
ReceivedFailed
);
Write
(
Statistics
.
ReceivedFailed
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\"\r\n data-received-succeeded-string=\""
);
WriteLiteral
(
"\"\r\n data-received-succeeded-string=\""
);
#line 43 "..\..
\HomePage.cshtml"
#
line
40
"..\..\Pages
\HomePage.cshtml"
Write
(
Strings
.
HomePage_GraphHover_RSucceeded
);
Write
(
Strings
.
HomePage_GraphHover_RSucceeded
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\"\r\n data-received-failed-string=\""
);
WriteLiteral
(
"\"\r\n data-received-failed-string=\""
);
#line 44 "..\..
\HomePage.cshtml"
#
line
41
"..\..\Pages
\HomePage.cshtml"
Write
(
Strings
.
HomePage_GraphHover_RFailed
);
Write
(
Strings
.
HomePage_GraphHover_RFailed
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
@"""></div>
WriteLiteral
(
@""">
</div>
<div style=""display: none;"">
<div style=""display: none;"">
<span data-metric=""published_succeeded:count""></span>
<span data-metric=""published_succeeded:count""></span>
<span data-metric=""published_failed:count""></span>
<span data-metric=""published_failed:count""></span>
...
@@ -258,94 +240,94 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -258,94 +240,94 @@ namespace DotNetCore.CAP.Dashboard.Pages
#line 53 "..\..
\HomePage.cshtml"
#
line
51
"..\..\Pages
\HomePage.cshtml"
Write
(
Strings
.
HomePage_HistoryGraph
);
Write
(
Strings
.
HomePage_HistoryGraph
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n </h3>\r\n\r\n <div id=\"historyGraph\"\r\n data-published-su"
+
WriteLiteral
(
"\r\n </h3>\r\n\r\n <div id=\"historyGraph\"\r\n data-published-su"
+
"cceeded=\""
);
"cceeded=\""
);
#line 57 "..\..
\HomePage.cshtml"
#
line
55
"..\..\Pages
\HomePage.cshtml"
Write
(
JsonConvert
.
SerializeObject
(
publishedSucceeded
));
Write
(
JsonConvert
.
SerializeObject
(
publishedSucceeded
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\"\r\n data-published-failed=\""
);
WriteLiteral
(
"\"\r\n data-published-failed=\""
);
#line 58 "..\..
\HomePage.cshtml"
#
line
56
"..\..\Pages
\HomePage.cshtml"
Write
(
JsonConvert
.
SerializeObject
(
publishedFailed
));
Write
(
JsonConvert
.
SerializeObject
(
publishedFailed
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\"\r\n data-published-succeeded-string=\""
);
WriteLiteral
(
"\"\r\n data-published-succeeded-string=\""
);
#line 59 "..\..
\HomePage.cshtml"
#
line
57
"..\..\Pages
\HomePage.cshtml"
Write
(
Strings
.
HomePage_GraphHover_PSucceeded
);
Write
(
Strings
.
HomePage_GraphHover_PSucceeded
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\"\r\n data-published-failed-string=\""
);
WriteLiteral
(
"\"\r\n data-published-failed-string=\""
);
#line 60 "..\..
\HomePage.cshtml"
#
line
58
"..\..\Pages
\HomePage.cshtml"
Write
(
Strings
.
HomePage_GraphHover_PFailed
);
Write
(
Strings
.
HomePage_GraphHover_PFailed
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\"\r\n data-received-succeeded=\""
);
WriteLiteral
(
"\"\r\n data-received-succeeded=\""
);
#line 61 "..\..
\HomePage.cshtml"
#
line
59
"..\..\Pages
\HomePage.cshtml"
Write
(
JsonConvert
.
SerializeObject
(
receivedSucceeded
));
Write
(
JsonConvert
.
SerializeObject
(
receivedSucceeded
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\"\r\n data-received-failed=\""
);
WriteLiteral
(
"\"\r\n data-received-failed=\""
);
#line 62 "..\..
\HomePage.cshtml"
#
line
60
"..\..\Pages
\HomePage.cshtml"
Write
(
JsonConvert
.
SerializeObject
(
receivedFailed
));
Write
(
JsonConvert
.
SerializeObject
(
receivedFailed
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\"\r\n data-received-succeeded-string=\""
);
WriteLiteral
(
"\"\r\n data-received-succeeded-string=\""
);
#line 63 "..\..
\HomePage.cshtml"
#
line
61
"..\..\Pages
\HomePage.cshtml"
Write
(
Strings
.
HomePage_GraphHover_RSucceeded
);
Write
(
Strings
.
HomePage_GraphHover_RSucceeded
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\"\r\n data-received-failed-string=\""
);
WriteLiteral
(
"\"\r\n data-received-failed-string=\""
);
#line 64 "..\..
\HomePage.cshtml"
#
line
62
"..\..\Pages
\HomePage.cshtml"
Write
(
Strings
.
HomePage_GraphHover_RFailed
);
Write
(
Strings
.
HomePage_GraphHover_RFailed
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\">\r\n </div>\r\n </div>\r\n</div>"
);
WriteLiteral
(
"\">\r\n </div>\r\n </div>\r\n</div>"
);
}
}
...
...
src/DotNetCore.CAP.Dashboard/Pages/LayoutPage.generated.cs
View file @
c4f4f5f4
...
@@ -12,49 +12,49 @@
...
@@ -12,49 +12,49 @@
namespace
DotNetCore.CAP.Dashboard.Pages
namespace
DotNetCore.CAP.Dashboard.Pages
{
{
#line 2 "..\..
\LayoutPage.cshtml"
#
line
2
"..\..\Pages
\LayoutPage.cshtml"
using
System
;
using
System
;
#line default
#
line
default
#line hidden
#
line
hidden
using
System.Collections.Generic
;
using
System.Collections.Generic
;
#line 3 "..\..
\LayoutPage.cshtml"
#
line
3
"..\..\Pages
\LayoutPage.cshtml"
using
System.Globalization
;
using
System.Globalization
;
#line default
#
line
default
#line hidden
#
line
hidden
using
System.Linq
;
using
System.Linq
;
#line 4 "..\..
\LayoutPage.cshtml"
#
line
4
"..\..\Pages
\LayoutPage.cshtml"
using
System.Reflection
;
using
System.Reflection
;
#line default
#
line
default
#line hidden
#
line
hidden
using
System.Text
;
using
System.Text
;
#line 5 "..\..
\LayoutPage.cshtml"
#
line
5
"..\..\Pages
\LayoutPage.cshtml"
using
DotNetCore.CAP.Dashboard.Pages
;
using
DotNetCore.CAP.Dashboard.Pages
;
#line default
#
line
default
#line hidden
#
line
hidden
#line 6 "..\..
\LayoutPage.cshtml"
#
line
6
"..\..\Pages
\LayoutPage.cshtml"
using
DotNetCore.CAP.Dashboard.Resources
;
using
DotNetCore.CAP.Dashboard.Resources
;
#line default
#
line
default
#line hidden
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
public
partial
class
LayoutPage
:
DotNetCore
.
CAP
.
Dashboard
.
RazorPage
public
partial
class
LayoutPage
:
DotNetCore
.
CAP
.
Dashboard
.
RazorPage
{
{
#line hidden
#line hidden
p
rotected
override
void
Execute
()
p
ublic
override
void
Execute
()
{
{
WriteLiteral
(
"\r\n"
);
WriteLiteral
(
"\r\n"
);
...
@@ -62,53 +62,53 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -62,53 +62,53 @@ namespace DotNetCore.CAP.Dashboard.Pages
WriteLiteral
(
"<!DOCTYPE html>\r\n<html lang=\""
);
WriteLiteral
(
"<!DOCTYPE html>\r\n<html lang=\""
);
#line 9 "..\..
\LayoutPage.cshtml"
#
line
9
"..\..\Pages
\LayoutPage.cshtml"
Write
(
CultureInfo
.
CurrentUICulture
.
TwoLetterISOLanguageName
);
Write
(
CultureInfo
.
CurrentUICulture
.
TwoLetterISOLanguageName
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\">\r\n<head>\r\n <title>"
);
WriteLiteral
(
"\">\r\n<head>\r\n <title>"
);
#line 11 "..\..
\LayoutPage.cshtml"
#
line
11
"..\..\Pages
\LayoutPage.cshtml"
Write
(
Title
);
Write
(
Title
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" - CAP</title>\r\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\r\n <m"
+
WriteLiteral
(
" - CAP</title>\r\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\r\n <m"
+
"eta charset=\"utf-8\">\r\n <meta name=\"viewport\" content=\"width=device-width, ini"
+
"eta charset=\"utf-8\">\r\n <meta name=\"viewport\" content=\"width=device-width, ini"
+
"tial-scale=1.0\">\r\n"
);
"tial-scale=1.0\">\r\n"
);
#line 15 "..\..
\LayoutPage.cshtml"
#
line
15
"..\..\Pages
\LayoutPage.cshtml"
var
version
=
GetType
().
GetTypeInfo
().
Assembly
.
GetName
().
Version
;
var
version
=
GetType
().
GetTypeInfo
().
Assembly
.
GetName
().
Version
;
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" <link rel=\"stylesheet\" href=\""
);
WriteLiteral
(
" <link rel=\"stylesheet\" href=\""
);
#line 16 "..\..
\LayoutPage.cshtml"
#
line
16
"..\..\Pages
\LayoutPage.cshtml"
Write
(
Url
.
To
(
$"/css
{
version
.
Major
}{
version
.
Minor
}{
version
.
Build
}
"
));
Write
(
Url
.
To
(
$"/css
{
version
.
Major
}{
version
.
Minor
}{
version
.
Build
}
"
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
@""">
WriteLiteral
(
@""">
</head>
</head>
<body>
<body>
<!-- Wrap all page content here -->
<!-- Wrap all page content here -->
<div id=""wrap"">
<div id=""wrap"">
<!-- Fixed navbar -->
<!-- Fixed navbar -->
<div class=""navbar navbar-default navbar-fixed-top"">
<div class=""navbar navbar-default navbar-fixed-top"">
...
@@ -123,201 +123,194 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -123,201 +123,194 @@ namespace DotNetCore.CAP.Dashboard.Pages
#line 31 "..\..
\LayoutPage.cshtml"
#
line
31
"..\..\Pages
\LayoutPage.cshtml"
Write
(
Url
.
Home
());
Write
(
Url
.
Home
());
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\">CAP Dashboard</a>\r\n </div>\r\n <div class=\"collapse
"
+
WriteLiteral
(
"\">CAP Dashboard</a>\r\n </div>\r\n <div class=\"collapse navbar-
"
+
" navbar-collapse\">\r\n
"
);
"collapse\">\r\n
"
);
#line 34 "..\..
\LayoutPage.cshtml"
#
line
34
"..\..\Pages
\LayoutPage.cshtml"
Write
(
Html
.
RenderPartial
(
new
Navigation
()));
Write
(
Html
.
RenderPartial
(
new
Navigation
()));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n"
);
WriteLiteral
(
"\r\n"
);
#line 35 "..\..
\LayoutPage.cshtml"
#
line
35
"..\..\Pages
\LayoutPage.cshtml"
if
(
AppPath
!=
null
)
if
(
AppPath
!=
null
)
{
{
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" <ul class=\"nav navbar-nav navbar-right\">\r\n
"
+
WriteLiteral
(
" <ul class=\"nav navbar-nav navbar-right\">\r\n
"
+
" <li>\r\n
<a href=\""
);
" <li>\r\n
<a href=\""
);
#line 39 "..\..
\LayoutPage.cshtml"
#
line
39
"..\..\Pages
\LayoutPage.cshtml"
Write
(
AppPath
);
Write
(
AppPath
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\">\r\n <span class=\"glyphicon glyphicon-log-out\"
"
+
WriteLiteral
(
"\">\r\n <span class=\"glyphicon glyphicon-log-out\"></s
"
+
"></span>\r\n
"
);
"pan>\r\n
"
);
#line 41 "..\..
\LayoutPage.cshtml"
#
line
41
"..\..\Pages
\LayoutPage.cshtml"
Write
(
Strings
.
LayoutPage_Back
);
Write
(
Strings
.
LayoutPage_Back
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n </a>\r\n </li>\r\n
"
+
WriteLiteral
(
"\r\n </a>\r\n </li>\r\n
"
+
"
</ul>\r\n"
);
"
</ul>\r\n"
);
#line 45 "..\..
\LayoutPage.cshtml"
#
line
45
"..\..\Pages
\LayoutPage.cshtml"
}
}
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" </div>\r\n <!--/.nav-collapse -->\r\n
</div"
+
WriteLiteral
(
" </div>\r\n <!--/.nav-collapse -->\r\n </div>\r\n
</div"
+
">\r\n </div>\r\n\r\n <!-- Begin page content -->\r\n <div class=\"co
"
+
">\r\n\r\n <!-- Begin page content -->\r\n <div class=\"container\" style=\"margin-b
"
+
"ntainer\" style=\"margin-bottom: 20px;\">\r\n
"
);
"ottom: 20px;\">\r\n
"
);
#line 53 "..\..
\LayoutPage.cshtml"
#
line
53
"..\..\Pages
\LayoutPage.cshtml"
Write
(
RenderBody
());
Write
(
RenderBody
());
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
@"
WriteLiteral
(
"\r\n </div>\r\n</div>\r\n\r\n<div id=\"footer\">\r\n <div class=\"container\">\r\n <"
+
</div>
"ul class=\"list-inline credit\">\r\n <li>\r\n <a href=\"https"
+
</div>
"://github.com/dotnetcore/cap/\" target=\"_blank\">\r\n CAP "
);
<div id=""footer"">
<div class=""container"">
<ul class=""list-inline credit"">
<li>
<a href=""https://github.com/dotnetcore/cap/"" target=""_blank"">
CAP "
);
#line 62 "..\..
\LayoutPage.cshtml"
#
line
62
"..\..\Pages
\LayoutPage.cshtml"
Write
(
$"
{
version
.
Major
}
.
{
version
.
Minor
}
.
{
version
.
Build
}
"
);
Write
(
$"
{
version
.
Major
}
.
{
version
.
Minor
}
.
{
version
.
Build
}
"
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n </a>\r\n </li>\r\n
<li>"
);
WriteLiteral
(
"\r\n </a>\r\n </li>\r\n
<li>"
);
#line 65 "..\..
\LayoutPage.cshtml"
#
line
65
"..\..\Pages
\LayoutPage.cshtml"
Write
(
Storage
);
Write
(
Storage
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</li>\r\n
<li>"
);
WriteLiteral
(
"</li>\r\n
<li>"
);
#line 66 "..\..
\LayoutPage.cshtml"
#
line
66
"..\..\Pages
\LayoutPage.cshtml"
Write
(
Strings
.
LayoutPage_Footer_Time
);
Write
(
Strings
.
LayoutPage_Footer_Time
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" "
);
WriteLiteral
(
" "
);
#line 66 "..\..
\LayoutPage.cshtml"
#
line
66
"..\..\Pages
\LayoutPage.cshtml"
Write
(
Html
.
LocalTime
(
DateTime
.
UtcNow
));
Write
(
Html
.
LocalTime
(
DateTime
.
UtcNow
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</li>\r\n
<li>"
);
WriteLiteral
(
"</li>\r\n
<li>"
);
#line 67 "..\..
\LayoutPage.cshtml"
#
line
67
"..\..\Pages
\LayoutPage.cshtml"
Write
(
string
.
Format
(
Strings
.
LayoutPage_Footer_Generatedms
,
GenerationTime
.
Elapsed
.
TotalMilliseconds
.
ToString
(
"N"
)));
Write
(
string
.
Format
(
Strings
.
LayoutPage_Footer_Generatedms
,
GenerationTime
.
Elapsed
.
TotalMilliseconds
.
ToString
(
"N"
)));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</li>\r\n"
);
WriteLiteral
(
"</li>\r\n"
);
#line 68 "..\..
\LayoutPage.cshtml"
#
line
68
"..\..\Pages
\LayoutPage.cshtml"
if
(
NodeName
!=
null
)
if
(
NodeName
!=
null
)
{
{
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"
<li>"
);
WriteLiteral
(
"
<li>"
);
#line 70 "..\..
\LayoutPage.cshtml"
#
line
70
"..\..\Pages
\LayoutPage.cshtml"
Write
(
string
.
Format
(
Strings
.
LayoutPage_Footer_NodeCurrent
,
NodeName
));
Write
(
string
.
Format
(
Strings
.
LayoutPage_Footer_NodeCurrent
,
NodeName
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</li>\r\n"
);
WriteLiteral
(
"</li>\r\n"
);
#line 71 "..\..
\LayoutPage.cshtml"
#
line
71
"..\..\Pages
\LayoutPage.cshtml"
}
}
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" </ul>\r\n </div>\r\n </div>\r\n\r\n <div id=\"capConfig\"\r\n
"
+
WriteLiteral
(
" </ul>\r\n </div>\r\n</div>\r\n\r\n<div id=\"capConfig\"\r\n data-pollinterval=
"
+
" data-pollinterval=
\""
);
"
\""
);
#line 77 "..\..
\LayoutPage.cshtml"
#
line
77
"..\..\Pages
\LayoutPage.cshtml"
Write
(
StatsPollingInterval
);
Write
(
StatsPollingInterval
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\"\r\n
data-pollurl=\""
);
WriteLiteral
(
"\"\r\n
data-pollurl=\""
);
#line 78 "..\..
\LayoutPage.cshtml"
#
line
78
"..\..\Pages
\LayoutPage.cshtml"
Write
(
Url
.
To
(
"/stats"
));
Write
(
Url
.
To
(
"/stats"
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\">\r\n </div>\r\n\r\n
<script src=\""
);
WriteLiteral
(
"\">\r\n</div>\r\n\r\n
<script src=\""
);
#line 81 "..\..
\LayoutPage.cshtml"
#
line
81
"..\..\Pages
\LayoutPage.cshtml"
Write
(
Url
.
To
(
$"/js
{
version
.
Major
}{
version
.
Minor
}{
version
.
Build
}
"
));
Write
(
Url
.
To
(
$"/js
{
version
.
Major
}{
version
.
Minor
}{
version
.
Build
}
"
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\"></script>\r\n</body>\r\n</html>"
);
WriteLiteral
(
"\"></script>\r\n</body>\r\n</html>"
);
}
}
...
...
src/DotNetCore.CAP.Dashboard/Pages/NodePage.cs
View file @
c4f4f5f4
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
DotNetCore.CAP.NodeDiscovery
;
using
DotNetCore.CAP.
Dashboard.
NodeDiscovery
;
using
Microsoft.Extensions.DependencyInjection
;
using
Microsoft.Extensions.DependencyInjection
;
namespace
DotNetCore.CAP.Dashboard.Pages
namespace
DotNetCore.CAP.Dashboard.Pages
...
...
src/DotNetCore.CAP.Dashboard/Pages/NodePage.generated.cs
View file @
c4f4f5f4
...
@@ -16,242 +16,241 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -16,242 +16,241 @@ namespace DotNetCore.CAP.Dashboard.Pages
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
#line 2 "..\..
\NodePage.cshtml"
#
line
2
"..\..\Pages
\NodePage.cshtml"
using
DotNetCore.CAP.Dashboard.Pages
;
using
DotNetCore.CAP.Dashboard.Pages
;
#line default
#
line
default
#line hidden
#
line
hidden
#line 3 "..\..
\NodePage.cshtml"
#
line
3
"..\..\Pages
\NodePage.cshtml"
using
DotNetCore.CAP.Dashboard.Resources
;
using
DotNetCore.CAP.Dashboard.Resources
;
#line default
#
line
default
#line hidden
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
NodePage
:
DotNetCore
.
CAP
.
Dashboard
.
RazorPage
internal
partial
class
NodePage
:
DotNetCore
.
CAP
.
Dashboard
.
RazorPage
{
{
#line hidden
#line hidden
p
rotected
override
void
Execute
()
p
ublic
override
void
Execute
()
{
{
WriteLiteral
(
"\r\n"
);
WriteLiteral
(
"\r\n"
);
#line 5 "..\..
\NodePage.cshtml"
#
line
5
"..\..\Pages
\NodePage.cshtml"
Layout
=
new
LayoutPage
(
Strings
.
NodePage_Title
);
Layout
=
new
LayoutPage
(
Strings
.
NodePage_Title
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"<div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <h1 class=\"page-header\">"
);
WriteLiteral
(
"<div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <h1 class=\"page-header\">"
);
#line 10 "..\..
\NodePage.cshtml"
#
line
10
"..\..\Pages
\NodePage.cshtml"
Write
(
Strings
.
NodePage_Title
);
Write
(
Strings
.
NodePage_Title
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</h1>\r\n\r\n"
);
WriteLiteral
(
"</h1>\r\n\r\n"
);
#line 12 "..\..
\NodePage.cshtml"
#
line
12
"..\..\Pages
\NodePage.cshtml"
if
(
Nodes
==
null
||
Nodes
.
Count
==
0
)
if
(
Nodes
==
null
||
Nodes
.
Count
==
0
)
{
{
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-warning\">\r\n "
);
WriteLiteral
(
" <div class=\"alert alert-warning\">\r\n "
);
#line 15 "..\..
\NodePage.cshtml"
#
line
15
"..\..\Pages
\NodePage.cshtml"
Write
(
Strings
.
NodePage_NoNodes
);
Write
(
Strings
.
NodePage_NoNodes
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
WriteLiteral
(
"\r\n </div>\r\n"
);
#line 17 "..\..
\NodePage.cshtml"
#
line
17
"..\..\Pages
\NodePage.cshtml"
}
}
else
else
{
{
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" <div class=\"table-responsive\">\r\n <table class=\"table\">"
+
WriteLiteral
(
" <div class=\"table-responsive\">\r\n <table class=\"table\">"
+
"\r\n <thead>\r\n <tr>\r\n
"
+
"\r\n <thead>\r\n <tr>\r\n
"
+
"
<th width=\"10%\">"
);
"
<th width=\"10%\">"
);
#line 24 "..\..
\NodePage.cshtml"
#
line
24
"..\..\Pages
\NodePage.cshtml"
Write
(
Strings
.
Common_Id
);
Write
(
Strings
.
Common_Id
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</th>\r\n
<th width=\"20%\">"
);
WriteLiteral
(
"</th>\r\n
<th width=\"20%\">"
);
#line 25 "..\..
\NodePage.cshtml"
#
line
25
"..\..\Pages
\NodePage.cshtml"
Write
(
Strings
.
NodePage_Table_NodeName
);
Write
(
Strings
.
NodePage_Table_NodeName
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</th>\r\n
<th width=\"20%\">"
);
WriteLiteral
(
"</th>\r\n
<th width=\"20%\">"
);
#line 26 "..\..
\NodePage.cshtml"
#
line
26
"..\..\Pages
\NodePage.cshtml"
Write
(
Strings
.
NodePage_Table_IP
);
Write
(
Strings
.
NodePage_Table_IP
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</th>\r\n
<th width=\"7%\">"
);
WriteLiteral
(
"</th>\r\n
<th width=\"7%\">"
);
#line 27 "..\..
\NodePage.cshtml"
#
line
27
"..\..\Pages
\NodePage.cshtml"
Write
(
Strings
.
NodePage_Table_Port
);
Write
(
Strings
.
NodePage_Table_Port
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>Tags</th>\r\n <th
"
+
WriteLiteral
(
"</th>\r\n <th>Tags</th>\r\n <th width=\"
"
+
" width=\
"20%\">"
);
"20%\">"
);
#line 29 "..\..
\NodePage.cshtml"
#
line
29
"..\..\Pages
\NodePage.cshtml"
Write
(
Strings
.
NodePage_Switch
);
Write
(
Strings
.
NodePage_Switch
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</th>\r\n </tr>\r\n </thead>\r\n
"
+
WriteLiteral
(
"</th>\r\n </tr>\r\n </thead>\r\n
"
+
"
<tbody>\r\n"
);
"
<tbody>\r\n"
);
#line 33 "..\..
\NodePage.cshtml"
#
line
33
"..\..\Pages
\NodePage.cshtml"
foreach
(
var
node
in
Nodes
)
foreach
(
var
node
in
Nodes
)
{
{
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"
<tr class=\""
);
WriteLiteral
(
"
<tr class=\""
);
#line 35 "..\..
\NodePage.cshtml"
#
line
35
"..\..\Pages
\NodePage.cshtml"
Write
(
CurrentNodeId
==
node
.
Id
?
"active"
:
null
);
Write
(
CurrentNodeId
==
node
.
Id
?
"active"
:
null
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\">\r\n
<td>"
);
WriteLiteral
(
"\">\r\n
<td>"
);
#line 36 "..\..
\NodePage.cshtml"
#
line
36
"..\..\Pages
\NodePage.cshtml"
Write
(
node
.
Id
);
Write
(
node
.
Id
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</td>\r\n
<td>"
);
WriteLiteral
(
"</td>\r\n
<td>"
);
#line 37 "..\..
\NodePage.cshtml"
#
line
37
"..\..\Pages
\NodePage.cshtml"
Write
(
node
.
Name
);
Write
(
node
.
Name
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</td>\r\n
<td>"
);
WriteLiteral
(
"</td>\r\n
<td>"
);
#line 38 "..\..
\NodePage.cshtml"
#
line
38
"..\..\Pages
\NodePage.cshtml"
Write
(
node
.
Address
);
Write
(
node
.
Address
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</td>\r\n
<td>"
);
WriteLiteral
(
"</td>\r\n
<td>"
);
#line 39 "..\..
\NodePage.cshtml"
#
line
39
"..\..\Pages
\NodePage.cshtml"
Write
(
node
.
Port
);
Write
(
node
.
Port
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</td>\r\n
<td>"
);
WriteLiteral
(
"</td>\r\n
<td>"
);
#line 40 "..\..
\NodePage.cshtml"
#
line
40
"..\..\Pages
\NodePage.cshtml"
Write
(
node
.
Tags
);
Write
(
node
.
Tags
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</td>\r\n <td>\r\n "
+
WriteLiteral
(
"</td>\r\n <td>\r\n "
);
""
);
#line 42 "..\..
\NodePage.cshtml"
#
line
42
"..\..\Pages
\NodePage.cshtml"
Write
(
Html
.
NodeSwitchLink
(
node
.
Id
));
Write
(
Html
.
NodeSwitchLink
(
node
.
Id
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n
</tr>\r\n"
);
WriteLiteral
(
"\r\n </td>\r\n
</tr>\r\n"
);
#line 45 "..\..
\NodePage.cshtml"
#
line
45
"..\..\Pages
\NodePage.cshtml"
}
}
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" </tbody>\r\n </table>\r\n </div>\r\n"
);
WriteLiteral
(
" </tbody>\r\n </table>\r\n </div>\r\n"
);
#line 49 "..\..
\NodePage.cshtml"
#
line
49
"..\..\Pages
\NodePage.cshtml"
}
}
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" </div>\r\n</div>"
);
WriteLiteral
(
" </div>\r\n</div>"
);
}
}
...
...
src/DotNetCore.CAP.Dashboard/Pages/PublishedPage.cs
View file @
c4f4f5f4
...
@@ -2,21 +2,22 @@
...
@@ -2,21 +2,22 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System
;
using
System
;
using
DotNetCore.CAP.Monitoring
;
namespace
DotNetCore.CAP.Dashboard.Pages
namespace
DotNetCore.CAP.Dashboard.Pages
{
{
internal
partial
class
PublishedPage
internal
partial
class
PublishedPage
:
DotNetCore
.
CAP
.
Dashboard
.
RazorPage
{
{
public
PublishedPage
(
string
statusName
)
public
PublishedPage
(
string
statusName
)
{
{
Status
Name
=
statusName
;
Name
=
statusName
;
}
}
public
string
Status
Name
{
get
;
set
;
}
public
string
Name
{
get
;
set
;
}
public
int
GetTotal
(
IMonitoringApi
api
)
public
int
GetTotal
(
IMonitoringApi
api
)
{
{
if
(
string
.
Equals
(
StatusName
,
Infrastructure
.
StatusName
.
Succeeded
,
if
(
string
.
Equals
(
Name
,
nameof
(
Internal
.
StatusName
.
Succeeded
)
,
StringComparison
.
CurrentCultureIgnoreCase
))
StringComparison
.
CurrentCultureIgnoreCase
))
{
{
return
api
.
PublishedSucceededCount
();
return
api
.
PublishedSucceededCount
();
...
...
src/DotNetCore.CAP.Dashboard/Pages/PublishedPage.cshtml
View file @
c4f4f5f4
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@using System
@using System
@using DotNetCore.CAP.Dashboard
@using DotNetCore.CAP.Dashboard
@using DotNetCore.CAP.Dashboard.Monitoring
@using DotNetCore.CAP.Dashboard.Pages
@using DotNetCore.CAP.Dashboard.Pages
@using DotNetCore.CAP.Dashboard.Resources
@using DotNetCore.CAP.Dashboard.Resources
@using DotNetCore.CAP.Messages
@using DotNetCore.CAP.Messages
@using DotNetCore.CAP.Monitoring
@inherits DotNetCore.CAP.Dashboard.RazorPage
@inherits DotNetCore.CAP.Dashboard.RazorPage
@{
@{
Layout = new LayoutPage(Strings.PublishedMessagesPage_Title);
Layout = new LayoutPage(Strings.PublishedMessagesPage_Title);
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
MessageType = MessageType.Publish,
MessageType = MessageType.Publish,
Name = name,
Name = name,
Content = content,
Content = content,
StatusName =
Status
Name,
StatusName = Name,
CurrentPage = pager.CurrentPage - 1,
CurrentPage = pager.CurrentPage - 1,
PageSize = pager.RecordsPerPage
PageSize = pager.RecordsPerPage
};
};
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
<th>@Strings.Common_Version</th>
<th>@Strings.Common_Version</th>
<th>@Strings.MessagesPage_Table_Name</th>
<th>@Strings.MessagesPage_Table_Name</th>
<th class="min-width">@Strings.MessagesPage_Table_Retries</th>
<th class="min-width">@Strings.MessagesPage_Table_Retries</th>
@if (string.Equals(
Status
Name, "Processing", StringComparison.CurrentCultureIgnoreCase))
@if (string.Equals(Name, "Processing", StringComparison.CurrentCultureIgnoreCase))
{
{
<th>@Strings.MessagesPage_Table_State</th>
<th>@Strings.MessagesPage_Table_State</th>
}
}
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
<td>
<td>
@message.Retries
@message.Retries
</td>
</td>
@if (string.Equals(
Status
Name, "Processing", StringComparison.CurrentCultureIgnoreCase))
@if (string.Equals(Name, "Processing", StringComparison.CurrentCultureIgnoreCase))
{
{
<td>
<td>
@message.StatusName
@message.StatusName
...
...
src/DotNetCore.CAP.Dashboard/Pages/PublishedPage.generated.cs
View file @
c4f4f5f4
using
DotNetCore.CAP.Messages
;
#
pragma
warning
disable
1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
// <auto-generated>
// This code was generated by a tool.
// This code was generated by a tool.
...
@@ -14,54 +12,55 @@
...
@@ -14,54 +12,55 @@
namespace
DotNetCore.CAP.Dashboard.Pages
namespace
DotNetCore.CAP.Dashboard.Pages
{
{
#line 2 "..\..
\PublishedPage.cshtml"
#
line
2
"..\..\Pages
\PublishedPage.cshtml"
using
System
;
using
System
;
#line default
#
line
default
#line hidden
#
line
hidden
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
#line 4 "..\..
\PublishedPage.cshtml"
#
line
3
"..\..\Pages
\PublishedPage.cshtml"
using
DotNetCore.CAP.Dashboard
;
using
DotNetCore.CAP.Dashboard
;
#line default
#
line
default
#line hidden
#
line
hidden
#line 6 "..\..\PublishedPage.cshtml"
using
DotNetCore.CAP.Dashboard.Monitoring
;
#line default
#
line
4
"..\..\Pages\PublishedPage.cshtml"
#line hidden
#line 5 "..\..\PublishedPage.cshtml"
using
DotNetCore.CAP.Dashboard.Pages
;
using
DotNetCore.CAP.Dashboard.Pages
;
#line default
#
line
default
#line hidden
#
line
hidden
#line 7 "..\..
\PublishedPage.cshtml"
#
line
5
"..\..\Pages
\PublishedPage.cshtml"
using
DotNetCore.CAP.Dashboard.Resources
;
using
DotNetCore.CAP.Dashboard.Resources
;
#line default
#
line
default
#line hidden
#
line
hidden
#line 3 "..\..\PublishedPage.cshtml"
#
line
6
"..\..\Pages\PublishedPage.cshtml"
using
DotNetCore.CAP.Messages
;
#line default
#
line
default
#line hidden
#
line
hidden
#
line
7
"..\..\Pages\PublishedPage.cshtml"
using
DotNetCore.CAP.Monitoring
;
#
line
default
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
PublishedPage
:
RazorPage
internal
partial
class
PublishedPage
:
DotNetCore
.
CAP
.
Dashboard
.
RazorPage
{
{
#line hidden
#line hidden
p
rotected
override
void
Execute
()
p
ublic
override
void
Execute
()
{
{
WriteLiteral
(
"\r\n"
);
WriteLiteral
(
"\r\n"
);
...
@@ -72,7 +71,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -72,7 +71,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
#line 9 "..\..
\PublishedPage.cshtml"
#
line
9
"..\..\Pages
\PublishedPage.cshtml"
Layout
=
new
LayoutPage
(
Strings
.
PublishedMessagesPage_Title
);
Layout
=
new
LayoutPage
(
Strings
.
PublishedMessagesPage_Title
);
...
@@ -80,8 +79,8 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -80,8 +79,8 @@ namespace DotNetCore.CAP.Dashboard.Pages
int
.
TryParse
(
Query
(
"from"
),
out
from
);
int
.
TryParse
(
Query
(
"from"
),
out
from
);
int
.
TryParse
(
Query
(
"count"
),
out
perPage
);
int
.
TryParse
(
Query
(
"count"
),
out
perPage
);
string
name
=
Query
(
"name"
);
var
name
=
Query
(
"name"
);
string
content
=
Query
(
"content"
);
var
content
=
Query
(
"content"
);
var
monitor
=
Storage
.
GetMonitoringApi
();
var
monitor
=
Storage
.
GetMonitoringApi
();
var
pager
=
new
Pager
(
from
,
perPage
,
GetTotal
(
monitor
));
var
pager
=
new
Pager
(
from
,
perPage
,
GetTotal
(
monitor
));
...
@@ -90,7 +89,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -90,7 +89,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
MessageType
=
MessageType
.
Publish
,
MessageType
=
MessageType
.
Publish
,
Name
=
name
,
Name
=
name
,
Content
=
content
,
Content
=
content
,
StatusName
=
Status
Name
,
StatusName
=
Name
,
CurrentPage
=
pager
.
CurrentPage
-
1
,
CurrentPage
=
pager
.
CurrentPage
-
1
,
PageSize
=
pager
.
RecordsPerPage
PageSize
=
pager
.
RecordsPerPage
};
};
...
@@ -98,118 +97,119 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -98,118 +97,119 @@ namespace DotNetCore.CAP.Dashboard.Pages
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n<div class=\"row\">\r\n <div class=\"col-md-3\">\r\n "
);
WriteLiteral
(
"\r\n<div class=\"row\">\r\n <div class=\"col-md-3\">\r\n "
);
#line 35 "..\..
\PublishedPage.cshtml"
#
line
35
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Html
.
MessagesSidebar
(
MessageType
.
Publish
));
Write
(
Html
.
MessagesSidebar
(
MessageType
.
Publish
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n <div class=\"col-md-9\">\r\n <h1 class=\"page-header\">"
);
WriteLiteral
(
"\r\n </div>\r\n <div class=\"col-md-9\">\r\n <h1 class=\"page-header\">"
);
#line 38 "..\..
\PublishedPage.cshtml"
#
line
38
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Strings
.
PublishedPage_Title
);
Write
(
Strings
.
PublishedPage_Title
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</h1>\r\n\r\n"
);
WriteLiteral
(
"</h1>\r\n\r\n"
);
#line 40 "..\..
\PublishedPage.cshtml"
#
line
40
"..\..\Pages
\PublishedPage.cshtml"
if
(
succeededMessages
.
Count
==
0
)
if
(
succeededMessages
.
Count
==
0
)
{
{
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-info\">\r\n
"
);
WriteLiteral
(
" <div class=\"alert alert-info\">\r\n
"
);
#line 43 "..\..
\PublishedPage.cshtml"
#
line
43
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Strings
.
MessagesPage_NoMessages
);
Write
(
Strings
.
MessagesPage_NoMessages
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n
</div>\r\n"
);
WriteLiteral
(
"\r\n
</div>\r\n"
);
#line 45 "..\..
\PublishedPage.cshtml"
#
line
45
"..\..\Pages
\PublishedPage.cshtml"
}
}
else
else
{
{
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" <div class=\"js-jobs-list\">\r\n <div class=\"btn-toolbar btn-toolb"
+
WriteLiteral
(
@" <div class=""js-jobs-list"">
"ar-top\">\r\n <form class=\"row\">\r\n <div class=\"c"
+
<div class=""btn-toolbar btn-toolbar-top"">
"ol-md-3\">\r\n <input type=\"text\" class=\"form-control\" name="
+
<form class=""row"">
"\"name\" value=\""
);
<div class=""col-md-3"">
<input type=""text"" class=""form-control"" name=""name"" value="""
);
#line 52 "..\..
\PublishedPage.cshtml"
#
line
52
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Query
(
"
name"
));
Write
(
Query
(
"
name"
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\" placeholder=\""
);
WriteLiteral
(
"\" placeholder=\""
);
#line 52 "..\..
\PublishedPage.cshtml"
#
line
52
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Strings
.
MessagesPage_Query_MessageName
);
Write
(
Strings
.
MessagesPage_Query_MessageName
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\" />\r\n </div>\r\n <div class=\"col-md-5\">\r\n
"
+
WriteLiteral
(
"\"/>\r\n </div>\r\n <div class=\"col-md-5
"
+
" <div class=\"input-group\">\r\n <in
"
+
"\">\r\n <div class=\"input-group\">\r\n
"
+
"
put type=\"text\" class=\"form-control\" name=\"content\" value=\""
);
" <in
put type=\"text\" class=\"form-control\" name=\"content\" value=\""
);
#line 56 "..\..
\PublishedPage.cshtml"
#
line
56
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Query
(
"
content"
));
Write
(
Query
(
"
content"
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\" placeholder=\""
);
WriteLiteral
(
"\" placeholder=\""
);
#line 56 "..\..
\PublishedPage.cshtml"
#
line
56
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Strings
.
MessagesPage_Query_MessageBody
);
Write
(
Strings
.
MessagesPage_Query_MessageBody
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\" />\r\n <span class=\"input-group-btn\">\r\n
"
+
WriteLiteral
(
"\"/>\r\n <span class=\"input-group-btn\">\r\n
"
+
"
<button class=\"btn btn-info\">"
);
"
<button class=\"btn btn-info\">"
);
#line 58 "..\..
\PublishedPage.cshtml"
#
line
58
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Strings
.
MessagesPage_Query_Button
);
Write
(
Strings
.
MessagesPage_Query_Button
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
@"</button>
WriteLiteral
(
@"</button>
</span>
</span>
</div>
</div>
</div>
</div>
...
@@ -221,359 +221,371 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -221,359 +221,371 @@ namespace DotNetCore.CAP.Dashboard.Pages
#line 66 "..\..
\PublishedPage.cshtml"
#
line
66
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Url
.
To
(
"/published/requeue"
));
Write
(
Url
.
To
(
"/published/requeue"
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\"\r\n
data-loading-text=\""
);
WriteLiteral
(
"\"\r\n
data-loading-text=\""
);
#line 67 "..\..
\PublishedPage.cshtml"
#
line
67
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Strings
.
Common_Enqueueing
);
Write
(
Strings
.
Common_Enqueueing
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\"\r\n disabled=\"disabled\">\r\n <span class=\"glyphicon g
"
+
WriteLiteral
(
"\"\r\n disabled=\"disabled\">\r\n <spa
"
+
"lyphicon-repeat\"></span>\r\n
"
);
"n class=\"glyphicon glyphicon-repeat\"></span>\r\n
"
);
#line 70 "..\..
\PublishedPage.cshtml"
#
line
70
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Strings
.
Common_RequeueMessages
);
Write
(
Strings
.
Common_RequeueMessages
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n </button>\r\n\r\n
"
);
WriteLiteral
(
"\r\n </button>\r\n\r\n
"
);
#line 73 "..\..
\PublishedPage.cshtml"
#
line
73
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Html
.
PerPageSelector
(
pager
));
Write
(
Html
.
PerPageSelector
(
pager
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
@"
WriteLiteral
(
@"
</div>
</div>
<div class=""table-responsive"">
<div class=""table-responsive"">
<table class=""table"">
<table class=""table"">
<thead>
<thead>
<tr>
<tr>
<th style=""width:30px;"">
<th style=""width:
30px;"">
<input type=""checkbox"" class=""js-jobs-list-select-all""
/>
<input type=""checkbox"" class=""js-jobs-list-select-all""/>
</th>
</th>
<th
style=""width:22%;""
>"
);
<th>"
);
#line 83 "..\..
\PublishedPage.cshtml"
#
line
83
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Strings
.
Common_Id
);
Write
(
Strings
.
Common_Id
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
WriteLiteral
(
"</th>\r\n <th>"
);
#line 84 "..\..\PublishedPage.cshtml"
#
line
84
"..\..\Pages\PublishedPage.cshtml"
Write
(
Strings
.
Common_Version
);
Write
(
Strings
.
Common_Version
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
WriteLiteral
(
"</th>\r\n <th>"
);
#line 84 "..\..\PublishedPage.cshtml"
#
line
85
"..\..\Pages\PublishedPage.cshtml"
Write
(
Strings
.
MessagesPage_Table_Name
);
Write
(
Strings
.
MessagesPage_Table_Name
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"min-width\">"
);
WriteLiteral
(
"</th>\r\n <th class=\"min-width\">"
);
#line 85 "..\..
\PublishedPage.cshtml"
#
line
86
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Strings
.
MessagesPage_Table_Retries
);
Write
(
Strings
.
MessagesPage_Table_Retries
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</th>\r\n"
);
WriteLiteral
(
"</th>\r\n"
);
#line 86 "..\..
\PublishedPage.cshtml"
#
line
87
"..\..\Pages
\PublishedPage.cshtml"
if
(
string
.
Equals
(
Status
Name
,
"Processing"
,
StringComparison
.
CurrentCultureIgnoreCase
))
if
(
string
.
Equals
(
Name
,
"Processing"
,
StringComparison
.
CurrentCultureIgnoreCase
))
{
{
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"
<th>"
);
WriteLiteral
(
"
<th>"
);
#line 88 "..\..
\PublishedPage.cshtml"
#
line
89
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Strings
.
MessagesPage_Table_State
);
Write
(
Strings
.
MessagesPage_Table_State
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</th>\r\n"
);
WriteLiteral
(
"</th>\r\n"
);
#line 89 "..\..
\PublishedPage.cshtml"
#
line
90
"..\..\Pages
\PublishedPage.cshtml"
}
}
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" <th class=\"align-right\">"
);
WriteLiteral
(
" <th class=\"align-right\">"
);
#line 90 "..\..
\PublishedPage.cshtml"
#
line
91
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Strings
.
MessagesPage_Table_ExpiresAt
);
Write
(
Strings
.
MessagesPage_Table_ExpiresAt
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</th>\r\n </tr>\r\n </thead>\r\n
"
+
WriteLiteral
(
"</th>\r\n </tr>\r\n </thead>\r\n
"
+
"
<tbody>\r\n"
);
"
<tbody>\r\n"
);
#line 94 "..\..
\PublishedPage.cshtml"
#
line
95
"..\..\Pages
\PublishedPage.cshtml"
foreach
(
var
message
in
succeededMessages
)
foreach
(
var
message
in
succeededMessages
)
{
{
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" <tr class=\"js-jobs-list-row hover\">\r\n
"
+
WriteLiteral
(
" <tr class=\"js-jobs-list-row hover\">\r\n
"
+
" <td>\r\n <input type=\"checkbox\" class=\"js-j
"
+
" <td>\r\n <input type=\"checkbox\"
"
+
"
obs-list-checkbox\" name=\"messages[]\" value=\""
);
" class=\"js-j
obs-list-checkbox\" name=\"messages[]\" value=\""
);
#line 98 "..\..
\PublishedPage.cshtml"
#
line
99
"..\..\Pages
\PublishedPage.cshtml"
Write
(
message
.
Id
);
Write
(
message
.
Id
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\" />\r\n </td>\r\n <td class=\"w"
+
WriteLiteral
(
"\" />\r\n </td>\r\n <td "
+
"ord-break\">\r\n <a href=\"javascript:;\" data-url=\'"
);
"class=\"word-break\">\r\n <a href=\"javascript:;\" "
+
"data-url=\'"
);
#line 101 "..\..
\PublishedPage.cshtml"
#
line
102
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Url
.
To
(
"/published/message/"
)
+
message
.
Id
);
Write
(
Url
.
To
(
"/published/message/"
)
+
message
.
Id
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\' class=\"openModal\">#"
);
WriteLiteral
(
"\' class=\"openModal\">#"
);
#line 101 "..\..
\PublishedPage.cshtml"
#
line
102
"..\..\Pages
\PublishedPage.cshtml"
Write
(
message
.
Id
);
Write
(
message
.
Id
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</a>\r\n </td>\r\n <td>\r\n "
+
WriteLiteral
(
"</a>\r\n </td>\r\n <td>"
+
" "
);
"\r\n "
);
#line 102 "..\..
\PublishedPage.cshtml"
#
line
105
"..\..\Pages
\PublishedPage.cshtml"
Write
(
message
.
Version
);
Write
(
message
.
Version
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</a>\r\n </td>\r\n <td>\r\n "
+
WriteLiteral
(
"\r\n </td>\r\n <td>\r\n "
+
" "
);
" "
);
#line 104 "..\..\PublishedPage.cshtml"
#
line
108
"..\..\Pages\PublishedPage.cshtml"
Write
(
message
.
Name
);
Write
(
message
.
Name
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n <td>\r\n
"
+
WriteLiteral
(
"\r\n </td>\r\n <td>\r\n
"
+
"
"
);
"
"
);
#line 107 "..\..
\PublishedPage.cshtml"
#
line
111
"..\..\Pages
\PublishedPage.cshtml"
Write
(
message
.
Retries
);
Write
(
message
.
Retries
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n
</td>\r\n"
);
WriteLiteral
(
"\r\n
</td>\r\n"
);
#line 109 "..\..
\PublishedPage.cshtml"
#
line
113
"..\..\Pages
\PublishedPage.cshtml"
if
(
string
.
Equals
(
Status
Name
,
"Processing"
,
StringComparison
.
CurrentCultureIgnoreCase
))
if
(
string
.
Equals
(
Name
,
"Processing"
,
StringComparison
.
CurrentCultureIgnoreCase
))
{
{
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" <td>\r\n "
);
WriteLiteral
(
" <td>\r\n "
+
" "
);
#line 112 "..\..
\PublishedPage.cshtml"
#
line
116
"..\..\Pages
\PublishedPage.cshtml"
Write
(
message
.
StatusName
);
Write
(
message
.
StatusName
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n
</td>\r\n"
);
WriteLiteral
(
"\r\n
</td>\r\n"
);
#line 114 "..\..
\PublishedPage.cshtml"
#
line
118
"..\..\Pages
\PublishedPage.cshtml"
}
}
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"
<td class=\"align-right\">\r\n"
);
WriteLiteral
(
"
<td class=\"align-right\">\r\n"
);
#line 116 "..\..
\PublishedPage.cshtml"
#
line
120
"..\..\Pages
\PublishedPage.cshtml"
if
(
message
.
ExpiresAt
.
HasValue
)
if
(
message
.
ExpiresAt
.
HasValue
)
{
{
#line default
#
line
default
#line hidden
#
line
hidden
#line 118 "..\..
\PublishedPage.cshtml"
#
line
122
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Html
.
RelativeTime
(
message
.
ExpiresAt
.
Value
));
Write
(
Html
.
RelativeTime
(
message
.
ExpiresAt
.
Value
));
#line default
#
line
default
#line hidden
#
line
hidden
#line 118 "..\..
\PublishedPage.cshtml"
#
line
122
"..\..\Pages
\PublishedPage.cshtml"
}
}
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" </td>\r\n\r\n
</tr>\r\n"
);
WriteLiteral
(
" </td>\r\n\r\n
</tr>\r\n"
);
#line 123 "..\..
\PublishedPage.cshtml"
#
line
127
"..\..\Pages
\PublishedPage.cshtml"
}
}
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" </tbody>\r\n </table>\r\n </div>\r\n
"
+
WriteLiteral
(
" </tbody>\r\n </table>\r\n <
"
+
"
"
);
"/div>\r\n
"
);
#line 127 "..\..
\PublishedPage.cshtml"
#
line
131
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Html
.
Paginator
(
pager
));
Write
(
Html
.
Paginator
(
pager
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n
</div>\r\n"
);
WriteLiteral
(
"\r\n
</div>\r\n"
);
#line 129 "..\..
\PublishedPage.cshtml"
#
line
133
"..\..\Pages
\PublishedPage.cshtml"
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
@"
<div>
WriteLiteral
(
@"
<div>
<div class=""modal fade"" tabindex=""-1"" role=""dialog"">
<div class=""modal fade"" tabindex=""-1"" role=""dialog"">
<div class=""modal-dialog"" role=""document"">
<div class=""modal-dialog"" role=""document"">
<div class=""modal-content"">
<div class=""modal-content"">
<div class=""modal-header"">
<div class=""modal-header"">
<button type=""button"" class=""close"" data-dismiss=""modal"" aria-label=""Close""><span aria-hidden=""true"">×</span></button>
<button type=""button"" class=""close"" data-dismiss=""modal"" aria-label=""Close"">
<span aria-hidden=""true"">×</span>
</button>
<h4 class=""modal-title"">Message Content</h4>
<h4 class=""modal-title"">Message Content</h4>
</div>
</div>
<div id=""jsonContent"" style=""max-height:500px;overflow-y:
auto;"" class=""modal-body"">
<div id=""jsonContent"" style=""max-height: 500px; overflow-y:
auto;"" class=""modal-body"">
</div>
</div>
<div class=""modal-footer"">
<div class=""modal-footer"">
<button type=""button"" class=""btn btn-sm btn-primary"" id=""formatBtn"" onclick="""">"
);
<button type=""button"" class=""btn btn-sm btn-primary"" id=""formatBtn"" onclick="""">"
);
#line 141 "..\..
\PublishedPage.cshtml"
#
line
147
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Strings
.
MessagesPage_Modal_Format
);
Write
(
Strings
.
MessagesPage_Modal_Format
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</button>\r\n <button type=\"button\" class=\"btn btn-sm bt
"
+
WriteLiteral
(
"</button>\r\n <button type=\"button\" class=\"btn btn-s
"
+
"
n-primary\" id=\"rawBtn\" onclick=\"\">"
);
"m bt
n-primary\" id=\"rawBtn\" onclick=\"\">"
);
#line 142 "..\..
\PublishedPage.cshtml"
#
line
148
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Strings
.
MessagesPage_Modal_Raw
);
Write
(
Strings
.
MessagesPage_Modal_Raw
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</button>\r\n <button type=\"button\" class=\"btn btn-sm bt
"
+
WriteLiteral
(
"</button>\r\n <button type=\"button\" class=\"btn btn-s
"
+
"
n-primary\" id=\"expandBtn\" onclick=\"\">"
);
"m bt
n-primary\" id=\"expandBtn\" onclick=\"\">"
);
#line 143 "..\..
\PublishedPage.cshtml"
#
line
149
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Strings
.
MessagesPage_Modal_Expand
);
Write
(
Strings
.
MessagesPage_Modal_Expand
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</button>\r\n <button type=\"button\" class=\"btn btn-sm bt
"
+
WriteLiteral
(
"</button>\r\n <button type=\"button\" class=\"btn btn-s
"
+
"
n-primary\" id=\"collapseBtn\" onclick=\"\">"
);
"m bt
n-primary\" id=\"collapseBtn\" onclick=\"\">"
);
#line 144 "..\..
\PublishedPage.cshtml"
#
line
150
"..\..\Pages
\PublishedPage.cshtml"
Write
(
Strings
.
MessagesPage_Model_Collaspse
);
Write
(
Strings
.
MessagesPage_Model_Collaspse
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</button>\r\n </div>\r\n </div><!-- /.modal
"
+
WriteLiteral
(
"</button>\r\n </div>\r\n </div><!--
"
+
"-content -->\r\n </div><!-- /.modal-dialog -->\r\n </div><
"
+
" /.modal-content -->\r\n </div><!-- /.modal-dialog -->\r\n
"
+
"!-- /.modal -->\r\n
</div>\r\n"
);
" </div><!-- /.modal -->\r\n
</div>\r\n"
);
#line 150 "..\..
\PublishedPage.cshtml"
#
line
156
"..\..\Pages
\PublishedPage.cshtml"
}
}
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" </div>\r\n</div>"
);
WriteLiteral
(
" </div>\r\n</div>"
);
}
}
...
...
src/DotNetCore.CAP.Dashboard/Pages/ReceivedPage.cs
View file @
c4f4f5f4
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System
;
using
System
;
using
DotNetCore.CAP.Monitoring
;
namespace
DotNetCore.CAP.Dashboard.Pages
namespace
DotNetCore.CAP.Dashboard.Pages
{
{
...
@@ -16,7 +17,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -16,7 +17,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
public
int
GetTotal
(
IMonitoringApi
api
)
public
int
GetTotal
(
IMonitoringApi
api
)
{
{
if
(
string
.
Equals
(
StatusName
,
Infrastructure
.
StatusName
.
Succeeded
,
if
(
string
.
Equals
(
StatusName
,
nameof
(
Internal
.
StatusName
.
Succeeded
)
,
StringComparison
.
CurrentCultureIgnoreCase
))
StringComparison
.
CurrentCultureIgnoreCase
))
{
{
return
api
.
ReceivedSucceededCount
();
return
api
.
ReceivedSucceededCount
();
...
...
src/DotNetCore.CAP.Dashboard/Pages/ReceivedPage.cshtml
View file @
c4f4f5f4
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@using System
@using System
@using DotNetCore.CAP.Dashboard
@using DotNetCore.CAP.Dashboard
@using DotNetCore.CAP.Dashboard.Monitoring
@using DotNetCore.CAP.Dashboard.Pages
@using DotNetCore.CAP.Dashboard.Pages
@using DotNetCore.CAP.Dashboard.Resources
@using DotNetCore.CAP.Dashboard.Resources
@using DotNetCore.CAP.Messages
@using DotNetCore.CAP.Messages
@using DotNetCore.CAP.Monitoring
@inherits DotNetCore.CAP.Dashboard.RazorPage
@inherits DotNetCore.CAP.Dashboard.RazorPage
@{
@{
Layout = new LayoutPage(Strings.ReceivedMessagesPage_Title);
Layout = new LayoutPage(Strings.ReceivedMessagesPage_Title);
...
...
src/DotNetCore.CAP.Dashboard/Pages/ReceivedPage.generated.cs
View file @
c4f4f5f4
using
DotNetCore.CAP.M
essages
;
using
DotNetCore.CAP.M
onitoring
;
#pragma warning disable 1591
#pragma warning disable 1591
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
...
@@ -14,54 +14,53 @@
...
@@ -14,54 +14,53 @@
namespace
DotNetCore.CAP.Dashboard.Pages
namespace
DotNetCore.CAP.Dashboard.Pages
{
{
#line 2 "..\..
\ReceivedPage.cshtml"
#
line
2
"..\..\Pages
\ReceivedPage.cshtml"
using
System
;
using
System
;
#line default
#
line
default
#line hidden
#
line
hidden
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
#line 4 "..\..
\ReceivedPage.cshtml"
#
line
3
"..\..\Pages
\ReceivedPage.cshtml"
using
DotNetCore.CAP.Dashboard
;
using
DotNetCore.CAP.Dashboard
;
#line default
#
line
default
#line hidden
#
line
hidden
#line 6 "..\..\ReceivedPage.cshtml"
using
DotNetCore.CAP.Dashboard.Monitoring
;
#
line
4
"..\..\Pages\ReceivedPage.cshtml"
#line default
#line default
#line hidden
#
line
hidden
#line 5 "..\..
\ReceivedPage.cshtml"
#
line
5
"..\..\Pages
\ReceivedPage.cshtml"
using
DotNetCore.CAP.Dashboard.Pages
;
using
DotNetCore.CAP.Dashboard.Pages
;
#line default
#
line
default
#line hidden
#
line
hidden
#line 7 "..\..
\ReceivedPage.cshtml"
#
line
6
"..\..\Pages
\ReceivedPage.cshtml"
using
DotNetCore.CAP.Dashboard.Resources
;
using
DotNetCore.CAP.Dashboard.Resources
;
#line default
#
line
default
#line hidden
#
line
hidden
#line 3 "..\..\ReceivedPage.cshtml"
#
line
7
"..\..\Pages\ReceivedPage.cshtml"
using
DotNetCore.CAP.Messages
;
#line default
#
line
default
#line hidden
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
ReceivedPage
:
RazorPage
internal
partial
class
ReceivedPage
:
DotNetCore
.
CAP
.
Dashboard
.
RazorPage
{
{
#line hidden
#line hidden
p
rotected
override
void
Execute
()
p
ublic
override
void
Execute
()
{
{
WriteLiteral
(
"\r\n"
);
WriteLiteral
(
"\r\n"
);
...
@@ -72,7 +71,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -72,7 +71,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
#line 9 "..\..
\ReceivedPage.cshtml"
#
line
9
"..\..\Pages
\ReceivedPage.cshtml"
Layout
=
new
LayoutPage
(
Strings
.
ReceivedMessagesPage_Title
);
Layout
=
new
LayoutPage
(
Strings
.
ReceivedMessagesPage_Title
);
...
@@ -80,9 +79,9 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -80,9 +79,9 @@ namespace DotNetCore.CAP.Dashboard.Pages
int
.
TryParse
(
Query
(
"from"
),
out
from
);
int
.
TryParse
(
Query
(
"from"
),
out
from
);
int
.
TryParse
(
Query
(
"count"
),
out
perPage
);
int
.
TryParse
(
Query
(
"count"
),
out
perPage
);
string
group
=
Query
(
"group"
);
var
group
=
Query
(
"group"
);
string
name
=
Query
(
"name"
);
var
name
=
Query
(
"name"
);
string
content
=
Query
(
"content"
);
var
content
=
Query
(
"content"
);
var
monitor
=
Storage
.
GetMonitoringApi
();
var
monitor
=
Storage
.
GetMonitoringApi
();
var
pager
=
new
Pager
(
from
,
perPage
,
GetTotal
(
monitor
));
var
pager
=
new
Pager
(
from
,
perPage
,
GetTotal
(
monitor
));
...
@@ -100,62 +99,62 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -100,62 +99,62 @@ namespace DotNetCore.CAP.Dashboard.Pages
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n<div class=\"row\">\r\n <div class=\"col-md-3\">\r\n "
);
WriteLiteral
(
"\r\n<div class=\"row\">\r\n <div class=\"col-md-3\">\r\n "
);
#line 37 "..\..
\ReceivedPage.cshtml"
#
line
37
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Html
.
MessagesSidebar
(
MessageType
.
Subscribe
));
Write
(
Html
.
MessagesSidebar
(
MessageType
.
Subscribe
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n <div class=\"col-md-9\">\r\n <h1 class=\"page-header\">"
);
WriteLiteral
(
"\r\n </div>\r\n <div class=\"col-md-9\">\r\n <h1 class=\"page-header\">"
);
#line 40 "..\..
\ReceivedPage.cshtml"
#
line
40
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Strings
.
ReceivedPage_Title
);
Write
(
Strings
.
ReceivedPage_Title
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</h1>\r\n\r\n"
);
WriteLiteral
(
"</h1>\r\n\r\n"
);
#line 42 "..\..
\ReceivedPage.cshtml"
#
line
42
"..\..\Pages
\ReceivedPage.cshtml"
if
(
succeededMessages
.
Count
==
0
)
if
(
succeededMessages
.
Count
==
0
)
{
{
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-info\">\r\n "
);
WriteLiteral
(
" <div class=\"alert alert-info\">\r\n "
);
#line 45 "..\..
\ReceivedPage.cshtml"
#
line
45
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Strings
.
MessagesPage_NoMessages
);
Write
(
Strings
.
MessagesPage_NoMessages
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
WriteLiteral
(
"\r\n </div>\r\n"
);
#line 47 "..\..
\ReceivedPage.cshtml"
#
line
47
"..\..\Pages
\ReceivedPage.cshtml"
}
}
else
else
{
{
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
@" <div class=""js-jobs-list"">
WriteLiteral
(
@" <div class=""js-jobs-list"">
<div class=""btn-toolbar btn-toolbar-top"">
<div class=""btn-toolbar btn-toolbar-top"">
<form class=""row"">
<form class=""row"">
<div class=""col-md-2"">
<div class=""col-md-2"">
...
@@ -163,78 +162,78 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -163,78 +162,78 @@ namespace DotNetCore.CAP.Dashboard.Pages
#line 54 "..\..
\ReceivedPage.cshtml"
#
line
54
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Query
(
"group"
));
Write
(
Query
(
"group"
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\" placeholder=\""
);
WriteLiteral
(
"\" placeholder=\""
);
#line 54 "..\..
\ReceivedPage.cshtml"
#
line
54
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Strings
.
MessagesPage_Query_MessageGroup
);
Write
(
Strings
.
MessagesPage_Query_MessageGroup
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\" />\r\n </div>\r\n <div class=\"col-m
"
+
WriteLiteral
(
"\"/>\r\n </div>\r\n <div class=\"col-md-3
"
+
"d-3\">\r\n <input type=\"text\" class=\"form-control\" name=
"
+
"\">\r\n <input type=\"text\" class=\"form-control\" name=\"na
"
+
"\"na
me\" value=\""
);
"
me\" value=\""
);
#line 57 "..\..
\ReceivedPage.cshtml"
#
line
57
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Query
(
"name"
));
Write
(
Query
(
"name"
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\" placeholder=\""
);
WriteLiteral
(
"\" placeholder=\""
);
#line 57 "..\..
\ReceivedPage.cshtml"
#
line
57
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Strings
.
MessagesPage_Query_MessageName
);
Write
(
Strings
.
MessagesPage_Query_MessageName
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\" />\r\n </div>\r\n <div class=\"col-md
"
+
WriteLiteral
(
"\"/>\r\n </div>\r\n <div class=\"col-md-5
"
+
"-5\">\r\n <div class=\"input-group\">\r\n
"
+
"\">\r\n <div class=\"input-group\">\r\n
"
+
"
<input type=\"text\" class=\"form-control\" name=\"content\" value=\""
);
"
<input type=\"text\" class=\"form-control\" name=\"content\" value=\""
);
#line 61 "..\..
\ReceivedPage.cshtml"
#
line
61
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Query
(
"content"
));
Write
(
Query
(
"content"
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\" placeholder=\""
);
WriteLiteral
(
"\" placeholder=\""
);
#line 61 "..\..
\ReceivedPage.cshtml"
#
line
61
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Strings
.
MessagesPage_Query_MessageBody
);
Write
(
Strings
.
MessagesPage_Query_MessageBody
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\" />\r\n <span class=\"input-group-btn\">\r\n
"
+
WriteLiteral
(
"\"/>\r\n <span class=\"input-group-btn\">\r\n
"
+
"
<button class=\"btn btn-info\">"
);
"
<button class=\"btn btn-info\">"
);
#line 63 "..\..
\ReceivedPage.cshtml"
#
line
63
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Strings
.
MessagesPage_Query_Button
);
Write
(
Strings
.
MessagesPage_Query_Button
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
@"</button>
WriteLiteral
(
@"</button>
</span>
</span>
</div>
</div>
</div>
</div>
...
@@ -246,387 +245,392 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -246,387 +245,392 @@ namespace DotNetCore.CAP.Dashboard.Pages
#line 71 "..\..
\ReceivedPage.cshtml"
#
line
71
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Url
.
To
(
"/received/requeue"
));
Write
(
Url
.
To
(
"/received/requeue"
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\"\r\n data-loading-text=\""
);
WriteLiteral
(
"\"\r\n data-loading-text=\""
);
#line 72 "..\..
\ReceivedPage.cshtml"
#
line
72
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Strings
.
Common_Enqueueing
);
Write
(
Strings
.
Common_Enqueueing
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\"\r\n disabled=\"disabled\">\r\n <spa"
+
WriteLiteral
(
"\"\r\n disabled=\"disabled\">\r\n <spa"
+
"n class=\"glyphicon glyphicon-repeat\"></span>\r\n "
);
"n class=\"glyphicon glyphicon-repeat\"></span>\r\n "
);
#line 75 "..\..
\ReceivedPage.cshtml"
#
line
75
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Strings
.
Common_ReConsume
);
Write
(
Strings
.
Common_ReConsume
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n </button>\r\n\r\n "
);
WriteLiteral
(
"\r\n </button>\r\n\r\n "
);
#line 78 "..\..
\ReceivedPage.cshtml"
#
line
78
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Html
.
PerPageSelector
(
pager
));
Write
(
Html
.
PerPageSelector
(
pager
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
@"
WriteLiteral
(
@"
</div>
</div>
<div class=""table-responsive"">
<div class=""table-responsive"">
<table class=""table"">
<table class=""table"">
<thead>
<thead>
<tr>
<tr>
<th style=""width:
30px;"">
<th style=""width:
30px;"">
<input type=""checkbox"" class=""js-jobs-list-select-all""
/>
<input type=""checkbox"" class=""js-jobs-list-select-all""
/>
</th>
</th>
<th>"
);
<th>"
);
#line 88 "..\..
\ReceivedPage.cshtml"
#
line
88
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Strings
.
Common_Id
);
Write
(
Strings
.
Common_Id
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</th>\r\n <th style=\"width:50px;\">"
);
WriteLiteral
(
"</th>\r\n <th style=\"width: 30px;\">"
);
#line 88 "..\..\ReceivedPage.cshtml"
#
line
89
"..\..\Pages\ReceivedPage.cshtml"
Write
(
Strings
.
Common_Version
);
Write
(
Strings
.
Common_Version
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</th>\r\n
<th>"
);
WriteLiteral
(
"</th>\r\n
<th>"
);
#line 89 "..\..
\ReceivedPage.cshtml"
#
line
90
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Strings
.
MessagesPage_Table_Group
);
Write
(
Strings
.
MessagesPage_Table_Group
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</th>\r\n
<th>"
);
WriteLiteral
(
"</th>\r\n
<th>"
);
#line 90 "..\..
\ReceivedPage.cshtml"
#
line
91
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Strings
.
MessagesPage_Table_Name
);
Write
(
Strings
.
MessagesPage_Table_Name
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</th>\r\n
<th class=\"min-width\">"
);
WriteLiteral
(
"</th>\r\n
<th class=\"min-width\">"
);
#line 91 "..\..
\ReceivedPage.cshtml"
#
line
92
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Strings
.
MessagesPage_Table_Retries
);
Write
(
Strings
.
MessagesPage_Table_Retries
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</th>\r\n"
);
WriteLiteral
(
"</th>\r\n"
);
#line 92 "..\..
\ReceivedPage.cshtml"
#
line
93
"..\..\Pages
\ReceivedPage.cshtml"
if
(
string
.
Equals
(
StatusName
,
"Processing"
,
StringComparison
.
CurrentCultureIgnoreCase
))
if
(
string
.
Equals
(
StatusName
,
"Processing"
,
StringComparison
.
CurrentCultureIgnoreCase
))
{
{
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"
<th>"
);
WriteLiteral
(
"
<th>"
);
#line 94 "..\..
\ReceivedPage.cshtml"
#
line
95
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Strings
.
MessagesPage_Table_State
);
Write
(
Strings
.
MessagesPage_Table_State
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</th>\r\n"
);
WriteLiteral
(
"</th>\r\n"
);
#line 95 "..\..
\ReceivedPage.cshtml"
#
line
96
"..\..\Pages
\ReceivedPage.cshtml"
}
}
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" <th style=\"width:
75px;\" class=\"align-right\">"
);
WriteLiteral
(
" <th style=\"width:
75px;\" class=\"align-right\">"
);
#line 96 "..\..
\ReceivedPage.cshtml"
#
line
97
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Strings
.
MessagesPage_Table_ExpiresAt
);
Write
(
Strings
.
MessagesPage_Table_ExpiresAt
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</th>\r\n </tr>\r\n </thead>\r\n
"
+
WriteLiteral
(
"</th>\r\n </tr>\r\n </thead>\r\n
"
+
"
<tbody>\r\n"
);
"
<tbody>\r\n"
);
#line 100 "..\..
\ReceivedPage.cshtml"
#
line
101
"..\..\Pages
\ReceivedPage.cshtml"
foreach
(
var
message
in
succeededMessages
)
foreach
(
var
message
in
succeededMessages
)
{
{
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" <tr class=\"js-jobs-list-row hover\">\r\n
"
+
WriteLiteral
(
" <tr class=\"js-jobs-list-row hover\">\r\n
"
+
" <td>\r\n <input typ
"
+
" <td>\r\n <input type=\"checkbox\"
"
+
"e=\"checkbox\
" class=\"js-jobs-list-checkbox\" name=\"messages[]\" value=\""
);
" class=\"js-jobs-list-checkbox\" name=\"messages[]\" value=\""
);
#line 104 "..\..
\ReceivedPage.cshtml"
#
line
105
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
message
.
Id
);
Write
(
message
.
Id
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\" />\r\n </td>\r\n
"
+
WriteLiteral
(
"\"/>\r\n </td>\r\n <td c
"
+
" <td class=\"word-break\">\r\n <a href=\"ja
"
+
"lass=\"word-break\">\r\n <a href=\"javascript:;\" d
"
+
"vascript:;\" d
ata-url=\'"
);
"
ata-url=\'"
);
#line 107 "..\..
\ReceivedPage.cshtml"
#
line
108
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Url
.
To
(
"/received/message/"
)
+
message
.
Id
);
Write
(
Url
.
To
(
"/received/message/"
)
+
message
.
Id
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\' class=\"openModal\">#"
);
WriteLiteral
(
"\' class=\"openModal\">#"
);
#line 107 "..\..
\ReceivedPage.cshtml"
#
line
108
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
message
.
Id
);
Write
(
message
.
Id
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</a>\r\n </td>\r\n
"
+
WriteLiteral
(
"</a>\r\n </td>\r\n <td>
"
+
" <td>\r\n
"
);
"\r\n
"
);
#line 111 "..\..
\ReceivedPage.cshtml"
#
line
111
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
message
.
Version
);
Write
(
message
.
Version
);
#line default
#line hidden
#
line
default
WriteLiteral
(
"\r\n </td>\r\n "
+
#
line
hidden
"<td class=\"word-break\">\r\n "
);
WriteLiteral
(
"\r\n </td>\r\n <td clas"
+
"s=\"word-break\">\r\n "
);
#line 110 "..\..\ReceivedPage.cshtml"
#
line
114
"..\..\Pages\ReceivedPage.cshtml"
Write
(
message
.
Group
);
Write
(
message
.
Group
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n
"
+
WriteLiteral
(
"\r\n </td>\r\n <td>\r\n
"
+
"<td>\r\n
"
);
"
"
);
#line 113 "..\..
\ReceivedPage.cshtml"
#
line
117
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
message
.
Name
);
Write
(
message
.
Name
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n
"
+
WriteLiteral
(
"\r\n </td>\r\n <td>\r\n
"
+
"<td>\r\n
"
);
"
"
);
#line 116 "..\..
\ReceivedPage.cshtml"
#
line
120
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
message
.
Retries
);
Write
(
message
.
Retries
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n
</td>\r\n"
);
WriteLiteral
(
"\r\n
</td>\r\n"
);
#line 118 "..\..
\ReceivedPage.cshtml"
#
line
122
"..\..\Pages
\ReceivedPage.cshtml"
if
(
string
.
Equals
(
StatusName
,
"Processing"
,
StringComparison
.
CurrentCultureIgnoreCase
))
if
(
string
.
Equals
(
StatusName
,
"Processing"
,
StringComparison
.
CurrentCultureIgnoreCase
))
{
{
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" <td>\r\n
"
+
WriteLiteral
(
" <td>\r\n
"
+
"
"
);
"
"
);
#line 121 "..\..
\ReceivedPage.cshtml"
#
line
125
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
message
.
StatusName
);
Write
(
message
.
StatusName
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n
</td>\r\n"
);
WriteLiteral
(
"\r\n
</td>\r\n"
);
#line 123 "..\..
\ReceivedPage.cshtml"
#
line
127
"..\..\Pages
\ReceivedPage.cshtml"
}
}
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"
<td class=\"align-right\">\r\n"
);
WriteLiteral
(
"
<td class=\"align-right\">\r\n"
);
#line 125 "..\..
\ReceivedPage.cshtml"
#
line
129
"..\..\Pages
\ReceivedPage.cshtml"
if
(
message
.
ExpiresAt
.
HasValue
)
if
(
message
.
ExpiresAt
.
HasValue
)
{
{
#line default
#
line
default
#line hidden
#
line
hidden
#line 127 "..\..
\ReceivedPage.cshtml"
#
line
131
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Html
.
RelativeTime
(
message
.
ExpiresAt
.
Value
));
Write
(
Html
.
RelativeTime
(
message
.
ExpiresAt
.
Value
));
#line default
#
line
default
#line hidden
#
line
hidden
#line 127 "..\..
\ReceivedPage.cshtml"
#
line
131
"..\..\Pages
\ReceivedPage.cshtml"
}
}
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" </td>\r\n\r\n </tr"
+
WriteLiteral
(
" </td>\r\n\r\n </tr>\r\n"
);
">\r\n"
);
#line 132 "..\..
\ReceivedPage.cshtml"
#
line
136
"..\..\Pages
\ReceivedPage.cshtml"
}
}
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" </tbody>\r\n </table>\r\n <"
+
WriteLiteral
(
" </tbody>\r\n </table>\r\n <"
+
"/div>\r\n "
);
"/div>\r\n "
);
#line 136 "..\..
\ReceivedPage.cshtml"
#
line
140
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Html
.
Paginator
(
pager
));
Write
(
Html
.
Paginator
(
pager
));
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
WriteLiteral
(
"\r\n </div>\r\n"
);
#line 138 "..\..
\ReceivedPage.cshtml"
#
line
142
"..\..\Pages
\ReceivedPage.cshtml"
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
@" <div>
WriteLiteral
(
@" <div>
<div class=""modal fade"" tabindex=""-1"" role=""dialog"">
<div class=""modal fade"" tabindex=""-1"" role=""dialog"">
<div class=""modal-dialog"" role=""document"">
<div class=""modal-dialog"" role=""document"">
<div class=""modal-content"">
<div class=""modal-content"">
<div class=""modal-header"">
<div class=""modal-header"">
<button type=""button"" class=""close"" data-dismiss=""modal"" aria-label=""Close""><span aria-hidden=""true"">×</span></button>
<button type=""button"" class=""close"" data-dismiss=""modal"" aria-label=""Close"">
<span aria-hidden=""true"">×</span>
</button>
<h4 class=""modal-title"">Message Content</h4>
<h4 class=""modal-title"">Message Content</h4>
</div>
</div>
<div id=""jsonContent"" style=""max-height:
500px;overflow-y:
auto;"" class=""modal-body"">
<div id=""jsonContent"" style=""max-height:
500px; overflow-y:
auto;"" class=""modal-body"">
</div>
</div>
<div class=""modal-footer"">
<div class=""modal-footer"">
<button type=""button"" class=""btn btn-sm btn-primary"" id=""formatBtn"" onclick="""">"
);
<button type=""button"" class=""btn btn-sm btn-primary"" id=""formatBtn"" onclick="""">"
);
#line 150 "..\..
\ReceivedPage.cshtml"
#
line
156
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Strings
.
MessagesPage_Modal_Format
);
Write
(
Strings
.
MessagesPage_Modal_Format
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</button>\r\n <button type=\"button\" class=\"btn btn-s"
+
WriteLiteral
(
"</button>\r\n <button type=\"button\" class=\"btn btn-s"
+
"m btn-primary\" id=\"rawBtn\" onclick=\"\">"
);
"m btn-primary\" id=\"rawBtn\" onclick=\"\">"
);
#line 151 "..\..
\ReceivedPage.cshtml"
#
line
157
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Strings
.
MessagesPage_Modal_Raw
);
Write
(
Strings
.
MessagesPage_Modal_Raw
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</button>\r\n <button type=\"button\" class=\"btn btn-s"
+
WriteLiteral
(
"</button>\r\n <button type=\"button\" class=\"btn btn-s"
+
"m btn-primary\" id=\"expandBtn\" onclick=\"\">"
);
"m btn-primary\" id=\"expandBtn\" onclick=\"\">"
);
#line 152 "..\..
\ReceivedPage.cshtml"
#
line
158
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Strings
.
MessagesPage_Modal_Expand
);
Write
(
Strings
.
MessagesPage_Modal_Expand
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</button>\r\n <button type=\"button\" class=\"btn btn-s"
+
WriteLiteral
(
"</button>\r\n <button type=\"button\" class=\"btn btn-s"
+
"m btn-primary\" id=\"collapseBtn\" onclick=\"\">"
);
"m btn-primary\" id=\"collapseBtn\" onclick=\"\">"
);
#line 153 "..\..
\ReceivedPage.cshtml"
#
line
159
"..\..\Pages
\ReceivedPage.cshtml"
Write
(
Strings
.
MessagesPage_Model_Collaspse
);
Write
(
Strings
.
MessagesPage_Model_Collaspse
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</button>\r\n </div>\r\n </div><!--"
+
WriteLiteral
(
"</button>\r\n </div>\r\n </div><!--"
+
" /.modal-content -->\r\n </div><!-- /.modal-dialog -->\r\n "
+
" /.modal-content -->\r\n </div><!-- /.modal-dialog -->\r\n "
+
" </div><!-- /.modal -->\r\n </div>\r\n"
);
" </div><!-- /.modal -->\r\n </div>\r\n"
);
#line 159 "..\..
\ReceivedPage.cshtml"
#
line
165
"..\..\Pages
\ReceivedPage.cshtml"
}
}
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
" </div>\r\n</div>"
);
WriteLiteral
(
" </div>\r\n</div>"
);
}
}
...
...
src/DotNetCore.CAP.Dashboard/Pages/SubscriberPage.generated.cs
View file @
c4f4f5f4
...
@@ -16,36 +16,30 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -16,36 +16,30 @@ namespace DotNetCore.CAP.Dashboard.Pages
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
#
line
3
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
#
line
2
"..\..\Pages\SubscriberPage.cshtml"
using
DotNetCore.CAP.Dashboard
;
#
line
default
#
line
hidden
#
line
4
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
using
DotNetCore.CAP.Dashboard.Pages
;
using
DotNetCore.CAP.Dashboard.Pages
;
#
line
default
#
line
default
#
line
hidden
#
line
hidden
#
line
5
"..\..\Dashboard
\Pages\SubscriberPage.cshtml"
#
line
3
"..\..
\Pages\SubscriberPage.cshtml"
using
DotNetCore.CAP.Dashboard.Resources
;
using
DotNetCore.CAP.Dashboard.Resources
;
#
line
default
#
line
default
#
line
hidden
#
line
hidden
#
line
2
"..\..\Dashboard
\Pages\SubscriberPage.cshtml"
#
line
4
"..\..
\Pages\SubscriberPage.cshtml"
using
DotNetCore.CAP.Internal
;
using
DotNetCore.CAP.Internal
;
#
line
default
#
line
default
#
line
hidden
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
SubscriberPage
:
RazorPage
internal
partial
class
SubscriberPage
:
DotNetCore
.
CAP
.
Dashboard
.
RazorPage
{
{
#line hidden
#line hidden
p
rotected
override
void
Execute
()
p
ublic
override
void
Execute
()
{
{
...
@@ -57,8 +51,7 @@ WriteLiteral("\r\n");
...
@@ -57,8 +51,7 @@ WriteLiteral("\r\n");
#
line
6
"..\..\Pages\SubscriberPage.cshtml"
#
line
7
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
Layout
=
new
LayoutPage
(
Strings
.
SubscribersPage_Title
);
Layout
=
new
LayoutPage
(
Strings
.
SubscribersPage_Title
);
...
@@ -74,7 +67,7 @@ WriteLiteral("\r\n<div class=\"row\">\r\n <div class=\"col-md-12\">\r\n
...
@@ -74,7 +67,7 @@ WriteLiteral("\r\n<div class=\"row\">\r\n <div class=\"col-md-12\">\r\n
#
line
1
6
"..\..\Dashboard
\Pages\SubscriberPage.cshtml"
#
line
1
5
"..\..
\Pages\SubscriberPage.cshtml"
Write
(
Strings
.
SubscribersPage_Title
);
Write
(
Strings
.
SubscribersPage_Title
);
...
@@ -84,7 +77,7 @@ WriteLiteral("</h1>\r\n\r\n");
...
@@ -84,7 +77,7 @@ WriteLiteral("</h1>\r\n\r\n");
#
line
1
8
"..\..\Dashboard
\Pages\SubscriberPage.cshtml"
#
line
1
7
"..\..
\Pages\SubscriberPage.cshtml"
if
(
subscribers
.
Count
==
0
)
if
(
subscribers
.
Count
==
0
)
{
{
...
@@ -95,7 +88,7 @@ WriteLiteral(" <div class=\"alert alert-warning\">\r\n
...
@@ -95,7 +88,7 @@ WriteLiteral(" <div class=\"alert alert-warning\">\r\n
#
line
2
1
"..\..\Dashboard
\Pages\SubscriberPage.cshtml"
#
line
2
0
"..\..
\Pages\SubscriberPage.cshtml"
Write
(
Strings
.
SubscribersPage_NoSubscribers
);
Write
(
Strings
.
SubscribersPage_NoSubscribers
);
...
@@ -105,7 +98,7 @@ WriteLiteral("\r\n </div>\r\n");
...
@@ -105,7 +98,7 @@ WriteLiteral("\r\n </div>\r\n");
#
line
2
3
"..\..\Dashboard
\Pages\SubscriberPage.cshtml"
#
line
2
2
"..\..
\Pages\SubscriberPage.cshtml"
}
}
else
else
{
{
...
@@ -119,18 +112,17 @@ WriteLiteral(" <div class=\"table-responsive\">\r\n <t
...
@@ -119,18 +112,17 @@ WriteLiteral(" <div class=\"table-responsive\">\r\n <t
#
line
30
"..\..\Dashboard
\Pages\SubscriberPage.cshtml"
#
line
29
"..\..
\Pages\SubscriberPage.cshtml"
Write
(
Strings
.
Common_Group
);
Write
(
Strings
.
Common_Group
);
#
line
default
#
line
default
#
line
hidden
#
line
hidden
WriteLiteral
(
"</th>\r\n <th width=\"40%\">\r\n "
+
WriteLiteral
(
"</th>\r\n <th width=\"40%\">\r\n "
);
" "
);
#
line
3
2
"..\..\Dashboard
\Pages\SubscriberPage.cshtml"
#
line
3
1
"..\..
\Pages\SubscriberPage.cshtml"
Write
(
Strings
.
Common_Name
);
Write
(
Strings
.
Common_Name
);
...
@@ -140,7 +132,7 @@ WriteLiteral("\r\n </th>\r\n
...
@@ -140,7 +132,7 @@ WriteLiteral("\r\n </th>\r\n
#
line
3
4
"..\..\Dashboard
\Pages\SubscriberPage.cshtml"
#
line
3
3
"..\..
\Pages\SubscriberPage.cshtml"
Write
(
Strings
.
Common_Method
);
Write
(
Strings
.
Common_Method
);
...
@@ -151,17 +143,11 @@ WriteLiteral("</th>\r\n </tr>\r\n </th
...
@@ -151,17 +143,11 @@ WriteLiteral("</th>\r\n </tr>\r\n </th
#
line
3
8
"..\..\Dashboard
\Pages\SubscriberPage.cshtml"
#
line
3
7
"..\..
\Pages\SubscriberPage.cshtml"
foreach
(
var
subscriber
in
subscribers
)
foreach
(
var
subscriber
in
subscribers
)
{
{
var
i
=
0
;
var
i
=
0
;
var
rowCount
=
subscriber
.
Value
.
Count
;
var
rowCount
=
subscriber
.
Value
.
Count
;
#
line
default
#
line
hidden
#
line
42
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
foreach
(
var
column
in
subscriber
.
Value
)
foreach
(
var
column
in
subscriber
.
Value
)
{
{
...
@@ -172,7 +158,7 @@ WriteLiteral(" <tr>\r\n");
...
@@ -172,7 +158,7 @@ WriteLiteral(" <tr>\r\n");
#
line
4
5
"..\..\Dashboard
\Pages\SubscriberPage.cshtml"
#
line
4
4
"..\..
\Pages\SubscriberPage.cshtml"
if
(
i
==
0
)
if
(
i
==
0
)
{
{
...
@@ -183,7 +169,7 @@ WriteLiteral(" <td rowspan=\"");
...
@@ -183,7 +169,7 @@ WriteLiteral(" <td rowspan=\"");
#
line
4
7
"..\..\Dashboard
\Pages\SubscriberPage.cshtml"
#
line
4
6
"..\..
\Pages\SubscriberPage.cshtml"
Write
(
rowCount
);
Write
(
rowCount
);
...
@@ -193,7 +179,7 @@ WriteLiteral("\">");
...
@@ -193,7 +179,7 @@ WriteLiteral("\">");
#
line
4
7
"..\..\Dashboard
\Pages\SubscriberPage.cshtml"
#
line
4
6
"..\..
\Pages\SubscriberPage.cshtml"
Write
(
subscriber
.
Key
);
Write
(
subscriber
.
Key
);
...
@@ -203,7 +189,7 @@ WriteLiteral("</td>\r\n");
...
@@ -203,7 +189,7 @@ WriteLiteral("</td>\r\n");
#
line
4
8
"..\..\Dashboard
\Pages\SubscriberPage.cshtml"
#
line
4
7
"..\..
\Pages\SubscriberPage.cshtml"
}
}
...
@@ -213,30 +199,30 @@ WriteLiteral(" <td>");
...
@@ -213,30 +199,30 @@ WriteLiteral(" <td>");
#
line
4
9
"..\..\Dashboard
\Pages\SubscriberPage.cshtml"
#
line
4
8
"..\..
\Pages\SubscriberPage.cshtml"
Write
(
column
.
Attribute
.
Name
);
Write
(
column
.
Attribute
.
Name
);
#
line
default
#
line
default
#
line
hidden
#
line
hidden
WriteLiteral
(
"</td>\r\n <td>\r\n "
+
WriteLiteral
(
"</td>\r\n <td>\r\n "
+
"
<span style=\"color:
#00bcd4\">"
);
"
<span style=\"color:
#00bcd4\">"
);
#
line
5
1
"..\..\Dashboard
\Pages\SubscriberPage.cshtml"
#
line
5
0
"..\..
\Pages\SubscriberPage.cshtml"
Write
(
column
.
ImplTypeInfo
.
Name
);
Write
(
column
.
ImplTypeInfo
.
Name
);
#
line
default
#
line
default
#
line
hidden
#
line
hidden
WriteLiteral
(
"</span>:\r\n
<div class=\"job-snippet-code\">\r
"
+
WriteLiteral
(
"</span>:\r\n
<div class=\"job-snippet-code\">\r\n
"
+
"
\n <code>\r\n
"
+
"
<code>\r\n
"
+
" <pre>"
);
" <pre>"
);
#
line
5
4
"..\..\Dashboard
\Pages\SubscriberPage.cshtml"
#
line
5
3
"..\..
\Pages\SubscriberPage.cshtml"
Write
(
Html
.
MethodEscaped
(
column
.
MethodInfo
));
Write
(
Html
.
MethodEscaped
(
column
.
MethodInfo
));
...
@@ -248,8 +234,7 @@ WriteLiteral("</pre>\r\n </code>\r\n
...
@@ -248,8 +234,7 @@ WriteLiteral("</pre>\r\n </code>\r\n
#
line
58
"..\..\Pages\SubscriberPage.cshtml"
#
line
59
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
i
++;
i
++;
}
}
}
}
...
@@ -261,7 +246,7 @@ WriteLiteral(" </tbody>\r\n </table>\r\n
...
@@ -261,7 +246,7 @@ WriteLiteral(" </tbody>\r\n </table>\r\n
#
line
6
5
"..\..\Dashboard
\Pages\SubscriberPage.cshtml"
#
line
6
4
"..\..
\Pages\SubscriberPage.cshtml"
}
}
...
...
src/DotNetCore.CAP.Dashboard/Pages/_BlockMetric.cshtml
View file @
c4f4f5f4
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True TrimLeadingUnderscores : true *@
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True TrimLeadingUnderscores : true *@
@using DotNetCore.CAP.Dashboard
@using DotNetCore.CAP.Dashboard.Resources
@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 className = metric == null ? "metric-null" : metric.Style.ToClassName();
var highlighted = metric != null && metric.Highlighted ? "highlighted" : null;
var highlighted = metric != null && metric.Highlighted ? "highlighted" : null;
}
}
<div class="metric @className @highlighted">
<div class="metric @className @highlighted">
<div class="metric-body" data-metric="@
Dashboard
Metric.Name">
<div class="metric-body" data-metric="@Metric.Name">
@(metric?.Value)
@(metric?.Value)
</div>
</div>
<div class="metric-description">
<div class="metric-description">
@(Strings.ResourceManager.GetString(
DashboardMetric.Title) ?? Dashboard
Metric.Title)
@(Strings.ResourceManager.GetString(
Metric.Title) ??
Metric.Title)
</div>
</div>
</div>
</div>
\ No newline at end of file
src/DotNetCore.CAP.Dashboard/Pages/_BlockMetric.generated.cs
View file @
c4f4f5f4
...
@@ -16,37 +16,33 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -16,37 +16,33 @@ namespace DotNetCore.CAP.Dashboard.Pages
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
#
line
2
"..\..\Dashboard\Pages\_BlockMetric.cshtml"
#
line
2
"..\..\Pages\_BlockMetric.cshtml"
using
DotNetCore.CAP.Dashboard
;
#
line
default
#
line
hidden
#
line
3
"..\..\Dashboard\Pages\_BlockMetric.cshtml"
using
DotNetCore.CAP.Dashboard.Resources
;
using
DotNetCore.CAP.Dashboard.Resources
;
#
line
default
#
line
default
#
line
hidden
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
BlockMetric
:
RazorPage
internal
partial
class
BlockMetric
:
DotNetCore
.
CAP
.
Dashboard
.
RazorPage
{
{
#line hidden
#line hidden
p
rotected
override
void
Execute
()
p
ublic
override
void
Execute
()
{
{
WriteLiteral
(
"\r\n"
);
WriteLiteral
(
"\r\n"
);
WriteLiteral
(
"\r\n"
);
#
line
5
"..\..\Pages\_BlockMetric.cshtml"
#
line
5
"..\..\Dashboard\Pages\_BlockMetric.cshtml"
var
metric
=
Dashboard
Metric
.
Func
(
this
);
var
metric
=
Metric
.
Func
(
this
);
var
className
=
metric
==
null
?
"metric-null"
:
metric
.
Style
.
ToClassName
();
var
className
=
metric
==
null
?
"metric-null"
:
metric
.
Style
.
ToClassName
();
var
highlighted
=
metric
!=
null
&&
metric
.
Highlighted
?
"highlighted"
:
null
;
var
highlighted
=
metric
!=
null
&&
metric
.
Highlighted
?
"highlighted"
:
null
;
...
@@ -58,7 +54,7 @@ WriteLiteral("<div class=\"metric ");
...
@@ -58,7 +54,7 @@ WriteLiteral("<div class=\"metric ");
#
line
1
0
"..\..\Dashboard
\Pages\_BlockMetric.cshtml"
#
line
1
1
"..\..
\Pages\_BlockMetric.cshtml"
Write
(
className
);
Write
(
className
);
...
@@ -68,7 +64,7 @@ WriteLiteral(" ");
...
@@ -68,7 +64,7 @@ WriteLiteral(" ");
#
line
1
0
"..\..\Dashboard
\Pages\_BlockMetric.cshtml"
#
line
1
1
"..\..
\Pages\_BlockMetric.cshtml"
Write
(
highlighted
);
Write
(
highlighted
);
...
@@ -78,8 +74,8 @@ WriteLiteral("\">\r\n <div class=\"metric-body\" data-metric=\"");
...
@@ -78,8 +74,8 @@ WriteLiteral("\">\r\n <div class=\"metric-body\" data-metric=\"");
#
line
1
1
"..\..\Dashboard
\Pages\_BlockMetric.cshtml"
#
line
1
2
"..\..
\Pages\_BlockMetric.cshtml"
Write
(
Dashboard
Metric
.
Name
);
Write
(
Metric
.
Name
);
#
line
default
#
line
default
...
@@ -88,7 +84,7 @@ WriteLiteral("\">\r\n ");
...
@@ -88,7 +84,7 @@ WriteLiteral("\">\r\n ");
#
line
1
2
"..\..\Dashboard
\Pages\_BlockMetric.cshtml"
#
line
1
3
"..\..
\Pages\_BlockMetric.cshtml"
Write
(
metric
?.
Value
);
Write
(
metric
?.
Value
);
...
@@ -98,8 +94,8 @@ WriteLiteral("\r\n </div>\r\n <div class=\"metric-description\">\r\n
...
@@ -98,8 +94,8 @@ WriteLiteral("\r\n </div>\r\n <div class=\"metric-description\">\r\n
#
line
1
5
"..\..\Dashboard
\Pages\_BlockMetric.cshtml"
#
line
1
6
"..\..
\Pages\_BlockMetric.cshtml"
Write
(
Strings
.
ResourceManager
.
GetString
(
DashboardMetric
.
Title
)
??
Dashboard
Metric
.
Title
);
Write
(
Strings
.
ResourceManager
.
GetString
(
Metric
.
Title
)
??
Metric
.
Title
);
#
line
default
#
line
default
...
...
src/DotNetCore.CAP.Dashboard/Pages/_Breadcrumbs.generated.cs
View file @
c4f4f5f4
...
@@ -16,51 +16,45 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -16,51 +16,45 @@ namespace DotNetCore.CAP.Dashboard.Pages
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
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"
)]
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
Breadcrumbs
:
RazorPage
internal
partial
class
Breadcrumbs
:
DotNetCore
.
CAP
.
Dashboard
.
RazorPage
{
{
#line hidden
#line hidden
p
rotected
override
void
Execute
()
p
ublic
override
void
Execute
()
{
{
WriteLiteral
(
"\r\n"
);
WriteLiteral
(
"\r\n"
);
WriteLiteral
(
"\r\n<ol class=\"breadcrumb\">\r\n <li>\r\n <a href=\""
);
WriteLiteral
(
"\r\n<ol class=\"breadcrumb\">\r\n <li><a href=\""
);
#
line
6
"..\..\
Dashboard\
Pages\_Breadcrumbs.cshtml"
#
line
6
"..\..\Pages\_Breadcrumbs.cshtml"
Write
(
Url
.
Home
());
Write
(
Url
.
Home
());
#
line
default
#
line
default
#
line
hidden
#
line
hidden
WriteLiteral
(
"\"><span class=\"glyphicon glyphicon-home\"></span></a></li>\r\n"
);
WriteLiteral
(
"\">\r\n <span class=\"glyphicon glyphicon-home\"></span>\r\n </a>\r\n "
+
" </li>\r\n"
);
#
line
7
"..\..\Dashboard
\Pages\_Breadcrumbs.cshtml"
#
line
10
"..\..
\Pages\_Breadcrumbs.cshtml"
foreach
(
var
item
in
Items
)
foreach
(
var
item
in
Items
)
{
{
#
line
default
#
line
default
#
line
hidden
#
line
hidden
WriteLiteral
(
" <li><a href=\""
);
WriteLiteral
(
" <li>
\r\n
<a href=\""
);
#
line
9
"..\..\Dashboard
\Pages\_Breadcrumbs.cshtml"
#
line
13
"..\..
\Pages\_Breadcrumbs.cshtml"
Write
(
item
.
Value
);
Write
(
item
.
Value
);
...
@@ -70,17 +64,17 @@ WriteLiteral("\">");
...
@@ -70,17 +64,17 @@ WriteLiteral("\">");
#
line
9
"..\..\Dashboard
\Pages\_Breadcrumbs.cshtml"
#
line
13
"..\..
\Pages\_Breadcrumbs.cshtml"
Write
(
item
.
Key
);
Write
(
item
.
Key
);
#
line
default
#
line
default
#
line
hidden
#
line
hidden
WriteLiteral
(
"</a></li>\r\n"
);
WriteLiteral
(
"</a>
\r\n
</li>\r\n"
);
#
line
1
0
"..\..\Dashboard
\Pages\_Breadcrumbs.cshtml"
#
line
1
5
"..\..
\Pages\_Breadcrumbs.cshtml"
}
}
...
@@ -90,7 +84,7 @@ WriteLiteral(" <li class=\"active\">");
...
@@ -90,7 +84,7 @@ WriteLiteral(" <li class=\"active\">");
#
line
1
1
"..\..\Dashboard
\Pages\_Breadcrumbs.cshtml"
#
line
1
6
"..\..
\Pages\_Breadcrumbs.cshtml"
Write
(
Title
);
Write
(
Title
);
...
...
src/DotNetCore.CAP.Dashboard/Pages/_InlineMetric.generated.cs
View file @
c4f4f5f4
...
@@ -16,7 +16,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -16,7 +16,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
#
line
2
"..\..\
Dashboard\
Pages\_InlineMetric.cshtml"
#
line
2
"..\..\Pages\_InlineMetric.cshtml"
using
DotNetCore.CAP.Dashboard
;
using
DotNetCore.CAP.Dashboard
;
#
line
default
#
line
default
...
@@ -27,7 +27,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -27,7 +27,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
{
{
#line hidden
#line hidden
p
rotected
override
void
Execute
()
p
ublic
override
void
Execute
()
{
{
...
@@ -37,7 +37,7 @@ WriteLiteral("\r\n");
...
@@ -37,7 +37,7 @@ WriteLiteral("\r\n");
#
line
4
"..\..\
Dashboard\
Pages\_InlineMetric.cshtml"
#
line
4
"..\..\Pages\_InlineMetric.cshtml"
var
metric
=
DashboardMetric
.
Func
(
this
);
var
metric
=
DashboardMetric
.
Func
(
this
);
var
className
=
metric
==
null
?
"metric-null"
:
metric
.
Style
.
ToClassName
();
var
className
=
metric
==
null
?
"metric-null"
:
metric
.
Style
.
ToClassName
();
...
@@ -51,7 +51,7 @@ WriteLiteral("<span data-metric=\"");
...
@@ -51,7 +51,7 @@ WriteLiteral("<span data-metric=\"");
#
line
9
"..\..\
Dashboard\
Pages\_InlineMetric.cshtml"
#
line
9
"..\..\Pages\_InlineMetric.cshtml"
Write
(
DashboardMetric
.
Name
);
Write
(
DashboardMetric
.
Name
);
...
@@ -61,7 +61,7 @@ WriteLiteral("\" class=\"metric ");
...
@@ -61,7 +61,7 @@ WriteLiteral("\" class=\"metric ");
#
line
9
"..\..\
Dashboard\
Pages\_InlineMetric.cshtml"
#
line
9
"..\..\Pages\_InlineMetric.cshtml"
Write
(
className
);
Write
(
className
);
...
@@ -71,7 +71,7 @@ WriteLiteral(" ");
...
@@ -71,7 +71,7 @@ WriteLiteral(" ");
#
line
9
"..\..\
Dashboard\
Pages\_InlineMetric.cshtml"
#
line
9
"..\..\Pages\_InlineMetric.cshtml"
Write
(
highlighted
);
Write
(
highlighted
);
...
@@ -81,7 +81,7 @@ WriteLiteral("\">");
...
@@ -81,7 +81,7 @@ WriteLiteral("\">");
#
line
9
"..\..\
Dashboard\
Pages\_InlineMetric.cshtml"
#
line
9
"..\..\Pages\_InlineMetric.cshtml"
Write
(
metric
?.
Value
);
Write
(
metric
?.
Value
);
...
...
src/DotNetCore.CAP.Dashboard/Pages/_Navigation.generated.cs
View file @
c4f4f5f4
...
@@ -16,18 +16,18 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -16,18 +16,18 @@ namespace DotNetCore.CAP.Dashboard.Pages
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
#
line
2
"..\..\
Dashboard\
Pages\_Navigation.cshtml"
#
line
2
"..\..\Pages\_Navigation.cshtml"
using
DotNetCore.CAP.Dashboard
;
using
DotNetCore.CAP.Dashboard
;
#
line
default
#
line
default
#
line
hidden
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
Navigation
:
RazorPage
internal
partial
class
Navigation
:
DotNetCore
.
CAP
.
Dashboard
.
RazorPage
{
{
#line hidden
#line hidden
p
rotected
override
void
Execute
()
p
ublic
override
void
Execute
()
{
{
...
@@ -37,7 +37,7 @@ WriteLiteral("\r\n");
...
@@ -37,7 +37,7 @@ WriteLiteral("\r\n");
#
line
4
"..\..\
Dashboard\
Pages\_Navigation.cshtml"
#
line
4
"..\..\Pages\_Navigation.cshtml"
if
(
NavigationMenu
.
Items
.
Count
>
0
)
if
(
NavigationMenu
.
Items
.
Count
>
0
)
{
{
...
@@ -48,12 +48,15 @@ WriteLiteral(" <ul class=\"nav navbar-nav\">\r\n");
...
@@ -48,12 +48,15 @@ WriteLiteral(" <ul class=\"nav navbar-nav\">\r\n");
#
line
7
"..\..\
Dashboard\
Pages\_Navigation.cshtml"
#
line
7
"..\..\Pages\_Navigation.cshtml"
foreach
(
var
item
in
NavigationMenu
.
Items
)
foreach
(
var
item
in
NavigationMenu
.
Items
)
{
{
var
itemValue
=
item
(
this
);
var
itemValue
=
item
(
this
);
if
(
itemValue
==
null
)
{
continue
;
}
if
(
itemValue
==
null
)
{
continue
;
}
...
@@ -63,7 +66,7 @@ WriteLiteral(" <li class=\"");
...
@@ -63,7 +66,7 @@ WriteLiteral(" <li class=\"");
#
line
1
3
"..\..\Dashboard
\Pages\_Navigation.cshtml"
#
line
1
6
"..\..
\Pages\_Navigation.cshtml"
Write
(
itemValue
.
Active
?
"active"
:
null
);
Write
(
itemValue
.
Active
?
"active"
:
null
);
...
@@ -73,7 +76,7 @@ WriteLiteral("\">\r\n <a href=\"");
...
@@ -73,7 +76,7 @@ WriteLiteral("\">\r\n <a href=\"");
#
line
1
4
"..\..\Dashboard
\Pages\_Navigation.cshtml"
#
line
1
7
"..\..
\Pages\_Navigation.cshtml"
Write
(
itemValue
.
Url
);
Write
(
itemValue
.
Url
);
...
@@ -83,7 +86,7 @@ WriteLiteral("\">\r\n ");
...
@@ -83,7 +86,7 @@ WriteLiteral("\">\r\n ");
#
line
1
5
"..\..\Dashboard
\Pages\_Navigation.cshtml"
#
line
1
8
"..\..
\Pages\_Navigation.cshtml"
Write
(
itemValue
.
Text
);
Write
(
itemValue
.
Text
);
...
@@ -93,7 +96,7 @@ WriteLiteral("\r\n\r\n");
...
@@ -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
())
foreach
(
var
metric
in
itemValue
.
GetAllMetrics
())
{
{
...
@@ -101,14 +104,14 @@ WriteLiteral("\r\n\r\n");
...
@@ -101,14 +104,14 @@ WriteLiteral("\r\n\r\n");
#
line
default
#
line
default
#
line
hidden
#
line
hidden
#
line
19
"..\..\Dashboard
\Pages\_Navigation.cshtml"
#
line
22
"..\..
\Pages\_Navigation.cshtml"
Write
(
Html
.
InlineMetric
(
metric
));
Write
(
Html
.
InlineMetric
(
metric
));
#
line
default
#
line
default
#
line
hidden
#
line
hidden
#
line
19
"..\..\Dashboard
\Pages\_Navigation.cshtml"
#
line
22
"..\..
\Pages\_Navigation.cshtml"
}
}
...
@@ -119,7 +122,7 @@ WriteLiteral(" </a>\r\n </li>\r\n");
...
@@ -119,7 +122,7 @@ WriteLiteral(" </a>\r\n </li>\r\n");
#
line
2
3
"..\..\Dashboard
\Pages\_Navigation.cshtml"
#
line
2
6
"..\..
\Pages\_Navigation.cshtml"
}
}
...
@@ -129,7 +132,7 @@ WriteLiteral(" </ul>\r\n");
...
@@ -129,7 +132,7 @@ WriteLiteral(" </ul>\r\n");
#
line
2
5
"..\..\Dashboard
\Pages\_Navigation.cshtml"
#
line
2
8
"..\..
\Pages\_Navigation.cshtml"
}
}
#
line
default
#
line
default
...
...
src/DotNetCore.CAP.Dashboard/Pages/_Paginator.generated.cs
View file @
c4f4f5f4
...
@@ -16,24 +16,24 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -16,24 +16,24 @@ namespace DotNetCore.CAP.Dashboard.Pages
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
#
line
2
"..\..\
Dashboard\
Pages\_Paginator.cshtml"
#
line
2
"..\..\Pages\_Paginator.cshtml"
using
DotNetCore.CAP.Dashboard
;
using
DotNetCore.CAP.Dashboard
;
#
line
default
#
line
default
#
line
hidden
#
line
hidden
#
line
3
"..\..\
Dashboard\
Pages\_Paginator.cshtml"
#
line
3
"..\..\Pages\_Paginator.cshtml"
using
DotNetCore.CAP.Dashboard.Resources
;
using
DotNetCore.CAP.Dashboard.Resources
;
#
line
default
#
line
default
#
line
hidden
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
Paginator
:
RazorPage
internal
partial
class
Paginator
:
DotNetCore
.
CAP
.
Dashboard
.
RazorPage
{
{
#line hidden
#line hidden
p
rotected
override
void
Execute
()
p
ublic
override
void
Execute
()
{
{
...
@@ -41,14 +41,12 @@ WriteLiteral("\r\n");
...
@@ -41,14 +41,12 @@ WriteLiteral("\r\n");
WriteLiteral
(
"\r\n"
);
WriteLiteral
(
"<div class=\"btn-toolbar\">\r\n"
);
WriteLiteral
(
"<div class=\"btn-toolbar\">\r\n"
);
#
line
7
"..\..\Dashboard
\Pages\_Paginator.cshtml"
#
line
6
"..\..
\Pages\_Paginator.cshtml"
if
(
_pager
.
TotalPageCount
>
1
)
if
(
_pager
.
TotalPageCount
>
1
)
{
{
...
@@ -59,7 +57,7 @@ WriteLiteral(" <div class=\"btn-group paginator\">\r\n");
...
@@ -59,7 +57,7 @@ WriteLiteral(" <div class=\"btn-group paginator\">\r\n");
#
line
10
"..\..\Dashboard
\Pages\_Paginator.cshtml"
#
line
9
"..\..
\Pages\_Paginator.cshtml"
foreach
(
var
page
in
_pager
.
PagerItems
)
foreach
(
var
page
in
_pager
.
PagerItems
)
{
{
switch
(
page
.
Type
)
switch
(
page
.
Type
)
...
@@ -73,7 +71,7 @@ WriteLiteral(" <a href=\"");
...
@@ -73,7 +71,7 @@ WriteLiteral(" <a href=\"");
#
line
1
5
"..\..\Dashboard
\Pages\_Paginator.cshtml"
#
line
1
4
"..\..
\Pages\_Paginator.cshtml"
Write
(
_pager
.
PageUrl
(
page
.
PageIndex
));
Write
(
_pager
.
PageUrl
(
page
.
PageIndex
));
...
@@ -83,7 +81,7 @@ WriteLiteral("\" class=\"btn btn-default ");
...
@@ -83,7 +81,7 @@ WriteLiteral("\" class=\"btn btn-default ");
#
line
1
5
"..\..\Dashboard
\Pages\_Paginator.cshtml"
#
line
1
4
"..\..
\Pages\_Paginator.cshtml"
Write
(
_pager
.
CurrentPage
==
page
.
PageIndex
?
"active"
:
null
);
Write
(
_pager
.
CurrentPage
==
page
.
PageIndex
?
"active"
:
null
);
...
@@ -93,17 +91,17 @@ WriteLiteral("\">\r\n ");
...
@@ -93,17 +91,17 @@ WriteLiteral("\">\r\n ");
#
line
1
6
"..\..\Dashboard
\Pages\_Paginator.cshtml"
#
line
1
5
"..\..
\Pages\_Paginator.cshtml"
Write
(
page
.
PageIndex
);
Write
(
page
.
PageIndex
);
#
line
default
#
line
default
#
line
hidden
#
line
hidden
WriteLiteral
(
"
\r\n </a>\r\n"
);
WriteLiteral
(
"\r\n </a>\r\n"
);
#
line
1
8
"..\..\Dashboard
\Pages\_Paginator.cshtml"
#
line
1
7
"..\..
\Pages\_Paginator.cshtml"
break
;
break
;
case
Pager
.
ItemType
.
NextPage
:
case
Pager
.
ItemType
.
NextPage
:
...
@@ -114,7 +112,7 @@ WriteLiteral(" <a href=\"");
...
@@ -114,7 +112,7 @@ WriteLiteral(" <a href=\"");
#
line
20
"..\..\Dashboard
\Pages\_Paginator.cshtml"
#
line
19
"..\..
\Pages\_Paginator.cshtml"
Write
(
_pager
.
PageUrl
(
page
.
PageIndex
));
Write
(
_pager
.
PageUrl
(
page
.
PageIndex
));
...
@@ -124,7 +122,7 @@ WriteLiteral("\" class=\"btn btn-default ");
...
@@ -124,7 +122,7 @@ WriteLiteral("\" class=\"btn btn-default ");
#
line
20
"..\..\Dashboard
\Pages\_Paginator.cshtml"
#
line
19
"..\..
\Pages\_Paginator.cshtml"
Write
(
page
.
Disabled
?
"disabled"
:
null
);
Write
(
page
.
Disabled
?
"disabled"
:
null
);
...
@@ -134,7 +132,7 @@ WriteLiteral("\">\r\n ");
...
@@ -134,7 +132,7 @@ WriteLiteral("\">\r\n ");
#
line
2
1
"..\..\Dashboard
\Pages\_Paginator.cshtml"
#
line
2
0
"..\..
\Pages\_Paginator.cshtml"
Write
(
Strings
.
Paginator_Next
);
Write
(
Strings
.
Paginator_Next
);
...
@@ -144,7 +142,7 @@ WriteLiteral("\r\n </a>\r\n");
...
@@ -144,7 +142,7 @@ WriteLiteral("\r\n </a>\r\n");
#
line
2
3
"..\..\Dashboard
\Pages\_Paginator.cshtml"
#
line
2
2
"..\..
\Pages\_Paginator.cshtml"
break
;
break
;
case
Pager
.
ItemType
.
PrevPage
:
case
Pager
.
ItemType
.
PrevPage
:
...
@@ -155,7 +153,7 @@ WriteLiteral(" <a href=\"");
...
@@ -155,7 +153,7 @@ WriteLiteral(" <a href=\"");
#
line
2
5
"..\..\Dashboard
\Pages\_Paginator.cshtml"
#
line
2
4
"..\..
\Pages\_Paginator.cshtml"
Write
(
_pager
.
PageUrl
(
page
.
PageIndex
));
Write
(
_pager
.
PageUrl
(
page
.
PageIndex
));
...
@@ -165,7 +163,7 @@ WriteLiteral("\" class=\"btn btn-default ");
...
@@ -165,7 +163,7 @@ WriteLiteral("\" class=\"btn btn-default ");
#
line
2
5
"..\..\Dashboard
\Pages\_Paginator.cshtml"
#
line
2
4
"..\..
\Pages\_Paginator.cshtml"
Write
(
page
.
Disabled
?
"disabled"
:
null
);
Write
(
page
.
Disabled
?
"disabled"
:
null
);
...
@@ -175,7 +173,7 @@ WriteLiteral("\">\r\n ");
...
@@ -175,7 +173,7 @@ WriteLiteral("\">\r\n ");
#
line
2
6
"..\..\Dashboard
\Pages\_Paginator.cshtml"
#
line
2
5
"..\..
\Pages\_Paginator.cshtml"
Write
(
Strings
.
Paginator_Prev
);
Write
(
Strings
.
Paginator_Prev
);
...
@@ -185,7 +183,7 @@ WriteLiteral("\r\n </a>\r\n");
...
@@ -185,7 +183,7 @@ WriteLiteral("\r\n </a>\r\n");
#
line
2
8
"..\..\Dashboard
\Pages\_Paginator.cshtml"
#
line
2
7
"..\..
\Pages\_Paginator.cshtml"
break
;
break
;
case
Pager
.
ItemType
.
MorePage
:
case
Pager
.
ItemType
.
MorePage
:
...
@@ -197,7 +195,7 @@ WriteLiteral(" <a href=\"#\" class=\"btn btn-default disa
...
@@ -197,7 +195,7 @@ WriteLiteral(" <a href=\"#\" class=\"btn btn-default disa
#
line
3
3
"..\..\Dashboard
\Pages\_Paginator.cshtml"
#
line
3
2
"..\..
\Pages\_Paginator.cshtml"
break
;
break
;
}
}
}
}
...
@@ -213,7 +211,7 @@ WriteLiteral(" <div class=\"btn-toolbar-spacer\"></div>\r\n");
...
@@ -213,7 +211,7 @@ WriteLiteral(" <div class=\"btn-toolbar-spacer\"></div>\r\n");
#
line
3
8
"..\..\Dashboard
\Pages\_Paginator.cshtml"
#
line
3
7
"..\..
\Pages\_Paginator.cshtml"
}
}
...
@@ -223,7 +221,7 @@ WriteLiteral("\r\n <div class=\"btn-toolbar-label\">\r\n ");
...
@@ -223,7 +221,7 @@ WriteLiteral("\r\n <div class=\"btn-toolbar-label\">\r\n ");
#
line
4
1
"..\..\Dashboard
\Pages\_Paginator.cshtml"
#
line
4
0
"..\..
\Pages\_Paginator.cshtml"
Write
(
Strings
.
Paginator_TotalItems
);
Write
(
Strings
.
Paginator_TotalItems
);
...
@@ -233,13 +231,13 @@ WriteLiteral(": ");
...
@@ -233,13 +231,13 @@ WriteLiteral(": ");
#
line
4
1
"..\..\Dashboard
\Pages\_Paginator.cshtml"
#
line
4
0
"..\..
\Pages\_Paginator.cshtml"
Write
(
_pager
.
TotalRecordCount
);
Write
(
_pager
.
TotalRecordCount
);
#
line
default
#
line
default
#
line
hidden
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n</div>
\r\n
"
);
WriteLiteral
(
"\r\n </div>\r\n</div>"
);
}
}
...
...
src/DotNetCore.CAP.Dashboard/Pages/_PerPageSelector.generated.cs
View file @
c4f4f5f4
...
@@ -16,7 +16,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -16,7 +16,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
#
line
2
"..\..\
Dashboard\
Pages\_PerPageSelector.cshtml"
#
line
2
"..\..\Pages\_PerPageSelector.cshtml"
using
DotNetCore.CAP.Dashboard.Resources
;
using
DotNetCore.CAP.Dashboard.Resources
;
#
line
default
#
line
default
...
@@ -27,7 +27,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -27,7 +27,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
{
{
#line hidden
#line hidden
p
rotected
override
void
Execute
()
p
ublic
override
void
Execute
()
{
{
...
@@ -35,12 +35,12 @@ WriteLiteral("\r\n");
...
@@ -35,12 +35,12 @@ WriteLiteral("\r\n");
WriteLiteral
(
"\r\n
<div class=\"btn-group pull-right paginator\">\r\n"
);
WriteLiteral
(
"\r\n<div class=\"btn-group pull-right paginator\">\r\n"
);
#
line
6
"..\..\
Dashboard\
Pages\_PerPageSelector.cshtml"
#
line
6
"..\..\Pages\_PerPageSelector.cshtml"
foreach
(
var
count
in
new
[]
{
10
,
20
,
50
,
100
,
500
})
foreach
(
var
count
in
new
[]
{
10
,
20
,
50
,
100
,
500
})
{
{
...
@@ -50,54 +50,54 @@ WriteLiteral(" <a class=\"btn btn-sm btn-default ");
...
@@ -50,54 +50,54 @@ WriteLiteral(" <a class=\"btn btn-sm btn-default ");
#
line
8
"..\..\
Dashboard\
Pages\_PerPageSelector.cshtml"
#
line
8
"..\..\Pages\_PerPageSelector.cshtml"
Write
(
count
==
_pager
.
RecordsPerPage
?
"active"
:
null
);
Write
(
count
==
_pager
.
RecordsPerPage
?
"active"
:
null
);
#
line
default
#
line
default
#
line
hidden
#
line
hidden
WriteLiteral
(
"\"
\r\n
href=\""
);
WriteLiteral
(
"\"
\r\n
href=\""
);
#
line
9
"..\..\
Dashboard\
Pages\_PerPageSelector.cshtml"
#
line
9
"..\..\Pages\_PerPageSelector.cshtml"
Write
(
_pager
.
RecordsPerPageUrl
(
count
));
Write
(
_pager
.
RecordsPerPageUrl
(
count
));
#
line
default
#
line
default
#
line
hidden
#
line
hidden
WriteLiteral
(
"\">"
);
WriteLiteral
(
"\">
\r\n
"
);
#
line
9
"..\..\Dashboard
\Pages\_PerPageSelector.cshtml"
#
line
10
"..\..
\Pages\_PerPageSelector.cshtml"
Write
(
count
);
Write
(
count
);
#
line
default
#
line
default
#
line
hidden
#
line
hidden
WriteLiteral
(
"</a>
\r\n"
);
WriteLiteral
(
"</a>\r\n"
);
#
line
1
0
"..\..\Dashboard
\Pages\_PerPageSelector.cshtml"
#
line
1
1
"..\..
\Pages\_PerPageSelector.cshtml"
}
}
#
line
default
#
line
default
#
line
hidden
#
line
hidden
WriteLiteral
(
"
</div>\r\n <div class=\"btn-toolbar-spacer pull-right\"></div>\r\n <div class
"
+
WriteLiteral
(
"
</div>\r\n<div class=\"btn-toolbar-spacer pull-right\"></div>\r\n<div class=\"btn-toolba
"
+
"
=\"btn-toolbar-label btn-toolbar-label-sm pull-right\">\r\n
"
);
"
r-label btn-toolbar-label-sm pull-right\">\r\n
"
);
#
line
1
4
"..\..\Dashboard
\Pages\_PerPageSelector.cshtml"
#
line
1
5
"..\..
\Pages\_PerPageSelector.cshtml"
Write
(
Strings
.
PerPageSelector_ItemsPerPage
);
Write
(
Strings
.
PerPageSelector_ItemsPerPage
);
#
line
default
#
line
default
#
line
hidden
#
line
hidden
WriteLiteral
(
":\r\n
</div>\r\n
"
);
WriteLiteral
(
":\r\n
</div>
"
);
}
}
...
...
src/DotNetCore.CAP.Dashboard/Pages/_SidebarMenu.generated.cs
View file @
c4f4f5f4
...
@@ -16,18 +16,12 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -16,18 +16,12 @@ namespace DotNetCore.CAP.Dashboard.Pages
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
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"
)]
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
SidebarMenu
:
RazorPage
internal
partial
class
SidebarMenu
:
DotNetCore
.
CAP
.
Dashboard
.
RazorPage
{
{
#line hidden
#line hidden
p
rotected
override
void
Execute
()
p
ublic
override
void
Execute
()
{
{
...
@@ -36,8 +30,7 @@ WriteLiteral("\r\n");
...
@@ -36,8 +30,7 @@ WriteLiteral("\r\n");
#
line
3
"..\..\Pages\_SidebarMenu.cshtml"
#
line
4
"..\..\Dashboard\Pages\_SidebarMenu.cshtml"
if
(
Items
.
Any
())
if
(
Items
.
Any
())
{
{
...
@@ -48,7 +41,7 @@ WriteLiteral(" <div id=\"stats\" class=\"list-group\">\r\n");
...
@@ -48,7 +41,7 @@ WriteLiteral(" <div id=\"stats\" class=\"list-group\">\r\n");
#
line
7
"..\..\Dashboard
\Pages\_SidebarMenu.cshtml"
#
line
6
"..\..
\Pages\_SidebarMenu.cshtml"
foreach
(
var
item
in
Items
)
foreach
(
var
item
in
Items
)
{
{
var
itemValue
=
item
(
this
);
var
itemValue
=
item
(
this
);
...
@@ -60,7 +53,7 @@ WriteLiteral(" <a href=\"");
...
@@ -60,7 +53,7 @@ WriteLiteral(" <a href=\"");
#
line
10
"..\..\Dashboard
\Pages\_SidebarMenu.cshtml"
#
line
9
"..\..
\Pages\_SidebarMenu.cshtml"
Write
(
itemValue
.
Url
);
Write
(
itemValue
.
Url
);
...
@@ -70,7 +63,7 @@ WriteLiteral("\" class=\"list-group-item ");
...
@@ -70,7 +63,7 @@ WriteLiteral("\" class=\"list-group-item ");
#
line
10
"..\..\Dashboard
\Pages\_SidebarMenu.cshtml"
#
line
9
"..\..
\Pages\_SidebarMenu.cshtml"
Write
(
itemValue
.
Active
?
"active"
:
null
);
Write
(
itemValue
.
Active
?
"active"
:
null
);
...
@@ -80,7 +73,7 @@ WriteLiteral("\">\r\n ");
...
@@ -80,7 +73,7 @@ WriteLiteral("\">\r\n ");
#
line
1
1
"..\..\Dashboard
\Pages\_SidebarMenu.cshtml"
#
line
1
0
"..\..
\Pages\_SidebarMenu.cshtml"
Write
(
itemValue
.
Text
);
Write
(
itemValue
.
Text
);
...
@@ -90,7 +83,7 @@ WriteLiteral("\r\n <span class=\"pull-right\">\r\n");
...
@@ -90,7 +83,7 @@ WriteLiteral("\r\n <span class=\"pull-right\">\r\n");
#
line
1
3
"..\..\Dashboard
\Pages\_SidebarMenu.cshtml"
#
line
1
2
"..\..
\Pages\_SidebarMenu.cshtml"
foreach
(
var
metric
in
itemValue
.
GetAllMetrics
())
foreach
(
var
metric
in
itemValue
.
GetAllMetrics
())
{
{
...
@@ -98,14 +91,14 @@ WriteLiteral("\r\n <span class=\"pull-right\">\r\n");
...
@@ -98,14 +91,14 @@ WriteLiteral("\r\n <span class=\"pull-right\">\r\n");
#
line
default
#
line
default
#
line
hidden
#
line
hidden
#
line
1
5
"..\..\Dashboard
\Pages\_SidebarMenu.cshtml"
#
line
1
4
"..\..
\Pages\_SidebarMenu.cshtml"
Write
(
Html
.
InlineMetric
(
metric
));
Write
(
Html
.
InlineMetric
(
metric
));
#
line
default
#
line
default
#
line
hidden
#
line
hidden
#
line
1
5
"..\..\Dashboard
\Pages\_SidebarMenu.cshtml"
#
line
1
4
"..\..
\Pages\_SidebarMenu.cshtml"
}
}
...
@@ -116,7 +109,7 @@ WriteLiteral(" </span>\r\n </a>\r\n");
...
@@ -116,7 +109,7 @@ WriteLiteral(" </span>\r\n </a>\r\n");
#
line
1
9
"..\..\Dashboard
\Pages\_SidebarMenu.cshtml"
#
line
1
8
"..\..
\Pages\_SidebarMenu.cshtml"
}
}
...
@@ -126,10 +119,9 @@ WriteLiteral(" </div>\r\n");
...
@@ -126,10 +119,9 @@ WriteLiteral(" </div>\r\n");
#
line
2
1
"..\..\Dashboard
\Pages\_SidebarMenu.cshtml"
#
line
2
0
"..\..
\Pages\_SidebarMenu.cshtml"
}
}
#
line
default
#
line
default
#
line
hidden
#
line
hidden
...
...
src/DotNetCore.CAP.Dashboard/RazorPage.cs
View file @
c4f4f5f4
...
@@ -5,9 +5,10 @@ using System;
...
@@ -5,9 +5,10 @@ using System;
using
System.Diagnostics
;
using
System.Diagnostics
;
using
System.Net
;
using
System.Net
;
using
System.Text
;
using
System.Text
;
using
DotNetCore.CAP.Dashboard.
Monitoring
;
using
DotNetCore.CAP.Dashboard.
NodeDiscovery
;
using
DotNetCore.CAP.Internal
;
using
DotNetCore.CAP.Internal
;
using
DotNetCore.CAP.NodeDiscovery
;
using
DotNetCore.CAP.Monitoring
;
using
DotNetCore.CAP.Persistence
;
using
Microsoft.Extensions.DependencyInjection
;
using
Microsoft.Extensions.DependencyInjection
;
namespace
DotNetCore.CAP.Dashboard
namespace
DotNetCore.CAP.Dashboard
...
@@ -28,7 +29,7 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -28,7 +29,7 @@ namespace DotNetCore.CAP.Dashboard
protected
HtmlHelper
Html
{
get
;
}
protected
HtmlHelper
Html
{
get
;
}
public
UrlHelper
Url
{
get
;
private
set
;
}
public
UrlHelper
Url
{
get
;
private
set
;
}
protected
IStorage
Storage
{
get
;
set
;
}
protected
I
Data
Storage
Storage
{
get
;
set
;
}
protected
string
AppPath
{
get
;
set
;
}
protected
string
AppPath
{
get
;
set
;
}
protected
string
NodeName
{
get
;
set
;
}
protected
string
NodeName
{
get
;
set
;
}
...
@@ -55,7 +56,7 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -55,7 +56,7 @@ namespace DotNetCore.CAP.Dashboard
public
string
RequestPath
=>
Request
.
Path
;
public
string
RequestPath
=>
Request
.
Path
;
/// <exclude />
/// <exclude />
p
rotected
abstract
void
Execute
();
p
ublic
abstract
void
Execute
();
protected
string
Query
(
string
key
)
protected
string
Query
(
string
key
)
{
{
...
@@ -95,8 +96,7 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -95,8 +96,7 @@ namespace DotNetCore.CAP.Dashboard
_statisticsLazy
=
new
Lazy
<
StatisticsDto
>(()
=>
_statisticsLazy
=
new
Lazy
<
StatisticsDto
>(()
=>
{
{
var
monitoring
=
Storage
.
GetMonitoringApi
();
var
dto
=
Storage
.
GetMonitoringApi
().
GetStatistics
();
var
dto
=
monitoring
.
GetStatistics
();
SetServersCount
(
dto
);
SetServersCount
(
dto
);
...
...
src/DotNetCore.CAP.MySql/MySqlDataStorage.cs
View file @
c4f4f5f4
...
@@ -6,6 +6,7 @@ using System.Threading.Tasks;
...
@@ -6,6 +6,7 @@ using System.Threading.Tasks;
using
Dapper
;
using
Dapper
;
using
DotNetCore.CAP.Internal
;
using
DotNetCore.CAP.Internal
;
using
DotNetCore.CAP.Messages
;
using
DotNetCore.CAP.Messages
;
using
DotNetCore.CAP.Monitoring
;
using
DotNetCore.CAP.Persistence
;
using
DotNetCore.CAP.Persistence
;
using
DotNetCore.CAP.Serialization
;
using
DotNetCore.CAP.Serialization
;
using
Microsoft.EntityFrameworkCore.Storage
;
using
Microsoft.EntityFrameworkCore.Storage
;
...
@@ -65,6 +66,7 @@ namespace DotNetCore.CAP.MySql
...
@@ -65,6 +66,7 @@ namespace DotNetCore.CAP.MySql
{
{
DbId
=
content
.
GetId
(),
DbId
=
content
.
GetId
(),
Origin
=
content
,
Origin
=
content
,
Content
=
StringSerializer
.
Serialize
(
content
),
Added
=
DateTime
.
Now
,
Added
=
DateTime
.
Now
,
ExpiresAt
=
null
,
ExpiresAt
=
null
,
Retries
=
0
Retries
=
0
...
@@ -74,7 +76,7 @@ namespace DotNetCore.CAP.MySql
...
@@ -74,7 +76,7 @@ namespace DotNetCore.CAP.MySql
{
{
Id
=
message
.
DbId
,
Id
=
message
.
DbId
,
Name
=
name
,
Name
=
name
,
Content
=
StringSerializer
.
Serialize
(
message
.
Origin
)
,
message
.
Content
,
message
.
Retries
,
message
.
Retries
,
message
.
Added
,
message
.
Added
,
message
.
ExpiresAt
,
message
.
ExpiresAt
,
...
@@ -212,24 +214,9 @@ namespace DotNetCore.CAP.MySql
...
@@ -212,24 +214,9 @@ namespace DotNetCore.CAP.MySql
return
result
;
return
result
;
}
}
//public Task<CapPublishedMessage> GetPublishedMessageAsync(long id)
public
IMonitoringApi
GetMonitoringApi
()
//{
{
// var sql = $@"SELECT * FROM `{_prefix}.published` WHERE `Id`={id};";
return
new
MySqlMonitoringApi
(
_options
);
}
// using (var connection = new MySqlConnection(Options.ConnectionString))
// {
// return await connection.QueryFirstOrDefaultAsync<CapPublishedMessage>(sql);
// }
//}
//public Task<CapReceivedMessage> GetReceivedMessageAsync(long id)
//{
// var sql =
// $@"SELECT * FROM `{_prefix}.received` WHERE Id={id};";
// using (var connection = new MySqlConnection(Options.ConnectionString))
// {
// return await connection.QueryFirstOrDefaultAsync<CapReceivedMessage>(sql);
// }
//}
}
}
}
}
src/DotNetCore.CAP/Internal/Helper.cs
View file @
c4f4f5f4
...
@@ -9,6 +9,14 @@ namespace DotNetCore.CAP.Internal
...
@@ -9,6 +9,14 @@ namespace DotNetCore.CAP.Internal
{
{
public
static
class
Helper
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
)
public
static
bool
IsController
(
TypeInfo
typeInfo
)
{
{
if
(!
typeInfo
.
IsClass
)
if
(!
typeInfo
.
IsClass
)
...
...
src/DotNetCore.CAP/Internal/MethodMatcherCache.cs
View file @
c4f4f5f4
...
@@ -8,7 +8,7 @@ using System.Linq;
...
@@ -8,7 +8,7 @@ using System.Linq;
namespace
DotNetCore.CAP.Internal
namespace
DotNetCore.CAP.Internal
{
{
internal
class
MethodMatcherCache
public
class
MethodMatcherCache
{
{
private
readonly
IConsumerServiceSelector
_selector
;
private
readonly
IConsumerServiceSelector
_selector
;
...
...
src/DotNetCore.CAP/Persistence/IDataStorage.cs
View file @
c4f4f5f4
...
@@ -4,6 +4,7 @@ using System.Threading;
...
@@ -4,6 +4,7 @@ using System.Threading;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
DotNetCore.CAP.Internal
;
using
DotNetCore.CAP.Internal
;
using
DotNetCore.CAP.Messages
;
using
DotNetCore.CAP.Messages
;
using
DotNetCore.CAP.Monitoring
;
namespace
DotNetCore.CAP.Persistence
namespace
DotNetCore.CAP.Persistence
{
{
...
@@ -13,16 +14,21 @@ namespace DotNetCore.CAP.Persistence
...
@@ -13,16 +14,21 @@ namespace DotNetCore.CAP.Persistence
Task
ChangeReceiveStateAsync
(
MediumMessage
message
,
StatusName
state
);
Task
ChangeReceiveStateAsync
(
MediumMessage
message
,
StatusName
state
);
Task
<
MediumMessage
>
StoreMessageAsync
(
string
name
,
Message
content
,
object
dbTransaction
=
null
,
CancellationToken
cancellationToken
=
default
);
Task
<
MediumMessage
>
StoreMessageAsync
(
string
name
,
Message
content
,
object
dbTransaction
=
null
,
CancellationToken
cancellationToken
=
default
);
Task
StoreReceivedExceptionMessageAsync
(
string
name
,
string
group
,
string
content
);
Task
StoreReceivedExceptionMessageAsync
(
string
name
,
string
group
,
string
content
);
Task
<
MediumMessage
>
StoreReceivedMessageAsync
(
string
name
,
string
group
,
Message
content
);
Task
<
MediumMessage
>
StoreReceivedMessageAsync
(
string
name
,
string
group
,
Message
content
);
Task
<
int
>
DeleteExpiresAsync
(
string
table
,
DateTime
timeout
,
int
batchCount
=
1000
,
CancellationToken
token
=
default
);
Task
<
int
>
DeleteExpiresAsync
(
string
table
,
DateTime
timeout
,
int
batchCount
=
1000
,
CancellationToken
token
=
default
);
Task
<
IEnumerable
<
MediumMessage
>>
GetPublishedMessagesOfNeedRetry
();
Task
<
IEnumerable
<
MediumMessage
>>
GetPublishedMessagesOfNeedRetry
();
Task
<
IEnumerable
<
MediumMessage
>>
GetReceivedMessagesOfNeedRetry
();
Task
<
IEnumerable
<
MediumMessage
>>
GetReceivedMessagesOfNeedRetry
();
//dashboard api
IMonitoringApi
GetMonitoringApi
();
}
}
}
}
\ No newline at end of file
src/DotNetCore.CAP/Persistence/MediumMessage.cs
View file @
c4f4f5f4
...
@@ -9,6 +9,8 @@ namespace DotNetCore.CAP.Persistence
...
@@ -9,6 +9,8 @@ namespace DotNetCore.CAP.Persistence
public
Message
Origin
{
get
;
set
;
}
public
Message
Origin
{
get
;
set
;
}
public
string
Content
{
get
;
set
;
}
public
DateTime
Added
{
get
;
set
;
}
public
DateTime
Added
{
get
;
set
;
}
public
DateTime
?
ExpiresAt
{
get
;
set
;
}
public
DateTime
?
ExpiresAt
{
get
;
set
;
}
...
...
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