Skip to content
This repository was archived by the owner on Jul 15, 2022. It is now read-only.

Commit 460ca3e

Browse files
author
Leonardo Chaia
committed
feat: show port mappings on container list hover
1 parent e06fdfb commit 460ca3e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/app/daemon-tools/container-list/container-list.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h2 style="margin-bottom: 0">
3232

3333
<div style="text-align: right">
3434

35-
<span title="Port Mappings"
35+
<span [title]="'Port Mappings:\n' + getPortMappings(container)"
3636
class="text-nowrap">
3737
<mat-icon>network_wifi</mat-icon>
3838
<b>

src/app/daemon-tools/container-list/container-list.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ export class ContainerListComponent implements OnInit, OnDestroy {
106106
}
107107
}
108108

109+
public getPortMappings(container: ContainerInfo) {
110+
return container.Ports.map(p => p.PublicPort ? `${p.PublicPort}:${p.PrivatePort}` : p.PrivatePort).join('\n');
111+
}
112+
109113
public ngOnDestroy() {
110114
this.componetDestroyed.next();
111115
this.componetDestroyed.unsubscribe();

0 commit comments

Comments
 (0)