mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-15 02:48:30 -05:00
Add compile options to a few extensions (#8252)
* add compile options to a few extensions * move dep to dev dep * fix return types
This commit is contained in:
@@ -3,17 +3,15 @@
|
||||
* 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 * as nls from 'vscode-nls';
|
||||
import { ClusterController, ControllerError } from '../controller/clusterControllerApi';
|
||||
import { ControllerTreeDataProvider } from '../tree/controllerTreeDataProvider';
|
||||
import { TreeNode } from '../tree/treeNode';
|
||||
import { AuthType } from '../constants';
|
||||
import { ManageControllerCommand } from '../../extension';
|
||||
import { BdcDashboardOptions } from './bdcDashboardModel';
|
||||
import { ControllerNode } from '../tree/controllerTreeNode';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
@@ -33,7 +31,7 @@ export class AddControllerDialogModel {
|
||||
private _authTypes: azdata.CategoryValue[];
|
||||
constructor(
|
||||
public treeDataProvider: ControllerTreeDataProvider,
|
||||
public node?: TreeNode,
|
||||
public node?: ControllerNode,
|
||||
public prefilledUrl?: string,
|
||||
public prefilledAuth?: azdata.CategoryValue,
|
||||
public prefilledUsername?: string,
|
||||
|
||||
@@ -192,7 +192,7 @@ export class BdcDashboard extends BdcDashboardPage {
|
||||
* @param serviceName The name of the service to switch to the tab of
|
||||
*/
|
||||
public switchToServiceTab(serviceName: string): void {
|
||||
const tabPageMapping = this.serviceTabPageMapping[serviceName];
|
||||
const tabPageMapping = this.serviceTabPageMapping.get(serviceName);
|
||||
if (!tabPageMapping) {
|
||||
return;
|
||||
}
|
||||
@@ -213,7 +213,7 @@ export class BdcDashboard extends BdcDashboardPage {
|
||||
if (services) {
|
||||
// Add a nav item for each service
|
||||
services.forEach(s => {
|
||||
const existingTabPage = this.serviceTabPageMapping[s.serviceName];
|
||||
const existingTabPage = this.serviceTabPageMapping.get(s.serviceName);
|
||||
if (existingTabPage) {
|
||||
// We've already created the tab and page for this service, just update the tab health status dot
|
||||
existingTabPage.navTab.dot.value = getHealthStatusDot(s.healthStatus);
|
||||
@@ -221,7 +221,7 @@ export class BdcDashboard extends BdcDashboardPage {
|
||||
// New service - create the page and tab
|
||||
const navItem = createServiceNavTab(this.modelView.modelBuilder, s);
|
||||
const serviceStatusPage = new BdcServiceStatusPage(s.serviceName, this.model, this.modelView).container;
|
||||
this.serviceTabPageMapping[s.serviceName] = { navTab: navItem, servicePage: serviceStatusPage };
|
||||
this.serviceTabPageMapping.set(s.serviceName, { navTab: navItem, servicePage: serviceStatusPage });
|
||||
navItem.div.onDidClick(() => {
|
||||
this.switchToServiceTab(s.serviceName);
|
||||
});
|
||||
|
||||
@@ -79,7 +79,7 @@ export class BdcServiceStatusPage extends BdcDashboardPage {
|
||||
private createResourceNavTabs(resources: ResourceStatusModel[]) {
|
||||
let tabIndex = this.createdTabs.size;
|
||||
resources.forEach(resource => {
|
||||
const existingTab: ServiceTab = this.createdTabs[resource.resourceName];
|
||||
const existingTab: ServiceTab = this.createdTabs.get(resource.resourceName);
|
||||
if (existingTab) {
|
||||
// We already created this tab so just update the status
|
||||
existingTab.dot.value = getHealthStatusDot(resource.healthStatus);
|
||||
@@ -87,7 +87,7 @@ export class BdcServiceStatusPage extends BdcDashboardPage {
|
||||
// New tab - create and add to the end of the container
|
||||
const currentIndex = tabIndex++;
|
||||
const resourceHeaderTab = createResourceHeaderTab(this.modelView.modelBuilder, resource);
|
||||
this.createdTabs[resource.resourceName] = resourceHeaderTab;
|
||||
this.createdTabs.set(resource.resourceName, resourceHeaderTab);
|
||||
const resourceStatusPage: azdata.FlexContainer = new BdcDashboardResourceStatusPage(this.model, this.modelView, this.serviceName, resource.resourceName).container;
|
||||
resourceHeaderTab.div.onDidClick(() => {
|
||||
// Don't need to do anything if this is already the currently selected tab
|
||||
|
||||
@@ -22,7 +22,7 @@ function convertCredsToJson(creds: string): { credentials: {} } {
|
||||
if (!creds) {
|
||||
return undefined;
|
||||
}
|
||||
let credObj = { 'credentials': {} };
|
||||
let credObj: { 'credentials': { [key: string]: any } } = { 'credentials': {} };
|
||||
let pairs = creds.split(',');
|
||||
let validPairs: string[] = [];
|
||||
for (let i = 0; i < pairs.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user