mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-23 01:25:38 -05:00
CMS - error check (#5796)
* cms connections dont save * added value to enum * remove refresh and update provider name for cms * removed ownerUri from saved connection and contributed to array * removed owneruri * ownerUri not needed any more * removed AAD from cms * initial review * changed comments * add back saveProfile option for connectionProfile * review fixes and other UI improvements * fixed auth * added cms integration tests * added constants * removed utils from apiwrapper * changed connection type name * review comments * clearer code and addressed reviews * added more error checks * add back functions in apiwrapper
This commit is contained in:
@@ -74,11 +74,17 @@ export function addRegisteredServerCommand(appContext: AppContext, tree: CmsReso
|
||||
return;
|
||||
}
|
||||
let relativePath = node instanceof CmsResourceTreeNode ? '' : node.relativePath;
|
||||
let serverName = node instanceof CmsResourceTreeNode ? node.connection.options.server : null;
|
||||
let serverName = node instanceof CmsResourceTreeNode ? node.connection.options.registeredServerName === ''
|
||||
? node.connection.options.server : node.connection.options.registeredServerName : null;
|
||||
await appContext.cmsUtils.addRegisteredServer(relativePath, node.ownerUri, serverName).then((result) => {
|
||||
if (result) {
|
||||
tree.notifyNodeChanged(node);
|
||||
}
|
||||
}, (error) => {
|
||||
// error out
|
||||
let errorText = localize('cms.errors.addRegisterServerFail', 'Could not add the Registered Server {0}', error);
|
||||
appContext.apiWrapper.showErrorMessage(errorText);
|
||||
return;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user