From 7989db485eeec4a5ffcdff615ec57949b61ee01d Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Wed, 8 Jan 2020 11:07:57 +0100 Subject: [PATCH] Show remote host in tunnel view items when not localhost Part of #88060 --- src/vs/workbench/contrib/remote/browser/tunnelView.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/remote/browser/tunnelView.ts b/src/vs/workbench/contrib/remote/browser/tunnelView.ts index 59731044e1d..1b046e78169 100644 --- a/src/vs/workbench/contrib/remote/browser/tunnelView.ts +++ b/src/vs/workbench/contrib/remote/browser/tunnelView.ts @@ -356,10 +356,14 @@ class TunnelItem implements ITunnelItem { get label(): string { if (this.name) { return nls.localize('remote.tunnelsView.forwardedPortLabel0', "{0}", this.name); + } else if (this.localAddress && (this.remoteHost !== 'localhost')) { + return nls.localize('remote.tunnelsView.forwardedPortLabel2', "{0}:{1} to {2}", this.remoteHost, this.remotePort, this.localAddress); } else if (this.localAddress) { - return nls.localize('remote.tunnelsView.forwardedPortLabel2', "{0} to {1}", this.remotePort, this.localAddress); + return nls.localize('remote.tunnelsView.forwardedPortLabel3', "{0} to {1}", this.remotePort, this.localAddress); + } else if (this.remoteHost !== 'localhost') { + return nls.localize('remote.tunnelsView.forwardedPortLabel4', "{0}:{1} not forwarded", this.remoteHost, this.remotePort); } else { - return nls.localize('remote.tunnelsView.forwardedPortLabel3', "{0} not forwarded", this.remotePort); + return nls.localize('remote.tunnelsView.forwardedPortLabel5', "{0} not forwarded", this.remotePort); } }