mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
fix for 3262 (#3263)
This commit is contained in:
@@ -14,8 +14,8 @@ const localize = nls.loadMessageBundle();
|
|||||||
export class CreateSessionDialog {
|
export class CreateSessionDialog {
|
||||||
// Top level
|
// Top level
|
||||||
private readonly CancelButtonText: string = localize('createSessionDialog.cancel', 'Cancel');
|
private readonly CancelButtonText: string = localize('createSessionDialog.cancel', 'Cancel');
|
||||||
private readonly CreateButtonText: string = localize('createSessionDialog.create', 'Create');
|
private readonly CreateButtonText: string = localize('createSessionDialog.create', 'Start');
|
||||||
private readonly DialogTitleText: string = localize('createSessionDialog.title', 'Create New Profiler Session');
|
private readonly DialogTitleText: string = localize('createSessionDialog.title', 'Start New Profiler Session');
|
||||||
|
|
||||||
// UI Components
|
// UI Components
|
||||||
private dialog: sqlops.window.modelviewdialog.Dialog;
|
private dialog: sqlops.window.modelviewdialog.Dialog;
|
||||||
@@ -68,6 +68,10 @@ export class CreateSessionDialog {
|
|||||||
value: ''
|
value: ''
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
|
this.templatesBox.onValueChanged(() => {
|
||||||
|
this.updateSessionName();
|
||||||
|
});
|
||||||
|
|
||||||
let formModel = view.modelBuilder.formContainer()
|
let formModel = view.modelBuilder.formContainer()
|
||||||
.withFormItems([{
|
.withFormItems([{
|
||||||
components: [{
|
components: [{
|
||||||
@@ -86,6 +90,7 @@ export class CreateSessionDialog {
|
|||||||
|
|
||||||
if (this.model.templates) {
|
if (this.model.templates) {
|
||||||
this.templatesBox.values = this.model.getTemplateNames();
|
this.templatesBox.values = this.model.getTemplateNames();
|
||||||
|
this.updateSessionName();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.sessionNameBox.onTextChanged(() => {
|
this.sessionNameBox.onTextChanged(() => {
|
||||||
@@ -99,6 +104,12 @@ export class CreateSessionDialog {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private updateSessionName() {
|
||||||
|
if (this.templatesBox.value) {
|
||||||
|
this.sessionNameBox.value = `ADS_${this.templatesBox.value.toString()}`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private async execute(): Promise<void> {
|
private async execute(): Promise<void> {
|
||||||
let profilerService = sqlops.dataprotocol.getProvider<sqlops.ProfilerProvider>(this._providerType, sqlops.DataProviderType.ProfilerProvider);
|
let profilerService = sqlops.dataprotocol.getProvider<sqlops.ProfilerProvider>(this._providerType, sqlops.DataProviderType.ProfilerProvider);
|
||||||
|
|
||||||
|
|||||||
@@ -233,7 +233,8 @@ export class ProfilerEditor extends BaseEditor {
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
let sessionsContainer = document.createElement('div');
|
let sessionsContainer = document.createElement('div');
|
||||||
sessionsContainer.style.width = '150px';
|
sessionsContainer.style.minWidth = '150px';
|
||||||
|
sessionsContainer.style.maxWidth = '250px';
|
||||||
sessionsContainer.style.paddingRight = '5px';
|
sessionsContainer.style.paddingRight = '5px';
|
||||||
this._sessionSelector.render(sessionsContainer);
|
this._sessionSelector.render(sessionsContainer);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user