mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-26 17:23:15 -05:00
Respect 'showDashboard' disabled by default (#22907)
This commit is contained in:
@@ -186,7 +186,12 @@ export class ServerTreeView extends Disposable implements IServerTreeView {
|
||||
connectButton.label = localize('serverTree.newConnection', "New Connection");
|
||||
this._register(attachButtonStyler(connectButton, this._themeService));
|
||||
this._register(connectButton.onDidClick(() => {
|
||||
this._connectionManagementService.showConnectionDialog();
|
||||
this._connectionManagementService.showConnectionDialog(undefined, {
|
||||
showDashboard: true,
|
||||
saveTheConnection: true,
|
||||
showConnectionDialogOnError: true,
|
||||
showFirewallRuleOnError: true
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -872,7 +877,6 @@ export class ServerTreeView extends Disposable implements IServerTreeView {
|
||||
if (node instanceof ConnectionProfile) {
|
||||
connectionProfile = node;
|
||||
await TreeUpdateUtils.connectAndCreateOeSession(connectionProfile, {
|
||||
params: undefined,
|
||||
saveTheConnection: true,
|
||||
showConnectionDialogOnError: true,
|
||||
showFirewallRuleOnError: true,
|
||||
|
||||
@@ -283,14 +283,14 @@ suite('SQL Connection Tree Action tests', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('AddServerAction - test if show connection dialog is called', () => {
|
||||
test('AddServerAction - test if show connection dialog is called', async () => {
|
||||
let connectionManagementService = createConnectionManagementService(true, undefined);
|
||||
|
||||
connectionManagementService.setup(x => x.showConnectionDialog(undefined, TypeMoq.It.isAny(), TypeMoq.It.isAny())).returns(
|
||||
() => new Promise<void>((resolve, reject) => resolve()));
|
||||
let connectionTreeAction: AddServerAction = new AddServerAction(AddServerAction.ID, AddServerAction.LABEL, connectionManagementService.object);
|
||||
let conProfGroup = new ConnectionProfileGroup('testGroup', undefined, 'testGroup', undefined, undefined);
|
||||
return connectionTreeAction.run(conProfGroup).then((value) => {
|
||||
connectionManagementService.verify(x => x.showConnectionDialog(undefined, undefined, TypeMoq.It.isAny()), TypeMoq.Times.once());
|
||||
});
|
||||
await connectionTreeAction.run(conProfGroup);
|
||||
connectionManagementService.verify(x => x.showConnectionDialog(undefined, TypeMoq.It.isAny(), TypeMoq.It.isAny()), TypeMoq.Times.once());
|
||||
});
|
||||
|
||||
test('ActiveConnectionsFilterAction - test if view is called to display filtered results', () => {
|
||||
|
||||
Reference in New Issue
Block a user