Skip to content

Commit

Permalink
Fix bug in SonarQube connection creation view
Browse files Browse the repository at this point in the history
  • Loading branch information
sophio-japharidze-sonarsource committed Jun 28, 2024
1 parent 94080c7 commit fc8e3f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/connected/connectionsetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ function renderConnectionSetupPanel(context: vscode.ExtensionContext, webview: v
<hr>
<form id="connectionForm">
${renderServerUrlField(initialState)}
${renderGenerateTokenButton(initialState, serverProductName)}
${renderGenerateTokenButton(connection, serverProductName)}
<div class="formRowWithStatus">
<vscode-text-field id="token" type="password" placeholder="········" required size="40"
title="A user token generated for your account on ${serverProductName}" value="${initialToken}">
Expand Down Expand Up @@ -335,9 +335,9 @@ function renderConnectionSetupPanel(context: vscode.ExtensionContext, webview: v
</html>`;
}

function renderServerUrlField(connection) {
if (isSonarQubeConnection(connection)) {
const serverUrl = escapeHtml(connection.serverUrl);
function renderServerUrlField(initialState) {
if (isSonarQubeConnection(initialState.conn)) {
const serverUrl = escapeHtml(initialState.conn.serverUrl);
return `<vscode-text-field id="serverUrl" type="url" placeholder="https://your.sonarqube.server/" required size="40"
autofocus value="${serverUrl}">
<b>Server URL</b> <vscode-badge class='tooltip'>i<span class='tooltiptext'>The base URL for your SonarQube server</span></vscode-badge>
Expand Down

0 comments on commit fc8e3f2

Please sign in to comment.