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
ab48d3a9
Commit
ab48d3a9
authored
Sep 20, 2017
by
yangxiaodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify node and subscriber pages
parent
e0de7a16
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
28 deletions
+55
-28
NodePage.cs
src/DotNetCore.CAP/Dashboard/Pages/NodePage.cs
+4
-5
NodePage.cshtml
src/DotNetCore.CAP/Dashboard/Pages/NodePage.cshtml
+4
-2
NodePage1.generated.cs
src/DotNetCore.CAP/Dashboard/Pages/NodePage1.generated.cs
+32
-8
SubscriberPage.cshtml
src/DotNetCore.CAP/Dashboard/Pages/SubscriberPage.cshtml
+2
-1
SubscriberPage.generated.cs
...otNetCore.CAP/Dashboard/Pages/SubscriberPage.generated.cs
+13
-12
No files found.
src/DotNetCore.CAP/Dashboard/Pages/NodePage.cs
View file @
ab48d3a9
...
...
@@ -15,13 +15,12 @@ namespace DotNetCore.CAP.Dashboard.Pages
{
if
(
_nodes
==
null
)
{
var
configOptions
=
RequestServices
.
GetService
<
DashboardOptions
>();
var
discoveryServer
=
configOptions
.
Discovery
;
if
(
discoveryServer
==
null
)
return
null
;
var
configOptions
=
RequestServices
.
GetService
<
DiscoveryOptions
>();
var
factory
=
RequestServices
.
GetService
<
IDiscoveryProviderFactory
>();
var
discoryProvider
=
factory
.
Get
(
discoveryServer
);
var
discoryProvider
=
factory
.
Create
(
configOptions
);
_nodes
=
discoryProvider
.
GetNodes
().
GetAwaiter
().
GetResult
();
}
return
_nodes
;
...
...
src/DotNetCore.CAP/Dashboard/Pages/NodePage.cshtml
View file @
ab48d3a9
...
...
@@ -24,6 +24,7 @@
<tr>
<th width="20%">节点名称</th>
<th width="20%">IP地址</th>
<th width="7%">端口号</th>
<th>Tags</th>
<th width="20%">操作</th>
</tr>
...
...
@@ -34,8 +35,9 @@
<tr>
<td>@node.Name</td>
<td>@node.Address</td>
<td><a class="btn">切换到</a></td>
<td>@node.Port</td>
<td>@node.Tags</td>
<td><a href="javascript:;" class="btn-link">切换到</a></td>
</tr>
}
</tbody>
...
...
src/DotNetCore.CAP/Dashboard/Pages/NodePage.generated.cs
→
src/DotNetCore.CAP/Dashboard/Pages/NodePage
1
.generated.cs
View file @
ab48d3a9
...
...
@@ -106,8 +106,11 @@ WriteLiteral(@" <div class=""table-responsive"">
<table class=""table"">
<thead>
<tr>
<th width=""50%"">节点名称</th>
<th width=""50%"">IP地址</th>
<th width=""20%"">节点名称</th>
<th width=""20%"">IP地址</th>
<th width=""7%"">端口号</th>
<th>Tags</th>
<th width=""20%"">操作</th>
</tr>
</thead>
<tbody>
...
...
@@ -115,7 +118,7 @@ WriteLiteral(@" <div class=""table-responsive"">
#
line
3
0
"..\..\Dashboard\Pages\NodePage.cshtml"
#
line
3
3
"..\..\Dashboard\Pages\NodePage.cshtml"
foreach
(
var
node
in
Nodes
)
{
...
...
@@ -126,7 +129,7 @@ WriteLiteral(" <tr>\r\n
#
line
3
3
"..\..\Dashboard\Pages\NodePage.cshtml"
#
line
3
6
"..\..\Dashboard\Pages\NodePage.cshtml"
Write
(
node
.
Name
);
...
...
@@ -136,17 +139,38 @@ WriteLiteral("</td>\r\n <td>");
#
line
3
4
"..\..\Dashboard\Pages\NodePage.cshtml"
#
line
3
7
"..\..\Dashboard\Pages\NodePage.cshtml"
Write
(
node
.
Address
);
#
line
default
#
line
hidden
WriteLiteral
(
"</td>\r\n
</tr>\r\n
"
);
WriteLiteral
(
"</td>\r\n
<td>
"
);
#
line
36
"..\..\Dashboard\Pages\NodePage.cshtml"
#
line
38
"..\..\Dashboard\Pages\NodePage.cshtml"
Write
(
node
.
Port
);
#
line
default
#
line
hidden
WriteLiteral
(
"</td>\r\n <td>"
);
#
line
39
"..\..\Dashboard\Pages\NodePage.cshtml"
Write
(
node
.
Tags
);
#
line
default
#
line
hidden
WriteLiteral
(
"</td>\r\n <td><a class=\"btn\">切换到</a></td>\r\n "
+
" </tr>\r\n"
);
#
line
42
"..\..\Dashboard\Pages\NodePage.cshtml"
}
...
...
@@ -156,7 +180,7 @@ WriteLiteral(" </tbody>\r\n </table>\r\n
#
line
4
0
"..\..\Dashboard\Pages\NodePage.cshtml"
#
line
4
6
"..\..\Dashboard\Pages\NodePage.cshtml"
}
...
...
src/DotNetCore.CAP/Dashboard/Pages/SubscriberPage.cshtml
View file @
ab48d3a9
...
...
@@ -38,12 +38,13 @@
@foreach (var subscriber in subscribers)
{
var i = 0;
var rowCount = subscriber.Value.Count;
@foreach (var column in subscriber.Value)
{
<tr>
@if (i == 0)
{
<td rowspan="@
subscriber.Value.
Count">@subscriber.Key</td>
<td rowspan="@
row
Count">@subscriber.Key</td>
}
<td>@column.Attribute.Name</td>
<td>
...
...
src/DotNetCore.CAP/Dashboard/Pages/SubscriberPage.generated.cs
View file @
ab48d3a9
...
...
@@ -155,12 +155,13 @@ WriteLiteral("</th>\r\n </tr>\r\n </th
foreach
(
var
subscriber
in
subscribers
)
{
var
i
=
0
;
var
rowCount
=
subscriber
.
Value
.
Count
;
#
line
default
#
line
hidden
#
line
4
1
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
#
line
4
2
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
foreach
(
var
column
in
subscriber
.
Value
)
{
...
...
@@ -171,7 +172,7 @@ WriteLiteral(" <tr>\r\n");
#
line
4
4
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
#
line
4
5
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
if
(
i
==
0
)
{
...
...
@@ -182,8 +183,8 @@ WriteLiteral(" <td rowspan=\"");
#
line
4
6
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
Write
(
subscriber
.
Value
.
Count
);
#
line
4
7
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
Write
(
row
Count
);
#
line
default
...
...
@@ -192,8 +193,8 @@ WriteLiteral("\">");
#
line
4
6
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
Write
(
subscriber
.
Key
);
#
line
4
7
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
Write
(
subscriber
.
Key
);
#
line
default
...
...
@@ -202,7 +203,7 @@ WriteLiteral("</td>\r\n");
#
line
4
7
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
#
line
4
8
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
}
...
...
@@ -212,7 +213,7 @@ WriteLiteral(" <td>");
#
line
4
8
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
#
line
4
9
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
Write
(
column
.
Attribute
.
Name
);
...
...
@@ -223,7 +224,7 @@ WriteLiteral("</td>\r\n <td>\r\n
#
line
5
0
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
#
line
5
1
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
Write
(
column
.
ImplTypeInfo
.
Name
);
...
...
@@ -235,7 +236,7 @@ WriteLiteral("</span>:\r\n <div class=\
#
line
5
3
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
#
line
5
4
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
Write
(
Html
.
MethodEscaped
(
column
.
MethodInfo
));
...
...
@@ -248,7 +249,7 @@ WriteLiteral("</pre>\r\n </code>\r\n
#
line
5
8
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
#
line
5
9
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
i
++;
}
}
...
...
@@ -260,7 +261,7 @@ WriteLiteral(" </tbody>\r\n </table>\r\n
#
line
6
4
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
#
line
6
5
"..\..\Dashboard\Pages\SubscriberPage.cshtml"
}
...
...
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