Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<AssemblyName>LightQueryProfiler</AssemblyName>
<Version>1.2.0-dev.3</Version>
<Version>1.2.0-dev.4</Version>
<FileVersion>1.2.0</FileVersion>
<AssemblyVersion>1.2.0</AssemblyVersion>
<ApplicationIcon>Icons\light-query-profiler.ico</ApplicationIcon>
Expand Down
1 change: 1 addition & 0 deletions src/LightQueryProfiler.WinFormsApp/Views/MainView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ private void ComboAuthentication_SelectionChangeCommitted(object? sender, EventA
toolStripSeparator4.Visible = false;
tslDatabase.Visible = false;
tstDatabase.Visible = false;
tstDatabase.Text = string.Empty;
}
else if ((Shared.Enums.AuthenticationMode)selectedAuthenticationMode == Shared.Enums.AuthenticationMode.AzureSQLDatabase)
{
Expand Down
11 changes: 10 additions & 1 deletion vscode-extension/src/views/profiler-panel-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ export class ProfilerPanelProvider {
<input type="text" id="server" placeholder="localhost" value="localhost" />
</div>

<div class="form-group">
<div class="form-group" id="databaseGroup">
<label for="database">Database</label>
<input type="text" id="database" placeholder="master" value="master" />
</div>
Expand Down Expand Up @@ -795,6 +795,7 @@ export class ProfilerPanelProvider {
const passwordInput = document.getElementById('password');
const usernameGroup = document.getElementById('usernameGroup');
const passwordGroup = document.getElementById('passwordGroup');
const databaseGroup = document.getElementById('databaseGroup');
const startBtn = document.getElementById('startBtn');
const pauseBtn = document.getElementById('pauseBtn');
const resumeBtn = document.getElementById('resumeBtn');
Expand All @@ -813,8 +814,16 @@ export class ProfilerPanelProvider {
// Update auth mode visibility
authMode.addEventListener('change', () => {
const mode = parseInt(authMode.value);
const isWindowsAuth = mode === 0;
const requiresCredentials = mode === 1 || mode === 2;

if (isWindowsAuth) {
databaseGroup.classList.add('hidden');
databaseInput.value = '';
} else {
databaseGroup.classList.remove('hidden');
}

if (requiresCredentials) {
usernameGroup.classList.remove('hidden');
passwordGroup.classList.remove('hidden');
Expand Down
14 changes: 12 additions & 2 deletions vscode-extension/src/views/profiler-view-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ export class ProfilerViewProvider implements vscode.WebviewViewProvider {
<input type="text" id="server" placeholder="localhost" />
</div>

<div class="form-group">
<div class="form-group" id="databaseGroup">
<label for="database">Database</label>
<input type="text" id="database" placeholder="master" />
</div>
Expand Down Expand Up @@ -803,6 +803,7 @@ export class ProfilerViewProvider implements vscode.WebviewViewProvider {
const password = document.getElementById('password');
const usernameGroup = document.getElementById('usernameGroup');
const passwordGroup = document.getElementById('passwordGroup');
const databaseGroup = document.getElementById('databaseGroup');
const startBtn = document.getElementById('startBtn');
const pauseBtn = document.getElementById('pauseBtn');
const resumeBtn = document.getElementById('resumeBtn');
Expand All @@ -818,7 +819,16 @@ export class ProfilerViewProvider implements vscode.WebviewViewProvider {
// Update credential fields visibility based on auth mode
authMode.addEventListener('change', () => {
const mode = parseInt(authMode.value);
const showCredentials = mode !== 0; // 0 = Windows Auth
const isWindowsAuth = mode === 0;
const showCredentials = !isWindowsAuth;

if (isWindowsAuth) {
databaseGroup.style.display = 'none';
(database as HTMLInputElement).value = '';
} else {
databaseGroup.style.display = 'block';
}

usernameGroup.style.display = showCredentials ? 'block' : 'none';
passwordGroup.style.display = showCredentials ? 'block' : 'none';
});
Expand Down
Loading