Initial work for BDC Dashboard (#6646)

This commit is contained in:
Charles Gagnon
2019-08-14 10:17:01 -07:00
committed by GitHub
parent 82c1c57c76
commit 5528a90eaf
11 changed files with 407 additions and 64 deletions

View File

@@ -7,10 +7,11 @@
import * as azdata from 'azdata';
import * as nls from 'vscode-nls';
import { IEndPoint, IControllerError, getEndPoints } from '../controller/clusterControllerApi';
import { ControllerError, getEndPoints } from '../controller/clusterControllerApi';
import { ControllerTreeDataProvider } from '../tree/controllerTreeDataProvider';
import { TreeNode } from '../tree/treeNode';
import { showErrorMessage } from '../utils';
import { EndpointModel } from '../controller/apiGenerated';
const localize = nls.loadMessageBundle();
@@ -39,7 +40,7 @@ export class AddControllerDialogModel {
// We pre-fetch the endpoints here to verify that the information entered is correct (the user is able to connect)
let response = await getEndPoints(clusterName, url, username, password, true);
if (response && response.endPoints) {
let masterInstance: IEndPoint = undefined;
let masterInstance: EndpointModel = undefined;
if (response.endPoints) {
masterInstance = response.endPoints.find(e => e.name && e.name === 'sql-server-master');
}
@@ -55,10 +56,9 @@ export class AddControllerDialogModel {
throw error;
}
}
}
public async onError(error: IControllerError): Promise<void> {
public async onError(error: ControllerError): Promise<void> {
// implement
}
@@ -171,7 +171,7 @@ export class AddControllerDialog {
} catch (error) {
showErrorMessage(error);
if (this.model && this.model.onError) {
await this.model.onError(error as IControllerError);
await this.model.onError(error as ControllerError);
}
return false;
}