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
02d90b1c
Commit
02d90b1c
authored
Oct 15, 2017
by
Savorboard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add current node name to layout page if user enabled node discovery
parent
bbe09e42
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
313 additions
and
272 deletions
+313
-272
LayoutPage.cshtml
src/DotNetCore.CAP/Dashboard/Pages/LayoutPage.cshtml
+54
-50
LayoutPage.generated.cs
src/DotNetCore.CAP/Dashboard/Pages/LayoutPage.generated.cs
+244
-220
RazorPage.cs
src/DotNetCore.CAP/Dashboard/RazorPage.cs
+15
-2
No files found.
src/DotNetCore.CAP/Dashboard/Pages/LayoutPage.cshtml
View file @
02d90b1c
...
@@ -16,64 +16,68 @@
...
@@ -16,64 +16,68 @@
<link
rel=
"stylesheet"
href=
"@Url.To($"
/
css
{
version
.
Major
}{
version
.
Minor
}{
version
.
Build
}")"
>
<link
rel=
"stylesheet"
href=
"@Url.To($"
/
css
{
version
.
Major
}{
version
.
Minor
}{
version
.
Build
}")"
>
</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"
>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"navbar-header"
>
<div
class=
"navbar-header"
>
<button
type=
"button"
class=
"navbar-toggle"
data-toggle=
"collapse"
data-target=
".navbar-collapse"
>
<button
type=
"button"
class=
"navbar-toggle"
data-toggle=
"collapse"
data-target=
".navbar-collapse"
>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
</button>
</button>
<a
class=
"navbar-brand"
href=
"@Url.Home()"
>
CAP Dashboard
</a>
<a
class=
"navbar-brand"
href=
"@Url.Home()"
>
CAP Dashboard
</a>
</div>
</div>
<div
class=
"collapse navbar-collapse"
>
<div
class=
"collapse navbar-collapse"
>
@Html.RenderPartial(new Navigation())
@Html.RenderPartial(new Navigation())
@if (AppPath != null)
@if (AppPath != null)
{
{
<ul
class=
"nav navbar-nav navbar-right"
>
<ul
class=
"nav navbar-nav navbar-right"
>
<li>
<li>
<a
href=
"@AppPath"
>
<a
href=
"@AppPath"
>
<span
class=
"glyphicon glyphicon-log-out"
></span>
<span
class=
"glyphicon glyphicon-log-out"
></span>
@Strings.LayoutPage_Back
@Strings.LayoutPage_Back
</a>
</a>
</li>
</li>
</ul>
</ul>
}
}
</div>
<!--/.nav-collapse -->
</div>
</div>
<!--/.nav-collapse -->
</div>
</div>
</div>
<!-- Begin page content -->
<!-- Begin page content -->
<div
class=
"container"
style=
"margin-bottom: 20px;"
>
<div
class=
"container"
style=
"margin-bottom: 20px;"
>
@RenderBody()
@RenderBody()
</div>
</div>
</div>
</div>
<div
id=
"footer"
>
<div
id=
"footer"
>
<div
class=
"container"
>
<div
class=
"container"
>
<ul
class=
"list-inline credit"
>
<ul
class=
"list-inline credit"
>
<li>
<li>
<a
href=
"https://github.com/dotnetcore/cap/"
target=
"_blank"
>
<a
href=
"https://github.com/dotnetcore/cap/"
target=
"_blank"
>
CAP @($"{version.Major}.{version.Minor}.{version.Build}")
CAP @($"{version.Major}.{version.Minor}.{version.Build}")
</a>
</a>
</li>
</li>
<li>
@Storage
</li>
<li>
@Storage
</li>
<li>
@Strings.LayoutPage_Footer_Time @Html.LocalTime(DateTime.UtcNow)
</li>
<li>
@Strings.LayoutPage_Footer_Time @Html.LocalTime(DateTime.UtcNow)
</li>
<li>
@string.Format(Strings.LayoutPage_Footer_Generatedms, GenerationTime.Elapsed.TotalMilliseconds.ToString("N"))
</li>
<li>
@string.Format(Strings.LayoutPage_Footer_Generatedms, GenerationTime.Elapsed.TotalMilliseconds.ToString("N"))
</li>
</ul>
@if (NodeName != null)
{
<li>
@string.Format(Strings.LayoutPage_Footer_NodeCurrent, NodeName)
</li>
}
</ul>
</div>
</div>
</div>
</div>
<div
id=
"capConfig"
<div
id=
"capConfig"
data-pollinterval=
"@StatsPollingInterval"
data-pollinterval=
"@StatsPollingInterval"
data-pollurl=
"@(Url.To("
/
stats
"))"
>
data-pollurl=
"@(Url.To("
/
stats
"))"
>
</div>
</div>
<script
src=
"@Url.To($"
/
js
{
version
.
Major
}{
version
.
Minor
}{
version
.
Build
}")"
></script>
<script
src=
"@Url.To($"
/
js
{
version
.
Major
}{
version
.
Minor
}{
version
.
Build
}")"
></script>
</body>
</body>
</html>
</html>
\ No newline at end of file
src/DotNetCore.CAP/Dashboard/Pages/LayoutPage.generated.cs
View file @
02d90b1c
...
@@ -11,48 +11,42 @@
...
@@ -11,48 +11,42 @@
namespace
DotNetCore.CAP.Dashboard.Pages
namespace
DotNetCore.CAP.Dashboard.Pages
{
{
#
line
2
"..\..\Dashboard\Pages
\LayoutPage.cshtml"
#line 2 "..\..
\LayoutPage.cshtml"
using
System
;
using
System
;
#
line
default
#line default
#
line
hidden
#line hidden
using
System.Collections.Generic
;
using
System.Collections.Generic
;
#
line
3
"..\..\Dashboard\Pages
\LayoutPage.cshtml"
#line 3 "..\..
\LayoutPage.cshtml"
using
System.Globalization
;
using
System.Globalization
;
#
line
default
#line default
#
line
hidden
#line hidden
using
System.Linq
;
using
System.Linq
;
#
line
4
"..\..\Dashboard\Pages
\LayoutPage.cshtml"
#line 4 "..\..
\LayoutPage.cshtml"
using
System.Reflection
;
using
System.Reflection
;
#
line
default
#line default
#
line
hidden
#line hidden
using
System.Text
;
using
System.Text
;
#
line
5
"..\..\Dashboard\Pages\LayoutPage.cshtml"
#line 5 "..\..\LayoutPage.cshtml"
using
DotNetCore.CAP.Dashboard
;
#
line
default
#
line
hidden
#
line
6
"..\..\Dashboard\Pages\LayoutPage.cshtml"
using
DotNetCore.CAP.Dashboard.Pages
;
using
DotNetCore.CAP.Dashboard.Pages
;
#
line
default
#line default
#
line
hidden
#line hidden
#
line
7
"..\..\Dashboard\Pages
\LayoutPage.cshtml"
#line 6 "..\..
\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
:
RazorPage
public
partial
class
LayoutPage
:
DotNetCore
.
CAP
.
Dashboard
.
RazorPage
{
{
#line hidden
#line hidden
...
@@ -60,240 +54,270 @@ namespace DotNetCore.CAP.Dashboard.Pages
...
@@ -60,240 +54,270 @@ namespace DotNetCore.CAP.Dashboard.Pages
{
{
WriteLiteral
(
"\r\n"
);
WriteLiteral
(
"\r\n"
);
WriteLiteral
(
"<!DOCTYPE html>\r\n<html lang=\""
);
#line 9 "..\..\LayoutPage.cshtml"
Write
(
CultureInfo
.
CurrentUICulture
.
TwoLetterISOLanguageName
);
#line default
#line hidden
WriteLiteral
(
"\">\r\n<head>\r\n <title>"
);
WriteLiteral
(
"<!DOCTYPE html>\r\n<html lang=\""
);
#line 11 "..\..\LayoutPage.cshtml"
Write
(
Title
);
#line default
#
line
10
"..\..\Dashboard\Pages\LayoutPage.cshtml"
#line hidden
Write
(
CultureInfo
.
CurrentUICulture
.
TwoLetterISOLanguageName
);
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"
+
"tial-scale=1.0\">\r\n"
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n<head>\r\n <title>"
);
#line 15 "..\..\LayoutPage.cshtml"
#
line
12
"..\..\Dashboard\Pages\LayoutPage.cshtml"
var
version
=
GetType
().
GetTypeInfo
().
Assembly
.
GetName
().
Version
;
Write
(
Title
);
#
line
default
#
line
hidden
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"
+
"tial-scale=1.0\">\r\n"
);
#line default
#line hidden
WriteLiteral
(
" <link rel=\"stylesheet\" href=\""
);
#
line
16
"..\..\Dashboard\Pages\LayoutPage.cshtml"
var
version
=
GetType
().
GetTypeInfo
().
Assembly
.
GetName
().
Version
;
#
line
default
#
line
hidden
WriteLiteral
(
" <link rel=\"stylesheet\" href=\""
);
#line 16 "..\..\LayoutPage.cshtml"
Write
(
Url
.
To
(
$"/css
{
version
.
Major
}{
version
.
Minor
}{
version
.
Build
}
"
));
#
line
17
"..\..\Dashboard\Pages\LayoutPage.cshtml"
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 -->
<div class=""navbar navbar-default navbar-fixed-top"">
<div class=""container"">
<div class=""navbar-header"">
<button type=""button"" class=""navbar-toggle"" data-toggle=""collapse"" data-target="".navbar-collapse"">
<span class=""icon-bar""></span>
<span class=""icon-bar""></span>
<span class=""icon-bar""></span>
</button>
<a class=""navbar-brand"" href="""
);
#
line
32
"..\..\Dashboard\Pages\LayoutPage.cshtml"
Write
(
Url
.
Home
());
#
line
default
#
line
hidden
WriteLiteral
(
"\">CAP Dashboard</a>\r\n </div>\r\n <div class=\""
+
"collapse navbar-collapse\">\r\n "
);
#
line
35
"..\..\Dashboard\Pages\LayoutPage.cshtml"
Write
(
Html
.
RenderPartial
(
new
Navigation
()));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n"
);
#
line
36
"..\..\Dashboard\Pages\LayoutPage.cshtml"
if
(
@AppPath
!=
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <ul class=\"nav navbar-nav navbar-right\">\r\n "
+
" <li>\r\n <a href=\""
);
#
line
39
"..\..\Dashboard\Pages\LayoutPage.cshtml"
Write
(
AppPath
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n <span class=\"glyphicon glyphicon-log-"
+
"out\"></span>\r\n "
);
#
line
41
"..\..\Dashboard\Pages\LayoutPage.cshtml"
Write
(
Strings
.
LayoutPage_Back
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </a>\r\n </li>"
+
"\r\n </ul>\r\n"
);
#
line
45
"..\..\Dashboard\Pages\LayoutPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n <!--/.nav-collapse -->\r\n "
+
" </div>\r\n </div>\r\n\r\n <!-- Begin page content -->\r\n "
+
" <div class=\"container\" style=\"margin-bottom: 20px;\">\r\n "
+
""
);
#
line
53
"..\..\Dashboard\Pages\LayoutPage.cshtml"
Write
(
RenderBody
());
#
line
default
#
line
hidden
WriteLiteral
(
@"
</div>
</div>
<div id=""footer"">
<!-- Fixed navbar -->
<div class=""navbar navbar-default navbar-fixed-top"">
<div class=""container"">
<div class=""container"">
<ul class=""list-inline credit"">
<div class=""navbar-header"">
<li>
<button type=""button"" class=""navbar-toggle"" data-toggle=""collapse"" data-target="".navbar-collapse"">
<a href=""https://github.com/dotnetcore/cap/"" target=""_blank"">CAP "
);
<span class=""icon-bar""></span>
<span class=""icon-bar""></span>
<span class=""icon-bar""></span>
</button>
<a class=""navbar-brand"" href="""
);
#line 31 "..\..\LayoutPage.cshtml"
Write
(
Url
.
Home
());
#line default
#line hidden
WriteLiteral
(
"\">CAP Dashboard</a>\r\n </div>\r\n <div class=\"collapse"
+
" navbar-collapse\">\r\n "
);
#line 34 "..\..\LayoutPage.cshtml"
Write
(
Html
.
RenderPartial
(
new
Navigation
()));
#line default
#line hidden
WriteLiteral
(
"\r\n"
);
#line 35 "..\..\LayoutPage.cshtml"
if
(
AppPath
!=
null
)
{
#line default
#line hidden
WriteLiteral
(
" <ul class=\"nav navbar-nav navbar-right\">\r\n "
+
" <li>\r\n <a href=\""
);
#line 39 "..\..\LayoutPage.cshtml"
Write
(
AppPath
);
#line default
#line hidden
WriteLiteral
(
"\">\r\n <span class=\"glyphicon glyphicon-log-out\""
+
"></span>\r\n "
);
#line 41 "..\..\LayoutPage.cshtml"
Write
(
Strings
.
LayoutPage_Back
);
#line default
#line hidden
WriteLiteral
(
"\r\n </a>\r\n </li>\r\n "
+
" </ul>\r\n"
);
#line 45 "..\..\LayoutPage.cshtml"
}
#line default
#
line
61
"..\..\Dashboard\Pages\LayoutPage.cshtml"
#line hidden
Write
(
$"
{
version
.
Major
}
.
{
version
.
Minor
}
.
{
version
.
Build
}
"
);
WriteLiteral
(
" </div>\r\n <!--/.nav-collapse -->\r\n </div"
+
">\r\n </div>\r\n\r\n <!-- Begin page content -->\r\n <div class=\"co"
+
"ntainer\" style=\"margin-bottom: 20px;\">\r\n "
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </a>\r\n </li>\r\n <l"
+
"i>"
);
#line 53 "..\..\LayoutPage.cshtml"
#
line
64
"..\..\Dashboard\Pages\LayoutPage.cshtml"
Write
(
RenderBody
());
Write
(
Storage
);
#
line
default
#
line
hidden
WriteLiteral
(
"</li>\r\n <li>"
);
#line default
#line hidden
WriteLiteral
(
@"
</div>
</div>
<div id=""footer"">
#
line
65
"..\..\Dashboard\Pages\LayoutPage.cshtml"
<div class=""container"">
Write
(
Strings
.
LayoutPage_Footer_Time
);
<ul class=""list-inline credit"">
<li>
<a href=""https://github.com/dotnetcore/cap/"" target=""_blank"">
CAP "
);
#
line
default
#
line
hidden
WriteLiteral
(
" "
);
#line 62 "..\..\LayoutPage.cshtml"
#
line
65
"..\..\Dashboard\Pages\LayoutPage.cshtml"
Write
(
$"
{
version
.
Major
}
.
{
version
.
Minor
}
.
{
version
.
Build
}
"
);
Write
(
Html
.
LocalTime
(
DateTime
.
UtcNow
));
#
line
default
#
line
hidden
WriteLiteral
(
"</li>\r\n <li>"
);
#line default
#line hidden
WriteLiteral
(
"\r\n </a>\r\n </li>\r\n <li>"
);
#
line
66
"..\..\Dashboard\Pages\LayoutPage.cshtml"
Write
(
String
.
Format
(
Strings
.
LayoutPage_Footer_Generatedms
,
GenerationTime
.
Elapsed
.
TotalMilliseconds
.
ToString
(
"N"
)));
#
line
default
#
line
hidden
WriteLiteral
(
"</li>\r\n </ul>\r\n </div>\r\n </div>\r\n \r\n "
+
" <div id=\"capConfig\"\r\n data-pollinterval=\""
);
#line 65 "..\..\LayoutPage.cshtml"
Write
(
Storage
);
#
line
72
"..\..\Dashboard\Pages\LayoutPage.cshtml"
Write
(
StatsPollingInterval
);
#line default
#
line
default
#line hidden
#
line
hidden
WriteLiteral
(
"</li>\r\n <li>"
);
WriteLiteral
(
"\"\r\n data-pollurl=\""
);
#line 66 "..\..\LayoutPage.cshtml"
Write
(
Strings
.
LayoutPage_Footer_Time
);
#line default
#line hidden
WriteLiteral
(
" "
);
#
line
73
"..\..\Dashboard\Pages\LayoutPage.cshtml"
Write
(
Url
.
To
(
"/stats"
));
#line 66 "..\..\LayoutPage.cshtml"
#
line
default
Write
(
Html
.
LocalTime
(
DateTime
.
UtcNow
));
#
line
hidden
WriteLiteral
(
"\">\r\n </div>\r\n\r\n <script src=\""
);
#line default
#
line
76
"..\..\Dashboard\Pages\LayoutPage.cshtml"
#line hidden
Write
(
Url
.
To
(
$"/js
{
version
.
Major
}{
version
.
Minor
}{
version
.
Build
}
"
));
WriteLiteral
(
"</li>\r\n <li>"
);
#line 67 "..\..\LayoutPage.cshtml"
Write
(
string
.
Format
(
Strings
.
LayoutPage_Footer_Generatedms
,
GenerationTime
.
Elapsed
.
TotalMilliseconds
.
ToString
(
"N"
)));
#line default
#line hidden
WriteLiteral
(
"</li>\r\n"
);
#line 68 "..\..\LayoutPage.cshtml"
if
(
NodeName
!=
null
)
{
#line default
#line hidden
WriteLiteral
(
" <li>"
);
#
line
default
#line 70 "..\..\LayoutPage.cshtml"
#
line
hidden
Write
(
string
.
Format
(
Strings
.
LayoutPage_Footer_NodeCurrent
,
NodeName
));
WriteLiteral
(
"\"></script>\r\n </body>\r\n</html>\r\n"
);
#line default
#line hidden
WriteLiteral
(
"</li>\r\n"
);
#line 71 "..\..\LayoutPage.cshtml"
}
#line default
#line hidden
WriteLiteral
(
" </ul>\r\n </div>\r\n </div>\r\n\r\n <div id=\"capConfig\"\r\n "
+
" data-pollinterval=\""
);
#line 77 "..\..\LayoutPage.cshtml"
Write
(
StatsPollingInterval
);
#line default
#line hidden
WriteLiteral
(
"\"\r\n data-pollurl=\""
);
#line 78 "..\..\LayoutPage.cshtml"
Write
(
Url
.
To
(
"/stats"
));
#line default
#line hidden
WriteLiteral
(
"\">\r\n </div>\r\n\r\n <script src=\""
);
#line 81 "..\..\LayoutPage.cshtml"
Write
(
Url
.
To
(
$"/js
{
version
.
Major
}{
version
.
Minor
}{
version
.
Build
}
"
));
#line default
#line hidden
WriteLiteral
(
"\"></script>\r\n</body>\r\n</html>"
);
}
}
...
...
src/DotNetCore.CAP/Dashboard/RazorPage.cs
View file @
02d90b1c
...
@@ -26,6 +26,8 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -26,6 +26,8 @@ namespace DotNetCore.CAP.Dashboard
public
IStorage
Storage
{
get
;
internal
set
;
}
public
IStorage
Storage
{
get
;
internal
set
;
}
public
string
AppPath
{
get
;
internal
set
;
}
public
string
AppPath
{
get
;
internal
set
;
}
public
string
NodeName
{
get
;
internal
set
;
}
public
int
StatsPollingInterval
{
get
;
internal
set
;
}
public
int
StatsPollingInterval
{
get
;
internal
set
;
}
public
Stopwatch
GenerationTime
{
get
;
private
set
;
}
public
Stopwatch
GenerationTime
{
get
;
private
set
;
}
...
@@ -64,10 +66,10 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -64,10 +66,10 @@ namespace DotNetCore.CAP.Dashboard
Response
=
parentPage
.
Response
;
Response
=
parentPage
.
Response
;
Storage
=
parentPage
.
Storage
;
Storage
=
parentPage
.
Storage
;
AppPath
=
parentPage
.
AppPath
;
AppPath
=
parentPage
.
AppPath
;
NodeName
=
parentPage
.
NodeName
;
StatsPollingInterval
=
parentPage
.
StatsPollingInterval
;
StatsPollingInterval
=
parentPage
.
StatsPollingInterval
;
Url
=
parentPage
.
Url
;
Url
=
parentPage
.
Url
;
RequestServices
=
parentPage
.
RequestServices
;
RequestServices
=
parentPage
.
RequestServices
;
GenerationTime
=
parentPage
.
GenerationTime
;
GenerationTime
=
parentPage
.
GenerationTime
;
_statisticsLazy
=
parentPage
.
_statisticsLazy
;
_statisticsLazy
=
parentPage
.
_statisticsLazy
;
}
}
...
@@ -79,6 +81,7 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -79,6 +81,7 @@ namespace DotNetCore.CAP.Dashboard
RequestServices
=
context
.
RequestServices
;
RequestServices
=
context
.
RequestServices
;
Storage
=
context
.
Storage
;
Storage
=
context
.
Storage
;
AppPath
=
context
.
Options
.
AppPath
;
AppPath
=
context
.
Options
.
AppPath
;
NodeName
=
GetNodeName
();
StatsPollingInterval
=
context
.
Options
.
StatsPollingInterval
;
StatsPollingInterval
=
context
.
Options
.
StatsPollingInterval
;
Url
=
new
UrlHelper
(
context
);
Url
=
new
UrlHelper
(
context
);
...
@@ -93,11 +96,21 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -93,11 +96,21 @@ namespace DotNetCore.CAP.Dashboard
});
});
}
}
private
string
GetNodeName
()
{
var
discoveryOptions
=
RequestServices
.
GetService
<
DiscoveryOptions
>();
if
(
discoveryOptions
!=
null
)
{
return
$"
{
discoveryOptions
.
NodeName
}
(
{
discoveryOptions
.
NodeId
}
)"
;
}
return
null
;
}
private
void
SetServersCount
(
StatisticsDto
dto
)
private
void
SetServersCount
(
StatisticsDto
dto
)
{
{
if
(
CapCache
.
Global
.
TryGet
(
"cap.nodes.count"
,
out
var
count
))
if
(
CapCache
.
Global
.
TryGet
(
"cap.nodes.count"
,
out
var
count
))
{
{
dto
.
Servers
=
(
int
)
count
;
dto
.
Servers
=
(
int
)
count
;
}
}
else
else
{
{
...
...
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