mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Fixed cancel connectionDialog from attach to shows dup "select connection" (#4865)
This commit is contained in:
@@ -668,7 +668,6 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this._onValidConnectionSelected.fire(false);
|
this._onValidConnectionSelected.fire(false);
|
||||||
throw new Error('No valid connection');
|
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
let msg = notebookUtils.getErrorMessage(err);
|
let msg = notebookUtils.getErrorMessage(err);
|
||||||
|
|||||||
@@ -387,8 +387,10 @@ export class AttachToDropdown extends SelectBox {
|
|||||||
this.selectWithOptionName(msgSelectConnection);
|
this.selectWithOptionName(msgSelectConnection);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
if (!connections.includes(msgAddNewConnection)) {
|
||||||
connections.push(msgAddNewConnection);
|
connections.push(msgAddNewConnection);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
this.setOptions(connections);
|
this.setOptions(connections);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -396,9 +398,13 @@ export class AttachToDropdown extends SelectBox {
|
|||||||
|
|
||||||
private loadWithSelectConnection(connections: string[]): string[] {
|
private loadWithSelectConnection(connections: string[]): string[] {
|
||||||
if (connections && connections.length > 0) {
|
if (connections && connections.length > 0) {
|
||||||
|
if (!connections.includes(msgSelectConnection)) {
|
||||||
connections.unshift(msgSelectConnection);
|
connections.unshift(msgSelectConnection);
|
||||||
|
}
|
||||||
this.selectWithOptionName(msgSelectConnection);
|
this.selectWithOptionName(msgSelectConnection);
|
||||||
|
if (!connections.includes(msgAddNewConnection)) {
|
||||||
connections.push(msgAddNewConnection);
|
connections.push(msgAddNewConnection);
|
||||||
|
}
|
||||||
this.setOptions(connections);
|
this.setOptions(connections);
|
||||||
}
|
}
|
||||||
return connections;
|
return connections;
|
||||||
|
|||||||
Reference in New Issue
Block a user