Skip to content

Commit

Permalink
Fix for broken under remote WSL/SHH
Browse files Browse the repository at this point in the history
  • Loading branch information
benc-uk committed Oct 11, 2019
1 parent aa9f355 commit 759f622
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 0.3.2
- Caching of external URLs for linked templates
- Temporary workaround while for webview resources are broken in a remote VS Code session. Awaiting fix from VS Code teams
- Caching of external URLs for linked templates, large performance boost.


## 0.3.1
Expand Down
10 changes: 8 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,17 @@ function getWebviewContent() {
let wsname: string = vscode.workspace.name || "unknown";
reporter.sendTelemetryEvent('activated', {'workspace': wsname});

// Just in case, shouldn't happen
if(!panel)
return "";

const assetsPath = panel.webview.asWebviewUri(vscode.Uri.file(path.join(extensionPath, 'assets')));
const iconThemeBase = panel.webview.asWebviewUri(vscode.Uri.file(path.join(extensionPath, 'assets', 'img', 'azure', themeName))).toString();
// !! TEMPORARY WORKAROUND !!
// While loading resources is broken in remote (WSL/SSH) VS Code session, this is a horrible band-aid fix
// See this issue https://github.com/microsoft/vscode-remote-release/issues/1643
const assetsPath = `https://armview.blob.core.windows.net/assets`;
//panel.webview.asWebviewUri(vscode.Uri.file(path.join(extensionPath, 'assets')));
const iconThemeBase = `https://armview.blob.core.windows.net/assets/img/azure/${themeName}`;
//panel.webview.asWebviewUri(vscode.Uri.file(path.join(extensionPath, 'assets', 'img', 'azure', themeName))).toString();

return `
<!DOCTYPE html>
Expand Down

0 comments on commit 759f622

Please sign in to comment.