Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLVSCODE-1041 hide region selector instead of not creating it #695

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions src/connected/connectionsetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,18 +260,16 @@ function renderServerUrlField(initialState, mode) {
<input type="hidden" id="serverUrl-initial" value="${serverUrl}" />`;
}

if (isDogfoodingEnvironment()) {
// SonarQube Cloud connection - pre-populate region field if available
const region = initialState.conn.region ?? 'EU';
const euChecked = region === 'EU' ? 'checked' : '';
const usChecked = region === 'US' ? 'checked' : '';
return `<vscode-radio-group orientation=vertical id="region" ${mode === 'update' ? 'disabled' : ''}>
<label slot="label">Select the SonarQube Cloud instance you would like to connect to</label>
<vscode-radio ${euChecked} value="EU"><b>EU</b> - sonarcloud.io</vscode-radio>
<vscode-radio ${usChecked} value="US"><b>US</b> - us.sonarcloud.io</vscode-radio>
</vscode-radio-group>`;
}
return '';
// SonarQube Cloud connection - pre-populate region field if available
const hidden = !isDogfoodingEnvironment();
const region = initialState.conn.region ?? 'EU';
const euChecked = region === 'EU' ? 'checked' : '';
const usChecked = region === 'US' ? 'checked' : '';
return `<vscode-radio-group orientation=vertical id="region" ${mode === 'update' ? 'disabled' : ''} ${hidden ? 'hidden' : ''}>
<label slot="label">Select the SonarQube Cloud instance you would like to connect to</label>
<vscode-radio ${euChecked} value="EU"><b>EU</b> - sonarcloud.io</vscode-radio>
<vscode-radio ${usChecked} value="US"><b>US</b> - us.sonarcloud.io</vscode-radio>
</vscode-radio-group>`;
}

function renderGenerateTokenButton(connection, serverProductName) {
Expand Down
Loading