Skip to content

Commit

Permalink
Add NAT info to the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Senyoret1 committed Sep 2, 2021
1 parent 7fbc34f commit ba9a4ae
Show file tree
Hide file tree
Showing 6 changed files with 24 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
4 changes: 4 additions & 0 deletions static/skywire-manager-src/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"time-in-ms": "{{ time }}ms.",
"time-in-segs": "{{ time }}s.",
"ok": "Ok",
"yes": "Yes",
"no": "No",
"unknown": "Unknown",
"close": "Close",
"window-size-error": "The window is too narrow for the content."
Expand Down Expand Up @@ -96,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
4 changes: 4 additions & 0 deletions static/skywire-manager-src/src/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"time-in-ms": "{{ time }}ms.",
"time-in-segs": "{{ time }}s.",
"ok": "Ok",
"yes": "Yes",
"no": "No",
"unknown": "Desconocido",
"close": "Cerrar",
"window-size-error": "La ventana es demasiado estrecha para el contenido."
Expand Down Expand Up @@ -96,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
4 changes: 4 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 @@ -16,6 +16,8 @@
"time-in-ms": "{{ time }}ms.",
"time-in-segs": "{{ time }}s.",
"ok": "Ok",
"yes": "Yes",
"no": "No",
"unknown": "Unknown",
"close": "Close",
"window-size-error": "The window is too narrow for the content."
Expand Down Expand Up @@ -96,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 ba9a4ae

Please sign in to comment.