Skip to content

Commit

Permalink
Merge pull request #870 from Senyoret1/nat-info
Browse files Browse the repository at this point in the history
Add NAT info to the UI
  • Loading branch information
jdknives authored Sep 7, 2021
2 parents 26404fe + 24d92c0 commit 187711a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions static/skywire-manager-src/src/app/app.datatypes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
export class Node {
label: string;
localPk: string;
isSymmeticNat?: boolean;
publicIp?: string;
ip: string;
version: string;
apps: Application[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
<span class="title">{{ 'node.details.node-info.public-key' | translate }}&nbsp;</span>
<app-copy-to-clipboard-text text="{{ node.localPk }}"></app-copy-to-clipboard-text>
</span>
<span class="info-line">
<span class="title">{{ 'node.details.node-info.symmetic-nat' | translate }}&nbsp;</span>
{{ (node.isSymmeticNat ? 'common.yes' : 'common.no') | translate }}
</span>
<span class="info-line" *ngIf="!node.isSymmeticNat">
<span class="title">{{ 'node.details.node-info.public-ip' | translate }}&nbsp;</span>
<app-copy-to-clipboard-text text="{{ node.publicIp }}"></app-copy-to-clipboard-text>
</span>
<span class="info-line" *ngIf="node.ip">
<span class="title">{{ 'node.details.node-info.ip' | translate }}&nbsp;</span>
<app-copy-to-clipboard-text text="{{ node.ip }}"></app-copy-to-clipboard-text>
Expand Down
2 changes: 2 additions & 0 deletions static/skywire-manager-src/src/app/services/node.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,8 @@ export class NodeService {
node.secondsOnline = Math.floor(Number.parseFloat(response.uptime));
node.minHops = response.min_hops;
node.skybianBuildVersion = response.skybian_build_version;
node.isSymmeticNat = response.overview.is_symmetic_nat;
node.publicIp = response.overview.public_ip;

// Ip.
if (response.overview.local_ip && (response.overview.local_ip as string).trim()) {
Expand Down
2 changes: 2 additions & 0 deletions static/skywire-manager-src/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@
"title": "Visor Info",
"label": "Label:",
"public-key": "Public key:",
"symmetic-nat": "Symmetic NAT:",
"public-ip": "Public IP:",
"ip": "IP:",
"dmsg-server": "DMSG server:",
"ping": "Ping:",
Expand Down
2 changes: 2 additions & 0 deletions static/skywire-manager-src/src/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@
"title": "Información del visor",
"label": "Etiqueta:",
"public-key": "Llave pública:",
"symmetic-nat": "NAT simétrica:",
"public-ip": "IP pública:",
"ip": "IP:",
"dmsg-server": "Servidor DMSG:",
"ping": "Ping:",
Expand Down
2 changes: 2 additions & 0 deletions static/skywire-manager-src/src/assets/i18n/es_base.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@
"title": "Visor Info",
"label": "Label:",
"public-key": "Public key:",
"symmetic-nat": "Symmetic NAT:",
"public-ip": "Public IP:",
"ip": "IP:",
"dmsg-server": "DMSG server:",
"ping": "Ping:",
Expand Down

0 comments on commit 187711a

Please sign in to comment.