Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
R
railgun-routing-server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
railgun-routing-server
Commits
cab49571
Commit
cab49571
authored
Aug 29, 2022
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change protocol display
parent
373556dd
Pipeline
#16118
passed with stages
in 1 minute and 49 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
22 deletions
+23
-22
web/src/app/dashboard/dashboard.component.html
web/src/app/dashboard/dashboard.component.html
+20
-20
web/src/app/dashboard/dashboard.component.ts
web/src/app/dashboard/dashboard.component.ts
+3
-2
No files found.
web/src/app/dashboard/dashboard.component.html
View file @
cab49571
<h1
class=
"mat-h1"
>
Dashboard
</h1>
<h1
class=
'mat-h1'
>
Dashboard
</h1>
<mat-card
class=
"mat-elevation-z8"
>
<mat-card
class=
'mat-elevation-z8'
>
<mat-card-header>
<mat-card-header>
<mat-card-title>
<mat-card-title>
<span>
直接相邻链路
</span>
<span>
直接相邻链路
</span>
<mat-slide-toggle
[(ngModel)]=
"routed"
>
路由后
</mat-slide-toggle>
<mat-slide-toggle
[(ngModel)]=
'routed'
>
路由后
</mat-slide-toggle>
<button
mat-icon-button
class=
"more-button"
[matMenuTriggerFor]=
"menu"
aria-label=
"Toggle menu"
>
<button
mat-icon-button
class=
'more-button'
[matMenuTriggerFor]=
'menu'
aria-label=
'Toggle menu'
>
<mat-icon>
more_vert
</mat-icon>
<mat-icon>
more_vert
</mat-icon>
</button>
</button>
<mat-menu
#menu
=
"
matMenu
"
xPosition=
"before"
>
<mat-menu
#menu
=
'
matMenu
'
xPosition=
'before'
>
<button
mat-menu-item
>
Expand
</button>
<button
mat-menu-item
>
Expand
</button>
<button
mat-menu-item
>
Remove
</button>
<button
mat-menu-item
>
Remove
</button>
</mat-menu>
</mat-menu>
</mat-card-title>
</mat-card-title>
</mat-card-header>
</mat-card-header>
<mat-card-content>
<mat-card-content>
<table
mat-table
[dataSource]=
"links"
*ngIf=
"api.routers"
fixedLayout
[trackBy]=
"trackById"
>
<table
mat-table
[dataSource]=
'links'
*ngIf=
'api.routers'
fixedLayout
[trackBy]=
'trackById'
>
<ng-container
matColumnDef=
"name"
>
<ng-container
matColumnDef=
'name'
>
<th
mat-header-cell
*matHeaderCellDef
>
name
</th>
<th
mat-header-cell
*matHeaderCellDef
>
name
</th>
<td
mat-cell
*matCellDef=
"let element"
>
{{element.name}}
</td>
<td
mat-cell
*matCellDef=
'let element'
>
{{element.name}}
</td>
</ng-container>
</ng-container>
<ng-container
matColumnDef=
"id"
>
<ng-container
matColumnDef=
'id'
>
<th
mat-header-cell
*matHeaderCellDef
>
id
</th>
<th
mat-header-cell
*matHeaderCellDef
>
id
</th>
<td
mat-cell
*matCellDef=
"let element"
>
{{element.id}}
</td>
<td
mat-cell
*matCellDef=
'let element'
>
{{element.id}}
</td>
</ng-container>
</ng-container>
<ng-container
*ngFor=
"let router of api.routers"
>
<ng-container
*ngFor=
'let router of api.routers'
>
<ng-container
[matColumnDef]=
"router.name"
>
<ng-container
[matColumnDef]=
'router.name'
>
<th
mat-header-cell
*matHeaderCellDef
><span
class=
"id"
>
{{router.id}}
</span><span
<th
mat-header-cell
*matHeaderCellDef
><span
class=
'id'
>
{{router.id}}
</span><span
class=
"head"
>
{{router.name}}
</span></th>
class=
'head'
>
{{router.name}}
</span></th>
<td
mat-cell
*matCellDef=
"let element"
<td
mat-cell
*matCellDef=
'let element'
[style.color]=
"element.peers[router.id]?.color"
[style.color]=
'element.peers[router.id]?.color'
[style.text-decoration]=
"element.peers[router.id]?.decoration"
[style.text-decoration]=
'element.peers[router.id]?.decoration'
>
{{element.peers[router.id]?.delay}}
</td>
>
{{element.peers[router.id]?.delay}}
<sup>
{{element.peers[router.id]?.protocol}}
</sup>
</td>
</ng-container>
</ng-container>
</ng-container>
</ng-container>
<tr
mat-header-row
*matHeaderRowDef=
"displayedColumns"
></tr>
<tr
mat-header-row
*matHeaderRowDef=
'displayedColumns'
></tr>
<tr
mat-row
*matRowDef=
"let row; columns: displayedColumns;"
></tr>
<tr
mat-row
*matRowDef=
'let row; columns: displayedColumns;'
></tr>
</table>
</table>
</mat-card-content>
</mat-card-content>
</mat-card>
</mat-card>
...
...
web/src/app/dashboard/dashboard.component.ts
View file @
cab49571
...
@@ -55,13 +55,14 @@ export class DashboardComponent implements OnInit {
...
@@ -55,13 +55,14 @@ export class DashboardComponent implements OnInit {
const
decorations
:
Record
<
string
,
string
>
=
{
const
decorations
:
Record
<
string
,
string
>
=
{
oc
:
'
underline blue
'
,
oc
:
'
underline blue
'
,
wg
:
'
underline red
'
,
wg
:
'
underline red
'
,
tun
:
'
underline gree
d
'
tun
:
'
underline gree
n
'
};
};
return
{
return
{
delay
:
quality
.
reliability
<=
0.01
?
'
x
'
:
quality
.
delay
,
delay
:
quality
.
reliability
<=
0.01
?
'
x
'
:
quality
.
delay
,
color
:
`hsl(
${
this
.
mapNumber
(
quality
.
reliability
,
0.9
,
1
,
0
,
120
)}
, 100%, 40%)`
,
color
:
`hsl(
${
this
.
mapNumber
(
quality
.
reliability
,
0.9
,
1
,
0
,
120
)}
, 100%, 40%)`
,
decoration
:
decorations
[
link
.
protocol
]
// decoration: decorations[link.protocol],
protocol
:
link
.
protocol
.
slice
(
0
,
1
)
};
};
}
}
}
}
...
...
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