Open cluster dashboard from SQL Dashboard (#7783)

* Open cluster dashboard

* Remove old translated strings and update var name

* Add exported auth type

* Add newline

* PR feedback
This commit is contained in:
Charles Gagnon
2019-10-18 17:35:47 -07:00
committed by GitHub
parent 203ff3872f
commit ab31a7b964
18 changed files with 39 additions and 80 deletions

View File

@@ -3,8 +3,6 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as azdata from 'azdata';
import * as vscode from 'vscode';
import { ClusterController } from '../controller/clusterControllerApi';
@@ -12,6 +10,8 @@ import { EndpointModel, BdcStatusModel } from '../controller/apiGenerated';
import { showErrorMessage, Endpoint } from '../utils';
import { AuthType } from '../constants';
export type BdcDashboardOptions = { url: string, auth: AuthType, username: string, password: string };
export class BdcDashboardModel {
private _clusterController: ClusterController;
@@ -24,8 +24,8 @@ export class BdcDashboardModel {
public onDidUpdateEndpoints = this._onDidUpdateEndpoints.event;
public onDidUpdateBdcStatus = this._onDidUpdateBdcStatus.event;
constructor(url: string, auth: AuthType, username: string, private password: string, ignoreSslVerification = true) {
this._clusterController = new ClusterController(url, auth, username, password, ignoreSslVerification);
constructor(private options: BdcDashboardOptions, ignoreSslVerification = true) {
this._clusterController = new ClusterController(options.url, options.auth, options.username, options.password, ignoreSslVerification);
this.refresh();
}
@@ -81,7 +81,7 @@ export class BdcDashboardModel {
serverName: sqlServerMasterEndpoint.endpoint,
databaseName: undefined,
userName: 'sa',
password: this.password,
password: this.options.password,
authenticationType: '',
savePassword: true,
groupFullName: undefined,